Java 类net.minecraft.server.EntityTypes 实例源码

项目:ProjectAres    文件:NMSHacks.java   
public static String getTranslationKey(Entity entity) {
    if(entity instanceof TNTPrimed) {
        return "tile.tnt.name";
    } else if(entity instanceof Egg) {
        return "item.egg.name";
    } else {
        final String id = EntityTypes.b(((CraftEntity) entity).getHandle());
        return "entity." + (id != null ? id : "generic") + ".name";
    }
}
项目:CraftBukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
    MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId()));

    if (monsteregginfo != null) {
        return monsteregginfo.killEntityStatistic;
    }
    return null;
}
项目:Craftbukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
    MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId()));

    if (monsteregginfo != null) {
        return monsteregginfo.killEntityStatistic;
    }
    return null;
}
项目:Tweakkit-Server    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
    MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId()));

    if (monsteregginfo != null) {
        return monsteregginfo.killEntityStatistic;
    }
    return null;
}
项目:SpigotSource    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
    MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(entity.getName());

    if (monsteregginfo != null) {
        if (stat == org.bukkit.Statistic.KILL_ENTITY) {
            return monsteregginfo.killEntityStatistic;
        }
        if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) {
            return monsteregginfo.killedByEntityStatistic;
        }
    }
    return null;
}