From 4b8b77a6d56155e91306bc4d96f39b8b3b051829 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 28 Nov 2010 14:11:15 -0800 Subject: [PATCH] Brought WE up to date with the newest hMod revision. --- src/ServerInterface.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ServerInterface.java b/src/ServerInterface.java index df9703733..d236670f4 100644 --- a/src/ServerInterface.java +++ b/src/ServerInterface.java @@ -221,9 +221,16 @@ public class ServerInterface { * @param mobType */ public static void setMobSpawnerType(Vector pt, String mobType) { - Block block = etc.getServer().getBlockAt( + ComplexBlock cblock = etc.getServer().getComplexBlock( pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()); - block.setSpawnData(mobType); + + if (!(cblock instanceof MobSpawner)) { + return; + } + + MobSpawner mobSpawner = (MobSpawner)cblock; + mobSpawner.setSpawn(mobType); + mobSpawner.update(); } /**