more patches (#5807)

This commit is contained in:
Jake Potrebic 2021-06-12 09:56:13 -07:00 committed by GitHub
parent 79da8f0eca
commit 2397b86efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 178 additions and 364 deletions

View file

@ -95,7 +95,7 @@ index 89e7d02b88404ac5dce06595432ae95c9a4e5015..3ffaeb72be8cda7a2b9398b8909db5c2
return this.serialize;
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 33884161de688c47c90a7b86196234acc80f9434..e4601134598e509a158ceacec6099a78bbabe89d 100644
index 33884161de688c47c90a7b86196234acc80f9434..92b042080f06fb95958ff5e824830a84f2d1f2a6 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -20,7 +20,7 @@ import org.bukkit.inventory.InventoryHolder;
@ -107,15 +107,6 @@ index 33884161de688c47c90a7b86196234acc80f9434..e4601134598e509a158ceacec6099a78
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
// CraftBukkit start - data containers
@@ -28,7 +28,7 @@ public abstract class BlockEntity {
public CraftPersistentDataContainer persistentDataContainer;
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger();
- private final BlockEntityType<?> type;
+ private final BlockEntityType<?> type; public BlockEntityType getTileEntityType() { return type; } // Paper - OBFHELPER
@Nullable
protected Level level;
protected final BlockPos worldPosition;
@@ -41,6 +41,26 @@ public abstract class BlockEntity {
this.blockState = state;
}
@ -127,7 +118,7 @@ index 33884161de688c47c90a7b86196234acc80f9434..e4601134598e509a158ceacec6099a78
+ @Override
+ public ResourceLocation getMinecraftKey() {
+ if (tileEntityKey == null) {
+ tileEntityKey = BlockEntityType.getKey(this.getTileEntityType());
+ tileEntityKey = BlockEntityType.getKey(this.type);
+ tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
+ }
+ return tileEntityKey;