Fix crash on exiting personal pocket dimension
-changed unload() function to tryunload() to quiet shutdown error messages. If using unload() was intentional, don't do this.
This commit is contained in:
parent
de6d10dc80
commit
2b411ce4cf
2 changed files with 6 additions and 2 deletions
|
@ -349,7 +349,11 @@ public class BlockRift extends Block implements ITileEntityProvider
|
||||||
// is designed to receive an entity, the source of the blast. We have no entity so
|
// is designed to receive an entity, the source of the blast. We have no entity so
|
||||||
// I've set this to access blockResistance directly. Might need changing later.
|
// I've set this to access blockResistance directly. Might need changing later.
|
||||||
|
|
||||||
return (block.blockResistance >= MIN_IMMUNE_RESISTANCE ||
|
//notabadminer: block.getExplosionResistance() doesn't do anything with the entity passed to it
|
||||||
|
//so passing null is fine. Just do it. Also, it returns resistance/5 so we should *5 to get
|
||||||
|
//back to the resistance value.
|
||||||
|
|
||||||
|
return (block.getExplosionResistance(null) * 5 >= MIN_IMMUNE_RESISTANCE ||
|
||||||
modBlocksImmuneToRift.contains(block) ||
|
modBlocksImmuneToRift.contains(block) ||
|
||||||
blocksImmuneToRift.contains(block));
|
blocksImmuneToRift.contains(block));
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,7 +317,7 @@ public class mod_pocketDim
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PocketManager.unload();
|
PocketManager.tryUnload();
|
||||||
deathTracker.writeToFile();
|
deathTracker.writeToFile();
|
||||||
deathTracker = null;
|
deathTracker = null;
|
||||||
worldProperties = null;
|
worldProperties = null;
|
||||||
|
|
Loading…
Reference in a new issue