mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b0da38c2 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) PaperMC/Paper@1922be90 Update custom tags (#12183) PaperMC/Paper@79cf1353 Ignore HopperInventorySearchEvent when it has no listeners (#13009) PaperMC/Paper@ea014f7a feat: add stuckEntityPoiRetryDelay config (#12949) PaperMC/Paper@a9e76749 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) PaperMC/Paper@5622c9dd Expose attribute sentiment (#12974) PaperMC/Paper@42b653b1 Expose more argument types (#12665) PaperMC/Paper@52d9a221 [ci/skip] Fix typo in Display javadoc (#13010) PaperMC/Paper@614e9acf Improve APIs around riptide tridents (#12996) PaperMC/Paper@51706e5a Fixed DyeItem sheep dye hunk
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Sat, 9 Aug 2025 15:43:00 +0900
|
|
Subject: [PATCH] optimize applyMovementEmissionAndPlaySound
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index 85789dfd30fe4f3b1108634e84b10f168bf6f64e..0bd4bc2d3d3edf6f7ea5e41d4049b2e0a3b3151e 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1276,7 +1276,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
float f1 = (float)(movement.length() * 0.6F);
|
|
float f2 = (float)(movement.horizontalDistance() * 0.6F);
|
|
BlockPos onPos = this.getOnPos();
|
|
- BlockState blockState = this.level().getBlockState(onPos);
|
|
+ BlockState blockState = this.level.getBlockStateIfLoadedUnchecked(onPos.getX(), onPos.getY(), onPos.getZ());
|
|
+ if (blockState == null) { blockState = this.level.getBlockState(onPos); }
|
|
boolean isStateClimbable = this.isStateClimbable(blockState);
|
|
this.moveDist += isStateClimbable ? f1 : f2;
|
|
this.flyDist += f1;
|