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


Java UnsafeList类代码示例

本文整理汇总了Java中org.bukkit.craftbukkit.util.UnsafeList的典型用法代码示例。如果您正苦于以下问题:Java UnsafeList类的具体用法?Java UnsafeList怎么用?Java UnsafeList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: b

import org.bukkit.craftbukkit.util.UnsafeList; //导入依赖的package包/类
private boolean b(PathfinderGoalSelectorItem pathfindergoalselectoritem) {
    this.d.a("canUse");
    Iterator iterator = this.b.iterator();

    while (iterator.hasNext()) {
        PathfinderGoalSelectorItem pathfindergoalselectoritem1 = (PathfinderGoalSelectorItem) iterator.next();

        if (pathfindergoalselectoritem1 != pathfindergoalselectoritem) {
            if (pathfindergoalselectoritem.b >= pathfindergoalselectoritem1.b) {
                // CraftBukkit - switch order
                if (!this.a(pathfindergoalselectoritem, pathfindergoalselectoritem1) && this.c.contains(pathfindergoalselectoritem1)) {
                    this.d.b();
                    ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                    return false;
                }
                // CraftBukkit - switch order
            } else if (!pathfindergoalselectoritem1.a.i() && this.c.contains(pathfindergoalselectoritem1)) {
                this.d.b();
                ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                return false;
            }
        }
    }

    this.d.b();
    return true;
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:28,代码来源:PathfinderGoalSelector.java

示例2: b

import org.bukkit.craftbukkit.util.UnsafeList; //导入依赖的package包/类
private boolean b(PathfinderGoalSelectorItem pathfindergoalselectoritem) {
    this.c.a("canUse");
    Iterator iterator = this.a.iterator();

    while (iterator.hasNext()) {
        PathfinderGoalSelectorItem pathfindergoalselectoritem1 = (PathfinderGoalSelectorItem) iterator.next();

        if (pathfindergoalselectoritem1 != pathfindergoalselectoritem) {
            if (pathfindergoalselectoritem.b >= pathfindergoalselectoritem1.b) {
                // CraftBukkit - switch order
                if (!this.a(pathfindergoalselectoritem, pathfindergoalselectoritem1) && this.b.contains(pathfindergoalselectoritem1)) {
                    this.c.b();
                    ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                    return false;
                }
                // CraftBukkit - switch order
            } else if (!pathfindergoalselectoritem1.a.i() && this.b.contains(pathfindergoalselectoritem1)) {
                this.c.b();
                ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                return false;
            }
        }
    }

    this.c.b();
    return true;
}
 
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:28,代码来源:PathfinderGoalSelector.java

示例3: b

import org.bukkit.craftbukkit.util.UnsafeList; //导入依赖的package包/类
private boolean b(PathfinderGoalSelectorItem pathfindergoalselectoritem) {
    this.c.a("canUse");
    Iterator iterator = this.a.iterator();

    while (iterator.hasNext()) {
        PathfinderGoalSelectorItem pathfindergoalselectoritem1 = (PathfinderGoalSelectorItem) iterator.next();

        if (pathfindergoalselectoritem1 != pathfindergoalselectoritem) {
            if (pathfindergoalselectoritem.b >= pathfindergoalselectoritem1.b) {
                // CraftBukkit - switch order
                if (!this.a(pathfindergoalselectoritem, pathfindergoalselectoritem1) && this.b.contains(pathfindergoalselectoritem1)) {
                    this.c.b();
                    ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                    return false;
                }
            // CraftBukkit - switch order
            } else if (!pathfindergoalselectoritem1.a.i() && this.b.contains(pathfindergoalselectoritem1)) {
                this.c.b();
                ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
                return false;
            }
        }
    }

    this.c.b();
    return true;
}
 
开发者ID:didoupimpon,项目名称:Craft-city,代码行数:28,代码来源:PathfinderGoalSelector.java


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