mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Add setPotionUseTimeLeft to Witch (#5597)
This commit is contained in:
parent
7033766d14
commit
c0a1161311
2 changed files with 15 additions and 0 deletions
|
@ -37,6 +37,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ int getPotionUseTimeLeft();
|
+ int getPotionUseTimeLeft();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
+ * Set time remaining (in ticks) that the Witch is drinking a potion.
|
||||||
|
+ * <p>
|
||||||
|
+ * This only has an effect while the Witch is drinking a potion.
|
||||||
|
+ *
|
||||||
|
+ * @param ticks Time in ticks remaining
|
||||||
|
+ * @see #isDrinkingPotion
|
||||||
|
+ */
|
||||||
|
+ void setPotionUseTimeLeft(int ticks);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
+ * Get the potion the Witch is drinking
|
+ * Get the potion the Witch is drinking
|
||||||
+ *
|
+ *
|
||||||
+ * @return The potion the witch is drinking
|
+ * @return The potion the witch is drinking
|
||||||
|
|
|
@ -136,6 +136,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ return getHandle().getPotionUseTimeLeft();
|
+ return getHandle().getPotionUseTimeLeft();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setPotionUseTimeLeft(int ticks) {
|
||||||
|
+ getHandle().setPotionUseTimeLeft(ticks);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ public ItemStack getDrinkingPotion() {
|
+ public ItemStack getDrinkingPotion() {
|
||||||
+ return CraftItemStack.asCraftMirror(getHandle().getItemInMainHand());
|
+ return CraftItemStack.asCraftMirror(getHandle().getItemInMainHand());
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue