diff options
author | Spottedleaf <[email protected]> | 2024-07-17 10:24:53 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-07-17 10:28:32 -0700 |
commit | 00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6 (patch) | |
tree | 82639515bc5e9ae00c1e639e72137ed51e1ac688 /patches/server/0350-Villager-Restocks-API.patch | |
parent | 967f98aa81da851740aeb429778e46159fd188df (diff) | |
download | Paper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.tar.gz Paper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.zip |
Remove Moonrise utils to MCUtils, remove duplicated/unused utils
Diffstat (limited to 'patches/server/0350-Villager-Restocks-API.patch')
-rw-r--r-- | patches/server/0350-Villager-Restocks-API.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0350-Villager-Restocks-API.patch b/patches/server/0350-Villager-Restocks-API.patch new file mode 100644 index 0000000000..75b7928672 --- /dev/null +++ b/patches/server/0350-Villager-Restocks-API.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: zbk <[email protected]> +Date: Sun, 26 Apr 2020 23:49:01 -0400 +Subject: [PATCH] Villager Restocks API + +== AT == +public net.minecraft.world.entity.npc.Villager numberOfRestocksToday + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +index 3b765b9f3b449ef8ff9c82967e4e730a090d4e5d..423f6fcaf49252553d2285308633f13e2427b607 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +@@ -87,6 +87,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { + this.getHandle().setVillagerXp(experience); + } + ++ // Paper start ++ @Override ++ public int getRestocksToday() { ++ return getHandle().numberOfRestocksToday; ++ } ++ ++ @Override ++ public void setRestocksToday(int restocksToday) { ++ getHandle().numberOfRestocksToday = restocksToday; ++ } ++ // Paper end ++ + @Override + public boolean sleep(Location location) { + Preconditions.checkArgument(location != null, "Location cannot be null"); |