mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
-Fixed a potential Bug with full machines not showing they're full
This commit is contained in:
parent
ed1d09148c
commit
b8171f20b8
26 changed files with 48 additions and 53 deletions
|
@ -16,7 +16,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@InventoryContainer
|
||||
|
@ -53,7 +52,7 @@ public class ContainerCanolaPress extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.press.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.press.storage.getEnergyStored());
|
||||
iCraft.sendProgressBarUpdate(this, 1, this.press.tank.getFluidAmount());
|
||||
iCraft.sendProgressBarUpdate(this, 2, this.press.currentProcessTime);
|
||||
}
|
||||
|
@ -64,12 +63,12 @@ public class ContainerCanolaPress extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergyStored != this.press.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.press.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.press.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.press.storage.getEnergyStored());
|
||||
if(this.lastTankAmount != this.press.tank.getFluidAmount()) iCraft.sendProgressBarUpdate(this, 1, this.press.tank.getFluidAmount());
|
||||
if(this.lastProcessTime != this.press.currentProcessTime) iCraft.sendProgressBarUpdate(this, 2, this.press.currentProcessTime);
|
||||
}
|
||||
|
||||
this.lastEnergyStored = this.press.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergyStored = this.press.storage.getEnergyStored();
|
||||
this.lastTankAmount = this.press.tank.getFluidAmount();
|
||||
this.lastProcessTime = this.press.currentProcessTime;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.inventory.ICrafting;
|
|||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerCoalGenerator extends Container{
|
||||
|
@ -46,7 +45,7 @@ public class ContainerCoalGenerator extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.generator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.generator.storage.getEnergyStored());
|
||||
iCraft.sendProgressBarUpdate(this, 1, this.generator.currentBurnTime);
|
||||
iCraft.sendProgressBarUpdate(this, 2, this.generator.maxBurnTime);
|
||||
}
|
||||
|
@ -57,12 +56,12 @@ public class ContainerCoalGenerator extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergyStored != this.generator.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.generator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.generator.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.generator.storage.getEnergyStored());
|
||||
if(this.lastBurnTime != this.generator.currentBurnTime) iCraft.sendProgressBarUpdate(this, 1, this.generator.currentBurnTime);
|
||||
if(this.lastMaxBurnTime != this.generator.maxBurnTime) iCraft.sendProgressBarUpdate(this, 2, this.generator.maxBurnTime);
|
||||
}
|
||||
|
||||
this.lastEnergyStored = this.generator.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergyStored = this.generator.storage.getEnergyStored();
|
||||
this.lastBurnTime = this.generator.currentBurnTime;
|
||||
this.lastMaxBurnTime = this.generator.maxBurnTime;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerEnergizer extends Container{
|
||||
|
@ -46,7 +45,7 @@ public class ContainerEnergizer extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.energizer.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.energizer.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,10 +54,10 @@ public class ContainerEnergizer extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergyStored != this.energizer.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.energizer.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.energizer.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.energizer.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
this.lastEnergyStored = this.energizer.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergyStored = this.energizer.storage.getEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerEnervator extends Container{
|
||||
|
@ -46,7 +45,7 @@ public class ContainerEnervator extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.enervator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.enervator.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,10 +54,10 @@ public class ContainerEnervator extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergyStored != this.enervator.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.enervator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.enervator.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.enervator.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
this.lastEnergyStored = this.enervator.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergyStored = this.enervator.storage.getEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerGrinder extends Container{
|
||||
|
@ -54,8 +53,8 @@ public class ContainerGrinder extends Container{
|
|||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.tileGrinder.firstCrushTime);
|
||||
iCraft.sendProgressBarUpdate(this, 1, this.tileGrinder.maxCrushTime);
|
||||
if(this.isDouble) iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.secondCrushTime);
|
||||
iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.storage.getEnergyStored());
|
||||
if(this.isDouble) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.secondCrushTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,14 +65,14 @@ public class ContainerGrinder extends Container{
|
|||
|
||||
if(this.lastFirstCrushTime != this.tileGrinder.firstCrushTime) iCraft.sendProgressBarUpdate(this, 0, this.tileGrinder.firstCrushTime);
|
||||
if(this.lastMaxCrushTime != this.tileGrinder.maxCrushTime) iCraft.sendProgressBarUpdate(this, 1, this.tileGrinder.maxCrushTime);
|
||||
if(this.isDouble) if(this.lastSecondCrushTime != this.tileGrinder.secondCrushTime) iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.secondCrushTime);
|
||||
if(this.lastEnergyStored != this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.tileGrinder.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.storage.getEnergyStored());
|
||||
if(this.isDouble) if(this.lastSecondCrushTime != this.tileGrinder.secondCrushTime) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.secondCrushTime);
|
||||
}
|
||||
|
||||
this.lastFirstCrushTime = this.tileGrinder.firstCrushTime;
|
||||
this.lastMaxCrushTime = this.tileGrinder.maxCrushTime;
|
||||
this.lastEnergyStored = this.tileGrinder.storage.getEnergyStored();
|
||||
if(this.isDouble) this.lastSecondCrushTime = this.tileGrinder.secondCrushTime;
|
||||
this.lastEnergyStored = this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,8 +80,8 @@ public class ContainerGrinder extends Container{
|
|||
public void updateProgressBar(int par1, int par2){
|
||||
if(par1 == 0) this.tileGrinder.firstCrushTime = par2;
|
||||
if(par1 == 1) this.tileGrinder.maxCrushTime = par2;
|
||||
if(this.isDouble && par1 == 2) this.tileGrinder.secondCrushTime = par2;
|
||||
if(par1 == 3) this.tileGrinder.storage.setEnergyStored(par2);
|
||||
if(par1 == 2) this.tileGrinder.storage.setEnergyStored(par2);
|
||||
if(this.isDouble && par1 == 3) this.tileGrinder.secondCrushTime = par2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
|
@ -50,7 +49,7 @@ public class ContainerOilGenerator extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.generator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.generator.storage.getEnergyStored());
|
||||
iCraft.sendProgressBarUpdate(this, 1, this.generator.currentBurnTime);
|
||||
iCraft.sendProgressBarUpdate(this, 2, this.generator.tank.getFluidAmount());
|
||||
}
|
||||
|
@ -61,12 +60,12 @@ public class ContainerOilGenerator extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergyStored != this.generator.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.generator.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergyStored != this.generator.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.generator.storage.getEnergyStored());
|
||||
if(this.lastBurnTime != this.generator.currentBurnTime) iCraft.sendProgressBarUpdate(this, 1, this.generator.currentBurnTime);
|
||||
if(this.lastTankAmount != this.generator.tank.getFluidAmount()) iCraft.sendProgressBarUpdate(this, 2, this.generator.tank.getFluidAmount());
|
||||
}
|
||||
|
||||
this.lastEnergyStored = this.generator.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergyStored = this.generator.storage.getEnergyStored();
|
||||
this.lastBurnTime = this.generator.currentBurnTime;
|
||||
this.lastTankAmount = this.generator.tank.getFluidAmount();
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerRepairer extends Container{
|
||||
|
@ -40,7 +39,7 @@ public class ContainerRepairer extends Container{
|
|||
@Override
|
||||
public void addCraftingToCrafters(ICrafting iCraft){
|
||||
super.addCraftingToCrafters(iCraft);
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
iCraft.sendProgressBarUpdate(this, 0, this.tileRepairer.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,10 +48,10 @@ public class ContainerRepairer extends Container{
|
|||
for(Object crafter : this.crafters){
|
||||
ICrafting iCraft = (ICrafting)crafter;
|
||||
|
||||
if(this.lastEnergy != this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 0, this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN));
|
||||
if(this.lastEnergy != this.tileRepairer.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 0, this.tileRepairer.storage.getEnergyStored());
|
||||
}
|
||||
|
||||
this.lastEnergy = this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN);
|
||||
this.lastEnergy = this.tileRepairer.storage.getEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,7 +63,7 @@ public class GuiCanolaPress extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.press.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.press.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.press.storage.getEnergyStored() + "/" + this.press.storage.getEnergyStored() + " RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class GuiCoalGenerator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.generator.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.generator.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.generator.storage.getEnergyStored() + "/" + this.generator.storage.getMaxEnergyStored() + " RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public class GuiCoffeeMachine extends GuiContainer{
|
|||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
String text1 = this.machine.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.machine.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.machine.storage.getEnergyStored() + "/" + this.machine.storage.getEnergyStored() + " RF";
|
||||
if(x >= guiLeft+16 && y >= guiTop+5 && x <= guiLeft+23 && y <= guiTop+89){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GuiEnergizer extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.energizer.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.energizer.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.energizer.storage.getEnergyStored() + "/" + this.energizer.storage.getEnergyStored() + " RF";
|
||||
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GuiEnervator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.enervator.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.enervator.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.enervator.storage.getEnergyStored() + "/" + this.enervator.storage.getMaxEnergyStored() + " RF";
|
||||
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class GuiFurnaceDouble extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.tileFurnace.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text = this.tileFurnace.storage.getEnergyStored() + "/" + this.tileFurnace.storage.getEnergyStored() + " RF";
|
||||
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public class GuiGrinder extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.tileGrinder.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text = this.tileGrinder.storage.getEnergyStored() + "/" + this.tileGrinder.storage.getEnergyStored() + " RF";
|
||||
if((this.isDouble && x >= guiLeft+14 && y >= guiTop+6 && x <= guiLeft+29 && y <= guiTop+88) || (!this.isDouble && x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88)){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class GuiOilGenerator extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text1 = this.generator.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.generator.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text1 = this.generator.storage.getEnergyStored() + "/" + this.generator.storage.getMaxEnergyStored() + " RF";
|
||||
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text1), x, y);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiRepairer extends GuiContainer{
|
|||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
String text = this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN) + "/" + this.tileRepairer.getMaxEnergyStored(ForgeDirection.UNKNOWN) + " RF";
|
||||
String text = this.tileRepairer.storage.getEnergyStored() + "/" + this.tileRepairer.storage.getEnergyStored() + " RF";
|
||||
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
|
||||
this.func_146283_a(Collections.singletonList(text), x, y);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,6 +55,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
|
|||
}
|
||||
|
||||
if(flag != this.currentBurnTime > 0){
|
||||
this.markDirty();
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
if(meta == 1){
|
||||
if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && energyProducedPerTick*TileEntityFurnace.getItemBurnTime(this.slots[0]) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)))
|
||||
|
@ -67,7 +68,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -109,7 +109,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -59,7 +59,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -79,7 +79,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -65,6 +65,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
if(this.storage.getEnergyStored() >= energyUsePerTick && this.firstSmeltTime > 0 || this.secondSmeltTime > 0) this.storage.extractEnergy(energyUsePerTick, false);
|
||||
|
||||
if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){
|
||||
this.markDirty();
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
if(meta > 3){
|
||||
if(!this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1) && !this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2)) worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta-4, 2);
|
||||
|
@ -116,7 +117,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -111,6 +111,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
if(this.storage.getEnergyStored() >= energyUsePerTick && this.firstCrushTime > 0 || this.secondCrushTime > 0) this.storage.extractEnergy(energyUsePerTick, false);
|
||||
|
||||
if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){
|
||||
this.markDirty();
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
if(meta == 1){
|
||||
if(!this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2) && (!this.isDouble || !this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2))) worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2);
|
||||
|
@ -174,7 +175,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -71,7 +71,7 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -59,6 +59,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
|
|||
}
|
||||
|
||||
if(flag != this.currentBurnTime > 0){
|
||||
this.markDirty();
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
if(meta == 1){
|
||||
if(!(energyProducedPerTick*this.maxBurnTime <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN) && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()))
|
||||
|
@ -71,7 +72,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getEnergyScaled(int i){
|
||||
return this.getEnergyStored(ForgeDirection.UNKNOWN) * i / this.getMaxEnergyStored(ForgeDirection.UNKNOWN);
|
||||
return this.storage.getEnergyStored() * i / this.storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -18,8 +18,6 @@ public class Util{
|
|||
}
|
||||
|
||||
public static void registerDispenserHandler(Item item, BehaviorDefaultDispenseItem handler){
|
||||
if(BlockDispenser.dispenseBehaviorRegistry.getObject(item) == null){
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
|
||||
}
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue