public final class ByteArrayMutableBiomeBuffer extends AbstractBiomeBuffer implements org.spongepowered.api.world.extent.MutableBiomeArea
Using detach()
the underlying byte array can be accessed.
The byte array can then be reused by calling reuse(Vector2i)
.
end, size, start
Constructor and Description |
---|
ByteArrayMutableBiomeBuffer(byte[] biomes,
com.flowpowered.math.vector.Vector2i start,
com.flowpowered.math.vector.Vector2i size) |
ByteArrayMutableBiomeBuffer(com.flowpowered.math.vector.Vector2i start,
com.flowpowered.math.vector.Vector2i size) |
Modifier and Type | Method and Description |
---|---|
byte[] |
detach()
Gets the internal byte array, and prevents further of it through this
object uses until
reuse(Vector2i) is called. |
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() |
boolean |
isDetached()
Gets whether this biome area is currently detached.
|
void |
reuse(com.flowpowered.math.vector.Vector2i start)
Changes the bounds of this biome area, so that it can be reused for
another chunk.
|
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 ByteArrayMutableBiomeBuffer(com.flowpowered.math.vector.Vector2i start, com.flowpowered.math.vector.Vector2i size)
public ByteArrayMutableBiomeBuffer(byte[] biomes, com.flowpowered.math.vector.Vector2i start, com.flowpowered.math.vector.Vector2i size)
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.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 byte[] detach()
reuse(Vector2i)
is called.public boolean isDetached()
reuse(Vector2i)
.public void reuse(com.flowpowered.math.vector.Vector2i start)
start
- New start position.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