Skip to content

Commit

Permalink
Fix unlocalized name of GT fluids in drums (#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
ALongStringOfNumbers authored and serenibyss committed Feb 19, 2024
1 parent 2957212 commit 5d3ef8a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import codechicken.lib.vec.Matrix4;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.IOException;
Expand Down Expand Up @@ -97,7 +98,7 @@ protected void initializeInventory() {
IPropertyFluidFilter filter = this.material.getProperty(PropertyKey.FLUID_PIPE);
if (filter == null) {
throw new IllegalArgumentException(
String.format("Material %s requires FluidPipePropety for Drums", material));
String.format("Material %s requires FluidPipeProperty for Drums", material));
}
this.fluidInventory = this.fluidTank = new FilteredFluidHandler(tankSize).setFilter(filter);
}
Expand Down Expand Up @@ -129,7 +130,7 @@ public ICapabilityProvider initItemStackCapabilities(ItemStack itemStack) {
}

@Override
public void writeInitialSyncData(PacketBuffer buf) {
public void writeInitialSyncData(@NotNull PacketBuffer buf) {
super.writeInitialSyncData(buf);
FluidStack fluidStack = fluidTank.getFluid();
buf.writeBoolean(fluidStack != null);
Expand All @@ -142,7 +143,7 @@ public void writeInitialSyncData(PacketBuffer buf) {
}

@Override
public void receiveInitialSyncData(PacketBuffer buf) {
public void receiveInitialSyncData(@NotNull PacketBuffer buf) {
super.receiveInitialSyncData(buf);
FluidStack fluidStack = null;
if (buf.readBoolean()) {
Expand All @@ -156,7 +157,7 @@ public void receiveInitialSyncData(PacketBuffer buf) {
}

@Override
public void receiveCustomData(int dataId, PacketBuffer buf) {
public void receiveCustomData(int dataId, @NotNull PacketBuffer buf) {
super.receiveCustomData(dataId, buf);
if (dataId == UPDATE_AUTO_OUTPUT) {
this.isAutoOutput = buf.readBoolean();
Expand Down Expand Up @@ -266,7 +267,7 @@ public void addInformation(ItemStack stack, @Nullable World player, List<String>
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT(tagCompound.getCompoundTag("Fluid"));
if (fluidStack == null) return;
tooltip.add(I18n.format("gregtech.machine.fluid_tank.fluid", fluidStack.amount,
I18n.format(fluidStack.getUnlocalizedName())));
fluidStack.getFluid().getLocalizedName(fluidStack)));
}
}

Expand Down

0 comments on commit 5d3ef8a

Please sign in to comment.