Extendo clip
- Fixed extendo grips able to attack entities behind blocks
This commit is contained in:
parent
f47d1e87c1
commit
de55778fc5
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.Rarity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.EntityRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult.Type;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -116,6 +117,8 @@ public class ExtendoGripItem extends Item {
|
|||
return;
|
||||
if (!isHoldingExtendoGrip(player))
|
||||
return;
|
||||
if (mc.objectMouseOver instanceof BlockRayTraceResult && mc.objectMouseOver.getType() != Type.MISS)
|
||||
return;
|
||||
|
||||
// Modified version of GameRenderer#getMouseOver
|
||||
double d0 = player.getAttribute(PlayerEntity.REACH_DISTANCE)
|
||||
|
|
Loading…
Reference in a new issue