Initial stab at 1.11

About halfway.
This commit is contained in:
Nicholas Ignoffo 2016-12-12 19:56:36 -08:00
parent ce52aea512
commit 00d6f8eb46
157 changed files with 1036 additions and 1554 deletions

View file

@ -29,13 +29,7 @@ public class WillChunk
this.currentWill = currentWill;
}
public boolean isModified()
{
if ((this.chunkRef != null) && (this.chunkRef.get() != null))
{
return ((Chunk) this.chunkRef.get()).needsSaving(false);
}
return false;
public boolean isModified() {
return (this.chunkRef != null) && (this.chunkRef.get() != null) && this.chunkRef.get().needsSaving(false);
}
}

View file

@ -7,6 +7,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import javax.annotation.Nullable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
@ -15,6 +16,7 @@ public class WorldDemonWillHandler
static ConcurrentHashMap<Integer, WillWorld> containedWills = new ConcurrentHashMap<Integer, WillWorld>();
public static ConcurrentHashMap<Integer, CopyOnWriteArrayList<PosXY>> dirtyChunks = new ConcurrentHashMap<Integer, CopyOnWriteArrayList<PosXY>>();
@Nullable
public static DemonWillHolder getWillHolder(int dim, int x, int y)
{
WillChunk chunk = getWillChunk(dim, x, y);
@ -36,6 +38,7 @@ public class WorldDemonWillHandler
return containedWills.get(dim);
}
@Nullable
public static WillChunk getWillChunk(int dim, int x, int y)
{
if (!containedWills.containsKey(dim))