@@ -197,22 +197,6 @@ public interface ArmorStand extends LivingEntity {
|
||||
*/
|
||||
void setBasePlate(boolean basePlate);
|
||||
|
||||
/**
|
||||
* Returns whether gravity applies to
|
||||
* this armor stand
|
||||
*
|
||||
* @return whether gravity applies
|
||||
*/
|
||||
boolean hasGravity();
|
||||
|
||||
/**
|
||||
* Sets whether gravity applies to
|
||||
* this armor stand
|
||||
*
|
||||
* @param gravity whether gravity should apply
|
||||
*/
|
||||
void setGravity(boolean gravity);
|
||||
|
||||
/**
|
||||
* Returns whether the armor stand should be
|
||||
* visible or not
|
||||
|
||||
@@ -389,4 +389,18 @@ public interface Entity extends Metadatable, CommandSender {
|
||||
* @param flag if the entity is silent
|
||||
*/
|
||||
public void setSilent(boolean flag);
|
||||
|
||||
/**
|
||||
* Returns whether gravity applies to this entity.
|
||||
*
|
||||
* @return whether gravity applies
|
||||
*/
|
||||
boolean hasGravity();
|
||||
|
||||
/**
|
||||
* Sets whether gravity applies to this entity.
|
||||
*
|
||||
* @param gravity whether gravity should apply
|
||||
*/
|
||||
void setGravity(boolean gravity);
|
||||
}
|
||||
|
||||
@@ -169,6 +169,7 @@ public enum EntityType {
|
||||
IRON_GOLEM("VillagerGolem", IronGolem.class, 99),
|
||||
HORSE("EntityHorse", Horse.class, 100),
|
||||
RABBIT("Rabbit", Rabbit.class, 101),
|
||||
POLAR_BEAR("PolarBear", PolarBear.class, 102),
|
||||
VILLAGER("Villager", Villager.class, 120),
|
||||
ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200),
|
||||
// These don't have an entity ID in nms.EntityTypes.
|
||||
|
||||
6
paper-api/src/main/java/org/bukkit/entity/PolarBear.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/PolarBear.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a polar bear.
|
||||
*/
|
||||
public interface PolarBear extends Animals {}
|
||||
@@ -23,43 +23,18 @@ public interface Skeleton extends Monster {
|
||||
* Represents the various different Skeleton types.
|
||||
*/
|
||||
public enum SkeletonType {
|
||||
NORMAL(0),
|
||||
WITHER(1);
|
||||
|
||||
private static final SkeletonType[] types = new SkeletonType[SkeletonType.values().length];
|
||||
private final int id;
|
||||
|
||||
static {
|
||||
for (SkeletonType type : values()) {
|
||||
types[type.getId()] = type;
|
||||
}
|
||||
}
|
||||
|
||||
private SkeletonType(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of this skeleton type.
|
||||
*
|
||||
* @return Skeleton type ID
|
||||
* @deprecated Magic value
|
||||
* Standard skeleton type.
|
||||
*/
|
||||
@Deprecated
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
NORMAL,
|
||||
/**
|
||||
* Gets a skeleton type by its ID.
|
||||
*
|
||||
* @param id ID of the skeleton type to get.
|
||||
* @return Resulting skeleton type, or null if not found.
|
||||
* @deprecated Magic value
|
||||
* Wither skeleton. Generally found in Nether fortresses.
|
||||
*/
|
||||
@Deprecated
|
||||
public static SkeletonType getType(int id) {
|
||||
return (id >= types.length) ? null : types[id];
|
||||
}
|
||||
WITHER,
|
||||
/**
|
||||
* Stray skeleton. Generally found in ice biomes. Shoots tipped arrows.
|
||||
*/
|
||||
STRAY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,48 +111,36 @@ public interface Villager extends Ageable, NPC, InventoryHolder {
|
||||
|
||||
/**
|
||||
* Represents the various different Villager professions there may be.
|
||||
* Villagers have different trading options depending on their profession,
|
||||
*/
|
||||
public enum Profession {
|
||||
FARMER(0),
|
||||
LIBRARIAN(1),
|
||||
PRIEST(2),
|
||||
BLACKSMITH(3),
|
||||
BUTCHER(4);
|
||||
|
||||
private static final Profession[] professions = new Profession[Profession.values().length];
|
||||
private final int id;
|
||||
|
||||
static {
|
||||
for (Profession type : values()) {
|
||||
professions[type.getId()] = type;
|
||||
}
|
||||
}
|
||||
|
||||
private Profession(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of this profession.
|
||||
*
|
||||
* @return Profession ID.
|
||||
* @deprecated Magic value
|
||||
* Villager without a profession.
|
||||
*/
|
||||
@Deprecated
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
NORMAL,
|
||||
/**
|
||||
* Gets a profession by its ID.
|
||||
*
|
||||
* @param id ID of the profession to get.
|
||||
* @return Resulting profession, or null if not found.
|
||||
* @deprecated Magic value
|
||||
* Farmer profession. Wears a brown robe.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Profession getProfession(int id) {
|
||||
return (id >= professions.length) ? null : professions[id];
|
||||
}
|
||||
FARMER,
|
||||
/**
|
||||
* Librarian profession. Wears a white robe.
|
||||
*/
|
||||
LIBRARIAN,
|
||||
/**
|
||||
* Priest profession. Wears a purple robe.
|
||||
*/
|
||||
PRIEST,
|
||||
/**
|
||||
* Blacksmith profession. Wears a black apron.
|
||||
*/
|
||||
BLACKSMITH,
|
||||
/**
|
||||
* Butcher profession. Wears a white apron.
|
||||
*/
|
||||
BUTCHER,
|
||||
/**
|
||||
* Really a zombie.
|
||||
*/
|
||||
HUSK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user