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@cdad49b7 Do not mark plugin tickets as forced; keep correct ticket types PaperMC/Paper@a1c4fc96 Add generic ticket identifier PaperMC/Paper@745881bb Update Moonrise common for 1.21.5 PaperMC/Paper@e9d00eb6 Apply Moonrise patch PaperMC/Paper@ef0f0d10 Copy Moonrise 1.21.5 update over PaperMC/Paper@cc0f25cb Apply more feature patches PaperMC/Paper@e7b684ed fix PaperMC/Paper@71ccae07 Revert "move block data/state impl"
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;
|
|
+ }
|
|
+}
|