Skip to content

Commit

Permalink
Merge branch '1.21.x' into FlowerTagRevival
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt authored Jan 14, 2025
2 parents 0720bcd + 5e4bfbf commit b089c67
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 110 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- a/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java
+++ b/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java
@@ -45,7 +_,7 @@
this.addEntry(new KeyBindsList.CategoryEntry(Component.translatable(s1)));
}

- Component component = Component.translatable(keymapping.getName());
+ Component component = keymapping.getDisplayName();
int i = p_346132_.font.width(component);
if (i > this.maxNameWidth) {
this.maxNameWidth = i;
@@ -156,6 +_,7 @@
)
.build();
Expand All @@ -8,7 +17,7 @@
p_345998_.setKey(p_345998_.getDefaultKey());
KeyBindsList.this.resetMappingAndUpdateButtons();
}).bounds(0, 0, 50, 20).createNarration(p_344899_ -> Component.translatable("narrator.controls.reset", p_345196_)).build();
@@ -208,7 +_,7 @@
@@ -208,13 +_,13 @@
MutableComponent mutablecomponent = Component.empty();
if (!this.key.isUnbound()) {
for (KeyMapping keymapping : KeyBindsList.this.minecraft.options.keyMappings) {
Expand All @@ -17,3 +26,10 @@
if (this.hasCollision) {
mutablecomponent.append(", ");
}

this.hasCollision = true;
- mutablecomponent.append(Component.translatable(keymapping.getName()));
+ mutablecomponent.append(keymapping.getDisplayName());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
}
}

@@ -116,6 +_,14 @@
}

public void setupBlockModel(BakedModel p_386829_, RenderType p_387529_) {
+ // Neo: Guard against models using chunk render types.
+ if (p_387529_.getChunkLayerId() != -1) {
+ throw new IllegalArgumentException("""
+ Attempting to render an item BakedModel with an invalid RenderType: %s.
+ Chunk render types are not supported, and the equivalent render types from the Sheets class should be used.
+ Model: %s.
+ """.formatted(p_387529_, p_386829_));
+ }
this.model = p_386829_;
this.renderType = p_387529_;
}
@@ -149,6 +_,9 @@

