use of net.minecraft.block.material.MaterialLiquid 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);
}
Aggregations