本文整理汇总了Java中net.canarymod.api.entity.hanging.LeashKnot类的典型用法代码示例。如果您正苦于以下问题:Java LeashKnot类的具体用法?Java LeashKnot怎么用?Java LeashKnot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LeashKnot类属于net.canarymod.api.entity.hanging包,在下文中一共展示了LeashKnot类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEntityClass
import net.canarymod.api.entity.hanging.LeashKnot; //导入依赖的package包/类
public static Class<? extends Entity> getEntityClass(final String entity) {
Class<? extends Entity> entityClass = null;
if ("minecraft:armor_stand".equals(entity)) {
entityClass = ArmorStand.class;
} else if ("minecraft:item_frame".equals(entity)) {
entityClass = ItemFrame.class;
} else if ("minecraft:leash_knot".equals(entity)) {
entityClass = LeashKnot.class;
} else if ("minecraft:painting".equals(entity)) {
entityClass = Painting.class;
} else if ("minecraft:entity_animal".equals(entity)) {
entityClass = EntityAnimal.class;
} else if ("minecraft:villager".equals(entity)) {
entityClass = Villager.class;
} else if ("minecraft:entity_mob".equals(entity)) {
entityClass = EntityMob.class;
} else if ("minecraft:vehicle".equals(entity)) {
entityClass = Vehicle.class;
}
return entityClass;
}
示例2: getEntity
import net.canarymod.api.entity.hanging.LeashKnot; //导入依赖的package包/类
public static String getEntity(final Class<? extends Entity> entityClass) {
String entity = null;
if (entityClass == ArmorStand.class) {
entity = "minecraft:armor_stand";
} else if (entityClass == ItemFrame.class) {
entity = "minecraft:item_frame";
} else if (entityClass == LeashKnot.class) {
entity = "minecraft:leash_knot";
} else if (entityClass == Painting.class) {
entity = "minecraft:painting";
} else if (entityClass == EntityAnimal.class) {
entity = "minecraft:entity_animal";
} else if (entityClass == Villager.class) {
entity = "minecraft:villager";
} else if (entityClass == EntityMob.class) {
entity = "minecraft:entity_mob";
} else if (entityClass == Vehicle.class) {
entity = "minecraft:vehicle";
}
return entity;
}