本文整理汇总了Java中org.bukkit.craftbukkit.block.CraftBlock.biomeToBiomeBase方法的典型用法代码示例。如果您正苦于以下问题:Java CraftBlock.biomeToBiomeBase方法的具体用法?Java CraftBlock.biomeToBiomeBase怎么用?Java CraftBlock.biomeToBiomeBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.craftbukkit.block.CraftBlock
的用法示例。
在下文中一共展示了CraftBlock.biomeToBiomeBase方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
net.minecraft.world.biome.BiomeGenBase bb = CraftBlock.biomeToBiomeBase(bio);
if (this.world.blockExists(x, 0, z)) {
net.minecraft.world.chunk.Chunk chunk = this.world.getChunkFromBlockCoords(x, z);
if (chunk != null) {
byte[] biomevals = chunk.getBiomeArray();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.biomeID;
}
}
}
示例2: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
BiomeBase bb = CraftBlock.biomeToBiomeBase(bio);
if (this.world.isLoaded(x, 0, z)) {
net.minecraft.server.Chunk chunk = this.world.getChunkAtWorldCoords(x, z);
if (chunk != null) {
byte[] biomevals = chunk.m();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.id;
}
}
}
示例3: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
BiomeBase bb = CraftBlock.biomeToBiomeBase(bio);
if (this.world.isLoaded(new BlockPosition(x, 0, z))) {
net.minecraft.server.Chunk chunk = this.world.getChunkAtWorldCoords(new BlockPosition(x, 0, z));
if (chunk != null) {
byte[] biomevals = chunk.getBiomeIndex();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.id;
}
}
}
示例4: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
BiomeBase bb = CraftBlock.biomeToBiomeBase(bio);
if (this.world.isLoaded(new BlockPosition(x, 0, z))) {
net.minecraft.server.Chunk chunk = this.world.getChunkAtWorldCoords(new BlockPosition(x, 0, z));
if (chunk != null) {
byte[] biomevals = chunk.getBiomeIndex();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte) BiomeBase.REGISTRY_ID.a(bb);
}
}
}
示例5: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
net.minecraft.world.biome.BiomeGenBase bb = CraftBlock.biomeToBiomeBase(bio);
if (this.world.func_72899_e(x, 0, z)) {
net.minecraft.world.chunk.Chunk chunk = this.world.func_72938_d(x, z);
if (chunk != null) {
byte[] biomevals = chunk.func_76605_m();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.field_76756_M;
}
}
}
示例6: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
public void setBiome(int x, int z, Biome bio) {
biome[(z << 4) | x] = CraftBlock.biomeToBiomeBase(bio);
}
示例7: setBiome
import org.bukkit.craftbukkit.block.CraftBlock; //导入方法依赖的package包/类
@Override
public void setBiome(int x, int z, Biome bio) {
biome[(z << 4) | x] = CraftBlock.biomeToBiomeBase(bio);
}