[SPIGOT-946] Begin making use of access transforms to simplify patching.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2015-06-06 19:33:48 +10:00
parent ae714e4861
commit 58abe21c5a
47 changed files with 76 additions and 632 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/ChunkProviderServer.java
+++ b/net/minecraft/server/ChunkProviderServer.java
@@ -11,17 +11,28 @@
@@ -11,16 +11,27 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -20,22 +20,18 @@
private static final Logger b = LogManager.getLogger();
- private Set<Long> unloadQueue = Collections.newSetFromMap(new ConcurrentHashMap());
- private Chunk emptyChunk;
- private IChunkProvider chunkProvider;
+ public LongHashSet unloadQueue = new LongHashSet(); // CraftBukkit - LongHashSet
+ public Chunk emptyChunk; // CraftBukkit - public
+ public IChunkProvider chunkProvider; // CraftBukkit - public
public Chunk emptyChunk;
public IChunkProvider chunkProvider;
private IChunkLoader chunkLoader;
- public boolean forceChunkLoad = true;
- private LongHashMap<Chunk> chunks = new LongHashMap();
- private List<Chunk> chunkList = Lists.newArrayList();
- private WorldServer world;
+ public boolean forceChunkLoad = false; // CraftBukkit - true -> false
+ public LongObjectHashMap<Chunk> chunks = new LongObjectHashMap<Chunk>();
+ public WorldServer world; // CraftBukkit - public
public WorldServer world;
public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, IChunkProvider ichunkprovider) {
this.emptyChunk = new EmptyChunk(worldserver, 0, 0);
@@ -31,26 +42,43 @@
}
@@ -186,7 +182,7 @@
chunk.loadNearby(this, this, i, j);
}
@@ -96,12 +189,25 @@
@@ -96,9 +189,22 @@
}
public Chunk getOrCreateChunk(int i, int j) {
@@ -210,29 +206,7 @@
+ // CraftBukkit end
}
- private Chunk loadChunk(int i, int j) {
+ public Chunk loadChunk(int i, int j) { // CraftBukkit - public
if (this.chunkLoader == null) {
return null;
} else {
@@ -123,7 +229,7 @@
}
}
- private void saveChunkNOP(Chunk chunk) {
+ public void saveChunkNOP(Chunk chunk) { // CraftBukkit - public
if (this.chunkLoader != null) {
try {
this.chunkLoader.b(this.world, chunk);
@@ -134,7 +240,7 @@
}
}
- private void saveChunk(Chunk chunk) {
+ public void saveChunk(Chunk chunk) { // CraftBukkit - public
if (this.chunkLoader != null) {
try {
chunk.setLastSaved(this.world.getTime());
public Chunk loadChunk(int i, int j) {
@@ -155,6 +261,30 @@
chunk.n();
if (this.chunkProvider != null) {