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


Java BaseBlock.getCombined方法代码示例

本文整理汇总了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;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:23,代码来源:RandomTextureUtil.java

示例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;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:11,代码来源:ClipboardRemapper.java

示例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;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:12,代码来源:TextureUtil.java

示例4: getColor

import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public int getColor(BaseBlock block) {
    return blockColors[block.getCombined()];
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:4,代码来源:TextureUtil.java

示例5: addReplace

import com.sk89q.worldedit.blocks.BaseBlock; //导入方法依赖的package包/类
public void addReplace(BaseBlock block, Pattern pattern) {
    map[block.getCombined()] = pattern;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:4,代码来源:MappedReplacePatternFilter.java


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