Package com.sk89q.craftbook.util

Examples of com.sk89q.craftbook.util.ItemInfo


    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "block", "The block to use as the casing for the legacy cauldron.");
        cauldronBlock = new ItemInfo(config.getString(path + "block", "STONE"));
    }
View Full Code Here


        @Override
        public void verify(ChangedSign sign) throws ICVerificationException {

            if(sign.getLine(2) == null || sign.getLine(2).isEmpty())
                throw new ICVerificationException("A block must be provided on line 2!");
            ItemInfo item = new ItemInfo(sign.getLine(2));
            if(item.getType() == null)
                throw new ICVerificationException("An invalid block was provided on line 2!");
            if(blockBlacklist.contains(item))
                throw new ICVerificationException("A blacklisted block was provided on line 2!");
        }
View Full Code Here

                } catch(Exception ignored){}
            } catch (Exception ignored) {
                continue;
            }

            items.add(new Tuple2<ItemInfo, Integer>(new ItemInfo(itemID, itemData), amount));
        }

        Inventory cartinventory = ((StorageMinecart) event.getMinecart()).getInventory();
        ArrayList<ItemStack> leftovers = new ArrayList<ItemStack>();
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "block", "Sets the block that is the base of the deposit mechanic.");
        material = new ItemInfo(config.getString(path + "block", "IRON_ORE:0"));
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "block", "Sets the block that is the base of the ejector mechanic.");
        material = new ItemInfo(config.getString(path + "block", "IRON_BLOCK:0"));
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "block", "Sets the block that is the base of the elevator mechanic.");
        material = new ItemInfo(config.getString(path + "block", "NETHER_BRICK:0"));
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "block", "Sets the block that is the base of the messager mechanic.");
        material = new ItemInfo(config.getString(path + "block", "ENDER_STONE:0"));
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "max-boost-block", "Sets the block that is the base of the max boost block.");
        minecartSpeedModMaxBoostBlock = new ItemInfo(config.getString(path + "max-boost-block", "GOLD_BLOCK:0"));

        config.setComment(path + "25x-boost-block", "Sets the block that is the base of the 25x boost block.");
        minecartSpeedMod25xBoostBlock = new ItemInfo(config.getString(path + "25x-boost-block", "GOLD_ORE:0"));

        config.setComment(path + "50x-slow-block", "Sets the block that is the base of the 50x slower block.");
        minecartSpeedMod50xSlowBlock = new ItemInfo(config.getString(path + "50x-slow-block", "SOUL_SAND:0"));

        config.setComment(path + "20x-slow-block", "Sets the block that is the base of the 20x slower block.");
        minecartSpeedMod20xSlowBlock = new ItemInfo(config.getString(path + "20x-slow-block", "GRAVEL:0"));
    }
View Full Code Here

    }

    @Override
    public Block getBlockBase(Block trigger) throws InvalidMechanismException {
        Block proximalBaseCenter = trigger.getRelative(BlockFace.UP);
        if (trigger.getY() < trigger.getWorld().getMaxHeight()-1 && blocks.contains(new ItemInfo(proximalBaseCenter)))
            return proximalBaseCenter; // On Top

        // If we've reached this point nothing was found on the top, check the bottom
        proximalBaseCenter = trigger.getRelative(BlockFace.DOWN);
        if (trigger.getY() > 0 && blocks.contains(new ItemInfo(proximalBaseCenter)))
            return proximalBaseCenter; // it's below

        proximalBaseCenter = trigger.getRelative(SignUtil.getBack(trigger));
        if (blocks.contains(new ItemInfo(proximalBaseCenter)))
            return proximalBaseCenter; // it's behind
        else throw new InvalidMechanismException("mech.bridge.unusable");
    }
View Full Code Here

    ItemInfo item;

    @Override
    public void load() {

        item = new ItemInfo(getLine(2));
    }
View Full Code Here

TOP

Related Classes of com.sk89q.craftbook.util.ItemInfo

Copyright © 2018 www.massapicom. 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.