From e8b6a1e8854eb3e4cae9697c39d5bb5e76be39f0 Mon Sep 17 00:00:00 2001 From: HellFirePvP <01ecs01m> Date: Sat, 31 Oct 2015 01:11:23 +0100 Subject: [PATCH] - Safety-Restriction: Node cannot have 2 vortex types at the same time. --- .../gadomancy/common/registration/RegisteredManipulations.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/makeo/gadomancy/common/registration/RegisteredManipulations.java b/src/main/java/makeo/gadomancy/common/registration/RegisteredManipulations.java index 56df88a..b120fe4 100644 --- a/src/main/java/makeo/gadomancy/common/registration/RegisteredManipulations.java +++ b/src/main/java/makeo/gadomancy/common/registration/RegisteredManipulations.java @@ -173,7 +173,7 @@ public class RegisteredManipulations { NodeType newType = node.getNodeType(); int random = node.getWorldObj().rand.nextInt(40); if(random > 38) { - newType = NodeType.HUNGRY; //1 of 40 + if(!(node.getExtendedNodeType() != null && node.getExtendedNodeType().equals(ExtendedNodeType.GROWING))) newType = NodeType.HUNGRY; //1 of 40 } else if(random > 37) { newType = NodeType.TAINTED; //1 of 40 } else if(random > 34) { @@ -196,6 +196,7 @@ public class RegisteredManipulations { @Override public boolean affect(TileExtendedNode node) { boolean isGrowingAlready = node.getExtendedNodeType() != null && node.getExtendedNodeType().equals(ExtendedNodeType.GROWING); + if(isGrowingAlready) if(node.getNodeType().equals(NodeType.HUNGRY)) isGrowingAlready = false; if(!isGrowingAlready) { node.setExtendedNodeType(ExtendedNodeType.GROWING); ResearchHelper.distributeResearch(Gadomancy.MODID.toUpperCase() + ".GROWING", node.getWorldObj(), node.xCoord, node.yCoord, node.zCoord, 12);