diff --git a/src/main/java/mcp/mobius/betterbarrels/common/items/dolly/ItemBarrelMover.java b/src/main/java/mcp/mobius/betterbarrels/common/items/dolly/ItemBarrelMover.java index b2cfb5e..5eca2c8 100644 --- a/src/main/java/mcp/mobius/betterbarrels/common/items/dolly/ItemBarrelMover.java +++ b/src/main/java/mcp/mobius/betterbarrels/common/items/dolly/ItemBarrelMover.java @@ -523,7 +523,7 @@ private void fixIC2Orientation(TileEntity entity, EntityPlayer player, int targY } private boolean isTEMovable(TileEntity te) { - if (te instanceof TileEntityMobSpawner) return this.canPickSpawners(); + if (tileIsASpawner(te)) return this.canPickSpawners(); if (te instanceof TileEntityBarrel) return true; if (te instanceof TileEntityChest) return true; if (isTileBlacklisted(te.getClass())) { @@ -535,6 +535,21 @@ private boolean isTEMovable(TileEntity te) { return false; } + private static boolean tileIsASpawner(TileEntity te) { + if (te instanceof TileEntityMobSpawner) { + return true; + } + + try { + Class heeClass = Class.forName("chylex.hee.tileentity.TileEntityCustomSpawner"); + if (heeClass.isInstance(te)) { + return true; + } + } catch (ClassNotFoundException ignored) {} + + return false; + } + private boolean isTileBlacklisted(Class clazz) { for (Class tileClass : BetterBarrels.BlacklistedTileEntityClasses) { if (clazz == tileClass) { @@ -621,7 +636,7 @@ protected boolean pickupContainer(ItemStack stack, EntityPlayer player, World wo nbtTarget.setString("Block", GameData.getBlockRegistry().getNameForObject(storedBlock)); nbtTarget.setInteger("Meta", blockMeta); nbtTarget.setString("TEClass", containerTE.getClass().getName()); - nbtTarget.setBoolean("isSpawner", containerTE instanceof TileEntityMobSpawner); + nbtTarget.setBoolean("isSpawner", tileIsASpawner(containerTE)); nbtTarget.setTag("NBT", nbtContainer); // TODO: Check this, seems the nbt classes were streamlined somewhat if (tagCompoundWrite != null) {