From f0148a12e944c744ba4f8bbd184efa4cd4c7ef13 Mon Sep 17 00:00:00 2001 From: BallOfEnergy <66693744+BallOfEnergy1@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:55:11 -0500 Subject: [PATCH] part 1 --- .../java/com/hbm/handler/neutron/PileNeutronHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hbm/handler/neutron/PileNeutronHandler.java b/src/main/java/com/hbm/handler/neutron/PileNeutronHandler.java index 48377590e..03af1a103 100644 --- a/src/main/java/com/hbm/handler/neutron/PileNeutronHandler.java +++ b/src/main/java/com/hbm/handler/neutron/PileNeutronHandler.java @@ -62,7 +62,7 @@ public class PileNeutronHandler { TileEntityPileBase originTE = (TileEntityPileBase) origin.tile; BlockPos pos = new BlockPos(originTE); - for(float i = 1; i <= range; i += 0.5F) { + for(float i = 1; i <= range; i += 1F) { BlockPos node = new BlockPos( (int)Math.floor(pos.getX() + 0.5 + vector.xCoord * i), @@ -70,6 +70,9 @@ public class PileNeutronHandler { (int)Math.floor(pos.getZ() + 0.5 + vector.zCoord * i) ); + if(node.equals(pos)) + continue; // don't interact with itself! + TileEntity tile; if (NeutronNodeWorld.nodeCache.containsKey(node)) @@ -77,7 +80,7 @@ public class PileNeutronHandler { else { tile = blockPosToTE(worldObj, node); if (tile == null) - return; // Doesn't exist anymore! + return; // Doesn't exist! if (tile instanceof TileEntityPileBase) NeutronNodeWorld.addNode(new PileNeutronNode((TileEntityPileBase) tile)); }