当前位置: 首页>>代码示例>>Java>>正文


Java LeashKnot类代码示例

本文整理汇总了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;
}
 
开发者ID:toddharrison,项目名称:Zown,代码行数:22,代码来源:MinecraftMapper.java

示例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;
}
 
开发者ID:toddharrison,项目名称:Zown,代码行数:22,代码来源:MinecraftMapper.java


注:本文中的net.canarymod.api.entity.hanging.LeashKnot类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。