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


Java EntityTypes.ITEM_FRAME属性代码示例

本文整理汇总了Java中org.spongepowered.api.entity.EntityTypes.ITEM_FRAME属性的典型用法代码示例。如果您正苦于以下问题:Java EntityTypes.ITEM_FRAME属性的具体用法?Java EntityTypes.ITEM_FRAME怎么用?Java EntityTypes.ITEM_FRAME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.spongepowered.api.entity.EntityTypes的用法示例。


在下文中一共展示了EntityTypes.ITEM_FRAME属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeEntity

@Override
public void removeEntity(WarCuboid cuboid, WarEntity type) {
    Location<World> pos1 = getSpongeLocation(cuboid.getCorner1());
    for (Entity entity : pos1.getExtent().getEntities()) {
        WarLocation loc = getWarLocation(entity.getLocation());
        if (!cuboid.contains(loc)) {
            continue;
        }
        WarEntity thisType = WarEntity.UNKNOWN;
        if (entity.getType() == EntityTypes.ITEM) {
            thisType = WarEntity.ITEM;
        }
        if (entity.getType() == EntityTypes.PRIMED_TNT) {
            thisType = WarEntity.TNT;
        }
        if (entity.getType() == EntityTypes.ARMOR_STAND || entity.getType() == EntityTypes.PAINTING
                || entity.getType() == EntityTypes.ITEM_FRAME) {
            thisType = WarEntity.PROP;
        }
        if (thisType == type) {
            entity.remove();
        }
    }
}
 
开发者ID:cmastudios,项目名称:war-sponge,代码行数:24,代码来源:WarPlugin.java

示例2: updateType

private void updateType(@Nullable Entity entity, EntityType type) {
    if(type == EntityTypes.BOAT) {
        this.type = 1;
    } else if(type == EntityTypes.ITEM) {
        this.type = 2;
    } else if(type == EntityTypes.AREA_EFFECT_CLOUD) {
        this.type = 3;
    } else if(type == EntityTypes.RIDEABLE_MINECART) {
        this.type = 10;
        this.data = Type.RIDEABLE.getId();
    } else if(type == EntityTypes.CHESTED_MINECART) {
        this.type = 10;
        this.data = Type.CHEST.getId();
    } else if(type == EntityTypes.FURNACE_MINECART) {
        this.type = 10;
        this.data = Type.FURNACE.getId();
    } else if(type == EntityTypes.TNT_MINECART) {
        this.type = 10;
        this.data = Type.TNT.getId();
    } else if(type == EntityTypes.MOB_SPAWNER_MINECART) {
        this.type = 10;
        this.data = Type.SPAWNER.getId();
    } else if(type == EntityTypes.HOPPER_MINECART) {
        this.type = 10;
        this.data = Type.HOPPER.getId();
    } else if(type == EntityTypes.COMMANDBLOCK_MINECART) {
        this.type = 10;
        this.data = Type.COMMAND_BLOCK.getId();
    } else if(type == EntityTypes.PRIMED_TNT) {
        this.type = 50;
    } else if(type == EntityTypes.ENDER_CRYSTAL) {
        this.type = 51;
    } else if(type == EntityTypes.TIPPED_ARROW) {
        this.type = 60;
    } else if(type == EntityTypes.SNOWBALL) {
        this.type = 61;
    } else if(type == EntityTypes.EGG) {
        this.type = 62;
    } else if(type == EntityTypes.FIREBALL) {
        this.type = 63;
    } else if(type == EntityTypes.SMALL_FIREBALL) {
        this.type = 64;
    } else if(type == EntityTypes.ENDER_PEARL) {
        this.type = 65;
    } else if(type == EntityTypes.WITHER_SKULL) {
        this.type = 66;
    } else if(type == EntityTypes.SHULKER_BULLET) {
        this.type = 67;
    } else if(type == EntityTypes.LLAMA_SPIT) {
        this.type = 68;
    } else if(type == EntityTypes.FALLING_BLOCK) {
        this.type = 70;
    } else if(type == EntityTypes.ITEM_FRAME) {
        this.type = 71;
    } else if(type == EntityTypes.EYE_OF_ENDER) {
        this.type = 72;
    } else if(type == EntityTypes.SPLASH_POTION) {
        this.type = 73;
    } else if(type == EntityTypes.THROWN_EXP_BOTTLE) {
        this.type = 75;
    } else if(type == EntityTypes.FIREWORK) {
        this.type = 76;
    } else if(type == EntityTypes.LEASH_HITCH) {
        this.type = 77;
    } else if(type == EntityTypes.ARMOR_STAND) {
        this.type = 78;
    } else if(type == EntityTypes.EVOCATION_FANGS) {
        this.type = 79;
    } else if(type == EntityTypes.FISHING_HOOK) {
        this.type = 90;
    } else if(type == EntityTypes.SPECTRAL_ARROW) {
        this.type = 91;
    } else if(type == EntityTypes.DRAGON_FIREBALL) {
        this.type = 93;
    }
}
 
开发者ID:Guichaguri,项目名称:PacketControl,代码行数:76,代码来源:MixinPacketSpawnObject.java


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