diff --git a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java index 476fa806..c1a41170 100644 --- a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java +++ b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java @@ -51,6 +51,7 @@ import tconstruct.smeltery.blocks.SpeedBlock; import tconstruct.smeltery.blocks.SpeedSlab; import tconstruct.smeltery.blocks.TConstructFluid; import tconstruct.smeltery.blocks.TankAirBlock; +import tconstruct.smeltery.blocks.PigIronMoltenBlock; import tconstruct.smeltery.itemblocks.CastingChannelItem; import tconstruct.smeltery.itemblocks.GlassBlockItem; import tconstruct.smeltery.itemblocks.GlassPaneItem; @@ -447,7 +448,7 @@ public class TinkerSmeltery TinkerSmeltery.pigIronFluid = new Fluid("pigiron.molten").setDensity(3000).setViscosity(6000).setTemperature(1300); if (!FluidRegistry.registerFluid(TinkerSmeltery.pigIronFluid)) TinkerSmeltery.pigIronFluid = FluidRegistry.getFluid("pigiron.molten"); - TinkerSmeltery.pigIronFluidBlock = new TConstructFluid(pigIronFluid, Material.water, "liquid_pigiron").setBlockName("fluid.molten.pigiron"); + TinkerSmeltery.pigIronFluidBlock = new PigIronMoltenBlock(pigIronFluid, Material.water, "liquid_pigiron").setBlockName("fluid.molten.pigiron"); GameRegistry.registerBlock(TinkerSmeltery.pigIronFluidBlock, "fluid.molten.pigiron"); FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.pigIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 26), new ItemStack( Items.bucket))); diff --git a/src/main/java/tconstruct/smeltery/blocks/PigIronMoltenBlock.java b/src/main/java/tconstruct/smeltery/blocks/PigIronMoltenBlock.java new file mode 100644 index 00000000..b74b5619 --- /dev/null +++ b/src/main/java/tconstruct/smeltery/blocks/PigIronMoltenBlock.java @@ -0,0 +1,33 @@ +package tconstruct.smeltery.blocks; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; + +public class PigIronMoltenBlock extends TConstructFluid +{ + + public PigIronMoltenBlock(Fluid fluid, Material material, String texture) + { + super(fluid, material, texture); + } + + @Override + public void registerBlockIcons (IIconRegister iconRegister) + { + this.stillIcon = iconRegister.registerIcon("tinker:" + texture); + this.flowIcon = iconRegister.registerIcon("tinker:" + texture); + + this.getFluid().setIcons(stillIcon, flowIcon); + } + + @Override + public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity) + { + if (!world.isRemote && entity != null) + entity.setFire(40); + } + +}