leftovers from last week's shit buffet
@ -29,7 +29,7 @@ public class GUIMachineArcWelder extends GuiInfoContainer {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
welder.tank.renderTankInfo(this, x, y, guiLeft + 35, guiTop + 63, 34, 16);
|
||||
this.drawElectricityInfo(this, x, y, guiLeft + 152, guiTop + 18, 16, 52, welder.power, welder.maxPower);
|
||||
this.drawElectricityInfo(this, x, y, guiLeft + 152, guiTop + 18, 16, 52, welder.getPower(), welder.getMaxPower());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -32,6 +32,8 @@ public class GUIMachineWoodBurner extends GuiInfoContainer {
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 143, guiTop + 18, 16, 34, burner.power, burner.maxPower);
|
||||
|
||||
if(burner.liquidBurn) burner.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 70, guiTop + 28, 34, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -75,5 +77,10 @@ public class GUIMachineWoodBurner extends GuiInfoContainer {
|
||||
if(burner.isOn) {
|
||||
drawTexturedModalRect(guiLeft + 53, guiTop + 17, 196, 0, 16, 15);
|
||||
}
|
||||
|
||||
int p = (int) (burner.power * 34 / burner.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 143, guiTop + 52 - p, 176, 52 - p, 16, p);
|
||||
|
||||
if(burner.liquidBurn) burner.tank.renderTank(guiLeft + 70, guiTop + 80, this.zLevel, 34, 52);
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.power = Library.chargeTEFromItems(slots, 4, power, maxPower);
|
||||
this.power = Library.chargeTEFromItems(slots, 4, this.getPower(), this.getMaxPower());
|
||||
this.tank.setType(5, slots);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
@ -230,7 +230,7 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
return Math.max(Math.min(power, maxPower), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerMachineWoodBurner;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Flammable;
|
||||
import com.hbm.inventory.gui.GUIMachineWoodBurner;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.module.ModuleBurnTime;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachinePolluting;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -19,7 +22,7 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting implements IFluidStandardTransceiver, IControlReceiver, IGUIProvider {
|
||||
public class TileEntityMachineWoodBurner extends TileEntityMachineBase implements IFluidStandardReceiver, IControlReceiver, IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100_000;
|
||||
@ -37,7 +40,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting impl
|
||||
public int ashLevelMisc;
|
||||
|
||||
public TileEntityMachineWoodBurner() {
|
||||
super(6, 60);
|
||||
super(6);
|
||||
this.tank = new FluidTank(Fluids.WOODOIL, 16_000);
|
||||
}
|
||||
|
||||
@ -51,6 +54,10 @@ public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting impl
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.tank.setType(2, slots);
|
||||
this.tank.loadTank(3, 4, slots);
|
||||
this.power = Library.chargeItemsFromTE(slots, 5, power, maxPower);
|
||||
|
||||
if(!liquidBurn) {
|
||||
|
||||
if(this.burnTime <= 0) {
|
||||
@ -68,6 +75,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting impl
|
||||
this.burnTime--;
|
||||
this.power += 100;
|
||||
if(power > maxPower) this.power = this.maxPower;
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -78,6 +86,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting impl
|
||||
if(trait != null) {
|
||||
this.power += trait.getHeatEnergy() / 2L;
|
||||
tank.setFill(tank.getFill() - 1);
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -131,12 +140,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachinePolluting impl
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[] {tank, smoke, smoke_leaded, smoke_poison};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return this.getSmokeTanks();
|
||||
return new FluidTank[] {tank};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/blocks/stone_keyhole.png
Normal file
|
After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 219 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 261 B |