9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-03 22:26:19 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0287-optimize-isStateClimbable.patch
2025-10-01 10:03:59 -04:00

20 lines
1014 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hayanesuru <hayanesuru@outlook.jp>
Date: Sat, 9 Aug 2025 15:43:06 +0900
Subject: [PATCH] optimize isStateClimbable
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index d04280e45c6cfb75237d5376e9c30becfd9ad8a0..b4361d2164c497b0388fac1701a9944d41f58125 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1377,7 +1377,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
private boolean isStateClimbable(BlockState state) {
- return state.is(BlockTags.CLIMBABLE) || state.is(Blocks.POWDER_SNOW);
+ return (state.tagFlag & org.dreeam.leaf.util.BlockMasks.IS_STATE_CLIMBABLE) != 0; // Leaf - optimize isStateClimbable
}
private boolean vibrationAndSoundEffectsFromBlock(BlockPos pos, BlockState state, boolean playStepSound, boolean broadcastGameEvent, Vec3 entityPos) {