Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/ItemHanging.java
+++ b/net/minecraft/world/item/ItemHanging.java
@@ -24,6 +24,11 @@
@@ -25,6 +25,11 @@
import net.minecraft.world.level.World;
import net.minecraft.world.level.gameevent.GameEvent;
@@ -12,7 +12,7 @@
public class ItemHanging extends Item {
private static final IChatBaseComponent TOOLTIP_RANDOM_VARIANT = IChatBaseComponent.translatable("painting.random").withStyle(EnumChatFormat.GRAY);
@@ -74,6 +79,19 @@
@@ -75,6 +80,19 @@
if (((EntityHanging) object).survives()) {
if (!world.isClientSide) {
@@ -32,3 +32,12 @@
((EntityHanging) object).playPlacementSound();
world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, ((EntityHanging) object).position());
world.addFreshEntity((Entity) object);
@@ -102,7 +120,7 @@
if (!customdata.isEmpty()) {
customdata.read(holderlookup_a.createSerializationContext(DynamicOpsNBT.INSTANCE), EntityPainting.VARIANT_MAP_CODEC).result().ifPresentOrElse((holder) -> {
- Optional optional = ((PaintingVariant) holder.value()).title();
+ Optional<IChatBaseComponent> optional = ((PaintingVariant) holder.value()).title(); // CraftBukkit - decompile error
Objects.requireNonNull(list);
optional.ifPresent(list::add);