Merge pull request #1851 from starlis/dupeRemoveEntities

Remove duplicate removeEntities - Fixes #1838
This commit is contained in:
mikeprimm 2016-01-21 18:30:39 -06:00
commit 20320c578f
4 changed files with 1 additions and 20 deletions

View File

@ -88,10 +88,6 @@ public abstract class BukkitVersionHelper {
* Test if normal chunk snapshot * Test if normal chunk snapshot
*/ */
// public abstract boolean isCraftChunkSnapshot(ChunkSnapshot css); // public abstract boolean isCraftChunkSnapshot(ChunkSnapshot css);
/**
* Remove entities from given chunk
*/
public abstract void removeEntitiesFromChunk(Chunk c);
/** /**
* Get inhabited ticks count from chunk * Get inhabited ticks count from chunk
*/ */

View File

@ -89,7 +89,6 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
} }
/** n.m.s.Chunk */ /** n.m.s.Chunk */
nmschunk = getNMSClass("net.minecraft.server.Chunk"); nmschunk = getNMSClass("net.minecraft.server.Chunk");
nmsc_removeentities = getMethod(nmschunk, new String[] { "removeEntities" }, nulltypes);
nmsc_tileentities = getField(nmschunk, new String[] { "tileEntities" }, Map.class); nmsc_tileentities = getField(nmschunk, new String[] { "tileEntities" }, Map.class);
nmsc_inhabitedticks = getFieldNoFail(nmschunk, new String[] { "s", "q", "u" }, long.class); nmsc_inhabitedticks = getFieldNoFail(nmschunk, new String[] { "s", "q", "u" }, long.class);
if (nmsc_inhabitedticks == null) { if (nmsc_inhabitedticks == null) {
@ -144,7 +143,6 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
} }
@Override @Override
public void unloadChunkNoSave(World w, Chunk c, int cx, int cz) { public void unloadChunkNoSave(World w, Chunk c, int cx, int cz) {
this.removeEntitiesFromChunk(c);
w.unloadChunk(cx, cz, false, false); w.unloadChunk(cx, cz, false, false);
} }
/** /**

View File

@ -54,7 +54,6 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
protected Method lhs_containskey; protected Method lhs_containskey;
/** n.m.s.Chunk */ /** n.m.s.Chunk */
protected Class<?> nmschunk; protected Class<?> nmschunk;
protected Method nmsc_removeentities;
protected Field nmsc_tileentities; protected Field nmsc_tileentities;
protected Field nmsc_inhabitedticks; protected Field nmsc_inhabitedticks;
/** nbt classes */ /** nbt classes */
@ -322,13 +321,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
// } // }
// return false; // return false;
// } // }
/** Remove entities from given chunk */
public void removeEntitiesFromChunk(Chunk c) {
Object omsc = callMethod(c, cc_gethandle, nullargs, null);
if(omsc != null) {
callMethod(omsc, nmsc_removeentities, nullargs, null);
}
}
/** /**
* Get inhabited ticks count from chunk * Get inhabited ticks count from chunk
*/ */

View File

@ -91,12 +91,6 @@ public class BukkitVersionHelperGlowstone extends BukkitVersionHelper {
return b; return b;
} }
@Override
public void removeEntitiesFromChunk(Chunk c) {
// TODO Auto-generated method stub
}
@Override @Override
public long getInhabitedTicks(Chunk c) { public long getInhabitedTicks(Chunk c) {
// TODO Auto-generated method stub // TODO Auto-generated method stub