mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 08:17:32 +00:00
Add unlocalized names to fluid drops&packets (#105)
Previously they were null. Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/12874>
This commit is contained in:
1 parent
399c5f53dd
commit
6a244c12c4
8 files changed
+315
-55
No files matched your search
@@ -37,6 +37,10 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon shape;
|
||||
|
||||
public ItemFluidDrop() {
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_DROP);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -47,6 +51,12 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
return fluid != null ? fluid.getUnlocalizedName() : getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
|
||||
@@ -44,6 +44,12 @@ public class ItemFluidPacket extends FCBaseItem {
|
||||
return (fluid != null && fluid.amount > 0) ? fluid : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
return fluid != null ? fluid.getUnlocalizedName() : getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
|
||||
Reference in new issue
Block a user