diff --git a/patches/api/Conduit-API.patch b/patches/api/Conduit-API.patch new file mode 100644 index 0000000000..6f73ebdb0b --- /dev/null +++ b/patches/api/Conduit-API.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tamion <70228790+notTamion@users.noreply.github.com> +Date: Sat, 27 Jan 2024 20:46:29 +0100 +Subject: [PATCH] Conduit API + + +diff --git a/src/main/java/org/bukkit/block/Conduit.java b/src/main/java/org/bukkit/block/Conduit.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/Conduit.java ++++ b/src/main/java/org/bukkit/block/Conduit.java +@@ -0,0 +0,0 @@ package org.bukkit.block; + /** + * Represents a captured state of a conduit. + */ +-public interface Conduit extends TileState { } ++public interface Conduit extends TileState { ++ ++ // Paper start - Conduit API ++ ++ /** ++ * Gets if the conduit is currently active. ++ *
++ * Requires the conduit to be placed in the world. ++ * ++ * @return if the conduit is active ++ */ ++ boolean isActive(); ++ ++ /** ++ * Gets the range in which the Conduit Power effect gets added to players. ++ *
++ * Requires the conduit to be placed in the world.
++ *
++ * @return the range
++ */
++ int getRange();
++
++ /**
++ * Gets the current target of the conduit.
++ *
++ * @return the current target
++ */
++ @org.jetbrains.annotations.Nullable
++ org.bukkit.entity.LivingEntity getTarget();
++ // Paper end - Conduit API
++}
diff --git a/patches/server/Conduit-API.patch b/patches/server/Conduit-API.patch
new file mode 100644
index 0000000000..c29fd4088f
--- /dev/null
+++ b/patches/server/Conduit-API.patch
@@ -0,0 +1,50 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tamion <70228790+notTamion@users.noreply.github.com>
+Date: Sat, 27 Jan 2024 20:46:40 +0100
+Subject: [PATCH] Conduit API
+
+== AT ==
+public net.minecraft.world.level.block.entity.ConduitBlockEntity effectBlocks
+public net.minecraft.world.level.block.entity.ConduitBlockEntity destroyTarget
+
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+@@ -0,0 +0,0 @@ public class ConduitBlockEntity extends BlockEntity {
+
+ private static void applyEffects(Level world, BlockPos pos, List