void render(PoseStack p_387607_, MultiBufferSource p_386763_, int p_387589_, int p_388775_) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -163,7 +_,7 @@
@@ -163,8 +_,8 @@
if (this.level() != null && !this.level().isClientSide) {
this.goalSelector.removeGoal(this.meleeGoal);
this.goalSelector.removeGoal(this.bowGoal);
- ItemStack itemstack = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW));
- if (itemstack.is(Items.BOW)) {
+ ItemStack itemstack = this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, item -> item instanceof net.minecraft.world.item.BowItem));
if (itemstack.is(Items.BOW)) {
+ if (itemstack.getItem() instanceof net.minecraft.world.item.BowItem) {
int i = this.getHardAttackInterval();
if (this.level().getDifficulty() != Difficulty.HARD) {
i = this.getAttackInterval();
@@ -188,9 +_,11 @@

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public static void registerVanillaProviders(RegisterCapabilitiesEvent event) {
BlockEntityType.DISPENSER,
BlockEntityType.DROPPER,
BlockEntityType.JUKEBOX,
BlockEntityType.CRAFTER);
BlockEntityType.CRAFTER,
BlockEntityType.DECORATED_POT);
for (var type : nonSidedVanillaContainers) {
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, type, (container, side) -> new InvWrapper(container));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraft.network.chat.Component;
import net.neoforged.neoforge.client.settings.IKeyConflictContext;
import net.neoforged.neoforge.client.settings.KeyModifier;

Expand Down Expand Up @@ -56,4 +57,12 @@ default boolean hasKeyModifierConflict(KeyMapping other) {
}
return false;
}

/**
* {@return the display name of this key mapping}
* Defaults to a {@linkplain Component#translatable(String) translatable component} of the {@link KeyMapping#getName() name}.
*/
default Component getDisplayName() {
return Component.translatable(self().getName());
}
}
26 changes: 13 additions & 13 deletions src/main/resources/assets/neoforge/lang/ms_my.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"fml.modmismatchscreen.simplifiedview": "Simplified view",
"fml.resources.modresources": "Resources for %1$s mod files",
"fml.resources.moddata": "Data for %1$s mod files",
"fml.modloadingissue.feature_flags.file_not_found": "FeatureFlag file {0}, provided by mod {100,modinfo,id}, does not exist",
"fml.modloadingissue.feature_flags.loading_error": "Failed to load FeatureFlag data at {0} in mod {100,modinfo,id}: {102,exc,msg}",
"fml.modloadingissue.feature_flags.file_not_found": "Fail FeatureFlag {0} yang disediakan oleh mod {100,modinfo,id} tidak wujud",
"fml.modloadingissue.feature_flags.loading_error": "Gagal memuatkan data FeatureFlag pada {0} dalam mod {100,modinfo,id}: {102,exc,msg}",
"loadwarning.neoforge.prbuild": "This build of NeoForge was created by a community member and is thus §c§lUNSUPPORTED§r",
"commands.neoforge.arguments.enum.invalid": "Enum constant must be one of %1$s, found %2$s",
"commands.neoforge.dimensions.list": "Currently registered dimensions by type:",
Expand Down Expand Up @@ -125,7 +125,7 @@
"commands.neoforge.data_components.list.tooltip.deleted": "Komponen %s dengan nilai %s telah dipadamkan",
"commands.neoforge.data_components.list.tooltip.modified": "Komponen %s telah diubah suai daripada %s kepada %s",
"commands.neoforge.data_components.list.tooltip.added": "Komponen %s telah ditambah dengan nilai %s",
"commands.neoforge.vanilla.resource_key.no_recipes_on_client": "Recipe lookup is not possible in client commands",
"commands.neoforge.vanilla.resource_key.no_recipes_on_client": "Carian resipi tidak boleh dilakukan dalam perintah klien",
"commands.config.getwithtype": "Config for %s of type %s found at %s",
"commands.config.noconfig": "Config for %s of type %s not found",
"neoforge.update.beta.1": "%sWARNING: %sNeoForge Beta",
Expand Down Expand Up @@ -180,8 +180,8 @@
"neoforge.configuration.section.neoforge.server.toml.title": "Tetapan pelayan",
"neoforge.configgui.advertiseDedicatedServerToLan": "Iklankan Pelayan Khusus Kepada LAN",
"neoforge.configgui.advertiseDedicatedServerToLan.tooltip": "Tetapkan ini kepada true untuk membolehkan pengiklanan pelayan khusus kepada klien LAN tempatan supaya ia muncul dalam skrin Multipemain secara automatik.",
"neoforge.configgui.attributeAdvancedTooltipDebugInfo": "Additional Attribute Advanced Tooltips",
"neoforge.configgui.attributeAdvancedTooltipDebugInfo.tooltip": "Set this to true to enable additional information about attributes on an item when advanced tooltips is on.",
"neoforge.configgui.attributeAdvancedTooltipDebugInfo": "Petua Alat Lanjutan Atribut Tambahan",
"neoforge.configgui.attributeAdvancedTooltipDebugInfo.tooltip": "Tetapkan ini kepada true untuk mendayakan maklumat tambahan tentang atribut pada item apabila petua alat lanjutan dihidupkan.",
"neoforge.configgui.forgeLightPipelineEnabled": "Talian Paip Cahaya NeoForge",
"neoforge.configgui.forgeLightPipelineEnabled.tooltip": "Enable the NeoForge block rendering pipeline - fixes the lighting of custom models.",
"neoforge.configgui.fullBoundingBoxLadders": "Full Bounding Box Ladders",
Expand Down Expand Up @@ -248,16 +248,16 @@
"neoforge.network.data_maps.missing_their": "Cannot connect to server as it has mandatory registry data maps not present on the client: %s",
"neoforge.network.extensible_enums.no_vanilla_server": "Klien ini tidak menyokong pelayan vanila kerana ia mempunyai enum lanjutan yang digunakan dalam rangkaian terikat pelayan",
"neoforge.network.extensible_enums.enum_entry_mismatch": "Set nilai yang ditambahkan pada enum yang boleh diperluaskan pada klien dan pelayan tidak sepadan. Pastikan anda menggunakan mod dan versi NeoForge yang sama seperti pelayan. Lihat log untuk butiran lanjut",
"neoforge.network.feature_flags.entry_mismatch": "The server and client have different sets of custom FeatureFlags. Make sure you are using the same mod and NeoForge versions as the server. See the log for more details",
"neoforge.network.feature_flags.no_vanilla_server": "This client does not support vanilla servers as it has custom FeatureFlags",
"neoforge.attribute.debug.base": "[Entity: %s | Item: %s]",
"neoforge.network.feature_flags.entry_mismatch": "Pelayan dan klien mempunyai set FeatureFlags tersuai yang berbeza. Pastikan anda menggunakan mod dan versi NeoForge yang sama seperti pelayan. Lihat log untuk butiran lanjut",
"neoforge.network.feature_flags.no_vanilla_server": "Klien ini tidak menyokong pelayan vanila kerana ia mempunyai FeatureFlags tersuai",
"neoforge.attribute.debug.base": "[Entiti: %s | Item: %s]",
"neoforge.value.flat": "%s",
"neoforge.value.percent": "%s%%",
"neoforge.value.boolean.enabled": "Enabled",
"neoforge.value.boolean.disabled": "Disabled",
"neoforge.value.boolean.enable": "Enables",
"neoforge.value.boolean.disable": "Disables",
"neoforge.value.boolean.invalid": "Invalid",
"neoforge.value.boolean.enabled": "Didayakan",
"neoforge.value.boolean.disabled": "Dinyahdayakan",
"neoforge.value.boolean.enable": "Mendayakan",
"neoforge.value.boolean.disable": "Menyahdayakan",
"neoforge.value.boolean.invalid": "Tidak Sah",
"neoforge.modifier.plus": "+%s %s",
"neoforge.modifier.take": "%s %s",
"neoforge.modifier.bool": "%s %s"
Expand Down
Loading

0 comments on commit b089c67

Please sign in to comment.