Chunkloader fixes
This commit is contained in:
parent
8fbb41a588
commit
7687a77332
2 changed files with 29 additions and 20 deletions
StevenDimDoors/mod_pocketDim
|
@ -319,7 +319,13 @@ public class mod_pocketDim
|
|||
CommandCreatePocket.instance().register(event);
|
||||
CommandTeleportPlayer.instance().register(event);
|
||||
|
||||
|
||||
ChunkLoaderHelper.loadChunkForcedWorlds(event);
|
||||
try
|
||||
{
|
||||
ChunkLoaderHelper.loadChunkForcedWorlds(event);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.out.println("Loading chunkloaders failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,24 +24,27 @@ public class TileEntityDimDoorGold extends TileEntityDimDoor implements IChunkLo
|
|||
@Override
|
||||
public void updateEntity()
|
||||
{ // every tick?
|
||||
if (PocketManager.getDimensionData(this.worldObj) != null &&
|
||||
PocketManager.getDimensionData(this.worldObj).isPocketDimension() &&
|
||||
!this.worldObj.isRemote)
|
||||
{
|
||||
if(PocketManager.getLink(this.xCoord,this.yCoord,this.zCoord,this.worldObj)==null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.chunkTicket == null)
|
||||
{
|
||||
chunkTicket = ForgeChunkManager.requestTicket(mod_pocketDim.instance, worldObj, Type.NORMAL);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorX", xCoord);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorY", yCoord);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorZ", zCoord);
|
||||
forceChunkLoading(chunkTicket,this.xCoord,this.zCoord);
|
||||
}
|
||||
|
||||
}
|
||||
if (PocketManager.getDimensionData(this.worldObj) != null &&
|
||||
PocketManager.getDimensionData(this.worldObj).isPocketDimension() &&
|
||||
!this.worldObj.isRemote)
|
||||
{
|
||||
if(PocketManager.getLink(this.xCoord,this.yCoord,this.zCoord,this.worldObj)==null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.chunkTicket == null)
|
||||
{
|
||||
if(chunkTicket == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
chunkTicket = ForgeChunkManager.requestTicket(mod_pocketDim.instance, worldObj, Type.NORMAL);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorX", xCoord);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorY", yCoord);
|
||||
chunkTicket.getModData().setInteger("goldDimDoorZ", zCoord);
|
||||
forceChunkLoading(chunkTicket,this.xCoord,this.zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue