Examples of EnumBlockMaterial


Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

    @Override
    public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
        TileEntity tile = world.getTileEntity(x, y, z);
        if (tile instanceof TileSlab) {
            EnumBlockMaterial slab = ((TileSlab) tile).getUpmostSlab();
            if (slab != null)
                return new ItemStack(this, 1, slab.ordinal());
        }
        return null;
    }
View Full Code Here

Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

    @Override
    public ArrayList<ItemStack> getDrops(World world, int i, int j, int k, int meta, int fortune) {
        TileEntity tile = world.getTileEntity(i, j, k);
        ArrayList<ItemStack> items = new ArrayList<ItemStack>();
        if (tile instanceof TileSlab) {
            EnumBlockMaterial top = ((TileSlab) tile).getTopSlab();
            EnumBlockMaterial bottom = ((TileSlab) tile).getBottomSlab();
            if (top != null)
                items.add(new ItemStack(this, 1, top.ordinal()));
            if (bottom != null)
                items.add(new ItemStack(this, 1, bottom.ordinal()));
        }
        return items;
    }
View Full Code Here

Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

    @Override
    public float getBlockHardness(World world, int x, int y, int z) {
        TileEntity tile = world.getTileEntity(x, y, z);
        if (tile instanceof TileSlab) {
            EnumBlockMaterial top = ((TileSlab) tile).getTopSlab();
            EnumBlockMaterial bottom = ((TileSlab) tile).getBottomSlab();
            float hardness = 0;
            if (top != null)
                hardness += top.getBlockHardness(world, x, y, z);
            if (bottom != null)
                hardness += bottom.getBlockHardness(world, x, y, z);
            if (top != null && bottom != null)
                hardness = hardness / 2.0F;
            return hardness;
        }
        return super.getBlockHardness(world, x, y, z);
View Full Code Here

Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

    @Override
    public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
        TileEntity tile = world.getTileEntity(x, y, z);
        if (tile instanceof TileSlab) {
            EnumBlockMaterial top = ((TileSlab) tile).getTopSlab();
            EnumBlockMaterial bottom = ((TileSlab) tile).getBottomSlab();
            float resist = 0;
            if (top != null)
                resist += top.getExplosionResistance(entity);
            if (bottom != null)
                resist += bottom.getExplosionResistance(entity);
            if (top != null && bottom != null)
                resist = resist / 2.0F;
            return resist;
        }
        return super.getExplosionResistance(entity, world, x, y, z, explosionX, explosionY, explosionZ);
View Full Code Here

Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

    @Override
    public SoundType getSound(World world, int x, int y, int z) {
        TileEntity tile = world.getTileEntity(x, y, z);
        if (tile instanceof TileSlab) {
            EnumBlockMaterial slab = ((TileSlab) tile).getUpmostSlab();
            if (slab != null)
                return slab.getSound();
        }
        return null;
    }
View Full Code Here

Examples of mods.railcraft.common.blocks.aesthetics.EnumBlockMaterial

        int k1 = z + Facing.offsetsZForSide[Facing.oppositeSide[side]];

        TileEntity tile = world.getTileEntity(i1, j1, k1);
        if (tile instanceof TileSlab) {
            TileSlab slab = (TileSlab) tile;
            EnumBlockMaterial top = slab.getTopSlab();
            EnumBlockMaterial bottom = slab.getBottomSlab();

            if (slab.isDoubleSlab())
                return super.shouldSideBeRendered(world, x, y, z, side);

            if (side != 1 && side != 0 && !super.shouldSideBeRendered(world, x, y, z, side))
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.