diff options
Diffstat (limited to 'patches/unapplied/server/0389-Villager-Restocks-API.patch')
-rw-r--r-- | patches/unapplied/server/0389-Villager-Restocks-API.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/unapplied/server/0389-Villager-Restocks-API.patch b/patches/unapplied/server/0389-Villager-Restocks-API.patch new file mode 100644 index 0000000000..6aa68682f0 --- /dev/null +++ b/patches/unapplied/server/0389-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 7479a68d9c1025c8f2cd784b2607b549d40f3638..ae8c32c3497125fa2d1959e3a44b7c3013646762 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +@@ -92,6 +92,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"); |