Skip to content

Commit b459b51

Browse files
committed
address reviews
1 parent 0f5f660 commit b459b51

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/gregtech/api/gui/resources/TextTexture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public TextTexture setWidth(int width) {
5656
}
5757

5858
public TextTexture setText(String text) {
59-
if (this.text.isEmpty() || !this.text.equals(text)) {
59+
if (!this.text.equals(text)) {
6060
this.text = text;
6161
if (isClient) {
6262
if (this.width > 0) {

src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityQuantumTank.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,17 +460,19 @@ public void receiveCustomData(int dataId, PacketBuffer buf) {
460460
try {
461461
this.fluidTank.setFluid(FluidStack.loadFluidStackFromNBT(buf.readCompoundTag()));
462462
} catch (IOException ignored) {
463-
GTLog.logger.warn("Failed to load fluid from NBT in a quantum tank at " + this.getPos() +
464-
" on a routine fluid update");
463+
GTLog.logger.warn("Failed to load fluid from NBT in a quantum tank at {} on a routine fluid update",
464+
this.getPos());
465465
}
466466
scheduleRenderUpdate();
467467
} else if (dataId == UPDATE_FLUID_AMOUNT) {
468468
// amount must always be read even if it cannot be used to ensure the reader index advances
469469
int amount = buf.readInt();
470+
boolean updateRendering = buf.readBoolean();
470471
FluidStack stack = fluidTank.getFluid();
471472
if (stack != null) {
472473
stack.amount = Math.min(amount, fluidTank.getCapacity());
473-
scheduleRenderUpdate();
474+
if (updateRendering)
475+
scheduleRenderUpdate();
474476
}
475477
} else if (dataId == UPDATE_IS_VOIDING) {
476478
setVoiding(buf.readBoolean());

0 commit comments

Comments
 (0)