mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 10:45:02 +00:00
Repackage to team.chisel (excepting API)
This commit is contained in:
1 parent
7555e21144
commit
9574e05c29
132 files changed
+526
-596
No files matched your search
@@ -0,0 +1,83 @@
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
public BlockCarvablePackedIce() {
|
||||
super(Material.ice);
|
||||
carverHelper = new CarvableHelper(this);
|
||||
this.slipperiness = Blocks.packed_ice.slipperiness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return carverHelper.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) {
|
||||
super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
|
||||
|
||||
par2EntityPlayer.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
|
||||
par2EntityPlayer.addExhaustion(0.025F);
|
||||
|
||||
/*
|
||||
* if(this.canSilkHarvest(par1World, par2EntityPlayer, par3, par4, par5, par6) && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer)) { ItemStack itemstack =
|
||||
* this.createStackedBlock(par6);
|
||||
*
|
||||
* if(itemstack != null) { this.dropBlockAsItem(par1World, par3, par4, par5, itemstack); } }
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user