mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Fixed a Crash with the Greenhouse Glass.
Closes https://github.com/Ellpeck/ActuallyAdditions/issues/30
This commit is contained in:
parent
46ad9fee6f
commit
2cd7bea732
1 changed files with 6 additions and 4 deletions
|
@ -31,6 +31,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
||||||
this.timeUntilNextFert--;
|
this.timeUntilNextFert--;
|
||||||
if(timeUntilNextFert <= 0){
|
if(timeUntilNextFert <= 0){
|
||||||
WorldPos blockToFert = this.blockToFertilize();
|
WorldPos blockToFert = this.blockToFertilize();
|
||||||
|
if(this.blockToFertilize() != null){
|
||||||
int metaBefore = blockToFert.getMetadata();
|
int metaBefore = blockToFert.getMetadata();
|
||||||
worldObj.getBlock(blockToFert.getX(), blockToFert.getY(), blockToFert.getZ()).updateTick(worldObj, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), Util.RANDOM);
|
worldObj.getBlock(blockToFert.getX(), blockToFert.getY(), blockToFert.getZ()).updateTick(worldObj, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), Util.RANDOM);
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
int time = 300;
|
int time = 300;
|
||||||
this.timeUntilNextFert = time+Util.RANDOM.nextInt(time);
|
this.timeUntilNextFert = time+Util.RANDOM.nextInt(time);
|
||||||
|
|
Loading…
Reference in a new issue