Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
Use BiomeType here
Dieser Commit ist enthalten in:
Ursprung
33f5322fda
Commit
95c819684c
@ -9,6 +9,7 @@ import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import org.bukkit.ChunkSnapshot;
|
||||
import org.bukkit.block.Biome;
|
||||
@ -55,16 +56,16 @@ public class BukkitChunk_All_ReadonlySnapshot extends FaweChunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getBiomeArray() {
|
||||
public BiomeType[] getBiomeArray() {
|
||||
if (!hasBiomes || next.biomes == null) return null;
|
||||
BukkitImplAdapter adapter = getParent().getAdapter();
|
||||
byte[] biomes = Arrays.copyOf(next.biomes, next.biomes.length);
|
||||
BiomeType[] biomes = Arrays.copyOf(next.biomes, next.biomes.length);
|
||||
int index = 0;
|
||||
for (int z = 0; z < 16; z++) {
|
||||
for (int x = 0; x < 16; x++, index++) {
|
||||
if (biomes[index] != 0) {
|
||||
if (biomes[index] != null) {
|
||||
Biome biome = snapshot.getBiome(x, z);
|
||||
biomes[index] = (byte) adapter.getBiomeId(biome);
|
||||
biomes[index] = adapter.adapt(biome);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,7 +141,7 @@ public class BukkitChunk_All_ReadonlySnapshot extends FaweChunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBiome(int x, int z, byte biome) {
|
||||
public void setBiome(int x, int z, BiomeType biome) {
|
||||
throw new UnsupportedOperationException("Read only");
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
@ -230,9 +231,9 @@ public class BukkitQueue_All extends BukkitQueue_0<ChunkSnapshot, ChunkSnapshot,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBiome(ChunkSnapshot chunkSnapshot, int x, int z) {
|
||||
public BiomeType getBiome(ChunkSnapshot chunkSnapshot, int x, int z) {
|
||||
Biome biome = chunkSnapshot.getBiome(x & 15, z & 15);
|
||||
return getAdapter().getBiomeId(biome);
|
||||
return getAdapter().adapt(biome);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren