- Safety-Restriction: Node cannot have 2 vortex types at the same time.

This commit is contained in:
HellFirePvP committed 2015-10-31 01:11:23 +01:00
1 parent 3b4522dfff
commit e8b6a1e885
1 file changed
+2 -1
@@ -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);