Search in sources :

Example 1 with ModObject

use of crazypants.enderio.base.init.ModObject in project EnderIO by SleepyTrousers.

the class BlockPaintedSlabManager method create_double.

private static Block create_double(@Nonnull IModObject modObject, @Nonnull Material material, @Nonnull SoundType sound) {
    if (modObject instanceof ModObject) {
        final ModObject halfSlabObject = ModObject.values()[((ModObject) modObject).ordinal() - 1];
        BlockPaintedSlab.BlockPaintedHalfSlab halfSlabBlock = (BlockPaintedSlab.BlockPaintedHalfSlab) halfSlabObject.getBlockNN();
        BlockPaintedSlab.BlockPaintedDoubleSlab doubleSlab = new BlockPaintedSlab.BlockPaintedDoubleSlab(modObject, material, halfSlabBlock, sound);
        doubleSlab.setHardness(2.0F).setResistance(5.0F);
        doubleSlab.init(modObject);
        return doubleSlab;
    } else {
        throw new RuntimeException("Bad block initialization, " + modObject + " is not a ModObject!");
    }
}
Also used : ModObject(crazypants.enderio.base.init.ModObject) IModObject(crazypants.enderio.base.init.IModObject)

Aggregations

IModObject (crazypants.enderio.base.init.IModObject)1 ModObject (crazypants.enderio.base.init.ModObject)1