mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
20 lines
1014 B
Diff
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 61d381e2b51d052f5ee9d09b5fb74fb330734302..a0625e490f054916e2f6cf08371c85c9b514b988 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1375,7 +1375,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) {
|