mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9f004614 Update a whole lot of deprecated annotations PaperMC/Paper@72f13f8b [ci/skip] Mention API Checks for CONTRIBUTING.md (#12315) PaperMC/Paper@7cc6cb50 Check for trailing input in ItemFactory#createItemStack (#12312) PaperMC/Paper@f49d18df Add get/set customName to Skull block (#12302) PaperMC/Paper@894631f0 Make advancement ordering predictable (#12292) PaperMC/Paper@2aad131e Add config option for command spam whitelist PaperMC/Paper@bb3b7e69 Fix annotation mistakes PaperMC/Paper@058455e4 InventoryView QOL open method (#12282) PaperMC/Paper@f2258582 Fix firework entity not being removed when FireworkExplodeEvent is cancelled (#12268) PaperMC/Paper@7819df10 Add getHeight method to ChunkData (#12311) PaperMC/Paper@37b9ca1f Add flush parameter to World#save (#12330) PaperMC/Paper@515e12ca Check if BUNDLE_CONTENTS is present in InventoryClickEvent (#12321) PaperMC/Paper@5a6ab97b Add config to remove player as vehicle restriction in /ride (#12327) PaperMC/Paper@c467df95 Add ItemStack#copyDataFrom (#12224) Gale Changes: Dreeam-qwq/Gale@d5143ee0 Updated Upstream (Paper) Dreeam-qwq/Gale@63c396e7 Updated Upstream (Paper) Dreeam-qwq/Gale@5c2147b4 Updated Upstream (Paper) Dreeam-qwq/Gale@804ecea0 Rebuild patches
70 lines
2.5 KiB
Diff
70 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: LeeGodSRC <lee20040919@gmail.com>
|
|
Date: Sat, 8 Mar 2025 11:40:46 +0800
|
|
Subject: [PATCH] Raytrace AntiXray SDK integration
|
|
|
|
Integrated with Imanity Software's Raytrace AntiXray for better performance
|
|
|
|
Original project: https://github.com/Imanity-Software/raytrace-antixray-spigot-sdk
|
|
|
|
diff --git a/src/main/java/dev/imanity/antixray/sdk/AntiXrayAdapter.java b/src/main/java/dev/imanity/antixray/sdk/AntiXrayAdapter.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..3104caaf8463de31231f7503c86e9c7016f13372
|
|
--- /dev/null
|
|
+++ b/src/main/java/dev/imanity/antixray/sdk/AntiXrayAdapter.java
|
|
@@ -0,0 +1,34 @@
|
|
+package dev.imanity.antixray.sdk;
|
|
+
|
|
+import org.bukkit.Material;
|
|
+import org.bukkit.World;
|
|
+import org.bukkit.entity.Player;
|
|
+
|
|
+public interface AntiXrayAdapter {
|
|
+
|
|
+ /**
|
|
+ * Call a block change to the AntiXray system
|
|
+ * It should be at Level.setBlock(BlockPos, BlockState, flags, maxUpdateDepth)
|
|
+ * Or World.setTypeAndData(BlockPosition, IBlockData, i) in legacy spigot versions
|
|
+ *
|
|
+ * @param world the bukkit world
|
|
+ * @param x the x
|
|
+ * @param y the y
|
|
+ * @param z the z
|
|
+ * @param material the bukkit material
|
|
+ */
|
|
+ void callBlockChange(World world, int x, int y, int z, Material material);
|
|
+
|
|
+ /**
|
|
+ * Call a player left click block to the AntiXray system
|
|
+ * It should be at ServerPlayerGameMode.handleBlockBreakAction(BlockPos, ServerboundPlayerActionPacket.Action, Direction, worldHeight, sequence)
|
|
+ * Or PlayerInteractManager.a(BlockPosition, EnumDirection) in legacy spigot versions
|
|
+ *
|
|
+ * @param world the bukkit world
|
|
+ * @param player the bukkit player
|
|
+ * @param x the x
|
|
+ * @param y the y
|
|
+ * @param z the z
|
|
+ */
|
|
+ void callPlayerLeftClickBlock(World world, Player player, int x, int y, int z);
|
|
+}
|
|
diff --git a/src/main/java/dev/imanity/antixray/sdk/AntiXraySDK.java b/src/main/java/dev/imanity/antixray/sdk/AntiXraySDK.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..33fae921cb4cf4631d17837c5f26a01af9619957
|
|
--- /dev/null
|
|
+++ b/src/main/java/dev/imanity/antixray/sdk/AntiXraySDK.java
|
|
@@ -0,0 +1,14 @@
|
|
+package dev.imanity.antixray.sdk;
|
|
+
|
|
+public class AntiXraySDK {
|
|
+
|
|
+ private static AntiXrayAdapter ADAPTER;
|
|
+
|
|
+ public static AntiXrayAdapter getAdapter() {
|
|
+ return ADAPTER;
|
|
+ }
|
|
+
|
|
+ public static void setAdapter(AntiXrayAdapter adapter) {
|
|
+ ADAPTER = adapter;
|
|
+ }
|
|
+}
|