Add support Save/Load Dimensions Data
This commit is contained in:
parent
2d3310718a
commit
d3a72491b4
1 changed files with 2 additions and 2 deletions
|
@ -1702,7 +1702,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void handleChunkSaveEvent(ChunkDataEvent.Save event)
|
public void handleChunkSaveEvent(ChunkDataEvent.Save event)
|
||||||
{
|
{
|
||||||
ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,1,event.getChunk().zPosition);
|
ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition);
|
||||||
if(chunkData.containsKey(tPos)){
|
if(chunkData.containsKey(tPos)){
|
||||||
int[] tInts = chunkData.get(tPos);
|
int[] tInts = chunkData.get(tPos);
|
||||||
if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);}
|
if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);}
|
||||||
|
@ -1715,7 +1715,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
int tOil = 0;
|
int tOil = 0;
|
||||||
int tPollution = 0;
|
int tPollution = 0;
|
||||||
|
|
||||||
ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,1,event.getChunk().zPosition);
|
ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition);
|
||||||
int[] tData = new int[2];
|
int[] tData = new int[2];
|
||||||
if(chunkData.containsKey(tPos)){
|
if(chunkData.containsKey(tPos)){
|
||||||
tData = chunkData.get(tPos);
|
tData = chunkData.get(tPos);
|
||||||
|
|
Loading…
Reference in a new issue