Package com.sk89q.craftbook.util

Examples of com.sk89q.craftbook.util.ItemInfo


    @Override
    public void load() {

        center = ICUtil.parseBlockLocation(getSign());
        item = new ItemInfo(getLine(3));
    }
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 station mechanic.");
        material = new ItemInfo(config.getString(path + "block", "OBSIDIAN: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 dispenser mechanic.");
        material = new ItemInfo(config.getString(path + "block", "EMERALD_ORE:0"));

        config.setComment(path + "spawn-infront", "Sets whether the minecarts should spawn infront of the mechanic instead of directly above.");
        minecartDispenserLegacy = config.getBoolean(path + "spawn-infront", false);

        config.setComment(path + "check-for-carts", "Sets whether or not the mechanic checks for existing carts before spawning a new one.");
View Full Code Here

                    Integer id = Integer.valueOf(split[0]);
                    if (split.length > 1) {
                        s = Short.valueOf(split[1]);
                    }
                    for (int i = 0; i < multiplier; i++) {
                        out.add(new ItemInfo(id, s));
                    }
                } catch (NumberFormatException e) {
                    /*
                     * int item = server.getConfiguration().getItemId(part);
                     *
 
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 sorter mechanic.");
        material = new ItemInfo(config.getString(path + "block", "NETHERRACK:0"));
    }
View Full Code Here

         * @param check
         */
        public boolean hasAllIngredients(Map<ItemInfo, Integer> check) {

            for (Map.Entry<ItemInfo, Integer> entry : ingredientLookup.entrySet()) {
                ItemInfo id = entry.getKey();
                if (!check.containsKey(id)) return false;
                else if (check.get(id) < entry.getValue()) return false;
            }
            return true;
        }
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 max speed mechanic.");
        material = new ItemInfo(config.getString(path + "block", "COAL_BLOCK:0"));
    }
View Full Code Here

                    EntityUtil.killEntity(ent);
                }
            }
        }

        if (pistonsCrusherBlacklist.contains(new ItemInfo(trigger.getRelative(piston.getFacing())))) {
            return;
        }
        trigger.getRelative(piston.getFacing()).breakNaturally();
        trigger.getRelative(piston.getFacing()).setTypeId(0, false);
    }
View Full Code Here

        } catch (Exception e) {
            mult = 1;
        }

        Vector vel = new Vector(piston.getFacing().getModX(), piston.getFacing().getModY(), piston.getFacing().getModZ()).multiply(mult);
        if (trigger.getRelative(piston.getFacing()).getType() == Material.AIR || trigger.getRelative(piston.getFacing()).getState() != null && InventoryUtil.doesBlockHaveInventory(trigger.getRelative(piston.getFacing())) || trigger.getRelative(piston.getFacing()).getType() == Material.PISTON_MOVING_PIECE || trigger.getRelative(piston.getFacing()).getType() == Material.PISTON_EXTENSION || pistonsBounceBlacklist.contains(new ItemInfo(trigger.getRelative(piston.getFacing())))) {
            for (Entity ent : trigger.getRelative(piston.getFacing()).getChunk().getEntities()) {
                if (EntityUtil.isEntityInBlock(ent, trigger.getRelative(piston.getFacing()))) {
                    ent.setVelocity(ent.getVelocity().add(vel));
                }
            }
View Full Code Here

    public boolean canPistonPushBlock(Block block) {

        if (block.getState() instanceof DoubleChest) return false;

        if(pistonsMovementBlacklist.contains(new ItemInfo(block)))
            return false;

        switch (block.getType()) {

            case PISTON_MOVING_PIECE:
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.