mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Initial test of Gradle (not working yet)
This commit is contained in:
1 parent
e8b7378831
commit
cb87c836c8
519 files changed
+351
No files matched your search
@@ -0,0 +1,50 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
public class TConstructFluid extends BlockFluidClassic
|
||||
{
|
||||
String texture;
|
||||
boolean alpha;
|
||||
public Icon stillIcon;
|
||||
public Icon flowIcon;
|
||||
|
||||
public TConstructFluid(int id, Fluid fluid, Material material, String texture)
|
||||
{
|
||||
super(id, fluid, material);
|
||||
this.texture = texture;
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
public TConstructFluid(int id, Fluid fluid, Material material, String texture, boolean alpha)
|
||||
{
|
||||
this(id, fluid, material, texture);
|
||||
this.alpha = alpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
{
|
||||
return alpha ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
{
|
||||
stillIcon = iconRegister.registerIcon("tinker:" + texture);
|
||||
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return stillIcon;
|
||||
return flowIcon;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user