mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +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 529f8edf6a06ad2544bda4867c15623941775e47..f15b3dcc06361eb1b3d791c8143e7e9623ee5e8a 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) {
|