Skip to content

Commit

Permalink
using the translation key of the fluid attributes (instead of buildin…
Browse files Browse the repository at this point in the history
…g it) to support Create mod #49
  • Loading branch information
cech12 committed Jun 12, 2021
1 parent c69cca6 commit 1a14104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=2.6.1
mod_version=2.6.2
minecraft_version=1.16.2+

forge_version=1.16.2-33.0.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,8 @@ public ITextComponent getDisplayName(@Nonnull ItemStack stack) {
if (getFluid(stack) == Fluids.EMPTY) {
return new TranslationTextComponent("item.ceramicbucket.ceramic_bucket");
} else {
ITextComponent fluidText;
if (getFluid(stack) == Fluids.WATER || getFluid(stack) == Fluids.LAVA) {
//vanilla fluids
fluidText = new TranslationTextComponent(getFluid(stack).getDefaultState().getBlockState().getBlock().getTranslationKey());
} else {
//fluids registered by mods
fluidText = new TranslationTextComponent(Util.makeTranslationKey("fluid", ForgeRegistries.FLUIDS.getKey(getFluid(stack))));
}
return new TranslationTextComponent("item.ceramicbucket.filled_ceramic_bucket", fluidText);
ITextComponent fluidText = new TranslationTextComponent(getFluid(stack).getAttributes().getTranslationKey());
return new TranslationTextComponent("item.ceramicbucket.filled_ceramic_bucket", fluidText);
}
}

Expand Down

0 comments on commit 1a14104

Please sign in to comment.