mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 06:24:12 +01:00
Extendo clip
- Fixed extendo grips able to attack entities behind blocks
This commit is contained in:
parent
f47d1e87c1
commit
de55778fc5
@ -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 New Issue
Block a user