Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
e4d10a6d67
Upstream has released updates that appears 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: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
23 Zeilen
1.1 KiB
Diff
23 Zeilen
1.1 KiB
Diff
From 6a2d991ef0fa23591d77554e268d8ded9ec933a9 Mon Sep 17 00:00:00 2001
|
|
From: BrodyBeckwith <brody@beckwith.dev>
|
|
Date: Tue, 14 Jan 2020 17:49:03 -0500
|
|
Subject: [PATCH] Optimize call to getFluid for explosions
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
|
index d99d2defe9..a353f3d5fa 100644
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
|
@@ -117,7 +117,7 @@ public class Explosion {
|
|
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
|
BlockPosition blockposition = new BlockPosition(d4, d5, d6);
|
|
IBlockData iblockdata = this.world.getType(blockposition);
|
|
- Fluid fluid = this.world.getFluid(blockposition);
|
|
+ Fluid fluid = iblockdata.getFluid(); // Paper
|
|
|
|
if (!iblockdata.isAir() || !fluid.isEmpty()) {
|
|
float f2 = Math.max(iblockdata.getBlock().getDurability(), fluid.k());
|
|
--
|
|
2.25.1
|
|
|