This commit is contained in:
Brianna O'Keefe 2018-11-29 22:26:11 -05:00
parent c827354d9e
commit deeae70585

View File

@ -21,10 +21,10 @@ public class Reflection {
Class<?> clazzMobSpawnerAbstract = Class.forName("net.minecraft.server." + ver + ".MobSpawnerAbstract");
methodGetTileEntity = clazzCraftCreatureSpawner.getDeclaredMethod("getTileEntity");
methodGetSpawner = clazzTileEntityMobSpawner.getDeclaredMethod("getSpawner");
fieldSpawnount = clazzMobSpawnerAbstract.getDeclaredField("spawnRange");
fieldSpawnount.setAccessible(true);
fieldMaxNearbyEntities = clazzMobSpawnerAbstract.getDeclaredField("spawnCount");
fieldSpawnount = clazzMobSpawnerAbstract.getDeclaredField("spawnCount");
fieldSpawnount.setAccessible(true);
fieldMaxNearbyEntities = clazzMobSpawnerAbstract.getDeclaredField("maxNearbyEntities");
fieldMaxNearbyEntities.setAccessible(true);
}
Object objCraftCreatureSpawner = clazzCraftCreatureSpawner.cast(creatureSpawner);