Committing (you guessed it) a whack of stuff
This commit is contained in:
parent
5464f1a119
commit
2093c485a0
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
#Sat Dec 28 00:14:08 EST 2013
|
||||
minecraft_version = 1.7.10
|
||||
forge_version = 10.13.0.1183
|
||||
forge_version = 10.13.0.1186
|
||||
mod_version = 0.2
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.reference.GuiId;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.RenderIds;
|
||||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAugmentationTable extends BlockEE implements ITileEntityProvider
|
||||
{
|
||||
public BlockAugmentationTable()
|
||||
{
|
||||
super(Material.rock);
|
||||
this.setHardness(2.0f);
|
||||
this.setBlockName(Names.Blocks.AUGMENTATION_TABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int metaData)
|
||||
{
|
||||
return new TileEntityAugmentationTable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return RenderIds.augmentationTable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (world.getTileEntity(x, y, z) instanceof TileEntityAugmentationTable)
|
||||
{
|
||||
player.openGui(EquivalentExchange3.instance, GuiId.AUGMENTATION_TABLE.ordinal(), world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -60,15 +60,15 @@ public class GuiAlchemicalBag extends GuiContainer
|
|||
|
||||
if (this.parentItemStack.getItemDamage() == 0)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_BAG_SMALL);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_BAG_SMALL);
|
||||
}
|
||||
else if (this.parentItemStack.getItemDamage() == 1)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_BAG_MEDIUM);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_BAG_MEDIUM);
|
||||
}
|
||||
else if (this.parentItemStack.getItemDamage() == 2)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_BAG_LARGE);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_BAG_LARGE);
|
||||
}
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
|
|
|
@ -52,15 +52,15 @@ public class GuiAlchemicalChest extends GuiContainer
|
|||
|
||||
if (tileEntityAlchemicalChest.getState() == 0)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_CHEST_SMALL);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_CHEST_SMALL);
|
||||
}
|
||||
else if (tileEntityAlchemicalChest.getState() == 1)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_CHEST_MEDIUM);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_CHEST_MEDIUM);
|
||||
}
|
||||
else if (tileEntityAlchemicalChest.getState() == 2)
|
||||
{
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALCHEMICAL_CHEST_LARGE);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALCHEMICAL_CHEST_LARGE);
|
||||
}
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GuiAludel extends GuiContainer
|
|||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_ALUDEL);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.ALUDEL);
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
int yStart = (height - ySize) / 2;
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerAugmentationTable;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiAugmentationTable extends GuiContainer
|
||||
{
|
||||
private TileEntityAugmentationTable tileEntityAugmentationTable;
|
||||
|
||||
public GuiAugmentationTable(InventoryPlayer inventoryPlayer, TileEntityAugmentationTable tileEntityAugmentationTable)
|
||||
{
|
||||
super(new ContainerAugmentationTable(inventoryPlayer, tileEntityAugmentationTable));
|
||||
this.tileEntityAugmentationTable = tileEntityAugmentationTable;
|
||||
xSize = 176;
|
||||
ySize = 187;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
String containerName = StatCollector.translateToLocal(tileEntityAugmentationTable.getInventoryName());
|
||||
fontRendererObj.drawString(containerName, xSize / 2 - fontRendererObj.getStringWidth(containerName) / 2, 6, 4210752);
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal(Names.Containers.VANILLA_INVENTORY), 8, ySize - 104, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.AUGMENTATION_TABLE);
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
int yStart = (height - ySize) / 2;
|
||||
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public class GuiCalcinator extends GuiContainer
|
|||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_CALCINATOR);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.CALCINATOR);
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
int yStart = (height - ySize) / 2;
|
||||
|
|
|
@ -37,7 +37,7 @@ public class GuiGlassBell extends GuiContainer
|
|||
{
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_GLASS_BELL);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.GLASS_BELL);
|
||||
int xStart = (width - xSize) / 2;
|
||||
int yStart = (height - ySize) / 2;
|
||||
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -36,7 +36,7 @@ public class GuiResearchStation extends GuiContainer
|
|||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(Textures.GUI_RESEARCH_STATION);
|
||||
this.mc.getTextureManager().bindTexture(Textures.Gui.RESEARCH_STATION);
|
||||
|
||||
int xStart = (width - xSize) / 2;
|
||||
int yStart = (height - ySize) / 2;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class DrawBlockHighlightEventHandler
|
|||
ToolMode toolMode = ((ItemDarkMatterPickAxe) event.currentItem.getItem()).getCurrentToolMode(event.currentItem);
|
||||
int facing = MathHelper.floor_double(event.player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (toolMode == ToolMode.SINGLE)
|
||||
if (toolMode == ToolMode.STANDARD)
|
||||
{
|
||||
drawSelectionBox(event.context, event.player, new MovingObjectPosition(event.target.blockX, event.target.blockY, event.target.blockZ, event.target.sideHit, event.target.hitVec), 0, event.partialTicks);
|
||||
}
|
||||
|
|
|
@ -10,50 +10,50 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemAlchemicalChestRenderer implements IItemRenderer
|
||||
public class ItemRendererAlchemicalChest implements IItemRenderer
|
||||
{
|
||||
private final ModelChest modelChest;
|
||||
|
||||
public ItemAlchemicalChestRenderer()
|
||||
public ItemRendererAlchemicalChest()
|
||||
{
|
||||
modelChest = new ModelChest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
renderAlchemicalChest(0.5F, 0.5F, 0.5F, item.getItemDamage());
|
||||
renderAlchemicalChest(0.5F, 0.5F, 0.5F, itemStack.getItemDamage());
|
||||
break;
|
||||
}
|
||||
case EQUIPPED:
|
||||
{
|
||||
renderAlchemicalChest(1.0F, 1.0F, 1.0F, item.getItemDamage());
|
||||
renderAlchemicalChest(1.0F, 1.0F, 1.0F, itemStack.getItemDamage());
|
||||
break;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
{
|
||||
renderAlchemicalChest(1.0F, 1.0F, 1.0F, item.getItemDamage());
|
||||
renderAlchemicalChest(1.0F, 1.0F, 1.0F, itemStack.getItemDamage());
|
||||
break;
|
||||
}
|
||||
case INVENTORY:
|
||||
{
|
||||
renderAlchemicalChest(0.0F, 0.075F, 0.0F, item.getItemDamage());
|
||||
renderAlchemicalChest(0.0F, 0.075F, 0.0F, itemStack.getItemDamage());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -65,15 +65,15 @@ public class ItemAlchemicalChestRenderer implements IItemRenderer
|
|||
{
|
||||
if (metaData == 0)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_SMALL);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.ALCHEMICAL_CHEST_SMALL);
|
||||
}
|
||||
else if (metaData == 1)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_MEDIUM);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.ALCHEMICAL_CHEST_MEDIUM);
|
||||
}
|
||||
else if (metaData == 2)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_LARGE);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.ALCHEMICAL_CHEST_LARGE);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix(); //start
|
|
@ -10,31 +10,31 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemAludelRenderer implements IItemRenderer
|
||||
public class ItemRendererAludel implements IItemRenderer
|
||||
{
|
||||
private final ModelAludel modelAludel;
|
||||
|
||||
public ItemAludelRenderer()
|
||||
public ItemRendererAludel()
|
||||
{
|
||||
modelAludel = new ModelAludel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ public class ItemAludelRenderer implements IItemRenderer
|
|||
GL11.glRotatef(-90F, 1F, 0, 0);
|
||||
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALUDEL);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.ALUDEL);
|
||||
|
||||
// Render
|
||||
modelAludel.render();
|
|
@ -0,0 +1,83 @@
|
|||
package com.pahimar.ee3.client.renderer.item;
|
||||
|
||||
import com.pahimar.ee3.client.renderer.model.ModelAugmentationTable;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemRendererAugmentationTable implements IItemRenderer
|
||||
{
|
||||
private final ModelAugmentationTable modelAugmentationTable;
|
||||
|
||||
public ItemRendererAugmentationTable()
|
||||
{
|
||||
modelAugmentationTable = new ModelAugmentationTable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
renderAugmentationTable(0.0F, 0.0F, 0.0F);
|
||||
return;
|
||||
}
|
||||
case EQUIPPED:
|
||||
{
|
||||
renderAugmentationTable(1.0F, 1.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
{
|
||||
renderAugmentationTable(0.0F, 0.0F, 0.0F);
|
||||
return;
|
||||
}
|
||||
case INVENTORY:
|
||||
{
|
||||
renderAugmentationTable(0.0F, 0.0F, 0.0F);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void renderAugmentationTable(float x, float y, float z)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
// Scale, Translate, Rotate
|
||||
GL11.glScalef(0.33F, 0.33F, 0.33F);
|
||||
GL11.glTranslatef(x, y, z);
|
||||
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.AUGMENTATION_TABLE);
|
||||
|
||||
// Render
|
||||
modelAugmentationTable.render();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -10,31 +10,31 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemCalcinatorRenderer implements IItemRenderer
|
||||
public class ItemRendererCalcinator implements IItemRenderer
|
||||
{
|
||||
private final ModelCalcinator modelCalcinator;
|
||||
|
||||
public ItemCalcinatorRenderer()
|
||||
public ItemRendererCalcinator()
|
||||
{
|
||||
modelCalcinator = new ModelCalcinator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ public class ItemCalcinatorRenderer implements IItemRenderer
|
|||
GL11.glRotatef(-90F, 1F, 0, 0);
|
||||
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_CALCINATOR_IDLE);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.CALCINATOR_IDLE);
|
||||
|
||||
// Render
|
||||
modelCalcinator.renderPart("Calcinator");
|
|
@ -10,31 +10,31 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemGlassBellRenderer implements IItemRenderer
|
||||
public class ItemRendererGlassBell implements IItemRenderer
|
||||
{
|
||||
private final ModelGlassBell modelGlassBell;
|
||||
|
||||
public ItemGlassBellRenderer()
|
||||
public ItemRendererGlassBell()
|
||||
{
|
||||
modelGlassBell = new ModelGlassBell();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ public class ItemGlassBellRenderer implements IItemRenderer
|
|||
GL11.glRotatef(-90F, 1F, 0, 0);
|
||||
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_GLASS_BELL);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.GLASS_BELL);
|
||||
|
||||
// Render
|
||||
modelGlassBell.render();
|
|
@ -10,31 +10,31 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemResearchStationRenderer implements IItemRenderer
|
||||
public class ItemRendererResearchStation implements IItemRenderer
|
||||
{
|
||||
private final ModelResearchStation modelResearchStation;
|
||||
|
||||
public ItemResearchStationRenderer()
|
||||
public ItemRendererResearchStation()
|
||||
{
|
||||
modelResearchStation = new ModelResearchStation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
public boolean handleRenderType(ItemStack itemStack, ItemRenderType itemRenderType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
public boolean shouldUseRenderHelper(ItemRenderType itemRenderType, ItemStack itemStack, ItemRendererHelper itemRendererHelper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
public void renderItem(ItemRenderType itemRenderType, ItemStack itemStack, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
switch (itemRenderType)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ public class ItemResearchStationRenderer implements IItemRenderer
|
|||
GL11.glTranslatef(x, y, z);
|
||||
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_RESEARCH_STATION);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.Model.RESEARCH_STATION);
|
||||
|
||||
// Render
|
||||
modelResearchStation.render();
|
|
@ -0,0 +1,23 @@
|
|||
package com.pahimar.ee3.client.renderer.model;
|
||||
|
||||
import com.pahimar.ee3.reference.Models;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelAugmentationTable
|
||||
{
|
||||
private IModelCustom modelAugmentationTable;
|
||||
|
||||
public ModelAugmentationTable()
|
||||
{
|
||||
modelAugmentationTable = AdvancedModelLoader.loadModel(Models.AUGMENTATION_TABLE);
|
||||
}
|
||||
|
||||
public void render()
|
||||
{
|
||||
modelAugmentationTable.renderAll();
|
||||
}
|
||||
}
|
|
@ -12,7 +12,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityAlchemicalChestRenderer extends TileEntitySpecialRenderer
|
||||
public class TileEntityRendererAlchemicalChest extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelChest modelChest = new ModelChest();
|
||||
|
||||
|
@ -31,15 +31,15 @@ public class TileEntityAlchemicalChestRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
if (tileEntityAlchemicalChest.getState() == 0)
|
||||
{
|
||||
this.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_SMALL);
|
||||
this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_SMALL);
|
||||
}
|
||||
else if (tileEntityAlchemicalChest.getState() == 1)
|
||||
{
|
||||
this.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_MEDIUM);
|
||||
this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_MEDIUM);
|
||||
}
|
||||
else if (tileEntityAlchemicalChest.getState() == 2)
|
||||
{
|
||||
this.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST_LARGE);
|
||||
this.bindTexture(Textures.Model.ALCHEMICAL_CHEST_LARGE);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
|
@ -17,12 +17,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityAludelRenderer extends TileEntitySpecialRenderer
|
||||
public class TileEntityRendererAludel extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelAludel modelAludel = new ModelAludel();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public TileEntityAludelRenderer()
|
||||
public TileEntityRendererAludel()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ public class TileEntityAludelRenderer extends TileEntitySpecialRenderer
|
|||
scaleTranslateRotate(x, y, z, tileEntityAludel.getOrientation());
|
||||
|
||||
// Bind texture
|
||||
this.bindTexture(Textures.MODEL_ALUDEL);
|
||||
this.bindTexture(Textures.Model.ALUDEL);
|
||||
|
||||
// Render
|
||||
modelAludel.render();
|
|
@ -0,0 +1,70 @@
|
|||
package com.pahimar.ee3.client.renderer.tileentity;
|
||||
|
||||
import com.pahimar.ee3.client.renderer.model.ModelAugmentationTable;
|
||||
import com.pahimar.ee3.reference.Textures;
|
||||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityRendererAugmentationTable extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelAugmentationTable modelAugmentationTable = new ModelAugmentationTable();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
||||
{
|
||||
if (tileEntity instanceof TileEntityAugmentationTable)
|
||||
{
|
||||
TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) tileEntity;
|
||||
ForgeDirection direction = tileEntityAugmentationTable.getOrientation();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
// Scale, Translate, Rotate
|
||||
scaleTranslateRotate(x, y, z, direction);
|
||||
|
||||
// Bind texture
|
||||
this.bindTexture(Textures.Model.AUGMENTATION_TABLE);
|
||||
|
||||
// Render
|
||||
modelAugmentationTable.render();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void scaleTranslateRotate(double x, double y, double z, ForgeDirection orientation)
|
||||
{
|
||||
if (orientation == ForgeDirection.NORTH)
|
||||
{
|
||||
GL11.glTranslated(x + 0.4d, y + 0.42d, z + 0.5d);
|
||||
GL11.glScalef(0.25F, 0.27F, 0.25F);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else if (orientation == ForgeDirection.EAST)
|
||||
{
|
||||
GL11.glTranslated(x + 0.5d, y + 0.42d, z + 0.4d);
|
||||
GL11.glScalef(0.25F, 0.27F, 0.25F);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else if (orientation == ForgeDirection.SOUTH)
|
||||
{
|
||||
GL11.glTranslated(x + 0.6d, y + 0.42d, z + 0.5d);
|
||||
GL11.glScalef(0.25F, 0.27F, 0.25F);
|
||||
GL11.glRotatef(0, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else if (orientation == ForgeDirection.WEST)
|
||||
{
|
||||
GL11.glTranslated(x + 0.5d, y + 0.42d, z + 0.6d);
|
||||
GL11.glScalef(0.25F, 0.27F, 0.25F);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.MathHelper;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityCalcinatorRenderer extends TileEntitySpecialRenderer
|
||||
public class TileEntityRendererCalcinator extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelCalcinator modelCalcinator = new ModelCalcinator();
|
||||
|
||||
|
@ -66,11 +66,11 @@ public class TileEntityCalcinatorRenderer extends TileEntitySpecialRenderer
|
|||
// Bind texture
|
||||
if (tileEntityCalcinator.getState() == 1)
|
||||
{
|
||||
this.bindTexture(Textures.MODEL_CALCINATOR_ACTIVE);
|
||||
this.bindTexture(Textures.Model.CALCINATOR_ACTIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.bindTexture(Textures.MODEL_CALCINATOR_IDLE);
|
||||
this.bindTexture(Textures.Model.CALCINATOR_IDLE);
|
||||
}
|
||||
|
||||
// Render
|
|
@ -16,12 +16,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityGlassBellRenderer extends TileEntitySpecialRenderer
|
||||
public class TileEntityRendererGlassBell extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelGlassBell modelGlassBell = new ModelGlassBell();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public TileEntityGlassBellRenderer()
|
||||
public TileEntityRendererGlassBell()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ public class TileEntityGlassBellRenderer extends TileEntitySpecialRenderer
|
|||
renderGlassBellByOrientation(x, y, z, tileEntityGlassBell.getOrientation());
|
||||
|
||||
// Bind texture
|
||||
this.bindTexture(Textures.MODEL_GLASS_BELL);
|
||||
this.bindTexture(Textures.Model.GLASS_BELL);
|
||||
|
||||
modelGlassBell.render();
|
||||
|
|
@ -10,7 +10,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityResearchStationRenderer extends TileEntitySpecialRenderer
|
||||
public class TileEntityRendererResearchStation extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final ModelResearchStation modelResearchStation = new ModelResearchStation();
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class TileEntityResearchStationRenderer extends TileEntitySpecialRenderer
|
|||
GL11.glTranslatef((float) x + 0.0F, (float) y + 0.0F, (float) z + 1.0F);
|
||||
|
||||
// Bind texture
|
||||
this.bindTexture(Textures.MODEL_RESEARCH_STATION);
|
||||
this.bindTexture(Textures.Model.RESEARCH_STATION);
|
||||
|
||||
// Render
|
||||
modelResearchStation.render();
|
|
@ -42,6 +42,11 @@ public class GuiHandler implements IGuiHandler
|
|||
TileEntityResearchStation tileEntityResearchStation = (TileEntityResearchStation) world.getTileEntity(x, y, z);
|
||||
return new ContainerResearchStation(player.inventory, tileEntityResearchStation);
|
||||
}
|
||||
else if (id == GuiId.AUGMENTATION_TABLE.ordinal())
|
||||
{
|
||||
TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z);
|
||||
return new ContainerAugmentationTable(player.inventory, tileEntityAugmentationTable);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -78,6 +83,11 @@ public class GuiHandler implements IGuiHandler
|
|||
TileEntityResearchStation tileEntityResearchStation = (TileEntityResearchStation) world.getTileEntity(x, y, z);
|
||||
return new GuiResearchStation(player.inventory, tileEntityResearchStation);
|
||||
}
|
||||
else if (id == GuiId.AUGMENTATION_TABLE.ordinal())
|
||||
{
|
||||
TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z);
|
||||
return new GuiAugmentationTable(player.inventory, tileEntityAugmentationTable);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ public class ModBlocks
|
|||
public static final BlockEE calcinator = new BlockCalcinator();
|
||||
public static final BlockEE glassBell = new BlockGlassBell();
|
||||
public static final BlockEE researchStation = new BlockResearchStation();
|
||||
public static final BlockEE augmentationTable = new BlockAugmentationTable();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
|
@ -27,5 +28,6 @@ public class ModBlocks
|
|||
GameRegistry.registerBlock(calcinator, Names.Blocks.CALCINATOR);
|
||||
GameRegistry.registerBlock(glassBell, Names.Blocks.GLASS_BELL);
|
||||
GameRegistry.registerBlock(researchStation, Names.Blocks.RESEARCH_STATION);
|
||||
GameRegistry.registerBlock(augmentationTable, Names.Blocks.AUGMENTATION_TABLE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,19 @@ public class Recipes
|
|||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.diviningRod), " s ", " s ", "s s", 's', "stickWood");
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.pickaxeDarkMatter), "mmm", " d ", " d ", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.augmentationTable), "i ", "sss", "p p", 'i', "ingotIron", 's', "slabWood", 'p', "plankWood");
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.shovelDarkMatter), "m", "d", "d", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.pickAxeDarkMatter), "mmm", " d ", " d ", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hammerDarkMatter), "mmm", "mdm", " d ", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.axeDarkMatter), "mm ", "md ", " d ", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hoeDarkMatter), "mm ", " d ", " d ", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.fishingRodDarkMatter), " w", " ws", "m s", 'm', new ItemStack(ModItems.matter, 1, 0), 'w', "stickWood", 's', new ItemStack(Items.string));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.shearsDarkMatter), "m ", " m", 'm', new ItemStack(ModItems.matter, 1, 0));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bowDarkMatter), "sm ", "s m", "sm ", 'm', new ItemStack(ModItems.matter, 1, 0), 's', new ItemStack(Items.string));
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.arrowDarkMatter, 64), " m", " s ", "f ", 'm', new ItemStack(ModItems.matter, 1, 0), 's', "stickWood", 'f', new ItemStack(Items.feather));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.swordDarkMatter), "m", "m", "d", 'm', new ItemStack(ModItems.matter, 1, 0), 'd', Items.diamond);
|
||||
}
|
||||
|
||||
private static void initAludelRecipes()
|
||||
|
|
|
@ -5,11 +5,10 @@ import com.pahimar.ee3.reference.Names;
|
|||
import com.pahimar.ee3.util.NBTHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerAlchemicalBag extends Container
|
||||
public class ContainerAlchemicalBag extends ContainerEE
|
||||
{
|
||||
// Small Bag
|
||||
public static final int SMALL_BAG_INVENTORY_ROWS = 4;
|
||||
|
@ -22,9 +21,7 @@ public class ContainerAlchemicalBag extends Container
|
|||
public static final int LARGE_BAG_INVENTORY_COLUMNS = 13;
|
||||
private final EntityPlayer entityPlayer;
|
||||
private final InventoryAlchemicalBag inventoryAlchemicalBag;
|
||||
// Player Inventory
|
||||
private final int PLAYER_INVENTORY_ROWS = 3;
|
||||
private final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
private int bagInventoryRows;
|
||||
private int bagInventoryColumns;
|
||||
|
||||
|
@ -107,12 +104,6 @@ public class ContainerAlchemicalBag extends Container
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer var1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer entityPlayer)
|
||||
{
|
||||
|
|
|
@ -3,11 +3,10 @@ package com.pahimar.ee3.inventory;
|
|||
import com.pahimar.ee3.tileentity.TileEntityAlchemicalChest;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerAlchemicalChest extends Container
|
||||
public class ContainerAlchemicalChest extends ContainerEE
|
||||
{
|
||||
// Small Chest
|
||||
public static final int SMALL_CHEST_INVENTORY_ROWS = 4;
|
||||
|
@ -21,9 +20,7 @@ public class ContainerAlchemicalChest extends Container
|
|||
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;
|
||||
private final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
private TileEntityAlchemicalChest tileEntityAlchemicalChest;
|
||||
private int chestInventoryRows;
|
||||
private int chestInventoryColumns;
|
||||
|
@ -107,12 +104,6 @@ public class ContainerAlchemicalChest extends Container
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for when the crafting gui is closed.
|
||||
*/
|
||||
|
|
|
@ -6,16 +6,13 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
|
||||
public class ContainerAludel extends Container
|
||||
public class ContainerAludel extends ContainerEE
|
||||
{
|
||||
private final int PLAYER_INVENTORY_ROWS = 3;
|
||||
private final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
private TileEntityAludel tileEntityAludel;
|
||||
private int lastDeviceCookTime;
|
||||
private int lastFuelBurnTime;
|
||||
|
@ -178,10 +175,4 @@ public class ContainerAludel extends Container
|
|||
this.tileEntityAludel.itemCookTime = updatedValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerAugmentationTable extends ContainerEE
|
||||
{
|
||||
private TileEntityAugmentationTable tileEntityAugmentationTable;
|
||||
|
||||
public ContainerAugmentationTable(InventoryPlayer inventoryPlayer, TileEntityAugmentationTable tileEntityAugmentationTable)
|
||||
{
|
||||
this.tileEntityAugmentationTable = tileEntityAugmentationTable;
|
||||
|
||||
this.addSlotToContainer(new Slot(tileEntityAugmentationTable, TileEntityAugmentationTable.INPUT_SLOT_INVENTORY_INDEX, 30, 38));
|
||||
this.addSlotToContainer(new Slot(tileEntityAugmentationTable, TileEntityAugmentationTable.AUGMENT_SLOT_INVENTORY_INDEX, 66, 38));
|
||||
this.addSlotToContainer(new Slot(tileEntityAugmentationTable, TileEntityAugmentationTable.OUTPUT_SLOT_INVENTORY_INDEX, 130, 38));
|
||||
|
||||
// Add the player's inventory slots to the container
|
||||
for (int inventoryRowIndex = 0; inventoryRowIndex < PLAYER_INVENTORY_ROWS; ++inventoryRowIndex)
|
||||
{
|
||||
for (int inventoryColumnIndex = 0; inventoryColumnIndex < PLAYER_INVENTORY_COLUMNS; ++inventoryColumnIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 8 + inventoryColumnIndex * 18, 94 + inventoryRowIndex * 18));
|
||||
}
|
||||
}
|
||||
|
||||
// Add the player's action bar slots to the container
|
||||
for (int actionBarSlotIndex = 0; actionBarSlotIndex < PLAYER_INVENTORY_COLUMNS; ++actionBarSlotIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, actionBarSlotIndex, 8 + actionBarSlotIndex * 18, 152));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex)
|
||||
{
|
||||
return super.transferStackInSlot(entityPlayer, slotIndex);
|
||||
}
|
||||
}
|
|
@ -5,13 +5,12 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
|
||||
public class ContainerCalcinator extends Container
|
||||
public class ContainerCalcinator extends ContainerEE
|
||||
{
|
||||
private TileEntityCalcinator tileEntityCalcinator;
|
||||
private int lastCookTime; // How much longer the Calcinator will burn
|
||||
|
@ -33,9 +32,9 @@ public class ContainerCalcinator extends Container
|
|||
this.addSlotToContainer(new SlotCalcinator(tileEntityCalcinator, TileEntityCalcinator.OUTPUT_RIGHT_INVENTORY_INDEX, 136, 35));
|
||||
|
||||
// Add the player's inventory slots to the container
|
||||
for (int inventoryRowIndex = 0; inventoryRowIndex < 3; ++inventoryRowIndex)
|
||||
for (int inventoryRowIndex = 0; inventoryRowIndex < PLAYER_INVENTORY_ROWS; ++inventoryRowIndex)
|
||||
{
|
||||
for (int inventoryColumnIndex = 0; inventoryColumnIndex < 9; ++inventoryColumnIndex)
|
||||
for (int inventoryColumnIndex = 0; inventoryColumnIndex < PLAYER_INVENTORY_COLUMNS; ++inventoryColumnIndex)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 8 + inventoryColumnIndex * 18, 94 + inventoryRowIndex * 18));
|
||||
}
|
||||
|
@ -167,10 +166,4 @@ public class ContainerCalcinator extends Container
|
|||
this.tileEntityCalcinator.itemCookTime = updatedValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
16
src/main/java/com/pahimar/ee3/inventory/ContainerEE.java
Normal file
16
src/main/java/com/pahimar/ee3/inventory/ContainerEE.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public abstract class ContainerEE extends Container
|
||||
{
|
||||
protected final int PLAYER_INVENTORY_ROWS = 3;
|
||||
protected final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -3,15 +3,11 @@ package com.pahimar.ee3.inventory;
|
|||
import com.pahimar.ee3.tileentity.TileEntityGlassBell;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerGlassBell extends Container
|
||||
public class ContainerGlassBell extends ContainerEE
|
||||
{
|
||||
private final int PLAYER_INVENTORY_ROWS = 3;
|
||||
private final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
public ContainerGlassBell(InventoryPlayer inventoryPlayer, TileEntityGlassBell tileGlassBell)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(tileGlassBell, TileEntityGlassBell.DISPLAY_SLOT_INVENTORY_INDEX, 80, 22));
|
||||
|
@ -32,12 +28,6 @@ public class ContainerGlassBell extends Container
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex)
|
||||
{
|
||||
|
|
|
@ -4,14 +4,11 @@ import com.pahimar.ee3.item.ItemAlchemicalTome;
|
|||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerResearchStation extends Container
|
||||
public class ContainerResearchStation extends ContainerEE
|
||||
{
|
||||
private final int PLAYER_INVENTORY_ROWS = 3;
|
||||
private final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
private TileEntityResearchStation tileEntityResearchStation;
|
||||
|
||||
public ContainerResearchStation(InventoryPlayer inventoryPlayer, TileEntityResearchStation tileEntityResearchStation)
|
||||
|
@ -37,12 +34,6 @@ public class ContainerResearchStation extends Container
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityPlayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ public class SlotAludelOutput extends Slot
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack)
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class SlotCalcinator extends Slot
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack)
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public class ItemDarkMatterPickAxe extends ItemToolEE implements IKeyBound, ICha
|
|||
@Override
|
||||
public List<ToolMode> getAvailableToolModes()
|
||||
{
|
||||
return Arrays.asList(ToolMode.SINGLE, ToolMode.WIDE, ToolMode.TALL);
|
||||
return Arrays.asList(ToolMode.STANDARD, ToolMode.WIDE, ToolMode.TALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -53,17 +53,20 @@ public class ClientProxy extends CommonProxy
|
|||
RenderIds.alchemicalChest = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderIds.glassBell = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderIds.researchStation = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderIds.augmentationTable = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.alchemicalChest), new ItemAlchemicalChestRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.aludel), new ItemAludelRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.calcinator), new ItemCalcinatorRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.glassBell), new ItemGlassBellRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.researchStation), new ItemResearchStationRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.alchemicalChest), new ItemRendererAlchemicalChest());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.aludel), new ItemRendererAludel());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.calcinator), new ItemRendererCalcinator());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.glassBell), new ItemRendererGlassBell());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.researchStation), new ItemRendererResearchStation());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.augmentationTable), new ItemRendererAugmentationTable());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchemicalChest.class, new TileEntityAlchemicalChestRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCalcinator.class, new TileEntityCalcinatorRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAludel.class, new TileEntityAludelRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGlassBell.class, new TileEntityGlassBellRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityResearchStation.class, new TileEntityResearchStationRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchemicalChest.class, new TileEntityRendererAlchemicalChest());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCalcinator.class, new TileEntityRendererCalcinator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAludel.class, new TileEntityRendererAludel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGlassBell.class, new TileEntityRendererGlassBell());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityResearchStation.class, new TileEntityRendererResearchStation());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAugmentationTable.class, new TileEntityRendererAugmentationTable());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public abstract class CommonProxy implements IProxy
|
|||
GameRegistry.registerTileEntityWithAlternatives(TileEntityAludel.class, Names.Blocks.ALUDEL, "tile." + Names.Blocks.ALUDEL);
|
||||
GameRegistry.registerTileEntityWithAlternatives(TileEntityCalcinator.class, Names.Blocks.CALCINATOR, "tile." + Names.Blocks.CALCINATOR);
|
||||
GameRegistry.registerTileEntityWithAlternatives(TileEntityGlassBell.class, Names.Blocks.GLASS_BELL, "tile." + Names.Blocks.GLASS_BELL);
|
||||
GameRegistry.registerTileEntityWithAlternatives(TileEntityResearchStation.class, Names.Blocks.RESEARCH_STATION);
|
||||
GameRegistry.registerTileEntity(TileEntityResearchStation.class, Names.Blocks.RESEARCH_STATION);
|
||||
GameRegistry.registerTileEntity(TileEntityAugmentationTable.class, Names.Blocks.AUGMENTATION_TABLE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,5 +2,12 @@ package com.pahimar.ee3.reference;
|
|||
|
||||
public enum GuiId
|
||||
{
|
||||
PORTABLE_CRAFTING, CALCINATOR, ALUDEL, ALCHEMICAL_CHEST, ALCHEMICAL_BAG, GLASS_BELL, RESEARCH_STATION;
|
||||
PORTABLE_CRAFTING,
|
||||
CALCINATOR,
|
||||
ALUDEL,
|
||||
ALCHEMICAL_CHEST,
|
||||
ALCHEMICAL_BAG,
|
||||
GLASS_BELL,
|
||||
RESEARCH_STATION,
|
||||
AUGMENTATION_TABLE;
|
||||
}
|
||||
|
|
|
@ -11,4 +11,5 @@ public class Models
|
|||
public static final ResourceLocation CALCINATOR = ResourceLocationHelper.getResourceLocation(MODEL_LOCATION + "calcinator.obj");
|
||||
public static final ResourceLocation GLASS_BELL = ResourceLocationHelper.getResourceLocation(MODEL_LOCATION + "aludel.obj");
|
||||
public static final ResourceLocation RESEARCH_STATION = ResourceLocationHelper.getResourceLocation(MODEL_LOCATION + "researchStation.obj");
|
||||
public static final ResourceLocation AUGMENTATION_TABLE = ResourceLocationHelper.getResourceLocation(MODEL_LOCATION + "augmentationTable.obj");
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ public class Names
|
|||
public static final String GLASS_BELL = "glassBell";
|
||||
public static final String CALCINATOR = "calcinator";
|
||||
public static final String RESEARCH_STATION = "researchStation";
|
||||
public static final String AUGMENTATION_TABLE = "augmentationTable";
|
||||
}
|
||||
|
||||
public static final class Items
|
||||
|
@ -101,6 +102,7 @@ public class Names
|
|||
public static final String ALUDEL = "container.ee3:" + Blocks.ALUDEL;
|
||||
public static final String RESEARCH_STATION = "container.ee3:" + Blocks.RESEARCH_STATION;
|
||||
public static final String GLASS_BELL = "container.ee3:" + Blocks.GLASS_BELL;
|
||||
public static final String AUGMENTATION_TABLE = "container.ee3:" + Blocks.AUGMENTATION_TABLE;
|
||||
}
|
||||
|
||||
public static final class Keys
|
||||
|
|
|
@ -7,4 +7,5 @@ public class RenderIds
|
|||
public static int alchemicalChest;
|
||||
public static int glassBell;
|
||||
public static int researchStation;
|
||||
public static int augmentationTable;
|
||||
}
|
||||
|
|
|
@ -7,40 +7,45 @@ public final class Textures
|
|||
{
|
||||
public static final String RESOURCE_PREFIX = Reference.MOD_ID.toLowerCase() + ":";
|
||||
|
||||
// Base file paths
|
||||
public static final String MODEL_TEXTURE_LOCATION = "textures/models/";
|
||||
public static final class Armor
|
||||
{
|
||||
private static final String ARMOR_SHEET_LOCATION = "textures/armor/";
|
||||
}
|
||||
|
||||
// Model textures
|
||||
public static final ResourceLocation MODEL_CALCINATOR_IDLE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "calcinator_idle.png");
|
||||
public static final ResourceLocation MODEL_CALCINATOR_ACTIVE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "calcinator_active.png");
|
||||
public static final ResourceLocation MODEL_ALUDEL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "aludel.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");
|
||||
public static final String ARMOR_SHEET_LOCATION = "textures/armor/";
|
||||
public static final String GUI_SHEET_LOCATION = "textures/gui/";
|
||||
public static final class Model
|
||||
{
|
||||
private static final String MODEL_TEXTURE_LOCATION = "textures/models/";
|
||||
public static final ResourceLocation CALCINATOR_IDLE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "calcinator_idle.png");
|
||||
public static final ResourceLocation CALCINATOR_ACTIVE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "calcinator_active.png");
|
||||
public static final ResourceLocation ALUDEL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_SMALL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_small.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_MEDIUM = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_medium.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_LARGE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "alchemicalChest_large.png");
|
||||
public static final ResourceLocation GLASS_BELL = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation RESEARCH_STATION = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "researchStation.png");
|
||||
public static final ResourceLocation AUGMENTATION_TABLE = ResourceLocationHelper.getResourceLocation(MODEL_TEXTURE_LOCATION + "augmentationTable.png");
|
||||
}
|
||||
|
||||
// GUI textures
|
||||
public static final ResourceLocation GUI_CALCINATOR = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "calcinator.png");
|
||||
public static final ResourceLocation GUI_ALUDEL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_BAG_SMALL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_small.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_BAG_MEDIUM = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_medium.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_BAG_LARGE = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_large.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_CHEST_SMALL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_small.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_CHEST_MEDIUM = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_medium.png");
|
||||
public static final ResourceLocation GUI_ALCHEMICAL_CHEST_LARGE = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_large.png");
|
||||
public static final ResourceLocation GUI_GLASS_BELL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "glassBell.png");
|
||||
public static final ResourceLocation GUI_RESEARCH_STATION = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "researchStation.png");
|
||||
public static final class Gui
|
||||
{
|
||||
private static final String GUI_SHEET_LOCATION = "textures/gui/";
|
||||
public static final ResourceLocation CALCINATOR = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "calcinator.png");
|
||||
public static final ResourceLocation ALUDEL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "aludel.png");
|
||||
public static final ResourceLocation ALCHEMICAL_BAG_SMALL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_small.png");
|
||||
public static final ResourceLocation ALCHEMICAL_BAG_MEDIUM = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_medium.png");
|
||||
public static final ResourceLocation ALCHEMICAL_BAG_LARGE = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalBag_large.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_SMALL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_small.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_MEDIUM = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_medium.png");
|
||||
public static final ResourceLocation ALCHEMICAL_CHEST_LARGE = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "alchemicalChest_large.png");
|
||||
public static final ResourceLocation GLASS_BELL = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "glassBell.png");
|
||||
public static final ResourceLocation RESEARCH_STATION = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "researchStation.png");
|
||||
public static final ResourceLocation AUGMENTATION_TABLE = ResourceLocationHelper.getResourceLocation(GUI_SHEET_LOCATION + "augmentationTable.png");
|
||||
public static final ResourceLocation PORTABLE_CRAFTING = new ResourceLocation("textures/gui/container/crafting_table.png");
|
||||
}
|
||||
|
||||
public static final String EFFECTS_LOCATION = "textures/effects/";
|
||||
|
||||
// Effect textures
|
||||
public static final ResourceLocation EFFECT_WORLD_TRANSMUTATION = ResourceLocationHelper.getResourceLocation(EFFECTS_LOCATION + "noise.png");
|
||||
|
||||
// Item/Block sprite sheets
|
||||
public static final ResourceLocation VANILLA_BLOCK_TEXTURE_SHEET = new ResourceLocation("textures/atlas/blocks.png");
|
||||
public static final ResourceLocation VANILLA_ITEM_TEXTURE_SHEET = new ResourceLocation("textures/atlas/items.png");
|
||||
public static final ResourceLocation GUI_PORTABLE_CRAFTING = new ResourceLocation("textures/gui/container/crafting_table.png");
|
||||
public static final class Effect
|
||||
{
|
||||
private static final String EFFECTS_LOCATION = "textures/effects/";
|
||||
public static final ResourceLocation WORLD_TRANSMUTATION = ResourceLocationHelper.getResourceLocation(EFFECTS_LOCATION + "noise.png");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.pahimar.ee3.reference;
|
|||
|
||||
public enum ToolMode
|
||||
{
|
||||
SINGLE, DEEP, WIDE, TALL, SQUARE, CUBE;
|
||||
STANDARD, DEEP, WIDE, TALL, SQUARE, CUBE;
|
||||
|
||||
public static final ToolMode[] TYPES = ToolMode.values();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,163 @@
|
|||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
public class TileEntityAugmentationTable extends TileEntityEE implements IInventory
|
||||
{
|
||||
public static final int INVENTORY_SIZE = 3;
|
||||
public static final int INPUT_SLOT_INVENTORY_INDEX = 0;
|
||||
public static final int AUGMENT_SLOT_INVENTORY_INDEX = 1;
|
||||
public static final int OUTPUT_SLOT_INVENTORY_INDEX = 1;
|
||||
|
||||
/**
|
||||
* The ItemStacks that hold the items currently being used in the Glass Bell
|
||||
*/
|
||||
private ItemStack[] inventory;
|
||||
|
||||
public TileEntityAugmentationTable()
|
||||
{
|
||||
inventory = new ItemStack[INVENTORY_SIZE];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return inventory.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotIndex)
|
||||
{
|
||||
return inventory[slotIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slotIndex, int decrementAmount)
|
||||
{
|
||||
ItemStack itemStack = getStackInSlot(slotIndex);
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.stackSize <= decrementAmount)
|
||||
{
|
||||
setInventorySlotContents(slotIndex, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
itemStack = itemStack.splitStack(decrementAmount);
|
||||
if (itemStack.stackSize == 0)
|
||||
{
|
||||
setInventorySlotContents(slotIndex, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int slotIndex)
|
||||
{
|
||||
ItemStack itemStack = getStackInSlot(slotIndex);
|
||||
if (itemStack != null)
|
||||
{
|
||||
setInventorySlotContents(slotIndex, null);
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slotIndex, ItemStack itemStack)
|
||||
{
|
||||
inventory[slotIndex] = itemStack;
|
||||
if (itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return this.hasCustomName() ? this.getCustomName() : Names.Containers.AUGMENTATION_TABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return this.hasCustomName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound)
|
||||
{
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
|
||||
// Write the ItemStacks in the inventory to NBT
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
for (int currentIndex = 0; currentIndex < inventory.length; ++currentIndex)
|
||||
{
|
||||
if (inventory[currentIndex] != null)
|
||||
{
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte) currentIndex);
|
||||
inventory[currentIndex].writeToNBT(tagCompound);
|
||||
tagList.appendTag(tagCompound);
|
||||
}
|
||||
}
|
||||
nbtTagCompound.setTag("Items", tagList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbtTagCompound)
|
||||
{
|
||||
super.readFromNBT(nbtTagCompound);
|
||||
|
||||
// Read in the ItemStacks in the inventory from NBT
|
||||
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
|
||||
inventory = new ItemStack[this.getSizeInventory()];
|
||||
for (int i = 0; i < tagList.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
|
||||
byte slotIndex = tagCompound.getByte("Slot");
|
||||
if (slotIndex >= 0 && slotIndex < inventory.length)
|
||||
{
|
||||
inventory[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,6 +5,9 @@ key.extra=Extra
|
|||
key.release=Release
|
||||
key.toggle=Toggle
|
||||
|
||||
# Creative Tabs
|
||||
itemGroup.ee3=Equivalent Exchange 3
|
||||
|
||||
# Items
|
||||
item.ee3:alchemicalBag.name=Alchemical Bag
|
||||
item.ee3:alchemicalDust.ash.name=Ash
|
||||
|
@ -58,6 +61,7 @@ tile.ee3:calcinator.name=Calcinator
|
|||
tile.ee3:chalk.name=Chalk
|
||||
tile.ee3:glassBell.name=Glass Bell
|
||||
tile.ee3:researchStation.name=Research Station [WIP]
|
||||
tile.ee3:augmentationTable.name=Augmentation Table [WIP]
|
||||
|
||||
# GUIs
|
||||
container.ee3:alchemicalBag=Alchemical Bag
|
||||
|
@ -66,6 +70,7 @@ container.ee3:aludel=Aludel
|
|||
container.ee3:calcinator=Calcinator
|
||||
container.ee3:glassBell=Glass Bell
|
||||
container.ee3:researchStation=Research Station [WIP]
|
||||
container.ee3:augmentationTable=Augmentation Table [WIP]
|
||||
|
||||
# Commands
|
||||
command.ee3:overlay.turned_on=Target transmutation overlay turned on
|
||||
|
@ -99,6 +104,3 @@ tooltip.ee3:alchemicalChestPrefix.small=Small
|
|||
tooltip.ee3:alchemicalChestPrefix.medium=Medium
|
||||
tooltip.ee3:alchemicalChestPrefix.large=Large
|
||||
tooltip.ee3:none=None
|
||||
|
||||
# Creative Tabs
|
||||
itemGroup.ee3=Equivalent Exchange 3
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4 KiB |
BIN
src/main/resources/assets/ee3/textures/gui/augmentationTable.png
Normal file
BIN
src/main/resources/assets/ee3/textures/gui/augmentationTable.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4 KiB |
Loading…
Reference in a new issue