Fix missing patch which caused per-world storage to not be saved.
This commit is contained in:
parent
d55ddfcebc
commit
7d5d191fc2
2 changed files with 31 additions and 21 deletions
|
@ -1,15 +1,14 @@
|
|||
--- ../src_base/minecraft/net/minecraft/world/WorldServer.java
|
||||
+++ ../src_work/minecraft/net/minecraft/world/WorldServer.java
|
||||
@@ -2,6 +2,8 @@
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
+
|
||||
+import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -47,11 +49,19 @@
|
||||
@@ -47,11 +48,18 @@
|
||||
import net.minecraft.world.biome.WorldChunkManager;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
@ -19,7 +18,6 @@
|
|||
import net.minecraft.world.gen.ChunkProviderServer;
|
||||
import net.minecraft.world.gen.feature.WorldGeneratorBonusChest;
|
||||
import net.minecraft.world.storage.ISaveHandler;
|
||||
+
|
||||
+import net.minecraftforge.common.ChestGenHooks;
|
||||
+import static net.minecraftforge.common.ChestGenHooks.*;
|
||||
+import net.minecraftforge.common.DimensionManager;
|
||||
|
@ -29,7 +27,7 @@
|
|||
|
||||
public class WorldServer extends World
|
||||
{
|
||||
@@ -93,6 +103,10 @@
|
||||
@@ -93,6 +101,10 @@
|
||||
/** An IntHashMap of entity IDs (integers) to their Entity objects. */
|
||||
private IntHashMap entityIdMap;
|
||||
|
||||
|
@ -40,7 +38,7 @@
|
|||
public WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler, ILogAgent par7ILogAgent)
|
||||
{
|
||||
super(par2ISaveHandler, par3Str, par5WorldSettings, WorldProvider.getProviderForDimension(par4), par6Profiler, par7ILogAgent);
|
||||
@@ -125,8 +139,12 @@
|
||||
@@ -125,8 +137,12 @@
|
||||
this.mapStorage.setData("scoreboard", scoreboardsavedata);
|
||||
}
|
||||
|
||||
|
@ -54,7 +52,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -188,6 +206,10 @@
|
||||
@@ -188,6 +204,10 @@
|
||||
this.villageSiegeObj.tick();
|
||||
this.theProfiler.endStartSection("portalForcer");
|
||||
this.worldTeleporter.removeStalePortalLocations(this.getTotalWorldTime());
|
||||
|
@ -65,7 +63,7 @@
|
|||
this.theProfiler.endSection();
|
||||
this.sendAndApplyBlockEvents();
|
||||
}
|
||||
@@ -198,6 +220,7 @@
|
||||
@@ -198,6 +218,7 @@
|
||||
public SpawnListEntry spawnRandomCreature(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
|
||||
{
|
||||
List list = this.getChunkProvider().getPossibleCreatures(par1EnumCreatureType, par2, par3, par4);
|
||||
|
@ -73,7 +71,7 @@
|
|||
return list != null && !list.isEmpty() ? (SpawnListEntry)WeightedRandom.getRandomItem(this.rand, list) : null;
|
||||
}
|
||||
|
||||
@@ -241,10 +264,7 @@
|
||||
@@ -241,10 +262,7 @@
|
||||
|
||||
private void resetRainAndThunder()
|
||||
{
|
||||
|
@ -85,7 +83,7 @@
|
|||
}
|
||||
|
||||
public boolean areAllPlayersAsleep()
|
||||
@@ -315,6 +335,14 @@
|
||||
@@ -315,6 +333,14 @@
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
Iterator iterator = this.activeChunkSet.iterator();
|
||||
|
@ -100,7 +98,7 @@
|
|||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
@@ -325,14 +353,18 @@
|
||||
@@ -325,14 +351,18 @@
|
||||
Chunk chunk = this.getChunkFromChunkCoords(chunkcoordintpair.chunkXPos, chunkcoordintpair.chunkZPos);
|
||||
this.moodSoundAndLightCheck(k, l, chunk);
|
||||
this.theProfiler.endStartSection("tickChunk");
|
||||
|
@ -121,7 +119,7 @@
|
|||
{
|
||||
this.updateLCG = this.updateLCG * 3 + 1013904223;
|
||||
i1 = this.updateLCG >> 2;
|
||||
@@ -349,7 +381,7 @@
|
||||
@@ -349,7 +379,7 @@
|
||||
this.theProfiler.endStartSection("iceandsnow");
|
||||
int i2;
|
||||
|
||||
|
@ -130,7 +128,7 @@
|
|||
{
|
||||
this.updateLCG = this.updateLCG * 3 + 1013904223;
|
||||
i1 = this.updateLCG >> 2;
|
||||
@@ -437,6 +469,9 @@
|
||||
@@ -437,6 +467,9 @@
|
||||
public void scheduleBlockUpdateWithPriority(int par1, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
NextTickListEntry nextticklistentry = new NextTickListEntry(par1, par2, par3, par4);
|
||||
|
@ -140,7 +138,7 @@
|
|||
byte b0 = 0;
|
||||
|
||||
if (this.scheduledUpdatesAreImmediate && par4 > 0)
|
||||
@@ -502,7 +537,7 @@
|
||||
@@ -502,7 +535,7 @@
|
||||
*/
|
||||
public void updateEntities()
|
||||
{
|
||||
|
@ -149,7 +147,7 @@
|
|||
{
|
||||
if (this.updateEntityTick++ >= 1200)
|
||||
{
|
||||
@@ -568,6 +603,9 @@
|
||||
@@ -568,6 +601,9 @@
|
||||
{
|
||||
nextticklistentry = (NextTickListEntry)iterator.next();
|
||||
iterator.remove();
|
||||
|
@ -159,7 +157,7 @@
|
|||
byte b0 = 0;
|
||||
|
||||
if (this.checkChunksExist(nextticklistentry.xCoord - b0, nextticklistentry.yCoord - b0, nextticklistentry.zCoord - b0, nextticklistentry.xCoord + b0, nextticklistentry.yCoord + b0, nextticklistentry.zCoord + b0))
|
||||
@@ -700,16 +738,28 @@
|
||||
@@ -700,16 +736,28 @@
|
||||
{
|
||||
ArrayList arraylist = new ArrayList();
|
||||
|
||||
|
@ -198,7 +196,7 @@
|
|||
return arraylist;
|
||||
}
|
||||
|
||||
@@ -717,6 +767,11 @@
|
||||
@@ -717,6 +765,11 @@
|
||||
* Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here.
|
||||
*/
|
||||
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
|
||||
|
@ -210,7 +208,7 @@
|
|||
{
|
||||
return !this.mcServer.isBlockProtected(this, par2, par3, par4, par1EntityPlayer);
|
||||
}
|
||||
@@ -801,7 +856,7 @@
|
||||
@@ -801,7 +854,7 @@
|
||||
*/
|
||||
protected void createBonusChest()
|
||||
{
|
||||
|
@ -219,7 +217,7 @@
|
|||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
@@ -844,6 +899,7 @@
|
||||
@@ -844,6 +897,7 @@
|
||||
}
|
||||
|
||||
this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
|
||||
|
@ -227,7 +225,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -866,6 +922,7 @@
|
||||
@@ -866,6 +920,7 @@
|
||||
this.checkSessionLock();
|
||||
this.saveHandler.saveWorldInfoWithPlayer(this.worldInfo, this.mcServer.getConfigurationManager().getHostPlayerData());
|
||||
this.mapStorage.saveAllData();
|
||||
|
@ -235,7 +233,7 @@
|
|||
}
|
||||
|
||||
protected void onEntityAdded(Entity par1Entity)
|
||||
@@ -1073,4 +1130,9 @@
|
||||
@@ -1073,4 +1128,9 @@
|
||||
{
|
||||
return this.worldTeleporter;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
--- ../src_base/minecraft/net/minecraft/world/WorldServerMulti.java
|
||||
+++ ../src_work/minecraft/net/minecraft/world/WorldServerMulti.java
|
||||
@@ -19,5 +19,8 @@
|
||||
/**
|
||||
* Saves the chunks to disk.
|
||||
*/
|
||||
- protected void saveLevel() throws MinecraftException {}
|
||||
+ protected void saveLevel() throws MinecraftException
|
||||
+ {
|
||||
+ this.perWorldStorage.saveAllData();
|
||||
+ }
|
||||
}
|
Loading…
Reference in a new issue