本文整理汇总了Java中com.sk89q.worldedit.blocks.BaseBlock.getCombined方法的典型用法代码示例。如果您正苦于以下问题:Java BaseBlock.getCombined方法的具体用法?Java BaseBlock.getCombined怎么用?Java BaseBlock.getCombined使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sk89q.worldedit.blocks.BaseBlock
的用法示例。
在下文中一共展示了BaseBlock.getCombined方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIsBlockCloserThanBiome
import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
@Override
public boolean getIsBlockCloserThanBiome(int[] blockAndBiomeIdOutput, int color, int biomePriority) {
BaseBlock block = getNearestBlock(color);
int[] mix = biomeMixes.getOrDefault(color, null);
if (mix == null) {
int average = getBiomeMix(biomeMixBuffer, color);
mix = new int[4];
System.arraycopy(biomeMixBuffer, 0, mix, 0, 3);
mix[3] = average;
biomeMixes.put(color, mix);
}
if (++index > 2) index = 0;
int biomeId = mix[index];
int biomeAvColor = mix[3];
int blockColor = getColor(block);
blockAndBiomeIdOutput[0] = block.getCombined();
blockAndBiomeIdOutput[1] = biomeId;
if (colorDistance(biomeAvColor, color) - biomePriority > colorDistance(blockColor, color)) {
return true;
}
return false;
}
示例2: remap
import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public BaseBlock remap(BaseBlock block) {
int combined = block.getCombined();
if (remap[combined]) {
char value = remapCombined[combined];
BaseBlock newBlock = FaweCache.CACHE_BLOCK[value];
newBlock.setNbtData(block.getNbtData());
return newBlock;
}
return block;
}
示例3: getIsBlockCloserThanBiome
import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public boolean getIsBlockCloserThanBiome(int[] blockAndBiomeIdOutput, int color, int biomePriority) {
BaseBlock block = getNearestBlock(color);
TextureUtil.BiomeColor biome = getNearestBiome(color);
int blockColor = getColor(block);
blockAndBiomeIdOutput[0] = block.getCombined();
blockAndBiomeIdOutput[1] = biome.id;
if (colorDistance(biome.grassCombined, color) - biomePriority > colorDistance(blockColor, color)) {
return true;
}
return false;
}
示例4: getColor
import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public int getColor(BaseBlock block) {
return blockColors[block.getCombined()];
}
示例5: addReplace
import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public void addReplace(BaseBlock block, Pattern pattern) {
map[block.getCombined()] = pattern;
}