diff --git a/Spigot-Server-Patches/Anti-Xray.patch b/Spigot-Server-Patches/Anti-Xray.patch index d1154312d5..91a430ce52 100644 --- a/Spigot-Server-Patches/Anti-Xray.patch +++ b/Spigot-Server-Patches/Anti-Xray.patch @@ -27,6 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public EngineMode engineMode; + public int maxChunkSectionIndex; + public int updateRadius; ++ public boolean lavaObscures; + public List hiddenBlocks; + public List replacementBlocks; + private void antiXray() { @@ -36,6 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + maxChunkSectionIndex = getInt("anti-xray.max-chunk-section-index", 3); + maxChunkSectionIndex = maxChunkSectionIndex > 15 ? 15 : maxChunkSectionIndex; + updateRadius = getInt("anti-xray.update-radius", 2); ++ lavaObscures = getBoolean("anti-xray.lava-obscures", false); + hiddenBlocks = getList("anti-xray.hidden-blocks", Arrays.asList("gold_ore", "iron_ore", "coal_ore", "lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "redstone_ore", "clay", "emerald_ore", "ender_chest")); + replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "oak_planks")); + if (PaperConfig.version < 19) { @@ -202,7 +204,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + if (blockData != null) { + solidGlobal[i] = blockData.isOccluding(emptyChunk, zeroPos) -+ && blockData.getBlock() != Blocks.SPAWNER && blockData.getBlock() != Blocks.BARRIER && blockData.getBlock() != Blocks.SHULKER_BOX; ++ && blockData.getBlock() != Blocks.SPAWNER && blockData.getBlock() != Blocks.BARRIER && blockData.getBlock() != Blocks.SHULKER_BOX || paperWorldConfig.lavaObscures && blockData == Blocks.LAVA.getBlockData(); ++ // Comparing blockData == Blocks.LAVA.getBlockData() instead of blockData.getBlock() == Blocks.LAVA ensures that only "stationary lava" is used + // shulker box checks TE. + } + }