|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> |
| 3 | +Date: Tue, 7 Dec 2021 19:34:11 -0500 |
| 4 | +Subject: [PATCH] Dolphin API |
| 5 | + |
| 6 | + |
| 7 | +diff --git a/src/main/java/org/bukkit/entity/Dolphin.java b/src/main/java/org/bukkit/entity/Dolphin.java |
| 8 | +index f00eaadcdde7ceef95def2d8ec6eb63a76c177bd..8ab329946daaff25646f3dd4582feb9e4c0685ca 100644 |
| 9 | +--- a/src/main/java/org/bukkit/entity/Dolphin.java |
| 10 | ++++ b/src/main/java/org/bukkit/entity/Dolphin.java |
| 11 | +@@ -1,3 +1,52 @@ |
| 12 | + package org.bukkit.entity; |
| 13 | + |
| 14 | +-public interface Dolphin extends WaterMob { } |
| 15 | ++import org.bukkit.Location; |
| 16 | ++ |
| 17 | ++public interface Dolphin extends WaterMob { // Paper start - Dolphin API |
| 18 | ++ |
| 19 | ++ /** |
| 20 | ++ * Gets the moistness level of this dolphin |
| 21 | ++ */ |
| 22 | ++ int getMoistness(); |
| 23 | ++ |
| 24 | ++ /** |
| 25 | ++ * Sets the moistness of this dolphin, once this is less than 0 the dolphin will start to take damage. |
| 26 | ++ * |
| 27 | ++ * @param moistness moistness level |
| 28 | ++ */ |
| 29 | ++ void setMoistness(int moistness); |
| 30 | ++ |
| 31 | ++ /** |
| 32 | ++ * Sets if this dolphin was fed a fish. |
| 33 | ++ * |
| 34 | ++ * @param hasFish has a fish |
| 35 | ++ */ |
| 36 | ++ void setHasFish(boolean hasFish); |
| 37 | ++ |
| 38 | ++ /** |
| 39 | ++ * Gets if this dolphin has a fish. |
| 40 | ++ * |
| 41 | ++ * @return has a fish |
| 42 | ++ */ |
| 43 | ++ boolean hasFish(); |
| 44 | ++ |
| 45 | ++ /** |
| 46 | ++ * Gets the treasure location this dolphin tries to guide players to. |
| 47 | ++ * <p> |
| 48 | ++ * This value is calculated if the player has fed the dolphin a fish, and it tries to start the {@link com.destroystokyo.paper.entity.ai.VanillaGoal#DOLPHIN_SWIM_TO_TREASURE} goal. |
| 49 | ++ * |
| 50 | ++ * @return calculated closest treasure location |
| 51 | ++ */ |
| 52 | ++ @org.jetbrains.annotations.NotNull |
| 53 | ++ Location getTreasureLocation(); |
| 54 | ++ |
| 55 | ++ /** |
| 56 | ++ * Sets the treasure location that this dolphin will try to lead the player to. |
| 57 | ++ * This only has an effect if the dolphin is currently leading a player, as this value is recalculated next time it leads a player. |
| 58 | ++ * <p> |
| 59 | ++ * The world of the location does not matter, as the dolphin will always use the world it is currently in. |
| 60 | ++ * |
| 61 | ++ * @param location location to guide to |
| 62 | ++ */ |
| 63 | ++ void setTreasureLocation(@org.jetbrains.annotations.NotNull Location location); |
| 64 | ++} // Paper end - Dolphin API |
0 commit comments