9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 16:39:22 +00:00

[ci skip] update comments

This commit is contained in:
hayanesuru
2025-08-20 16:44:05 +09:00
parent 00a5e41bdc
commit b42ef7da8b
10 changed files with 84 additions and 83 deletions

View File

@@ -5,20 +5,20 @@ Subject: [PATCH] optimize collision shape
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
index 9caac78f0dbadc838753e2db7b757b70cea2fae8..782b5e58bc7a528d896a5b182476ba6fa3f8abc4 100644
index 9caac78f0dbadc838753e2db7b757b70cea2fae8..ef0849eb69deee974a8dd5ada628b469822755e5 100644
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -623,6 +623,13 @@ public abstract class BlockBehaviour implements FeatureElement {
this.emptyConstantCollisionShape = this.constantCollisionShape != null && this.constantCollisionShape.isEmpty();
// init caches
initCaches(collisionShape, true);
+ // Leaf start
+ // Leaf start - optimize collision shape
+ switch (getBlock()) {
+ case net.minecraft.world.level.block.FireBlock fireBlock -> {}
+ case net.minecraft.world.level.block.LiquidBlock liquidBlock -> {}
+ default -> this.constantCollisionShape = collisionShape;
+ }
+ // Leaf end
+ // Leaf end - optimize collision shape
if (this.constantCollisionShape != null) {
initCaches(this.constantCollisionShape, true);
}