#[HELP] Overriding Entity#drops doesn't remove base mob drops

1 messages · Page 1 of 1 (latest)

gray dragon
#

I'm currently creating a custom entity that extends a Zombie I'm trying to have it have a custom drop (Removing it's previous Zombie Flesh drop) and I'm using this.drops = new ArrayList<ItemStack>();

Past attempts at fixing (Failed):

  • Setting this.drops = null; before changing.

  • Setting this.lootTable = null;.

  • Overriding Zombie#dropCustomDeathLoot().

  • Overriding Zombie#setGuaranteedDrop().

  • Using super.setGuaranteedDrop().

Issue:

  • The Zombie Flesh drop still drops when zombie is killed.

Code

https://paste.md-5.net/icaxuqewoc.java

#

[HELP] Overriding Entity#drops doesn't remove base mob drops

vast jungle
gray dragon
vast jungle
#

well then based in your version you can override methods.. in 1.20.2 the entities has things like shouldDropLoot and nother drop methods for handle all this

gray dragon
vast jungle
#

and you debug if the method is being called?

gray dragon
#

yeah

vast jungle
#

maybe the overriden class are not being take and use the "super" the normal zombie

gray dragon
#

alright I'll try that