本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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());
}
示例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);
}
}
示例6: getDefaultGenerator
import com.intellectualcrafters.plot.generator.HybridGen; //导入依赖的package包/类
@Override
public IndependentPlotGenerator getDefaultGenerator() {
return new HybridGen();
}