diff options
author | maxcom1 <[email protected]> | 2024-03-23 22:26:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-23 17:26:17 -0400 |
commit | b6001403e9703cadaa6e8c8558e732b91c3c6d6e (patch) | |
tree | a8c57bbc334a8ad48d4ad2b43db335667b142bee /patches/server/1055-Expanded-Hopper-API.patch | |
parent | 9ec7dfcbc41c6e625de0050b6997160a75df9f44 (diff) | |
download | Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.tar.gz Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.zip |
Add methods to change entity physics (#10334)
Diffstat (limited to 'patches/server/1055-Expanded-Hopper-API.patch')
-rw-r--r-- | patches/server/1055-Expanded-Hopper-API.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/patches/server/1055-Expanded-Hopper-API.patch b/patches/server/1055-Expanded-Hopper-API.patch deleted file mode 100644 index 67efc0d7a2..0000000000 --- a/patches/server/1055-Expanded-Hopper-API.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: vicisacat <[email protected]> -Date: Fri, 15 Mar 2024 17:35:40 +0100 -Subject: [PATCH] Expanded Hopper API - -== AT == -public net.minecraft.world.level.block.entity.HopperBlockEntity setCooldown(I)V -public net.minecraft.world.level.block.entity.HopperBlockEntity cooldownTime - -diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java -index d446f18df647484e2f05ab642b73e914b06fdfed..af5f27fb5ebad1e05da2b7d1a0710a2ef9c6ebbe 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java -@@ -34,4 +34,17 @@ public class CraftHopper extends CraftLootable<HopperBlockEntity> implements Hop - public CraftHopper copy() { - return new CraftHopper(this); - } -+ -+ // Paper start - Expanded Hopper API -+ @Override -+ public void setTransferCooldown(final int cooldown) { -+ com.google.common.base.Preconditions.checkArgument(cooldown >= 0, "Hooper transfer cooldown cannot be negative (" + cooldown + ")"); -+ getSnapshot().setCooldown(cooldown); -+ } -+ -+ @Override -+ public int getTransferCooldown() { -+ return getSnapshot().cooldownTime; -+ } -+ // Paper end - Expanded Hopper API - } |