mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
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.item.Rarity;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.EntityRayTraceResult;
|
import net.minecraft.util.math.EntityRayTraceResult;
|
||||||
import net.minecraft.util.math.RayTraceResult.Type;
|
import net.minecraft.util.math.RayTraceResult.Type;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -116,6 +117,8 @@ public class ExtendoGripItem extends Item {
|
||||||
return;
|
return;
|
||||||
if (!isHoldingExtendoGrip(player))
|
if (!isHoldingExtendoGrip(player))
|
||||||
return;
|
return;
|
||||||
|
if (mc.objectMouseOver instanceof BlockRayTraceResult && mc.objectMouseOver.getType() != Type.MISS)
|
||||||
|
return;
|
||||||
|
|
||||||
// Modified version of GameRenderer#getMouseOver
|
// Modified version of GameRenderer#getMouseOver
|
||||||
double d0 = player.getAttribute(PlayerEntity.REACH_DISTANCE)
|
double d0 = player.getAttribute(PlayerEntity.REACH_DISTANCE)
|
||||||
|
|
Loading…
Reference in a new issue