Status
Won't fix
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description
Im trying to create an event when the mob attack it will break the item held by the player such as a sword, or just any held item in general. However i keep on getting a compile error everytime i try to add it.
@Override
public void onDeath(DamageSource source) {
super.onDeath(source);
int i = (int) this.posX;
int j = (int) this.posY;
int k = (int) this.posZ;
Entity entity = this;
if (true) {
getHeldItemMainhand().damageItem(3, EntityPlayer);
}
}
This is the code thats currently in. It does not seem to work.