// craft a minecart + chest!
if (blockBag.peekBlock(BlockType.CHEST)) {
blockBag.fetchBlock(ItemType.MINECART);
blockBag.fetchBlock(BlockType.CHEST);
} else {
throw new BlockBagException();
}
}
minecart = world.spawnMinecart(
depositPt.getX(),
depositPt.getY(),
depositPt.getZ(),
MinecartInterface.Type.STORAGE);
} else if (collectType.equalsIgnoreCase("Powered")) {
try {
blockBag.fetchBlock(ItemType.POWERED_MINECART);
} catch (BlockBagException e) {
// Okay, no storage minecarts... but perhaps we can
// craft a minecart + chest!
if (blockBag.peekBlock(BlockType.FURNACE)) {
blockBag.fetchBlock(ItemType.MINECART);
blockBag.fetchBlock(BlockType.FURNACE);
} else {
throw new BlockBagException();
}
}
minecart = world.spawnMinecart(
depositPt.getX(),