diff --git a/src/main/java/techreborn/blockentity/storage/fluid/QuantumTankBlockEntity.java b/src/main/java/techreborn/blockentity/storage/fluid/QuantumTankBlockEntity.java index 4c5e3b06e..52ede2de9 100644 --- a/src/main/java/techreborn/blockentity/storage/fluid/QuantumTankBlockEntity.java +++ b/src/main/java/techreborn/blockentity/storage/fluid/QuantumTankBlockEntity.java @@ -63,6 +63,10 @@ public class QuantumTankBlockEntity extends TankUnitBaseBlockEntity { TankUnitBaseBlockEntity tankEntity = (TankUnitBaseBlockEntity) world.getBlockEntity(pos); + if (tankEntity == null) { + return; + } + tankEntity.setTank(tank); tankEntity.setStack(0, inputSlotStack); diff --git a/src/main/java/techreborn/client/gui/GuiGreenhouseController.java b/src/main/java/techreborn/client/gui/GuiGreenhouseController.java index 6e2ed10a7..d91ed76a3 100644 --- a/src/main/java/techreborn/client/gui/GuiGreenhouseController.java +++ b/src/main/java/techreborn/client/gui/GuiGreenhouseController.java @@ -27,6 +27,7 @@ package techreborn.client.gui; import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.client.resource.language.I18n; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.state.property.Properties; @@ -77,14 +78,14 @@ public class GuiGreenhouseController extends GuiBase { getMinecraft().getTextureManager().bindTexture(new Identifier("techreborn", "textures/item/part/digital_display.png")); drawTexture(matrixStack, x + 68, y + 22, 0, 0, 16, 16, 16, 16); if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) { - List list = Arrays.stream(new TranslatableText("techreborn.tooltip.greenhouse.upgrade_available").asString() + List list = Arrays.stream(I18n.translate("techreborn.tooltip.greenhouse.upgrade_available") .split("\\r?\\n")) .map(LiteralText::new) .collect(Collectors.toList()); - RenderSystem.pushMatrix(); + matrixStack.push(); renderTooltip(matrixStack, list, mouseX, mouseY); - RenderSystem.popMatrix(); + matrixStack.pop(); } } @@ -100,7 +101,7 @@ public class GuiGreenhouseController extends GuiBase { if (!blockEntity.getMultiBlock()) { if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) { - List list = Arrays.stream(new TranslatableText("techreborn.tooltip.greenhouse.upgrade_available").asString() + List list = Arrays.stream(I18n.translate("techreborn.tooltip.greenhouse.upgrade_available") .split("\\r?\\n")) .map(LiteralText::new) .collect(Collectors.toList()); diff --git a/src/main/java/techreborn/client/gui/GuiStorageUnit.java b/src/main/java/techreborn/client/gui/GuiStorageUnit.java index bf816df2e..63f2a1104 100644 --- a/src/main/java/techreborn/client/gui/GuiStorageUnit.java +++ b/src/main/java/techreborn/client/gui/GuiStorageUnit.java @@ -61,7 +61,7 @@ public class GuiStorageUnit extends GuiBase { textRenderer.draw(matrixStack, new TranslatableText("techreborn.tooltip.unit.empty"), 10, 20, 4210752); } else { textRenderer.draw(matrixStack, new TranslatableText("gui.techreborn.storage.store"), 10, 20, 4210752); - textRenderer.draw(matrixStack, storageEntity.getStoredStack().getName().asString(), 10, 30, 4210752); + textRenderer.draw(matrixStack, storageEntity.getStoredStack().getName(), 10, 30, 4210752); textRenderer.draw(matrixStack, new TranslatableText("gui.techreborn.storage.amount"), 10, 50, 4210752); diff --git a/src/main/java/techreborn/compat/rei/MachineRecipeCategory.java b/src/main/java/techreborn/compat/rei/MachineRecipeCategory.java index 354af12d0..19dc4b6c9 100644 --- a/src/main/java/techreborn/compat/rei/MachineRecipeCategory.java +++ b/src/main/java/techreborn/compat/rei/MachineRecipeCategory.java @@ -33,6 +33,7 @@ import me.shedaniel.rei.api.widgets.Widgets; import me.shedaniel.rei.gui.entries.RecipeEntry; import me.shedaniel.rei.gui.entries.SimpleRecipeEntry; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.client.resource.language.I18n; import net.minecraft.item.Items; import net.minecraft.text.LiteralText; import net.minecraft.text.Text; @@ -67,7 +68,7 @@ public class MachineRecipeCategory implements RecipeCate @Override public String getCategoryName() { - return new TranslatableText(rebornRecipeType.getName().toString()).asString(); + return I18n.translate(rebornRecipeType.getName().toString()); } @Override diff --git a/src/main/java/techreborn/compat/rei/fluidgenerator/FluidGeneratorRecipeCategory.java b/src/main/java/techreborn/compat/rei/fluidgenerator/FluidGeneratorRecipeCategory.java index ccc277f6e..a881107e6 100644 --- a/src/main/java/techreborn/compat/rei/fluidgenerator/FluidGeneratorRecipeCategory.java +++ b/src/main/java/techreborn/compat/rei/fluidgenerator/FluidGeneratorRecipeCategory.java @@ -31,6 +31,7 @@ import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.widgets.Label; import me.shedaniel.rei.api.widgets.Widgets; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.client.resource.language.I18n; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; import net.minecraft.util.Identifier; @@ -58,7 +59,7 @@ public class FluidGeneratorRecipeCategory implements RecipeCategory