Remove Patches (#7541)
This commit is contained in:
parent
1790528a61
commit
ea1efef116
857 changed files with 274 additions and 268 deletions
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <spottedleaf@spottedleaf.dev>
|
||||
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 2d42df635b1ce8d975278fb36f00fe9b8b8f060f..c7926d45c32a739b32d2b97b1ed2f8b89fb18620 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
@@ -475,7 +475,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
|
||||
@@ -506,7 +506,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)) {
|
Loading…
Add table
Add a link
Reference in a new issue