mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Bio Reactor works :)
This commit is contained in:
parent
41e85391be
commit
fc75b13b86
2 changed files with 6 additions and 6 deletions
|
@ -44,7 +44,7 @@ public class GuiBioReactor extends AAScreen<ContainerBioReactor> {
|
|||
@Override
|
||||
public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
//this.energy.render(mouseX, mouseY);
|
||||
this.energy.render(guiGraphics, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,9 +61,9 @@ public class GuiBioReactor extends AAScreen<ContainerBioReactor> {
|
|||
}
|
||||
|
||||
if (this.tile.producePerTick > 0) {
|
||||
guiGraphics.drawCenteredString(this.font, this.tile.producePerTick + " " + I18n.get("actuallyadditions.cft"), this.leftPos + 87, this.topPos + 86, 0xFFFFFF);
|
||||
guiGraphics.drawCenteredString(this.font, Component.literal(this.tile.producePerTick + " ").append(Component.translatable("misc.actuallyadditions.energy_tick")), this.leftPos + 87, this.topPos + 86, 0xFFFFFF);
|
||||
}
|
||||
|
||||
//this.energy.draw();
|
||||
this.energy.draw(guiGraphics);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men
|
|||
}
|
||||
|
||||
public static boolean isValidItem(ItemStack stack) {
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (!stack.isEmpty()) {
|
||||
Item item = stack.getItem();
|
||||
if (item.isEdible()) {
|
||||
return true;
|
||||
|
@ -85,7 +85,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men
|
|||
if (!tile.isRedstonePowered && tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) {
|
||||
for (int i = 0; i < tile.inv.getSlots(); i++) {
|
||||
ItemStack stack = tile.inv.getStackInSlot(i);
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (!stack.isEmpty()) {
|
||||
Item item = stack.getItem();
|
||||
if (isValidItem(stack) && (types == null || !types.contains(item))) {
|
||||
if (types == null) {
|
||||
|
@ -187,7 +187,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men
|
|||
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.empty();
|
||||
return Component.translatable("container.actuallyadditions.bioReactor");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Reference in a new issue