Search in sources :

Example 1 with BlockTrainFluid

use of ebf.tim.blocks.BlockTrainFluid in project Trains-In-Motion-1.7.10 by EternalBlueFlame.

the class CommonProxy method register.

/**
     * <h2>Server Register</h2>
     * Used for registering server only functions.
     * Also serves as a placeholder for the client function, which is actually used, so we don't get a missing function error.
     */
public void register() {
    //register fluids
    FluidRegistry.registerFluid(fluidOil);
    FluidRegistry.registerFluid(fluidDiesel);
    //register fluid blocks
    blockFluidOil = new BlockTrainFluid(fluidOil, new MaterialLiquid(MapColor.blackColor));
    blockFluidOil.setBlockName("block.oil");
    GameRegistry.registerBlock(blockFluidOil, "block.oil");
    blockFluidDiesel = new BlockTrainFluid(fluidDiesel, new MaterialLiquid(MapColor.dirtColor)).setFlammable(true, 1);
    blockFluidDiesel.setBlockName("block.diesel");
    GameRegistry.registerBlock(blockFluidDiesel, "block.diesel");
    //register the buckets
    bucketOil = new ItemBucket(blockFluidOil);
    bucketOil.setCreativeTab(TrainsInMotion.creativeTab).setUnlocalizedName("item.oilbucket").setContainerItem(Items.bucket);
    GameRegistry.registerItem(bucketOil, "fluid.oil.bucket");
    FluidContainerRegistry.registerFluidContainer(fluidOil, new ItemStack(bucketOil), new ItemStack(Items.bucket));
    bucketDiesel = new ItemBucket(blockFluidDiesel);
    bucketDiesel.setCreativeTab(TrainsInMotion.creativeTab).setUnlocalizedName("item.dieselbucket").setContainerItem(Items.bucket);
    GameRegistry.registerItem(bucketDiesel, "fluid.diesel.bucket");
    FluidContainerRegistry.registerFluidContainer(fluidDiesel, new ItemStack(bucketDiesel), new ItemStack(Items.bucket));
    //register the train crafting table
    GameRegistry.registerBlock(trainTable, "TrainTable");
    GameRegistry.registerTileEntity(TileEntityStorage.class, "StorageEntity");
    addRecipe(new ItemStack(trainTable, 1), "WWW", "WIW", "WWW", 'W', Blocks.planks, 'I', Items.iron_ingot);
    railBlock.setCreativeTab(TrainsInMotion.creativeTab);
    GameRegistry.registerBlock(railBlock, "TiMRail");
    addRecipe(new ItemStack(railBlock, 1), "I I", "IWI", "IWI", 'W', Blocks.planks, 'I', Items.iron_ingot);
}
Also used : MaterialLiquid(net.minecraft.block.material.MaterialLiquid) ItemStack(net.minecraft.item.ItemStack) ItemBucket(net.minecraft.item.ItemBucket) BlockTrainFluid(ebf.tim.blocks.BlockTrainFluid)

Aggregations

BlockTrainFluid (ebf.tim.blocks.BlockTrainFluid)1 MaterialLiquid (net.minecraft.block.material.MaterialLiquid)1 ItemBucket (net.minecraft.item.ItemBucket)1 ItemStack (net.minecraft.item.ItemStack)1