Working on changing to a more organized texturing system for blocks
|
|
@ -16,7 +16,7 @@ public class BlockHandler {
|
|||
|
||||
public static void init() {
|
||||
ReinforcedGlass = new BlockReinforcedGlass(ConfigurationManager.ReinforcedGlassID, true).setHardness(4.5F).setResistance(2000.0F).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("Reinforced Glass");
|
||||
BlockOres = new BlockOres(ConfigurationManager.BlockOresID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticOreBlocks");
|
||||
BlockOres = new BlockOres(ConfigurationManager.BlockOresID).setStepSound(Block.soundStoneFootstep);
|
||||
|
||||
registerBlocks();
|
||||
setBlockHarvestLevels();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class BlockOres extends Block {
|
|||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "MysticOre_" + i);
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + ItemBlockOres.ORE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemBlockOres extends ItemBlock {
|
||||
|
||||
public static String[] ORE_NAMES = new String[] {"Adamantine Ore", "Amethyst Ore", "Iridium Ore", "Mithril Ore", "Tourmaline Ore", "Topaz Ore", "Verdite Ore", "Bloodstone", "Black Soulstone",
|
||||
"Blue Soulstone", "Red Soulstone", "Agate Ore"};
|
||||
|
||||
public ItemBlockOres(int par1) {
|
||||
super(par1);
|
||||
|
|
@ -19,23 +23,11 @@ public class ItemBlockOres extends ItemBlock {
|
|||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack i){
|
||||
switch(i.getItemDamage()){
|
||||
case 0:return "Adamantine";
|
||||
case 1:return "Amethyst";
|
||||
case 2:return "Iridium";
|
||||
case 3:return "Mithril";
|
||||
case 4:return "Sapphire";
|
||||
case 5:return "Topaz";
|
||||
case 6:return "Verdite";
|
||||
case 7:return "Bloodstone";
|
||||
case 8:return "BlackSoulstone";
|
||||
case 9:return "BlueSoulstone";
|
||||
case 10:return "RedSoulstone";
|
||||
case 11:return "Agate";
|
||||
default:return "";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ORE_NAMES.length);
|
||||
return super.getUnlocalizedName() + ORE_NAMES[meta];
|
||||
}
|
||||
|
||||
public int getMetadata(int par1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class BlockPlanks extends Block {
|
|||
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "Planks_" + i);
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + ItemBlockPlanks.PLANK_TYPE[i] + " Planks");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class BlockReinforced extends Block {
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + "ReinforcedBricks_" + i);
|
||||
textures[i] = iconRegister.registerIcon("MysticTextures" + ":" + ItemBlockReinforced.BRICK_TYPE[i] + " Bricks");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemBlockPlanks extends ItemBlock {
|
||||
|
||||
public static String[] PLANK_TYPE = new String[] {"Purple", "Green", "Black", "Orange", "Red", "Blue", "Yellow"};
|
||||
|
||||
public ItemBlockPlanks(int par1) {
|
||||
super(par1);
|
||||
|
|
@ -17,18 +20,11 @@ public class ItemBlockPlanks extends ItemBlock {
|
|||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack i){
|
||||
switch(i.getItemDamage()){
|
||||
case 0:return "BlackPlank";
|
||||
case 1:return "RedPlank";
|
||||
case 2:return "GreenPlank";
|
||||
case 3:return "PurplePlank";
|
||||
case 4:return "BluePlank";
|
||||
case 5:return "LimePlank";
|
||||
case 6:return "YellowPlank";
|
||||
default:return "";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, PLANK_TYPE.length);
|
||||
return super.getUnlocalizedName() + PLANK_TYPE[meta];
|
||||
}
|
||||
|
||||
public int getMetadata(int par1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,8 +9,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemBlockReinforced extends ItemBlock {
|
||||
|
||||
public static String[] BRICK_TYPE = new String[] {"Mithril", "Verdite", "Iridium", "Adamantine", "Tourmaline", "Topaz", "Amethyst", "Agate"};
|
||||
|
||||
public ItemBlockReinforced(int par1) {
|
||||
super(par1);
|
||||
|
|
@ -18,20 +21,13 @@ public class ItemBlockReinforced extends ItemBlock {
|
|||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack i){
|
||||
switch(i.getItemDamage()){
|
||||
case 0:return "MithrilBricks";
|
||||
case 1:return "VerditeBricks";
|
||||
case 2:return "IridiumBricks";
|
||||
case 3:return "AdamantineBricks";
|
||||
case 4:return "TourmalineBricks";
|
||||
case 5:return "TopazBricks";
|
||||
case 6:return "AmethystBricks";
|
||||
case 7:return "AgateBricks";
|
||||
default:return "";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BRICK_TYPE.length);
|
||||
return super.getUnlocalizedName() + BRICK_TYPE[meta];
|
||||
}
|
||||
|
||||
public int getMetadata(int par1)
|
||||
{
|
||||
return par1;
|
||||
|
|
@ -40,7 +36,7 @@ public class ItemBlockReinforced extends ItemBlock {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
if(par2EntityPlayer.isSneaking() == false)
|
||||
if(par2EntityPlayer.isSneaking() == true)
|
||||
{
|
||||
par3List.add("Works As A Beacon Block Too!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ public class MysticStones
|
|||
public void load(FMLInitializationEvent event)
|
||||
{
|
||||
|
||||
Planks = new BlockPlanks(Config.PlanksID).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("ColoredPlanks");
|
||||
Stones = new BlockStones(Config.StonesID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticStones");
|
||||
StoneBricks = new BlockStoneBricks(Config.StoneBricksID).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("MysticStoneBricks");
|
||||
ReinforcedBricks = new BlockReinforced(Config.ReinforcedBricksID).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("ReinforcedBricks");
|
||||
Planks = new BlockPlanks(Config.PlanksID).setStepSound(Block.soundWoodFootstep);
|
||||
Stones = new BlockStones(Config.StonesID).setStepSound(Block.soundStoneFootstep);
|
||||
StoneBricks = new BlockStoneBricks(Config.StoneBricksID).setStepSound(Block.soundStoneFootstep);
|
||||
ReinforcedBricks = new BlockReinforced(Config.ReinforcedBricksID).setStepSound(Block.soundMetalFootstep);
|
||||
|
||||
GameRegistry.registerBlock(Planks, ItemBlockPlanks.class, "Planks");
|
||||
GameRegistry.registerBlock(Stones, ItemBlockStones.class, "Stones");
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 266 B |
|
Before Width: | Height: | Size: 571 B |
|
Before Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 649 B |
|
Before Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 876 B |
|
Before Width: | Height: | Size: 918 B |
|
Before Width: | Height: | Size: 958 B |
|
Before Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 388 B |
|
Before Width: | Height: | Size: 346 B |