geforkt von Mirrors/Paper
Drop conduit api patch (upstream implemented same api with same method signatures)
Dieser Commit ist enthalten in:
Ursprung
1df7e21459
Commit
b7338094a5
@ -1,50 +0,0 @@
|
||||
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 73e532dc998e5701c1a73da846da3d3a79871b81..3228ac4d0c4c5939728d9231868f825d221db03a 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
|
||||
@@ -194,7 +194,7 @@ public class ConduitBlockEntity extends BlockEntity {
|
||||
public static int getRange(List<BlockPos> list) {
|
||||
// CraftBukkit end
|
||||
int i = list.size();
|
||||
- int j = i / 7 * 16;
|
||||
+ int j = i / 7 * 16; // Paper - Conduit API; diff on change
|
||||
// CraftBukkit start
|
||||
return j;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
|
||||
index c1759aeb3e6ad0e4eb66cba3da1b120dd1dce812..edc0e458e00bbc140a699d75eb5a693551f26dfc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
|
||||
@@ -127,4 +127,23 @@ public class CraftConduit extends CraftBlockEntityState<ConduitBlockEntity> impl
|
||||
AABB bounds = ConduitBlockEntity.getDestroyRangeAABB(this.getPosition());
|
||||
return new BoundingBox(bounds.minX, bounds.minY, bounds.minZ, bounds.maxX, bounds.maxY, bounds.maxZ);
|
||||
}
|
||||
+
|
||||
+ // Paper start - Conduit API
|
||||
+ @Override
|
||||
+ public boolean isActive() {
|
||||
+ requirePlaced();
|
||||
+ return this.getTileEntity().isActive();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getRange() {
|
||||
+ requirePlaced();
|
||||
+ return this.getTileEntity().effectBlocks.size() / 7 * 16;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public org.bukkit.entity.LivingEntity getTarget() {
|
||||
+ return this.getTileEntity().destroyTarget == null ? null : this.getTileEntity().destroyTarget.getBukkitLivingEntity();
|
||||
+ }
|
||||
+ // Paper end - Conduit API
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren