Skip to content

Commit

Permalink
backport: using the translation key of the fluid attributes (instead …
Browse files Browse the repository at this point in the history
…of building it) to support Create mod #49
  • Loading branch information
cech12 committed Jun 12, 2021
1 parent a42c29d commit 4d70b01
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.15.2

forge_version=1.15.2-31.1.75
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 4d70b01

Please sign in to comment.