Fix extendo grip breaking item frames instead of making the item pop off

This commit is contained in:
grimmauld 2020-09-06 12:07:33 +02:00
parent f85894b232
commit fb7b2e64b2

View file

@ -157,7 +157,7 @@ public class ExtendoGripItem extends Item {
if (!isHoldingExtendoGrip(player))
return;
Entity target = event.getTarget();
if (!target.attackEntityFrom(DamageSource.causePlayerDamage(player), 0))
if (target instanceof ItemFrameEntity || !target.attackEntityFrom(DamageSource.causePlayerDamage(player), 0))
return;
int strength = 2;
float yaw = entity.rotationYaw * ((float) Math.PI / 180F);