mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix 1.16.2 support
This commit is contained in:
parent
6cb8352686
commit
7cf88aff65
@ -84,7 +84,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks {
|
|||||||
} else {
|
} else {
|
||||||
base = index.getBiome(x >> 2, y >> 2, z >> 2);
|
base = index.getBiome(x >> 2, y >> 2, z >> 2);
|
||||||
}
|
}
|
||||||
return base != null ? BukkitAdapter.adapt(CraftBlock.biomeBaseToBiome(base)) : null;
|
return base != null ? BukkitAdapter.adapt(CraftBlock.biomeBaseToBiome(world.r().b(IRegistry.ay), base)) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -350,7 +350,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks {
|
|||||||
final BiomeType biome = biomes[i];
|
final BiomeType biome = biomes[i];
|
||||||
if (biome != null) {
|
if (biome != null) {
|
||||||
final Biome craftBiome = BukkitAdapter.adapt(biome);
|
final Biome craftBiome = BukkitAdapter.adapt(biome);
|
||||||
BiomeBase nmsBiome = CraftBlock.biomeToBiomeBase(craftBiome);
|
BiomeBase nmsBiome = CraftBlock.biomeToBiomeBase(nmsWorld.r().b(IRegistry.ay) ,craftBiome);
|
||||||
for (int y = 0; y < FaweCache.IMP.WORLD_HEIGHT; y++) {
|
for (int y = 0; y < FaweCache.IMP.WORLD_HEIGHT; y++) {
|
||||||
currentBiomes.setBiome(x >> 2, y >> 2, z >> 2, nmsBiome);
|
currentBiomes.setBiome(x >> 2, y >> 2, z >> 2, nmsBiome);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
|||||||
import net.minecraft.server.v1_16_R2.*;
|
import net.minecraft.server.v1_16_R2.*;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Server;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.craftbukkit.v1_16_R2.CraftChunk;
|
import org.bukkit.craftbukkit.v1_16_R2.CraftChunk;
|
||||||
import org.bukkit.craftbukkit.v1_16_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_16_R2.CraftWorld;
|
||||||
@ -449,7 +450,7 @@ public final class FAWE_Spigot_v1_16_R2 extends CachedBukkitAdapter implements I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInternalBiomeId(BiomeType biome) {
|
public int getInternalBiomeId(BiomeType biome) {
|
||||||
BiomeBase base = CraftBlock.biomeToBiomeBase(BukkitAdapter.adapt(biome));
|
BiomeBase base = CraftBlock.biomeToBiomeBase(MinecraftServer.getServer().aX().b(IRegistry.ay),BukkitAdapter.adapt(biome));
|
||||||
return IRegistry.BIOME.a(base);
|
return MinecraftServer.getServer().aX().b(IRegistry.ay).a(base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user