diff options
author | Muramasa <haydenkilloh@gmail.com> | 2016-07-16 23:48:25 +0100 |
---|---|---|
committer | Muramasa <haydenkilloh@gmail.com> | 2016-07-16 23:48:25 +0100 |
commit | 51e269e3f59d6daefb03d121367900d28d38f504 (patch) | |
tree | 75264e1e071338b992e7f26aba1868169867caba /src/main/java/gregtech/common/blocks/GT_Block_Stones.java | |
parent | be3a6292bb02d5aef5d8fd8052b53394743b0b00 (diff) | |
download | GT5-Unofficial-51e269e3f59d6daefb03d121367900d28d38f504.tar.gz GT5-Unofficial-51e269e3f59d6daefb03d121367900d28d38f504.tar.bz2 GT5-Unofficial-51e269e3f59d6daefb03d121367900d28d38f504.zip |
Initial
This is more of a test and resource for when I eventually rewrite the
GT5U ore texture/metadata system.
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Stones.java')
-rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Stones.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java new file mode 100644 index 0000000000..973f04308e --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -0,0 +1,42 @@ +package gregtech.common.blocks; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.entity.Entity; +import net.minecraft.entity.boss.EntityWither; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class GT_Block_Stones extends GT_Block_Stones_Abstract { + public GT_Block_Stones() { + super(GT_Item_Granites.class, "gt.blockstones"); + setResistance(60.0F); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Marble"); + GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Stone, new ItemStack(this, 1, 0)); + } + + public int getHarvestLevel(int aMeta) { + return 3; + } + + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F; + } + + public IIcon getIcon(int aSide, int aMeta) { + //if ((aMeta >= 0) && (aMeta < 16)) { + if (aMeta == 0) { + return gregtech.api.enums.Textures.BlockIcons.STONES[aMeta].getIcon(); + } + return gregtech.api.enums.Textures.BlockIcons.STONES[0].getIcon(); + } + + public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { + return !(entity instanceof EntityWither); + } +} |