mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
vacuum distill GUI
This commit is contained in:
parent
6f2b9656fc
commit
cd3dce4350
@ -17,7 +17,6 @@ import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
|||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
|
|
||||||
import api.hbm.block.IToolable;
|
import api.hbm.block.IToolable;
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@ -49,24 +48,7 @@ public class MachineRefinery extends BlockDummyable implements IPersistentInfoPr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return standardOpenBehavior(world, x, y, z, player, side);
|
||||||
if(world.isRemote) {
|
|
||||||
return true;
|
|
||||||
} else if(!player.isSneaking()) {
|
|
||||||
int[] pos = this.findCore(world, x, y, z);
|
|
||||||
|
|
||||||
if(pos == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
TileEntityMachineRefinery tank = (TileEntityMachineRefinery) world.getTileEntity(pos[0], pos[1], pos[2]);
|
|
||||||
|
|
||||||
if(tank.hasExploded) return false;
|
|
||||||
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.oil.TileEntityMachineVacuumDistill;
|
import com.hbm.tileentity.machine.oil.TileEntityMachineVacuumDistill;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class MachineVacuumDistill extends BlockDummyable {
|
public class MachineVacuumDistill extends BlockDummyable {
|
||||||
|
|
||||||
@ -15,12 +18,26 @@ public class MachineVacuumDistill extends BlockDummyable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
|
||||||
if(meta >= 12) return new TileEntityMachineVacuumDistill();
|
if(meta >= 12) return new TileEntityMachineVacuumDistill();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().fluid().power();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return standardOpenBehavior(world, x, y, z, player, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
this.makeExtra(world, x - dir.offsetX + 1, y, z - dir.offsetZ + 1);
|
||||||
|
this.makeExtra(world, x - dir.offsetX + 1, y, z - dir.offsetZ - 1);
|
||||||
|
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ + 1);
|
||||||
|
this.makeExtra(world, x - dir.offsetX - 1, y, z - dir.offsetZ - 1);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
return new int[] {8, 0, 1, 1, 1, 1};
|
return new int[] {8, 0, 1, 1, 1, 1};
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.hbm.inventory.container;
|
|||||||
import com.hbm.inventory.SlotMachineOutput;
|
import com.hbm.inventory.SlotMachineOutput;
|
||||||
import com.hbm.inventory.SlotUpgrade;
|
import com.hbm.inventory.SlotUpgrade;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||||
import com.hbm.items.machine.ItemStamp;
|
import com.hbm.items.machine.ItemStamp;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineEPress;
|
import com.hbm.tileentity.machine.TileEntityMachineEPress;
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
package com.hbm.inventory.container;
|
package com.hbm.inventory.container;
|
||||||
|
|
||||||
import com.hbm.inventory.SlotMachineOutput;
|
import com.hbm.inventory.SlotMachineOutput;
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
|
||||||
import com.hbm.items.machine.ItemStamp;
|
import com.hbm.items.machine.ItemStamp;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachinePress;
|
import com.hbm.tileentity.machine.TileEntityMachinePress;
|
||||||
|
|
||||||
import api.hbm.energy.IBatteryItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
|||||||
@ -63,43 +63,36 @@ public class ContainerMachineRefinery extends Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||||
{
|
|
||||||
ItemStack var3 = null;
|
ItemStack var3 = null;
|
||||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||||
|
|
||||||
if (var4 != null && var4.getHasStack())
|
if(var4 != null && var4.getHasStack()) {
|
||||||
{
|
|
||||||
ItemStack var5 = var4.getStack();
|
ItemStack var5 = var4.getStack();
|
||||||
var3 = var5.copy();
|
var3 = var5.copy();
|
||||||
|
|
||||||
if (par2 <= 11) {
|
if(par2 <= 11) {
|
||||||
if (!this.mergeItemStack(var5, 12, this.inventorySlots.size(), true))
|
if(!this.mergeItemStack(var5, 12, this.inventorySlots.size(), true)) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
} else if(!this.mergeItemStack(var5, 0, 1, false))
|
||||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
if(!this.mergeItemStack(var5, 1, 2, false))
|
||||||
if (!this.mergeItemStack(var5, 1, 2, false))
|
if(!this.mergeItemStack(var5, 3, 4, false))
|
||||||
if (!this.mergeItemStack(var5, 3, 4, false))
|
if(!this.mergeItemStack(var5, 5, 6, false))
|
||||||
if (!this.mergeItemStack(var5, 5, 6, false))
|
if(!this.mergeItemStack(var5, 7, 8, false))
|
||||||
if (!this.mergeItemStack(var5, 7, 8, false))
|
if(!this.mergeItemStack(var5, 9, 10, false)) {
|
||||||
if (!this.mergeItemStack(var5, 9, 10, false)) {
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (var5.stackSize == 0)
|
if(var5.stackSize == 0) {
|
||||||
{
|
|
||||||
var4.putStack((ItemStack) null);
|
var4.putStack((ItemStack) null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
var4.onSlotChanged();
|
var4.onSlotChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return var3;
|
return var3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
|
|||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.hbm.inventory.container;
|
||||||
|
|
||||||
|
import com.hbm.inventory.SlotMachineOutput;
|
||||||
|
import com.hbm.tileentity.machine.oil.TileEntityMachineVacuumDistill;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class ContainerMachineVacuumDistill extends Container {
|
||||||
|
|
||||||
|
private TileEntityMachineVacuumDistill distill;
|
||||||
|
|
||||||
|
public ContainerMachineVacuumDistill(InventoryPlayer invPlayer, TileEntityMachineVacuumDistill tedf) {
|
||||||
|
|
||||||
|
distill = tedf;
|
||||||
|
|
||||||
|
//Battery
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 0, 26, 90));
|
||||||
|
//Canister Input
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 1, 44, 90));
|
||||||
|
//Canister Output
|
||||||
|
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 44, 108));
|
||||||
|
//Heavy Oil Input
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 3, 80, 90));
|
||||||
|
//Heavy Oil Output
|
||||||
|
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 80, 108));
|
||||||
|
//Nahptha Input
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 5, 98, 90));
|
||||||
|
//Nahptha Output
|
||||||
|
this.addSlotToContainer(new SlotMachineOutput(tedf, 6, 98, 108));
|
||||||
|
//Light Oil Input
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 7, 116, 90));
|
||||||
|
//Light Oil Output
|
||||||
|
this.addSlotToContainer(new SlotMachineOutput(tedf, 8, 116, 108));
|
||||||
|
//Petroleum Input
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 9, 134, 90));
|
||||||
|
//Petroleum Output
|
||||||
|
this.addSlotToContainer(new SlotMachineOutput(tedf, 10, 134, 108));
|
||||||
|
|
||||||
|
for(int i = 0; i < 3; i++) {
|
||||||
|
for(int j = 0; j < 9; j++) {
|
||||||
|
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 156 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < 9; i++) {
|
||||||
|
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 214));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
|
super.addCraftingToCrafters(crafting);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||||
|
ItemStack var3 = null;
|
||||||
|
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||||
|
|
||||||
|
if(var4 != null && var4.getHasStack()) {
|
||||||
|
ItemStack var5 = var4.getStack();
|
||||||
|
var3 = var5.copy();
|
||||||
|
|
||||||
|
if(par2 <= 10) {
|
||||||
|
if(!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if(!this.mergeItemStack(var5, 0, 1, false))
|
||||||
|
if(!this.mergeItemStack(var5, 1, 2, false))
|
||||||
|
if(!this.mergeItemStack(var5, 3, 4, false))
|
||||||
|
if(!this.mergeItemStack(var5, 5, 6, false))
|
||||||
|
if(!this.mergeItemStack(var5, 7, 8, false))
|
||||||
|
if(!this.mergeItemStack(var5, 9, 10, false)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(var5.stackSize == 0) {
|
||||||
|
var4.putStack((ItemStack) null);
|
||||||
|
} else {
|
||||||
|
var4.onSlotChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return var3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
|
return distill.isUseableByPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -36,39 +36,33 @@ private TileEntityMicrowave microwave;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||||
{
|
|
||||||
ItemStack var3 = null;
|
ItemStack var3 = null;
|
||||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||||
|
|
||||||
if (var4 != null && var4.getHasStack())
|
if(var4 != null && var4.getHasStack()) {
|
||||||
{
|
|
||||||
ItemStack var5 = var4.getStack();
|
ItemStack var5 = var4.getStack();
|
||||||
var3 = var5.copy();
|
var3 = var5.copy();
|
||||||
|
|
||||||
if (par2 <= 2) {
|
if(par2 <= 2) {
|
||||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
if(!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.mergeItemStack(var5, 0, 1, true))
|
if(!this.mergeItemStack(var5, 0, 1, true))
|
||||||
if (!this.mergeItemStack(var5, 2, 3, true))
|
if(!this.mergeItemStack(var5, 2, 3, true))
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var5.stackSize == 0)
|
if(var5.stackSize == 0) {
|
||||||
{
|
|
||||||
var4.putStack((ItemStack) null);
|
var4.putStack((ItemStack) null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
var4.onSlotChanged();
|
var4.onSlotChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return var3;
|
return var3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.inventory.container.ContainerMachineVacuumDistill;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.machine.oil.TileEntityMachineVacuumDistill;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class GUIMachineVacuumDistill extends GuiInfoContainer {
|
||||||
|
|
||||||
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_vacuum_distill.png");
|
||||||
|
private TileEntityMachineVacuumDistill refinery;
|
||||||
|
|
||||||
|
public GUIMachineVacuumDistill(InventoryPlayer invPlayer, TileEntityMachineVacuumDistill tedf) {
|
||||||
|
super(new ContainerMachineVacuumDistill(invPlayer, tedf));
|
||||||
|
refinery = tedf;
|
||||||
|
|
||||||
|
this.xSize = 176;
|
||||||
|
this.ySize = 238;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
refinery.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 70 - 52, 16, 52);
|
||||||
|
refinery.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 70 - 52, 16, 52);
|
||||||
|
refinery.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 98, guiTop + 70 - 52, 16, 52);
|
||||||
|
refinery.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 70 - 52, 16, 52);
|
||||||
|
refinery.tanks[4].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 70 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 70 - 52, 16, 52, refinery.power, refinery.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
|
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
||||||
|
|
||||||
|
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff);
|
||||||
|
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
|
int j = (int) (refinery.power * 54 / refinery.maxPower);
|
||||||
|
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 176, 52 - j, 16, j);
|
||||||
|
|
||||||
|
refinery.tanks[0].renderTank(guiLeft + 26, guiTop + 70, this.zLevel, 34, 52);
|
||||||
|
refinery.tanks[1].renderTank(guiLeft + 80, guiTop + 70, this.zLevel, 16, 52);
|
||||||
|
refinery.tanks[2].renderTank(guiLeft + 98, guiTop + 70, this.zLevel, 16, 52);
|
||||||
|
refinery.tanks[3].renderTank(guiLeft + 116, guiTop + 70, this.zLevel, 16, 52);
|
||||||
|
refinery.tanks[4].renderTank(guiLeft + 134, guiTop + 70, this.zLevel, 16, 52);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,11 +1,38 @@
|
|||||||
package com.hbm.tileentity.machine.oil;
|
package com.hbm.tileentity.machine.oil;
|
||||||
|
|
||||||
|
import com.hbm.inventory.container.ContainerMachineVacuumDistill;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
|
import com.hbm.inventory.gui.GUIMachineVacuumDistill;
|
||||||
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
public class TileEntityMachineVacuumDistill extends TileEntityMachineBase {
|
import api.hbm.energy.IEnergyUser;
|
||||||
|
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class TileEntityMachineVacuumDistill extends TileEntityMachineBase implements IEnergyUser, IFluidStandardTransceiver, IGUIProvider {
|
||||||
|
|
||||||
|
public long power;
|
||||||
|
public static final long maxPower = 1_000_000;
|
||||||
|
|
||||||
|
public FluidTank[] tanks;
|
||||||
|
|
||||||
public TileEntityMachineVacuumDistill() {
|
public TileEntityMachineVacuumDistill() {
|
||||||
super(0);
|
super(11);
|
||||||
|
|
||||||
|
this.tanks = new FluidTank[5];
|
||||||
|
this.tanks[0] = new FluidTank(Fluids.OIL, 64_000);
|
||||||
|
this.tanks[1] = new FluidTank(Fluids.HEAVYOIL, 24_000);
|
||||||
|
this.tanks[2] = new FluidTank(Fluids.NAPHTHA, 24_000);
|
||||||
|
this.tanks[3] = new FluidTank(Fluids.LIGHTOIL, 24_000);
|
||||||
|
this.tanks[4] = new FluidTank(Fluids.PETROLEUM, 24_000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -17,4 +44,70 @@ public class TileEntityMachineVacuumDistill extends TileEntityMachineBase {
|
|||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
|
||||||
|
if(bb == null) {
|
||||||
|
bb = AxisAlignedBB.getBoundingBox(
|
||||||
|
xCoord - 1,
|
||||||
|
yCoord,
|
||||||
|
zCoord - 1,
|
||||||
|
xCoord + 2,
|
||||||
|
yCoord + 9,
|
||||||
|
zCoord + 2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getPower() {
|
||||||
|
return power;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPower(long power) {
|
||||||
|
this.power = power;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getMaxPower() {
|
||||||
|
return maxPower;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidTank[] getAllTanks() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidTank[] getSendingTanks() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidTank[] getReceivingTanks() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new ContainerMachineVacuumDistill(player.inventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return new GUIMachineVacuumDistill(player.inventory, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1599,7 +1599,7 @@ vt 0.692308 0.243590
|
|||||||
vt 0.649038 0.602564
|
vt 0.649038 0.602564
|
||||||
vt 0.605769 0.243590
|
vt 0.605769 0.243590
|
||||||
vt 0.004808 0.692308
|
vt 0.004808 0.692308
|
||||||
vt -0.000000 0.602564
|
vt 0.000000 0.602564
|
||||||
vt 0.605769 0.602564
|
vt 0.605769 0.602564
|
||||||
vt 0.562500 0.243590
|
vt 0.562500 0.243590
|
||||||
vt 0.562500 0.602564
|
vt 0.562500 0.602564
|
||||||
@ -1629,7 +1629,7 @@ vt 0.394231 0.692308
|
|||||||
vt 0.350962 0.692308
|
vt 0.350962 0.692308
|
||||||
vt 0.307692 0.692308
|
vt 0.307692 0.692308
|
||||||
vt 0.264423 0.692308
|
vt 0.264423 0.692308
|
||||||
vt 0.219513 0.688949
|
vt 0.221154 0.692308
|
||||||
vt 0.206731 0.692308
|
vt 0.206731 0.692308
|
||||||
vt 0.177885 0.692308
|
vt 0.177885 0.692308
|
||||||
vt 0.163462 0.692308
|
vt 0.163462 0.692308
|
||||||
@ -3052,7 +3052,7 @@ vt 0.423077 0.692308
|
|||||||
vt 0.379808 0.692308
|
vt 0.379808 0.692308
|
||||||
vt 0.336538 0.692308
|
vt 0.336538 0.692308
|
||||||
vt 0.293269 0.692308
|
vt 0.293269 0.692308
|
||||||
vt 0.248453 0.688949
|
vt 0.250000 0.692308
|
||||||
vt 0.461538 0.846154
|
vt 0.461538 0.846154
|
||||||
vt 0.000000 -0.000000
|
vt 0.000000 -0.000000
|
||||||
vt 1.000000 0.538462
|
vt 1.000000 0.538462
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.5 KiB |
Loading…
x
Reference in New Issue
Block a user