Remove Spigot timings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -26,8 +26,21 @@
|
||||
@@ -26,8 +26,18 @@
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -9,12 +9,9 @@
|
||||
+import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
|
||||
+import org.bukkit.inventory.InventoryHolder;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
+import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
+
|
||||
public abstract class BlockEntity {
|
||||
|
||||
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||
+ // CraftBukkit start - data containers
|
||||
+ private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
+ public CraftPersistentDataContainer persistentDataContainer;
|
||||
@@ -22,7 +19,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final BlockEntityType<?> type;
|
||||
@Nullable
|
||||
@@ -74,8 +87,17 @@
|
||||
@@ -74,8 +84,17 @@
|
||||
return this.level != null;
|
||||
}
|
||||
|
||||
@@ -41,7 +38,7 @@
|
||||
public final void loadWithComponents(CompoundTag nbt, HolderLookup.Provider registries) {
|
||||
this.loadAdditional(nbt, registries);
|
||||
BlockEntity.ComponentHelper.COMPONENTS_CODEC.parse(registries.createSerializationContext(NbtOps.INSTANCE), nbt).resultOrPartial((s) -> {
|
||||
@@ -114,6 +136,11 @@
|
||||
@@ -114,6 +133,11 @@
|
||||
}).ifPresent((nbtbase) -> {
|
||||
nbttagcompound.merge((CompoundTag) nbtbase);
|
||||
});
|
||||
@@ -53,7 +50,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -263,13 +290,19 @@
|
||||
@@ -263,13 +287,19 @@
|
||||
}
|
||||
|
||||
public final void applyComponents(DataComponentMap defaultComponents, DataComponentPatch components) {
|
||||
@@ -75,7 +72,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T get(DataComponentType<T> type) {
|
||||
@@ -284,9 +317,13 @@
|
||||
@@ -284,9 +314,13 @@
|
||||
}
|
||||
});
|
||||
Objects.requireNonNull(set);
|
||||
@@ -90,7 +87,7 @@
|
||||
}
|
||||
|
||||
protected void collectImplicitComponents(DataComponentMap.Builder builder) {}
|
||||
@@ -321,6 +358,15 @@
|
||||
@@ -321,6 +355,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user