mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +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,11 +31,13 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
|||
this.timeUntilNextFert--;
|
||||
if(timeUntilNextFert <= 0){
|
||||
WorldPos blockToFert = this.blockToFertilize();
|
||||
int metaBefore = blockToFert.getMetadata();
|
||||
worldObj.getBlock(blockToFert.getX(), blockToFert.getY(), blockToFert.getZ()).updateTick(worldObj, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), Util.RANDOM);
|
||||
if(this.blockToFertilize() != null){
|
||||
int metaBefore = blockToFert.getMetadata();
|
||||
worldObj.getBlock(blockToFert.getX(), blockToFert.getY(), blockToFert.getZ()).updateTick(worldObj, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), Util.RANDOM);
|
||||
|
||||
if(blockToFert.getMetadata() != metaBefore){
|
||||
worldObj.playAuxSFX(2005, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), 0);
|
||||
if(blockToFert.getMetadata() != metaBefore){
|
||||
worldObj.playAuxSFX(2005, blockToFert.getX(), blockToFert.getY(), blockToFert.getZ(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue