mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-11 20:25:36 +00:00
Aux electricity packet, power meter fix
This commit is contained in:
parent
6b665e57bb
commit
51f6e01ad9
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.4 KiB |
@ -3,7 +3,7 @@ package com.hbm.inventory;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.inventory.gui.GuiFluidContainer;
|
import com.hbm.inventory.gui.GuiInfoContainer;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.tool.ItemFluidIdentifier;
|
import com.hbm.items.tool.ItemFluidIdentifier;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
@ -154,11 +154,11 @@ public class FluidTank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void renderTankInfo(GuiContainer gui, int mouseX, int mouseY, int x, int y, int width, int height) {
|
public void renderTankInfo(GuiContainer gui, int mouseX, int mouseY, int x, int y, int width, int height) {
|
||||||
if(gui instanceof GuiFluidContainer)
|
if(gui instanceof GuiInfoContainer)
|
||||||
renderTankInfo((GuiFluidContainer)gui, mouseX, mouseY, x, y, width, height);
|
renderTankInfo((GuiInfoContainer)gui, mouseX, mouseY, x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderTankInfo(GuiFluidContainer gui, int mouseX, int mouseY, int x, int y, int width, int height) {
|
public void renderTankInfo(GuiInfoContainer gui, int mouseX, int mouseY, int x, int y, int width, int height) {
|
||||||
if(x <= mouseX && x + width > mouseX && y < mouseY && y + height >= mouseY)
|
if(x <= mouseX && x + width > mouseX && y < mouseY && y + height >= mouseY)
|
||||||
gui.drawFluidInfo(new String[] { I18n.format(this.type.getUnlocalizedName()), fluid + "/" + maxFluid + "mB" }, mouseX, mouseY);
|
gui.drawFluidInfo(new String[] { I18n.format(this.type.getUnlocalizedName()), fluid + "/" + maxFluid + "mB" }, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,12 +14,10 @@ public class ContainerElectricFurnace extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineElectricFurnace diFurnace;
|
private TileEntityMachineElectricFurnace diFurnace;
|
||||||
private int dualCookTime;
|
private int dualCookTime;
|
||||||
private int dualPower;
|
|
||||||
private int lastItemBurnTime;
|
private int lastItemBurnTime;
|
||||||
|
|
||||||
public ContainerElectricFurnace(InventoryPlayer invPlayer, TileEntityMachineElectricFurnace tedf) {
|
public ContainerElectricFurnace(InventoryPlayer invPlayer, TileEntityMachineElectricFurnace tedf) {
|
||||||
dualCookTime = 0;
|
dualCookTime = 0;
|
||||||
dualPower = 0;
|
|
||||||
lastItemBurnTime = 0;
|
lastItemBurnTime = 0;
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
@ -46,7 +44,6 @@ public class ContainerElectricFurnace extends Container {
|
|||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -102,15 +99,9 @@ public class ContainerElectricFurnace extends Container {
|
|||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
par1.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.dualPower != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dualCookTime = this.diFurnace.dualCookTime;
|
this.dualCookTime = this.diFurnace.dualCookTime;
|
||||||
this.dualPower = this.diFurnace.power;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -119,9 +110,5 @@ public class ContainerElectricFurnace extends Container {
|
|||||||
{
|
{
|
||||||
diFurnace.dualCookTime = j;
|
diFurnace.dualCookTime = j;
|
||||||
}
|
}
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,12 +13,7 @@ public class ContainerFWatzCore extends Container {
|
|||||||
|
|
||||||
private TileEntityFWatzCore diFurnace;
|
private TileEntityFWatzCore diFurnace;
|
||||||
|
|
||||||
private int cool;
|
|
||||||
private int power;
|
|
||||||
private int amat;
|
|
||||||
private int aSchrab;
|
|
||||||
private boolean isRunning;
|
private boolean isRunning;
|
||||||
private int singularityType;
|
|
||||||
|
|
||||||
public ContainerFWatzCore(InventoryPlayer invPlayer, TileEntityFWatzCore tedf) {
|
public ContainerFWatzCore(InventoryPlayer invPlayer, TileEntityFWatzCore tedf) {
|
||||||
|
|
||||||
@ -27,8 +22,12 @@ public class ContainerFWatzCore extends Container {
|
|||||||
this.addSlotToContainer(new Slot(tedf, 0, 26, 108));
|
this.addSlotToContainer(new Slot(tedf, 0, 26, 108));
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 62, 90));
|
this.addSlotToContainer(new Slot(tedf, 1, 62, 90));
|
||||||
this.addSlotToContainer(new Slot(tedf, 2, 98, 90));
|
this.addSlotToContainer(new Slot(tedf, 2, 98, 90));
|
||||||
this.addSlotToContainer(new Slot(tedf, 3, 134, 108));
|
//Inputs
|
||||||
this.addSlotToContainer(new Slot(tedf, 4, 152, 108));
|
this.addSlotToContainer(new Slot(tedf, 3, 134, 108 - 18));
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 4, 152, 108 - 18));
|
||||||
|
//Outputs
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 5, 134, 108));
|
||||||
|
this.addSlotToContainer(new Slot(tedf, 6, 152, 108));
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++)
|
for(int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@ -47,12 +46,7 @@ public class ContainerFWatzCore extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.cool);
|
crafting.sendProgressBarUpdate(this, 1, isRunning ? 1 : 0);
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 2, this.diFurnace.amat);
|
|
||||||
crafting.sendProgressBarUpdate(this, 3, this.diFurnace.aSchrab);
|
|
||||||
crafting.sendProgressBarUpdate(this, 4, isRunning ? 1 : 0);
|
|
||||||
crafting.sendProgressBarUpdate(this, 5, singularityType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -66,8 +60,8 @@ public class ContainerFWatzCore extends Container {
|
|||||||
ItemStack var5 = var4.getStack();
|
ItemStack var5 = var4.getStack();
|
||||||
var3 = var5.copy();
|
var3 = var5.copy();
|
||||||
|
|
||||||
if (par2 <= 4) {
|
if (par2 <= 6) {
|
||||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
if (!this.mergeItemStack(var5, 7, this.inventorySlots.size(), true))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -101,64 +95,18 @@ public class ContainerFWatzCore extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.cool != this.diFurnace.cool)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.cool);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.amat != this.diFurnace.amat)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 2, this.diFurnace.amat);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.aSchrab != this.diFurnace.aSchrab)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 3, this.diFurnace.aSchrab);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.isRunning != this.diFurnace.isRunning())
|
if(this.isRunning != this.diFurnace.isRunning())
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 4, this.diFurnace.isRunning() ? 1 : 0);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.isRunning() ? 1 : 0);
|
||||||
}
|
|
||||||
|
|
||||||
if(this.singularityType != this.diFurnace.getSingularityType())
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 5, this.diFurnace.getSingularityType());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cool = this.diFurnace.cool;
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.amat = this.diFurnace.amat;
|
|
||||||
this.aSchrab = this.diFurnace.aSchrab;
|
|
||||||
this.isRunning = this.diFurnace.isRunning();
|
this.isRunning = this.diFurnace.isRunning();
|
||||||
this.singularityType = this.diFurnace.getSingularityType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.cool = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 2)
|
|
||||||
{
|
|
||||||
diFurnace.amat = j;
|
|
||||||
}
|
|
||||||
if(i == 3)
|
|
||||||
{
|
|
||||||
diFurnace.aSchrab = j;
|
|
||||||
}
|
|
||||||
if(i == 4)
|
|
||||||
{
|
{
|
||||||
if(j == 0)
|
if(j == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,10 +13,6 @@ public class ContainerFusionMultiblock extends Container {
|
|||||||
|
|
||||||
private TileEntityFusionMultiblock diFurnace;
|
private TileEntityFusionMultiblock diFurnace;
|
||||||
|
|
||||||
private int water;
|
|
||||||
private int deut;
|
|
||||||
private int power;
|
|
||||||
private int trit;
|
|
||||||
private boolean isRunning;
|
private boolean isRunning;
|
||||||
|
|
||||||
public ContainerFusionMultiblock(InventoryPlayer invPlayer, TileEntityFusionMultiblock tedf) {
|
public ContainerFusionMultiblock(InventoryPlayer invPlayer, TileEntityFusionMultiblock tedf) {
|
||||||
@ -61,7 +57,6 @@ public class ContainerFusionMultiblock extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, isRunning ? 1 : 0);
|
crafting.sendProgressBarUpdate(this, 1, isRunning ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,27 +106,17 @@ public class ContainerFusionMultiblock extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.isRunning != this.diFurnace.isRunning())
|
if(this.isRunning != this.diFurnace.isRunning())
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.isRunning() ? 1 : 0);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.isRunning() ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.isRunning = this.diFurnace.isRunning();
|
this.isRunning = this.diFurnace.isRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
if(j == 0)
|
if(j == 0)
|
||||||
|
|||||||
@ -14,7 +14,6 @@ public class ContainerGenerator extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineGenerator diFurnace;
|
private TileEntityMachineGenerator diFurnace;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int heat;
|
private int heat;
|
||||||
|
|
||||||
public ContainerGenerator(InventoryPlayer invPlayer, TileEntityMachineGenerator tedf) {
|
public ContainerGenerator(InventoryPlayer invPlayer, TileEntityMachineGenerator tedf) {
|
||||||
@ -53,7 +52,6 @@ public class ContainerGenerator extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,27 +103,17 @@ public class ContainerGenerator extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.heat != this.diFurnace.heat)
|
if(this.heat != this.diFurnace.heat)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.heat = this.diFurnace.heat;
|
this.heat = this.diFurnace.heat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.heat = j;
|
diFurnace.heat = j;
|
||||||
|
|||||||
@ -14,7 +14,6 @@ public class ContainerIGenerator extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineIGenerator diFurnace;
|
private TileEntityMachineIGenerator diFurnace;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int torque;
|
private int torque;
|
||||||
private int heat;
|
private int heat;
|
||||||
private int water;
|
private int water;
|
||||||
@ -65,7 +64,6 @@ public class ContainerIGenerator extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.torque);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.torque);
|
||||||
crafting.sendProgressBarUpdate(this, 2, this.diFurnace.heat);
|
crafting.sendProgressBarUpdate(this, 2, this.diFurnace.heat);
|
||||||
crafting.sendProgressBarUpdate(this, 3, this.diFurnace.water);
|
crafting.sendProgressBarUpdate(this, 3, this.diFurnace.water);
|
||||||
@ -120,10 +118,6 @@ public class ContainerIGenerator extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
if(this.torque != this.diFurnace.torque)
|
if(this.torque != this.diFurnace.torque)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.torque);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.torque);
|
||||||
@ -150,7 +144,6 @@ public class ContainerIGenerator extends Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.torque = this.diFurnace.torque;
|
this.torque = this.diFurnace.torque;
|
||||||
this.heat = this.diFurnace.heat;
|
this.heat = this.diFurnace.heat;
|
||||||
this.water = this.diFurnace.water;
|
this.water = this.diFurnace.water;
|
||||||
@ -161,10 +154,6 @@ public class ContainerIGenerator extends Container {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.torque = j;
|
diFurnace.torque = j;
|
||||||
|
|||||||
@ -12,10 +12,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerLaunchPadTier1 extends Container {
|
public class ContainerLaunchPadTier1 extends Container {
|
||||||
|
|
||||||
private TileEntityLaunchPad diFurnace;
|
private TileEntityLaunchPad diFurnace;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerLaunchPadTier1(InventoryPlayer invPlayer, TileEntityLaunchPad tedf) {
|
public ContainerLaunchPadTier1(InventoryPlayer invPlayer, TileEntityLaunchPad tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
|
|
||||||
@ -40,7 +38,6 @@ public class ContainerLaunchPadTier1 extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -80,29 +77,4 @@ public class ContainerLaunchPadTier1 extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return diFurnace.isUseableByPlayer(player);
|
return diFurnace.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,6 @@ public class ContainerMachineAssembler extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineAssembler nukeBoy;
|
private TileEntityMachineAssembler nukeBoy;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int progress;
|
private int progress;
|
||||||
private int maxProgress;
|
private int maxProgress;
|
||||||
|
|
||||||
@ -107,11 +106,6 @@ private TileEntityMachineAssembler nukeBoy;
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.nukeBoy.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.progress != this.nukeBoy.progress)
|
if(this.progress != this.nukeBoy.progress)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.progress);
|
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.progress);
|
||||||
@ -123,17 +117,12 @@ private TileEntityMachineAssembler nukeBoy;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.nukeBoy.power;
|
|
||||||
this.progress= this.nukeBoy.progress;
|
this.progress= this.nukeBoy.progress;
|
||||||
this.maxProgress= this.nukeBoy.maxProgress;
|
this.maxProgress= this.nukeBoy.maxProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
nukeBoy.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
nukeBoy.progress = j;
|
nukeBoy.progress = j;
|
||||||
|
|||||||
@ -12,10 +12,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineBattery extends Container {
|
public class ContainerMachineBattery extends Container {
|
||||||
|
|
||||||
private TileEntityMachineBattery diFurnace;
|
private TileEntityMachineBattery diFurnace;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineBattery(InventoryPlayer invPlayer, TileEntityMachineBattery tedf) {
|
public ContainerMachineBattery(InventoryPlayer invPlayer, TileEntityMachineBattery tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
|
|
||||||
@ -39,7 +37,6 @@ public class ContainerMachineBattery extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -81,29 +78,4 @@ public class ContainerMachineBattery extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return diFurnace.isUseableByPlayer(player);
|
return diFurnace.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,11 +13,9 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineCMBFactory extends Container {
|
public class ContainerMachineCMBFactory extends Container {
|
||||||
|
|
||||||
private TileEntityMachineCMBFactory diFurnace;
|
private TileEntityMachineCMBFactory diFurnace;
|
||||||
private int power;
|
|
||||||
private int progress;
|
private int progress;
|
||||||
|
|
||||||
public ContainerMachineCMBFactory(InventoryPlayer invPlayer, TileEntityMachineCMBFactory tedf) {
|
public ContainerMachineCMBFactory(InventoryPlayer invPlayer, TileEntityMachineCMBFactory tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
|
|
||||||
@ -45,7 +43,6 @@ public class ContainerMachineCMBFactory extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,27 +95,17 @@ public class ContainerMachineCMBFactory extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.progress != this.diFurnace.process)
|
if(this.progress != this.diFurnace.process)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.process);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.progress = this.diFurnace.process;
|
this.progress = this.diFurnace.process;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.process = j;
|
diFurnace.process = j;
|
||||||
|
|||||||
@ -15,7 +15,6 @@ public class ContainerMachineChemplant extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineChemplant nukeBoy;
|
private TileEntityMachineChemplant nukeBoy;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int progress;
|
private int progress;
|
||||||
private int maxProgress;
|
private int maxProgress;
|
||||||
|
|
||||||
@ -115,11 +114,6 @@ private TileEntityMachineChemplant nukeBoy;
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.nukeBoy.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.progress != this.nukeBoy.progress)
|
if(this.progress != this.nukeBoy.progress)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.progress);
|
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.progress);
|
||||||
@ -131,17 +125,12 @@ private TileEntityMachineChemplant nukeBoy;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.nukeBoy.power;
|
|
||||||
this.progress= this.nukeBoy.progress;
|
this.progress= this.nukeBoy.progress;
|
||||||
this.maxProgress= this.nukeBoy.maxProgress;
|
this.maxProgress= this.nukeBoy.maxProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
nukeBoy.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
nukeBoy.progress = j;
|
nukeBoy.progress = j;
|
||||||
|
|||||||
@ -13,11 +13,9 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineCoal extends Container {
|
public class ContainerMachineCoal extends Container {
|
||||||
|
|
||||||
private TileEntityMachineCoal diFurnace;
|
private TileEntityMachineCoal diFurnace;
|
||||||
private int power;
|
|
||||||
private int burnTime;
|
private int burnTime;
|
||||||
|
|
||||||
public ContainerMachineCoal(InventoryPlayer invPlayer, TileEntityMachineCoal tedf) {
|
public ContainerMachineCoal(InventoryPlayer invPlayer, TileEntityMachineCoal tedf) {
|
||||||
power = 0;
|
|
||||||
burnTime = 0;
|
burnTime = 0;
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
@ -44,8 +42,7 @@ public class ContainerMachineCoal extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.burnTime);
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.burnTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,28 +95,18 @@ public class ContainerMachineCoal extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
if(this.burnTime != this.diFurnace.burnTime)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
par1.sendProgressBarUpdate(this, 0, this.diFurnace.burnTime);
|
||||||
}
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.burnTime)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.burnTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.burnTime = this.diFurnace.burnTime;
|
this.burnTime = this.diFurnace.burnTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
|
||||||
{
|
{
|
||||||
diFurnace.burnTime = j;
|
diFurnace.burnTime = j;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,11 +14,9 @@ public class ContainerMachineCyclotron extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineCyclotron testNuke;
|
private TileEntityMachineCyclotron testNuke;
|
||||||
private int progress;
|
private int progress;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineCyclotron(InventoryPlayer invPlayer, TileEntityMachineCyclotron tedf) {
|
public ContainerMachineCyclotron(InventoryPlayer invPlayer, TileEntityMachineCyclotron tedf) {
|
||||||
progress = 0;
|
progress = 0;
|
||||||
power = 0;
|
|
||||||
|
|
||||||
testNuke = tedf;
|
testNuke = tedf;
|
||||||
|
|
||||||
@ -63,7 +61,6 @@ public class ContainerMachineCyclotron extends Container {
|
|||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.testNuke.progress);
|
crafting.sendProgressBarUpdate(this, 0, this.testNuke.progress);
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.testNuke.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -118,14 +115,9 @@ public class ContainerMachineCyclotron extends Container {
|
|||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.progress);
|
par1.sendProgressBarUpdate(this, 0, this.testNuke.progress);
|
||||||
}
|
}
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.testNuke.power);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.progress = this.testNuke.progress;
|
this.progress = this.testNuke.progress;
|
||||||
this.power = this.testNuke.power;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -134,9 +126,5 @@ public class ContainerMachineCyclotron extends Container {
|
|||||||
{
|
{
|
||||||
testNuke.progress = j;
|
testNuke.progress = j;
|
||||||
}
|
}
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,10 +13,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineDiesel extends Container {
|
public class ContainerMachineDiesel extends Container {
|
||||||
|
|
||||||
private TileEntityMachineDiesel diFurnace;
|
private TileEntityMachineDiesel diFurnace;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineDiesel(InventoryPlayer invPlayer, TileEntityMachineDiesel tedf) {
|
public ContainerMachineDiesel(InventoryPlayer invPlayer, TileEntityMachineDiesel tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
|
|
||||||
@ -43,7 +41,6 @@ public class ContainerMachineDiesel extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -87,29 +84,4 @@ public class ContainerMachineDiesel extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return diFurnace.isUseableByPlayer(player);
|
return diFurnace.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,10 +13,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineGasFlare extends Container {
|
public class ContainerMachineGasFlare extends Container {
|
||||||
|
|
||||||
private TileEntityMachineGasFlare testNuke;
|
private TileEntityMachineGasFlare testNuke;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineGasFlare(InventoryPlayer invPlayer, TileEntityMachineGasFlare tedf) {
|
public ContainerMachineGasFlare(InventoryPlayer invPlayer, TileEntityMachineGasFlare tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
testNuke = tedf;
|
testNuke = tedf;
|
||||||
|
|
||||||
@ -83,29 +81,4 @@ public class ContainerMachineGasFlare extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return testNuke.isUseableByPlayer(player);
|
return testNuke.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.testNuke.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ public class ContainerMachineMiningDrill extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineMiningDrill nukeBoy;
|
private TileEntityMachineMiningDrill nukeBoy;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int warning;
|
private int warning;
|
||||||
|
|
||||||
public ContainerMachineMiningDrill(InventoryPlayer invPlayer, TileEntityMachineMiningDrill tedf) {
|
public ContainerMachineMiningDrill(InventoryPlayer invPlayer, TileEntityMachineMiningDrill tedf) {
|
||||||
@ -99,26 +98,17 @@ private TileEntityMachineMiningDrill nukeBoy;
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.nukeBoy.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.power);
|
|
||||||
}
|
|
||||||
if(this.warning != this.nukeBoy.warning)
|
if(this.warning != this.nukeBoy.warning)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.warning);
|
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.nukeBoy.power;
|
|
||||||
this.warning = this.nukeBoy.warning;
|
this.warning = this.nukeBoy.warning;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
nukeBoy.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
nukeBoy.warning = j;
|
nukeBoy.warning = j;
|
||||||
|
|||||||
@ -13,12 +13,10 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineOilWell extends Container {
|
public class ContainerMachineOilWell extends Container {
|
||||||
|
|
||||||
private TileEntityMachineOilWell testNuke;
|
private TileEntityMachineOilWell testNuke;
|
||||||
private int power;
|
|
||||||
private int warning;
|
private int warning;
|
||||||
private int warning2;
|
private int warning2;
|
||||||
|
|
||||||
public ContainerMachineOilWell(InventoryPlayer invPlayer, TileEntityMachineOilWell tedf) {
|
public ContainerMachineOilWell(InventoryPlayer invPlayer, TileEntityMachineOilWell tedf) {
|
||||||
power = 0;
|
|
||||||
warning = 0;
|
warning = 0;
|
||||||
warning2 = 0;
|
warning2 = 0;
|
||||||
|
|
||||||
@ -54,7 +52,6 @@ public class ContainerMachineOilWell extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
crafting.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
||||||
crafting.sendProgressBarUpdate(this, 2, this.testNuke.warning2);
|
crafting.sendProgressBarUpdate(this, 2, this.testNuke.warning2);
|
||||||
}
|
}
|
||||||
@ -108,10 +105,6 @@ public class ContainerMachineOilWell extends Container {
|
|||||||
for(int i = 0; i < this.crafters.size(); i++)
|
for(int i = 0; i < this.crafters.size(); i++)
|
||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
}
|
|
||||||
if(this.warning != this.testNuke.warning)
|
if(this.warning != this.testNuke.warning)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
par1.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
||||||
@ -122,17 +115,12 @@ public class ContainerMachineOilWell extends Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.testNuke.power;
|
|
||||||
this.warning = this.testNuke.warning;
|
this.warning = this.testNuke.warning;
|
||||||
this.warning2 = this.testNuke.warning2;
|
this.warning2 = this.testNuke.warning2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
testNuke.warning = j;
|
testNuke.warning = j;
|
||||||
|
|||||||
@ -14,12 +14,10 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachinePumpjack extends Container {
|
public class ContainerMachinePumpjack extends Container {
|
||||||
|
|
||||||
private TileEntityMachinePumpjack testNuke;
|
private TileEntityMachinePumpjack testNuke;
|
||||||
private int power;
|
|
||||||
private int warning;
|
private int warning;
|
||||||
private int warning2;
|
private int warning2;
|
||||||
|
|
||||||
public ContainerMachinePumpjack(InventoryPlayer invPlayer, TileEntityMachinePumpjack tedf) {
|
public ContainerMachinePumpjack(InventoryPlayer invPlayer, TileEntityMachinePumpjack tedf) {
|
||||||
power = 0;
|
|
||||||
warning = 0;
|
warning = 0;
|
||||||
warning2 = 0;
|
warning2 = 0;
|
||||||
|
|
||||||
@ -55,7 +53,6 @@ public class ContainerMachinePumpjack extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
crafting.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
||||||
crafting.sendProgressBarUpdate(this, 2, this.testNuke.warning2);
|
crafting.sendProgressBarUpdate(this, 2, this.testNuke.warning2);
|
||||||
}
|
}
|
||||||
@ -109,10 +106,6 @@ public class ContainerMachinePumpjack extends Container {
|
|||||||
for(int i = 0; i < this.crafters.size(); i++)
|
for(int i = 0; i < this.crafters.size(); i++)
|
||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
}
|
|
||||||
if(this.warning != this.testNuke.warning)
|
if(this.warning != this.testNuke.warning)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
par1.sendProgressBarUpdate(this, 1, this.testNuke.warning);
|
||||||
@ -123,17 +116,12 @@ public class ContainerMachinePumpjack extends Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.testNuke.power;
|
|
||||||
this.warning = this.testNuke.warning;
|
this.warning = this.testNuke.warning;
|
||||||
this.warning2 = this.testNuke.warning2;
|
this.warning2 = this.testNuke.warning2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
testNuke.warning = j;
|
testNuke.warning = j;
|
||||||
|
|||||||
@ -13,11 +13,9 @@ public class ContainerMachineRTG extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineRTG testNuke;
|
private TileEntityMachineRTG testNuke;
|
||||||
private int heat;
|
private int heat;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineRTG(InventoryPlayer invPlayer, TileEntityMachineRTG tedf) {
|
public ContainerMachineRTG(InventoryPlayer invPlayer, TileEntityMachineRTG tedf) {
|
||||||
heat = 0;
|
heat = 0;
|
||||||
power = 0;
|
|
||||||
|
|
||||||
testNuke = tedf;
|
testNuke = tedf;
|
||||||
|
|
||||||
@ -55,7 +53,6 @@ public class ContainerMachineRTG extends Container {
|
|||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.testNuke.heat);
|
crafting.sendProgressBarUpdate(this, 0, this.testNuke.heat);
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.testNuke.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -110,14 +107,9 @@ public class ContainerMachineRTG extends Container {
|
|||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.heat);
|
par1.sendProgressBarUpdate(this, 0, this.testNuke.heat);
|
||||||
}
|
}
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.testNuke.power);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.heat = this.testNuke.heat;
|
this.heat = this.testNuke.heat;
|
||||||
this.power = this.testNuke.power;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -126,9 +118,5 @@ public class ContainerMachineRTG extends Container {
|
|||||||
{
|
{
|
||||||
testNuke.heat = j;
|
testNuke.heat = j;
|
||||||
}
|
}
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,10 +13,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineRefinery extends Container {
|
public class ContainerMachineRefinery extends Container {
|
||||||
|
|
||||||
private TileEntityMachineRefinery testNuke;
|
private TileEntityMachineRefinery testNuke;
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerMachineRefinery(InventoryPlayer invPlayer, TileEntityMachineRefinery tedf) {
|
public ContainerMachineRefinery(InventoryPlayer invPlayer, TileEntityMachineRefinery tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
testNuke = tedf;
|
testNuke = tedf;
|
||||||
|
|
||||||
@ -108,29 +106,4 @@ public class ContainerMachineRefinery extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return testNuke.isUseableByPlayer(player);
|
return testNuke.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.testNuke.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.testNuke.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.testNuke.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
testNuke.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,6 @@ public class ContainerMachineSchrabidiumTransmutator extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineSchrabidiumTransmutator nukeBoy;
|
private TileEntityMachineSchrabidiumTransmutator nukeBoy;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int water;
|
private int water;
|
||||||
private int sulfur;
|
private int sulfur;
|
||||||
private int progress;
|
private int progress;
|
||||||
@ -92,27 +91,17 @@ private TileEntityMachineSchrabidiumTransmutator nukeBoy;
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.nukeBoy.process)
|
if(this.progress != this.nukeBoy.process)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.process);
|
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.process);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.power != this.nukeBoy.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.power);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.nukeBoy.power;
|
|
||||||
this.progress = this.nukeBoy.process;
|
this.progress = this.nukeBoy.process;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
nukeBoy.process = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
nukeBoy.power = j;
|
nukeBoy.power = j;
|
||||||
|
|||||||
@ -13,11 +13,9 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineShredder extends Container {
|
public class ContainerMachineShredder extends Container {
|
||||||
|
|
||||||
private TileEntityMachineShredder diFurnace;
|
private TileEntityMachineShredder diFurnace;
|
||||||
private int power;
|
|
||||||
private int progress;
|
private int progress;
|
||||||
|
|
||||||
public ContainerMachineShredder(InventoryPlayer invPlayer, TileEntityMachineShredder tedf) {
|
public ContainerMachineShredder(InventoryPlayer invPlayer, TileEntityMachineShredder tedf) {
|
||||||
power = 0;
|
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
|
|
||||||
@ -69,7 +67,6 @@ public class ContainerMachineShredder extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.progress);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,27 +120,17 @@ public class ContainerMachineShredder extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.progress != this.diFurnace.progress)
|
if(this.progress != this.diFurnace.progress)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.progress);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.progress = this.diFurnace.progress;
|
this.progress = this.diFurnace.progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.progress = j;
|
diFurnace.progress = j;
|
||||||
|
|||||||
@ -12,7 +12,6 @@ public class ContainerMachineTeleporter extends Container {
|
|||||||
|
|
||||||
private TileEntityMachineTeleporter diFurnace;
|
private TileEntityMachineTeleporter diFurnace;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
private int z;
|
private int z;
|
||||||
@ -25,7 +24,6 @@ public class ContainerMachineTeleporter extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.targetX);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.targetX);
|
||||||
crafting.sendProgressBarUpdate(this, 2, this.diFurnace.targetY);
|
crafting.sendProgressBarUpdate(this, 2, this.diFurnace.targetY);
|
||||||
crafting.sendProgressBarUpdate(this, 3, this.diFurnace.targetZ);
|
crafting.sendProgressBarUpdate(this, 3, this.diFurnace.targetZ);
|
||||||
@ -50,10 +48,6 @@ public class ContainerMachineTeleporter extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
if(this.x != this.diFurnace.targetX)
|
if(this.x != this.diFurnace.targetX)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.targetX);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.targetX);
|
||||||
@ -68,7 +62,6 @@ public class ContainerMachineTeleporter extends Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.x = this.diFurnace.targetX;
|
this.x = this.diFurnace.targetX;
|
||||||
this.y = this.diFurnace.targetY;
|
this.y = this.diFurnace.targetY;
|
||||||
this.z = this.diFurnace.targetZ;
|
this.z = this.diFurnace.targetZ;
|
||||||
@ -76,10 +69,6 @@ public class ContainerMachineTeleporter extends Container {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.targetX = j;
|
diFurnace.targetX = j;
|
||||||
|
|||||||
@ -14,11 +14,9 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ContainerMachineTurbofan extends Container {
|
public class ContainerMachineTurbofan extends Container {
|
||||||
|
|
||||||
private TileEntityMachineTurbofan diFurnace;
|
private TileEntityMachineTurbofan diFurnace;
|
||||||
private int power;
|
|
||||||
private int afterburner;
|
private int afterburner;
|
||||||
|
|
||||||
public ContainerMachineTurbofan(InventoryPlayer invPlayer, TileEntityMachineTurbofan tedf) {
|
public ContainerMachineTurbofan(InventoryPlayer invPlayer, TileEntityMachineTurbofan tedf) {
|
||||||
power = 0;
|
|
||||||
afterburner = 0;
|
afterburner = 0;
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
@ -44,7 +42,6 @@ public class ContainerMachineTurbofan extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.afterburner);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.afterburner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,25 +94,17 @@ public class ContainerMachineTurbofan extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
if(this.afterburner != this.diFurnace.afterburner)
|
if(this.afterburner != this.diFurnace.afterburner)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.afterburner);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.afterburner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
this.afterburner = this.diFurnace.afterburner;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.afterburner = j;
|
diFurnace.afterburner = j;
|
||||||
|
|||||||
@ -13,7 +13,6 @@ public class ContainerReactorMultiblock extends Container {
|
|||||||
|
|
||||||
private TileEntityReactorMultiblock diFurnace;
|
private TileEntityReactorMultiblock diFurnace;
|
||||||
|
|
||||||
private int power;
|
|
||||||
private int heat;
|
private int heat;
|
||||||
|
|
||||||
public ContainerReactorMultiblock(InventoryPlayer invPlayer, TileEntityReactorMultiblock tedf) {
|
public ContainerReactorMultiblock(InventoryPlayer invPlayer, TileEntityReactorMultiblock tedf) {
|
||||||
@ -80,7 +79,6 @@ public class ContainerReactorMultiblock extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,28 +128,17 @@ public class ContainerReactorMultiblock extends Container {
|
|||||||
{
|
{
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||||
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.heat != this.diFurnace.heat)
|
if(this.heat != this.diFurnace.heat)
|
||||||
{
|
{
|
||||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
par1.sendProgressBarUpdate(this, 1, this.diFurnace.heat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
this.heat = this.diFurnace.heat;
|
this.heat = this.diFurnace.heat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
{
|
{
|
||||||
diFurnace.heat = j;
|
diFurnace.heat = j;
|
||||||
|
|||||||
@ -13,8 +13,6 @@ public class ContainerWatzCore extends Container {
|
|||||||
|
|
||||||
private TileEntityWatzCore diFurnace;
|
private TileEntityWatzCore diFurnace;
|
||||||
|
|
||||||
private int power;
|
|
||||||
|
|
||||||
public ContainerWatzCore(InventoryPlayer invPlayer, TileEntityWatzCore tedf) {
|
public ContainerWatzCore(InventoryPlayer invPlayer, TileEntityWatzCore tedf) {
|
||||||
|
|
||||||
diFurnace = tedf;
|
diFurnace = tedf;
|
||||||
@ -81,7 +79,6 @@ public class ContainerWatzCore extends Container {
|
|||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting) {
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -121,29 +118,4 @@ public class ContainerWatzCore extends Container {
|
|||||||
public boolean canInteractWith(EntityPlayer player) {
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
return diFurnace.isUseableByPlayer(player);
|
return diFurnace.isUseableByPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void detectAndSendChanges() {
|
|
||||||
super.detectAndSendChanges();
|
|
||||||
|
|
||||||
for(int i = 0; i < this.crafters.size(); i++)
|
|
||||||
{
|
|
||||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
|
||||||
|
|
||||||
if(this.power != this.diFurnace.power)
|
|
||||||
{
|
|
||||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.power);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.power = this.diFurnace.power;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int i, int j) {
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
diFurnace.power = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.inventory.container.ContainerFWatzCore;
|
import com.hbm.inventory.container.ContainerFWatzCore;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityFWatzCore;
|
import com.hbm.tileentity.machine.TileEntityFWatzCore;
|
||||||
@ -12,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIFWatzCore extends GuiContainer {
|
public class GUIFWatzCore extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_fwatz_multiblock.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_fwatz_multiblock.png");
|
||||||
private TileEntityFWatzCore diFurnace;
|
private TileEntityFWatzCore diFurnace;
|
||||||
@ -25,6 +26,15 @@ public class GUIFWatzCore extends GuiContainer {
|
|||||||
this.ySize = 222;
|
this.ySize = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 88 - 70, 16, 70);
|
||||||
|
diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 88 - 70, 16, 70);
|
||||||
|
diFurnace.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 88 - 70, 16, 70);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
@ -39,22 +49,19 @@ public class GUIFWatzCore extends GuiContainer {
|
|||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
int i = diFurnace.getWaterScaled(88);
|
|
||||||
drawTexturedModalRect(guiLeft + 134, guiTop + 106 - i, 208, 88 - i, 16, i);
|
|
||||||
|
|
||||||
int j = diFurnace.getCoolantScaled(88);
|
|
||||||
drawTexturedModalRect(guiLeft + 8, guiTop + 106 - j, 176, 88 - j, 16, j);
|
|
||||||
|
|
||||||
int k = diFurnace.getPowerScaled(88);
|
int k = diFurnace.getPowerScaled(88);
|
||||||
drawTexturedModalRect(guiLeft + 26, guiTop + 106 - k, 192, 88 - k, 16, k);
|
drawTexturedModalRect(guiLeft + 26, guiTop + 106 - k, 192, 88 - k, 16, k);
|
||||||
|
|
||||||
int l = diFurnace.getHeatScaled(88);
|
|
||||||
drawTexturedModalRect(guiLeft + 152, guiTop + 106 - l, 224, 88 - l, 16, l);
|
|
||||||
|
|
||||||
if(diFurnace.isRunning())
|
if(diFurnace.isRunning())
|
||||||
drawTexturedModalRect(guiLeft + 64, guiTop + 29, 176, 88, 48, 48);
|
drawTexturedModalRect(guiLeft + 64, guiTop + 29, 176, 88, 48, 48);
|
||||||
|
|
||||||
int m = diFurnace.getSingularityType();
|
int m = diFurnace.getSingularityType();
|
||||||
drawTexturedModalRect(guiLeft + 98, guiTop + 109, 240, 4 * m, 16, 4);
|
drawTexturedModalRect(guiLeft + 98, guiTop + 109, 240, 4 * m, 16, 4);
|
||||||
|
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(FluidTank.fluidTextures);
|
||||||
|
|
||||||
|
diFurnace.tanks[0].renderTank(this, guiLeft + 8, guiTop + 88, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 70);
|
||||||
|
diFurnace.tanks[1].renderTank(this, guiLeft + 134, guiTop + 88, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 70);
|
||||||
|
diFurnace.tanks[2].renderTank(this, guiLeft + 152, guiTop + 88, diFurnace.tanks[2].getTankType().textureX() * FluidTank.x, diFurnace.tanks[2].getTankType().textureY() * FluidTank.y, 16, 70);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIFusionMultiblock extends GuiFluidContainer {
|
public class GUIFusionMultiblock extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_fusion_multiblock.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_fusion_multiblock.png");
|
||||||
private TileEntityFusionMultiblock diFurnace;
|
private TileEntityFusionMultiblock diFurnace;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIIGenerator extends GuiContainer {
|
public class GUIIGenerator extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_igenerator.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_igenerator.png");
|
||||||
private TileEntityMachineIGenerator diFurnace;
|
private TileEntityMachineIGenerator diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIIGenerator extends GuiContainer {
|
|||||||
this.ySize = 222;
|
this.ySize = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineAssembler extends GuiContainer {
|
public class GUIMachineAssembler extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_assembler.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_assembler.png");
|
||||||
private TileEntityMachineAssembler assembler;
|
private TileEntityMachineAssembler assembler;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineAssembler extends GuiContainer {
|
|||||||
this.ySize = 222;
|
this.ySize = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 70 - 52, 16, 52, assembler.power, assembler.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||||
String name = this.assembler.hasCustomInventoryName() ? this.assembler.getInventoryName() : I18n.format(this.assembler.getInventoryName());
|
String name = this.assembler.hasCustomInventoryName() ? this.assembler.getInventoryName() : I18n.format(this.assembler.getInventoryName());
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import com.hbm.inventory.container.ContainerMachineBattery;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
||||||
|
|
||||||
public class GUIMachineBattery extends GuiContainer {
|
public class GUIMachineBattery extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_battery.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_battery.png");
|
||||||
private TileEntityMachineBattery diFurnace;
|
private TileEntityMachineBattery diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineBattery extends GuiContainer {
|
|||||||
this.ySize = 166;
|
this.ySize = 166;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 69 - 52, 52, 52, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineCMBFactory extends GuiFluidContainer {
|
public class GUIMachineCMBFactory extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_cmb_manufactory.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_cmb_manufactory.png");
|
||||||
private TileEntityMachineCMBFactory diFurnace;
|
private TileEntityMachineCMBFactory diFurnace;
|
||||||
@ -31,6 +31,7 @@ public class GUIMachineCMBFactory extends GuiFluidContainer {
|
|||||||
super.drawScreen(mouseX, mouseY, f);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 69 - 52, 16, 52);
|
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 69 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineChemplant extends GuiFluidContainer {
|
public class GUIMachineChemplant extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_chemplant.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_chemplant.png");
|
||||||
private TileEntityMachineChemplant chemplant;
|
private TileEntityMachineChemplant chemplant;
|
||||||
@ -36,6 +36,7 @@ public class GUIMachineChemplant extends GuiFluidContainer {
|
|||||||
chemplant.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 52 - 34, 16, 34);
|
chemplant.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 52 - 34, 16, 34);
|
||||||
chemplant.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 52 - 34, 16, 34);
|
chemplant.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 52 - 34, 16, 34);
|
||||||
chemplant.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 52 - 34, 16, 34);
|
chemplant.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 52 - 34, 16, 34);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 70 - 52, 16, 52, chemplant.power, chemplant.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import com.hbm.inventory.container.ContainerMachineCoal;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineCoal;
|
import com.hbm.tileentity.machine.TileEntityMachineCoal;
|
||||||
|
|
||||||
public class GUIMachineCoal extends GuiFluidContainer {
|
public class GUIMachineCoal extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUICoal.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUICoal.png");
|
||||||
private TileEntityMachineCoal diFurnace;
|
private TileEntityMachineCoal diFurnace;
|
||||||
@ -31,6 +31,7 @@ public class GUIMachineCoal extends GuiFluidContainer {
|
|||||||
super.drawScreen(mouseX, mouseY, f);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52);
|
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineCyclotron extends GuiContainer {
|
public class GUIMachineCyclotron extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_cyclotron.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_cyclotron.png");
|
||||||
private TileEntityMachineCyclotron diFurnace;
|
private TileEntityMachineCyclotron diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineCyclotron extends GuiContainer {
|
|||||||
this.ySize = 222;
|
this.ySize = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineDiesel extends GuiFluidContainer {
|
public class GUIMachineDiesel extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIDiesel.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIDiesel.png");
|
||||||
private TileEntityMachineDiesel diFurnace;
|
private TileEntityMachineDiesel diFurnace;
|
||||||
@ -31,6 +31,7 @@ public class GUIMachineDiesel extends GuiFluidContainer {
|
|||||||
super.drawScreen(mouseX, mouseY, f);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import com.hbm.inventory.container.ContainerElectricFurnace;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace;
|
import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace;
|
||||||
|
|
||||||
public class GUIMachineElectricFurnace extends GuiContainer {
|
public class GUIMachineElectricFurnace extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIElectricFurnace.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIElectricFurnace.png");
|
||||||
private TileEntityMachineElectricFurnace diFurnace;
|
private TileEntityMachineElectricFurnace diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineElectricFurnace extends GuiContainer {
|
|||||||
this.ySize = 166;
|
this.ySize = 166;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 20, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineFluidTank extends GuiFluidContainer {
|
public class GUIMachineFluidTank extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_tank.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_tank.png");
|
||||||
private TileEntityMachineFluidTank tank;
|
private TileEntityMachineFluidTank tank;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineGasFlare extends GuiFluidContainer {
|
public class GUIMachineGasFlare extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_gasFlare.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_gasFlare.png");
|
||||||
private TileEntityMachineGasFlare flare;
|
private TileEntityMachineGasFlare flare;
|
||||||
@ -31,6 +31,7 @@ public class GUIMachineGasFlare extends GuiFluidContainer {
|
|||||||
super.drawScreen(mouseX, mouseY, f);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
flare.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 34, 52);
|
flare.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 34, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, flare.power, flare.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import com.hbm.inventory.container.ContainerGenerator;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineGenerator;
|
import com.hbm.tileentity.machine.TileEntityMachineGenerator;
|
||||||
|
|
||||||
public class GUIMachineGenerator extends GuiFluidContainer {
|
public class GUIMachineGenerator extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_generator.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_generator.png");
|
||||||
private TileEntityMachineGenerator diFurnace;
|
private TileEntityMachineGenerator diFurnace;
|
||||||
@ -32,6 +32,7 @@ public class GUIMachineGenerator extends GuiFluidContainer {
|
|||||||
|
|
||||||
diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 88 - 52, 16, 52);
|
diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 88 - 52, 16, 52);
|
||||||
diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 88 - 52, 16, 52);
|
diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 88 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 88 - 52, 16, 52, diFurnace.power, diFurnace.powerMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineInserter extends GuiFluidContainer {
|
public class GUIMachineInserter extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_inserter.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_inserter.png");
|
||||||
private TileEntityMachineInserter diFurnace;
|
private TileEntityMachineInserter diFurnace;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineMiningDrill extends GuiContainer {
|
public class GUIMachineMiningDrill extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_drill.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_drill.png");
|
||||||
private TileEntityMachineMiningDrill diFurnace;
|
private TileEntityMachineMiningDrill diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineMiningDrill extends GuiContainer {
|
|||||||
this.ySize = 166;
|
this.ySize = 166;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineOilWell extends GuiFluidContainer {
|
public class GUIMachineOilWell extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_well_large.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_well_large.png");
|
||||||
private TileEntityMachineOilWell derrick;
|
private TileEntityMachineOilWell derrick;
|
||||||
@ -32,6 +32,7 @@ public class GUIMachineOilWell extends GuiFluidContainer {
|
|||||||
|
|
||||||
derrick.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 70 - 52, 34, 52);
|
derrick.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 70 - 52, 34, 52);
|
||||||
derrick.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 124 - 52, 34, 52);
|
derrick.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 124 - 52, 34, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52, derrick.power, derrick.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachinePuF6Tank extends GuiFluidContainer {
|
public class GUIMachinePuF6Tank extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/puf6Tank.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/puf6Tank.png");
|
||||||
private TileEntityMachinePuF6Tank tank;
|
private TileEntityMachinePuF6Tank tank;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachinePumpjack extends GuiFluidContainer {
|
public class GUIMachinePumpjack extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_well_large.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_well_large.png");
|
||||||
private TileEntityMachinePumpjack derrick;
|
private TileEntityMachinePumpjack derrick;
|
||||||
@ -34,6 +34,7 @@ public class GUIMachinePumpjack extends GuiFluidContainer {
|
|||||||
|
|
||||||
derrick.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 70 - 52, 34, 52);
|
derrick.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 70 - 52, 34, 52);
|
||||||
derrick.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 124 - 52, 34, 52);
|
derrick.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 124 - 52, 34, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52, derrick.power, derrick.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineRTG extends GuiContainer {
|
public class GUIMachineRTG extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_rtg.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_rtg.png");
|
||||||
private TileEntityMachineRTG rtg;
|
private TileEntityMachineRTG rtg;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineRTG extends GuiContainer {
|
|||||||
this.ySize = 166;
|
this.ySize = 166;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, rtg.power, rtg.powerMax);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||||
String name = this.rtg.hasCustomInventoryName() ? this.rtg.getInventoryName() : I18n.format(this.rtg.getInventoryName());
|
String name = this.rtg.hasCustomInventoryName() ? this.rtg.getInventoryName() : I18n.format(this.rtg.getInventoryName());
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineRefinery extends GuiFluidContainer {
|
public class GUIMachineRefinery extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_refinery.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_refinery.png");
|
||||||
private TileEntityMachineRefinery refinery;
|
private TileEntityMachineRefinery refinery;
|
||||||
@ -35,6 +35,7 @@ public class GUIMachineRefinery extends GuiFluidContainer {
|
|||||||
refinery.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 98, 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[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);
|
refinery.tanks[4].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 70 - 52, 16, 52);
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52, refinery.power, refinery.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineShredder extends GuiContainer {
|
public class GUIMachineShredder extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_shredder.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_shredder.png");
|
||||||
private TileEntityMachineShredder diFurnace;
|
private TileEntityMachineShredder diFurnace;
|
||||||
@ -25,6 +25,13 @@ public class GUIMachineShredder extends GuiContainer {
|
|||||||
this.ySize = 222;
|
this.ySize = 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 106 - 88, 16, 88, diFurnace.power, diFurnace.maxPower);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineTurbofan extends GuiFluidContainer {
|
public class GUIMachineTurbofan extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_turbofan.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_turbofan.png");
|
||||||
private TileEntityMachineTurbofan diFurnace;
|
private TileEntityMachineTurbofan diFurnace;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIMachineUF6Tank extends GuiFluidContainer {
|
public class GUIMachineUF6Tank extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/uf6Tank.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/uf6Tank.png");
|
||||||
private TileEntityMachineUF6Tank tank;
|
private TileEntityMachineUF6Tank tank;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIReactorMultiblock extends GuiFluidContainer {
|
public class GUIReactorMultiblock extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_multiblock.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_multiblock.png");
|
||||||
private TileEntityReactorMultiblock diFurnace;
|
private TileEntityReactorMultiblock diFurnace;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import net.minecraft.client.resources.I18n;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIWatzCore extends GuiFluidContainer {
|
public class GUIWatzCore extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_watz_multiblock.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_watz_multiblock.png");
|
||||||
private TileEntityWatzCore diFurnace;
|
private TileEntityWatzCore diFurnace;
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
package com.hbm.inventory.gui;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
||||||
import net.minecraft.inventory.Container;
|
|
||||||
|
|
||||||
public abstract class GuiFluidContainer extends GuiContainer {
|
|
||||||
|
|
||||||
public GuiFluidContainer(Container p_i1072_1_) {
|
|
||||||
super(p_i1072_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void drawFluidInfo(String[] text, int x, int y) {
|
|
||||||
this.func_146283_a(Arrays.asList(text), x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
24
com/hbm/inventory/gui/GuiInfoContainer.java
Normal file
24
com/hbm/inventory/gui/GuiInfoContainer.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
|
||||||
|
public abstract class GuiInfoContainer extends GuiContainer {
|
||||||
|
|
||||||
|
public GuiInfoContainer(Container p_i1072_1_) {
|
||||||
|
super(p_i1072_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawFluidInfo(String[] text, int x, int y) {
|
||||||
|
this.func_146283_a(Arrays.asList(text), x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawElectricityInfo(GuiInfoContainer gui, int mouseX, int mouseY, int x, int y, int width, int height, long power, long maxPower) {
|
||||||
|
if(x <= mouseX && x + width > mouseX && y < mouseY && y + height >= mouseY)
|
||||||
|
gui.drawFluidInfo(new String[] { power + "/" + maxPower + "HE" }, mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -2768,8 +2768,8 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(gun_spark, gun_spark.getUnlocalizedName());
|
GameRegistry.registerItem(gun_spark, gun_spark.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_hp, gun_hp.getUnlocalizedName());
|
GameRegistry.registerItem(gun_hp, gun_hp.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_euthanasia, gun_euthanasia.getUnlocalizedName());
|
GameRegistry.registerItem(gun_euthanasia, gun_euthanasia.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_dash, gun_dash.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_dash, gun_dash.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_twigun, gun_twigun.getUnlocalizedName());
|
//GameRegistry.registerItem(gun_twigun, gun_twigun.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_defabricator, gun_defabricator.getUnlocalizedName());
|
GameRegistry.registerItem(gun_defabricator, gun_defabricator.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName());
|
GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName());
|
GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName());
|
||||||
@ -3086,7 +3086,7 @@ public class ModItems {
|
|||||||
//GameRegistry.registerItem(remote, remote.getUnlocalizedName());
|
//GameRegistry.registerItem(remote, remote.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
|
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
|
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(glitch, glitch.getUnlocalizedName());
|
//GameRegistry.registerItem(glitch, glitch.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName());
|
GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(burnt_bark, burnt_bark.getUnlocalizedName());
|
GameRegistry.registerItem(burnt_bark, burnt_bark.getUnlocalizedName());
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public class GunSuicide extends Item {
|
|||||||
|
|
||||||
if (!p_77615_2_.isRemote)
|
if (!p_77615_2_.isRemote)
|
||||||
{
|
{
|
||||||
p_77615_3_.attackEntityFrom(ModDamageSource.suicide, Float.POSITIVE_INFINITY);
|
p_77615_3_.attackEntityFrom(ModDamageSource.suicide, 100000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,7 +320,8 @@ public class Library {
|
|||||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_turbofan ||
|
world.getBlock(x, y, z) == ModBlocks.dummy_port_turbofan ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.reactor_hatch ||
|
world.getBlock(x, y, z) == ModBlocks.reactor_hatch ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.fusion_hatch ||
|
world.getBlock(x, y, z) == ModBlocks.fusion_hatch ||
|
||||||
world.getBlock(x, y, z) == ModBlocks.watz_hatch)
|
world.getBlock(x, y, z) == ModBlocks.watz_hatch ||
|
||||||
|
world.getBlock(x, y, z) == ModBlocks.fwatz_hatch)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1017,6 +1018,23 @@ public class Library {
|
|||||||
{
|
{
|
||||||
tileentity = worldObj.getTileEntity(x - 8, y, z);
|
tileentity = worldObj.getTileEntity(x - 8, y, z);
|
||||||
}
|
}
|
||||||
|
//FWatz Reactor
|
||||||
|
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x, y + 11, z + 9) == ModBlocks.fwatz_core)
|
||||||
|
{
|
||||||
|
tileentity = worldObj.getTileEntity(x, y + 11, z + 9);
|
||||||
|
}
|
||||||
|
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x, y + 11, z - 9) == ModBlocks.fwatz_core)
|
||||||
|
{
|
||||||
|
tileentity = worldObj.getTileEntity(x, y + 11, z - 9);
|
||||||
|
}
|
||||||
|
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x + 9, y + 11, z) == ModBlocks.fwatz_core)
|
||||||
|
{
|
||||||
|
tileentity = worldObj.getTileEntity(x + 9, y + 11, z);
|
||||||
|
}
|
||||||
|
if(block == ModBlocks.fwatz_hatch && worldObj.getBlock(x - 9, y + 11, z) == ModBlocks.fwatz_core)
|
||||||
|
{
|
||||||
|
tileentity = worldObj.getTileEntity(x - 9, y + 11, z);
|
||||||
|
}
|
||||||
|
|
||||||
if(tileentity == that)
|
if(tileentity == that)
|
||||||
tileentity = null;
|
tileentity = null;
|
||||||
|
|||||||
@ -56,6 +56,7 @@ public class CraftingManager {
|
|||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.drill_titanium, 1), new Object[] { " B ", "IBI", "PPP", 'B', ModItems.bolt_dura_steel, 'I', ModItems.ingot_dura_steel, 'P', "plateTitanium" }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.drill_titanium, 1), new Object[] { " B ", "IBI", "PPP", 'B', ModItems.bolt_dura_steel, 'I', ModItems.ingot_dura_steel, 'P', "plateTitanium" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bolt_tungsten, 4), new Object[] { "D", "D", 'D', "ingotTungsten" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bolt_tungsten, 4), new Object[] { "D", "D", 'D', "ingotTungsten" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bolt_compound, 1), new Object[] { "PDP", "PTP", "PDP", 'D', ModItems.bolt_dura_steel, 'T', ModItems.bolt_tungsten, 'P', "plateTitanium" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bolt_compound, 1), new Object[] { "PDP", "PTP", "PDP", 'D', ModItems.bolt_dura_steel, 'T', ModItems.bolt_tungsten, 'P', "plateTitanium" }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_coal, 1), new Object[] { "PFP", "FOF", "PFP", 'P', "dustCoal", 'F', Items.flint, 'O', ModBlocks.gravel_obsidian }));
|
||||||
|
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_dee, 1), new Object[] { "SMM", "M M", "MMT", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'T', ModItems.coil_advanced_torus }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_dee, 1), new Object[] { "SMM", "M M", "MMT", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'T', ModItems.coil_advanced_torus }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_circular, 2), new Object[] { "PSP", "MMM", "PSP", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'P', "plateAdvanced" }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnet_circular, 2), new Object[] { "PSP", "MMM", "PSP", 'S', "ingotSteel", 'M', ModBlocks.fusion_conductor, 'P', "plateAdvanced" }));
|
||||||
@ -595,8 +596,8 @@ public class CraftingManager {
|
|||||||
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_core), 1), new Object[] { "CWC", "CRC", "CWC", 'C', ModItems.circuit_schrabidium, 'W', Item.getItemFromBlock(ModBlocks.watz_conductor), 'R', Item.getItemFromBlock(ModBlocks.block_meteor) });
|
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_core), 1), new Object[] { "CWC", "CRC", "CWC", 'C', ModItems.circuit_schrabidium, 'W', Item.getItemFromBlock(ModBlocks.watz_conductor), 'R', Item.getItemFromBlock(ModBlocks.block_meteor) });
|
||||||
|
|
||||||
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_conductor), 1), new Object[] { "SSS", "CCC", "SSS", 'S', ModItems.plate_combine_steel, 'C', ModItems.coil_magnetized_tungsten });
|
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_conductor), 1), new Object[] { "SSS", "CCC", "SSS", 'S', ModItems.plate_combine_steel, 'C', ModItems.coil_magnetized_tungsten });
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_cooler), 1), new Object[] { "IPI", "IPI", "IPI", 'I', "ingotTitanium", 'P', "plateTitanium" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_cooler), 1), new Object[] { "IPI", "IPI", "IPI", 'I', "ingotTitanium", 'P', "plateTitanium" }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_tank), 1), new Object[] { "CGC", "GGG", "CGC", 'C', ModItems.plate_combine_steel, 'G', "paneGlass" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_tank), 1), new Object[] { "CGC", "GGG", "CGC", 'C', ModItems.plate_combine_steel, 'G', "paneGlass" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_scaffold), 1), new Object[] { "IPI", "P P", "IPI", 'I', "ingotTungsten", 'P', "plateDenseLead" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_scaffold), 1), new Object[] { "IPI", "P P", "IPI", 'I', "ingotTungsten", 'P', "plateDenseLead" }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_hatch), 1), new Object[] { "SSS", "SFS", "SSS", 'S', ModBlocks.fwatz_scaffold, 'F', Blocks.furnace }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_hatch), 1), new Object[] { "SSS", "SFS", "SSS", 'S', ModBlocks.fwatz_scaffold, 'F', Blocks.furnace }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_computer), 1), new Object[] { "DTD", "TMT", "DTD", 'D', "dustDiamond", 'T', "dustMagnetizedTungsten", 'M', ModBlocks.block_meteor }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_computer), 1), new Object[] { "DTD", "TMT", "DTD", 'D', "dustDiamond", 'T', "dustMagnetizedTungsten", 'M', ModBlocks.block_meteor }));
|
||||||
@ -967,7 +968,6 @@ public class CraftingManager {
|
|||||||
GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', new ItemStack(ModItems.ingot_euphemium, 1, 34), 'S', Items.stick });
|
GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', new ItemStack(ModItems.ingot_euphemium, 1, 34), 'S', Items.stick });
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "sulfur", 'S', Items.stick }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "sulfur", 'S', Items.stick }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "dustSulfur", 'S', Items.stick }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "dustSulfur", 'S', Items.stick }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.remote, 1), new Object[] { "I", "S", 'I', "dustRedstone", 'S', "plateIron" }));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', "ingotSteel" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', "ingotSteel" }));
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_power, 5), new Object[] { "dustRedstone", "dustGlowstone", "dustDiamond", "dustNeptunium", "dustMagnetizedTungsten" }));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_power, 5), new Object[] { "dustRedstone", "dustGlowstone", "dustDiamond", "dustNeptunium", "dustMagnetizedTungsten" }));
|
||||||
|
|||||||
75
com/hbm/packet/AuxElectricityPacket.java
Normal file
75
com/hbm/packet/AuxElectricityPacket.java
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
package com.hbm.packet;
|
||||||
|
|
||||||
|
import com.hbm.interfaces.IConsumer;
|
||||||
|
import com.hbm.interfaces.ISource;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachinePress;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||||
|
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||||
|
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class AuxElectricityPacket implements IMessage {
|
||||||
|
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int z;
|
||||||
|
int charge;
|
||||||
|
|
||||||
|
public AuxElectricityPacket()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuxElectricityPacket(int x, int y, int z, int charge)
|
||||||
|
{
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
this.charge = charge;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fromBytes(ByteBuf buf) {
|
||||||
|
x = buf.readInt();
|
||||||
|
y = buf.readInt();
|
||||||
|
z = buf.readInt();
|
||||||
|
charge = buf.readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void toBytes(ByteBuf buf) {
|
||||||
|
buf.writeInt(x);
|
||||||
|
buf.writeInt(y);
|
||||||
|
buf.writeInt(z);
|
||||||
|
buf.writeInt(charge);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Handler implements IMessageHandler<AuxElectricityPacket, IMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IMessage onMessage(AuxElectricityPacket m, MessageContext ctx) {
|
||||||
|
try {
|
||||||
|
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||||
|
|
||||||
|
if (te != null && te instanceof IConsumer) {
|
||||||
|
|
||||||
|
IConsumer gen = (IConsumer) te;
|
||||||
|
gen.setPower(m.charge);
|
||||||
|
} else if (te != null && te instanceof ISource) {
|
||||||
|
|
||||||
|
ISource gen = (ISource) te;
|
||||||
|
gen.setSPower(m.charge);
|
||||||
|
}
|
||||||
|
} catch (Exception x) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -49,6 +49,8 @@ public class PacketDispatcher {
|
|||||||
wrapper.registerMessage(TETurbofanPacket.Handler.class, TETurbofanPacket.class, i++, Side.CLIENT);
|
wrapper.registerMessage(TETurbofanPacket.Handler.class, TETurbofanPacket.class, i++, Side.CLIENT);
|
||||||
//Press item for rendering
|
//Press item for rendering
|
||||||
wrapper.registerMessage(TEPressPacket.Handler.class, TEPressPacket.class, i++, Side.CLIENT);
|
wrapper.registerMessage(TEPressPacket.Handler.class, TEPressPacket.class, i++, Side.CLIENT);
|
||||||
|
//Electricity gauge for GUI rendering
|
||||||
|
wrapper.registerMessage(AuxElectricityPacket.Handler.class, AuxElectricityPacket.class, i++, Side.CLIENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.bomb;
|
|||||||
import com.hbm.interfaces.IConsumer;
|
import com.hbm.interfaces.IConsumer;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEMissilePacket;
|
import com.hbm.packet.TEMissilePacket;
|
||||||
|
|
||||||
@ -191,8 +192,10 @@ public class TileEntityLaunchPad extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
power = Library.chargeTEFromItems(slots, 2, power, maxPower);
|
power = Library.chargeTEFromItems(slots, 2, power, maxPower);
|
||||||
|
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote) {
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEMissilePacket(xCoord, yCoord, zCoord, slots[0]));
|
PacketDispatcher.wrapper.sendToAll(new TEMissilePacket(xCoord, yCoord, zCoord, slots[0]));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -4,11 +4,17 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.interfaces.IConsumer;
|
import com.hbm.interfaces.IConsumer;
|
||||||
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.interfaces.IReactor;
|
import com.hbm.interfaces.IReactor;
|
||||||
import com.hbm.interfaces.ISource;
|
import com.hbm.interfaces.ISource;
|
||||||
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.world.FWatz;
|
import com.hbm.world.FWatz;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -20,18 +26,14 @@ import net.minecraft.nbt.NBTTagList;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, IReactor, ISource {
|
public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, IReactor, ISource, IFluidContainer, IFluidAcceptor {
|
||||||
|
|
||||||
public int cool;
|
|
||||||
public final static int maxCool = 100000000;
|
|
||||||
public int power;
|
public int power;
|
||||||
public final static int maxPower = 100000000;
|
public final static int maxPower = 100000000;
|
||||||
public int amat;
|
|
||||||
public final static int maxAmat = 100000000;
|
|
||||||
public int aSchrab;
|
|
||||||
public final static int maxASchrab = 100000000;
|
|
||||||
public boolean cooldown = false;
|
public boolean cooldown = false;
|
||||||
|
|
||||||
|
public FluidTank tanks[];
|
||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|
||||||
private ItemStack slots[];
|
private ItemStack slots[];
|
||||||
@ -41,7 +43,11 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
private String customName;
|
private String customName;
|
||||||
|
|
||||||
public TileEntityFWatzCore() {
|
public TileEntityFWatzCore() {
|
||||||
slots = new ItemStack[5];
|
slots = new ItemStack[7];
|
||||||
|
tanks = new FluidTank[3];
|
||||||
|
tanks[0] = new FluidTank(FluidType.COOLANT, 128000, 0);
|
||||||
|
tanks[1] = new FluidTank(FluidType.AMAT, 64000, 1);
|
||||||
|
tanks[2] = new FluidTank(FluidType.ASCHRAB, 64000, 2);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSizeInventory() {
|
public int getSizeInventory() {
|
||||||
@ -156,10 +162,10 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
super.readFromNBT(nbt);
|
super.readFromNBT(nbt);
|
||||||
NBTTagList list = nbt.getTagList("items", 10);
|
NBTTagList list = nbt.getTagList("items", 10);
|
||||||
|
|
||||||
cool = nbt.getInteger("cool");
|
|
||||||
power = nbt.getInteger("power");
|
power = nbt.getInteger("power");
|
||||||
amat = nbt.getInteger("amat");
|
tanks[0].readFromNBT(nbt, "cool");
|
||||||
aSchrab = nbt.getInteger("aSchrab");
|
tanks[1].readFromNBT(nbt, "amat");
|
||||||
|
tanks[2].readFromNBT(nbt, "aschrab");
|
||||||
|
|
||||||
slots = new ItemStack[getSizeInventory()];
|
slots = new ItemStack[getSizeInventory()];
|
||||||
|
|
||||||
@ -177,10 +183,12 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound nbt) {
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
super.writeToNBT(nbt);
|
super.writeToNBT(nbt);
|
||||||
nbt.setInteger("cool", cool);
|
|
||||||
nbt.setInteger("power", power);
|
nbt.setInteger("power", power);
|
||||||
nbt.setInteger("amat", amat);
|
tanks[0].writeToNBT(nbt, "cool");
|
||||||
nbt.setInteger("aSchrab", aSchrab);
|
tanks[1].writeToNBT(nbt, "amat");
|
||||||
|
tanks[2].writeToNBT(nbt, "aschrab");
|
||||||
|
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
|
|
||||||
for(int i = 0; i < slots.length; i++)
|
for(int i = 0; i < slots.length; i++)
|
||||||
@ -215,7 +223,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCoolantScaled(int i) {
|
public int getCoolantScaled(int i) {
|
||||||
return (cool/100 * i) / (maxCool/100);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -225,12 +233,12 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWaterScaled(int i) {
|
public int getWaterScaled(int i) {
|
||||||
return (amat/100 * i) / (maxAmat/100);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getHeatScaled(int i) {
|
public int getHeatScaled(int i) {
|
||||||
return (aSchrab/100 * i) / (maxASchrab/100);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSingularityType() {
|
public int getSingularityType() {
|
||||||
@ -255,7 +263,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
if (this.isStructureValid(this.worldObj)) {
|
if (this.isStructureValid(this.worldObj) && !worldObj.isRemote) {
|
||||||
|
|
||||||
age++;
|
age++;
|
||||||
if (age >= 20) {
|
if (age >= 20) {
|
||||||
@ -265,25 +273,25 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
if (age == 9 || age == 19)
|
if (age == 9 || age == 19)
|
||||||
ffgeuaInit();
|
ffgeuaInit();
|
||||||
|
|
||||||
if (hasFuse() && getSingularityType() > 0 && isStructureValid(worldObj)) {
|
if (hasFuse() && getSingularityType() > 0) {
|
||||||
if(cooldown) {
|
if(cooldown) {
|
||||||
|
|
||||||
int i = getSingularityType();
|
int i = getSingularityType();
|
||||||
|
|
||||||
if(i == 1)
|
if(i == 1)
|
||||||
cool += 1500;
|
tanks[0].setFill(tanks[0].getFill() + 1500);
|
||||||
if(i == 2)
|
if(i == 2)
|
||||||
cool += 3000;
|
tanks[0].setFill(tanks[0].getFill() + 3000);
|
||||||
if(i == 3)
|
if(i == 3)
|
||||||
cool += 750;
|
tanks[0].setFill(tanks[0].getFill() + 750);
|
||||||
if(i == 4)
|
if(i == 4)
|
||||||
cool += 7500;
|
tanks[0].setFill(tanks[0].getFill() + 7500);
|
||||||
if(i == 5)
|
if(i == 5)
|
||||||
cool += 150000;
|
tanks[0].setFill(tanks[0].getFill() + 15000);
|
||||||
|
|
||||||
if(cool >= maxCool) {
|
if(tanks[0].getFill() >= tanks[0].getMaxFill()) {
|
||||||
cooldown = false;
|
cooldown = false;
|
||||||
cool = maxCool;
|
tanks[0].setFill(tanks[0].getMaxFill());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -291,38 +299,38 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
boolean isWorking = false;
|
boolean isWorking = false;
|
||||||
|
|
||||||
if(i == 1 && amat - 750 >= 0 && aSchrab - 750 >= 0) {
|
if(i == 1 && tanks[1].getFill() - 750 >= 0 && tanks[2].getFill() - 750 >= 0) {
|
||||||
cool -= 150;
|
tanks[0].setFill(tanks[0].getFill() - 150);
|
||||||
amat -= 750;
|
tanks[1].setFill(tanks[1].getFill() - 750);
|
||||||
aSchrab -= 750;
|
tanks[2].setFill(tanks[2].getFill() - 750);
|
||||||
power += 500000;
|
power += 500000;
|
||||||
isWorking = true;
|
isWorking = true;
|
||||||
}
|
}
|
||||||
if(i == 2 && amat - 750 >= 0 && aSchrab - 350 >= 0) {
|
if(i == 2 && tanks[1].getFill() - 750 >= 0 && tanks[2].getFill() - 350 >= 0) {
|
||||||
cool -= 75;
|
tanks[0].setFill(tanks[0].getFill() - 75);
|
||||||
amat -= 350;
|
tanks[1].setFill(tanks[1].getFill() - 350);
|
||||||
aSchrab -= 300;
|
tanks[2].setFill(tanks[2].getFill() - 300);
|
||||||
power += 250000;
|
power += 250000;
|
||||||
isWorking = true;
|
isWorking = true;
|
||||||
}
|
}
|
||||||
if(i == 3 && amat - 750 >= 0 && aSchrab - 1400 >= 0) {
|
if(i == 3 && tanks[1].getFill() - 750 >= 0 && tanks[2].getFill() - 1400 >= 0) {
|
||||||
cool -= 300;
|
tanks[0].setFill(tanks[0].getFill() - 300);
|
||||||
amat -= 750;
|
tanks[1].setFill(tanks[1].getFill() - 750);
|
||||||
aSchrab -= 1400;
|
tanks[2].setFill(tanks[2].getFill() - 1400);
|
||||||
power += 1000000;
|
power += 1000000;
|
||||||
isWorking = true;
|
isWorking = true;
|
||||||
}
|
}
|
||||||
if(i == 4 && amat - 1000 >= 0 && aSchrab - 1000 >= 0) {
|
if(i == 4 && tanks[1].getFill() - 1000 >= 0 && tanks[2].getFill() - 1000 >= 0) {
|
||||||
cool -= 100;
|
tanks[0].setFill(tanks[0].getFill() - 100);
|
||||||
amat -= 1000;
|
tanks[1].setFill(tanks[1].getFill() - 1000);
|
||||||
aSchrab -= 1000;
|
tanks[2].setFill(tanks[2].getFill() - 1000);
|
||||||
power += 1000000;
|
power += 1000000;
|
||||||
isWorking = true;
|
isWorking = true;
|
||||||
}
|
}
|
||||||
if(i == 5 && amat - 150 >= 0 && aSchrab - 150 >= 0) {
|
if(i == 5 && tanks[1].getFill() - 150 >= 0 && tanks[2].getFill() - 150 >= 0) {
|
||||||
cool -= 150;
|
tanks[0].setFill(tanks[0].getFill() - 150);
|
||||||
amat -= 150;
|
tanks[1].setFill(tanks[1].getFill() - 150);
|
||||||
aSchrab -= 150;
|
tanks[2].setFill(tanks[2].getFill() - 150);
|
||||||
power += 10000000;
|
power += 10000000;
|
||||||
isWorking = true;
|
isWorking = true;
|
||||||
}
|
}
|
||||||
@ -330,9 +338,9 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
if(power > maxPower)
|
if(power > maxPower)
|
||||||
power = maxPower;
|
power = maxPower;
|
||||||
|
|
||||||
if(cool <= 0) {
|
if(tanks[0].getFill() <= 0) {
|
||||||
cooldown = true;
|
cooldown = true;
|
||||||
cool = 0;
|
tanks[0].setFill(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,41 +350,20 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
||||||
|
|
||||||
|
tanks[1].loadTank(3, 5, slots);
|
||||||
|
tanks[2].loadTank(4, 6, slots);
|
||||||
|
|
||||||
if(amat + 1000000 <= maxAmat && slots[3] != null && slots[3].getItem() == ModItems.cell_antimatter)
|
for(int i = 0; i < 3; i++)
|
||||||
{
|
tanks[i].updateTank(xCoord, yCoord, zCoord);
|
||||||
this.slots[3].stackSize--;
|
|
||||||
this.amat += 1000000;
|
|
||||||
if(this.slots[3].stackSize == 0)
|
|
||||||
{
|
|
||||||
this.slots[3] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(aSchrab + 1000000 <= maxASchrab && slots[4] != null && slots[4].getItem() == ModItems.cell_anti_schrabidium)
|
|
||||||
{
|
|
||||||
this.slots[4].stackSize--;
|
|
||||||
this.aSchrab += 1000000;
|
|
||||||
if(this.slots[4].stackSize == 0)
|
|
||||||
{
|
|
||||||
this.slots[4] = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(slots[3] != null && slots[3].getItem() == ModItems.inf_antimatter)
|
if(this.isRunning() && (tanks[1].getFill() <= 0 || tanks[2].getFill() <= 0 || !hasFuse() || getSingularityType() == 0) || cooldown || !this.isStructureValid(worldObj))
|
||||||
{
|
|
||||||
this.amat = maxAmat;
|
|
||||||
}
|
|
||||||
if(slots[4] != null && slots[4].getItem() == ModItems.inf_antischrabidium)
|
|
||||||
{
|
|
||||||
this.aSchrab = maxASchrab;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.isRunning() && (amat <= 0 || aSchrab <= 0 || !hasFuse() || getSingularityType() == 0) || cooldown || !this.isStructureValid(worldObj))
|
|
||||||
this.emptyPlasma();
|
this.emptyPlasma();
|
||||||
|
|
||||||
if(!this.isRunning() && amat >= 1000 && aSchrab >= 1000 && hasFuse() && getSingularityType() > 0 && !cooldown && this.isStructureValid(worldObj))
|
if(!this.isRunning() && tanks[1].getFill() >= 1000 && tanks[2].getFill() >= 1000 && hasFuse() && getSingularityType() > 0 && !cooldown && this.isStructureValid(worldObj))
|
||||||
this.fillPlasma();
|
this.fillPlasma();
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fillPlasma() {
|
public void fillPlasma() {
|
||||||
@ -436,4 +423,44 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
public void clearList() {
|
public void clearList() {
|
||||||
this.list.clear();
|
this.list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFillstate(int fill, int index) {
|
||||||
|
if(index < 3 && tanks[index] != null)
|
||||||
|
tanks[index].setFill(fill);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setType(FluidType type, int index) {
|
||||||
|
if(index < 3 && tanks[index] != null)
|
||||||
|
tanks[index].setTankType(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setAFluidFill(int i, FluidType type) {
|
||||||
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
tanks[1].setFill(i);
|
||||||
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
tanks[2].setFill(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getAFluidFill(FluidType type) {
|
||||||
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
return tanks[1].getFill();
|
||||||
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
return tanks[2].getFill();
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxAFluidFill(FluidType type) {
|
||||||
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
return tanks[1].getMaxFill();
|
||||||
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
return tanks[2].getMaxFill();
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.hbm.interfaces.ISource;
|
|||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -1078,6 +1080,8 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.items.tool.ItemAssemblyTemplate;
|
import com.hbm.items.tool.ItemAssemblyTemplate;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEAssemblerPacket;
|
import com.hbm.packet.TEAssemblerPacket;
|
||||||
@ -375,6 +376,7 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
|
|||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
PacketDispatcher.wrapper.sendToAll(new TEAssemblerPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
||||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.hbm.interfaces.IConsumer;
|
|||||||
import com.hbm.interfaces.ISource;
|
import com.hbm.interfaces.ISource;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
@ -224,44 +226,12 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
|||||||
ffgeuaInit();
|
ffgeuaInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
||||||
|
|
||||||
/*if(slots[0] != null && slots[0].getItem() == ModItems.battery_creative)
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
{
|
|
||||||
power = maxPower;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_generic && slots[0].getItemDamage() < 50)
|
|
||||||
{
|
|
||||||
power += 100;
|
|
||||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_advanced && slots[0].getItemDamage() < 200)
|
|
||||||
{
|
|
||||||
power += 100;
|
|
||||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.battery_schrabidium && slots[0].getItemDamage() < 10000)
|
|
||||||
{
|
|
||||||
power += 100;
|
|
||||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.fusion_core && slots[0].getItemDamage() < 5000)
|
|
||||||
{
|
|
||||||
power += 100;
|
|
||||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(power + 100 <= maxPower && slots[0] != null && slots[0].getItem() == ModItems.energy_core && slots[0].getItemDamage() < 5000)
|
|
||||||
{
|
|
||||||
power += 100;
|
|
||||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
@ -296,6 +298,8 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
|||||||
} else {
|
} else {
|
||||||
process = 0;
|
process = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import com.hbm.items.special.ItemBattery;
|
|||||||
import com.hbm.items.tool.ItemAssemblyTemplate;
|
import com.hbm.items.tool.ItemAssemblyTemplate;
|
||||||
import com.hbm.items.tool.ItemChemistryTemplate;
|
import com.hbm.items.tool.ItemChemistryTemplate;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEAssemblerPacket;
|
import com.hbm.packet.TEAssemblerPacket;
|
||||||
@ -434,6 +435,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
PacketDispatcher.wrapper.sendToAll(new TEChemplantPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
||||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
||||||
|
|
||||||
@ -253,6 +255,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
|||||||
flag1 = true;
|
flag1 = true;
|
||||||
MachineCoal.updateBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
MachineCoal.updateBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||||
}
|
}
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
generate();
|
generate();
|
||||||
|
|||||||
@ -17,6 +17,8 @@ import com.hbm.inventory.MachineRecipes;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -318,6 +320,7 @@ public class TileEntityMachineCyclotron extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 9, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 9, power, maxPower);
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -228,6 +230,8 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
|||||||
power = Library.chargeItemsFromTE(slots, 2, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 2, power, maxPower);
|
||||||
|
|
||||||
generate();
|
generate();
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import com.hbm.blocks.machine.MachineElectricFurnace;
|
|||||||
import com.hbm.interfaces.IConsumer;
|
import com.hbm.interfaces.IConsumer;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
@ -300,11 +302,14 @@ public class TileEntityMachineElectricFurnace extends TileEntity implements ISid
|
|||||||
{
|
{
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
MachineElectricFurnace.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
MachineElectricFurnace.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(flag1)
|
if(flag1)
|
||||||
{
|
{
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -239,6 +241,8 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 0, power, maxPower);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.items.special.ItemFuelRod;
|
import com.hbm.items.special.ItemFuelRod;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -486,6 +488,8 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
if(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord) instanceof MachineGenerator)
|
if(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord) instanceof MachineGenerator)
|
||||||
this.isLoaded = true;
|
this.isLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.interfaces.IConsumer;
|
|||||||
import com.hbm.interfaces.ISource;
|
import com.hbm.interfaces.ISource;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEIGeneratorPacket;
|
import com.hbm.packet.TEIGeneratorPacket;
|
||||||
@ -304,6 +305,7 @@ public class TileEntityMachineIGenerator extends TileEntity implements ISidedInv
|
|||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEIGeneratorPacket(xCoord, yCoord, zCoord, rotation, torque));
|
PacketDispatcher.wrapper.sendToAll(new TEIGeneratorPacket(xCoord, yCoord, zCoord, rotation, torque));
|
||||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.hbm.interfaces.IConsumer;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEDrillPacket;
|
import com.hbm.packet.TEDrillPacket;
|
||||||
@ -430,6 +431,22 @@ public class TileEntityMachineMiningDrill extends TileEntity implements ISidedIn
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(te != null && te instanceof TileEntityCrateIron) {
|
||||||
|
TileEntityCrateIron hopper = (TileEntityCrateIron)te;
|
||||||
|
|
||||||
|
for(int i = 1; i < 10; i++)
|
||||||
|
if(tryFillContainer(hopper, i))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te != null && te instanceof TileEntityCrateSteel) {
|
||||||
|
TileEntityCrateSteel hopper = (TileEntityCrateSteel)te;
|
||||||
|
|
||||||
|
for(int i = 1; i < 10; i++)
|
||||||
|
if(tryFillContainer(hopper, i))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(warning == 0) {
|
if(warning == 0) {
|
||||||
torque += 0.1;
|
torque += 0.1;
|
||||||
if(torque > (100/timer))
|
if(torque > (100/timer))
|
||||||
@ -448,8 +465,8 @@ public class TileEntityMachineMiningDrill extends TileEntity implements ISidedIn
|
|||||||
rotation -= 360;
|
rotation -= 360;
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEDrillPacket(xCoord, yCoord, zCoord, rotation));
|
PacketDispatcher.wrapper.sendToAll(new TEDrillPacket(xCoord, yCoord, zCoord, rotation));
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEDrillSoundPacket(xCoord, yCoord, zCoord, torque));
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -340,6 +342,8 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
warning2 = 1;
|
warning2 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEAssemblerPacket;
|
import com.hbm.packet.TEAssemblerPacket;
|
||||||
import com.hbm.packet.TEPumpjackPacket;
|
import com.hbm.packet.TEPumpjackPacket;
|
||||||
@ -345,6 +346,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
rotation = rotation % 360;
|
rotation = rotation % 360;
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new TEPumpjackPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
PacketDispatcher.wrapper.sendToAll(new TEPumpjackPacket(xCoord, yCoord, zCoord, rotation, isProgressing));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.hbm.interfaces.IConsumer;
|
|||||||
import com.hbm.interfaces.ISource;
|
import com.hbm.interfaces.ISource;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
@ -231,6 +233,8 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
|
|||||||
power += heat;
|
power += heat;
|
||||||
if(power > powerMax)
|
if(power > powerMax)
|
||||||
power = powerMax;
|
power = powerMax;
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -305,6 +307,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
sulfur -= maxSulfur;
|
sulfur -= maxSulfur;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.hbm.interfaces.IConsumer;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
@ -277,6 +279,8 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntity impleme
|
|||||||
} else {
|
} else {
|
||||||
process = 0;
|
process = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import com.hbm.inventory.MachineRecipes;
|
|||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.items.special.ItemBlades;
|
import com.hbm.items.special.ItemBlades;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
@ -251,6 +253,8 @@ public class TileEntityMachineShredder extends TileEntity implements ISidedInven
|
|||||||
|
|
||||||
power = Library.chargeTEFromItems(slots, 29, power, maxPower);
|
power = Library.chargeTEFromItems(slots, 29, power, maxPower);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
|
|
||||||
if(flag1)
|
if(flag1)
|
||||||
{
|
{
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.TEIGeneratorPacket;
|
import com.hbm.packet.TEIGeneratorPacket;
|
||||||
@ -482,6 +483,7 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
|||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
PacketDispatcher.wrapper.sendToAll(new TETurbofanPacket(xCoord, yCoord, zCoord, spin, isRunning));
|
PacketDispatcher.wrapper.sendToAll(new TETurbofanPacket(xCoord, yCoord, zCoord, spin, isRunning));
|
||||||
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
PacketDispatcher.wrapper.sendToAll(new LoopedSoundPacket(xCoord, yCoord, zCoord));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,8 @@ import com.hbm.inventory.FluidTank;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemFuelRod;
|
import com.hbm.items.special.ItemFuelRod;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@ -516,8 +518,9 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Batteries
|
//Batteries
|
||||||
|
|
||||||
power = Library.chargeItemsFromTE(slots, 34, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 34, power, maxPower);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.WatzFuel;
|
import com.hbm.items.special.WatzFuel;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -514,7 +516,7 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
if (this.isStructureValid(this.worldObj)) {
|
if (this.isStructureValid(this.worldObj) && !worldObj.isRemote) {
|
||||||
|
|
||||||
age++;
|
age++;
|
||||||
if (age >= 20) {
|
if (age >= 20) {
|
||||||
@ -590,6 +592,8 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user