mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
More code quality fixes
This commit is contained in:
@ -15,7 +15,6 @@ import io.papermc.lib.PaperLib;
|
||||
import net.jpountz.util.UnsafeUtils;
|
||||
import net.minecraft.server.v1_13_R2.Block;
|
||||
import net.minecraft.server.v1_13_R2.Chunk;
|
||||
import net.minecraft.server.v1_13_R2.ChunkCoordIntPair;
|
||||
import net.minecraft.server.v1_13_R2.ChunkSection;
|
||||
import net.minecraft.server.v1_13_R2.DataBits;
|
||||
import net.minecraft.server.v1_13_R2.DataPalette;
|
||||
@ -30,7 +29,6 @@ import org.bukkit.craftbukkit.v1_13_R2.CraftWorld;
|
||||
import sun.misc.Unsafe;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@ -210,8 +208,8 @@ public final class BukkitAdapter_1_13 extends NMSAdapter {
|
||||
}
|
||||
final int[] blockToPalette = FaweCache.INSTANCE.getBLOCK_TO_PALETTE().get();
|
||||
final int[] paletteToBlock = FaweCache.INSTANCE.getPALETTE_TO_BLOCK().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBlockStates().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
|
||||
try {
|
||||
int[] num_palette_buffer = new int[1];
|
||||
int air;
|
||||
|
@ -30,7 +30,6 @@ import org.bukkit.craftbukkit.v1_14_R1.CraftWorld;
|
||||
import sun.misc.Unsafe;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@ -203,8 +202,8 @@ public final class BukkitAdapter_1_14 extends NMSAdapter {
|
||||
}
|
||||
final int[] blockToPalette = FaweCache.INSTANCE.getBLOCK_TO_PALETTE().get();
|
||||
final int[] paletteToBlock = FaweCache.INSTANCE.getPALETTE_TO_BLOCK().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBlockStates().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
|
||||
try {
|
||||
int[] num_palette_buffer = new int[1];
|
||||
int air;
|
||||
|
@ -181,8 +181,8 @@ public final class BukkitAdapter_1_15 extends NMSAdapter {
|
||||
}
|
||||
final int[] blockToPalette = FaweCache.INSTANCE.getBLOCK_TO_PALETTE().get();
|
||||
final int[] paletteToBlock = FaweCache.INSTANCE.getPALETTE_TO_BLOCK().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
|
||||
final long[] blockStates = FaweCache.INSTANCE.getBlockStates().get();
|
||||
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
|
||||
try {
|
||||
int[] num_palette_buffer = new int[1];
|
||||
int air;
|
||||
|
@ -96,7 +96,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
BiomeStorage index = getChunk().getBiomeIndex();
|
||||
BiomeBase base = null;
|
||||
if (y == -1) {
|
||||
for (y = 0; y < FaweCache.WORLD_HEIGHT; y++) {
|
||||
for (y = 0; y < FaweCache.worldHeight; y++) {
|
||||
base = index.getBiome(x, y, z);
|
||||
if (base != null) break;
|
||||
}
|
||||
@ -324,7 +324,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
if (biome != null) {
|
||||
final Biome craftBiome = BukkitAdapter.adapt(biome);
|
||||
BiomeBase nmsBiome = CraftBlock.biomeToBiomeBase(craftBiome);
|
||||
for (int y = 0; y < FaweCache.WORLD_HEIGHT; y++) {
|
||||
for (int y = 0; y < FaweCache.worldHeight; y++) {
|
||||
currentBiomes.setBiome(x, y, z, nmsBiome);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user