File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
leaf-server/minecraft-patches/features Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,22 @@ Subject: [PATCH] optimize collision shape
55
66
77diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
8- index 503420bbeaf3da0c568c28c55582f45469f40aeb..20fb2439c11f24790f58fe9d9caa100b398308a0 100644
8+ index 503420bbeaf3da0c568c28c55582f45469f40aeb..e186b435e7a25ba4c5a203a8748b1531dbf7b1b8 100644
99--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
1010+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
11- @@ -619,6 +619,13 @@ public abstract class BlockBehaviour implements FeatureElement {
11+ @@ -619,6 +619,18 @@ public abstract class BlockBehaviour implements FeatureElement {
1212 this.emptyConstantCollisionShape = this.constantCollisionShape != null && this.constantCollisionShape.isEmpty();
1313 // init caches
1414 initCaches(collisionShape, true);
1515+ // Leaf start - optimize collision shape
1616+ switch (getBlock()) {
17- + case net.minecraft.world.level.block.FireBlock fireBlock -> {}
18- + case net.minecraft.world.level.block.LiquidBlock liquidBlock -> {}
17+ + case net.minecraft.world.level.block.LiquidBlock ignore -> {
18+ + if (getFluidState().is(Fluids.WATER)) {
19+ + this.constantCollisionShape = collisionShape;
20+ + }
21+ + }
22+ + case net.minecraft.world.level.block.ScaffoldingBlock ignore -> {}
23+ + case net.minecraft.world.level.block.PowderSnowBlock ignore -> {}
1924+ default -> this.constantCollisionShape = collisionShape;
2025+ }
2126+ // Leaf end - optimize collision shape
You can’t perform that action at this time.
0 commit comments