Revert "More code quality fixes"

This reverts commit 2d6957ce
This commit is contained in:
MattBDev
2020-01-23 14:41:57 -05:00
parent 37003ec089
commit e0f6869573
115 changed files with 1688 additions and 686 deletions

View File

@ -15,6 +15,7 @@ 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;
@ -29,6 +30,7 @@ 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;
@ -208,8 +210,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.getBlockStates().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
try {
int[] num_palette_buffer = new int[1];
int air;

View File

@ -30,6 +30,7 @@ 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;
@ -202,8 +203,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.getBlockStates().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
try {
int[] num_palette_buffer = new int[1];
int air;

View File

@ -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.getBlockStates().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSectionBlocks().get();
final long[] blockStates = FaweCache.INSTANCE.getBLOCK_STATES().get();
final int[] blocksCopy = FaweCache.INSTANCE.getSECTION_BLOCKS().get();
try {
int[] num_palette_buffer = new int[1];
int air;

View File

@ -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.worldHeight; y++) {
for (y = 0; y < FaweCache.WORLD_HEIGHT; 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.worldHeight; y++) {
for (int y = 0; y < FaweCache.WORLD_HEIGHT; y++) {
currentBiomes.setBiome(x, y, z, nmsBiome);
}
}