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

View File

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