+ dropper

This commit is contained in:
boy0001 2015-02-08 18:34:33 +11:00
parent 4e5a5284d7
commit 202ad43214

View File

@ -229,6 +229,15 @@ public class ChunkManager {
}
else { PlotMain.sendConsoleSenderMessage("&c[WARN] Plot clear failed to regenerate dispenser: "+loc.x+","+loc.y+","+loc.z); }
}
for (BlockLoc loc: dropperContents.keySet()) {
Block block = world.getBlockAt(loc.x, loc.y, loc.z);
BlockState state = block.getState();
if (state instanceof Dropper) {
((Dropper) (state)).getInventory().setContents(dropperContents.get(loc));
state.update(true);
}
else { PlotMain.sendConsoleSenderMessage("&c[WARN] Plot clear failed to regenerate dispenser: "+loc.x+","+loc.y+","+loc.z); }
}
for (BlockLoc loc: beaconContents.keySet()) {
Block block = world.getBlockAt(loc.x, loc.y, loc.z);
BlockState state = block.getState();
@ -397,6 +406,12 @@ public class ChunkManager {
ItemStack[] invDis = dispenser.getInventory().getContents().clone();
dispenserContents.put(bl, invDis);
break;
case 158:
bl = new BlockLoc(x, y, z);
Dropper dropper = (Dropper) block.getState();
ItemStack[] invDro = dropper.getInventory().getContents().clone();
dropperContents.put(bl, invDro);
break;
case 117:
bl = new BlockLoc(x, y, z);
BrewingStand brewingStand = (BrewingStand) block.getState();