Examples of IBoreHead


Examples of mods.railcraft.api.carts.bore.IBoreHead

        float c2 = (float) (j >> 8 & 0xff) / 255F;
        float c3 = (float) (j & 0xff) / 255F;

        GL11.glColor4f(c1 * light, c2 * light, c3 * light, 1.0F);

        IBoreHead head = bore.getBoreHead();
        if (head != null) {
            bindTexture(head.getBoreTexture());
            modelTunnelBore.setRenderBoreHead(true);
        } else {
            bindTexture(TEXTURE);
            modelTunnelBore.setRenderBoreHead(false);
        }
View Full Code Here

Examples of mods.railcraft.api.carts.bore.IBoreHead

    public static boolean canHeadHarvestBlock(ItemStack head, Block block, int meta) {
        if (head == null)
            return false;

        if (head.getItem() instanceof IBoreHead) {
            IBoreHead boreHead = (IBoreHead) head.getItem();

            boolean mappingExists = false;

            int blockHarvestLevel = HarvestPlugin.getBlockHarvestLevel(block, meta, "pickaxe");
            if (blockHarvestLevel > -1) {
                if (boreHead.getHarvestLevel() >= blockHarvestLevel)
                    return true;
                mappingExists = true;
            }

            blockHarvestLevel = HarvestPlugin.getBlockHarvestLevel(block, meta, "axe");
            if (blockHarvestLevel > -1) {
                if (boreHead.getHarvestLevel() >= blockHarvestLevel)
                    return true;
                mappingExists = true;
            }

            blockHarvestLevel = HarvestPlugin.getBlockHarvestLevel(block, meta, "shovel");
            if (blockHarvestLevel > -1) {
                if (boreHead.getHarvestLevel() >= blockHarvestLevel)
                    return true;
                mappingExists = true;
            }

            if (mappingExists)
View Full Code Here

Examples of mods.railcraft.api.carts.bore.IBoreHead

        hardness *= HARDNESS_MULTIPLER;

        ItemStack boreSlot = getStackInSlot(0);
        if (boreSlot != null && boreSlot.getItem() instanceof IBoreHead) {
            IBoreHead head = (IBoreHead) boreSlot.getItem();
            float dig = 2f - head.getDigModifier();
            hardness *= dig;
        }

        hardness /= RailcraftConfig.boreMiningSpeedMultiplier();

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.