Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Mar 20, 2024
1 parent 0f5f660 commit b459b51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gregtech/api/gui/resources/TextTexture.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public TextTexture setWidth(int width) {
}

public TextTexture setText(String text) {
if (this.text.isEmpty() || !this.text.equals(text)) {
if (!this.text.equals(text)) {
this.text = text;
if (isClient) {
if (this.width > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,17 +460,19 @@ public void receiveCustomData(int dataId, PacketBuffer buf) {
try {
this.fluidTank.setFluid(FluidStack.loadFluidStackFromNBT(buf.readCompoundTag()));
} catch (IOException ignored) {
GTLog.logger.warn("Failed to load fluid from NBT in a quantum tank at " + this.getPos() +
" on a routine fluid update");
GTLog.logger.warn("Failed to load fluid from NBT in a quantum tank at {} on a routine fluid update",
this.getPos());
}
scheduleRenderUpdate();
} else if (dataId == UPDATE_FLUID_AMOUNT) {
// amount must always be read even if it cannot be used to ensure the reader index advances
int amount = buf.readInt();
boolean updateRendering = buf.readBoolean();
FluidStack stack = fluidTank.getFluid();
if (stack != null) {
stack.amount = Math.min(amount, fluidTank.getCapacity());
scheduleRenderUpdate();
if (updateRendering)
scheduleRenderUpdate();
}
} else if (dataId == UPDATE_IS_VOIDING) {
setVoiding(buf.readBoolean());
Expand Down

0 comments on commit b459b51

Please sign in to comment.