public final class ObjectArrayMutableBiomeBuffer extends AbstractBiomeBuffer implements org.spongepowered.api.world.extent.MutableBiomeArea
BiomeGenBase
array.
Normally, the ByteArrayMutableBiomeBuffer
class uses memory more
efficiently, but when the BiomeGenBase
array is already created (for
example for a contract specified by Minecraft) this implementation becomes
more efficient.
end, size, start
Constructor and Description |
---|
ObjectArrayMutableBiomeBuffer(net.minecraft.world.biome.BiomeGenBase[] biomes,
com.flowpowered.math.vector.Vector2i start,
com.flowpowered.math.vector.Vector2i size)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
org.spongepowered.api.world.biome.BiomeType |
getBiome(int x,
int z) |
org.spongepowered.api.world.biome.BiomeType |
getBiome(com.flowpowered.math.vector.Vector2i position) |
org.spongepowered.api.world.extent.MutableBiomeArea |
getBiomeCopy(org.spongepowered.api.world.extent.StorageType type) |
org.spongepowered.api.world.extent.MutableBiomeArea |
getBiomeView(org.spongepowered.api.util.DiscreteTransform2 transform) |
org.spongepowered.api.world.extent.MutableBiomeArea |
getBiomeView(com.flowpowered.math.vector.Vector2i newMin,
com.flowpowered.math.vector.Vector2i newMax) |
org.spongepowered.api.world.extent.ImmutableBiomeArea |
getImmutableBiomeCopy() |
org.spongepowered.api.world.extent.MutableBiomeArea |
getRelativeBiomeView() |
org.spongepowered.api.world.extent.UnmodifiableBiomeArea |
getUnmodifiableBiomeView() |
void |
setBiome(int x,
int z,
org.spongepowered.api.world.biome.BiomeType biome) |
void |
setBiome(com.flowpowered.math.vector.Vector2i position,
org.spongepowered.api.world.biome.BiomeType biome) |
checkRange, containsBiome, containsBiome, getBiomeCopy, getBiomeMax, getBiomeMin, getBiomeSize, getIndex, toString
public ObjectArrayMutableBiomeBuffer(net.minecraft.world.biome.BiomeGenBase[] biomes, com.flowpowered.math.vector.Vector2i start, com.flowpowered.math.vector.Vector2i size)
biomes
- The biome array. The array is not copied, so changes made
by this object will write through.start
- The start positionsize
- The sizepublic org.spongepowered.api.world.biome.BiomeType getBiome(com.flowpowered.math.vector.Vector2i position)
getBiome
in interface org.spongepowered.api.world.extent.BiomeArea
public org.spongepowered.api.world.biome.BiomeType getBiome(int x, int z)
getBiome
in interface org.spongepowered.api.world.extent.BiomeArea
public void setBiome(com.flowpowered.math.vector.Vector2i position, org.spongepowered.api.world.biome.BiomeType biome)
setBiome
in interface org.spongepowered.api.world.extent.MutableBiomeArea
public void setBiome(int x, int z, org.spongepowered.api.world.biome.BiomeType biome)
setBiome
in interface org.spongepowered.api.world.extent.MutableBiomeArea
public org.spongepowered.api.world.extent.MutableBiomeArea getBiomeView(com.flowpowered.math.vector.Vector2i newMin, com.flowpowered.math.vector.Vector2i newMax)
getBiomeView
in interface org.spongepowered.api.world.extent.BiomeArea
getBiomeView
in interface org.spongepowered.api.world.extent.MutableBiomeArea
public org.spongepowered.api.world.extent.MutableBiomeArea getBiomeView(org.spongepowered.api.util.DiscreteTransform2 transform)
getBiomeView
in interface org.spongepowered.api.world.extent.BiomeArea
getBiomeView
in interface org.spongepowered.api.world.extent.MutableBiomeArea
public org.spongepowered.api.world.extent.MutableBiomeArea getRelativeBiomeView()
getRelativeBiomeView
in interface org.spongepowered.api.world.extent.BiomeArea
getRelativeBiomeView
in interface org.spongepowered.api.world.extent.MutableBiomeArea
public org.spongepowered.api.world.extent.UnmodifiableBiomeArea getUnmodifiableBiomeView()
getUnmodifiableBiomeView
in interface org.spongepowered.api.world.extent.BiomeArea
public org.spongepowered.api.world.extent.MutableBiomeArea getBiomeCopy(org.spongepowered.api.world.extent.StorageType type)
getBiomeCopy
in interface org.spongepowered.api.world.extent.BiomeArea
public org.spongepowered.api.world.extent.ImmutableBiomeArea getImmutableBiomeCopy()
getImmutableBiomeCopy
in interface org.spongepowered.api.world.extent.BiomeArea