mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-13 16:54:03 +00:00
Update TileInfusionClaw.java
fixed crashes
This commit is contained in:
1 parent
cacee21a58
commit
bd3652648f
1 file changed
+16
@@ -229,6 +229,17 @@ public class TileInfusionClaw extends SynchronizedTileEntity implements IInvento
|
||||
|
||||
ClickBehavior behavior = getClickBehavior(world, x, y, z);
|
||||
if(behavior != null) {
|
||||
|
||||
if (world == null){
|
||||
try {
|
||||
world = getWorldObj();
|
||||
}
|
||||
catch(NullPointerException e){
|
||||
makeo.gadomancy.common.log.error("fatal error, world == null! at InfusionClaw");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
AdvancedFakePlayer fakePlayer = new AdvancedFakePlayer((WorldServer) world, FAKE_UUID);
|
||||
loadResearch(fakePlayer);
|
||||
|
||||
@@ -246,6 +257,11 @@ public class TileInfusionClaw extends SynchronizedTileEntity implements IInvento
|
||||
im.setWorld((WorldServer) world);
|
||||
}
|
||||
|
||||
if(fakePlayer == null){
|
||||
makeo.gadomancy.common.log.warn("Infusion Claw was build inside of a protected area! You need to allow FakePlayers here!");
|
||||
return;
|
||||
}
|
||||
|
||||
fakePlayer.setHeldItem(wandStack);
|
||||
this.im.activateBlockOrUseItem(fakePlayer, world, wandStack, x, y, z, ForgeDirection.UP.ordinal(), 0.5F, 0.5F, 0.5F);
|
||||
addInstability(behavior);
|
||||
|
||||
Reference in new issue
Block a user