mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Reorganize folders for modules
This commit is contained in:
1 parent
2c14f315de
commit
e2f0558b6f
370 files changed
+4274
-4788
No files matched your search
@@ -0,0 +1,66 @@
|
||||
package tconstruct.smeltery.blocks;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidFinite;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class LiquidMetalFinite extends BlockFluidFinite
|
||||
{
|
||||
String texture;
|
||||
public IIcon stillIcon;
|
||||
public IIcon flowIcon;
|
||||
|
||||
public LiquidMetalFinite(Fluid fluid, String texture)
|
||||
{
|
||||
super(fluid, TinkerSmeltery.liquidMetal);
|
||||
this.texture = texture;
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons (IIconRegister iconRegister)
|
||||
{
|
||||
stillIcon = iconRegister.registerIcon("tinker:" + texture);
|
||||
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return stillIcon;
|
||||
return flowIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World par1World, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
entity.motionX *= 0.4D;
|
||||
entity.motionZ *= 0.4D;
|
||||
}
|
||||
if (!(entity instanceof EntityItem) && !entity.isImmuneToFire())
|
||||
{
|
||||
entity.attackEntityFrom(DamageSource.lava, 4.0F);
|
||||
entity.setFire(15);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user