@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user