Just some more Alchemical Chest stuff :)
This commit is contained in:
parent
7c20a2db99
commit
146dc0a1de
|
@ -5,6 +5,9 @@ import com.pahimar.ee3.lib.GuiIds;
|
|||
import com.pahimar.ee3.lib.RenderIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChest;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChestLarge;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChestMedium;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChestSmall;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
|
@ -45,7 +48,20 @@ public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
|||
@Override
|
||||
public TileEntity createTileEntity(World world, int metaData)
|
||||
{
|
||||
return new TileAlchemicalChest(metaData);
|
||||
if (metaData == 0)
|
||||
{
|
||||
return new TileAlchemicalChestSmall();
|
||||
}
|
||||
else if (metaData == 1)
|
||||
{
|
||||
return new TileAlchemicalChestMedium();
|
||||
}
|
||||
else if (metaData == 2)
|
||||
{
|
||||
return new TileAlchemicalChestLarge();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -57,6 +73,12 @@ public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
|
|
|
@ -36,6 +36,12 @@ public class BlockAlchemicalFuel extends BlockEE
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
|
|
|
@ -30,6 +30,12 @@ public class BlockInfusedCloth extends BlockEE
|
|||
blockIcon = iconRegister.registerIcon("wool_colored_white");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z)
|
||||
{
|
||||
|
|
|
@ -53,6 +53,12 @@ public class BlockInfusedPlanks extends BlockEE
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor(int metaData)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,12 @@ public class BlockInfusedWood extends BlockEE
|
|||
logSide = iconRegister.registerIcon("log_oak");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int side, int metaData)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerAlchemicalChest;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.lib.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChest;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -51,7 +50,8 @@ public class GuiAlchemicalChest extends GuiContainer
|
|||
if (tileAlchemicalChest.getState() == 0 || tileAlchemicalChest.getState() == 1)
|
||||
{
|
||||
fontRenderer.drawString(tileAlchemicalChest.isInvNameLocalized() ? tileAlchemicalChest.getInvName() : StatCollector.translateToLocal(tileAlchemicalChest.getInvName()), 8, 6, 4210752);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal(Strings.CONTAINER_INVENTORY), 35, ySize - 95 + 2, 4210752);
|
||||
// fontRenderer.drawString(StatCollector.translateToLocal(Strings.CONTAINER_INVENTORY), 35, ySize - 95 + 2, 4210752);
|
||||
fontRenderer.drawString(tileAlchemicalChest.getOrientation().toString(), 35, ySize - 95 + 2, 4210752);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,11 +49,6 @@ public class TileEntityAlchemicalChestRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_LARGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST);
|
||||
}
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
|
|
@ -24,14 +24,17 @@ public class ContainerAlchemicalChest extends Container
|
|||
// Small Chest
|
||||
public static final int SMALL_CHEST_INVENTORY_ROWS = 4;
|
||||
public static final int SMALL_CHEST_INVENTORY_COLUMNS = 12;
|
||||
public static final int SMALL_INVENTORY_SIZE = SMALL_CHEST_INVENTORY_ROWS * SMALL_CHEST_INVENTORY_COLUMNS;
|
||||
|
||||
// Medium Chest
|
||||
public static final int MEDIUM_CHEST_INVENTORY_ROWS = 7;
|
||||
public static final int MEDIUM_CHEST_INVENTORY_COLUMNS = 12;
|
||||
public static final int MEDIUM_INVENTORY_SIZE = MEDIUM_CHEST_INVENTORY_ROWS * MEDIUM_CHEST_INVENTORY_COLUMNS;
|
||||
|
||||
// Large Chest
|
||||
public static final int LARGE_CHEST_INVENTORY_ROWS = 9;
|
||||
public static final int LARGE_CHEST_INVENTORY_COLUMNS = 13;
|
||||
public static final int LARGE_INVENTORY_SIZE = LARGE_CHEST_INVENTORY_ROWS * LARGE_CHEST_INVENTORY_COLUMNS;
|
||||
|
||||
// Player Inventory
|
||||
private final int PLAYER_INVENTORY_ROWS = 3;
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBlockAlchemicalChest extends ItemBlock
|
||||
{
|
||||
|
@ -15,4 +21,24 @@ public class ItemBlockAlchemicalChest extends ItemBlock
|
|||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean flag)
|
||||
{
|
||||
// TODO Localize and add more descriptive text
|
||||
int metaData = itemStack.getItemDamage();
|
||||
|
||||
if (metaData == 0)
|
||||
{
|
||||
list.add("Small");
|
||||
}
|
||||
else if (metaData == 1)
|
||||
{
|
||||
list.add("Medium");
|
||||
}
|
||||
else if (metaData == 2)
|
||||
{
|
||||
list.add("Large");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,17 @@ public class RecipesEquivalentExchange
|
|||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.glassBell), new Object[]{"iii", "i i", "i i", 'i', Block.glass});
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.aludelBase), new Object[]{"iii", "sis", "iii", 'i', Item.ingotIron, 's', Block.stone});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.infusedPlanks, 4, 0), new ItemStack(ModBlocks.infusedWood, 1, 0));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.infusedPlanks, 4, 1), new ItemStack(ModBlocks.infusedWood, 1, 1));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.infusedPlanks, 4, 2), new ItemStack(ModBlocks.infusedWood, 1, 2));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.alchemicalChest.blockID, 1, 0), new Object[]{"ppp", "p p", "ppp", 'p', new ItemStack(ModBlocks.infusedPlanks, 1, 0)});
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.alchemicalChest.blockID, 1, 1), new Object[]{"ppp", "p p", "ppp", 'p', new ItemStack(ModBlocks.infusedPlanks, 1, 1)});
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.alchemicalChest.blockID, 1, 2), new Object[]{"ppp", "p p", "ppp", 'p', new ItemStack(ModBlocks.infusedPlanks, 1, 2)});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.calcinator), new Object[]{"iii", "sis", "s s", 'i', Item.ingotIron, 's', "stone"});
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.researchStation), new Object[]{"ipi", " s ", "sss", 'p', "plankWood", 'i', Item.ingotIron, 's', "stone"});
|
||||
}
|
||||
|
||||
private static void initItemRecipes()
|
||||
|
@ -37,8 +48,7 @@ public class RecipesEquivalentExchange
|
|||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.inertStone), new Object[]{"sis", "igi", "sis", 's', Block.stone, 'i', Item.ingotIron, 'g', Item.ingotGold});
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.miniumStone), new Object[]{"sss", "sis", "sss", 's', ModItems.miniumShard, 'i', ModItems.inertStone});
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.diviningRod), new Object[]{" s ", " s ", "s s", 's', "stickWood"});
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.calcinator), new Object[]{"iii", "sis", "s s", 'i', Item.ingotIron, 's', "stone"});
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.researchStation), new Object[]{"ipi", " s ", "sss", 'p', "plankWood", 'i', Item.ingotIron, 's', "stone"});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,12 +38,9 @@ public class Textures
|
|||
// Model textures
|
||||
public static final ResourceLocation MODEL_CALCINATOR = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "calcinator.png");
|
||||
public static final ResourceLocation MODEL_ALUDEL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation MODEL_ALCHEMICAL_CHEST = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest.png");
|
||||
|
||||
public static final ResourceLocation MODEL_ALCHEMICAL_CHEST_SMALL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_Small.png");
|
||||
public static final ResourceLocation MODEL_ALCHEMICAL_CHEST_MEDIUM = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_Medium.png");
|
||||
public static final ResourceLocation MODEL_ALCHEMICAL_CHEST_LARGE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_Large.png");
|
||||
|
||||
public static final ResourceLocation MODEL_GLASS_BELL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation MODEL_RESEARCH_STATION = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "researchStation.png");
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package com.pahimar.ee3.proxy;
|
||||
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileAlchemicalChest;
|
||||
import com.pahimar.ee3.tileentity.TileAludel;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
import com.pahimar.ee3.tileentity.TileGlassBell;
|
||||
import com.pahimar.ee3.tileentity.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public abstract class CommonProxy implements IProxy
|
||||
|
@ -14,6 +11,9 @@ public abstract class CommonProxy implements IProxy
|
|||
GameRegistry.registerTileEntity(TileCalcinator.class, "tile." + Strings.CALCINATOR_NAME);
|
||||
GameRegistry.registerTileEntity(TileAludel.class, "tile." + Strings.ALUDEL_NAME);
|
||||
GameRegistry.registerTileEntity(TileAlchemicalChest.class, "tile." + Strings.ALCHEMICAL_CHEST_NAME);
|
||||
GameRegistry.registerTileEntity(TileAlchemicalChestSmall.class, "tile." + Strings.ALCHEMICAL_CHEST_NAME + "Small");
|
||||
GameRegistry.registerTileEntity(TileAlchemicalChestMedium.class, "tile." + Strings.ALCHEMICAL_CHEST_NAME + "Medium");
|
||||
GameRegistry.registerTileEntity(TileAlchemicalChestLarge.class, "tile." + Strings.ALCHEMICAL_CHEST_NAME + "Large");
|
||||
GameRegistry.registerTileEntity(TileGlassBell.class, "tile." + Strings.GLASS_BELL_NAME);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ public class AludelRecipes
|
|||
{
|
||||
private static AludelRecipes aludelRegistry = null;
|
||||
|
||||
// TODO Handle that the input stack could be an OreStack
|
||||
private SortedMap<ItemStack, ItemStack[]> aludelRecipes;
|
||||
|
||||
private AludelRecipes()
|
||||
|
|
|
@ -39,10 +39,6 @@ public class TileAlchemicalChest extends TileEE implements IInventory
|
|||
*/
|
||||
private int ticksSinceSync;
|
||||
|
||||
public static final int SMALL_INVENTORY_SIZE = ContainerAlchemicalChest.SMALL_CHEST_INVENTORY_ROWS * ContainerAlchemicalChest.SMALL_CHEST_INVENTORY_COLUMNS;
|
||||
public static final int MEDIUM_INVENTORY_SIZE = ContainerAlchemicalChest.MEDIUM_CHEST_INVENTORY_ROWS * ContainerAlchemicalChest.MEDIUM_CHEST_INVENTORY_COLUMNS;
|
||||
public static final int LARGE_INVENTORY_SIZE = ContainerAlchemicalChest.LARGE_CHEST_INVENTORY_ROWS * ContainerAlchemicalChest.LARGE_CHEST_INVENTORY_COLUMNS;
|
||||
|
||||
/**
|
||||
* The ItemStacks that hold the items currently being used in the Alchemical Chest
|
||||
*/
|
||||
|
@ -55,15 +51,15 @@ public class TileAlchemicalChest extends TileEE implements IInventory
|
|||
|
||||
if (metaData == 0)
|
||||
{
|
||||
inventory = new ItemStack[SMALL_INVENTORY_SIZE];
|
||||
inventory = new ItemStack[ContainerAlchemicalChest.SMALL_INVENTORY_SIZE];
|
||||
}
|
||||
else if (metaData == 1)
|
||||
{
|
||||
inventory = new ItemStack[MEDIUM_INVENTORY_SIZE];
|
||||
inventory = new ItemStack[ContainerAlchemicalChest.MEDIUM_INVENTORY_SIZE];
|
||||
}
|
||||
else if (metaData == 2)
|
||||
{
|
||||
inventory = new ItemStack[LARGE_INVENTORY_SIZE];
|
||||
inventory = new ItemStack[ContainerAlchemicalChest.LARGE_INVENTORY_SIZE];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
public class TileAlchemicalChestLarge extends TileAlchemicalChest
|
||||
{
|
||||
public TileAlchemicalChestLarge()
|
||||
{
|
||||
super(2);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
public class TileAlchemicalChestMedium extends TileAlchemicalChest
|
||||
{
|
||||
public TileAlchemicalChestMedium()
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
public class TileAlchemicalChestSmall extends TileAlchemicalChest
|
||||
{
|
||||
public TileAlchemicalChestSmall()
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in a new issue