mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Fixed a crash when mana pools are broken or removed from the world. Actually has to do with a bug in forge, so this is a bit of a band aid. Closes #1950
This commit is contained in:
1 parent
ba049f8b45
commit
0085bc2415
1 file changed
+7
-1
@@ -407,7 +407,13 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
|
||||
@Override
|
||||
public int getCurrentMana() {
|
||||
return worldObj != null && worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.POOL_VARIANT) == PoolVariant.CREATIVE ? MAX_MANA : mana;
|
||||
if(worldObj != null) {
|
||||
IBlockState state = worldObj.getBlockState(getPos());
|
||||
if(state.getProperties().containsKey(BotaniaStateProps.POOL_VARIANT))
|
||||
return state.getValue(BotaniaStateProps.POOL_VARIANT) == PoolVariant.CREATIVE ? MAX_MANA : mana;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user