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

Merge pull request #591 from Puremin0rez/master

Fix Reinforced Spawners being a Pig Spawner when placed.
This commit is contained in:
TheBusyBiscuit 2018-02-11 12:18:28 +01:00 committed by GitHub
commit 018e8b955b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 (ChatColor.stripColor(line).startsWith("Type: ")) type = EntityType.valueOf(ChatColor.stripColor(line).replace("Type: ", "").replace(" ", "_").toUpperCase());
} }
if (type != null) { if (type != null) {
((CreatureSpawner) e.getBlock().getState()).setSpawnedType(type); CreatureSpawner spawner = (CreatureSpawner) e.getBlock().getState();
e.getBlock().getState().update(true, false); spawner.setSpawnedType(type);
spawner.update(true, false);
} }
return true; return true;
} }