2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: zbk <zbk@projectsolaris.net>
|
|
|
|
Date: Sun, 26 Apr 2020 23:49:01 -0400
|
|
|
|
Subject: [PATCH] Villager Restocks API
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
2021-12-03 05:46:07 +00:00
|
|
|
index c5fdb1b956ffbd90b119c821a8a11e4dfff33058..0cd83a20ab565c9a5a38f19eed016289237e72ab 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
2021-12-03 05:46:07 +00:00
|
|
|
@@ -90,6 +90,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
2021-06-14 01:06:38 +00:00
|
|
|
this.getHandle().setVillagerXp(experience);
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getRestocksToday() {
|
2021-06-17 20:20:03 +00:00
|
|
|
+ return getHandle().numberOfRestocksToday;
|
2021-06-11 12:02:28 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setRestocksToday(int restocksToday) {
|
2021-06-17 20:20:03 +00:00
|
|
|
+ getHandle().numberOfRestocksToday = restocksToday;
|
2021-06-11 12:02:28 +00:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
@Override
|
|
|
|
public boolean sleep(Location location) {
|
|
|
|
Preconditions.checkArgument(location != null, "Location cannot be null");
|