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)) if (!isHoldingExtendoGrip(player))
return; return;
Entity target = event.getTarget(); Entity target = event.getTarget();
if (!target.attackEntityFrom(DamageSource.causePlayerDamage(player), 0)) if (target instanceof ItemFrameEntity || !target.attackEntityFrom(DamageSource.causePlayerDamage(player), 0))
return; return;
int strength = 2; int strength = 2;
float yaw = entity.rotationYaw * ((float) Math.PI / 180F); float yaw = entity.rotationYaw * ((float) Math.PI / 180F);