From 42e95293655a2a46e16a05b29204968ce56f4d2d Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 27 Jan 2020 10:09:46 +1100 Subject: [PATCH] Change some block == AIR checks to isAir to catch CAVE_AIR By: md_5 --- paper-server/nms-patches/Entity.patch | 2 +- paper-server/nms-patches/EntityEnderDragon.patch | 2 +- paper-server/nms-patches/Explosion.patch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-server/nms-patches/Entity.patch b/paper-server/nms-patches/Entity.patch index 580ffc4f6f..8b655fd9a1 100644 --- a/paper-server/nms-patches/Entity.patch +++ b/paper-server/nms-patches/Entity.patch @@ -224,7 +224,7 @@ + bl = bl.getRelative(BlockFace.NORTH); + } + -+ if (bl.getType() != org.bukkit.Material.AIR) { ++ if (!bl.getType().isAir()) { + VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl); + world.getServer().getPluginManager().callEvent(event); + } diff --git a/paper-server/nms-patches/EntityEnderDragon.patch b/paper-server/nms-patches/EntityEnderDragon.patch index f4a12da41c..92932b6655 100644 --- a/paper-server/nms-patches/EntityEnderDragon.patch +++ b/paper-server/nms-patches/EntityEnderDragon.patch @@ -95,7 +95,7 @@ + } else { + for (org.bukkit.block.Block block : event.blockList()) { + org.bukkit.Material blockId = block.getType(); -+ if (blockId == org.bukkit.Material.AIR) { ++ if (blockId.isAir()) { + continue; + } + diff --git a/paper-server/nms-patches/Explosion.patch b/paper-server/nms-patches/Explosion.patch index 494c5ea2ce..68b96fcbe8 100644 --- a/paper-server/nms-patches/Explosion.patch +++ b/paper-server/nms-patches/Explosion.patch @@ -80,7 +80,7 @@ + for (int i1 = this.blocks.size() - 1; i1 >= 0; i1--) { + BlockPosition cpos = (BlockPosition) this.blocks.get(i1); + org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ()); -+ if (bblock.getType() != org.bukkit.Material.AIR) { ++ if (!bblock.getType().isAir()) { + blockList.add(bblock); + } + }