Start on Oredictionificator!

This commit is contained in:
Aidan C. Brady 2015-03-13 09:14:57 -05:00
parent 6e3efacffb
commit 8a88df5f1c
14 changed files with 162 additions and 8 deletions

View file

@ -36,6 +36,7 @@ import mekanism.client.gui.GuiLaserAmplifier;
import mekanism.client.gui.GuiLaserTractorBeam;
import mekanism.client.gui.GuiMatrixStats;
import mekanism.client.gui.GuiMetallurgicInfuser;
import mekanism.client.gui.GuiOredictionificator;
import mekanism.client.gui.GuiOsmiumCompressor;
import mekanism.client.gui.GuiPRC;
import mekanism.client.gui.GuiPasswordEnter;
@ -92,6 +93,7 @@ import mekanism.client.render.tileentity.RenderLaserTractorBeam;
import mekanism.client.render.tileentity.RenderLogisticalSorter;
import mekanism.client.render.tileentity.RenderMetallurgicInfuser;
import mekanism.client.render.tileentity.RenderObsidianTNT;
import mekanism.client.render.tileentity.RenderOredictionificator;
import mekanism.client.render.tileentity.RenderPortableTank;
import mekanism.client.render.tileentity.RenderPressurizedReactionChamber;
import mekanism.client.render.tileentity.RenderRotaryCondensentrator;
@ -156,6 +158,7 @@ import mekanism.common.tile.TileEntityLogisticalSorter;
import mekanism.common.tile.TileEntityMetallurgicInfuser;
import mekanism.common.tile.TileEntityMultiblock;
import mekanism.common.tile.TileEntityObsidianTNT;
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.tile.TileEntityOsmiumCompressor;
import mekanism.common.tile.TileEntityPRC;
import mekanism.common.tile.TileEntityPortableTank;
@ -332,6 +335,7 @@ public class ClientProxy extends CommonProxy
GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort");
GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell");
GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider");
ClientRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator", new RenderOredictionificator());
}
@Override
@ -509,6 +513,8 @@ public class ClientProxy extends CommonProxy
return new GuiMatrixStats(player.inventory, (TileEntityInductionCasing)tileEntity);
case 51:
return new GuiTransporterConfig(player, (ISideConfiguration)tileEntity);
case 52:
return new GuiOredictionificator(player.inventory, (TileEntityOredictionificator)tileEntity);
}
return null;

View file

@ -26,6 +26,7 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper
private TileEntityContainerBlock tileEntity;
//Try not to use
public GuiMekanism(Container container)
{
super(container);

View file

@ -0,0 +1,63 @@
package mekanism.client.gui;
import mekanism.client.gui.element.GuiProgress;
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
import mekanism.client.gui.element.GuiProgress.ProgressBar;
import mekanism.common.inventory.container.ContainerOredictionificator;
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.entity.player.InventoryPlayer;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiOredictionificator extends GuiMekanism
{
public TileEntityOredictionificator tileEntity;
public GuiOredictionificator(InventoryPlayer inventory, TileEntityOredictionificator tentity)
{
super(tentity, new ContainerOredictionificator(inventory, tentity));
tileEntity = tentity;
guiElements.add(new GuiProgress(new IProgressInfoHandler()
{
@Override
public double getProgress()
{
return 1;//tileEntity.isActive ? 1 : 0;
}
}, ProgressBar.LARGE_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiOredictionificator.png"), 62, 118));
}
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
}
@Override
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
{
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiOredictionificator.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int guiWidth = (width - xSize) / 2;
int guiHeight = (height - ySize) / 2;
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
int xAxis = mouseX - guiWidth;
int yAxis = mouseY - guiHeight;
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
}
}

View file

@ -99,7 +99,7 @@ public class GuiPRC extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInventoryName(), 81, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -42,7 +42,7 @@ public class GuiPortableTank extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInventoryName(), 47, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, ySize - 96 + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -80,7 +80,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ElectricPump.png"));
electricPump.render(0.0560F);
}
else if(type == MachineType.METALLURGIC_INFUSER)
else if(type == MachineType.METALLURGIC_INFUSER || type == MachineType.OREDICTIONIFICATOR/*TODO*/)
{
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);

View file

@ -0,0 +1,45 @@
package mekanism.client.render.tileentity;
import mekanism.client.model.ModelMetallurgicInfuser;
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderOredictionificator extends TileEntitySpecialRenderer
{
private ModelMetallurgicInfuser model = new ModelMetallurgicInfuser();
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
{
renderAModelAt((TileEntityOredictionificator)tileEntity, x, y, z, partialTick);
}
private void renderAModelAt(TileEntityOredictionificator tileEntity, double x, double y, double z, float partialTick)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "MetallurgicInfuser.png"));
switch(tileEntity.facing)
{
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
}
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
model.render(0.0625F);
GL11.glPopMatrix();
}
}

