diff --git a/src/main/java/techreborn/items/DynamicCell.java b/src/main/java/techreborn/items/DynamicCell.java index 24f09aacc..f2dde863e 100644 --- a/src/main/java/techreborn/items/DynamicCell.java +++ b/src/main/java/techreborn/items/DynamicCell.java @@ -40,13 +40,10 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.text.translation.I18n; import net.minecraft.world.World; import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.*; import net.minecraftforge.fluids.capability.IFluidHandlerItem; import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack; import org.apache.commons.lang3.Validate; @@ -161,12 +158,13 @@ public class DynamicCell extends Item { } } + @SuppressWarnings("deprecation") @Override public String getItemStackDisplayName(ItemStack stack) { FluidStack fluidStack = getFluidHandler(stack).getFluid(); if (fluidStack == null) return super.getItemStackDisplayName(stack); - return fluidStack.getLocalizedName() + " Cell"; + return I18n.translateToLocal("item.techreborn.cell.fluid.name").replaceAll("\\$fluid\\$", fluidStack.getLocalizedName()); } @Override diff --git a/src/main/resources/assets/techreborn/lang/en_us.lang b/src/main/resources/assets/techreborn/lang/en_us.lang index e5187da17..00704c203 100644 --- a/src/main/resources/assets/techreborn/lang/en_us.lang +++ b/src/main/resources/assets/techreborn/lang/en_us.lang @@ -375,6 +375,7 @@ item.techreborn.dustsmall.diorite.name=Small Pile of Diorite Dust item.techreborn.dustsmall.granite.name=Small Pile of Granite Dust item.techreborn.cell.name=Empty Cell +item.techreborn.cell.fluid.name=$fluid$ Cell item.techreborn.rebattery.name=Battery item.techreborn.lithiumBattery.name=Lithium Battery item.techreborn.energyCrystal.name=Energy Crystal