mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 19:49:12 +00:00
Update the package name
This commit is contained in:
1 parent
e23f41803d
commit
0871831c46
139 files changed
+577
-500
No files matched your search
@@ -0,0 +1,88 @@
|
||||
package com.cricketcraft.minecraft.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockGlass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.minecraft.chisel.Chisel;
|
||||
import com.cricketcraft.minecraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.minecraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.minecraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.minecraft.chisel.init.ModTabs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvableGlass extends BlockGlass implements ICarvable
|
||||
{
|
||||
public CarvableHelper carverHelper;
|
||||
private boolean isAlpha = false;
|
||||
|
||||
public BlockCarvableGlass()
|
||||
{
|
||||
super(Material.glass, false);
|
||||
|
||||
carverHelper = new CarvableHelper();
|
||||
setCreativeTab(ModTabs.tabChiselBlocks);
|
||||
}
|
||||
|
||||
public BlockCarvableGlass setStained(boolean a)
|
||||
{
|
||||
this.isAlpha = a;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return Chisel.RenderCTMId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return carverHelper.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int i)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CarvableVariation getVariation(int metadata)
|
||||
{
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderBlockPass()
|
||||
{
|
||||
return isAlpha ? 1 : 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user