Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
29 Zeilen
1.6 KiB
Diff
29 Zeilen
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Sat, 25 Apr 2020 17:10:55 -0700
|
|
Subject: [PATCH] Reduce blockpos allocation from pathfinding
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
|
index c48e097464977dbec22d1370c3393ba1fe105137..ede91a2fbe67480d2b6bcdeb776f87da0b69bdae 100644
|
|
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
|
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
|
@@ -495,7 +495,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
|
return BlockPathTypes.DANGER_FIRE;
|
|
}
|
|
|
|
- if (world.getFluidState(pos).is(FluidTags.WATER)) {
|
|
+ if (blockState.getFluidState().is(FluidTags.WATER)) {
|
|
return BlockPathTypes.WATER_BORDER;
|
|
}
|
|
} // Paper
|
|
@@ -526,7 +526,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
|
} else if (blockState.is(Blocks.COCOA)) {
|
|
return BlockPathTypes.COCOA;
|
|
} else {
|
|
- FluidState fluidState = world.getFluidState(pos);
|
|
+ FluidState fluidState = blockState.getFluidState(); // Paper - remove another get type call
|
|
if (fluidState.is(FluidTags.LAVA)) {
|
|
return BlockPathTypes.LAVA;
|
|
} else if (isBurningBlock(blockState)) {
|