mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Added set on fire effect when an entity touches the Pig Iron fluid
This commit is contained in:
1 parent
32f41d26ba
commit
1e95a1f78f
2 files changed
+35
-1
No files matched your search
@@ -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)));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user