Examples of fetchBlock()


Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

            try {
                MinecartInterface minecart;

                if (collectType.equalsIgnoreCase("Storage")) {
                    try {
                        blockBag.fetchBlock(ItemType.STORAGE_MINECART);
                    } catch (BlockBagException e) {
                        // Okay, no storage minecarts... but perhaps we can
                        // craft a minecart + chest!
                        if (blockBag.peekBlock(BlockType.CHEST)) {
                            blockBag.fetchBlock(ItemType.MINECART);
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                        blockBag.fetchBlock(ItemType.STORAGE_MINECART);
                    } catch (BlockBagException e) {
                        // Okay, no storage minecarts... but perhaps we can
                        // craft a minecart + chest!
                        if (blockBag.peekBlock(BlockType.CHEST)) {
                            blockBag.fetchBlock(ItemType.MINECART);
                            blockBag.fetchBlock(BlockType.CHEST);
                        } else {
                            throw new BlockBagException();
                        }
                    }
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                    } catch (BlockBagException e) {
                        // Okay, no storage minecarts... but perhaps we can
                        // craft a minecart + chest!
                        if (blockBag.peekBlock(BlockType.CHEST)) {
                            blockBag.fetchBlock(ItemType.MINECART);
                            blockBag.fetchBlock(BlockType.CHEST);
                        } else {
                            throw new BlockBagException();
                        }
                    }
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                            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);
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                        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();
                        }
                    }
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                    } 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();
                        }
                    }
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

                            depositPt.getX(),
                            depositPt.getY(),
                            depositPt.getZ(),
                            MinecartInterface.Type.POWERED);
                } else {
                    blockBag.fetchBlock(ItemType.MINECART);
                    minecart = world.spawnMinecart(
                            depositPt.getX(),
                            depositPt.getY(),
                            depositPt.getZ(),
                            MinecartInterface.Type.REGULAR);
View Full Code Here

Examples of com.sk89q.craftbook.blockbag.NearbyChestBlockBag.fetchBlock()

            for (int y = pos.getBlockY() + 1; y <= maxY; y++) {
                if (BlockType.canPassThrough(chip.getWorld().getId(x, y, z))) {
                    int n = 0;
                    for (n = 0; n < quantity; n++) {
                        try {
                            source.fetchBlock(item);
                        } catch (BlockBagException e) {
                            break;
                        }
                    }
                    if (n != 0) chip.getWorld().dropItem(x, y, z, item, quantity);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.