Update to Minecraft 1.20.6

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-04-30 06:15:00 +10:00
parent a78a169340
commit 897584d94f
7 changed files with 17 additions and 28 deletions

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.java
+++ b/net/minecraft/network/protocol/game/PacketPlayOutTileEntityData.java
@@ -30,7 +30,7 @@
return create(tileentity, TileEntity::getUpdateTag);
}
- private PacketPlayOutTileEntityData(BlockPosition blockposition, TileEntityTypes<?> tileentitytypes, NBTTagCompound nbttagcompound) {
+ public PacketPlayOutTileEntityData(BlockPosition blockposition, TileEntityTypes<?> tileentitytypes, NBTTagCompound nbttagcompound) { // PAIL - private->public
this.pos = blockposition;
this.type = tileentitytypes;
this.tag = nbttagcompound;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/util/datafix/DataConverterRegistry.java --- a/net/minecraft/util/datafix/DataConverterRegistry.java
+++ b/net/minecraft/util/datafix/DataConverterRegistry.java +++ b/net/minecraft/util/datafix/DataConverterRegistry.java
@@ -483,6 +483,18 @@ @@ -484,6 +484,18 @@
datafixerbuilder.addFixer(new DataConverterItemFrame(schema44, false)); datafixerbuilder.addFixer(new DataConverterItemFrame(schema44, false));
Schema schema45 = datafixerbuilder.addSchema(1458, DataConverterRegistry.SAME_NAMESPACED); Schema schema45 = datafixerbuilder.addSchema(1458, DataConverterRegistry.SAME_NAMESPACED);
@ -19,7 +19,7 @@
datafixerbuilder.addFixer(new DataConverterCustomNameEntity(schema45, false)); datafixerbuilder.addFixer(new DataConverterCustomNameEntity(schema45, false));
datafixerbuilder.addFixer(new DataConverterCustomNameItem(schema45, false)); datafixerbuilder.addFixer(new DataConverterCustomNameItem(schema45, false));
datafixerbuilder.addFixer(new DataConverterCustomNameTile(schema45, false)); datafixerbuilder.addFixer(new DataConverterCustomNameTile(schema45, false));
@@ -741,7 +753,8 @@ @@ -742,7 +754,8 @@
datafixerbuilder.addFixer(new DataConverterAddChoices(schema110, "Added Zoglin", DataConverterTypes.ENTITY)); datafixerbuilder.addFixer(new DataConverterAddChoices(schema110, "Added Zoglin", DataConverterTypes.ENTITY));
Schema schema111 = datafixerbuilder.addSchema(2523, DataConverterRegistry.SAME_NAMESPACED); Schema schema111 = datafixerbuilder.addSchema(2523, DataConverterRegistry.SAME_NAMESPACED);
@ -29,7 +29,7 @@
Schema schema112 = datafixerbuilder.addSchema(2527, DataConverterRegistry.SAME_NAMESPACED); Schema schema112 = datafixerbuilder.addSchema(2527, DataConverterRegistry.SAME_NAMESPACED);
datafixerbuilder.addFixer(new DataConverterBitStorageAlign(schema112)); datafixerbuilder.addFixer(new DataConverterBitStorageAlign(schema112));
@@ -804,12 +817,14 @@ @@ -805,12 +818,14 @@
datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Squid", DataConverterTypes.ENTITY)); datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Squid", DataConverterTypes.ENTITY));
datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Item Frame", DataConverterTypes.ENTITY)); datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Item Frame", DataConverterTypes.ENTITY));
Schema schema131 = datafixerbuilder.addSchema(2690, DataConverterRegistry.SAME_NAMESPACED); Schema schema131 = datafixerbuilder.addSchema(2690, DataConverterRegistry.SAME_NAMESPACED);
@ -46,7 +46,7 @@
datafixerbuilder.addFixer(DataConverterItemName.create(schema132, "Rename copper item suffixes", createRenamer(immutablemap1))); datafixerbuilder.addFixer(DataConverterItemName.create(schema132, "Rename copper item suffixes", createRenamer(immutablemap1)));
datafixerbuilder.addFixer(DataConverterBlockRename.create(schema132, "Rename copper blocks suffixes", createRenamer(immutablemap1))); datafixerbuilder.addFixer(DataConverterBlockRename.create(schema132, "Rename copper blocks suffixes", createRenamer(immutablemap1)));
@@ -817,7 +832,8 @@ @@ -818,7 +833,8 @@
datafixerbuilder.addFixer(new AddFlagIfNotPresentFix(schema133, DataConverterTypes.WORLD_GEN_SETTINGS, "has_increased_height_already", false)); datafixerbuilder.addFixer(new AddFlagIfNotPresentFix(schema133, DataConverterTypes.WORLD_GEN_SETTINGS, "has_increased_height_already", false));
Schema schema134 = datafixerbuilder.addSchema(2696, DataConverterRegistry.SAME_NAMESPACED); Schema schema134 = datafixerbuilder.addSchema(2696, DataConverterRegistry.SAME_NAMESPACED);
@ -56,7 +56,7 @@
datafixerbuilder.addFixer(DataConverterItemName.create(schema134, "Renamed grimstone block items to deepslate", createRenamer(immutablemap2))); datafixerbuilder.addFixer(DataConverterItemName.create(schema134, "Renamed grimstone block items to deepslate", createRenamer(immutablemap2)));
datafixerbuilder.addFixer(DataConverterBlockRename.create(schema134, "Renamed grimstone blocks to deepslate", createRenamer(immutablemap2))); datafixerbuilder.addFixer(DataConverterBlockRename.create(schema134, "Renamed grimstone blocks to deepslate", createRenamer(immutablemap2)));
@@ -904,10 +920,11 @@ @@ -905,10 +921,11 @@
datafixerbuilder.addFixer(new DataConverterAddChoices(schema159, "Added Allay", DataConverterTypes.ENTITY)); datafixerbuilder.addFixer(new DataConverterAddChoices(schema159, "Added Allay", DataConverterTypes.ENTITY));
Schema schema160 = datafixerbuilder.addSchema(3084, DataConverterRegistry.SAME_NAMESPACED); Schema schema160 = datafixerbuilder.addSchema(3084, DataConverterRegistry.SAME_NAMESPACED);
@ -70,7 +70,7 @@
int2objectopenhashmap1.defaultReturnValue("minecraft:tabby"); int2objectopenhashmap1.defaultReturnValue("minecraft:tabby");
int2objectopenhashmap1.put(0, "minecraft:tabby"); int2objectopenhashmap1.put(0, "minecraft:tabby");
int2objectopenhashmap1.put(1, "minecraft:black"); int2objectopenhashmap1.put(1, "minecraft:black");
@@ -924,7 +941,8 @@ @@ -925,7 +942,8 @@
Objects.requireNonNull(int2objectopenhashmap); Objects.requireNonNull(int2objectopenhashmap);
datafixerbuilder.addFixer(new EntityVariantFix(schema161, "Change cat variant type", typereference, "minecraft:cat", "CatType", int2objectopenhashmap::get)); datafixerbuilder.addFixer(new EntityVariantFix(schema161, "Change cat variant type", typereference, "minecraft:cat", "CatType", int2objectopenhashmap::get));

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/CommandBlockListenerAbstract.java --- a/net/minecraft/world/level/CommandBlockListenerAbstract.java
+++ b/net/minecraft/world/level/CommandBlockListenerAbstract.java +++ b/net/minecraft/world/level/CommandBlockListenerAbstract.java
@@ -32,6 +32,10 @@ @@ -33,6 +33,10 @@
private String command = ""; private String command = "";
@Nullable @Nullable
private IChatBaseComponent customName; private IChatBaseComponent customName;
@ -11,7 +11,7 @@
public CommandBlockListenerAbstract() {} public CommandBlockListenerAbstract() {}
@@ -131,7 +135,7 @@ @@ -132,7 +136,7 @@
}); });

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/TileEntity.java --- a/net/minecraft/world/level/block/entity/TileEntity.java
+++ b/net/minecraft/world/level/block/entity/TileEntity.java +++ b/net/minecraft/world/level/block/entity/TileEntity.java
@@ -26,8 +26,18 @@ @@ -27,8 +27,18 @@
import net.minecraft.world.level.block.state.IBlockData; import net.minecraft.world.level.block.state.IBlockData;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -19,7 +19,7 @@
private static final Logger LOGGER = LogUtils.getLogger(); private static final Logger LOGGER = LogUtils.getLogger();
private final TileEntityTypes<?> type; private final TileEntityTypes<?> type;
@Nullable @Nullable
@@ -61,7 +71,16 @@ @@ -62,7 +72,16 @@
return this.level != null; return this.level != null;
} }
@ -37,7 +37,7 @@
public final void loadWithComponents(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) { public final void loadWithComponents(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
this.loadAdditional(nbttagcompound, holderlookup_a); this.loadAdditional(nbttagcompound, holderlookup_a);
@@ -101,6 +120,11 @@ @@ -102,6 +121,11 @@
}).ifPresent((nbtbase) -> { }).ifPresent((nbtbase) -> {
nbttagcompound.merge((NBTTagCompound) nbtbase); nbttagcompound.merge((NBTTagCompound) nbtbase);
}); });
@ -49,7 +49,7 @@
return nbttagcompound; return nbttagcompound;
} }
@@ -264,7 +288,7 @@ @@ -265,7 +289,7 @@
set.add(DataComponents.BLOCK_ENTITY_DATA); set.add(DataComponents.BLOCK_ENTITY_DATA);
final PatchedDataComponentMap patcheddatacomponentmap = PatchedDataComponentMap.fromPatch(datacomponentmap, datacomponentpatch); final PatchedDataComponentMap patcheddatacomponentmap = PatchedDataComponentMap.fromPatch(datacomponentmap, datacomponentpatch);
@ -58,8 +58,8 @@
@Nullable @Nullable
@Override @Override
public <T> T get(DataComponentType<T> datacomponenttype) { public <T> T get(DataComponentType<T> datacomponenttype) {
@@ -306,6 +330,15 @@ @@ -317,6 +341,15 @@
this.components = datacomponentmap; }
} }
+ // CraftBukkit start - add method + // CraftBukkit start - add method

View file

@ -131,5 +131,5 @@
this.secondaryPower = loadEffect(nbttagcompound, "secondary_effect"); this.secondaryPower = loadEffect(nbttagcompound, "secondary_effect");
+ this.levels = nbttagcompound.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available + this.levels = nbttagcompound.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available
if (nbttagcompound.contains("CustomName", 8)) { if (nbttagcompound.contains("CustomName", 8)) {
this.name = IChatBaseComponent.ChatSerializer.fromJson(nbttagcompound.getString("CustomName"), holderlookup_a); this.name = parseCustomNameSafe(nbttagcompound.getString("CustomName"), holderlookup_a);
} }

View file

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.20.5-R0.1-SNAPSHOT</version> <version>1.20.6-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name> <name>CraftBukkit</name>
<url>https://www.spigotmc.org/</url> <url>https://www.spigotmc.org/</url>

View file

@ -225,7 +225,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
* @return string * @return string
*/ */
public String getMappingsVersion() { public String getMappingsVersion() {
return "ad1a88fd7eaf2277f2507bf34d7b994c"; return "ee13f98a43b9c5abffdcc0bb24154460";
} }
@Override @Override