Don't use reflection for 1.12 Spawners.

This commit is contained in:
Brianna 2020-05-08 17:10:03 -04:00
parent 4aad7fa929
commit 8fbc5e51aa
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ public class SpawnerStack {
&& !plugin.getStackingTask().isWorldDisabled(location.getWorld()) ? 1 : calculateSpawnCount();
int maxNearby = amount > 6 ? amount + 3 : 6;
CreatureSpawner creatureSpawner = (CreatureSpawner) location.getBlock().getState();
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) {
creatureSpawner.setMaxNearbyEntities(maxNearby);
creatureSpawner.setSpawnCount(count);
} else {