Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 7278ee0293
commit 42b72d7c63
12 changed files with 136 additions and 98 deletions

View File

@@ -265,6 +265,7 @@ public enum EntityType implements Keyed {
PIGLIN("piglin", Piglin.class, -1),
STRIDER("strider", Strider.class, -1),
ZOGLIN("zoglin", Zoglin.class, -1),
PIGLIN_BRUTE("piglin_brute", PiglinBrute.class, -1),
/**
* A fishing line and bobber.
*/

View File

@@ -3,21 +3,7 @@ package org.bukkit.entity;
/**
* Represents a Piglin.
*/
public interface Piglin extends Monster {
/**
* Gets whether the piglin is immune to zombification.
*
* @return Whether the piglin is immune to zombification
*/
public boolean isImmuneToZombification();
/**
* Sets whether the piglin is immune to zombification.
*
* @param flag Whether the piglin is immune to zombification
*/
public void setImmuneToZombification(boolean flag);
public interface Piglin extends PiglinAbstract {
/**
* Get whether the piglin is able to hunt hoglins.
@@ -32,48 +18,4 @@ public interface Piglin extends Monster {
* @param flag Whether the piglin is able to hunt hoglins.
*/
public void setIsAbleToHunt(boolean flag);
/**
* Gets the amount of ticks until this entity will be converted to a
* Zombified Piglin.
*
* When this reaches 300, the entity will be converted.
*
* @return conversion time
* @throws IllegalStateException if {@link #isConverting()} is false.
*/
public int getConversionTime();
/**
* Sets the amount of ticks until this entity will be converted to a
* Zombified Piglin.
*
* 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.
*
* @param time new conversion time
*/
public void setConversionTime(int time);
/**
* Get if this entity is in the process of converting to a Zombified Piglin.
*
* @return conversion status
*/
boolean isConverting();
/**
* Gets whether the piglin is a baby
*
* @return Whether the piglin is a baby
*/
public boolean isBaby();
/**
* Sets whether the piglin is a baby
*
* @param flag Whether the piglin is a baby
*/
public void setBaby(boolean flag);
}

View File

@@ -0,0 +1,65 @@
package org.bukkit.entity;
/**
* Piglin / Piglin Brute.
*/
public interface PiglinAbstract extends Monster {
/**
* Gets whether the piglin is immune to zombification.
*
* @return Whether the piglin is immune to zombification
*/
public boolean isImmuneToZombification();
/**
* Sets whether the piglin is immune to zombification.
*
* @param flag Whether the piglin is immune to zombification
*/
public void setImmuneToZombification(boolean flag);
/**
* Gets the amount of ticks until this entity will be converted to a
* Zombified Piglin.
*
* When this reaches 300, the entity will be converted.
*
* @return conversion time
* @throws IllegalStateException if {@link #isConverting()} is false.
*/
public int getConversionTime();
/**
* Sets the amount of ticks until this entity will be converted to a
* Zombified Piglin.
*
* 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.
*
* @param time new conversion time
*/
public void setConversionTime(int time);
/**
* Get if this entity is in the process of converting to a Zombified Piglin.
*
* @return conversion status
*/
boolean isConverting();
/**
* Gets whether the piglin is a baby
*
* @return Whether the piglin is a baby
*/
public boolean isBaby();
/**
* Sets whether the piglin is a baby
*
* @param flag Whether the piglin is a baby
*/
public void setBaby(boolean flag);
}

View File

@@ -0,0 +1,6 @@
package org.bukkit.entity;
/**
* Represents a Piglin Brute.
*/
public interface PiglinBrute extends PiglinAbstract { }

View File

@@ -50,6 +50,7 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Location> POTENTIAL_JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("potential_job_site"), Location.class);
public static final MemoryKey<Location> JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("job_site"), Location.class);
public static final MemoryKey<Location> MEETING_POINT = new MemoryKey<>(NamespacedKey.minecraft("meeting_point"), Location.class);
public static final MemoryKey<Boolean> GOLEM_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("golem_detected_recently"), Boolean.class);
public static final MemoryKey<Long> LAST_SLEPT = new MemoryKey<>(NamespacedKey.minecraft("last_slept"), Long.class);
public static final MemoryKey<Long> LAST_WOKEN = new MemoryKey<>(NamespacedKey.minecraft("last_woken"), Long.class);
public static final MemoryKey<Long> LAST_WORKED_AT_POI = new MemoryKey<>(NamespacedKey.minecraft("last_worked_at_poi"), Long.class);