Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20' into 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
woodiertexas committed Aug 13, 2023
2 parents eb6c1e8 + 2a2691e commit a79c5eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 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 = -Xmx1G
org.gradle.parallel = true

# Mod Properties
version = 3.4.1+1.20.1
version = 3.4.3+1.20.1
maven_group = io.github.debuggyteam
archives_base_name = architecture_extensions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ public class TypedGroupedBlockItem extends BlockItem implements TypedGrouped {

protected final TypedGroupedBlock typedGroupedBlock;

@ClientOnly
protected Text cachedLocalization = null;

public <T extends Block & TypedGrouped> TypedGroupedBlockItem(T block, Settings settings) {
super(block, settings);
typedGroupedBlock = block.getTypedGroupedBlock();
Expand Down Expand Up @@ -57,21 +54,16 @@ private Text getBaseTranslationKey() {
@Override
@ClientOnly
public Text getName() {
if (cachedLocalization == null) {
String translationKey = Util.createTranslationKey("block", Registries.ITEM.getId(this));
if (I18n.hasTranslation(translationKey)) {
return Text.translatable(translationKey);
} else {
Text baseBlock = getBaseTranslationKey();
String typedGroupedKey = BLOCK_TYPE_PREFIX + "." + typedGroupedBlock.type().toString();
Text blockType = Text.translatable(typedGroupedKey);

String translationKey = Util.createTranslationKey("block", Registries.ITEM.getId(this));
if (I18n.hasTranslation(translationKey)) {
cachedLocalization = Text.translatable(translationKey);
} else {
Text baseBlock = getBaseTranslationKey();
String typedGroupedKey = BLOCK_TYPE_PREFIX + "." + typedGroupedBlock.type().toString();
Text blockType = Text.translatable(typedGroupedKey);

cachedLocalization = Text.translatable(BLOCKTYPE_BLOCK_KEY, baseBlock, blockType);
}
return Text.translatable(BLOCKTYPE_BLOCK_KEY, baseBlock, blockType);
}

return cachedLocalization;
}

@Override
Expand Down

0 comments on commit a79c5eb

Please sign in to comment.