mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Replace Growth Ring's constant NBT updating with world time checking
This commit is contained in:
parent
1793a2418f
commit
bfd859e144
1 changed files with 1 additions and 8 deletions
|
@ -51,10 +51,8 @@ public class ItemGrowthRing extends ItemEnergy{
|
||||||
if(stack.getTagCompound() == null){
|
if(stack.getTagCompound() == null){
|
||||||
stack.setTagCompound(new NBTTagCompound());
|
stack.setTagCompound(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
int waitTime = stack.getTagCompound().getInteger("WaitTime");
|
|
||||||
|
|
||||||
//Adding all possible Blocks
|
//Adding all possible Blocks
|
||||||
if(waitTime >= 30){
|
if(player.worldObj.getTotalWorldTime()%30 == 0){
|
||||||
int range = 3;
|
int range = 3;
|
||||||
for(int x = -range; x < range+1; x++){
|
for(int x = -range; x < range+1; x++){
|
||||||
for(int z = -range; z < range+1; z++){
|
for(int z = -range; z < range+1; z++){
|
||||||
|
@ -94,11 +92,6 @@ public class ItemGrowthRing extends ItemEnergy{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.getTagCompound().setInteger("WaitTime", 0);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
stack.getTagCompound().setInteger("WaitTime", waitTime+1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue