13
0
geforkt von Mirrors/Paper

[ci skip] Fix hoglin conversionTime javadoc (#8734)

Dieser Commit ist enthalten in:
Lulu13022002 2022-12-30 21:08:02 +01:00 committet von GitHub
Ursprung 8d7d92709d
Commit ddd8745d14
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -4,22 +4,49 @@ Date: Sun, 24 Oct 2021 20:29:27 -0700
Subject: [PATCH] Fix issues with mob conversion
diff --git a/src/main/java/org/bukkit/entity/PiglinAbstract.java b/src/main/java/org/bukkit/entity/PiglinAbstract.java
index 87f4b7ad7c0a95a7123d142fa023c5da5c760341..70a45e657c6cab6058d1a56fc51c5df79fdce60f 100644
--- a/src/main/java/org/bukkit/entity/PiglinAbstract.java
+++ b/src/main/java/org/bukkit/entity/PiglinAbstract.java
@@ -31,14 +31,17 @@ public interface PiglinAbstract extends Monster, Ageable {
diff --git a/src/main/java/org/bukkit/entity/Hoglin.java b/src/main/java/org/bukkit/entity/Hoglin.java
index b49670816d0d42aee08614d9a59a1f785ad8e6bc..c5296265997f405e5e09d37d610a0c2ae58667e9 100644
--- a/src/main/java/org/bukkit/entity/Hoglin.java
+++ b/src/main/java/org/bukkit/entity/Hoglin.java
@@ -44,13 +44,17 @@ public interface Hoglin extends Animals {
public int getConversionTime();
/**
- * Sets the amount of ticks until this entity will be converted to a
- * Zombified Piglin.
- * Sets the amount of ticks until this entity will be converted to a Zoglin.
+ * Sets the conversion counter value. The counter is incremented
+ * every tick the {@link #isConverting()} returns true. Setting this
+ * value will not start the conversion if the {@link PiglinAbstract} is
+ * every tick the method {@link #isConverting()} returns true. Setting
+ * this value will not start the conversion if the {@link Hoglin} is
+ * not in a valid environment ({@link org.bukkit.World#isPiglinSafe})
+ * to convert or {@link #isImmuneToZombification()} is true or
+ * has no AI.
+ * to convert, is immune to zombification ({@link #isImmuneToZombification()})
+ * or has no AI ({@link #hasAI}).
*
- * When this reaches 0, the entity will be converted. A value of less than 0
- * will stop the current conversion process without converting the current
- * entity.
+ * When this reaches 300, the entity will be converted. To stop the
+ * conversion use {@link #setImmuneToZombification(boolean)}.
*
- * @param time new conversion time
+ * @param time new conversion counter
*/
public void setConversionTime(int time);
diff --git a/src/main/java/org/bukkit/entity/PiglinAbstract.java b/src/main/java/org/bukkit/entity/PiglinAbstract.java
index 87f4b7ad7c0a95a7123d142fa023c5da5c760341..eb2d6db81525d807d42b4c864d1340616424e6d9 100644
--- a/src/main/java/org/bukkit/entity/PiglinAbstract.java
+++ b/src/main/java/org/bukkit/entity/PiglinAbstract.java
@@ -31,14 +31,17 @@ public interface PiglinAbstract extends Monster, Ageable {
public int getConversionTime();
/**
- * Sets the amount of ticks until this entity will be converted to a
- * Zombified Piglin.
+ * Sets the conversion counter value. The counter is incremented
+ * every tick the method {@link #isConverting()} returns true. Setting
+ * this value will not start the conversion if the {@link PiglinAbstract} is
+ * not in a valid environment ({@link org.bukkit.World#isPiglinSafe})
+ * to convert, is immune to zombification ({@link #isImmuneToZombification()})
+ * or has no AI ({@link #hasAI}).
*
- * When this reaches 0, the entity will be converted. A value of less than 0
- * will stop the current conversion process without converting the current