diff options
author | Warrior <[email protected]> | 2023-11-04 16:07:48 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-04 15:07:48 +0000 |
commit | 230682d51bc4078ee676751552cac56864e21b30 (patch) | |
tree | c0252c02e80ce5856f1a899efee54a5c8c7f6aa7 | |
parent | 487109fddc74813b81bf17dfe8ec7be443963d9d (diff) | |
download | Paper-230682d51bc4078ee676751552cac56864e21b30.tar.gz Paper-230682d51bc4078ee676751552cac56864e21b30.zip |
Add raw iron & raw copper blocks to anti xray defaults (#7622)
-rw-r--r-- | patches/server/0005-Paper-config-files.patch | 4 | ||||
-rw-r--r-- | patches/server/1016-Add-slot-sanity-checks-in-container-clicks.patch | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 8c419b8763..a099a9a322 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -1337,7 +1337,7 @@ index 0000000000000000000000000000000000000000..f0d4ec73bc8872a85e34f5c6b4d342e7 +} diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..c9ae7e88afb1ca8349a118c6b491a1e1e83517a7 +index 0000000000000000000000000000000000000000..387a887d3aebb57da80bc36e36c2a7ea05cfd74f --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java @@ -0,0 +1,539 @@ @@ -1444,7 +1444,7 @@ index 0000000000000000000000000000000000000000..c9ae7e88afb1ca8349a118c6b491a1e1 + public int updateRadius = 2; + public boolean lavaObscures = false; + public boolean usePermission = false; -+ public List<String> hiddenBlocks = List.of("copper_ore", "deepslate_copper_ore", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore", ++ public List<String> hiddenBlocks = List.of("copper_ore", "deepslate_copper_ore", "raw_copper_block", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore", "raw_iron_block", + "coal_ore", "deepslate_coal_ore", "lapis_ore", "deepslate_lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "deepslate_diamond_ore", + "redstone_ore", "deepslate_redstone_ore", "clay", "emerald_ore", "deepslate_emerald_ore", "ender_chest"); // TODO update type to List<Block> + public List<String> replacementBlocks = List.of("stone", "oak_planks", "deepslate"); // TODO update type to List<Block> diff --git a/patches/server/1016-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/1016-Add-slot-sanity-checks-in-container-clicks.patch index c83c1b5818..c9eb55f978 100644 --- a/patches/server/1016-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/1016-Add-slot-sanity-checks-in-container-clicks.patch @@ -4,6 +4,23 @@ Date: Mon, 11 Sep 2023 12:01:57 +1000 Subject: [PATCH] Add slot sanity checks in container clicks +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 8bca5ba75977c0a61197eb47c94f0456d66b29a4..33be0db006cca66f38f2105924466b0210139848 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -2980,6 +2980,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + break; + case SWAP: + if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) { ++ // Paper start ++ if (packet.getSlotNum() < 0) { ++ action = InventoryAction.NOTHING; ++ break; ++ } ++ // Paper end + click = (packet.getButtonNum() == 40) ? ClickType.SWAP_OFFHAND : ClickType.NUMBER_KEY; + Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum()); + if (clickedSlot.mayPickup(this.player)) { diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..5d298b11f74cd2da47e6613ced621ab62aa73a7b 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java |