1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fix Reinforced Spawners being a Pig Spawner when placed.

This commit is contained in:
Dylan Xaldin 2018-02-07 19:06:06 -06:00
parent 7fefb0ea15
commit 16899eb96a

View File

@ -2749,8 +2749,9 @@ public class SlimefunSetup {
if (ChatColor.stripColor(line).startsWith("Type: ")) type = EntityType.valueOf(ChatColor.stripColor(line).replace("Type: ", "").replace(" ", "_").toUpperCase());
}
if (type != null) {
((CreatureSpawner) e.getBlock().getState()).setSpawnedType(type);
e.getBlock().getState().update(true, false);
CreatureSpawner spawner = (CreatureSpawner) e.getBlock().getState();
spawner.setSpawnedType(type);
spawner.update(true, false);
}
return true;
}