View file

@ -37,6 +37,7 @@ import mekanism.common.inventory.container.ContainerLaserAmplifier;
import mekanism.common.inventory.container.ContainerLaserTractorBeam;
import mekanism.common.inventory.container.ContainerMetallurgicInfuser;
import mekanism.common.inventory.container.ContainerNull;
import mekanism.common.inventory.container.ContainerOredictionificator;
import mekanism.common.inventory.container.ContainerPRC;
import mekanism.common.inventory.container.ContainerPortableTank;
import mekanism.common.inventory.container.ContainerRobitCrafting;
@ -91,6 +92,7 @@ import mekanism.common.tile.TileEntityLogisticalSorter;
import mekanism.common.tile.TileEntityMetallurgicInfuser;
import mekanism.common.tile.TileEntityMultiblock;
import mekanism.common.tile.TileEntityObsidianTNT;
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.tile.TileEntityOsmiumCompressor;
import mekanism.common.tile.TileEntityPRC;
import mekanism.common.tile.TileEntityPortableTank;
@ -173,6 +175,7 @@ public class CommonProxy
GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort");
GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell");
GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider");
GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator");
}
public void handleTeleporterUpdate(PortableTeleporterMessage message) {}
@ -501,6 +504,8 @@ public class CommonProxy
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 51:
return new ContainerNull(player, (TileEntityContainerBlock)tileEntity);
case 52:
return new ContainerOredictionificator(player.inventory, (TileEntityOredictionificator)tileEntity);
}
return null;

View file

@ -64,6 +64,7 @@ import mekanism.common.tile.TileEntityLaserAmplifier;
import mekanism.common.tile.TileEntityLaserTractorBeam;
import mekanism.common.tile.TileEntityLogisticalSorter;
import mekanism.common.tile.TileEntityMetallurgicInfuser;
import mekanism.common.tile.TileEntityOredictionificator;
import mekanism.common.tile.TileEntityOsmiumCompressor;
import mekanism.common.tile.TileEntityPRC;
import mekanism.common.tile.TileEntityPortableTank;
@ -1057,9 +1058,9 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
return false;
case PORTABLE_TANK:
return side == ForgeDirection.UP || side == ForgeDirection.DOWN;
default:
return true;
}
return true;
}
public static enum MachineBlock
@ -1120,7 +1121,8 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
LASER_TRACTOR_BEAM(MachineBlock.MACHINE_BLOCK_2, 15, "LaserTractorBeam", 45, TileEntityLaserTractorBeam.class, false, true, false),
ENTANGLED_BLOCK(MachineBlock.MACHINE_BLOCK_3, 0, "EntangledBlock", 46, TileEntityEntangledBlock.class, true, false, false),
SOLAR_NEUTRON_ACTIVATOR(MachineBlock.MACHINE_BLOCK_3, 1, "SolarNeutronActivator", 47, TileEntitySolarNeutronActivator.class, false, true, false),
AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 2, "AmbientAccumulator", 48, TileEntityAmbientAccumulator.class, true, false, false);
AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 2, "AmbientAccumulator", 48, TileEntityAmbientAccumulator.class, true, false, false),
OREDICTIONIFICATOR(MachineBlock.MACHINE_BLOCK_3, 3, "Oredictionificator", 52, TileEntityOredictionificator.class, false, true, false);
public MachineBlock typeBlock;
public int meta;

View file

@ -0,0 +1,14 @@
package mekanism.common.inventory.container;
import mekanism.common.tile.TileEntityOredictionificator;
import net.minecraft.entity.player.InventoryPlayer;
public class ContainerOredictionificator extends ContainerNull//TODO
{
private TileEntityOredictionificator tileEntity;
public ContainerOredictionificator(InventoryPlayer inventory, TileEntityOredictionificator tentity)
{
}
}

View file

@ -325,9 +325,9 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
return TransmissionType.GAS;
case CONFIGURATE_ENERGY:
return TransmissionType.ENERGY;
default:
return null;
}
return null;
}
}
}

View file

@ -0,0 +1,17 @@
package mekanism.common.tile;
import mekanism.common.block.BlockMachine.MachineType;
public class TileEntityOredictionificator extends TileEntityContainerBlock
{
public TileEntityOredictionificator()
{
super(MachineType.OREDICTIONIFICATOR.name);
}
@Override
public void onUpdate()
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

@ -135,6 +135,7 @@ tile.MachineBlock2.LaserTractorBeam.name=Laser Tractor Beam
//Machine Block 3 (third ID iteration)
tile.MachineBlock3.SolarNeutronActivator.name=Solar Neutron Activator
tile.MachineBlock3.Oredictionificator.name=Oredictionificator
//Plastic
tile.PlasticBlock.name=Plastic Block