Fixes due to PowerAcceptorBE changes.
This commit is contained in:
parent
09d9d6e7ea
commit
df974ef5da
54 changed files with 79 additions and 100 deletions
|
@ -56,6 +56,6 @@ public class DataDrivenGui extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
|
@ -134,12 +134,9 @@ public abstract class BaseFluidGeneratorBlockEntity extends PowerAcceptorBlockEn
|
|||
}
|
||||
|
||||
protected boolean tryAddingEnergy(int amount) {
|
||||
if (getMaxPower() - getEnergy() >= amount) {
|
||||
if (getFreeSpace() > 0) {
|
||||
addEnergy(amount);
|
||||
return true;
|
||||
} else if (getMaxPower() - getEnergy() > 0) {
|
||||
addEnergy(getMaxPower() - getEnergy());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -233,7 +233,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
.formatted(Formatting.GRAY)
|
||||
.append(": ")
|
||||
.append(
|
||||
new LiteralText(PowerSystem.getLocaliszedPowerFormatted(getMaxPower()))
|
||||
new LiteralText(PowerSystem.getLocaliszedPowerFormatted(getMaxStoredPower()))
|
||||
.formatted(Formatting.GOLD)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -49,13 +49,11 @@ public class DragonEggSyphonBlockEntity extends PowerAcceptorBlockEntity
|
|||
}
|
||||
|
||||
private boolean tryAddingEnergy(int amount) {
|
||||
if (this.getMaxPower() - this.getEnergy() >= amount) {
|
||||
if (getFreeSpace() > 0) {
|
||||
addEnergy(amount);
|
||||
return true;
|
||||
} else if (this.getMaxPower() - this.getEnergy() > 0) {
|
||||
addEnergy(this.getMaxPower() - this.getEnergy());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity impl
|
|||
return;
|
||||
}
|
||||
discharge(1);
|
||||
if (getEnergy() < getMaxPower()) {
|
||||
if (getEnergy() < getMaxStoredPower()) {
|
||||
if (burnTime > 0) {
|
||||
burnTime--;
|
||||
addEnergy(TechRebornConfig.solidFuelGeneratorOutputAmount);
|
||||
|
@ -118,7 +118,7 @@ public class SolidFuelGeneratorBlockEntity extends PowerAcceptorBlockEntity impl
|
|||
final BlockState BlockStateContainer = world.getBlockState(pos);
|
||||
if (BlockStateContainer.getBlock() instanceof BlockMachineBase) {
|
||||
final BlockMachineBase blockMachineBase = (BlockMachineBase) BlockStateContainer.getBlock();
|
||||
boolean active = burnTime > 0 && getEnergy() < getMaxPower();
|
||||
boolean active = burnTime > 0 && getFreeSpace() > 0.0f;
|
||||
if (BlockStateContainer.get(BlockMachineBase.ACTIVE) != active) {
|
||||
blockMachineBase.setActive(active, world, pos);
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import reborncore.common.util.RebornInventory;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import reborncore.common.util.Torus;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.api.recipe.recipes.FusionReactorRecipe;
|
||||
import techreborn.blockentity.machine.GenericMachineBlockEntity;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -240,7 +241,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
|
||||
if (!hasStartedCrafting) {
|
||||
// Ignition!
|
||||
if (canUseEnergy(currentRecipe.getStartEnergy())) {
|
||||
if (getStored(EnergySide.UNKNOWN) > currentRecipe.getStartEnergy()) {
|
||||
useEnergy(currentRecipe.getStartEnergy());
|
||||
hasStartedCrafting = true;
|
||||
useInput(topStackSlot);
|
||||
|
@ -256,7 +257,7 @@ public class FusionControlComputerBlockEntity extends GenericMachineBlockEntity
|
|||
powerChange = (power);
|
||||
crafingTickTime++;
|
||||
} else { // Power user
|
||||
if (canUseEnergy(currentRecipe.getPower())) {
|
||||
if (getStored(EnergySide.UNKNOWN) > currentRecipe.getPower()) {
|
||||
setEnergy(getEnergy() - currentRecipe.getPower());
|
||||
crafingTickTime++;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
|||
import reborncore.common.recipes.ExtendedRecipeRemainder;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.ModSounds;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
|
@ -265,7 +266,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
|
|||
}
|
||||
} else {
|
||||
if (canMake(recipe)) {
|
||||
if (canUseEnergy(euTick)) {
|
||||
if (getStored(EnergySide.UNKNOWN) > euTick) {
|
||||
progress++;
|
||||
if (progress == 1) {
|
||||
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.AUTO_CRAFTING,
|
||||
|
|
|
@ -40,6 +40,7 @@ import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
|||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
@ -218,7 +219,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
craftRecipe(currentRecipe);
|
||||
updateCurrentRecipe();
|
||||
} else if (cookTime < cookTimeTotal) {
|
||||
if (canUseEnergy(getEuPerTick(EnergyPerTick))) {
|
||||
if (getStored(EnergySide.UNKNOWN) > getEuPerTick(EnergyPerTick)) {
|
||||
useEnergy(getEuPerTick(EnergyPerTick));
|
||||
cookTime++;
|
||||
if (cookTime == 1 || cookTime % 20 == 0 && RecipeCrafter.soundHanlder != null) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import reborncore.common.blockentity.MultiblockWriter;
|
|||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.blocks.lighting.LampBlock;
|
||||
import techreborn.blocks.misc.BlockRubberLog;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -76,7 +77,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
|| block instanceof SugarCaneBlock
|
||||
|| block instanceof CactusBlock
|
||||
) {
|
||||
if (canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerBonemeal)) {
|
||||
if (getStored(EnergySide.UNKNOWN) > TechRebornConfig.greenhouseControllerEnergyPerBonemeal) {
|
||||
useEnergy(TechRebornConfig.greenhouseControllerEnergyPerBonemeal);
|
||||
blockState.scheduledTick((ServerWorld) world, blockPos, world.random);
|
||||
}
|
||||
|
@ -112,7 +113,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
} else if (block instanceof BlockRubberLog) {
|
||||
for (int y = 0; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block && y < 10; y++) {
|
||||
if (blockState.get(BlockRubberLog.HAS_SAP)
|
||||
&& canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest)
|
||||
&& (getStored(EnergySide.UNKNOWN) > TechRebornConfig.greenhouseControllerEnergyPerHarvest)
|
||||
&& insertIntoInv(Collections.singletonList(TRContent.Parts.SAP.getStack()))
|
||||
) {
|
||||
useEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest);
|
||||
|
@ -138,7 +139,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
if (!canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest)){
|
||||
if (getStored(EnergySide.UNKNOWN) < TechRebornConfig.greenhouseControllerEnergyPerHarvest){
|
||||
return false;
|
||||
}
|
||||
if (insertIntoInv(Block.getDroppedStacks(blockState, (ServerWorld) world, blockPos, null))) {
|
||||
|
@ -195,7 +196,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
|||
return;
|
||||
}
|
||||
|
||||
if (useEnergy(getEuPerTick(TechRebornConfig.greenhouseControllerEnergyPerTick)) != getEuPerTick(TechRebornConfig.greenhouseControllerEnergyPerTick)) {
|
||||
if (getStored(EnergySide.UNKNOWN) < getEuPerTick(TechRebornConfig.greenhouseControllerEnergyPerTick)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import net.minecraft.util.math.Direction;
|
|||
import reborncore.api.IToolDrop;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.WorldUtils;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.blocks.machine.tier1.PlayerDetectorBlock;
|
||||
import techreborn.blocks.machine.tier1.PlayerDetectorBlock.PlayerDetectorType;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
|
@ -59,7 +60,7 @@ public class PlayerDectectorBlockEntity extends PowerAcceptorBlockEntity impleme
|
|||
if (!world.isClient && world.getTime() % 20 == 0) {
|
||||
boolean lastRedstone = redstone;
|
||||
redstone = false;
|
||||
if (canUseEnergy(TechRebornConfig.playerDetectorEuPerTick)) {
|
||||
if (getStored(EnergySide.UNKNOWN) > TechRebornConfig.playerDetectorEuPerTick) {
|
||||
for (PlayerEntity player : world.getPlayers()) {
|
||||
if (player.distanceTo(player) <= 256.0D) {
|
||||
PlayerDetectorType type = world.getBlockState(pos).get(PlayerDetectorBlock.TYPE);
|
||||
|
|
|
@ -40,6 +40,7 @@ import reborncore.common.blockentity.SlotConfiguration;
|
|||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
@ -106,7 +107,7 @@ public class RecyclerBlockEntity extends PowerAcceptorBlockEntity
|
|||
final BlockState BlockStateContainer = world.getBlockState(pos);
|
||||
if (BlockStateContainer.getBlock() instanceof BlockMachineBase) {
|
||||
final BlockMachineBase blockMachineBase = (BlockMachineBase) BlockStateContainer.getBlock();
|
||||
boolean shouldBurn = isBurning || (canRecycle() && canUseEnergy(getEuPerTick(cost)));
|
||||
boolean shouldBurn = isBurning || (canRecycle() && (getStored(EnergySide.UNKNOWN) > getEuPerTick(cost)));
|
||||
if (BlockStateContainer.get(BlockMachineBase.ACTIVE) != shouldBurn) {
|
||||
blockMachineBase.setActive(isBurning, world, pos);
|
||||
}
|
||||
|
@ -126,7 +127,7 @@ public class RecyclerBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (canRecycle() && !isBurning() && getEnergy() != 0) {
|
||||
setBurning(true);
|
||||
} else if (isBurning()) {
|
||||
if (useEnergy(getEuPerTick(cost)) != getEuPerTick(cost)) {
|
||||
if (getStored(EnergySide.UNKNOWN) < getEuPerTick(cost)) {
|
||||
this.setBurning(false);
|
||||
}
|
||||
progress++;
|
||||
|
|
|
@ -43,6 +43,7 @@ import reborncore.common.blocks.BlockMachineBase;
|
|||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.api.recipe.recipes.RollingMachineRecipe;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.ModRecipes;
|
||||
|
@ -160,7 +161,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
tickTime = 0;
|
||||
}
|
||||
if (!currentRecipeOutput.isEmpty()) {
|
||||
if (canUseEnergy(getEuPerTick(TechRebornConfig.rollingMachineEnergyPerTick))
|
||||
if (getStored(EnergySide.UNKNOWN) > getEuPerTick(TechRebornConfig.rollingMachineEnergyPerTick)
|
||||
&& tickTime < Math.max((int) (TechRebornConfig.rollingMachineRunTime * (1.0 - getSpeedMultiplier())), 1)
|
||||
&& canMake(craftMatrix)) {
|
||||
useEnergy(getEuPerTick(TechRebornConfig.rollingMachineEnergyPerTick));
|
||||
|
|
|
@ -35,6 +35,7 @@ import reborncore.client.screen.builder.ScreenHandlerBuilder;
|
|||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import team.reborn.energy.EnergySide;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
@ -134,7 +135,7 @@ public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (!stack.isEmpty() && spaceForOutput()) {
|
||||
final int amp = getValue(stack);
|
||||
final int euNeeded = amp * TechRebornConfig.matterFabricatorEnergyPerAmp;
|
||||
if (amp != 0 && this.canUseEnergy(euNeeded)) {
|
||||
if (amp != 0 && getStored(EnergySide.UNKNOWN) > euNeeded) {
|
||||
useEnergy(euNeeded);
|
||||
amplifier += amp;
|
||||
inventory.shrinkSlot(i, 1);
|
||||
|
|
|
@ -72,13 +72,7 @@ public class EnergyStorageBlockEntity extends PowerAcceptorBlockEntity
|
|||
return;
|
||||
}
|
||||
if (!inventory.getStack(0).isEmpty()) {
|
||||
ItemStack stack = inventory.getStack(0);
|
||||
|
||||
if (Energy.valid(stack)) {
|
||||
Energy.of(this)
|
||||
.into(Energy.of(stack))
|
||||
.move(tier.getMaxInput());
|
||||
}
|
||||
discharge(0);
|
||||
}
|
||||
if (!inventory.getStack(1).isEmpty()) {
|
||||
charge(1);
|
||||
|
|
|
@ -73,9 +73,9 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public double useEnergy(double extract, boolean simulate) {
|
||||
public void useEnergy(double extract) {
|
||||
if (ownerUdid == null || ownerUdid.isEmpty()) {
|
||||
return 0.0;
|
||||
return;
|
||||
}
|
||||
if (world.isClient) {
|
||||
throw new UnsupportedOperationException("cannot set energy on the client!");
|
||||
|
@ -84,21 +84,10 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
|
|||
if (extract > energy) {
|
||||
extract = energy;
|
||||
}
|
||||
if (!simulate) {
|
||||
setEnergy(energy - extract);
|
||||
}
|
||||
return extract;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUseEnergy(double input) {
|
||||
if (ownerUdid == null || ownerUdid.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
if (world.isClient) {
|
||||
throw new UnsupportedOperationException("cannot set energy on the client!");
|
||||
}
|
||||
return input <= IDSUManager.getPlayer(world, ownerUdid).getEnergy();
|
||||
setStored(energy - extract);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +114,7 @@ public class InterdimensionalSUBlockEntity extends EnergyStorageBlockEntity impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldHanldeEnergyNBT() {
|
||||
protected boolean shouldHandleEnergyNBT() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,8 +73,6 @@ public class TransformerBlockEntity extends PowerAcceptorBlockEntity
|
|||
this.maxOutput = tier.getMaxOutput();
|
||||
this.maxStorage = tier.getMaxInput() * 2;
|
||||
|
||||
// Should always be 4, except if we're tier MICRO, in which it will be 1.
|
||||
super.setMaxPacketsPerTick(tier.getMaxOutput() / ouputTier.getMaxInput());
|
||||
}
|
||||
|
||||
// TilePowerAcceptor
|
||||
|
@ -109,11 +107,6 @@ public class TransformerBlockEntity extends PowerAcceptorBlockEntity
|
|||
return inputTier.getMaxInput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyTier getPushingTier() {
|
||||
return ouputTier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTier() {
|
||||
//Nope
|
||||
|
|
|
@ -78,7 +78,7 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.scaled(0.6, 0.6, 1);
|
||||
Text text = new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()))
|
||||
.append("/")
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()))
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxStoredPower()))
|
||||
.append(" ")
|
||||
.append(PowerSystem.getDisplayPower().abbreviation);
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.popMatrix();
|
||||
}
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(int amount) {
|
||||
|
|
|
@ -62,6 +62,6 @@ public class GuiAlloySmelter extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,6 @@ public class GuiAssemblingMachine extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class GuiAutoCrafting extends GuiBase<BuiltScreenHandler> {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntityAutoCraftingTable.getProgress(), blockEntityAutoCraftingTable.getMaxProgress(), 120, 44, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 26, (int) blockEntityAutoCraftingTable.getEnergy(), (int) blockEntityAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 26, (int) blockEntityAutoCraftingTable.getEnergy(), (int) blockEntityAutoCraftingTable.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GuiBatbox extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.scaled(0.6, 0.6, 5);
|
||||
Text text = new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()))
|
||||
.append("/")
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()))
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxStoredPower()))
|
||||
.append(" ")
|
||||
.append(PowerSystem.getDisplayPower().abbreviation);
|
||||
|
||||
|
@ -71,6 +71,6 @@ public class GuiBatbox extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.popMatrix();
|
||||
}
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class GuiBlastFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y) {
|
||||
|
|
|
@ -64,6 +64,6 @@ public class GuiCentrifuge extends GuiBase<BuiltScreenHandler> {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,6 @@ public class GuiChargeBench extends GuiBase<BuiltScreenHandler> {
|
|||
super.drawForeground(matrixStack, mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,6 @@ public class GuiChemicalReactor extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,6 @@ public class GuiCompressor extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
this.builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
this.builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
this.builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class GuiDieselGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawTank(matrixStack, this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluidInstance(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer);
|
||||
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class GuiDistillationTower extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,6 @@ public class GuiElectricFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,6 @@ public class GuiExtractor extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class GuiFluidReplicator extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
// GuiScreen
|
||||
|
|
|
@ -115,7 +115,7 @@ public class GuiFusionReactor extends GuiBase<BuiltScreenHandler> {
|
|||
drawTextWithShadow(matrixStack, client.textRenderer, new LiteralText("Size: ").append(String.valueOf(blockEntity.size)), 83, 81, 0xFFFFFF);
|
||||
drawTextWithShadow(matrixStack, client.textRenderer, new LiteralText(String.valueOf(blockEntity.getPowerMultiplier())).append("x"), 10, 81, 0xFFFFFF);
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) this.blockEntity.getEnergy(), (int) this.blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) this.blockEntity.getEnergy(), (int) this.blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void hologramToggle(GuiButtonExtended button, double x, double y) {
|
||||
|
|
|
@ -56,7 +56,7 @@ public class GuiGasTurbine extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawTank(matrixStack, this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluidInstance(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer);
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,6 @@ public class GuiGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawBurnBar(matrixStack, this, blockEntity.getScaledBurnTime(100), 100, 81, 38, mouseX, mouseY, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
|
|||
}
|
||||
}
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y) {
|
||||
|
|
|
@ -63,14 +63,14 @@ public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
Text text = new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) idsu.getEnergy()))
|
||||
.append("/")
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) idsu.getMaxPower()))
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) idsu.getMaxStoredPower()))
|
||||
.append(" ")
|
||||
.append(PowerSystem.getDisplayPower().abbreviation);
|
||||
|
||||
drawCentredText(matrixStack, text, 35, 0, 58, layer);
|
||||
RenderSystem.popMatrix();
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) idsu.getEnergy(), (int) idsu.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) idsu.getEnergy(), (int) idsu.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class GuiImplosionCompressor extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public class GuiIndustrialElectrolyzer extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 84, 52, mouseX, mouseY, GuiBuilder.ProgressDirection.UP, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ public class GuiIndustrialGrinder extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, double mouseX, double mouseY) {
|
||||
|
|
|
@ -79,7 +79,7 @@ public class GuiIndustrialSawmill extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY) {
|
||||
|
|
|
@ -60,10 +60,10 @@ public class GuiLESU extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.pushMatrix();
|
||||
RenderSystem.scaled(0.6, 0.6, 1);
|
||||
drawCentredText(matrixStack, new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/"
|
||||
+ PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " "
|
||||
+ PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxStoredPower()) + " "
|
||||
+ PowerSystem.getDisplayPower().abbreviation), 35, 0, 58, layer);
|
||||
RenderSystem.popMatrix();
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class GuiMFE extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
drawCentredText(matrixStack, new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getEnergy()))
|
||||
.append("/")
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getMaxPower()))
|
||||
.append(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getMaxStoredPower()))
|
||||
.append(" ")
|
||||
.append(PowerSystem.getDisplayPower().abbreviation)
|
||||
, 35, 0, 58, layer);
|
||||
|
@ -71,6 +71,6 @@ public class GuiMFE extends GuiBase<BuiltScreenHandler> {
|
|||
RenderSystem.popMatrix();
|
||||
}
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) mfe.getEnergy(), (int) mfe.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) mfe.getEnergy(), (int) mfe.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,9 +59,9 @@ public class GuiMFSU extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.scaled(0.6, 0.6, 1);
|
||||
drawCentredText(matrixStack, new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation), 35, 0, 58, layer);
|
||||
drawCentredText(matrixStack, new LiteralText(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfsu.getMaxStoredPower()) + " " + PowerSystem.getDisplayPower().abbreviation), 35, 0, 58, layer);
|
||||
RenderSystem.popMatrix();
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) mfsu.getEnergy(), (int) mfsu.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 81, 28, (int) mfsu.getEnergy(), (int) mfsu.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,6 @@ public class GuiMatterFabricator extends GuiBase<BuiltScreenHandler> {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 83, 41, mouseX, mouseY, GuiBuilder.ProgressDirection.DOWN, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class GuiPlasmaGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawTank(matrixStack, this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluidInstance(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer);
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,6 @@ public class GuiRecycler extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.gaugeProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class GuiRollingMachine extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, rollingMachine.getProgressScaled(100), 100, 92, 43, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 17, (int) rollingMachine.getEnergy(), (int) rollingMachine.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 17, (int) rollingMachine.getEnergy(), (int) rollingMachine.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -61,6 +61,6 @@ public class GuiScrapboxinator extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class GuiSemifluidGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawTank(matrixStack, this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluidInstance(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class GuiSolar extends GuiBase<BuiltScreenHandler> {
|
|||
super.drawForeground(matrixStack, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 156, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 156, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
|
||||
switch (blockEntity.getSunState()) {
|
||||
case SolarPanelBlockEntity.DAYGEN:
|
||||
|
|
|
@ -62,6 +62,6 @@ public class GuiSolidCanningMachine extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class GuiThermalGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 130, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawTank(matrixStack, this, 44, 25, mouseX, mouseY, blockEntity.tank.getFluidInstance(), blockEntity.tank.getCapacity(), blockEntity.tank.isEmpty(), layer);
|
||||
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class GuiVacuumFreezer extends GuiBase<BuiltScreenHandler> {
|
|||
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(matrixStack, this, 76, 56, mouseX, mouseY, layer);
|
||||
}
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY) {
|
||||
|
|
|
@ -63,6 +63,6 @@ public class GuiWireMill extends GuiBase<BuiltScreenHandler> {
|
|||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue