0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 09:16:20 +02:00

Fix AutoEatHack.isClickable() using the wrong HitResult

This commit is contained in:
Alexander01998 2020-03-04 16:14:53 +01:00
parent 6d32c37d3c
commit bb35648933

View File

@ -189,14 +189,14 @@ public final class AutoEatHack extends Hack implements UpdateListener
if(hitResult instanceof EntityHitResult) if(hitResult instanceof EntityHitResult)
{ {
Entity entity = ((EntityHitResult)MC.crosshairTarget).getEntity(); Entity entity = ((EntityHitResult)hitResult).getEntity();
return entity instanceof VillagerEntity return entity instanceof VillagerEntity
|| entity instanceof TameableEntity; || entity instanceof TameableEntity;
} }
if(hitResult instanceof BlockHitResult) if(hitResult instanceof BlockHitResult)
{ {
BlockPos pos = ((BlockHitResult)MC.crosshairTarget).getBlockPos(); BlockPos pos = ((BlockHitResult)hitResult).getBlockPos();
if(pos == null) if(pos == null)
return false; return false;