9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00

optimize chunk map (#438)

* rebase

* optimize LivingEntity#travel

* cleanup

* Replace fluid height map

* reuse array list in Entity#collide

* cleanup

* fix fire and liquid collision shape

* fix checkInside

* inline betweenClosed

* cleanup

* optimize getOnPos

* optimize equals in getOnPos

* update mainSupportingBlockPos on dirty

* cleanup

* rename

* merge same patch

* rebase and remove properly

* [ci skip] cleanup

* rebase and rebuild

* fix async locator

* remove async locator

* cleanup

* rebase

---------

Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
This commit is contained in:
hayanesuru
2025-08-20 03:48:26 +09:00
committed by GitHub
parent 55de442b70
commit 23b7b02eee
163 changed files with 2158 additions and 146 deletions

View File

@@ -0,0 +1,20 @@
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 0bd4bc2d3d3edf6f7ea5e41d4049b2e0a3b3151e..3aec52d72cd5ffd2ef61b1f6c37c6b7f1203d06f 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1376,7 +1376,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
private boolean isStateClimbable(BlockState state) {
- return state.is(BlockTags.CLIMBABLE) || state.is(Blocks.POWDER_SNOW);
+ final int flags = state.tagFlag;
+ return (flags & (org.dreeam.leaf.util.BlockMasks.CLIMBABLE_TAG | org.dreeam.leaf.util.BlockMasks.POWDER_SNOW_CL)) != 0;
}
private boolean vibrationAndSoundEffectsFromBlock(BlockPos pos, BlockState state, boolean playStepSound, boolean broadcastGameEvent, Vec3 entityPos) {