@@ -656,26 +656,18 @@ private List<IndexedCuboid6> getCollisionBox(IBlockAccess world, BlockPos pos, @
656656
657657 public boolean hasPipeCollisionChangingItem (IBlockAccess world , BlockPos pos , Entity entity ) {
658658 if (entity instanceof EntityPlayer ) {
659- return hasPipeCollisionChangingItem (world , pos , ((EntityPlayer ) entity ).getHeldItem (EnumHand .MAIN_HAND ),
660- entity ) ||
661- hasPipeCollisionChangingItem (world , pos , ((EntityPlayer ) entity ).getHeldItem (EnumHand .OFF_HAND ),
662- entity ) ||
659+ return hasPipeCollisionChangingItem (world , pos , ((EntityPlayer ) entity ).getHeldItem (EnumHand .MAIN_HAND )) ||
660+ hasPipeCollisionChangingItem (world , pos , ((EntityPlayer ) entity ).getHeldItem (EnumHand .OFF_HAND )) ||
663661 entity .isSneaking () && isHoldingPipe ((EntityPlayer ) entity );
664662 }
665663 return false ;
666664 }
667665
668666 public abstract boolean isHoldingPipe (EntityPlayer player );
669667
670- public boolean hasPipeCollisionChangingItem (IBlockAccess world , BlockPos pos , ItemStack stack ,
671- @ Nullable Entity entity ) {
668+ public boolean hasPipeCollisionChangingItem (IBlockAccess world , BlockPos pos , ItemStack stack ) {
672669 if (isPipeTool (stack )) return true ;
673670
674- if (entity != null && entity .isSneaking () && entity instanceof EntityPlayer player &&
675- (GTUtility .isSprayCan (player .getHeldItem (EnumHand .MAIN_HAND )) ||
676- GTUtility .isSprayCan (player .getHeldItem (EnumHand .OFF_HAND ))))
677- return true ;
678-
679671 IPipeTile <PipeType , NodeDataType > pipeTile = getPipeTileEntity (world , pos );
680672 if (pipeTile == null ) return false ;
681673
@@ -688,10 +680,6 @@ public boolean hasPipeCollisionChangingItem(IBlockAccess world, BlockPos pos, It
688680 return GTUtility .isCoverBehaviorItem (stack , () -> hasAnyCover , coverDef -> acceptsCovers );
689681 }
690682
691- public boolean hasPipeCollisionChangingItem (IBlockAccess world , BlockPos pos , ItemStack stack ) {
692- return hasPipeCollisionChangingItem (world , pos , stack , null );
693- }
694-
695683 @ Override
696684 public boolean canRenderInLayer (@ NotNull IBlockState state , @ NotNull BlockRenderLayer layer ) {
697685 return true ;
0 commit comments