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


Java HybridGen类代码示例

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


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

示例1: PlotTrimFilter

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
public PlotTrimFilter(World world, long fileDuration, long inhabitedTicks, long chunkInactivity) {
    super(fileDuration, inhabitedTicks, chunkInactivity);
    String worldName = Fawe.imp().getWorldName(world);
    PlotArea area = PS.get().getPlotAreaByString(worldName);
    IndependentPlotGenerator gen = area.getGenerator();
    if (!(area instanceof HybridPlotWorld) || !(gen instanceof HybridGen)) {
        throw new UnsupportedOperationException("Trim does not support non hybrid plot worlds");
    }
    this.hg = (HybridGen) gen;
    this.hpw = (HybridPlotWorld) area;
    if (hpw.PLOT_SCHEMATIC || hpw.MAIN_BLOCK.length != 1 || hpw.TOP_BLOCK.length != 1) {
        throw new UnsupportedOperationException("WIP - will implement later");
    }
    this.occupiedRegions = new LongHashSet();
    this.unoccupiedChunks = new LongHashSet();

    this.reference = calculateReference();

    this.calculateClaimedArea();
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:21,代码来源:PlotTrimFilter.java

示例2: getDefaultWorldGenerator

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
@Override
final public ChunkGenerator getDefaultWorldGenerator(final String world, final String id) {
    WorldEvents.lastWorld = world;
    if (!PlotSquared.setupPlotWorld(world, id)) {
        return null;
    }
    HybridGen result = new HybridGen(world);
    TaskManager.runTaskLater(new Runnable() {
        @Override
        public void run() {
            if (WorldEvents.lastWorld != null && WorldEvents.lastWorld.equals(world)) {
                WorldEvents.lastWorld = null;
            }
        }
    }, 20);
    return result;
}
 
开发者ID:Mayomi,项目名称:PlotSquared-Chinese,代码行数:18,代码来源:BukkitMain.java

示例3: shouldSuggest

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
public static boolean shouldSuggest(PlotArea area) {
    IndependentPlotGenerator gen = area.getGenerator();
    if (area instanceof HybridPlotWorld && gen instanceof HybridGen) {
        HybridPlotWorld hpw = (HybridPlotWorld) area;
        return hpw.PLOT_BEDROCK && !hpw.PLOT_SCHEMATIC && hpw.MAIN_BLOCK.length == 1 && hpw.TOP_BLOCK.length == 1;
    }
    return false;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:9,代码来源:PlotTrimFilter.java

示例4: displayGenerators

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
public void displayGenerators(PlotPlayer plr) {
    StringBuffer message = new StringBuffer();
    message.append("&6你想要生成什么类型地皮?");
    for (Entry<String, ChunkGenerator> entry : SetupUtils.generators.entrySet()) {
        if (entry.getKey().equals("PlotSquared")) {
            message.append("\n&8 - &2" + entry.getKey() + " (默认生成参数)");
        }
        else if (entry.getValue() instanceof HybridGen) {
            message.append("\n&8 - &7" + entry.getKey() + " (混合生成参数)");
        }
        else if (entry.getValue() instanceof PlotGenerator) {
            message.append("\n&8 - &7" + entry.getKey() + " (高级地皮生成参数)");
        }
        else {
            message.append("\n&8 - &7" + entry.getKey() + " (其他生成参数)");
        }
    }
    MainUtil.sendMessage(plr, message.toString());
}
 
开发者ID:Mayomi,项目名称:PlotSquared-Chinese,代码行数:20,代码来源:DebugSetup.java

示例5: getGenerator

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
@Override
public ChunkGenerator getGenerator(final String world, final String name) {
    final Plugin gen_plugin = Bukkit.getPluginManager().getPlugin(name);
    if ((gen_plugin != null) && gen_plugin.isEnabled()) {
        return gen_plugin.getDefaultWorldGenerator(world, "");
    } else {
        return new HybridGen(world);
    }
}
 
开发者ID:Mayomi,项目名称:PlotSquared-Chinese,代码行数:10,代码来源:BukkitMain.java

示例6: getDefaultGenerator

import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
@Override
public IndependentPlotGenerator getDefaultGenerator() {
    return new HybridGen();
}
 
开发者ID:IntellectualSites,项目名称:PlotSquared,代码行数:5,代码来源:BukkitMain.java


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