fixed crash on pocket unload
This commit is contained in:
parent
b3765b2bad
commit
fa428f53cf
2 changed files with 13 additions and 6 deletions
|
@ -30,16 +30,20 @@ public class CommandStartDungeonCreation extends CommandBase
|
|||
int x = (int) player.posX;
|
||||
int y = (int) player.posY;
|
||||
int z = (int) player.posZ;
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
|
||||
LinkData link = new LinkData(player.worldObj.provider.dimensionId, 0, x, y+1, z, x, y+1, z, true, 3);
|
||||
LinkData link = new LinkData(player.worldObj.provider.dimensionId, 0, x, y+1, z, x, y+1, z, true, 3);
|
||||
|
||||
link = dimHelper.instance.createPocket(link,true, false);
|
||||
link = dimHelper.instance.createPocket(link,true, false);
|
||||
|
||||
dimHelper.instance.teleportToPocket(player.worldObj, link, player);
|
||||
dimHelper.instance.teleportToPocket(player.worldObj, link, player);
|
||||
|
||||
customDungeonImporter.customDungeonStatus.put(player.worldObj.provider.dimensionId, dimHelper.instance.getLinkDataFromCoords(link.destXCoord, link.destYCoord, link.destZCoord, link.destDimID));
|
||||
customDungeonImporter.customDungeonStatus.put(player.worldObj.provider.dimensionId, dimHelper.instance.getLinkDataFromCoords(link.destXCoord, link.destYCoord, link.destZCoord, link.destDimID));
|
||||
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("DimID = "+ link.destDimID);
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("DimID = "+ link.destDimID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -310,7 +310,10 @@ public class dimHelper extends DimensionManager
|
|||
*/
|
||||
public void teleportToPocket(World world,LinkData linkData, Entity entity)
|
||||
{
|
||||
|
||||
if(world.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(linkData!=null)
|
||||
|
|
Loading…
Reference in a new issue