diff --git a/game/client/src/main/java/net/betterthanadventure/utils/BiomeFinder.java b/game/client/src/main/java/net/betterthanadventure/utils/BiomeFinder.java
index 2b773f974..e261188f4 100644
--- a/game/client/src/main/java/net/betterthanadventure/utils/BiomeFinder.java
+++ b/game/client/src/main/java/net/betterthanadventure/utils/BiomeFinder.java
@@ -18,6 +18,7 @@ import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.chunk.IChunkLoader;
 import net.minecraft.core.world.chunk.provider.IChunkProvider;
 import net.minecraft.core.world.pos.ChunkPos;
+import net.minecraft.core.world.pos.ChunkTilePos;
 import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.save.LevelStorage;
 import net.minecraft.core.world.save.SaveFormatBase;
@@ -518,7 +519,7 @@ public class BiomeFinder implements MinecraftAccessor {
 		for(int i=0; i < biomeImage.getWidth(); i++) {
 			for(int j=0; j < biomeImage.getHeight(); j++) {
 				final @NotNull TilePos tilePos = new TilePos(offsetX + i * renderScale, posY, offsetZ + j * renderScale);
-				final @NotNull ChunkPos tileChunkPos = tilePos.toChunkPos();
+				final @NotNull ChunkPos tileChunkPos = new ChunkPos(tilePos);
 
 				Biome biome = null;
 				if (world != null && world.getChunkProvider() instanceof ChunkProviderDynamic){
@@ -528,7 +529,7 @@ public class BiomeFinder implements MinecraftAccessor {
 							chunk = ((ChunkProviderDynamic) world.getChunkProvider()).getChunkLoader().loadChunk(world, lastChunk.x, lastChunk.z);
 						}
 						if (chunk != null){
-							biome = chunk.getBlockBiome(tilePos.toChunkTilePos());
+							biome = chunk.getBlockBiome(new ChunkTilePos(tilePos));
 						}
                     } catch (Exception e){
 						chunk = null;
diff --git a/game/client/src/main/java/net/betterthanadventure/utils/DataDumper.java b/game/client/src/main/java/net/betterthanadventure/utils/DataDumper.java
index 9123e41e6..18eb91e5d 100644
--- a/game/client/src/main/java/net/betterthanadventure/utils/DataDumper.java
+++ b/game/client/src/main/java/net/betterthanadventure/utils/DataDumper.java
@@ -164,10 +164,10 @@ public class DataDumper implements MinecraftAccessor {
 
         builder.append(s).append("\",");
 
-        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.monster))).append("\",");
-        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.creature))).append("\",");
-        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.waterCreature))).append("\",");
-        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.ambientCreature))).append("\"");
+        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.MONSTER))).append("\",");
+        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.CREATURE))).append("\",");
+        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.WATER_CREATURE))).append("\",");
+        builder.append("\"").append(spawnableListString(biome.getSpawnableList(MobCategory.AMBIENT))).append("\"");
         builder.append("\n");
 
         return builder.toString();
diff --git a/game/client/src/main/java/net/minecraft/client/Minecraft.java b/game/client/src/main/java/net/minecraft/client/Minecraft.java
index 47e0448d2..c29583770 100644
--- a/game/client/src/main/java/net/minecraft/client/Minecraft.java
+++ b/game/client/src/main/java/net/minecraft/client/Minecraft.java
@@ -102,6 +102,8 @@ import net.minecraft.client.sound.SoundRepository;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.LWJGLException;
 import org.lwjgl.glfw.GLFW;
 import org.lwjgl.input.Keyboard;
@@ -185,7 +187,6 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.client.util.helper.ScreenShot;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Time;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.PortalHandler;
@@ -211,8 +212,7 @@ import org.useless.dragonfly.data.entity.mojang.EntityGeometryMojangData;
 import static net.minecraft.core.Global.CURRENT_SAVE_VERSION;
 
 public class Minecraft
-    implements MinecraftAccessor
-{
+    implements MinecraftAccessor {
     public static Logger LOGGER = LogUtils.getLogger();
     public static final String VERSION = Global.VERSION;
     public static final boolean isMultiplayerDisabled = false;
@@ -306,26 +306,25 @@ public class Minecraft
      * Keep this as the only constructor in this class for now,
      * otherwise JVM class verification will fail and the game will crash when the fabric loader tries to run the game.
      */
-    public Minecraft(final @NotNull File mcDataDir, final GameWindow gameWindow, final boolean test)
-    {
+    public Minecraft(final @NotNull File mcDataDir, final GameWindow gameWindow, final boolean test) {
         Global.accessor = this;
-        hasCrashed = false;
-        timer = new Timer(Global.TICKS_PER_SECOND);
-        session = null;
-        hideQuitButton = false;
-        isGamePaused = false;
-        currentScreen = null;
-        ticksRan = 0;
-        skipRenderWorld = false;
-        objectMouseOver = null;
-        running = true;
-        lineDebug = "";
-        isTakingScreenshot = false;
-        inGameHasFocus = false;
-        mouseTicksRan = 0;
-        isRaining = false;
-        systemTime = System.currentTimeMillis();
-        joinPlayerCounter = 0;
+        this.hasCrashed = false;
+        this.timer = new Timer(Global.TICKS_PER_SECOND);
+        this.session = null;
+        this.hideQuitButton = false;
+        this.isGamePaused = false;
+        this.currentScreen = null;
+        this.ticksRan = 0;
+        this.skipRenderWorld = false;
+        this.objectMouseOver = null;
+        this.running = true;
+        this.lineDebug = "";
+        this.isTakingScreenshot = false;
+        this.inGameHasFocus = false;
+        this.mouseTicksRan = 0;
+        this.isRaining = false;
+        this.systemTime = System.currentTimeMillis();
+        this.joinPlayerCounter = 0;
         INSTANCE = this;
 
         this.mcDataDir = mcDataDir;
@@ -334,16 +333,16 @@ public class Minecraft
         this.textureManager = new TextureManager(this, this.texturePackList, this.gameSettings);
         this.font = new FontRendererDefault();
 
-        if(test) return;
+        if (test) return;
 
         this.gameWindow = gameWindow;
         this.resolution = new ScaledResolution(this.gameWindow);
 
         LoggedPrintStream.wrapStreams();
 
-        loadingScreen = new LoadingScreenRenderer(this);
-        guiToasts = new GuiElementToastsHud(this);
-        sndManager = new SoundEngine();
+        this.loadingScreen = new LoadingScreenRenderer(this);
+        this.guiToasts = new GuiElementToastsHud(this);
+        this.sndManager = new SoundEngine();
 
         try {
             CertificateHelper.installCertificates();
@@ -362,8 +361,8 @@ public class Minecraft
                 while (Minecraft.this.running) {
                     try {
                         Thread.sleep(2147483647L);
+                    } catch (final InterruptedException ignored) {
                     }
-                    catch (final InterruptedException ignored) {}
                 }
             }
         };
@@ -387,69 +386,68 @@ public class Minecraft
         return false;
     }
 
-	public void onMinecraftCrash(UnexpectedThrowable throwable) {
-		if(!gameStarted) {
-			running = false;
+    public void onMinecraftCrash(UnexpectedThrowable throwable) {
+        if (!this.gameStarted) {
+            this.running = false;
 
-			LOGGER.error("An exception has occurred while trying to start the game!", throwable.exception);
+            LOGGER.error("An exception has occurred while trying to start the game!", throwable.exception);
 
-			gameWindow.displayCrashReport(throwable, 1);
-			hasCrashed = true;
-			shutdownMinecraftApplet();
-			return;
-		}
+            this.gameWindow.displayCrashReport(throwable, 1);
+            this.hasCrashed = true;
+            shutdownMinecraftApplet();
+            return;
+        }
 
-		boolean disableCrashHandler = gameSettings.disableCrashHandler.value;
-		if(disableCrashHandler) {
-			running = false;
+        boolean disableCrashHandler = this.gameSettings.disableCrashHandler.value;
+        if (disableCrashHandler) {
+            this.running = false;
 
             LOGGER.error("An exception has occurred while trying to start the game!", throwable.exception);
 
-			gameWindow.displayCrashReport(throwable, 1);
-			hasCrashed = true;
-			shutdownMinecraftApplet();
-			return;
-		}
+            this.gameWindow.displayCrashReport(throwable, 1);
+            this.hasCrashed = true;
+            shutdownMinecraftApplet();
+            return;
+        }
 
-		if(hasCrashed) {
-			running = false;
+        if (this.hasCrashed) {
+            this.running = false;
 
             LOGGER.error("An exception has occurred while trying to start the game!", throwable.exception);
 
-			gameWindow.displayCrashReport(throwable, 2);
-			shutdownMinecraftApplet();
-			return;
-		}
-		
-		Debug.reset();
+            this.gameWindow.displayCrashReport(throwable, 2);
+            shutdownMinecraftApplet();
+            return;
+        }
+
+        Debug.reset();
         LOGGER.error("Minecraft has crashed!", throwable.exception);
-		hasCrashed = true;
-		lastCrash = throwable;
-		
-		try {
-            if (!gameStarted) {
-				PopupScreen error = ExceptionPopupElement.createStartupError(throwable.exception, this);
-				displayScreen(error);
-				return;
-			}
-			if(throwable.exception instanceof RuntimeException) {
-				changeWorld(null);
-				ScreenMainMenu screenMainMenu = new ScreenMainMenu();
-				displayScreen(screenMainMenu);
-				PopupScreen error = ExceptionPopupElement.create(screenMainMenu, throwable.exception, this);
-				displayScreen(error);
-			}else {
-				changeWorld(null);
-				PopupScreen error = ExceptionPopupElement.createFatal(throwable.exception, this);
-				displayScreen(error);
-			}
-		}catch (Throwable e) {
-			onMinecraftCrash(new UnexpectedThrowable("Trying to display crash handler", e));
-		}
-	}
-	
-    public void setServer(String serverName, int serverPort)
-    {
+        this.hasCrashed = true;
+        this.lastCrash = throwable;
+
+        try {
+            if (!this.gameStarted) {
+                PopupScreen error = ExceptionPopupElement.createStartupError(throwable.exception, this);
+                displayScreen(error);
+                return;
+            }
+            if (throwable.exception instanceof RuntimeException) {
+                changeWorld(null);
+                ScreenMainMenu screenMainMenu = new ScreenMainMenu();
+                displayScreen(screenMainMenu);
+                PopupScreen error = ExceptionPopupElement.create(screenMainMenu, throwable.exception, this);
+                displayScreen(error);
+            } else {
+                changeWorld(null);
+                PopupScreen error = ExceptionPopupElement.createFatal(throwable.exception, this);
+                displayScreen(error);
+            }
+        } catch (Throwable e) {
+            onMinecraftCrash(new UnexpectedThrowable("Trying to display crash handler", e));
+        }
+    }
+
+    public void setServer(String serverName, int serverPort) {
         this.serverName = serverName;
         this.serverPort = serverPort;
     }
@@ -458,7 +456,7 @@ public class Minecraft
         LOGGER.info("LWJGL version = {}", org.lwjgl.Sys.getVersion());
         if (Integer.parseInt(org.lwjgl.Sys.getVersion().substring(0, 1)) < 3) {
             JOptionPane.showMessageDialog(null,
-                new Object[] {
+                new Object[]{
                     "Better than Adventure! requires LWJGL 3 to run.",
                     "If you're using MultiMC or Prism Launcher to run BTA!,",
                     "please review the installation guide at",
@@ -482,9 +480,8 @@ public class Minecraft
             System.exit(1);
         }
     }
-    
-    public void startGame() throws LWJGLException
-    {
+
+    public void startGame() throws LWJGLException {
         // Initialize LogMessageReceiver to capture output
         LogMessageReceiver.init();
 
@@ -501,56 +498,56 @@ public class Minecraft
 
         this.gameSettings.init();
 
-        UUIDHelper.urlUUID = gameSettings.uuidServer.value;
+        UUIDHelper.urlUUID = this.gameSettings.uuidServer.value;
 
         LOGGER.info("Java Version: {}", System.getProperty("java.version"));
 
-		printWrongJavaVersionInfo();
+        printWrongJavaVersionInfo();
 
-		gameWindow.init(this, overrideWidth != null ? overrideWidth : gameSettings.windowWidth.value, overrideHeight != null ? overrideHeight : gameSettings.windowHeight.value);
+        this.gameWindow.init(this, this.overrideWidth != null ? this.overrideWidth : this.gameSettings.windowWidth.value, this.overrideHeight != null ? this.overrideHeight : this.gameSettings.windowHeight.value);
 
         final @Nullable String vendorString = GL11.glGetString(GL_VENDOR);
         if (vendorString != null) {
             GPU_VENDOR = EnumGPUVendor.getVendorFromString(vendorString);
             if (GPU_VENDOR == EnumGPUVendor.INTEL) {
                 // Intel cannot handle the sheer complexity of drawing the lightmap texture upon a quad
-                gameSettings.lightmapStyle.set(LightmapStyle.DISABLED);
+                this.gameSettings.lightmapStyle.set(LightmapStyle.DISABLED);
             }
         }
 
-        LOGGER.info("Resolution: {} x {}", gameWindow.getWidthPixels(), gameWindow.getHeightPixels());
+        LOGGER.info("Resolution: {} x {}", this.gameWindow.getWidthPixels(), this.gameWindow.getHeightPixels());
 
-        resolution.setScale(gameSettings.guiScale.value);
+        this.resolution.setScale(this.gameSettings.guiScale.value);
 
-        SaveFormatBase handlerBase = new SaveFormat19134(new File(mcDataDir, "saves"));
+        SaveFormatBase handlerBase = new SaveFormat19134(new File(this.mcDataDir, "saves"));
         handlerBase.factory = SaveHandlerClientSP::new;
-		saveFormat = handlerBase;
-		I18n.initialize(gameSettings.language.value);
+        this.saveFormat = handlerBase;
+        I18n.initialize(this.gameSettings.language.value);
 
-		if (!gameSettings.startInFullscreen.value) {
-			gameSettings.fullscreen.value = false;
-		}
+        if (!this.gameSettings.startInFullscreen.value) {
+            this.gameSettings.fullscreen.value = false;
+        }
 
-        resolution.setScale(gameSettings.guiScale.value);
+        this.resolution.setScale(this.gameSettings.guiScale.value);
 
         OpenGLHelper.testCapabilities(this);
-        
-        if(gameSettings.enableMultiDrawRendering.value) {
-            if(OpenGLHelper.gl20) {
-            	LOGGER.info("Using MultiDraw terrain renderer");
-            	terrainRenderer = new TerrainRendererMultiDraw(this);
-            }else {
-            	LOGGER.info("MultiDraw not supported, using legacy terrain renderer");
-            	terrainRenderer = new TerrainRendererLegacy(this);
-            }
-        }else {
-        	LOGGER.info("MultiDraw disabled, using legacy terrain renderer");
-        	terrainRenderer = new TerrainRendererLegacy(this);
-        }
-        
-        if(Shaders.enableShaders) {
+
+        if (this.gameSettings.enableMultiDrawRendering.value) {
+            if (OpenGLHelper.gl20) {
+                LOGGER.info("Using MultiDraw terrain renderer");
+                this.terrainRenderer = new TerrainRendererMultiDraw(this);
+            } else {
+                LOGGER.info("MultiDraw not supported, using legacy terrain renderer");
+                this.terrainRenderer = new TerrainRendererLegacy(this);
+            }
+        } else {
+            LOGGER.info("MultiDraw disabled, using legacy terrain renderer");
+            this.terrainRenderer = new TerrainRendererLegacy(this);
+        }
+
+        if (Shaders.enableShaders) {
             setRenderer(new ShadersRenderer(this));
-        }else {
+        } else {
             setRenderer(new FallbackRenderer(this));
         }
 
@@ -564,29 +561,29 @@ public class Minecraft
         // Do not put stuff that takes a while to load before this,
         // otherwise the loading time will happen while the window is black
         loadScreen();
-        
+
         // Initialize overworld biome map
         STARTUP_TIKE_KEEPER.start("Biome Provider");
         BiomeProviderOverworld.init();
         STARTUP_TIKE_KEEPER.end("Biome Provider");
 
-        worldRenderer = new WorldRenderer(this);
+        this.worldRenderer = new WorldRenderer(this);
 
         // I hate initialization issues so much
         BlockModelDispatcher.getInstance();
         ItemModelDispatcher.getInstance();
 
-        loadScreen();	// Update loading screen so it doesn't say no response
+        loadScreen();    // Update loading screen so it doesn't say no response
 
         LOGGER.info("Initializing input");
         try {
             InputHandler.init(this);
 
-            this.controllerInput = InputHandler.getController(gameSettings.selectedController.value);
-        }catch (Exception e) {
+            this.controllerInput = InputHandler.getController(this.gameSettings.selectedController.value);
+        } catch (Exception e) {
             LOGGER.error("Input init error!", e);
         }
-        mouseInput.setRawInput(gameSettings.rawMouseInput.value);
+        this.mouseInput.setRawInput(this.gameSettings.rawMouseInput.value);
         LOGGER.info("Input done!");
 
         LOGGER.info("Setting up OpenGL values...");
@@ -604,36 +601,34 @@ public class Minecraft
         glLoadIdentity();
         glMatrixMode(GL11.GL_MODELVIEW);
         OpenGLHelper.checkError("startup");
-        sndManager.init(gameSettings);
-        
-        loadScreen();	// Update loading screen so it doesn't say no response
-        
+        this.sndManager.init(this.gameSettings);
+
+        loadScreen();    // Update loading screen so it doesn't say no response
+
         Colorizers.init(this);
 
-        textureManager.refreshTextures(new ArrayList<>());
+        this.textureManager.refreshTextures(new ArrayList<>());
 
         OptionsPages.init();
 
-        loadScreen();	// Update loading screen so it doesn't say no response
+        loadScreen();    // Update loading screen so it doesn't say no response
 
         LOGGER.info("Initializing Renderer...");
-        
+
         TextureRegistry.blockAtlas.bind();
-        renderGlobal = new RenderGlobal(this, textureManager);
-        glViewport(0, 0, gameWindow.getWidthPixels(), gameWindow.getHeightPixels());
-        particleEngine = new ParticleEngine(currentWorld);
-        try
-        {
+        this.renderGlobal = new RenderGlobal(this, this.textureManager);
+        glViewport(0, 0, this.gameWindow.getWidthPixels(), this.gameWindow.getHeightPixels());
+        this.particleEngine = new ParticleEngine(this.currentWorld);
+        try {
             LOGGER.info("Starting Resource Download Thread...");
-            downloadResourcesThread = new ThreadDownloadResources(mcDataDir, this);
-            downloadResourcesThread.start();
-        }
-        catch(Exception e) {
+            this.downloadResourcesThread = new ThreadDownloadResources(this.mcDataDir, this);
+            this.downloadResourcesThread.start();
+        } catch (Exception e) {
             LOGGER.error("Failed to start Resource Download Thread!", e);
         }
-        
+
         OpenGLHelper.checkError("post startup");
-        hudIngame = new HudIngame(this);
+        this.hudIngame = new HudIngame(this);
 
         new Registries();
 
@@ -652,72 +647,64 @@ public class Minecraft
         int namespaces = Registries.RECIPES.size();
         int itemGroups = Registries.ITEM_GROUPS.size();
         LOGGER.info(String.format("%d item groups.", itemGroups));
-        LOGGER.info(String.format("%d recipes in %d groups in %d namespaces.",recipes,groups,namespaces));
+        LOGGER.info(String.format("%d recipes in %d groups in %d namespaces.", recipes, groups, namespaces));
 
         StatList.init();
-        statsCounter = new StatsCounter(session, mcDataDir);
+        this.statsCounter = new StatsCounter(this.session, this.mcDataDir);
         Achievements.OPEN_INVENTORY.setDescriptionFormatter(s -> {
-            if(!gameSettings.keyInventory.isBound()) {
+            if (!this.gameSettings.keyInventory.isBound()) {
                 return "Set your inventory keybind in the controls menu!";
             }
-            return String.format(s, gameSettings.keyInventory.getKeyName());
+            return String.format(s, this.gameSettings.keyInventory.getKeyName());
         });
         Achievements.OPEN_GUIDEBOOK.setDescriptionFormatter(s -> {
-            if(!gameSettings.keyGuidebook.isBound()) {
+            if (!this.gameSettings.keyGuidebook.isBound()) {
                 return "Set your guidebook keybind in the controls menu!";
             }
-            return String.format(s, gameSettings.keyGuidebook.getKeyName());
+            return String.format(s, this.gameSettings.keyGuidebook.getKeyName());
         });
 
-        loadScreen();	// Update loading screen so it doesn't say no response
-        
+        loadScreen();    // Update loading screen so it doesn't say no response
+
         // Enable Discord Rich Presence
-        if (gameSettings.discordRichPresence.value)
-        {
-        	// This thing takes forever to load, so it has been moved down here,
-        	// so that the loading time is spent on the loading screen and not a black screen
-            rpcThread = new RichPresenceHandlerThread(this);
-            rpcThread.setName("Discord RPC Thread");
-            rpcThread.start();
+        if (this.gameSettings.discordRichPresence.value) {
+            // This thing takes forever to load, so it has been moved down here,
+            // so that the loading time is spent on the loading screen and not a black screen
+            this.rpcThread = new RichPresenceHandlerThread(this);
+            this.rpcThread.setName("Discord RPC Thread");
+            this.rpcThread.start();
         }
 
         // Game has started - free any pooled objects that were created during startup
         ObjectPool.freeAllPools();
 
-        gameStarted = true;
+        this.gameStarted = true;
 
         boolean hasBeta173 = true;
 
         try {
             Class.forName("a"); // Check if a.class from the beta 1.7.3 jar is present
-        } catch (Exception e){
+        } catch (Exception e) {
             hasBeta173 = false;
         }
 
         if (!hasBeta173) {
             displayScreen(new ScreenMissingMinecraft());
-        } else if (System.getProperty("sun.arch.data.model").equals("32"))
-        {
+        } else if (System.getProperty("sun.arch.data.model").equals("32")) {
             displayScreen(new ScreenBadJavaArch());
-        }
-        else if(serverName != null)
-        {
-            displayScreen(new ScreenConnecting(this, serverName, serverPort));
-        }
-        else if (worldPresetName != null && worldPresetSeed != null)
-        {
+        } else if (this.serverName != null) {
+            displayScreen(new ScreenConnecting(this, this.serverName, this.serverPort));
+        } else if (this.worldPresetName != null && this.worldPresetSeed != null) {
             ScreenSelectWorld screenSelectWorld = new ScreenSelectWorld(null);
             displayScreen(screenSelectWorld);
-            screenSelectWorld.deletePresetWorld(worldPresetName);
+            screenSelectWorld.deletePresetWorld(this.worldPresetName);
             ScreenCreateWorld screen = new ScreenCreateWorld(null);
             displayScreen(screen);
-            screen.runPreset(worldPresetName, worldPresetSeed, worldPresetX, worldPresetY, worldPresetZ);
-        }
-        else
-        {
+            screen.runPreset(this.worldPresetName, this.worldPresetSeed, this.worldPresetX, this.worldPresetY, this.worldPresetZ);
+        } else {
             displayScreen(new ScreenMainMenu());
         }
-        gameWindow.updateWindowState();
+        this.gameWindow.updateWindowState();
         STARTUP_TIKE_KEEPER.end("Startup");
         LOGGER.info(STARTUP_TIKE_KEEPER.toString());
     }
@@ -753,82 +740,80 @@ public class Minecraft
         CommandManager.registerCommand(new CommandPlaySound());
         CommandManager.registerCommand(new CommandParticle());
     }
-    
+
     private void printWrongJavaVersionInfo() {
-    	String javaVersion = System.getProperty("java.version");
-    	if(getOs() != EnumOS.linux || javaVersion == null) {
-    		return;
-    	}
-    	try {
-    		int major = Integer.parseInt(javaVersion.split("\\.")[0]);
-    		if(major > 8) {
+        String javaVersion = System.getProperty("java.version");
+        if (getOs() != EnumOS.linux || javaVersion == null) {
+            return;
+        }
+        try {
+            int major = Integer.parseInt(javaVersion.split("\\.")[0]);
+            if (major > 8) {
                 LOGGER.warn("Detected a probably incompatible Java version. If the game crashes with a message similar to \n"
-    					+ "\"Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!\", \n"
-    					+ "use Java 8!");
-    		}
-    	}catch (Exception e) {
+                    + "\"Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!\", \n"
+                    + "use Java 8!");
+            }
+        } catch (Exception e) {
             LOGGER.error("Failed to retrieve Java version!", e);
             LOGGER.warn("If the game crashes with a message similar to \n"
                 + "\"Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!\", \n"
                 + "use Java 8!");
-		}
+        }
     }
 
-    private void loadScreen() throws LWJGLException
-    {
+    private void loadScreen() throws LWJGLException {
         LOGGER.info("Drawing Loading Screen...");
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
         glMatrixMode(GL11.GL_PROJECTION);
         glLoadIdentity();
-        glOrtho(0.0D, resolution.getExactScaledWidthScreenCoords(), resolution.getExactScaledHeightScreenCoords(), 0.0D, 1000D, 3000D);
+        glOrtho(0.0D, this.resolution.getExactScaledWidthScreenCoords(), this.resolution.getExactScaledHeightScreenCoords(), 0.0D, 1000D, 3000D);
         glMatrixMode(GL11.GL_MODELVIEW);
         glLoadIdentity();
         glTranslatef(0.0F, 0.0F, -2000F);
-        glViewport(0, 0, gameWindow.getWidthPixels(), gameWindow.getHeightPixels());
+        glViewport(0, 0, this.gameWindow.getWidthPixels(), this.gameWindow.getHeightPixels());
         glClearColor(0.0F, 0.0F, 0.0F, 0.0F);
         Tessellator tessellator = Tessellator.instance;
         glDisable(GL11.GL_LIGHTING);
         glEnable(GL11.GL_TEXTURE_2D);
         glDisable(GL11.GL_FOG);
-        
-        if(mojrand == 0)
-            textureManager.loadTexture("/assets/minecraft/textures/gui/title/majonk.png").bind();
+
+        if (this.mojrand == 0)
+            this.textureManager.loadTexture("/assets/minecraft/textures/gui/title/majonk.png").bind();
         else
-            textureManager.loadTexture("/assets/minecraft/textures/gui/title/mojang.png").bind();
-        
+            this.textureManager.loadTexture("/assets/minecraft/textures/gui/title/mojang.png").bind();
+
         tessellator.startDrawingQuads();
         tessellator.setColorOpaque_I(0xffffff);
-        tessellator.addVertexWithUV(0.0D, gameWindow.getHeightPixels(), 0.0D, 0.0D, 0.0D);
-        tessellator.addVertexWithUV(gameWindow.getWidthPixels(), gameWindow.getHeightPixels(), 0.0D, 0.0D, 0.0D);
-        tessellator.addVertexWithUV(gameWindow.getWidthPixels(), 0.0D, 0.0D, 0.0D, 0.0D);
+        tessellator.addVertexWithUV(0.0D, this.gameWindow.getHeightPixels(), 0.0D, 0.0D, 0.0D);
+        tessellator.addVertexWithUV(this.gameWindow.getWidthPixels(), this.gameWindow.getHeightPixels(), 0.0D, 0.0D, 0.0D);
+        tessellator.addVertexWithUV(this.gameWindow.getWidthPixels(), 0.0D, 0.0D, 0.0D, 0.0D);
         tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
         tessellator.draw();
-        
+
         int width = 256;
         int height = 256;
-        
+
         glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-        
-        drawMojangLogoVertices((resolution.getScaledWidthScreenCoords() - width) / 2, (resolution.getScaledHeightScreenCoords() - height) / 2, 0, 0, width, height);
-        
+
+        drawMojangLogoVertices((this.resolution.getScaledWidthScreenCoords() - width) / 2, (this.resolution.getScaledHeightScreenCoords() - height) / 2, 0, 0, width, height);
+
         glDisable(GL11.GL_LIGHTING);
         glDisable(GL11.GL_FOG);
         glEnable(GL11.GL_ALPHA_TEST);
-        glAlphaFunc(GL_GREATER,0.1F);
-        gameWindow.update();
+        glAlphaFunc(GL_GREATER, 0.1F);
+        this.gameWindow.update();
     }
 
-    public void drawMojangLogoVertices(int minX, int minY, int minU, int minV, int width, int height)
-    {
+    public void drawMojangLogoVertices(int minX, int minY, int minU, int minV, int width, int height) {
         float scaleX = 0.00390625F;
         float scaleY = 0.00390625F;
         Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
         tessellator.setColorOpaque_I(0xffffff);
-        tessellator.addVertexWithUV(minX + 0,       minY + height,  0.0D, (float)(minU + 0) * scaleX,       (float)(minV + height) * scaleY);
-        tessellator.addVertexWithUV(minX + width,   minY + height,  0.0D, (float)(minU + width) * scaleX,   (float)(minV + height) * scaleY);
-        tessellator.addVertexWithUV(minX + width,   minY + 0,       0.0D, (float)(minU + width) * scaleX,   (float)(minV + 0) * scaleY);
-        tessellator.addVertexWithUV(minX + 0,       minY + 0,       0.0D, (float)(minU + 0) * scaleX,       (float)(minV + 0) * scaleY);
+        tessellator.addVertexWithUV(minX, minY + height, 0.0D, (float) (minU) * scaleX, (float) (minV + height) * scaleY);
+        tessellator.addVertexWithUV(minX + width, minY + height, 0.0D, (float) (minU + width) * scaleX, (float) (minV + height) * scaleY);
+        tessellator.addVertexWithUV(minX + width, minY, 0.0D, (float) (minU + width) * scaleX, (float) (minV) * scaleY);
+        tessellator.addVertexWithUV(minX, minY, 0.0D, (float) (minU) * scaleX, (float) (minV) * scaleY);
         tessellator.draw();
     }
 
@@ -842,39 +827,32 @@ public class Minecraft
     }
 
     @Override
-    public IChunkProvider createChunkProvider(World world, IChunkLoader chunkLoader)
-    {
-        return switch (gameSettings.enableThreadedChunkProvider.value) {
+    public IChunkProvider createChunkProvider(World world, IChunkLoader chunkLoader) {
+        return switch (this.gameSettings.enableThreadedChunkProvider.value) {
             case DYNAMIC ->
                 new ChunkProviderDynamic(world, chunkLoader, world.getWorldType().createChunkGenerator(world));
 
             case THREADED ->
-                 new ChunkProviderThreadedClient(world, chunkLoader, world.getWorldType().createChunkGenerator(world));
+                new ChunkProviderThreadedClient(world, chunkLoader, world.getWorldType().createChunkGenerator(world));
 
-            default ->
-                new ChunkProviderStatic(world, chunkLoader, world.getWorldType().createChunkGenerator(world));
+            default -> new ChunkProviderStatic(world, chunkLoader, world.getWorldType().createChunkGenerator(world));
         };
     }
 
-    public static File getAppDir(String s)
-    {
+    public static File getAppDir(String s) {
         String homeDirPath = System.getProperty("user.home", ".");
         File appDir;
 
-        switch(getOs())
-        {
+        switch (getOs()) {
             case linux: // Linux
             case solaris: // Solaris
                 appDir = new File(homeDirPath, '.' + s + '/');
                 break;
             case windows: // Windows
                 String s2 = System.getenv("APPDATA");
-                if(s2 != null)
-                {
+                if (s2 != null) {
                     appDir = new File(s2, "." + s + '/');
-                }
-                else
-                {
+                } else {
                     appDir = new File(homeDirPath, '.' + s + '/');
                 }
                 break;
@@ -886,149 +864,120 @@ public class Minecraft
                 break;
         }
 
-        if(!appDir.exists() && !appDir.mkdirs())
-        {
+        if (!appDir.exists() && !appDir.mkdirs()) {
             throw new RuntimeException("The working directory could not be created: " + appDir);
-        }
-        else
-        {
+        } else {
             return appDir;
         }
     }
 
-    public static EnumOS getOs()
-    {
+    public static EnumOS getOs() {
         String s = System.getProperty("os.name").toLowerCase();
-        if(s.contains("win"))
-        {
+        if (s.contains("win")) {
             return EnumOS.windows;
-        }
-        else if(s.contains("mac"))
-        {
+        } else if (s.contains("mac")) {
             return EnumOS.macos;
-        }
-        else if(s.contains("solaris") || s.contains("sunos"))
-        {
+        } else if (s.contains("solaris") || s.contains("sunos")) {
             return EnumOS.solaris;
-        }
-        else if(s.contains("linux") || s.contains("unix"))
-        {
+        } else if (s.contains("linux") || s.contains("unix")) {
             return EnumOS.linux;
-        }
-        else
-        {
+        } else {
             return EnumOS.unknown;
         }
     }
 
-    public ISaveFormat getSaveFormat()
-    {
-        return saveFormat;
+    public ISaveFormat getSaveFormat() {
+        return this.saveFormat;
     }
 
     private Screen lastScreen;
-    public void displayScreen(@Nullable Screen screen)
-    {
+
+    public void displayScreen(@Nullable Screen screen) {
         // Big sir's mouse fix, clearly the legacy lwjgl dependency is fucked in some way, may we hopefully fully replace it one day
-        if (screen == null && lastScreen != null) {
+        if (screen == null && this.lastScreen != null) {
             Mouse.setGrabbed(false);
             Mouse.setGrabbed(true);
         }
-        lastScreen = screen;
+        this.lastScreen = screen;
 
-        if(currentScreen == null && screen != null)
-        {
-            if(controllerInput != null)
-            {
-                controllerInput.cursorX = resolution.getScaledWidthScreenCoords() / 2D;
-                controllerInput.cursorY = resolution.getScaledHeightScreenCoords() / 2D;
+        if (this.currentScreen == null && screen != null) {
+            if (this.controllerInput != null) {
+                this.controllerInput.cursorX = this.resolution.getScaledWidthScreenCoords() / 2D;
+                this.controllerInput.cursorY = this.resolution.getScaledHeightScreenCoords() / 2D;
             }
         }
-        if(currentScreen != null)
-        {
-            currentScreen.removed();
+        if (this.currentScreen != null) {
+            this.currentScreen.removed();
         }
-        if(screen instanceof ScreenMainMenu)
-        {
-            statsCounter.fetchStats();
+        if (screen instanceof ScreenMainMenu) {
+            this.statsCounter.fetchStats();
         }
-        if(statsCounter != null){
-            statsCounter.saveStats();
+        if (this.statsCounter != null) {
+            this.statsCounter.saveStats();
         }
-        if(screen == null && currentWorld == null)
-        {
+        if (screen == null && this.currentWorld == null) {
             screen = new ScreenMainMenu();
-        }
-        else if(screen == null && thePlayer.getHealth() <= 0)
-        {
+        } else if (screen == null && this.thePlayer.getHealth() <= 0) {
             screen = new ScreenGameOver();
         }
-        if(screen instanceof ScreenMainMenu)
-        {
-            hudIngame.clearChatMessages();
+        if (screen instanceof ScreenMainMenu) {
+            this.hudIngame.clearChatMessages();
         }
-        currentScreen = screen;
-        if(screen != null)
-        {
+        this.currentScreen = screen;
+        if (screen != null) {
             setIngameNotInFocus();
-            screen.opened(resolution.getScaledWidthScreenCoords(), resolution.getScaledHeightScreenCoords());
-            skipRenderWorld = false;
-        } else
-        {
+            screen.opened(this.resolution.getScaledWidthScreenCoords(), this.resolution.getScaledHeightScreenCoords());
+            this.skipRenderWorld = false;
+        } else {
             setIngameFocus();
         }
     }
 
-	public void shutdownMinecraftApplet() {
-		// This could be called very early if the game crashes, so everything could be null!
+    public void shutdownMinecraftApplet() {
+        // This could be called very early if the game crashes, so everything could be null!
         try {
-            if(gameSettings != null) {
-                gameSettings.saveOptions();
+            if (this.gameSettings != null) {
+                this.gameSettings.saveOptions();
             }
         } catch (Exception e) {
             LOGGER.error("Exception occurred while saving settings! Some settings may be lost!", e);
         }
-        if(statsCounter != null) {
-            statsCounter.fetchStats();
-            statsCounter.saveStats();
+        if (this.statsCounter != null) {
+            this.statsCounter.fetchStats();
+            this.statsCounter.saveStats();
         }
         LOGGER.info("Stopping!");
         try {
             changeWorld(null);
-        }catch (Throwable ignored) {
+        } catch (Throwable ignored) {
         }
         try {
             GLAllocation.deleteTexturesAndDisplayLists();
-        }catch (Throwable ignored) {
+        } catch (Throwable ignored) {
         }
-        if(sndManager != null) {
-            sndManager.destroy();
+        if (this.sndManager != null) {
+            this.sndManager.destroy();
         }
-        if (gameWindow != null) {
-            gameWindow.free();
+        if (this.gameWindow != null) {
+            this.gameWindow.free();
         }
         System.gc();
-		if(!hasCrashed) {
-			System.exit(0);
-		}
-	}
-
-    private void run()
-    {
-        running = true;
-        try
-        {
-            startGame();
+        if (!this.hasCrashed) {
+            System.exit(0);
         }
-        catch(Throwable e)
-        {
+    }
+
+    private void run() {
+        this.running = true;
+        try {
+            startGame();
+        } catch (Throwable e) {
             onMinecraftCrash(new UnexpectedThrowable("Failed to start game", e));
         }
-        try
-        {
+        try {
             long currentTime = System.currentTimeMillis();
             int fpsCounter = 0;
-            while (running) {
+            while (this.running) {
                 try {
                     Debug.reset();
                     Debug.push("update");    // 1
@@ -1038,38 +987,38 @@ public class Minecraft
                     Time.tick();
                     ObjectPool.resetAllPools();
 
-                    if (gameWindow.shouldClose()) shutdown();
-                    if (isGamePaused && currentWorld != null && !(currentScreen instanceof ScreenModelViewer)) {
-                        float temp = timer.partialTicks;
-                        timer.advanceTime();
-                        timer.partialTicks = temp;
+                    if (this.gameWindow.shouldClose()) shutdown();
+                    if (this.isGamePaused && this.currentWorld != null && !(this.currentScreen instanceof ScreenModelViewer)) {
+                        float temp = this.timer.partialTicks;
+                        this.timer.advanceTime();
+                        this.timer.partialTicks = temp;
                     } else {
-                        timer.advanceTime();
+                        this.timer.advanceTime();
                     }
-                    if (!doPartialTick) timer.partialTicks = 1f;
+                    if (!doPartialTick) this.timer.partialTicks = 1f;
 
-                    mouseInput.update();
-                    if (controllerInput != null && currentScreen != null) {
-                        controllerInput.moveCursor();
+                    this.mouseInput.update();
+                    if (this.controllerInput != null && this.currentScreen != null) {
+                        this.controllerInput.moveCursor();
                     }
 
                     Debug.pop();            // 2
                     Debug.change("tick");    // 1
-                    if (currentWorld instanceof WorldClientMP) {
-                        ((WorldClientMP) currentWorld).processPackets();
+                    if (this.currentWorld instanceof WorldClientMP) {
+                        ((WorldClientMP) this.currentWorld).processPackets();
                     }
 
                     if (this.currentScreen instanceof ScreenSelectServer) {
                         this.currentScreen.tick();
                     }
 
-                    for (int tick = 0; tick < timer.frames; tick++) {
-                        ticksRan++;
+                    for (int tick = 0; tick < this.timer.frames; tick++) {
+                        this.ticksRan++;
                         try {
                             runTick();
                             continue;
                         } catch (MinecraftException e) {
-                            currentWorld = null;
+                            this.currentWorld = null;
                             LOGGER.error("MinecraftException occurred while attempting to run tick, exiting world!", e);
                         }
                         changeWorld(null);
@@ -1080,15 +1029,15 @@ public class Minecraft
                     Debug.push("misc");        // 2
 
                     OpenGLHelper.checkError("pre render");
-                    BlockModelGrass.fancyGrass = gameSettings.fancyGraphics.value == 1;
-                    EntityItem.enableItemClumping = gameSettings.enableItemClumping.value;
-                    BlockLogicLeavesBase.enableTreeShadowing = gameSettings.treeShadows.value;
-                    sndManager.updateListener(thePlayer, timer.partialTicks);
+                    BlockModelGrass.fancyGrass = this.gameSettings.fancyGraphics.value == 1;
+                    EntityItem.enableItemClumping = this.gameSettings.enableItemClumping.value;
+                    BlockLogicLeavesBase.enableTreeShadowing = this.gameSettings.treeShadows.value;
+                    this.sndManager.updateListener(this.thePlayer, this.timer.partialTicks);
                     glEnable(GL_TEXTURE_2D);
-                    if (currentWorld != null) {
+                    if (this.currentWorld != null) {
                         Debug.change("updatelight");
                         try {
-                            currentWorld.updatingLighting();
+                            this.currentWorld.updatingLighting();
                         } catch (Throwable t) {
                             LOGGER.error("Unhandled exception when updating lighting!", t);
                         }
@@ -1098,104 +1047,104 @@ public class Minecraft
 
                     Debug.change("misc"); // 2
 
-                    if (thePlayer != null && thePlayer.isInWall()) {
-                        gameSettings.thirdPersonView.value = 0;
+                    if (this.thePlayer != null && this.thePlayer.isInWall()) {
+                        this.gameSettings.thirdPersonView.value = 0;
                     }
 
                     Debug.change("displayupdate"); // 2
-                    gameWindow.update();
+                    this.gameWindow.update();
 
                     Debug.change("render"); // 2
                     Debug.push("post"); // 3
 
-                    renderer.beginRenderGame(timer.partialTicks);
+                    this.renderer.beginRenderGame(this.timer.partialTicks);
                     glEnable(GL_ALPHA_TEST);
 
                     Debug.change("misc");  // 3
-                    if (!skipRenderWorld) {
-                        if (playerController != null) {
-                            playerController.render(timer.partialTicks);
+                    if (!this.skipRenderWorld) {
+                        if (this.playerController != null) {
+                            this.playerController.render(this.timer.partialTicks);
                         }
-                        worldRenderer.updateCameraAndRender(timer.partialTicks);
+                        this.worldRenderer.updateCameraAndRender(this.timer.partialTicks);
                     }
 
-                    if (gameSettings.pauseOnLostFocus.value) {
-                        if (!gameWindow.isFocused()) {
-                            if (System.currentTimeMillis() > lastFocusTime + 250) {
+                    if (this.gameSettings.pauseOnLostFocus.value) {
+                        if (!this.gameWindow.isFocused()) {
+                            if (System.currentTimeMillis() > this.lastFocusTime + 250) {
                                 displayInGameMenu();
                             }
                         } else {
-                            lastFocusTime = System.currentTimeMillis();
+                            this.lastFocusTime = System.currentTimeMillis();
                         }
                     }
-                    sndManager.setMuted(gameSettings.muteOnLostFocus.value && !gameWindow.isFocused());
+                    this.sndManager.setMuted(this.gameSettings.muteOnLostFocus.value && !this.gameWindow.isFocused());
 
-                    switch (downloadResourcesThread.downloading) {
+                    switch (this.downloadResourcesThread.downloading) {
                         case DOWNLOADING: {
                             double b = Math.sin((System.currentTimeMillis() / 1000.0) * 4);
                             b = b * 0.2 + 0.8;
                             int ib = (int) Math.round(b * 255);
                             int color = 0xFF000000 | (ib << 16) | (ib << 8) | (ib);
 
-                            int barColor = Color.doubleToIntARGB(1, 0.5 * b, 1.0 * b, 0.5 * b);
+                            int barColor = Color.doubleToIntARGB(1, 0.5 * b, b, 0.5 * b);
 
-                            int sWidth = font.stringWidth(I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.2"));
+                            int sWidth = this.font.stringWidth(I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.2"));
 
-                            double progress = (double) downloadResourcesThread.downloadProgress.get() / downloadResourcesThread.toDownload;
+                            double progress = (double) this.downloadResourcesThread.downloadProgress.get() / this.downloadResourcesThread.toDownload;
 
-                            int minX = (resolution.getScaledWidthScreenCoords() - sWidth) / 2;
-                            int maxX = (resolution.getScaledWidthScreenCoords() + sWidth) / 2 + 1;
+                            int minX = (this.resolution.getScaledWidthScreenCoords() - sWidth) / 2;
+                            int maxX = (this.resolution.getScaledWidthScreenCoords() + sWidth) / 2 + 1;
 
-                            guiToasts.drawRect(minX - 1, 6, maxX + 1, 38, 0xA0000000);
-                            guiToasts.drawStringCenteredShadow(
-                                font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.1"),
-                                resolution.getScaledWidthScreenCoords() / 2, 7, color);
-                            guiToasts.drawRectDouble(minX, 16, minX + sWidth * progress, 28, barColor);
-                            guiToasts.drawBox(minX, 16, maxX, 28, color, 1);
-                            guiToasts.drawStringCenteredShadow(font, String.format("%d / %d", downloadResourcesThread.downloadProgress.get(), downloadResourcesThread.toDownload), resolution.getScaledWidthScreenCoords() / 2, 18, color);
-                            guiToasts.drawStringCenteredShadow(font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.2"), resolution.getScaledWidthScreenCoords() / 2, 29, color);
+                            this.guiToasts.drawRect(minX - 1, 6, maxX + 1, 38, 0xA0000000);
+                            this.guiToasts.drawStringCenteredShadow(
+                                this.font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.1"),
+                                this.resolution.getScaledWidthScreenCoords() / 2, 7, color);
+                            this.guiToasts.drawRectDouble(minX, 16, minX + sWidth * progress, 28, barColor);
+                            this.guiToasts.drawBox(minX, 16, maxX, 28, color, 1);
+                            this.guiToasts.drawStringCenteredShadow(this.font, String.format("%d / %d", this.downloadResourcesThread.downloadProgress.get(), this.downloadResourcesThread.toDownload), this.resolution.getScaledWidthScreenCoords() / 2, 18, color);
+                            this.guiToasts.drawStringCenteredShadow(this.font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.2"), this.resolution.getScaledWidthScreenCoords() / 2, 29, color);
                             break;
                         }
                         case ERROR: {
-                            long timePassedSinceError = System.currentTimeMillis() - downloadResourcesThread.timeOfError;
+                            long timePassedSinceError = System.currentTimeMillis() - this.downloadResourcesThread.timeOfError;
                             if (timePassedSinceError >= 35 * 1000) {
                                 break;
                             }
-                            int sWidth = font.stringWidth(I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.connection.error"));
+                            int sWidth = this.font.stringWidth(I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.connection.error"));
 
-                            int minX = (resolution.getScaledWidthScreenCoords() - sWidth) / 2;
-                            int maxX = (resolution.getScaledWidthScreenCoords() + sWidth) / 2;
+                            int minX = (this.resolution.getScaledWidthScreenCoords() - sWidth) / 2;
+                            int maxX = (this.resolution.getScaledWidthScreenCoords() + sWidth) / 2;
 
-                            guiToasts.drawRect(minX - 2, 5, maxX + 2, 17, 0xA0000000);
-                            guiToasts.drawStringCenteredShadow(
-                                font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.connection.error"),
-                                resolution.getScaledWidthScreenCoords() / 2, 7, 0xFFFF0000);
+                            this.guiToasts.drawRect(minX - 2, 5, maxX + 2, 17, 0xA0000000);
+                            this.guiToasts.drawStringCenteredShadow(
+                                this.font, I18n.getInstance().translateKey("gui.main_menu.label.downloading_resources.connection.error"),
+                                this.resolution.getScaledWidthScreenCoords() / 2, 7, 0xFFFF0000);
                             break;
                         }
                     }
 
                     Debug.change("post");  // 3
-                    renderer.endRenderGame(timer.partialTicks);
+                    this.renderer.endRenderGame(this.timer.partialTicks);
 
                     Debug.pop();    // 3
 
 
                     Debug.change("misc");
 
-                    if (gameWindow.wasResized()) {
+                    if (this.gameWindow.wasResized()) {
                         resize();
                     }
                     OpenGLHelper.checkError("post render");
                     fpsCounter++;
-                    isGamePaused = !isMultiplayerWorld() && currentScreen != null && currentScreen.isPauseScreen();
+                    this.isGamePaused = !isMultiplayerWorld() && this.currentScreen != null && this.currentScreen.isPauseScreen();
                     while (System.currentTimeMillis() >= currentTime + 1000L) {
-                        lineDebug = fpsCounter + " fps, " + ChunkRenderer.updates + " chunk updates";
-                        lingDebugFPS = fpsCounter + " fps";
+                        this.lineDebug = fpsCounter + " fps, " + ChunkRenderer.updates + " chunk updates";
+                        this.lingDebugFPS = fpsCounter + " fps";
                         ChunkRenderer.updates = 0;
                         currentTime += 1000L;
                         fpsCounter = 0;
                     }
-                    if (currentWorld == null) {
+                    if (this.currentWorld == null) {
                         long now = System.currentTimeMillis();
                         // Limit FPS in menu
                         long sleepTime = (1000 / 60 - (now - tickStartTime)) - 1;
@@ -1204,8 +1153,8 @@ public class Minecraft
                             while (currentSleep < sleepTime - 1) {
                                 Thread.sleep(1L);
                                 currentSleep += 1L;
-                                if (currentWorld instanceof WorldClientMP) {
-                                    ((WorldClientMP) currentWorld).processPackets();
+                                if (this.currentWorld instanceof WorldClientMP) {
+                                    ((WorldClientMP) this.currentWorld).processPackets();
                                 }
 
                                 if (this.currentScreen instanceof ScreenSelectServer) {
@@ -1217,13 +1166,13 @@ public class Minecraft
 
                     Debug.pop();    // 2
                     Debug.pop();    // 1
-                    if (gameSettings.showFrameTimes.value) {
-                        DebugRender.render(font);
+                    if (this.gameSettings.showFrameTimes.value) {
+                        DebugRender.render(this.font);
                     }
 
                     screenshotListener();
                 } catch (MinecraftException minecraftexception) {
-                    currentWorld = null;
+                    this.currentWorld = null;
                     changeWorld(null);
                     displayScreen(new ScreenConflictWarning());
                 } catch (OutOfMemoryError outofmemoryerror) {
@@ -1231,7 +1180,7 @@ public class Minecraft
                     displayScreen(new ScreenOutOfMemory());
                     System.gc();
                 } catch (Throwable throwable) {
-                    if (currentWorld != null) {
+                    if (this.currentWorld != null) {
                         try {
                             changeWorld(null);
                         } catch (Throwable t) {
@@ -1242,152 +1191,139 @@ public class Minecraft
                     onMinecraftCrash(new UnexpectedThrowable("Unexpected error", throwable));
                 }
             }
-        }
-        catch(MinecraftError ignored) { }
-        finally {
+        } catch (MinecraftError ignored) {
+        } finally {
             shutdownMinecraftApplet();
         }
     }
 
-    public void freeUpMemory()
-    {
-        try
-        {
-            renderGlobal.deleteChunkLists();
+    public void freeUpMemory() {
+        try {
+            this.renderGlobal.deleteChunkLists();
+        } catch (Throwable ignored) {
         }
-        catch(Throwable ignored) { }
-        try
-        {
+        try {
             System.gc();
             ObjectPool.freeAllPools();
+        } catch (Throwable ignored) {
         }
-        catch(Throwable ignored) { }
-        try
-        {
+        try {
             System.gc();
             changeWorld(null);
+        } catch (Throwable ignored) {
         }
-        catch(Throwable ignored) { }
         System.gc();
     }
 
-	private void screenshotListener() {
-		if(gameSettings.keyScreenshot.isPressed()) {
-			if(!isTakingScreenshot) {
-				isTakingScreenshot = true;
-
-				boolean ctrl = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
-				
-				Debug.push("screenshot");
-				if(ctrl) {
-					if(Shaders.enableShaders) {
-						try {
-							screenshotHelper.takePanoramaScreenshot();
-							hudIngame.addChatMessage("Saved panorama screenshot!");
-						}catch (Exception e) {
+    private void screenshotListener() {
+        if (this.gameSettings.keyScreenshot.isPressed()) {
+            if (!this.isTakingScreenshot) {
+                this.isTakingScreenshot = true;
+
+                boolean ctrl = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
+
+                Debug.push("screenshot");
+                if (ctrl) {
+                    if (Shaders.enableShaders) {
+                        try {
+                            this.screenshotHelper.takePanoramaScreenshot();
+                            this.hudIngame.addChatMessage("Saved panorama screenshot!");
+                        } catch (Exception e) {
                             LOGGER.error("Exception occurred while taking panoramic screenshot!", e);
-						}
-					}
-				}else {
-					hudIngame.addChatMessage(ScreenShot.saveScreenshot(getMinecraftDir(), gameWindow.getWidthPixels(), gameWindow.getHeightPixels()));
-				}
-				Debug.pop();
-			}
-		}else {
-			isTakingScreenshot = false;
-		}
-	}
-
-    public void shutdown()
-    {
-        running = false;
-    }
-
-    public void setIngameFocus()
-    {
-        if(!gameWindow.isFocused())
-        {
+                        }
+                    }
+                } else {
+                    this.hudIngame.addChatMessage(ScreenShot.saveScreenshot(getMinecraftDir(), this.gameWindow.getWidthPixels(), this.gameWindow.getHeightPixels()));
+                }
+                Debug.pop();
+            }
+        } else {
+            this.isTakingScreenshot = false;
+        }
+    }
+
+    public void shutdown() {
+        this.running = false;
+    }
+
+    public void setIngameFocus() {
+        if (!this.gameWindow.isFocused()) {
             return;
         }
-        if(!inGameHasFocus)
-        {
-            inGameHasFocus = true;
-            mouseInput.grabCursor();
+        if (!this.inGameHasFocus) {
+            this.inGameHasFocus = true;
+            this.mouseInput.grabCursor();
             displayScreen(null);
-            mouseTicksRan = ticksRan + 10000;
-            if(thePlayer != null) {
-            	thePlayer.input.onGameFocused();
+            this.mouseTicksRan = this.ticksRan + 10000;
+            if (this.thePlayer != null) {
+                this.thePlayer.input.onGameFocused();
             }
         }
     }
 
-    public void setIngameNotInFocus()
-    {
-        if(!inGameHasFocus)
-        {
+    public void setIngameNotInFocus() {
+        if (!this.inGameHasFocus) {
             return;
         }
-        if(thePlayer != null)
-        {
-        	thePlayer.input.onGameUnfocused();
+        if (this.thePlayer != null) {
+            this.thePlayer.input.onGameUnfocused();
         }
-        inGameHasFocus = false;
-        if(inputType == InputType.KEYBOARD) mouseInput.releaseCursor();
-        worldRenderer.zooming = false;
+        this.inGameHasFocus = false;
+        if (this.inputType == InputType.KEYBOARD) this.mouseInput.releaseCursor();
+        this.worldRenderer.zooming = false;
     }
-    
-    public void displayInGameMenu()
-    {
-        if(currentScreen == null)
-        {
+
+    public void displayInGameMenu() {
+        if (this.currentScreen == null) {
             displayScreen(new ScreenPause());
         }
     }
 
-    private void mineBlocks(int mouseButton, boolean leftClickDown)
-    {
-        if(leftClickDown && objectMouseOver != null && objectMouseOver instanceof HitResult.Tile hitTile && mouseButton == 0)
-        {
-            int blockX = hitTile.tilePos.x;
-            int blockY = hitTile.tilePos.y;
-            int blockZ = hitTile.tilePos.z;
+    private void mineBlocks(int mouseButton, boolean leftClickDown) {
+        if (leftClickDown && this.objectMouseOver != null && this.objectMouseOver instanceof HitResult.Tile hitTile && mouseButton == 0) {
+            int blockX = hitTile.tilePos.x();
+            int blockY = hitTile.tilePos.y();
+            int blockZ = hitTile.tilePos.z();
             Side side = hitTile.side;
             double xPlaced;
-			double yPlaced = hitTile.location.y - hitTile.tilePos.y;
-			if(side.getAxis() == Axis.X) {
-				xPlaced = hitTile.location.x - hitTile.tilePos.x;
-			}else if(side.getAxis() == Axis.Z) {
-				xPlaced = hitTile.location.z - hitTile.tilePos.z;
-			}else {
-				xPlaced = hitTile.location.x - hitTile.tilePos.x;
-			}
-            playerController.continueDestroyBlock(blockX, blockY, blockZ, hitTile.side, xPlaced, yPlaced);
-        }
-        else
-        {
-            playerController.stopDestroyBlock(leftClickDown);
+            double yPlaced = hitTile.location.y() - hitTile.tilePos.y();
+            if (side.getAxis() == Axis.X) {
+                xPlaced = hitTile.location.x() - hitTile.tilePos.x();
+            } else if (side.getAxis() == Axis.Z) {
+                xPlaced = hitTile.location.z() - hitTile.tilePos.z();
+            } else {
+                xPlaced = hitTile.location.x() - hitTile.tilePos.x();
+            }
+            this.playerController.continueDestroyBlock(blockX, blockY, blockZ, hitTile.side, xPlaced, yPlaced);
+        } else {
+            this.playerController.stopDestroyBlock(leftClickDown);
         }
     }
 
-    private void clickMouse(int clickType, boolean attack, boolean repeat)
-    {
-        mouseTicksRan = ticksRan;
-        
+    private void clickMouse(int clickType, boolean attack, boolean repeat) {
+        this.mouseTicksRan = this.ticksRan;
+
         boolean flag = true;
-        if(objectMouseOver == null)
-        {
-            bridge: if (gameSettings.easyBridge.value){
+        if (this.objectMouseOver == null) {
+            bridge:
+            if (this.gameSettings.easyBridge.value) {
                 if (clickType == 1) {
-                    if (thePlayer.xRot < 45) {break bridge;}
-                    List<AABB> cubes = thePlayer.world.getCubes(thePlayer, thePlayer.bb.cloneMove(0, -1.0, 0.0));
-                    if (cubes.isEmpty()){break bridge;}
-                    AABB cube = cubes.get(0);
-                    if (cube == null){break bridge;}
-                    int blockX = MathHelper.floor(thePlayer.x);
-                    int blockY = MathHelper.floor(thePlayer.y - thePlayer.heightOffset - 0.25);
-                    int blockZ = MathHelper.floor(thePlayer.z);
-
-                    Direction playerDirection = Direction.getHorizontalDirection(thePlayer);
+                    if (this.thePlayer.xRot < 45) {
+                        break bridge;
+                    }
+                    List<AABBdc> cubes = this.thePlayer.world.getCubes(this.thePlayer, this.thePlayer.bb.translate(0, -1.0, 0.0, new AABBd()));
+                    if (cubes.isEmpty()) {
+                        break bridge;
+                    }
+                    AABBdc cube = cubes.get(0);
+                    if (cube == null) {
+                        break bridge;
+                    }
+                    int blockX = MathHelper.floor(this.thePlayer.x);
+                    int blockY = MathHelper.floor(this.thePlayer.y - this.thePlayer.heightOffset - 0.25);
+                    int blockZ = MathHelper.floor(this.thePlayer.z);
+
+                    Direction playerDirection = Direction.getHorizontalDirection(this.thePlayer);
                     if (playerDirection.isVertical()) break bridge;
                     Side side = playerDirection.getSide();
 
@@ -1398,265 +1334,211 @@ public class Minecraft
                     if (stack == null) {
                         break bridge;
                     }
-                    if (this.playerController.placeItemStackOnTile(thePlayer, currentWorld, stack, blockX, blockY, blockZ, side, xPlaced, yPlaced)) {
+                    if (this.playerController.placeItemStackOnTile(this.thePlayer, this.currentWorld, stack, blockX, blockY, blockZ, side, xPlaced, yPlaced)) {
                         this.playerController.swingItem(true);
                     }
                     if (stack.stackSize <= 0) {
                         this.thePlayer.inventory.mainInventory[this.thePlayer.inventory.getCurrentItemIndex()] = null;
                     } else if (stack.stackSize != numItemsInStack) {
-                        worldRenderer.itemRenderer.updateEquippedItem();
+                        this.worldRenderer.itemRenderer.updateEquippedItem();
                     }
                 }
             }
-            if(clickType == 0 && attack)
-            {
-                playerController.swingItem(true);
+            if (clickType == 0 && attack) {
+                this.playerController.swingItem(true);
             }
-        }
-        else if(objectMouseOver instanceof HitResult.Entity hitEntity)
-        {
-            if(clickType == 0 && attack)
-            {
-                playerController.swingItem(true);
-                playerController.attack(thePlayer, hitEntity.entity);
+        } else if (this.objectMouseOver instanceof HitResult.Entity hitEntity) {
+            if (clickType == 0 && attack) {
+                this.playerController.swingItem(true);
+                this.playerController.attack(this.thePlayer, hitEntity.entity);
             }
-            if(clickType == 1)
-            {
-                if (playerController.interact(thePlayer, hitEntity.entity)){
+            if (clickType == 1) {
+                if (this.playerController.interact(this.thePlayer, hitEntity.entity)) {
                     flag = false;
                 }
             }
-        }
-        else if(objectMouseOver instanceof HitResult.Tile hitTile)
-        {
-            int blockX = hitTile.tilePos.x;
-            int blockY = hitTile.tilePos.y;
-            int blockZ = hitTile.tilePos.z;
+        } else if (this.objectMouseOver instanceof HitResult.Tile hitTile) {
+            int blockX = hitTile.tilePos.x();
+            int blockY = hitTile.tilePos.y();
+            int blockZ = hitTile.tilePos.z();
             Side side = hitTile.side;
             double xPlaced;
-			double yPlaced = hitTile.location.y - hitTile.tilePos.y;
-			if(side.getAxis() == Axis.X) {
-				xPlaced = hitTile.location.x - hitTile.tilePos.x;
-			}else if(side.getAxis() == Axis.Z) {
-				xPlaced = hitTile.location.z - hitTile.tilePos.z;
-			}else {
-				xPlaced = hitTile.location.x - hitTile.tilePos.x;
-			}
-
-            if(clickType == 0)
-            {
-                playerController.startDestroyBlock(blockX, blockY, blockZ, hitTile.side, xPlaced, yPlaced, repeat);
-                if (thePlayer.getHeldObject() == null) {
-                    playerController.swingItem(true);
+            double yPlaced = hitTile.location.y() - hitTile.tilePos.y();
+            if (side.getAxis() == Axis.X) {
+                xPlaced = hitTile.location.x() - hitTile.tilePos.x();
+            } else if (side.getAxis() == Axis.Z) {
+                xPlaced = hitTile.location.z() - hitTile.tilePos.z();
+            } else {
+                xPlaced = hitTile.location.x() - hitTile.tilePos.x();
+            }
+
+            if (clickType == 0) {
+                this.playerController.startDestroyBlock(blockX, blockY, blockZ, hitTile.side, xPlaced, yPlaced, repeat);
+                if (this.thePlayer.getHeldObject() == null) {
+                    this.playerController.swingItem(true);
                 }
-            } else
-            {
-                ItemStack stack = thePlayer.inventory.getCurrentItem();
+            } else {
+                ItemStack stack = this.thePlayer.inventory.getCurrentItem();
                 int numItemsInStack = stack == null ? 0 : stack.stackSize;
-                if(playerController.useOrPlaceItemStackOnTile(thePlayer, currentWorld, stack, blockX, blockY, blockZ, side, xPlaced, yPlaced))
-                {
+                if (this.playerController.useOrPlaceItemStackOnTile(this.thePlayer, this.currentWorld, stack, blockX, blockY, blockZ, side, xPlaced, yPlaced)) {
                     flag = false;
-                    playerController.swingItem(true);
+                    this.playerController.swingItem(true);
                 }
-                if(stack == null)
-                {
+                if (stack == null) {
                     return;
                 }
-                if(stack.stackSize <= 0)
-                {
-                    thePlayer.inventory.mainInventory[thePlayer.inventory.getCurrentItemIndex()] = null;
-                }
-                else if(stack.stackSize != numItemsInStack)
-                {
-                    worldRenderer.itemRenderer.resetEquippedProgress();
+                if (stack.stackSize <= 0) {
+                    this.thePlayer.inventory.mainInventory[this.thePlayer.inventory.getCurrentItemIndex()] = null;
+                } else if (stack.stackSize != numItemsInStack) {
+                    this.worldRenderer.itemRenderer.resetEquippedProgress();
                 }
             }
         }
-        if(flag && clickType == 1)
-        {
-            ItemStack itemstack = thePlayer.inventory.getCurrentItem();
-            if(itemstack != null && playerController.useItemStackOnNothing(thePlayer, currentWorld, itemstack))
-            {
-                worldRenderer.itemRenderer.resetEquippedProgress();
+        if (flag && clickType == 1) {
+            ItemStack itemstack = this.thePlayer.inventory.getCurrentItem();
+            if (itemstack != null && this.playerController.useItemStackOnNothing(this.thePlayer, this.currentWorld, itemstack)) {
+                this.worldRenderer.itemRenderer.resetEquippedProgress();
             }
         }
     }
 
-    public void resize()
-    {
-        resolution.setScale(gameSettings.guiScale.value);
-        if(currentScreen != null) {
-            currentScreen.opened(resolution.getScaledWidthScreenCoords(), resolution.getScaledHeightScreenCoords());
+    public void resize() {
+        this.resolution.setScale(this.gameSettings.guiScale.value);
+        if (this.currentScreen != null) {
+            this.currentScreen.opened(this.resolution.getScaledWidthScreenCoords(), this.resolution.getScaledHeightScreenCoords());
         }
     }
 
-    private void clickMiddleMouseButton(boolean shift, boolean control)
-    {
-        HitResult mouseOver = thePlayer.rayCast(256, timer.partialTicks, false, false, false);
-        if(mouseOver instanceof HitResult.Tile hitTile)
-        {
-            int x = hitTile.tilePos.x;
-            int y = hitTile.tilePos.y;
-            int z = hitTile.tilePos.z;
-            thePlayer.pickBlock(x, y, z, control);
+    private void clickMiddleMouseButton(boolean shift, boolean control) {
+        HitResult mouseOver = this.thePlayer.rayCast(256, this.timer.partialTicks, false, false, false);
+        if (mouseOver instanceof HitResult.Tile hitTile) {
+            int x = hitTile.tilePos.x();
+            int y = hitTile.tilePos.y();
+            int z = hitTile.tilePos.z();
+            this.thePlayer.pickBlock(x, y, z, control);
         }
     }
 
-    private void startCheckPaidThread()
-    {
+    private void startCheckPaidThread() {
         new Thread(() -> {
-            try
-            {
-                HttpURLConnection httpurlconnection = (HttpURLConnection)(new URL("http://session.minecraft.net/game/joinserver.jsp?user=" + session.username + "&session=" + session.sessionId)).openConnection();
+            try {
+                HttpURLConnection httpurlconnection = (HttpURLConnection) (new URL("http://session.minecraft.net/game/joinserver.jsp?user=" + this.session.username + "&session=" + this.session.sessionId)).openConnection();
                 httpurlconnection.connect();
-                if(httpurlconnection.getResponseCode() == 400)
-                {
+                if (httpurlconnection.getResponseCode() == 400) {
                     Minecraft.hasPaidCheckTime = System.currentTimeMillis();
                 }
                 httpurlconnection.disconnect();
-            }
-            catch(Exception exception)
-            {
+            } catch (Exception exception) {
                 LOGGER.error("Error occurred while checking if paid client", exception);
             }
         }).start();
     }
 
-    public void runTick()
-    {
-        if(ticksRan == 6000)
-        {
+    public void runTick() {
+        if (this.ticksRan == 6000) {
             startCheckPaidThread();
         }
 
-        if (hotbarSwapAnimationProgress > 0) {
-            hotbarSwapAnimationProgress--;
-        } else if (hotbarSwapAnimationProgress < 0) {
-            hotbarSwapAnimationProgress++;
+        if (this.hotbarSwapAnimationProgress > 0) {
+            this.hotbarSwapAnimationProgress--;
+        } else if (this.hotbarSwapAnimationProgress < 0) {
+            this.hotbarSwapAnimationProgress++;
         }
 
         Debug.push("gui");
-        subtitleTracker.tick();
-        statsCounter.tick();
-        hudIngame.updateTick();
+        this.subtitleTracker.tick();
+        this.statsCounter.tick();
+        this.hudIngame.updateTick();
         Debug.change("misc");
-        worldRenderer.getMouseOver(1.0F);
-        if(thePlayer != null)
-        {
-            IChunkProvider chunkProvider = currentWorld.getChunkProvider();
-            int playerChunkX = MathHelper.floor_float((int)thePlayer.x) >> 4;
-            int playerChunkZ = MathHelper.floor_float((int)thePlayer.z) >> 4;
+        this.worldRenderer.getMouseOver(1.0F);
+        if (this.thePlayer != null) {
+            IChunkProvider chunkProvider = this.currentWorld.getChunkProvider();
+            int playerChunkX = MathHelper.floor_float((int) this.thePlayer.x) >> 4;
+            int playerChunkZ = MathHelper.floor_float((int) this.thePlayer.z) >> 4;
             chunkProvider.setCurrentChunkOver(playerChunkX, playerChunkZ);
         }
-        if(!isGamePaused && currentWorld != null)
-        {
-            playerController.tick();
+        if (!this.isGamePaused && this.currentWorld != null) {
+            this.playerController.tick();
         }
         Debug.change("textureTick");
         TextureRegistry.blockAtlas.bind();
-        textureManager.updateDynamicTextures(isGamePaused && currentScreen instanceof ScreenPause);
+        this.textureManager.updateDynamicTextures(this.isGamePaused && this.currentScreen instanceof ScreenPause);
         Debug.change("misc");
-        if(currentScreen == null && thePlayer != null)
-        {
-            if(thePlayer.getHealth() <= 0)
-            {
+        if (this.currentScreen == null && this.thePlayer != null) {
+            if (this.thePlayer.getHealth() <= 0) {
                 displayScreen(null);
-            }
-            else if(thePlayer.isPlayerSleeping() && currentWorld != null)
-            {
-                if(currentWorld.isClientSide)
-                {
+            } else if (this.thePlayer.isPlayerSleeping() && this.currentWorld != null) {
+                if (this.currentWorld.isClientSide) {
                     displayScreen(new ScreenSleepMP());
-                }
-                else
-                {
+                } else {
                     displayScreen(new ScreenSleepSP());
                 }
-                
+
             }
-        }
-        else if(currentScreen != null && (currentScreen instanceof ScreenSleepMP) && !thePlayer.isPlayerSleeping())
-        {
+        } else if (this.currentScreen != null && (this.currentScreen instanceof ScreenSleepMP) && !this.thePlayer.isPlayerSleeping()) {
             displayScreen(null);
         }
         Debug.change("input");
-        if(currentScreen != null)
-        {
-            mouseTicksRan = ticksRan + 10000;
-        }
-        
-        if(currentScreen != null)
-        {
-            if(inputType == InputType.CONTROLLER && (mouseInput.deltaX != 0 || mouseInput.deltaY != 0))
-            {
+        if (this.currentScreen != null) {
+            this.mouseTicksRan = this.ticksRan + 10000;
+        }
+
+        if (this.currentScreen != null) {
+            if (this.inputType == InputType.CONTROLLER && (this.mouseInput.deltaX != 0 || this.mouseInput.deltaY != 0)) {
                 setInputType(InputType.KEYBOARD);
             }
         }
 
-        if (currentScreen != null)
-        {
-            currentScreen.updateEvents();
-            if (currentScreen != null)
-            {
-                currentScreen.tick();
+        if (this.currentScreen != null) {
+            this.currentScreen.updateEvents();
+            if (this.currentScreen != null) {
+                this.currentScreen.tick();
             }
         }
-        if (currentScreen == null || currentScreen.passEvents)
-        {
-            while (Mouse.next())
-            {
-                long delta = System.currentTimeMillis() - systemTime;
-                if (delta <= 200L)
-                {
+        if (this.currentScreen == null || this.currentScreen.passEvents) {
+            while (Mouse.next()) {
+                long delta = System.currentTimeMillis() - this.systemTime;
+                if (delta <= 200L) {
                     int scrollDelta = Mouse.getEventDWheel();
-                    if (scrollDelta != 0)
-                    {
-                        if (thePlayer.noPhysics && toggleFlyPressed)
-                        {
-                        	final float steps = 20;
-                        	
-                        	int step = Math.round(gameSettings.flightSpeed.value * steps);
-                        	step += MathHelper.clamp(scrollDelta, -1, 1);
-                        	float newSpeed = step / steps;
-                        	newSpeed = MathHelper.clamp(newSpeed, 0.0f, 5.0f);
+                    if (scrollDelta != 0) {
+                        if (this.thePlayer.noPhysics && this.toggleFlyPressed) {
+                            final float steps = 20;
 
-                        	gameSettings.flightSpeed.value = newSpeed;
+                            int step = Math.round(this.gameSettings.flightSpeed.value * steps);
+                            step += MathHelper.clamp(scrollDelta, -1, 1);
+                            float newSpeed = step / steps;
+                            newSpeed = MathHelper.clamp(newSpeed, 0.0f, 5.0f);
 
-                        	thePlayer.setFlySpeed(newSpeed);
-                        	hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.flightSpeed);
-                        }
-                        else if (!gameSettings.keyZoom.isPressed())
-                        {
-                            thePlayer.inventory.changeCurrentItem(scrollDelta);
+                            this.gameSettings.flightSpeed.value = newSpeed;
+
+                            this.thePlayer.setFlySpeed(newSpeed);
+                            this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.flightSpeed);
+                        } else if (!this.gameSettings.keyZoom.isPressed()) {
+                            this.thePlayer.inventory.changeCurrentItem(scrollDelta);
                         }
                     }
-                    if (!inGameHasFocus && Mouse.getEventButtonState())
-                    {
+                    if (!this.inGameHasFocus && Mouse.getEventButtonState()) {
                         setIngameFocus();
-                    }
-                    else
-                    {
+                    } else {
                         if (checkBoundInputs(InputDevice.mouse)) {
-                            if (!Mouse.isGrabbed() && inputType == InputType.KEYBOARD && currentScreen == null) {
-                                mouseInput.grabCursor();
+                            if (!Mouse.isGrabbed() && this.inputType == InputType.KEYBOARD && this.currentScreen == null) {
+                                this.mouseInput.grabCursor();
                             }
                         }
                     }
                 }
-                thePlayer.input.keyEvent(-1, Mouse.getEventButton(), Mouse.getEventButtonState());
+                this.thePlayer.input.keyEvent(-1, Mouse.getEventButton(), Mouse.getEventButtonState());
             }
-            if (toggleFlyPressed && !gameSettings.keyFly.isPressed())
-            {
-                toggleFlyPressed = false;
-                if (flyPressedTime + 400 > System.currentTimeMillis()) {
-                    thePlayer.setNoclip(!thePlayer.noPhysics);
+            if (this.toggleFlyPressed && !this.gameSettings.keyFly.isPressed()) {
+                this.toggleFlyPressed = false;
+                if (this.flyPressedTime + 400 > System.currentTimeMillis()) {
+                    this.thePlayer.setNoclip(!this.thePlayer.noPhysics);
                 }
             }
-            while (Keyboard.next())
-            {
-        		if(Keyboard.getEventKeyState() && gameSettings.showFrameTimes.value && DebugRender.keyPressed(Keyboard.getEventKey())) {
-        			continue;
-        		}
+            while (Keyboard.next()) {
+                if (Keyboard.getEventKeyState() && this.gameSettings.showFrameTimes.value && DebugRender.keyPressed(Keyboard.getEventKey())) {
+                    continue;
+                }
 
                 final @Nullable Runnable scriptBindAction = BindManager.getInstance().getActionForKey(Keyboard.getEventKey());
                 if (scriptBindAction != null) {
@@ -1667,215 +1549,158 @@ public class Minecraft
                 boolean shift = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
                 //Fix your keyboard Mak you broke the overlay toggle
                 boolean control = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) /* || Keyboard.isKeyDown(Keyboard.KEY_F4)*/;
-                if(!(Keyboard.getEventKeyState() && gameSettings.keyToggleDebug.isPressed())) {
-                	thePlayer.input.keyEvent(Keyboard.getEventKey(), -1, Keyboard.getEventKeyState());
+                if (!(Keyboard.getEventKeyState() && this.gameSettings.keyToggleDebug.isPressed())) {
+                    this.thePlayer.input.keyEvent(Keyboard.getEventKey(), -1, Keyboard.getEventKeyState());
                 }
-                
-                if(gameSettings.keyToggleDebug.isPressEvent()) {
-                    f3Press = true;
+
+                if (this.gameSettings.keyToggleDebug.isPressEvent()) {
+                    this.f3Press = true;
                 }
-                if (gameSettings.keyToggleDebug.isReleaseEvent())
-                {
-                    if(f3Press)
-                    {
-                        if(control)
-                        {
-                            gameSettings.showFrameTimes.toggle();
-                        }
-                        else
-                        {
-                            gameSettings.showDebugScreen.toggle();
+                if (this.gameSettings.keyToggleDebug.isReleaseEvent()) {
+                    if (this.f3Press) {
+                        if (control) {
+                            this.gameSettings.showFrameTimes.toggle();
+                        } else {
+                            this.gameSettings.showDebugScreen.toggle();
                         }
 
-                        f3Press = false;
+                        this.f3Press = false;
                     }
                 }
 
-                if(Keyboard.getEventKeyState())
-                {
-                    if(gameSettings.keyFullScreen.isPressEvent())
-                    {
-                    	gameWindow.toggleFullscreen();
-                    }
-                    else
-                    {
-                        if (gameSettings.keyToggleDebug.isPressed())
-                        {
-                            if(Keyboard.getEventKey() == Keyboard.KEY_Q) {
-                                hudIngame.addChatMessage(TextFormatting.YELLOW + "Keyboard shortcuts: ");
-                                gameSettings.debugsKeys.sort(Comparator.comparing(KeyBinding::getKeyName));
-                                for (KeyBinding binding: gameSettings.debugsKeys){
-                                    hudIngame.addChatMessage(String.format("%s + %s: %s", gameSettings.keyToggleDebug.getKeyName(), binding.getKeyName(), I18n.getInstance().translateKey(binding.getId())));
+                if (Keyboard.getEventKeyState()) {
+                    if (this.gameSettings.keyFullScreen.isPressEvent()) {
+                        this.gameWindow.toggleFullscreen();
+                    } else {
+                        if (this.gameSettings.keyToggleDebug.isPressed()) {
+                            if (Keyboard.getEventKey() == Keyboard.KEY_Q) {
+                                this.hudIngame.addChatMessage(TextFormatting.YELLOW + "Keyboard shortcuts: ");
+                                this.gameSettings.debugsKeys.sort(Comparator.comparing(KeyBinding::getKeyName));
+                                for (KeyBinding binding : this.gameSettings.debugsKeys) {
+                                    this.hudIngame.addChatMessage(String.format("%s + %s: %s", this.gameSettings.keyToggleDebug.getKeyName(), binding.getKeyName(), I18n.getInstance().translateKey(binding.getId())));
                                 }
-                                hudIngame.addChatMessage(String.format("%s: %s", gameSettings.keyToggleTextureAtlas.getKeyName(), I18n.getInstance().translateKey(gameSettings.keyToggleTextureAtlas.getId())));
-                                hudIngame.addChatMessage(String.format("%s: %s", gameSettings.keyReleaseCursor.getKeyName(), I18n.getInstance().translateKey(gameSettings.keyReleaseCursor.getId())));
+                                this.hudIngame.addChatMessage(String.format("%s: %s", this.gameSettings.keyToggleTextureAtlas.getKeyName(), I18n.getInstance().translateKey(this.gameSettings.keyToggleTextureAtlas.getId())));
+                                this.hudIngame.addChatMessage(String.format("%s: %s", this.gameSettings.keyReleaseCursor.getKeyName(), I18n.getInstance().translateKey(this.gameSettings.keyReleaseCursor.getId())));
                             }
-                            if (gameSettings.keyReload.isPressEvent())
-                            {
+                            if (this.gameSettings.keyReload.isPressEvent()) {
                                 forceReload();
-                            }
-                            else if(gameSettings.keySwitchGamemode.isPressEvent())
-                            {
-                                if (currentWorld.getLevelData().getCheatsEnabled() || currentWorld.isClientSide)
-                                {
-                                    if (thePlayer.getGamemode() == Gamemode.creative)
-                                    {
-                                        thePlayer.sendChatMessage("/gamemode 0");
-                                    }
-                                    else
-                                    {
-                                        thePlayer.sendChatMessage("/gamemode 1");
+                            } else if (this.gameSettings.keySwitchGamemode.isPressEvent()) {
+                                if (this.currentWorld.getLevelData().getCheatsEnabled() || this.currentWorld.isClientSide) {
+                                    if (this.thePlayer.getGamemode() == Gamemode.creative) {
+                                        this.thePlayer.sendChatMessage("/gamemode 0");
+                                    } else {
+                                        this.thePlayer.sendChatMessage("/gamemode 1");
                                     }
                                 }
-                            }
-                            else if(gameSettings.keyDumpTextures.isPressEvent())
-                            {
+                            } else if (this.gameSettings.keyDumpTextures.isPressEvent()) {
                                 Textures.dumpTextures();
-                            }
-                            else if (gameSettings.keyFullbright.isPressEvent())
-                            {
+                            } else if (this.gameSettings.keyFullbright.isPressEvent()) {
                                 PacketHandlerClient queue = getSendQueue();
 
-                                if (queue != null)
-                                {
-                                    PlayerProfile profile = queue.getPlayer(thePlayer.username);
-                                    if (profile != null && profile.isOperator)
-                                    {
-                                        fullbright = !fullbright;
-                                        if(!LightmapHelper.isLightmapEnabled()) {
-                                        	renderGlobal.allChanged();
+                                if (queue != null) {
+                                    PlayerProfile profile = queue.getPlayer(this.thePlayer.username);
+                                    if (profile != null && profile.isOperator) {
+                                        this.fullbright = !this.fullbright;
+                                        if (!LightmapHelper.isLightmapEnabled()) {
+                                            this.renderGlobal.allChanged();
                                         }
                                     }
-                                }
-                                else
-                                {
-                                    if (currentWorld.getLevelData().getCheatsEnabled())
-                                    {
-                                        fullbright = !fullbright;
-                                        if(!LightmapHelper.isLightmapEnabled()) {
-                                        	renderGlobal.allChanged();
+                                } else {
+                                    if (this.currentWorld.getLevelData().getCheatsEnabled()) {
+                                        this.fullbright = !this.fullbright;
+                                        if (!LightmapHelper.isLightmapEnabled()) {
+                                            this.renderGlobal.allChanged();
                                         }
                                     }
                                 }
-                                hudIngame.heldItemTooltipElement.setString("Fullbright: " + (fullbright ? "On" : "Off"));
-                            }
-                            else if (gameSettings.keyLightmaps.isPressEvent())
-                            {
-                            	if(gameSettings.lightmapStyle.value == LightmapStyle.DISABLED) {
-                            		gameSettings.lightmapStyle.value = LightmapStyle.GRAY;
-                            		hudIngame.heldItemTooltipElement.setString("Lightmap: On");
-                            		renderGlobal.allChanged();
-                            	}else {
-                            		gameSettings.lightmapStyle.value = LightmapStyle.DISABLED;
-                            		hudIngame.heldItemTooltipElement.setString("Lightmap: Off");
-                            		renderGlobal.allChanged();
-                            	}
-                            }
-                            else if (gameSettings.keyCollisionBoxes.isPressEvent())
-                            {
-                            	gameSettings.showCollisionBoxes.toggle();
-                                hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.showCollisionBoxes);
-                            }
-                            else if (gameSettings.keyChunkBorders.isPressEvent())
-                            {
-                            	gameSettings.showChunkBorders.toggle();
-                                hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.showChunkBorders);
-                            }
-                            else if (gameSettings.keyClearChat.isPressEvent())
-                            {
-                                hudIngame.clearChatMessages();
-                            }
-                            else if (gameSettings.keyPauseLostFocus.isPressEvent())
-                            {
-                                gameSettings.pauseOnLostFocus.toggle();
-                                hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.pauseOnLostFocus);
-                            }
-                            else if (gameSettings.keyToggleItemInfo.isPressEvent())
-                            {
-                                gameSettings.showItemDebugInfo.toggle();
-                                hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.showItemDebugInfo);
-                            }
-                            else if (gameSettings.keyReloadChunks.isPressEvent())
-                            {
-                                renderGlobal.allChanged();
-                            }
-                            else if (gameSettings.keySmoothLighting.isPressEvent())
-                            {
-                                gameSettings.ambientOcclusion.toggle();
-                                gameSettings.ambientOcclusion.onUpdate();
-                                hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.ambientOcclusion);
+                                this.hudIngame.heldItemTooltipElement.setString("Fullbright: " + (this.fullbright ? "On" : "Off"));
+                            } else if (this.gameSettings.keyLightmaps.isPressEvent()) {
+                                if (this.gameSettings.lightmapStyle.value == LightmapStyle.DISABLED) {
+                                    this.gameSettings.lightmapStyle.value = LightmapStyle.GRAY;
+                                    this.hudIngame.heldItemTooltipElement.setString("Lightmap: On");
+                                    this.renderGlobal.allChanged();
+                                } else {
+                                    this.gameSettings.lightmapStyle.value = LightmapStyle.DISABLED;
+                                    this.hudIngame.heldItemTooltipElement.setString("Lightmap: Off");
+                                    this.renderGlobal.allChanged();
+                                }
+                            } else if (this.gameSettings.keyCollisionBoxes.isPressEvent()) {
+                                this.gameSettings.showCollisionBoxes.toggle();
+                                this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.showCollisionBoxes);
+                            } else if (this.gameSettings.keyChunkBorders.isPressEvent()) {
+                                this.gameSettings.showChunkBorders.toggle();
+                                this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.showChunkBorders);
+                            } else if (this.gameSettings.keyClearChat.isPressEvent()) {
+                                this.hudIngame.clearChatMessages();
+                            } else if (this.gameSettings.keyPauseLostFocus.isPressEvent()) {
+                                this.gameSettings.pauseOnLostFocus.toggle();
+                                this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.pauseOnLostFocus);
+                            } else if (this.gameSettings.keyToggleItemInfo.isPressEvent()) {
+                                this.gameSettings.showItemDebugInfo.toggle();
+                                this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.showItemDebugInfo);
+                            } else if (this.gameSettings.keyReloadChunks.isPressEvent()) {
+                                this.renderGlobal.allChanged();
+                            } else if (this.gameSettings.keySmoothLighting.isPressEvent()) {
+                                this.gameSettings.ambientOcclusion.toggle();
+                                this.gameSettings.ambientOcclusion.onUpdate();
+                                this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.ambientOcclusion);
                             }
-                            if(!gameSettings.keyToggleDebug.isPressEvent()) f3Press = false;
-                        }
-                        else if (gameSettings.keyReleaseCursor.isPressEvent())
-                        {
-                            mouseInput.releaseCursor();
-                        }
-                        else if (gameSettings.keyShowConsole.isPressEvent() && gameSettings.developerMode.value)
-                        {
+                            if (!this.gameSettings.keyToggleDebug.isPressEvent()) this.f3Press = false;
+                        } else if (this.gameSettings.keyReleaseCursor.isPressEvent()) {
+                            this.mouseInput.releaseCursor();
+                        } else if (this.gameSettings.keyShowConsole.isPressEvent() && this.gameSettings.developerMode.value) {
                             displayScreen(new ScreenConsole(this.currentScreen));
-                        }
-                        else if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE)
-                        {
+                        } else if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) {
                             displayInGameMenu();
-                        }
-                        else if (gameSettings.keyCommand.isPressed())
-                        {
+                        } else if (this.gameSettings.keyCommand.isPressed()) {
                             displayScreen(new ScreenChat("/"));
-                        }
-                        else
-                        {
+                        } else {
                             checkBoundInputs(InputDevice.keyboard);
                         }
                     }
-                }else {
-                	checkBoundInputs(InputDevice.keyboard);
+                } else {
+                    checkBoundInputs(InputDevice.keyboard);
                 }
             }
 
-            boolean breakBlockPressed = gameSettings.keyAttack.isPressed() || (controllerInput != null && controllerInput.buttonRightTrigger.isPressed());
-            boolean placeBlockPressed = gameSettings.keyInteract.isPressed() || (controllerInput != null && controllerInput.buttonLeftTrigger.isPressed());
+            boolean breakBlockPressed = this.gameSettings.keyAttack.isPressed() || (this.controllerInput != null && this.controllerInput.buttonRightTrigger.isPressed());
+            boolean placeBlockPressed = this.gameSettings.keyInteract.isPressed() || (this.controllerInput != null && this.controllerInput.buttonLeftTrigger.isPressed());
 
-            if(currentScreen == null)
-            {
-                if(breakBlockPressed && (float)(ticksRan - mouseTicksRan) >= timer.ticksPerSecond / 5F && inGameHasFocus) clickMouse(0, gameSettings.autoHit.value, true);
-                if(placeBlockPressed && (float)(ticksRan - mouseTicksRan) >= timer.ticksPerSecond / 5F && inGameHasFocus) clickMouse(1, gameSettings.autoHit.value, true);
+            if (this.currentScreen == null) {
+                if (breakBlockPressed && (float) (this.ticksRan - this.mouseTicksRan) >= this.timer.ticksPerSecond / 5F && this.inGameHasFocus)
+                    clickMouse(0, this.gameSettings.autoHit.value, true);
+                if (placeBlockPressed && (float) (this.ticksRan - this.mouseTicksRan) >= this.timer.ticksPerSecond / 5F && this.inGameHasFocus)
+                    clickMouse(1, this.gameSettings.autoHit.value, true);
             }
-            mineBlocks(0, currentScreen == null && breakBlockPressed && inGameHasFocus);
+            mineBlocks(0, this.currentScreen == null && breakBlockPressed && this.inGameHasFocus);
         }
         InputHandler.poll();
-        if (this.controllerInput != null)
-        {
+        if (this.controllerInput != null) {
             handleControllerInput();
         }
         Debug.change("misc");
-        if(currentWorld != null)
-        {
-            if(thePlayer != null)
-            {
-                joinPlayerCounter++;
-                if(joinPlayerCounter == 30)
-                {
-                    joinPlayerCounter = 0;
-                    currentWorld.joinEntityInSurroundings(thePlayer);
+        if (this.currentWorld != null) {
+            if (this.thePlayer != null) {
+                this.joinPlayerCounter++;
+                if (this.joinPlayerCounter == 30) {
+                    this.joinPlayerCounter = 0;
+                    this.currentWorld.joinEntityInSurroundings(this.thePlayer);
                 }
-                thePlayer.setFlySpeed(gameSettings.flightSpeed.value);
-                thePlayer.setFlightSmoothness(gameSettings.flightSmoothness.value);
-                thePlayer.turnWithVehicle = gameSettings.turnWithVehicle.value;
+                this.thePlayer.setFlySpeed(this.gameSettings.flightSpeed.value);
+                this.thePlayer.setFlightSmoothness(this.gameSettings.flightSmoothness.value);
+                this.thePlayer.turnWithVehicle = this.gameSettings.turnWithVehicle.value;
             }
-            if(!isGamePaused)
-            {
-                worldRenderer.updateRenderer();
-                renderGlobal.tick();
+            if (!this.isGamePaused) {
+                this.worldRenderer.updateRenderer();
+                this.renderGlobal.tick();
                 TileEntityRenderDispatcher.instance.tick();
 
                 Debug.change("entity");
-                if(currentWorld.lightningFlicker > 0)
-                {
-                    currentWorld.lightningFlicker--;
+                if (this.currentWorld.lightningFlicker > 0) {
+                    this.currentWorld.lightningFlicker--;
                 }
                 try {
-                    currentWorld.updateEntities();
+                    this.currentWorld.updateEntities();
                 } catch (StackOverflowError stackOverflowError) {
                     LOGGER.error("Stack overflow while updating world entities! Closing world!", stackOverflowError);
                     changeWorld(null);
@@ -1887,11 +1712,10 @@ public class Minecraft
                 }
                 Debug.change("misc");
             }
-            if(!isGamePaused || isMultiplayerWorld())
-            {
+            if (!this.isGamePaused || isMultiplayerWorld()) {
                 Debug.change("world");
                 try {
-                    currentWorld.tick();
+                    this.currentWorld.tick();
                 } catch (StackOverflowError stackOverflowError) {
                     LOGGER.error("Stack overflow while updating world entities! Closing world!", stackOverflowError);
                     changeWorld(null);
@@ -1904,25 +1728,23 @@ public class Minecraft
                 Debug.change("misc");
             } else {
                 try {
-                    currentWorld.getChunkProvider().tick();
+                    this.currentWorld.getChunkProvider().tick();
                 } catch (Throwable throwable) {
                     LOGGER.error("Issue while ticking chunk provider!", throwable);
                 }
             }
-            if(!isGamePaused && currentWorld != null)
-            {
+            if (!this.isGamePaused && this.currentWorld != null) {
                 Debug.change("randomDisplayTick");
-                currentWorld.randomDisplayUpdates(MathHelper.floor(thePlayer.x), MathHelper.floor(thePlayer.y), MathHelper.floor(thePlayer.z));
+                this.currentWorld.randomDisplayUpdates(MathHelper.floor(this.thePlayer.x), MathHelper.floor(this.thePlayer.y), MathHelper.floor(this.thePlayer.z));
                 Debug.change("misc");
             }
-            if(!isGamePaused)
-            {
+            if (!this.isGamePaused) {
                 Debug.change("effects");
-                particleEngine.tick();
+                this.particleEngine.tick();
                 Debug.change("misc");
             }
         }
-        systemTime = System.currentTimeMillis();
+        this.systemTime = System.currentTimeMillis();
         Debug.pop();
     }
 
@@ -1931,38 +1753,38 @@ public class Minecraft
         boolean control = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
 
         // Attack
-        if (gameSettings.keyAttack.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyAttack.isPressEvent(currentInputDevice)) {
             clickMouse(0, true, false);
             return true;
         }
 
         // Interact
-        if (gameSettings.keyInteract.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyInteract.isPressEvent(currentInputDevice)) {
             clickMouse(1, true, false);
             return true;
         }
 
         // Pick block
-        if (gameSettings.keyPickBlock.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyPickBlock.isPressEvent(currentInputDevice)) {
             clickMiddleMouseButton(shift, control);
             return true;
         }
 
         // Toggle overlay
-        if (gameSettings.keyToggleOverlay.isPressEvent(currentInputDevice)) {
-            if(control) {
-                gameSettings.overlayMode.value ++;
-                gameSettings.overlayMode.value %= 3;
+        if (this.gameSettings.keyToggleOverlay.isPressEvent(currentInputDevice)) {
+            if (control) {
+                this.gameSettings.overlayMode.value++;
+                this.gameSettings.overlayMode.value %= 3;
             } else {
                 boolean on = false;
-                for(int i = 0; i < gameSettings.overlayElements.length; i++) {
-                    if(gameSettings.overlayElements[i].value) {
+                for (int i = 0; i < this.gameSettings.overlayElements.length; i++) {
+                    if (this.gameSettings.overlayElements[i].value) {
                         on = true;
                         break;
                     }
                 }
-                for(int i = 0; i < gameSettings.overlayElements.length; i++) {
-                    gameSettings.overlayElements[i].value = !on;
+                for (int i = 0; i < this.gameSettings.overlayElements.length; i++) {
+                    this.gameSettings.overlayElements[i].value = !on;
                 }
             }
 
@@ -1970,239 +1792,234 @@ public class Minecraft
         }
 
         // Hide GUI
-        if (gameSettings.keyHideGui.isPressEvent(currentInputDevice)) {
-            gameSettings.immersiveMode.toggle();
+        if (this.gameSettings.keyHideGui.isPressEvent(currentInputDevice)) {
+            this.gameSettings.immersiveMode.toggle();
             return true;
         }
 
         // Switch perspective
-        if (gameSettings.keySwitchPerspective.isPressEvent(currentInputDevice)) {
-            gameSettings.thirdPersonView.value = (gameSettings.thirdPersonView.value + 1) % 3;
+        if (this.gameSettings.keySwitchPerspective.isPressEvent(currentInputDevice)) {
+            this.gameSettings.thirdPersonView.value = (this.gameSettings.thirdPersonView.value + 1) % 3;
             return true;
         }
 
         // Cinematic camera
-        if (gameSettings.keyCinematicCamera.isPressEvent(currentInputDevice)) {
-            gameSettings.smoothCamera.value = !gameSettings.smoothCamera.value;
-            hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.smoothCamera);
+        if (this.gameSettings.keyCinematicCamera.isPressEvent(currentInputDevice)) {
+            this.gameSettings.smoothCamera.value = !this.gameSettings.smoothCamera.value;
+            this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.smoothCamera);
             return true;
         }
 
         // Display inventory
-        if (gameSettings.keyInventory.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyInventory.isPressEvent(currentInputDevice)) {
             displayScreen(getInventoryScreen());
             return true;
         }
 
         // Display Guidebook
-        if (gameSettings.keyGuidebook.isPressEvent(currentInputDevice)) {
-            thePlayer.displayGuidebookScreen();
+        if (this.gameSettings.keyGuidebook.isPressEvent(currentInputDevice)) {
+            this.thePlayer.displayGuidebookScreen();
             return true;
         }
 
         // Drop item
-        if (gameSettings.keyDrop.isPressEvent(currentInputDevice)) {
-            thePlayer.dropCurrentItem(control);
+        if (this.gameSettings.keyDrop.isPressEvent(currentInputDevice)) {
+            this.thePlayer.dropCurrentItem(control);
             return true;
         }
 
         // Enter photo mode
-        if (gameSettings.keyPhotoMode.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyPhotoMode.isPressEvent(currentInputDevice)) {
             displayScreen(new ScreenPhotoMode());
             return true;
         }
 
         // Open chat
-        if (gameSettings.keyChat.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyChat.isPressEvent(currentInputDevice)) {
             displayScreen(new ScreenChat());
             return true;
         }
 
         // Show player list
-        if (isMultiplayerWorld() && gameSettings.keyPlayerList.isPressEvent(currentInputDevice)) {
+        if (isMultiplayerWorld() && this.gameSettings.keyPlayerList.isPressEvent(currentInputDevice)) {
             if (control) {
-                gameSettings.playerListPosition.value++;
-                gameSettings.playerListPosition.value %= 3;
+                this.gameSettings.playerListPosition.value++;
+                this.gameSettings.playerListPosition.value %= 3;
             } else {
-                gameSettings.showPlayerList.value = !gameSettings.showPlayerList.value;
+                this.gameSettings.showPlayerList.value = !this.gameSettings.showPlayerList.value;
             }
             return true;
         }
 
         // Fly
-        if (thePlayer.getGamemode().canPlayerFly() && gameSettings.keyFly.isPressEvent(currentInputDevice)) {
-            if (!toggleFlyPressed) toggleFlyPressed = true;
-            flyPressedTime = System.currentTimeMillis();
+        if (this.thePlayer.getGamemode().canPlayerFly() && this.gameSettings.keyFly.isPressEvent(currentInputDevice)) {
+            if (!this.toggleFlyPressed) this.toggleFlyPressed = true;
+            this.flyPressedTime = System.currentTimeMillis();
             return true;
         }
 
         // Hotbar switch
-        if (gameSettings.keyHotBarSwitch.isPressEvent(currentInputDevice)) {
-            if (!thePlayer.inventory.currentItemLocked()) {
+        if (this.gameSettings.keyHotBarSwitch.isPressEvent(currentInputDevice)) {
+            if (!this.thePlayer.inventory.currentItemLocked()) {
                 if (shift) {
-                    thePlayer.setHotbarOffset((thePlayer.inventory.getHotbarOffset() + 27) % (36));
-                    hotbarSwapAnimationProgress = -HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
-                }
-                else {
-                    thePlayer.setHotbarOffset((thePlayer.inventory.getHotbarOffset() + 9) % (36));
-                    hotbarSwapAnimationProgress = HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
+                    this.thePlayer.setHotbarOffset((this.thePlayer.inventory.getHotbarOffset() + 27) % (36));
+                    this.hotbarSwapAnimationProgress = -HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
+                } else {
+                    this.thePlayer.setHotbarOffset((this.thePlayer.inventory.getHotbarOffset() + 9) % (36));
+                    this.hotbarSwapAnimationProgress = HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
                 }
-                thePlayer.inventory.changeCurrentItem(0);
+                this.thePlayer.inventory.changeCurrentItem(0);
             }
             return true;
         }
 
         // Center view
-        if (gameSettings.keyCenterView.isPressEvent(currentInputDevice)) {
-            thePlayer.xRot = 0.0f;
+        if (this.gameSettings.keyCenterView.isPressEvent(currentInputDevice)) {
+            this.thePlayer.xRot = 0.0f;
             return true;
         }
 
         // Lock rotation
-        if (gameSettings.keyLockRotation.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyLockRotation.isPressEvent(currentInputDevice)) {
             if (control) {
-                gameSettings.rotationOverlayMode.value++;
-                gameSettings.rotationOverlayMode.value %= 4;
+                this.gameSettings.rotationOverlayMode.value++;
+                this.gameSettings.rotationOverlayMode.value %= 4;
             } else {
-                if (thePlayer.rotationLock == null || thePlayer.rotationLock == Direction.NONE) {
-                    thePlayer.rotationLock = Direction.getDirection(thePlayer);
-                    thePlayer.rotationLockHorizontal = Direction.getHorizontalDirection(thePlayer);
-                    thePlayer.rotationLockVertical = Direction.getVerticalDirection(thePlayer);
+                if (this.thePlayer.rotationLock == null || this.thePlayer.rotationLock == Direction.NONE) {
+                    this.thePlayer.rotationLock = Direction.getDirection(this.thePlayer);
+                    this.thePlayer.rotationLockHorizontal = Direction.getHorizontalDirection(this.thePlayer);
+                    this.thePlayer.rotationLockVertical = Direction.getVerticalDirection(this.thePlayer);
                 } else {
-                    thePlayer.rotationLock = null;
-                    thePlayer.rotationLockHorizontal = null;
-                    thePlayer.rotationLockVertical = null;
+                    this.thePlayer.rotationLock = null;
+                    this.thePlayer.rotationLockHorizontal = null;
+                    this.thePlayer.rotationLockVertical = null;
                 }
-                thePlayer.syncPlacementMode();
+                this.thePlayer.syncPlacementMode();
             }
             return true;
         }
 
         // Toggle fog
-        if (gameSettings.keyToggleFog.isPressEvent(currentInputDevice)) {
-            int renderDistance = gameSettings.renderDistance.value;
+        if (this.gameSettings.keyToggleFog.isPressEvent(currentInputDevice)) {
+            int renderDistance = this.gameSettings.renderDistance.value;
             int nextRenderDistance;
             if (!shift) {
                 nextRenderDistance = renderDistance / 8 * 8 + 8;
             } else {
                 nextRenderDistance = (renderDistance - 1) / 8 * 8;
             }
-            if (nextRenderDistance > gameSettings.renderDistance.highest && !shift) {
-                nextRenderDistance = gameSettings.renderDistance.highest;
+            if (nextRenderDistance > this.gameSettings.renderDistance.highest && !shift) {
+                nextRenderDistance = this.gameSettings.renderDistance.highest;
             }
-            if (nextRenderDistance < gameSettings.renderDistance.lowest && shift) {
-                nextRenderDistance = gameSettings.renderDistance.lowest;
+            if (nextRenderDistance < this.gameSettings.renderDistance.lowest && shift) {
+                nextRenderDistance = this.gameSettings.renderDistance.lowest;
             }
-            if (renderDistance == gameSettings.renderDistance.highest && !shift) {
-                nextRenderDistance = gameSettings.renderDistance.lowest;
+            if (renderDistance == this.gameSettings.renderDistance.highest && !shift) {
+                nextRenderDistance = this.gameSettings.renderDistance.lowest;
             }
-            if (renderDistance == gameSettings.renderDistance.lowest && shift) {
-                nextRenderDistance = gameSettings.renderDistance.highest;
+            if (renderDistance == this.gameSettings.renderDistance.lowest && shift) {
+                nextRenderDistance = this.gameSettings.renderDistance.highest;
             }
 
-            gameSettings.renderDistance.set(nextRenderDistance);
-            hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.renderDistance);
+            this.gameSettings.renderDistance.set(nextRenderDistance);
+            this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.renderDistance);
             return true;
         }
 
         // Toggle gamma
-        if (gameSettings.keyToggleGamma.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyToggleGamma.isPressEvent(currentInputDevice)) {
             int currentGammaStep = 2;
-            if (gameSettings.gamma.value < 0.125f) {
+            if (this.gameSettings.gamma.value < 0.125f) {
                 currentGammaStep = 0;
-            } else if (gameSettings.gamma.value < 0.375f) {
+            } else if (this.gameSettings.gamma.value < 0.375f) {
                 currentGammaStep = 1;
-            } else if (gameSettings.gamma.value > 0.875f) {
+            } else if (this.gameSettings.gamma.value > 0.875f) {
                 currentGammaStep = 4;
-            } else if (gameSettings.gamma.value > 0.625f) {
+            } else if (this.gameSettings.gamma.value > 0.625f) {
                 currentGammaStep = 3;
             }
             int newGammaStep = ((currentGammaStep + (shift ? -1 : 1)) + 5) % 5;
-            gameSettings.gamma.value = newGammaStep * 0.25f;
-            hudIngame.heldItemTooltipElement.setOptionNameAndValueString(gameSettings.gamma);
+            this.gameSettings.gamma.value = newGammaStep * 0.25f;
+            this.hudIngame.heldItemTooltipElement.setOptionNameAndValueString(this.gameSettings.gamma);
             return true;
         }
 
         // Hotbar left
-        if (gameSettings.keyHotBarLeft.isPressEvent(currentInputDevice)) {
-            thePlayer.inventory.changeCurrentItem(1);
+        if (this.gameSettings.keyHotBarLeft.isPressEvent(currentInputDevice)) {
+            this.thePlayer.inventory.changeCurrentItem(1);
             return true;
         }
 
         // Hotbar right
-        if (gameSettings.keyHotBarRight.isPressEvent(currentInputDevice)) {
-            thePlayer.inventory.changeCurrentItem(-1);
+        if (this.gameSettings.keyHotBarRight.isPressEvent(currentInputDevice)) {
+            this.thePlayer.inventory.changeCurrentItem(-1);
             return true;
         }
 
         // Hotbar slots
-        KeyBinding[] hotbarSlots = new KeyBinding[] {
-            gameSettings.keyHotBarSlot1,
-            gameSettings.keyHotBarSlot2,
-            gameSettings.keyHotBarSlot3,
-            gameSettings.keyHotBarSlot4,
-            gameSettings.keyHotBarSlot5,
-            gameSettings.keyHotBarSlot6,
-            gameSettings.keyHotBarSlot7,
-            gameSettings.keyHotBarSlot8,
-            gameSettings.keyHotBarSlot9
+        KeyBinding[] hotbarSlots = new KeyBinding[]{
+            this.gameSettings.keyHotBarSlot1,
+            this.gameSettings.keyHotBarSlot2,
+            this.gameSettings.keyHotBarSlot3,
+            this.gameSettings.keyHotBarSlot4,
+            this.gameSettings.keyHotBarSlot5,
+            this.gameSettings.keyHotBarSlot6,
+            this.gameSettings.keyHotBarSlot7,
+            this.gameSettings.keyHotBarSlot8,
+            this.gameSettings.keyHotBarSlot9
         };
-        for(int i = 0; i < hotbarSlots.length; i++) {
+        for (int i = 0; i < hotbarSlots.length; i++) {
             if (hotbarSlots[i].isPressEvent(currentInputDevice)) {
-                thePlayer.inventory.setCurrentItemIndex(i + thePlayer.inventory.getHotbarOffset(), false);
+                this.thePlayer.inventory.setCurrentItemIndex(i + this.thePlayer.inventory.getHotbarOffset(), false);
                 return true;
             }
         }
-        
+
         // Zoom
-        if(gameSettings.keyZoom.isPressEvent(currentInputDevice)) {
+        if (this.gameSettings.keyZoom.isPressEvent(currentInputDevice)) {
             Mouse.getDWheel(); // This resets the mouse delta before its checked by zoom, fixes a bug please don't remove
-        	worldRenderer.zooming = true;
-        	return true;
+            this.worldRenderer.zooming = true;
+            return true;
         }
-        if(gameSettings.keyZoom.isReleaseEvent(currentInputDevice)) {
-        	worldRenderer.zooming = false;
-        	return true;
+        if (this.gameSettings.keyZoom.isReleaseEvent(currentInputDevice)) {
+            this.worldRenderer.zooming = false;
+            return true;
         }
 
         // Open Achievements
-        if (gameSettings.keyOpenAchievements.isPressEvent(currentInputDevice)) {
-            displayScreen(new ScreenAchievements(null, statsCounter));
+        if (this.gameSettings.keyOpenAchievements.isPressEvent(currentInputDevice)) {
+            displayScreen(new ScreenAchievements(null, this.statsCounter));
         }
 
         // Open Statistics
-        if (gameSettings.keyOpenStatistics.isPressEvent(currentInputDevice)) {
-            displayScreen(new ScreenStats(null, statsCounter));
+        if (this.gameSettings.keyOpenStatistics.isPressEvent(currentInputDevice)) {
+            displayScreen(new ScreenStats(null, this.statsCounter));
         }
-        
+
         return false;
     }
 
-    private ScreenInventory getInventoryScreen()
-    {
-        if (thePlayer.getGamemode() == Gamemode.creative)
-        {
-            return new ScreenInventoryCreative(thePlayer);
-        }
-        else
-        {
-            return new ScreenInventory(thePlayer);
+    private ScreenInventory getInventoryScreen() {
+        if (this.thePlayer.getGamemode() == Gamemode.creative) {
+            return new ScreenInventoryCreative(this.thePlayer);
+        } else {
+            return new ScreenInventory(this.thePlayer);
         }
     }
-    
+
     public void handleControllerInput() {
-        assert controllerInput != null;
-        try{
-            controllerInput.update();
-        }catch (Exception e) {
+        assert this.controllerInput != null;
+        try {
+            this.controllerInput.update();
+        } catch (Exception e) {
             LOGGER.warn("Error occurred while updating controller input! Disabling controller input!", e);
-            controllerInput = null;
+            this.controllerInput = null;
             setInputType(InputType.KEYBOARD);
             return;
         }
 
-        for(Joystick joystick : controllerInput.joysticks) {
-            if(joystick.getX() < -0.5f || joystick.getX() > 0.5f || joystick.getY() < -0.5f || joystick.getY() > 0.5f) {
+        for (Joystick joystick : this.controllerInput.joysticks) {
+            if (joystick.getX() < -0.5f || joystick.getX() > 0.5f || joystick.getY() < -0.5f || joystick.getY() > 0.5f) {
                 setInputType(InputType.CONTROLLER);
             }
         }
@@ -2210,84 +2027,82 @@ public class Minecraft
         //Store it here to prevent crash when switching controller
         ControllerInput controller = this.controllerInput;
 
-        if(currentScreen == null) {
-            if(controller.buttonRightTrigger.pressedThisFrame()) {
+        if (this.currentScreen == null) {
+            if (controller.buttonRightTrigger.pressedThisFrame()) {
                 clickMouse(0, true, false);
-                mouseTicksRan = ticksRan;
+                this.mouseTicksRan = this.ticksRan;
             }
-            if(controller.buttonLeftTrigger.pressedThisFrame()) {
+            if (controller.buttonLeftTrigger.pressedThisFrame()) {
                 clickMouse(1, true, false);
-                mouseTicksRan = ticksRan;
+                this.mouseTicksRan = this.ticksRan;
             }
-            if(controller.buttonB.pressedThisFrame()) {
-                thePlayer.dropCurrentItem(false);
+            if (controller.buttonB.pressedThisFrame()) {
+                this.thePlayer.dropCurrentItem(false);
             }
-            if(controller.buttonY.pressedThisFrame() || controller.buttonX.pressedThisFrame()) {
+            if (controller.buttonY.pressedThisFrame() || controller.buttonX.pressedThisFrame()) {
                 displayScreen(getInventoryScreen());
             }
-            if(controller.buttonBack.pressedThisFrame()) {
-                gameSettings.showPlayerList.value = !gameSettings.showPlayerList.value;
+            if (controller.buttonBack.pressedThisFrame()) {
+                this.gameSettings.showPlayerList.value = !this.gameSettings.showPlayerList.value;
             }
-            if(controller.buttonStart.pressedThisFrame()) {
+            if (controller.buttonStart.pressedThisFrame()) {
                 displayScreen(new ScreenPause());
             }
-            if(controller.digitalPad.up.pressedThisFrame()) {
-                if (!thePlayer.inventory.currentItemLocked()) {
-                    thePlayer.setHotbarOffset((thePlayer.inventory.getHotbarOffset() + 27) % (36));
-                    hotbarSwapAnimationProgress = -HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
-                    thePlayer.inventory.changeCurrentItem(0);
+            if (controller.digitalPad.up.pressedThisFrame()) {
+                if (!this.thePlayer.inventory.currentItemLocked()) {
+                    this.thePlayer.setHotbarOffset((this.thePlayer.inventory.getHotbarOffset() + 27) % (36));
+                    this.hotbarSwapAnimationProgress = -HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
+                    this.thePlayer.inventory.changeCurrentItem(0);
                 }
             }
-            if(controller.digitalPad.down.pressedThisFrame()) {
-                if (!thePlayer.inventory.currentItemLocked()) {
-                    thePlayer.setHotbarOffset((thePlayer.inventory.getHotbarOffset() + 9) % (36));
-                    hotbarSwapAnimationProgress = HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
-                    thePlayer.inventory.changeCurrentItem(0);
+            if (controller.digitalPad.down.pressedThisFrame()) {
+                if (!this.thePlayer.inventory.currentItemLocked()) {
+                    this.thePlayer.setHotbarOffset((this.thePlayer.inventory.getHotbarOffset() + 9) % (36));
+                    this.hotbarSwapAnimationProgress = HOTBAR_SWAP_ANIMATION_LENGTH_TICKS;
+                    this.thePlayer.inventory.changeCurrentItem(0);
                 }
             }
-            if(controller.digitalPad.left.pressedThisFrame() && thePlayer.getGamemode().canPlayerFly()) {
-                thePlayer.setNoclip(!thePlayer.noPhysics);
+            if (controller.digitalPad.left.pressedThisFrame() && this.thePlayer.getGamemode().canPlayerFly()) {
+                this.thePlayer.setNoclip(!this.thePlayer.noPhysics);
             }
-            if(controller.buttonLeftShoulder.pressedThisFrame()) {
-                thePlayer.inventory.changeCurrentItem(1);
+            if (controller.buttonLeftShoulder.pressedThisFrame()) {
+                this.thePlayer.inventory.changeCurrentItem(1);
             }
-            if(controller.buttonRightShoulder.pressedThisFrame()) {
-                thePlayer.inventory.changeCurrentItem(-1);
+            if (controller.buttonRightShoulder.pressedThisFrame()) {
+                this.thePlayer.inventory.changeCurrentItem(-1);
             }
-            if(controller.joyLeft.getButton().pressedThisFrame()) {
-                gameSettings.thirdPersonView.value++;
-                gameSettings.thirdPersonView.value%=3;
+            if (controller.joyLeft.getButton().pressedThisFrame()) {
+                this.gameSettings.thirdPersonView.value++;
+                this.gameSettings.thirdPersonView.value %= 3;
             }
-            if (controllerInput.digitalPad.right.pressedThisFrame()){
-                thePlayer.displayGuidebookScreen();
+            if (this.controllerInput.digitalPad.right.pressedThisFrame()) {
+                this.thePlayer.displayGuidebookScreen();
             }
-        }else {
-            try{
+        } else {
+            try {
                 this.currentScreen.controllerInput(controller);
-            }catch (Exception e) {
+            } catch (Exception e) {
                 LOGGER.error("Exception occurred while running gui specific controller actions!", e);
             }
         }
     }
 
-    private void forceReload()
-    {
+    private void forceReload() {
         long start = System.nanoTime();
         LOGGER.info("FORCING RELOAD!");
-        I18n.getInstance().reload(gameSettings.language.value);
-        sndManager = new SoundEngine();
-        sndManager.init(gameSettings);
-        texturePackList.refresh();
-        renderer.reload();
-        if (renderGlobal != null){
-            renderGlobal.allChanged();
+        I18n.getInstance().reload(this.gameSettings.language.value);
+        this.sndManager = new SoundEngine();
+        this.sndManager.init(this.gameSettings);
+        this.texturePackList.refresh();
+        this.renderer.reload();
+        if (this.renderGlobal != null) {
+            this.renderGlobal.allChanged();
         }
         LOGGER.debug("RELOAD TOOK '{}' SECONDS!", (System.nanoTime() - start) / 1_000_000_000d);
     }
 
-    public boolean isMultiplayerWorld()
-    {
-        return currentWorld != null && currentWorld.isClientSide;
+    public boolean isMultiplayerWorld() {
+        return this.currentWorld != null && this.currentWorld.isClientSide;
     }
 
     public void createAndStartWorld(final @NotNull WorldConfiguration worldConfiguration) {
@@ -2301,11 +2116,11 @@ public class Minecraft
         }
 
         final @NotNull WorldClient world = new WorldClient(
-                levelStorage,
-                worldConfiguration.getFinalWorldName(),
-                worldConfiguration.getFinalNumericSeed(),
-                Dimension.OVERWORLD,
-                null
+            levelStorage,
+            worldConfiguration.getFinalWorldName(),
+            worldConfiguration.getFinalNumericSeed(),
+            Dimension.OVERWORLD,
+            null
         );
         world.getLevelData().setCheatsEnabled(worldConfiguration.getCheatsEnabled());
         world.getLevelData().getGameRules().setValues(worldConfiguration.getGameRuleCollection());
@@ -2323,127 +2138,109 @@ public class Minecraft
         }
     }
 
-    public void startWorld(String worldDirName)
-    {
+    public void startWorld(String worldDirName) {
         changeWorld(null);
         System.gc();
 
         int worldSaveVersion = 0;
 
-        try
-        {
-            LevelData info = new LevelData(new File(mcDataDir, "saves/" + worldDirName));
+        try {
+            LevelData info = new LevelData(new File(this.mcDataDir, "saves/" + worldDirName));
             worldSaveVersion = info.getSaveVersion();
-        }
-        catch (IOException e)
-        {
-            worldSaveVersion = saveFormat.getSaveVersion();
+        } catch (IOException e) {
+            worldSaveVersion = this.saveFormat.getSaveVersion();
         }
 
-        if(worldSaveVersion < CURRENT_SAVE_VERSION)
-        {
+        if (worldSaveVersion < CURRENT_SAVE_VERSION) {
             convertSaveVersion(worldSaveVersion, worldDirName);
-        }
-        else
-        {
+        } else {
             I18n i18n = I18n.getInstance();
-            LevelStorage saveHandler = saveFormat.getSaveHandler(worldDirName, false);
+            LevelStorage saveHandler = this.saveFormat.getSaveHandler(worldDirName, false);
             Dimension dimension = null;
-            CompoundTag tag = saveHandler.getPlayerData(session.username, session.uuid);
+            CompoundTag tag = saveHandler.getPlayerData(this.session.username, this.session.uuid);
             if (tag != null) {
                 dimension = Dimension.getDimensionList().get(tag.getInteger("Dimension"));
             }
 
             WorldClient world = new WorldClient(saveHandler, null, 0L, dimension, null);
-            statsCounter.add(StatList.loadWorldStat, 1);
-            statsCounter.add(StatList.startGameStat, 1);
+            this.statsCounter.add(StatList.loadWorldStat, 1);
+            this.statsCounter.add(StatList.startGameStat, 1);
             changeWorld(world, i18n.translateKey("gui.loading.label.loading"));
         }
     }
 
-    public void usePortal(int dim, @Nullable DyeColor portalColor)
-    {
-        Dimension lastDim = Dimension.getDimensionList().get(thePlayer.dimension);
+    public void usePortal(int dim, @Nullable DyeColor portalColor) {
+        Dimension lastDim = Dimension.getDimensionList().get(this.thePlayer.dimension);
         Dimension newDim = Dimension.getDimensionList().get(dim);
         LOGGER.info("Switching to dimension \"{}\"!!", newDim.getTranslatedName());
-        thePlayer.dimension = dim;
-        currentWorld.setEntityDead(thePlayer);
-        thePlayer.removed = false;
-        double x = thePlayer.x;
-        double z = thePlayer.z;
-        double y = thePlayer.y;
+        this.thePlayer.dimension = dim;
+        this.currentWorld.setEntityDead(this.thePlayer);
+        this.thePlayer.removed = false;
+        double x = this.thePlayer.x;
+        double z = this.thePlayer.z;
+        double y = this.thePlayer.y;
 
         x *= Dimension.getCoordScale(lastDim, newDim);
         z *= Dimension.getCoordScale(lastDim, newDim);
-        thePlayer.moveTo(x, y, z, thePlayer.yRot, thePlayer.xRot);
+        this.thePlayer.moveTo(x, y, z, this.thePlayer.yRot, this.thePlayer.xRot);
         ChunkCoordinates newCoordinates = new ChunkCoordinates(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
         if (this.thePlayer.isAlive() && this.thePlayer.dimensionEnterCoordinate != null) {
-            double dx = thePlayer.dimensionEnterCoordinate.x - x;
-            double dy = thePlayer.dimensionEnterCoordinate.y - y;
-            double dz = thePlayer.dimensionEnterCoordinate.z - z;
+            double dx = this.thePlayer.dimensionEnterCoordinate.x - x;
+            double dy = this.thePlayer.dimensionEnterCoordinate.y - y;
+            double dz = this.thePlayer.dimensionEnterCoordinate.z - z;
             double distSqr = (dx * dx) + (dy * dy) + (dz * dz);
             if (distSqr > 8000 * 8000) {
-                thePlayer.addStat(Achievements.FAST_TRAVEL, 1);
+                this.thePlayer.addStat(Achievements.FAST_TRAVEL, 1);
             }
         }
-        thePlayer.dimensionEnterCoordinate = newCoordinates;
-        if(thePlayer.isAlive())
-        {
-            currentWorld.updateEntityWithOptionalForce(thePlayer, false);
+        this.thePlayer.dimensionEnterCoordinate = newCoordinates;
+        if (this.thePlayer.isAlive()) {
+            this.currentWorld.updateEntityWithOptionalForce(this.thePlayer, false);
         }
-        WorldClient world = new WorldClient(currentWorld, newDim);
+        WorldClient world = new WorldClient(this.currentWorld, newDim);
 
         I18n i18n = I18n.getInstance();
-        if (newDim == lastDim.homeDim)
-        {
-            changeWorld(world, i18n.translateKeyAndFormat("gui.loading.label.leaving", lastDim.getTranslatedName()), thePlayer);
-        }
-        else
-        {
-            changeWorld(world, i18n.translateKeyAndFormat("gui.loading.label.entering", newDim.getTranslatedName()), thePlayer);
+        if (newDim == lastDim.homeDim) {
+            changeWorld(world, i18n.translateKeyAndFormat("gui.loading.label.leaving", lastDim.getTranslatedName()), this.thePlayer);
+        } else {
+            changeWorld(world, i18n.translateKeyAndFormat("gui.loading.label.entering", newDim.getTranslatedName()), this.thePlayer);
         }
 
-        thePlayer.world = currentWorld;
-        if(thePlayer.isAlive())
-        {
-            thePlayer.moveTo(x, y, z, thePlayer.yRot, thePlayer.xRot);
-            currentWorld.updateEntityWithOptionalForce(thePlayer, false);
-            (new PortalHandler()).teleportEntity(currentWorld, thePlayer, portalColor, lastDim, newDim);
+        this.thePlayer.world = this.currentWorld;
+        if (this.thePlayer.isAlive()) {
+            this.thePlayer.moveTo(x, y, z, this.thePlayer.yRot, this.thePlayer.xRot);
+            this.currentWorld.updateEntityWithOptionalForce(this.thePlayer, false);
+            (new PortalHandler()).teleportEntity(this.currentWorld, this.thePlayer, portalColor, lastDim, newDim);
         }
     }
 
-    public void changeWorld(WorldClient world)
-    {
+    public void changeWorld(WorldClient world) {
         changeWorld(world, "");
     }
 
-    public void changeWorld(WorldClient world, String loadingTitle)
-    {
+    public void changeWorld(WorldClient world, String loadingTitle) {
         changeWorld(world, loadingTitle, null);
     }
 
-    public void changeWorld(WorldClient world, String loadingTitle, @Nullable Player player)
-    {
-    	mainMenuBackground.deleteTextures();
-    	gameSettings.showCollisionBoxes.value = false;
+    public void changeWorld(WorldClient world, String loadingTitle, @Nullable Player player) {
+        this.mainMenuBackground.deleteTextures();
+        this.gameSettings.showCollisionBoxes.value = false;
 
-        fullbright = false;
-        statsCounter.fetchStats();
-        statsCounter.saveStats();
+        this.fullbright = false;
+        this.statsCounter.fetchStats();
+        this.statsCounter.saveStats();
 
-        if (world != null)
-        {
-            loadingScreen.updateLoadingBackground(world.dimension);
-            loadingScreen.progressStart(loadingTitle);
-            loadingScreen.progressStage("");
+        if (world != null) {
+            this.loadingScreen.updateLoadingBackground(world.dimension);
+            this.loadingScreen.progressStart(loadingTitle);
+            this.loadingScreen.progressStage("");
         }
 
-        sndManager.stopMusic();
-        if(currentWorld != null)
-        {
-            currentWorld.saveWorldIndirectly(loadingScreen);
-            if (currentWorld.saveHandler != null) {
-                IChunkLoader loader = currentWorld.saveHandler.getChunkLoader(currentWorld.dimension);
+        this.sndManager.stopMusic();
+        if (this.currentWorld != null) {
+            this.currentWorld.saveWorldIndirectly(this.loadingScreen);
+            if (this.currentWorld.saveHandler != null) {
+                IChunkLoader loader = this.currentWorld.saveHandler.getChunkLoader(this.currentWorld.dimension);
                 if (loader != null) {
                     while (loader.isSaving()) {
                         try {
@@ -2453,110 +2250,92 @@ public class Minecraft
                         }
                     }
                 }
-                currentWorld.getChunkProvider().unloadAllChunks();
-                currentWorld.onUnload();
-                currentWorld.close();
+                this.currentWorld.getChunkProvider().unloadAllChunks();
+                this.currentWorld.onUnload();
+                this.currentWorld.close();
                 if (player != null) {
-                    currentWorld.saveHandler.save(player);
+                    this.currentWorld.saveHandler.save(player);
                 }
             }
         }
-        currentWorld = world;
-        if(currentWorld != null) {
+        this.currentWorld = world;
+        if (this.currentWorld != null) {
             Colorizers.update(true);
         }
-        if(world != null)
-        {
-            playerController.initWorld(world);
-            if(!isMultiplayerWorld())
-            {
-                if(player == null)
-                {
-                    thePlayer = null;
+        if (world != null) {
+            this.playerController.initWorld(world);
+            if (!isMultiplayerWorld()) {
+                if (player == null) {
+                    this.thePlayer = null;
                 }
+            } else if (this.thePlayer != null) {
+                this.thePlayer.resetPos();
+                world.entityJoinedWorld(this.thePlayer);
             }
-            else if(thePlayer != null)
-            {
-                thePlayer.resetPos();
-                world.entityJoinedWorld(thePlayer);
-            }
-            if(!world.isClientSide)
-            {
+            if (!world.isClientSide) {
                 prepareLevel(loadingTitle);
             }
-            if(thePlayer == null)
-            {
-                thePlayer = (PlayerLocal)playerController.createPlayer(world);
-                thePlayer.resetPos();
-                playerController.initPlayer(thePlayer);
+            if (this.thePlayer == null) {
+                this.thePlayer = (PlayerLocal) this.playerController.createPlayer(world);
+                this.thePlayer.resetPos();
+                this.playerController.initPlayer(this.thePlayer);
             }
-            thePlayer.input = new PlayerInput(this);
-            if(renderGlobal != null)
-            {
-                renderGlobal.setWorld(world);
+            this.thePlayer.input = new PlayerInput(this);
+            if (this.renderGlobal != null) {
+                this.renderGlobal.setWorld(world);
             }
-            if(particleEngine != null)
-            {
-                particleEngine.setWorld(world);
+            if (this.particleEngine != null) {
+                this.particleEngine.setWorld(world);
             }
-            playerController.adjustPlayer(thePlayer);
+            this.playerController.adjustPlayer(this.thePlayer);
             IChunkProvider ichunkprovider = world.getChunkProvider();
-            int i = MathHelper.floor_float((int)thePlayer.x) >> 4;
-            int j = MathHelper.floor_float((int)thePlayer.z) >> 4;
+            int i = MathHelper.floor_float((int) this.thePlayer.x) >> 4;
+            int j = MathHelper.floor_float((int) this.thePlayer.z) >> 4;
             ichunkprovider.setCurrentChunkOver(i, j);
-            world.spawnPlayerWithLoadedChunks(thePlayer, false);
-            if(world.isNewWorld)
-            {
-                world.saveWorldIndirectly(loadingScreen);
+            world.spawnPlayerWithLoadedChunks(this.thePlayer, false);
+            if (world.isNewWorld) {
+                world.saveWorldIndirectly(this.loadingScreen);
             }
-            activeCamera = new EntityCameraFirstPerson(this, thePlayer);
-            thePlayer.syncPlacementMode();
-        } else
-        {
-            thePlayer = null;
+            this.activeCamera = new EntityCameraFirstPerson(this, this.thePlayer);
+            this.thePlayer.syncPlacementMode();
+        } else {
+            this.thePlayer = null;
         }
         System.gc();
-        systemTime = 0L;
+        this.systemTime = 0L;
         if (world != null) {
-            loadingScreen.progressStop();
+            this.loadingScreen.progressStop();
         }
-        worldRenderer.lightmapHelper.setup();
+        this.worldRenderer.lightmapHelper.setup();
     }
 
-    private void convertSaveVersion(int fromVersion, String worldDirName)
-    {
-        ISaveFormat fromWorldFormat = SaveFormats.createSaveFormat(fromVersion, new File(mcDataDir, "saves"));
+    private void convertSaveVersion(int fromVersion, String worldDirName) {
+        ISaveFormat fromWorldFormat = SaveFormats.createSaveFormat(fromVersion, new File(this.mcDataDir, "saves"));
 
-        if (fromWorldFormat != null)
-        {
+        if (fromWorldFormat != null) {
             // Get highest converter
             ISaveConverter converterToUse = null;
-            for (ISaveConverter converter : SaveConverters.saveConverters)
-            {
-                if (converter.fromVersion() == fromVersion)
-                {
-                    if (converterToUse == null || converter.toVersion() > converterToUse.toVersion())
-                    {
+            for (ISaveConverter converter : SaveConverters.saveConverters) {
+                if (converter.fromVersion() == fromVersion) {
+                    if (converterToUse == null || converter.toVersion() > converterToUse.toVersion()) {
                         converterToUse = converter;
                     }
                 }
             }
 
-            if (converterToUse != null)
-            {
-                ISaveFormat toWorldFormat = SaveFormats.createSaveFormat(converterToUse.toVersion(), new File(mcDataDir, "saves"));
+            if (converterToUse != null) {
+                ISaveFormat toWorldFormat = SaveFormats.createSaveFormat(converterToUse.toVersion(), new File(this.mcDataDir, "saves"));
 
-                if (toWorldFormat != null)
-                {
-                    loadingScreen.updateLoadingBackground(null);
-                    loadingScreen.progressStartNoAbort("Converting world from " + fromWorldFormat.getFormatName() + " to " + toWorldFormat.getFormatName() + ".");
-                    loadingScreen.progressStage("This may take a while :)");
+                if (toWorldFormat != null) {
+                    this.loadingScreen.updateLoadingBackground(null);
+                    this.loadingScreen.progressStartNoAbort("Converting world from " + fromWorldFormat.getFormatName() + " to " + toWorldFormat.getFormatName() + ".");
+                    this.loadingScreen.progressStage("This may take a while :)");
 
                     CompoundTag levelDataTag = toWorldFormat.getLevelDataRaw(worldDirName);
 
-                    converterToUse.convertSave(levelDataTag, new File(mcDataDir, "saves"), worldDirName, loadingScreen);
+                    converterToUse.convertSave(levelDataTag, new File(this.mcDataDir, "saves"), worldDirName, this.loadingScreen);
 
-                    loadingScreen.progressStop();
+                    this.loadingScreen.progressStop();
 
                     levelDataTag.putInt("version", toWorldFormat.getSaveVersion());
 
@@ -2569,38 +2348,34 @@ public class Minecraft
         }
     }
 
-    private void prepareLevel(String loadingTitle)
-    {
-        loadingScreen.updateLoadingBackground(currentWorld.dimension);
-        loadingScreen.progressStartNoAbort(loadingTitle);
-        loadingScreen.progressStage("Building terrain");
+    private void prepareLevel(String loadingTitle) {
+        this.loadingScreen.updateLoadingBackground(this.currentWorld.dimension);
+        this.loadingScreen.progressStartNoAbort(loadingTitle);
+        this.loadingScreen.progressStage("Building terrain");
         char c = 128;
         int i = 0;
         int j = (c * 2) / 16 + 1;
         j *= j;
-        IChunkProvider ichunkprovider = currentWorld.getChunkProvider();
-        TilePos spawnPoint = currentWorld.getSpawnPoint();
-        if(thePlayer != null)
-        {
-            spawnPoint.x = (int)thePlayer.x;
-            spawnPoint.z = (int)thePlayer.z;
+        IChunkProvider ichunkprovider = this.currentWorld.getChunkProvider();
+        TilePos spawnPoint = this.currentWorld.getSpawnPoint();
+        if (this.thePlayer != null) {
+            spawnPoint.x = (int) this.thePlayer.x;
+            spawnPoint.z = (int) this.thePlayer.z;
         }
         ichunkprovider.setCurrentChunkOver(Math.floorDiv(spawnPoint.x, Chunk.CHUNK_SIZE_X), Math.floorDiv(spawnPoint.z, Chunk.CHUNK_SIZE_Z));
-        for(int k = -c; k <= c; k += Chunk.CHUNK_SIZE_X)
-        {
-            for(int l = -c; l <= c; l += Chunk.CHUNK_SIZE_Z)
-            {
-                loadingScreen.progressStagePercentage((i++ * 100) / j);
-                currentWorld.getBlockId(spawnPoint.x + k, 64, spawnPoint.z + l);
+        for (int k = -c; k <= c; k += Chunk.CHUNK_SIZE_X) {
+            for (int l = -c; l <= c; l += Chunk.CHUNK_SIZE_Z) {
+                this.loadingScreen.progressStagePercentage((i++ * 100) / j);
+                this.currentWorld.getBlockId(spawnPoint.x + k, 64, spawnPoint.z + l);
             }
         }
-        loadingScreen.progressStage("Updating Lights");
+        this.loadingScreen.progressStage("Updating Lights");
         int count = this.currentWorld.getLightingEngine().pendingUpdates();
 
         int v = 0;
-        while (currentWorld.updatingLighting()) {
+        while (this.currentWorld.updatingLighting()) {
             v++;
-            loadingScreen.progressStagePercentage((Math.min(v, count) * 100) / count);
+            this.loadingScreen.progressStagePercentage((Math.min(v, count) * 100) / count);
 
             if (v >= 10000) {
                 LOGGER.error("Updating lights took to long panic skipping!");
@@ -2609,36 +2384,30 @@ public class Minecraft
             }
         }
 
-        loadingScreen.progressStage("Simulating world for a bit...");
-        loadingScreen.progressStop();
-        currentWorld.dropOldChunks();
+        this.loadingScreen.progressStage("Simulating world for a bit...");
+        this.loadingScreen.progressStop();
+        this.currentWorld.dropOldChunks();
     }
 
-    public String getRendererDebugInfo()
-    {
-        return renderGlobal.getRendererDebugInfo();
+    public String getRendererDebugInfo() {
+        return this.renderGlobal.getRendererDebugInfo();
     }
 
-    public String getEntityDebugInfoString()
-    {
-        return renderGlobal.getEntityDebugInfo();
+    public String getEntityDebugInfoString() {
+        return this.renderGlobal.getEntityDebugInfo();
     }
 
-    public String getChunkProviderInfoString()
-    {
-        return currentWorld.getChunkProviderInfoString();
+    public String getChunkProviderInfoString() {
+        return this.currentWorld.getChunkProviderInfoString();
     }
-    
-    public String getEntityCountsInfoString()
-    {
-        return "P: " + particleEngine.countParticles() + ". T: " + currentWorld.getNumLoadedEntitiesString();
+
+    public String getEntityCountsInfoString() {
+        return "P: " + this.particleEngine.countParticles() + ". T: " + this.currentWorld.getNumLoadedEntitiesString();
     }
 
-    public void respawn(boolean multiplayer, int targetDimension)
-    {
-    	@Nullable Player previousPlayer = thePlayer;
-        if(!currentWorld.isClientSide && !currentWorld.dimension.defaultWorldType.mayRespawn())
-        {
+    public void respawn(boolean multiplayer, int targetDimension) {
+        @Nullable Player previousPlayer = this.thePlayer;
+        if (!this.currentWorld.isClientSide && !this.currentWorld.dimension.defaultWorldType.mayRespawn()) {
             usePortal(targetDimension, null);
         }
 
@@ -2646,96 +2415,85 @@ public class Minecraft
         TilePos bedSpawnCoordinates = null;
         TilePos lastDeathCoordinates = null;
         boolean canRespawnAtBed = true;
-        if(thePlayer != null && !multiplayer)
-        {
-            spawnCoordinates = thePlayer.getPlayerSpawnPoint();
-            lastDeathCoordinates = thePlayer.getLastDeathPoint();
-            if(spawnCoordinates != null)
-            {
-                bedSpawnCoordinates = Player.getValidBedSpawnCoordinates(currentWorld, spawnCoordinates);
-                if(bedSpawnCoordinates == null)
-                {
-                    thePlayer.sendTranslatedChatMessage("bed.notValid");
+        if (this.thePlayer != null && !multiplayer) {
+            spawnCoordinates = this.thePlayer.getPlayerSpawnPoint();
+            lastDeathCoordinates = this.thePlayer.getLastDeathPoint();
+            if (spawnCoordinates != null) {
+                bedSpawnCoordinates = Player.getValidBedSpawnCoordinates(this.currentWorld, spawnCoordinates);
+                if (bedSpawnCoordinates == null) {
+                    this.thePlayer.sendTranslatedChatMessage("bed.notValid");
                 }
             }
         }
-        if(bedSpawnCoordinates == null)
-        {
-            bedSpawnCoordinates = currentWorld.getSpawnPoint();
+        if (bedSpawnCoordinates == null) {
+            bedSpawnCoordinates = this.currentWorld.getSpawnPoint();
             canRespawnAtBed = false;
         }
-        IChunkProvider ichunkprovider = currentWorld.getChunkProvider();
+        IChunkProvider ichunkprovider = this.currentWorld.getChunkProvider();
         ichunkprovider.setCurrentChunkOver(bedSpawnCoordinates.x >> 4, bedSpawnCoordinates.z >> 4);
-        currentWorld.getRespawnLocation();
-        currentWorld.updateEntityList();
+        this.currentWorld.getRespawnLocation();
+        this.currentWorld.updateEntityList();
         int j = 0;
         Gamemode playerGamemode = Gamemode.survival;
-        if(thePlayer != null)
-        {
-            j = thePlayer.id;
-            currentWorld.setEntityDead(thePlayer);
-            playerGamemode = thePlayer.getGamemode();
-        }
-        thePlayer = (PlayerLocal)playerController.createPlayer(currentWorld);
-        thePlayer.dimension = targetDimension;
-        thePlayer.setGamemode(playerGamemode);
+        if (this.thePlayer != null) {
+            j = this.thePlayer.id;
+            this.currentWorld.setEntityDead(this.thePlayer);
+            playerGamemode = this.thePlayer.getGamemode();
+        }
+        this.thePlayer = (PlayerLocal) this.playerController.createPlayer(this.currentWorld);
+        this.thePlayer.dimension = targetDimension;
+        this.thePlayer.setGamemode(playerGamemode);
         if (previousPlayer != null && previousPlayer.getHeldObject() != null) {
-            thePlayer.setHeldObject(previousPlayer.getHeldObject());
-            thePlayer.inventory.setCurrentItemIndex(previousPlayer.inventory.getCurrentItemIndex(), true);
-            thePlayer.inventory.setHotbarOffset(previousPlayer.inventory.getHotbarOffset(), true);
-        }
-        activeCamera = new EntityCameraFirstPerson(this, thePlayer);
-        thePlayer.resetPos();
-        
-        if(previousPlayer != null) {
-            thePlayer.messageHistory = previousPlayer.messageHistory;
-        	if(!currentWorld.isClientSide) {
-        		thePlayer.inventory.transferAllContents(previousPlayer.inventory);
-        	}
-        }
-        
-        if(canRespawnAtBed)
-        {
-            thePlayer.setPlayerSpawnPoint(spawnCoordinates);
-            thePlayer.moveTo((float)bedSpawnCoordinates.x + 0.5F, (float)bedSpawnCoordinates.y + 0.1F, (float)bedSpawnCoordinates.z + 0.5F, 0.0F, 0.0F);
-        }
-        thePlayer.setLastDeathPoint(lastDeathCoordinates);
-        playerController.initPlayer(thePlayer);
-        currentWorld.spawnPlayerWithLoadedChunks(thePlayer, true);
-        thePlayer.input = new PlayerInput(this);
-        thePlayer.id = j;
-        thePlayer.animate4();
-        playerController.adjustPlayer(thePlayer);
+            this.thePlayer.setHeldObject(previousPlayer.getHeldObject());
+            this.thePlayer.inventory.setCurrentItemIndex(previousPlayer.inventory.getCurrentItemIndex(), true);
+            this.thePlayer.inventory.setHotbarOffset(previousPlayer.inventory.getHotbarOffset(), true);
+        }
+        this.activeCamera = new EntityCameraFirstPerson(this, this.thePlayer);
+        this.thePlayer.resetPos();
+
+        if (previousPlayer != null) {
+            this.thePlayer.messageHistory = previousPlayer.messageHistory;
+            if (!this.currentWorld.isClientSide) {
+                this.thePlayer.inventory.transferAllContents(previousPlayer.inventory);
+            }
+        }
+
+        if (canRespawnAtBed) {
+            this.thePlayer.setPlayerSpawnPoint(spawnCoordinates);
+            this.thePlayer.moveTo((float) bedSpawnCoordinates.x + 0.5F, (float) bedSpawnCoordinates.y + 0.1F, (float) bedSpawnCoordinates.z + 0.5F, 0.0F, 0.0F);
+        }
+        this.thePlayer.setLastDeathPoint(lastDeathCoordinates);
+        this.playerController.initPlayer(this.thePlayer);
+        this.currentWorld.spawnPlayerWithLoadedChunks(this.thePlayer, true);
+        this.thePlayer.input = new PlayerInput(this);
+        this.thePlayer.id = j;
+        this.thePlayer.animate4();
+        this.playerController.adjustPlayer(this.thePlayer);
         prepareLevel("Respawning");
-        if(currentScreen instanceof ScreenGameOver)
-        {
+        if (this.currentScreen instanceof ScreenGameOver) {
             displayScreen(null);
         }
     }
 
-    public PacketHandlerClient getSendQueue()
-    {
-        if(thePlayer instanceof PlayerLocalMultiplayer)
-        {
-            return ((PlayerLocalMultiplayer)thePlayer).sendQueue;
-        } else
-        {
+    public PacketHandlerClient getSendQueue() {
+        if (this.thePlayer instanceof PlayerLocalMultiplayer) {
+            return ((PlayerLocalMultiplayer) this.thePlayer).sendQueue;
+        } else {
             return null;
         }
     }
-    
+
     public void setRenderer(Renderer renderer) {
-        if(this.renderer != null) {
+        if (this.renderer != null) {
             this.renderer.delete();
         }
         this.renderer = renderer;
         this.renderer.reload();
     }
 
-    public static void startMainThread(@Nullable String username, @Nullable String sessionId, @Nullable String uuid, @Nullable String server, @Nullable Integer port, @Nullable Integer width, @Nullable Integer height, @Nullable File mcDataDir)
-    {
+    public static void startMainThread(@Nullable String username, @Nullable String sessionId, @Nullable String uuid, @Nullable String server, @Nullable Integer port, @Nullable Integer width, @Nullable Integer height, @Nullable File mcDataDir) {
         GameWindow gameWindow = new GameWindowGLFW();
-        Minecraft mc = new Minecraft(mcDataDir == null ? getAppDir("minecraft-bta"): mcDataDir, gameWindow,false);
+        Minecraft mc = new Minecraft(mcDataDir == null ? getAppDir("minecraft-bta") : mcDataDir, gameWindow, false);
         mc.minecraftUri = "www.minecraft.net";
 
         username = username == null ? "Player" + System.currentTimeMillis() % 1000L : username;
@@ -2764,8 +2522,7 @@ public class Minecraft
         mc.run();
     }
 
-    public static void main(String[] args)
-    {
+    public static void main(String[] args) {
         STARTUP_TIKE_KEEPER.start("Startup");
         ImageIO.setUseCache(false); // Speeds up boot time
         checkLwjglVersion();
@@ -2890,21 +2647,21 @@ public class Minecraft
 
         startMainThread(playerName, sessionId, uuid, server, port, width, height, gameDirectory);
     }
-    
+
     public void setInputType(InputType inputType) {
-        if(inputType != this.inputType) {
+        if (inputType != this.inputType) {
             LOGGER.info("Set input type to {}", inputType.name());
         }
         this.inputType = inputType;
-        if(inputType == InputType.CONTROLLER) {
-            mouseInput.grabCursor();
+        if (inputType == InputType.CONTROLLER) {
+            this.mouseInput.grabCursor();
         }
-        if(inputType == InputType.KEYBOARD) {
-            if(inGameHasFocus && !Mouse.isGrabbed()) {
-                mouseInput.grabCursor();
+        if (inputType == InputType.KEYBOARD) {
+            if (this.inGameHasFocus && !Mouse.isGrabbed()) {
+                this.mouseInput.grabCursor();
             }
-            if(!inGameHasFocus && Mouse.isGrabbed()) {
-                mouseInput.releaseCursor();
+            if (!this.inGameHasFocus && Mouse.isGrabbed()) {
+                this.mouseInput.releaseCursor();
             }
         }
     }
@@ -2912,7 +2669,7 @@ public class Minecraft
 
     @Override
     public SkinVariantList getSkinVariantList() {
-        return skinVariantList;
+        return this.skinVariantList;
     }
 
     @Override
@@ -2920,40 +2677,34 @@ public class Minecraft
         return SoundRepository.allKeys;
     }
 
-    public boolean isAmbientOcclusionEnabled()
-    {
-        return gameSettings.ambientOcclusion.value;
+    public boolean isAmbientOcclusionEnabled() {
+        return this.gameSettings.ambientOcclusion.value;
     }
 
-    public boolean isTreeShadingEnabled()
-    {
-        return gameSettings.treeShadows.value;
+    public boolean isTreeShadingEnabled() {
+        return this.gameSettings.treeShadows.value;
     }
 
-    public boolean isDebugInfoEnabled()
-    {
-        return gameSettings.showDebugScreen.value;
+    public boolean isDebugInfoEnabled() {
+        return this.gameSettings.showDebugScreen.value;
     }
-    
+
     @Override
-    public boolean isFullbrightEnabled()
-    {
-    	return fullbright;
+    public boolean isFullbrightEnabled() {
+        return this.fullbright;
     }
 
-    public boolean canRenderEntityLabel()
-    {
-        return isDebugInfoEnabled() && thePlayer != null && thePlayer.getGamemode() == Gamemode.creative;
+    public boolean canRenderEntityLabel() {
+        return isDebugInfoEnabled() && this.thePlayer != null && this.thePlayer.getGamemode() == Gamemode.creative;
     }
-    
+
     public float getOutlineWidth() {
         return INSTANCE.gameSettings.blockOutlineWidth.value;
     }
 
-    public int getAutosaveTimer()
-    {
+    public int getAutosaveTimer() {
 
-        return INSTANCE != null? (int) (INSTANCE.gameSettings.autosaveTimer.value * 24) * 5 : 0;
+        return (int) (INSTANCE.gameSettings.autosaveTimer.value * 24) * 5;
     }
 
     @Override
@@ -3000,7 +2751,7 @@ public class Minecraft
                 }
                 final long start = this.startTimes.getLong(s);
                 final long end = this.endTimes.getLong(s);
-                builder.append("\n\t").append(s).append(": ").append((end - start)/1000d).append("s");
+                builder.append("\n\t").append(s).append(": ").append((end - start) / 1000d).append("s");
             }
             return builder.toString();
         }
diff --git a/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocal.java b/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocal.java
index 892543eba..1cdc6fd7b 100644
--- a/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocal.java
+++ b/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocal.java
@@ -39,12 +39,12 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.GetSkinUrlThread;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.slf4j.Logger;
 
 import java.util.function.Function;
@@ -59,37 +59,37 @@ public class PlayerLocal extends Player
     public PlayerLocal(Minecraft minecraft, World world, Session session, int dimension)
     {
         super(world);
-        mc = minecraft;
+        this.mc = minecraft;
         this.dimension = dimension;
-        username = session.username;
-        uuid = session.uuid;
-
-        playerConfig.setLeftHand(minecraft.gameSettings.playerLeftHanded.value);
-        playerConfig.setCape(minecraft.gameSettings.playerCape.value);
-        playerConfig.setHat(minecraft.gameSettings.playerHat.value);
-        playerConfig.setJacket(minecraft.gameSettings.playerJacket.value);
-        playerConfig.setSleeveLeft(minecraft.gameSettings.playerSleeveLeft.value);
-        playerConfig.setSleeveRight(minecraft.gameSettings.playerSleeveRight.value);
-        playerConfig.setPantLeft(minecraft.gameSettings.playerPantLeft.value);
-        playerConfig.setPantRight(minecraft.gameSettings.playerPantRight.value);
+        this.username = session.username;
+        this.uuid = session.uuid;
+
+        this.playerConfig.setLeftHand(minecraft.gameSettings.playerLeftHanded.value);
+        this.playerConfig.setCape(minecraft.gameSettings.playerCape.value);
+        this.playerConfig.setHat(minecraft.gameSettings.playerHat.value);
+        this.playerConfig.setJacket(minecraft.gameSettings.playerJacket.value);
+        this.playerConfig.setSleeveLeft(minecraft.gameSettings.playerSleeveLeft.value);
+        this.playerConfig.setSleeveRight(minecraft.gameSettings.playerSleeveRight.value);
+        this.playerConfig.setPantLeft(minecraft.gameSettings.playerPantLeft.value);
+        this.playerConfig.setPantRight(minecraft.gameSettings.playerPantRight.value);
 
         new GetSkinUrlThread(this);
-        LOGGER.info("logged in with session name: {}", username);
+        LOGGER.info("logged in with session name: {}", this.username);
     }
 
     public float getFovModifier() {
         float f = 1.0f;
-        f *= ((speed * 1.0f) / baseSpeed + 1.0f) / 2.0f; // sprinting
-        f *= heldObject == null ? 1f : 0.8f; // Slightly decrease fov while holding carried object
+        f *= ((this.speed) / this.baseSpeed + 1.0f) / 2.0f; // sprinting
+        f *= this.heldObject == null ? 1f : 0.8f; // Slightly decrease fov while holding carried object
         return f;
     }
 
-    public AABB getBb()
+    public @Nullable AABBdc getCollisionAABB()
     {
-        if (noPhysics) {
+        if (this.noPhysics) {
             return null;
         } else {
-            return super.getBb();
+            return super.getCollisionAABB();
         }
     }
     
@@ -97,9 +97,9 @@ public class PlayerLocal extends Player
     public void updateAI()
     {
         super.updateAI();
-        moveStrafing = input.moveStrafe;
-        moveForward = input.moveForward;
-        isJumping = input.jump;
+        this.moveStrafing = this.input.moveStrafe;
+        this.moveForward = this.input.moveForward;
+        this.isJumping = this.input.jump;
     }
 
     @Override
@@ -107,26 +107,26 @@ public class PlayerLocal extends Player
     {
         this.gamemode = gamemode;
 
-        MenuInventory newContainer = gamemode.getContainer(this.inventory, !world.isClientSide);
-        if (craftingInventory == inventorySlots)
+        MenuInventory newContainer = gamemode.getContainer(this.inventory, !this.world.isClientSide);
+        if (this.craftingInventory == this.inventorySlots)
         {
-            craftingInventory = newContainer;
+            this.craftingInventory = newContainer;
         }
-        inventorySlots = newContainer;
+        this.inventorySlots = newContainer;
         if (!gamemode.canPlayerFly())
         {
-            noPhysics = false;
+            this.noPhysics = false;
         }
 
-        fireImmune = gamemode.isImmuneToFire();
+        this.fireImmune = gamemode.isImmuneToFire();
     }
 
     @Override
     public void onLivingUpdate()
     {
-        if (sprintTimer > 0)
+        if (this.sprintTimer > 0)
         {
-            sprintTimer--;
+            this.sprintTimer--;
         }
 
         AchievementToast invToast = new AchievementToast(Achievements.OPEN_INVENTORY, true);
@@ -145,136 +145,136 @@ public class PlayerLocal extends Player
             this.mc.guiToasts.addToast(guideToast);
         }
 
-        prevTimeInPortal = timeInPortal;
-        if(inPortal && !noPhysics)
+        this.prevTimeInPortal = this.timeInPortal;
+        if(this.inPortal && !this.noPhysics)
         {
-            if(!world.isClientSide && vehicle != null)
+            if(!this.world.isClientSide && this.vehicle != null)
             {
                 startRiding(null);
             }
-            if(mc.currentScreen instanceof ScreenContainerAbstract) // Close out of containers like the inventory
+            if(this.mc.currentScreen instanceof ScreenContainerAbstract) // Close out of containers like the inventory
             {
-                mc.displayScreen(null);
+                this.mc.displayScreen(null);
             }
-            if(timeInPortal == 0.0F)
+            if(this.timeInPortal == 0.0F)
             {
-                mc.sndManager.playSound("portal.trigger", SoundCategory.WORLD_SOUNDS, 1.0F, random.nextFloat() * 0.4F + 0.8F);
+                this.mc.sndManager.playSound("portal.trigger", SoundCategory.WORLD_SOUNDS, 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
             }
-            timeInPortal += 0.0125F;
-            if(timeInPortal >= 1.0F || getGamemode().instantPortalTravel())
+            this.timeInPortal += 0.0125F;
+            if(this.timeInPortal >= 1.0F || getGamemode().instantPortalTravel())
             {
-                timeInPortal = 1.0F;
-                if(!world.isClientSide)
+                this.timeInPortal = 1.0F;
+                if(!this.world.isClientSide)
                 {
-                    timeUntilPortal = 10;
-                    mc.sndManager.playSound("portal.travel", SoundCategory.WORLD_SOUNDS, 1.0F, random.nextFloat() * 0.4F + 0.8F);
-                    Dimension targetDim = ((BlockLogicPortal) Blocks.blocksList[portalID].getLogic()).targetDimension;
-                    if (dimension == targetDim.id)
+                    this.timeUntilPortal = 10;
+                    this.mc.sndManager.playSound("portal.travel", SoundCategory.WORLD_SOUNDS, 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
+                    Dimension targetDim = ((BlockLogicPortal) Blocks.blocksList[this.portalID].getLogic()).targetDimension;
+                    if (this.dimension == targetDim.id)
                     {
-                        mc.usePortal(0, portalColor);
+                        this.mc.usePortal(0, this.portalColor);
                     }
                     else
                     {
-                        mc.usePortal(targetDim.id, portalColor);
+                        this.mc.usePortal(targetDim.id, this.portalColor);
                     }
                 }
             }
-            inPortal = false;
+            this.inPortal = false;
         } else
         {
-            if(timeInPortal > 0.0F)
+            if(this.timeInPortal > 0.0F)
             {
-                timeInPortal -= 0.05F;
+                this.timeInPortal -= 0.05F;
             }
-            if(timeInPortal < 0.0F)
+            if(this.timeInPortal < 0.0F)
             {
-                timeInPortal = 0.0F;
+                this.timeInPortal = 0.0F;
             }
         }
-        if(timeUntilPortal > 0)
+        if(this.timeUntilPortal > 0)
         {
-            timeUntilPortal--;
+            this.timeUntilPortal--;
         }
         float f = 0.8f;
-        boolean forwardInput = input.moveForward >= f;
-        input.tick(this);
+        boolean forwardInput = this.input.moveForward >= f;
+        this.input.tick(this);
 //        if(input.sneak && ySlideOffset < 0.45F)
 //        {
 //            ySlideOffset = 0.45F;
 //        }
-        checkInTile(x - (double) bbWidth * 0.35D, bb.minY + 0.5D, z + (double) bbWidth * 0.35D);
-        checkInTile(x - (double) bbWidth * 0.35D, bb.minY + 0.5D, z - (double) bbWidth * 0.35D);
-        checkInTile(x + (double) bbWidth * 0.35D, bb.minY + 0.5D, z - (double) bbWidth * 0.35D);
-        checkInTile(x + (double) bbWidth * 0.35D, bb.minY + 0.5D, z + (double) bbWidth * 0.35D);
-        boolean canSprint = world.getGameRuleValue(GameRules.ALLOW_SPRINTING) && !this.noPhysics;
-        if (onGround && !forwardInput && input.moveForward >= f && !isSprinting() && canSprint)
+        checkInTile(this.x - (double) this.bbWidth * 0.35D, this.bb.minY + 0.5D, this.z + (double) this.bbWidth * 0.35D);
+        checkInTile(this.x - (double) this.bbWidth * 0.35D, this.bb.minY + 0.5D, this.z - (double) this.bbWidth * 0.35D);
+        checkInTile(this.x + (double) this.bbWidth * 0.35D, this.bb.minY + 0.5D, this.z - (double) this.bbWidth * 0.35D);
+        checkInTile(this.x + (double) this.bbWidth * 0.35D, this.bb.minY + 0.5D, this.z + (double) this.bbWidth * 0.35D);
+        boolean canSprint = this.world.getGameRuleValue(GameRules.ALLOW_SPRINTING) && !this.noPhysics;
+        if (this.onGround && !forwardInput && this.input.moveForward >= f && !isSprinting() && canSprint)
         {
-            if (sprintTimer == 0)
+            if (this.sprintTimer == 0)
             {
-                sprintTimer = 7;
+                this.sprintTimer = 7;
             }
             else
             {
                 setSprinting(true);
-                sprintTimer = 0;
+                this.sprintTimer = 0;
             }
         }
-        if (onGround && canSprint && mc.gameSettings.keySprint.isPressed())
+        if (this.onGround && canSprint && this.mc.gameSettings.keySprint.isPressed())
         {
             setSprinting(true);
         }
-        if (isSprinting() && (input.moveForward < f || horizontalCollision || !canSprint))
+        if (isSprinting() && (this.input.moveForward < f || this.horizontalCollision || !canSprint))
         {
             setSprinting(false);
         }
         super.onLivingUpdate();
 
-        WorldTypeFXDispatcher.getInstance().getDispatch(world.getWorldType()).playerAnimationTick(world, this);
+        WorldTypeFXDispatcher.getInstance().getDispatch(this.world.getWorldType()).playerAnimationTick(this.world, this);
     }
     
     @Override
     public void wakeUpPlayer(boolean flag, boolean flag1) {
         super.wakeUpPlayer(flag, flag1);
-        mc.displayScreen(null);
+        this.mc.displayScreen(null);
     }
     
     @Override
     public void addAdditionalSaveData(@NotNull CompoundTag tag)
     {
         super.addAdditionalSaveData(tag);
-        tag.putInt("Score", score);
+        tag.putInt("Score", this.score);
     }
 
     @Override
     public void readAdditionalSaveData(@NotNull CompoundTag tag)
     {
         super.readAdditionalSaveData(tag);
-        score = tag.getInteger("Score");
+        this.score = tag.getInteger("Score");
     }
 
     @Override
     public void closeScreen()
     {
         super.closeScreen();
-        mc.displayScreen(null);
+        this.mc.displayScreen(null);
     }
 
     @Override
     public void displaySignEditorScreen(TileEntitySign tileEntity)
     {
-        mc.displayScreen(new ScreenSignEditor(tileEntity));
+        this.mc.displayScreen(new ScreenSignEditor(tileEntity));
     }
 
     @Override
     public void displayFlagEditorScreen(TileEntityFlag tileEntity)
     {
-        mc.displayScreen(new ScreenFlagEditor(this, tileEntity));
+        this.mc.displayScreen(new ScreenFlagEditor(this, tileEntity));
     }
 
     @Override
     public void displayContainerScreen(Container container)
     {
-        mc.displayScreen(new ScreenContainer(inventory, container));
+        this.mc.displayScreen(new ScreenContainer(this.inventory, container));
     }
 
     public void displayChestScreen(Container container, double x, double y, double z)
@@ -284,96 +284,96 @@ public class PlayerLocal extends Player
 
     @Override
     public void displayNBTEditor(@Nullable CompoundTag tag, @Nullable Function<@NotNull CompoundTag, Void> exitAction) {
-        mc.displayScreen(new ScreenNBTEditor("NBT Viewer", tag, exitAction));
+        this.mc.displayScreen(new ScreenNBTEditor("NBT Viewer", tag, exitAction));
     }
 
     @Override
-    public void displayWorkbenchScreen(@NotNull TilePos tilePos)
+    public void displayWorkbenchScreen(@NotNull TilePosc tilePos)
     {
-        mc.displayScreen(new ScreenCrafting(inventory, world, tilePos));
+        this.mc.displayScreen(new ScreenCrafting(this.inventory, this.world, tilePos));
     }
 
     @Override
     public void displayLabelEditorScreen(ItemStack itemStack, int slot)
     {
-        mc.displayScreen(new ScreenLabelEditor(itemStack, slot));
+        this.mc.displayScreen(new ScreenLabelEditor(itemStack, slot));
     }
 
     @Override
     public void displayPaintingPickerScreen()
     {
-        mc.displayScreen(new ScreenPaintingPicker(this));
+        this.mc.displayScreen(new ScreenPaintingPicker(this));
     }
 
     @Override
-    public void displayMobPickerScreen(@NotNull TilePos tilePos) {
-        String currentMobId = ((TileEntityMobSpawner) world.getTileEntity(tilePos)).getMobId();
-        mc.displayScreen(new ScreenMobPicker(currentMobId, tilePos));
+    public void displayMobPickerScreen(@NotNull TilePosc tilePos) {
+        String currentMobId = ((TileEntityMobSpawner) this.world.getTileEntity(tilePos)).getMobId();
+        this.mc.displayScreen(new ScreenMobPicker(currentMobId, tilePos));
     }
     @Override
     public void displayWandMobPickerScreen(ItemStack itemStack) {
         String currentMobId = itemStack.getData().getStringOrDefault("monster", "Pig");
-        mc.displayScreen(new ScreenWandMobPicker(currentMobId, itemStack));
+        this.mc.displayScreen(new ScreenWandMobPicker(currentMobId, itemStack));
     }
 
     @Override
     public void displayFurnaceScreen(TileEntityFurnace tileEntity)
     {
-        mc.displayScreen(new ScreenFurnace(inventory, tileEntity));
+        this.mc.displayScreen(new ScreenFurnace(this.inventory, tileEntity));
     }
 
     @Override
     public void displayBlastFurnaceScreen(final TileEntityFurnaceBlast tileEntity) {
-        mc.displayScreen(new ScreenFurnaceBlast(inventory, tileEntity));
+        this.mc.displayScreen(new ScreenFurnaceBlast(this.inventory, tileEntity));
     }
 
     @Override
     public void displayTrommelScreen(TileEntityTrommel tileEntity)
     {
-        mc.displayScreen(new ScreenTrommel(inventory, tileEntity));
+        this.mc.displayScreen(new ScreenTrommel(this.inventory, tileEntity));
     }
 
     @Override
     public void displayDispenserScreen(TileEntityDispenser tileEntity)
     {
-        mc.displayScreen(new ScreenDispenser(inventory, tileEntity));
+        this.mc.displayScreen(new ScreenDispenser(this.inventory, tileEntity));
     }
 
     @Override
     public void displayActivatorScreen(TileEntityActivator tileEntity)
     {
-        mc.displayScreen(new ScreenActivator(inventory, tileEntity));
+        this.mc.displayScreen(new ScreenActivator(this.inventory, tileEntity));
     }
 
     @Override
     public void displayGuidebookScreen() {
-        mc.displayScreen(new ScreenGuidebook(mc.currentScreen));
+        this.mc.displayScreen(new ScreenGuidebook(this.mc.currentScreen));
     }
 
     @Override
     public void onItemPickup(Entity entity, ItemStack item)
     {
         addStat(item.getItem().getStat(StatList.STAT_PICKED_UP), 1);
-        mc.particleEngine.add(new ParticlePickupAnimation(mc.currentWorld, entity, this, -0.5F));
+        this.mc.particleEngine.add(new ParticlePickupAnimation(this.mc.currentWorld, entity, this, -0.5F));
     }
 
     public int getPlayerProtectionAmount()
     {
-        return inventory.getTotalArmourPoints();
+        return this.inventory.getTotalArmourPoints();
     }
 
     public void sendChatMessage(String s) {
     	addToSendHistory(s);
         if (s.startsWith("/")) {
             String command = s.substring(1);
-            ClientCommandSource clientCommandSource = new ClientCommandSource(mc);
+            ClientCommandSource clientCommandSource = new ClientCommandSource(this.mc);
             try {
                 this.world.getCommandManager().execute(command, clientCommandSource);
             } catch (CommandSyntaxException e) {
-                mc.thePlayer.sendMessage(TextFormatting.RED + e.getMessage());
+                this.mc.thePlayer.sendMessage(TextFormatting.RED + e.getMessage());
             }
         } else {
-            mc.hudIngame.addChatMessage("<" + getDisplayName() + TextFormatting.RESET + "> " + TextFormatting.WHITE + s);
+            this.mc.hudIngame.addChatMessage("<" + getDisplayName() + TextFormatting.RESET + "> " + TextFormatting.WHITE + s);
         }
     }
     
@@ -381,21 +381,21 @@ public class PlayerLocal extends Player
     	if(msg == null || msg.isEmpty()) {
     		return;
     	}
-    	for(int i=0; i < messageHistory.size(); i++) {
-    		if(messageHistory.get(i).equals(msg)) {
-    			messageHistory.remove(i--);
+    	for(int i = 0; i < this.messageHistory.size(); i++) {
+    		if(this.messageHistory.get(i).equals(msg)) {
+                this.messageHistory.remove(i--);
     		}
     	}
-        messageHistory.add(msg);
-        if(messageHistory.size() > 100) {
-        	messageHistory.remove(0);
+        this.messageHistory.add(msg);
+        if(this.messageHistory.size() > 100) {
+            this.messageHistory.remove(0);
         }
     }
     
     @Override
     public boolean wantSneak()
     {
-        return (input != null && input.sneak) && !sleeping;
+        return (this.input != null && this.input.sneak) && !this.sleeping;
     }
 
     public void setHealth(int i)
@@ -406,22 +406,22 @@ public class PlayerLocal extends Player
             setHealthRaw(i);
             if(j < 0)
             {
-                heartsFlashTime = heartsHalvesLife / 2;
+                this.heartsFlashTime = this.heartsHalvesLife / 2;
             }
         } else
         {
-            lastDamage = j;
-            prevHealth = getHealth();
-            heartsFlashTime = heartsHalvesLife;
+            this.lastDamage = j;
+            this.prevHealth = getHealth();
+            this.heartsFlashTime = this.heartsHalvesLife;
             damageEntity(j, null);
-            hurtTime = maxHurtTime = 10;
+            this.hurtTime = this.maxHurtTime = 10;
         }
     }
 
     @Override
     public void respawnPlayer()
     {
-        mc.respawn(false, 0);
+        this.mc.respawn(false, 0);
     }
 
     @Override
@@ -437,24 +437,24 @@ public class PlayerLocal extends Player
         }
         if(stat.isAchievement()) {
             Achievement achievement = (Achievement)stat;
-            if(achievement.parent == null || mc.statsCounter.isUnlocked(achievement.parent))
+            if(achievement.parent == null || this.mc.statsCounter.isUnlocked(achievement.parent))
             {
-                if(!mc.statsCounter.isUnlocked(achievement))
+                if(!this.mc.statsCounter.isUnlocked(achievement))
                 {
-                    mc.guiToasts.addToast(new AchievementToast(achievement, false));
+                    this.mc.guiToasts.addToast(new AchievementToast(achievement, false));
                 }
-                mc.statsCounter.add(stat, i);
+                this.mc.statsCounter.add(stat, i);
             }
         } else
         {
-            mc.statsCounter.add(stat, i);
+            this.mc.statsCounter.add(stat, i);
         }
     }
     
     @Override
     public int getStat(Stat stat)
     {
-        return mc.statsCounter.readStat(stat);
+        return this.mc.statsCounter.readStat(stat);
     }
 
     @Override
@@ -504,17 +504,17 @@ public class PlayerLocal extends Player
     }
 
     public void syncPlacementMode() {
-        this.placementModeOverride = mc.gameSettings.placementMode.value;
+        this.placementModeOverride = this.mc.gameSettings.placementMode.value;
     }
     
 	@Override
 	public void sendMessage(String message) {
-		mc.hudIngame.addChatMessage(message);
+        this.mc.hudIngame.addChatMessage(message);
 	}
 
 	@Override
 	public void sendStatusMessage(String message) {
-		mc.hudIngame.heldItemTooltipElement.setString(message);
+        this.mc.hudIngame.heldItemTooltipElement.setString(message);
 	}
 
     @Override
@@ -524,8 +524,8 @@ public class PlayerLocal extends Player
 
     @Override
     public void handleSpecialVehicleControl() {
-        if (vehicle instanceof EntityBoat) {
-            ((EntityBoat) vehicle).controlBoat(-input.moveForward, -input.moveStrafe);
+        if (this.vehicle instanceof EntityBoat) {
+            ((EntityBoat) this.vehicle).controlBoat(-this.input.moveForward, -this.input.moveStrafe);
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/gui/ScreenConnecting.java b/game/client/src/main/java/net/minecraft/client/gui/ScreenConnecting.java
index 96294d34a..5155cf0d2 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/ScreenConnecting.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/ScreenConnecting.java
@@ -5,7 +5,7 @@ import net.minecraft.client.Minecraft;
 import net.minecraft.client.gui.server.ScreenSelectServer;
 import net.minecraft.client.net.handler.PacketHandlerClient;
 import net.minecraft.core.lang.I18n;
-import net.minecraft.core.net.packet.PacketPreLogin;
+import net.minecraft.core.net.packet.PacketHandshake;
 import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 
@@ -28,7 +28,7 @@ public class ScreenConnecting extends Screen
                 {
                     return;
                 }
-                clientHandler.addToSendQueue(new PacketPreLogin(mc.session.username));
+                clientHandler.addToSendQueue(new PacketHandshake(mc.session.username));
             }
             catch(UnknownHostException unknownhostexception)
             {
diff --git a/game/client/src/main/java/net/minecraft/client/gui/ScreenMobPicker.java b/game/client/src/main/java/net/minecraft/client/gui/ScreenMobPicker.java
index d7c2258fe..7c0116add 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/ScreenMobPicker.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/ScreenMobPicker.java
@@ -9,6 +9,7 @@ import net.minecraft.core.entity.animal.MobFireflyCluster;
 import net.minecraft.core.net.packet.PacketSetMobSpawner;
 import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.lang.reflect.Modifier;
@@ -23,9 +24,9 @@ public class ScreenMobPicker
     private boolean shouldClose = false;
 
 
-    public ScreenMobPicker(String mobId, @NotNull TilePos tilePos) {
+    public ScreenMobPicker(String mobId, @NotNull TilePosc tilePos) {
         this.mobId = mobId;
-        this.tilePos = tilePos;
+        this.tilePos = new TilePos(tilePos);
     }
 
     @Override
diff --git a/game/client/src/main/java/net/minecraft/client/gui/container/ScreenCrafting.java b/game/client/src/main/java/net/minecraft/client/gui/container/ScreenCrafting.java
index 8c53f7b8e..eb8c025c0 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/container/ScreenCrafting.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/container/ScreenCrafting.java
@@ -6,12 +6,13 @@ import net.minecraft.core.player.inventory.container.ContainerInventory;
 import net.minecraft.core.player.inventory.menu.MenuCrafting;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.lwjgl.opengl.GL11;
 
 public class ScreenCrafting extends ScreenContainerAbstract
 {
-    public ScreenCrafting(@NotNull ContainerInventory inventory, @NotNull World world, @NotNull TilePos tilePos)
+    public ScreenCrafting(@NotNull ContainerInventory inventory, @NotNull World world, @NotNull TilePosc tilePos)
     {
         super(new MenuCrafting(inventory, world, tilePos));
     }
diff --git a/game/client/src/main/java/net/minecraft/client/gui/hud/HudIngame.java b/game/client/src/main/java/net/minecraft/client/gui/hud/HudIngame.java
index 6372ff6ac..6abad9248 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/hud/HudIngame.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/hud/HudIngame.java
@@ -81,26 +81,26 @@ public class HudIngame extends Gui
     {
         this.mc = minecraft;
         this.fontRenderer = this.mc.font;
-        this.heldItemTooltipElement = new HeldItemTooltipElement(mc);
+        this.heldItemTooltipElement = new HeldItemTooltipElement(this.mc);
     }
 
     public void renderGameOverlay(float partialTicks, boolean flag, int mouseX, int mouseY)
     {
-        if (mc.currentScreen instanceof ScreenPhotoMode) return;
+        if (this.mc.currentScreen instanceof ScreenPhotoMode) return;
 
         I18n stringtranslate = I18n.getInstance();
-        int width = mc.resolution.getScaledWidthScreenCoords();
-        int height = mc.resolution.getScaledHeightScreenCoords();
-        int sp = (int) ((mc.gameSettings.screenPadding.value * height) / 8);
-        mc.worldRenderer.setupScaledResolution();
+        int width = this.mc.resolution.getScaledWidthScreenCoords();
+        int height = this.mc.resolution.getScaledHeightScreenCoords();
+        int sp = (int) ((this.mc.gameSettings.screenPadding.value * height) / 8);
+        this.mc.worldRenderer.setupScaledResolution();
 
         GL11.glEnable(3042 /* GL_BLEND */);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
 
         // Render vignette
-        if (mc.gameSettings.immersiveMode.drawVignette() && mc.gameSettings.vignette.value)
+        if (this.mc.gameSettings.immersiveMode.drawVignette() && this.mc.gameSettings.vignette.value)
         {
-            renderVignette(mc.thePlayer.getBrightness(partialTicks), width, height);
+            renderVignette(this.mc.thePlayer.getBrightness(partialTicks), width, height);
         }
 
         // Render pumpkin overlay
@@ -128,10 +128,10 @@ public class HudIngame extends Gui
         //Sleep Overlay
         Lighting.disable();
         GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
-          if (mc.thePlayer.getSleepTimer() > 0) {
+          if (this.mc.thePlayer.getSleepTimer() > 0) {
             GL11.glDisable(2929 /* GL_DEPTH_TEST */);
             GL11.glDisable(3008 /* GL_ALPHA_TEST */);
-            int i2 = mc.thePlayer.getSleepTimer();
+            int i2 = this.mc.thePlayer.getSleepTimer();
             float f3 = (float) i2 / 100F;
             if (f3 > 1.0F)
             {
@@ -144,20 +144,20 @@ public class HudIngame extends Gui
         }
 
         //Text Overlays
-        if (mc.gameSettings.immersiveMode.drawOverlays()) {
+        if (this.mc.gameSettings.immersiveMode.drawOverlays()) {
             drawRecordPlayingOverlay(width, height - sp, partialTicks);
 
             boolean clock = false;
             boolean compass = false;
             boolean rotaryCalendar = false;
 
-            if (mc.thePlayer.getGamemode() == Gamemode.creative) {
+            if (this.mc.thePlayer.getGamemode() == Gamemode.creative) {
                 clock = true;
                 compass = true;
                 rotaryCalendar = true;
             } else {
-                for (int iinv = 0; iinv < mc.thePlayer.inventory.getContainerSize(); iinv++) {
-                    ItemStack item = mc.thePlayer.inventory.getItem(iinv);
+                for (int iinv = 0; iinv < this.mc.thePlayer.inventory.getContainerSize(); iinv++) {
+                    ItemStack item = this.mc.thePlayer.inventory.getItem(iinv);
                     if (item != null) {
                         if (item.itemID == Items.TOOL_CLOCK.id) {
                             clock = true;
@@ -173,18 +173,18 @@ public class HudIngame extends Gui
             }
 
             // Show Player List
-            if (!mc.gameSettings.showDebugScreen.value) drawPlayerList(width, height, sp);
+            if (!this.mc.gameSettings.showDebugScreen.value) drawPlayerList(width, height, sp);
 
-            if (mc.gameSettings.showDebugScreen.value) {
+            if (this.mc.gameSettings.showDebugScreen.value) {
                 glPushMatrix();
                 glEnable(GL_BLEND);
                 glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
                 glScalef(DEBUG_SCALE, DEBUG_SCALE, 1);
 
-                debugLine = 0;
-                debugLineRight = 0;
-                debugOffset = 0;
-                debugOffsetRight = 0;
+                this.debugLine = 0;
+                this.debugLineRight = 0;
+                this.debugOffset = 0;
+                this.debugOffsetRight = 0;
 
                 long memMax = Runtime.getRuntime().maxMemory();
                 long memTotal = Runtime.getRuntime().totalMemory();
@@ -198,23 +198,22 @@ public class HudIngame extends Gui
                 drawDebugScreenLineRight("JRE: " + System.getProperty("java.version") + " (" + System.getProperty("java.vendor") + ")");
                 drawDebugScreenLineRight("LWJGL version: " + org.lwjgl.Version.getVersion());
 
-                debugOffsetRight += space;
+                this.debugOffsetRight += space;
 
                 drawDebugScreenLineRight(GL11.glGetString(GL11.GL_VENDOR));
                 drawDebugScreenLineRight(GL11.glGetString(GL11.GL_RENDERER));
                 drawDebugScreenLineRight(GL11.glGetString(GL11.GL_VERSION));
-                drawDebugScreenLineRight("Resolution: " + mc.gameWindow.getWidthPixels() + "x" + mc.gameWindow.getHeightPixels());
-                drawDebugScreenLineRight("Render Resolution: " + mc.renderer.getRenderWidth() + "x" + mc.renderer.getRenderHeight());
+                drawDebugScreenLineRight("Resolution: " + this.mc.gameWindow.getWidthPixels() + "x" + this.mc.gameWindow.getHeightPixels());
+                drawDebugScreenLineRight("Render Resolution: " + this.mc.renderer.getRenderWidth() + "x" + this.mc.renderer.getRenderHeight());
 
                 drawDebugScreenLine("Better than Adventure! " + Minecraft.VERSION);
-                drawDebugScreenLine(mc.lineDebug);
-                if (mc.terrainRenderer instanceof TerrainRendererMultiDraw) {
-                    TerrainRendererMultiDraw terrainRenderer = (TerrainRendererMultiDraw) mc.terrainRenderer;
+                drawDebugScreenLine(this.mc.lineDebug);
+                if (this.mc.terrainRenderer instanceof TerrainRendererMultiDraw terrainRenderer) {
 
                     int regionCount = terrainRenderer.regionBuffer.size();
 
-                    int playerX = MathHelper.floor(mc.thePlayer.x);
-                    int playerZ = MathHelper.floor(mc.thePlayer.z);
+                    int playerX = MathHelper.floor(this.mc.thePlayer.x);
+                    int playerZ = MathHelper.floor(this.mc.thePlayer.z);
 
 
                     List<RenderRegion> allRegions = terrainRenderer.regionBuffer.getAllRegions();
@@ -248,79 +247,79 @@ public class HudIngame extends Gui
                     drawDebugScreenLine("CR: " + currentRegion + " E: " + visibleEntries + "/" + totalEntries);
 
                 } else {
-                    drawDebugScreenLine(mc.getRendererDebugInfo());
+                    drawDebugScreenLine(this.mc.getRendererDebugInfo());
                 }
-                drawDebugScreenLine(mc.getEntityDebugInfoString());
-                drawDebugScreenLine(mc.getEntityCountsInfoString());
-                drawDebugScreenLine(mc.getChunkProviderInfoString());
+                drawDebugScreenLine(this.mc.getEntityDebugInfoString());
+                drawDebugScreenLine(this.mc.getEntityCountsInfoString());
+                drawDebugScreenLine(this.mc.getChunkProviderInfoString());
 
-                debugOffset += space;
-                debugOffsetRight += space;
+                this.debugOffset += space;
+                this.debugOffsetRight += space;
 
                 if (compass) {
-                    drawDebugScreenLine("X: " + mc.thePlayer.x);
-                    drawDebugScreenLine("Y: " + mc.thePlayer.y);
-                    drawDebugScreenLine("Z: " + mc.thePlayer.z);
+                    drawDebugScreenLine("X: " + this.mc.thePlayer.x);
+                    drawDebugScreenLine("Y: " + this.mc.thePlayer.y);
+                    drawDebugScreenLine("Z: " + this.mc.thePlayer.z);
 
-                    int chunkX = MathHelper.floor(mc.thePlayer.x) >> 4;
-                    int chunkZ = MathHelper.floor(mc.thePlayer.z) >> 4;
+                    int chunkX = MathHelper.floor(this.mc.thePlayer.x) >> 4;
+                    int chunkZ = MathHelper.floor(this.mc.thePlayer.z) >> 4;
 
                     drawDebugScreenLine("Chunk: " + chunkX + ", " + chunkZ);
 
-                    int yaw = DynamicTexture.pmod(java.lang.Math.round(mc.thePlayer.yRot), 360);
-                    int pitch = java.lang.Math.round(mc.thePlayer.xRot);
-                    drawDebugScreenLine("Facing: " + yaw + "°, " + pitch + "° (" + I18n.getInstance().translateKey(getFacingDirection(mc.thePlayer).getTranslationKey()) + ")");
+                    int yaw = DynamicTexture.pmod(java.lang.Math.round(this.mc.thePlayer.yRot), 360);
+                    int pitch = java.lang.Math.round(this.mc.thePlayer.xRot);
+                    drawDebugScreenLine("Facing: " + yaw + "°, " + pitch + "° (" + I18n.getInstance().translateKey(getFacingDirection(this.mc.thePlayer).getTranslationKey()) + ")");
                 } else {
                     drawDebugScreenLine("Hold a compass for more information");
                 }
 
                 if (clock) {
-                    if (!compass) debugOffset += space;
+                    if (!compass) this.debugOffset += space;
 
-                    int playerX = MathHelper.floor(mc.thePlayer.x);
-                    int playerY = MathHelper.floor(mc.thePlayer.y);
-                    int playerZ = MathHelper.floor(mc.thePlayer.z);
-                    drawDebugScreenLine("Light: Sky: " + mc.currentWorld.getSavedLightValue(LightLayer.Sky, playerX, playerY, playerZ) + " Block: " + mc.currentWorld.getSavedLightValue(LightLayer.Block, playerX, playerY, playerZ));
+                    int playerX = MathHelper.floor(this.mc.thePlayer.x);
+                    int playerY = MathHelper.floor(this.mc.thePlayer.y);
+                    int playerZ = MathHelper.floor(this.mc.thePlayer.z);
+                    drawDebugScreenLine("Light: Sky: " + this.mc.currentWorld.getSavedLightValue(LightLayer.Sky, playerX, playerY, playerZ) + " Block: " + this.mc.currentWorld.getSavedLightValue(LightLayer.Block, playerX, playerY, playerZ));
                 }
 
-                debugOffset += space;
+                this.debugOffset += space;
 
-                drawDebugScreenLine("Entities: " + mc.currentWorld.getLoadedEntityList().size());
-                drawDebugScreenLine("Tile Entities: " + mc.currentWorld.getLoadedTileEntityList().size());
+                drawDebugScreenLine("Entities: " + this.mc.currentWorld.getLoadedEntityList().size());
+                drawDebugScreenLine("Tile Entities: " + this.mc.currentWorld.getLoadedTileEntityList().size());
 
-                debugOffset += space;
+                this.debugOffset += space;
 
                 if (clock) {
-                    drawDebugScreenLine("Time: " + getTimeString(mc) + " (Day " + (mc.currentWorld.getWorldTime() / Global.DAY_LENGTH_TICKS) + ")");
+                    drawDebugScreenLine("Time: " + getTimeString(this.mc) + " (Day " + (this.mc.currentWorld.getWorldTime() / Global.DAY_LENGTH_TICKS) + ")");
                 } else {
                     drawDebugScreenLine("Hold a clock for more information");
                 }
 
-                debugOffset += space;
+                this.debugOffset += space;
 
                 if (rotaryCalendar) {
-                    Season season = mc.currentWorld.getSeasonManager().getCurrentSeason();
+                    Season season = this.mc.currentWorld.getSeasonManager().getCurrentSeason();
                     String seasonString = season != null ? season.getTranslatedName() : "None";
-                    Weather weather = mc.currentWorld.getCurrentWeather();
+                    Weather weather = this.mc.currentWorld.getCurrentWeather();
                     String weatherString = weather != null ? stringtranslate.translateKey(weather.getNameLanguageKey()) : "None";
 
-                    int blockX = MathHelper.floor(mc.thePlayer.x);
-                    int blockY = MathHelper.floor(mc.thePlayer.y);
-                    int blockZ = MathHelper.floor(mc.thePlayer.z);
+                    int blockX = MathHelper.floor(this.mc.thePlayer.x);
+                    int blockY = MathHelper.floor(this.mc.thePlayer.y);
+                    int blockZ = MathHelper.floor(this.mc.thePlayer.z);
 
                     drawDebugScreenLine("Season: " + seasonString);
-                    drawDebugScreenLine("Weather: " + weatherString + " (" + (mc.currentWorld.weatherManager.getWeatherDuration() / 20) + "s I: " + percentRound(mc.currentWorld.weatherManager.getWeatherIntensity()) + "% P: " + percentRound(mc.currentWorld.weatherManager.getWeatherPower()) + "%)");
-                    drawDebugScreenLine("Biome: " + Registries.BIOMES.getKey(mc.currentWorld.getBlockBiome(blockX, blockY, blockZ)));
+                    drawDebugScreenLine("Weather: " + weatherString + " (" + (this.mc.currentWorld.weatherManager.getWeatherDuration() / 20) + "s I: " + percentRound(this.mc.currentWorld.weatherManager.getWeatherIntensity()) + "% P: " + percentRound(this.mc.currentWorld.weatherManager.getWeatherPower()) + "%)");
+                    drawDebugScreenLine("Biome: " + Registries.BIOMES.getKey(this.mc.currentWorld.getBlockBiome(blockX, blockY, blockZ)));
 
-                    float temperature = (float) floor100(mc.currentWorld.getBlockTemperature(blockX, blockZ));
-                    float humidity = (float) floor100(mc.currentWorld.getBlockHumidity(blockX, blockZ));
+                    float temperature = (float) floor100(this.mc.currentWorld.getBlockTemperature(blockX, blockZ));
+                    float humidity = (float) floor100(this.mc.currentWorld.getBlockHumidity(blockX, blockZ));
 
                     drawDebugScreenLine("Temperature: " + temperature + " Humidity: " + humidity);
 
-                    WindProvider windProvider = mc.currentWorld.worldType.getWindManager();
+                    WindProvider windProvider = this.mc.currentWorld.worldType.getWindManager();
                     if (windProvider != null) {
-                        float direction = (float) floor100(windProvider.getWindDirection(mc.currentWorld, 0.0f, 500.0f, 0.0f));
-                        float intensity = (float) floor100(windProvider.getWindIntensity(mc.currentWorld, 0.0f, 500.0f, 0.0f));
+                        float direction = (float) floor100(windProvider.getWindDirection(this.mc.currentWorld, 0.0f, 500.0f, 0.0f));
+                        float intensity = (float) floor100(windProvider.getWindIntensity(this.mc.currentWorld, 0.0f, 500.0f, 0.0f));
 
                         int yaw = DynamicTexture.pmod(java.lang.Math.round((direction * 360.0f) + 270.0f), 360);
                         drawDebugScreenLine("Wind: " + yaw + "°, " + java.lang.Math.round(intensity * 100.0f) + "%");
@@ -329,24 +328,24 @@ public class HudIngame extends Gui
                     drawDebugScreenLine("Hold a rotary calendar for more information");
                 }
 
-                debugOffset += space;
+                this.debugOffset += space;
 
-                drawDebugScreenLine("Seed: " + mc.currentWorld.getRandomSeed());
+                drawDebugScreenLine("Seed: " + this.mc.currentWorld.getRandomSeed());
 
-                debugOffset += space;
+                this.debugOffset += space;
 
                 drawDebugScreenLine("CTRL + F3: Show Frametimes");
                 drawDebugScreenLine("F3 + Q: Show Keyboard Shortcuts");
 
-                if (mc.objectMouseOver instanceof HitResult.Tile hitTile) {
-                    debugOffset += space;
+                if (this.mc.objectMouseOver instanceof HitResult.Tile hitTile) {
+                    this.debugOffset += space;
 
-                    Block<?> block = Blocks.blocksList[mc.currentWorld.getBlockId(hitTile.tilePos)];
+                    Block<?> block = Blocks.blocksList[this.mc.currentWorld.getBlockId(hitTile.tilePos)];
                     if (block != null) {
                         drawDebugScreenLineRight("Looking at:");
 
                         String name;
-                        int meta = mc.currentWorld.getBlockData(hitTile.tilePos);
+                        int meta = this.mc.currentWorld.getBlockData(hitTile.tilePos);
                         try {
                             name = new ItemStack(block, 1, meta).getDisplayName();
                         } catch (Exception e) {
@@ -360,26 +359,26 @@ public class HudIngame extends Gui
                         drawDebugScreenLineRight(id);
 
                         if (compass) {
-                            drawDebugScreenLineRight("[" + hitTile.tilePos.x + ", " + hitTile.tilePos.y + ", " + hitTile.tilePos.z + "]");
+                            drawDebugScreenLineRight("[" + hitTile.tilePos.x() + ", " + hitTile.tilePos.y() + ", " + hitTile.tilePos.z() + "]");
                         }
 
-                        drawDebugScreenLineRight("Harvest: " + mc.thePlayer.canHarvestBlock(block));
+                        drawDebugScreenLineRight("Harvest: " + this.mc.thePlayer.canHarvestBlock(block));
 
                         if (clock) {
-                            int lightX = hitTile.tilePos.x;
-                            int lightY = hitTile.tilePos.y;
-                            int lightZ = hitTile.tilePos.z;
+                            int lightX = hitTile.tilePos.x();
+                            int lightY = hitTile.tilePos.y();
+                            int lightZ = hitTile.tilePos.z();
 
                             Side side = hitTile.side;
                             lightX += side.getOffsetX();
                             lightY += side.getOffsetY();
                             lightZ += side.getOffsetZ();
 
-                            drawDebugScreenLineRight("Light: Sky: " + mc.currentWorld.getSavedLightValue(LightLayer.Sky, lightX, lightY, lightZ) + " Block: " + mc.currentWorld.getSavedLightValue(LightLayer.Block, lightX, lightY, lightZ));
+                            drawDebugScreenLineRight("Light: Sky: " + this.mc.currentWorld.getSavedLightValue(LightLayer.Sky, lightX, lightY, lightZ) + " Block: " + this.mc.currentWorld.getSavedLightValue(LightLayer.Block, lightX, lightY, lightZ));
                         }
 
-                        drawDebugScreenLineRight("Signal: " + mc.currentWorld.hasSignal(hitTile.tilePos, hitTile.side));
-                        drawDebugScreenLineRight("Direct signal: " + mc.currentWorld.hasDirectSignal(hitTile.tilePos, hitTile.side));
+                        drawDebugScreenLineRight("Signal: " + this.mc.currentWorld.hasSignal(hitTile.tilePos, hitTile.side));
+                        drawDebugScreenLineRight("Direct signal: " + this.mc.currentWorld.hasDirectSignal(hitTile.tilePos, hitTile.side));
 
                         for (Tag<Block<?>> tag : BlockTags.TAG_LIST) {
                             if (tag.appliesTo(block)) {
@@ -392,13 +391,13 @@ public class HudIngame extends Gui
             }
         }
 
-        if (mc.gameSettings.immersiveMode.drawChat())
+        if (this.mc.gameSettings.immersiveMode.drawChat())
         {
         	drawChat(width, height, sp);
         }
         
         // Adding this mostly to see if the stitcher and dynamic textures are working properly
-        if (mc.gameSettings.keyToggleTextureAtlas.isPressed()) {
+        if (this.mc.gameSettings.keyToggleTextureAtlas.isPressed()) {
             Tessellator tessellator = Tessellator.instance;
 
             TextureRegistry.blockAtlas.bind();
@@ -458,9 +457,9 @@ public class HudIngame extends Gui
     private void drawDebugScreenLine(final CharSequence string, final boolean right, final int line, final int offset)
     {
         int width = MathHelper.ceil(this.fontRenderer.stringWidthDouble(string));
-        int height = debugLineHeight;
-        int x = right ? (int) ((mc.resolution.getScaledWidthScreenCoords() / DEBUG_SCALE) - width - 2) : 2;
-        int y = 3 + line * debugLineHeight + offset;
+        int height = this.debugLineHeight;
+        int x = right ? (int) ((this.mc.resolution.getScaledWidthScreenCoords() / DEBUG_SCALE) - width - 2) : 2;
+        int y = 3 + line * this.debugLineHeight + offset;
 
         glDisable(GL_TEXTURE_2D);
         glColor4d(0.2, 0.2, 0.2, 0.6);
@@ -490,16 +489,15 @@ public class HudIngame extends Gui
 
     public void drawPlayerList(int screenWidth, int screenHeight, int screenPadding)
     {
-        if (!mc.isMultiplayerWorld()) return;
-        if (mc.gameSettings.playerListPosition.value == 1)
+        if (!this.mc.isMultiplayerWorld()) return;
+        if (this.mc.gameSettings.playerListPosition.value == 1)
         {
-            mc.gameSettings.showPlayerList.value = mc.gameSettings.keyPlayerList.isPressed() && mc.currentScreen == null;
+            this.mc.gameSettings.showPlayerList.value = this.mc.gameSettings.keyPlayerList.isPressed() && this.mc.currentScreen == null;
         }
-        if (!mc.gameSettings.showPlayerList.value) return;
+        if (!this.mc.gameSettings.showPlayerList.value) return;
 
-        if (!(mc.thePlayer instanceof PlayerLocalMultiplayer)) return;
+        if (!(this.mc.thePlayer instanceof PlayerLocalMultiplayer player)) return;
 
-        PlayerLocalMultiplayer player = (PlayerLocalMultiplayer) mc.thePlayer;
         HashMap<String, String> players = player.sendQueue.playerList;
 
 //		List<PlayerProfile> players = new ArrayList<>();
@@ -512,14 +510,14 @@ public class HudIngame extends Gui
         int longestNameWidth = 0;
         int longestScoreWidth = 0;
 
-        playerListScoreStrings.clear();
+        this.playerListScoreStrings.clear();
 
         for (Map.Entry<String, String> a1 : players.entrySet())
         {
             longestNameWidth = Math.max(MathHelper.ceil(this.fontRenderer.stringWidthDouble(a1.getKey())), longestNameWidth);
 
             longestScoreWidth = Math.max(MathHelper.ceil(this.fontRenderer.stringWidthDouble(a1.getValue())), longestScoreWidth);
-            playerListScoreStrings.add(a1.getValue());
+            this.playerListScoreStrings.add(a1.getValue());
         }
 
         final int nameScoreSpace = 4;
@@ -538,16 +536,16 @@ public class HudIngame extends Gui
         int listX = 0;
         int listY = screenPadding;
 
-        if (mc.gameSettings.playerListPosition.value == 0)
+        if (this.mc.gameSettings.playerListPosition.value == 0)
         {
             listX = (screenWidth - width) / 2;
         }
-        if (mc.gameSettings.playerListPosition.value == 1)
+        if (this.mc.gameSettings.playerListPosition.value == 1)
         {
             listX = (screenWidth - width) / 2;
             listY = screenHeight / 6 + screenPadding;
         }
-        if (mc.gameSettings.playerListPosition.value == 2)
+        if (this.mc.gameSettings.playerListPosition.value == 2)
         {
             listX = screenWidth - width - screenPadding;
         }
@@ -562,7 +560,7 @@ public class HudIngame extends Gui
             int posX = listX + x * columnWidth + x * innerPadding + outerPadding;
             int posY = listY + y * lineHeight + y * innerPadding + outerPadding;
 
-            int scoreStringWidth = MathHelper.ceil(fontRenderer.stringWidthDouble(a2.getValue()));
+            int scoreStringWidth = MathHelper.ceil(this.fontRenderer.stringWidthDouble(a2.getValue()));
             drawRect(posX - 2, posY - 2, posX + columnWidth + 2, posY + 10, 0xffa5a5a5);
             drawRect(posX - 1, posY - 1, posX + columnWidth + 1, posY + 9, 0xA8080808);
             drawStringShadow(this.fontRenderer,a2.getKey(), posX, posY, 0xFFFFFF);
@@ -573,9 +571,9 @@ public class HudIngame extends Gui
 
     public void drawRecordPlayingOverlay(int width, int height, float partialTicks)
     {
-        if (recordPlayingUpFor > 0)
+        if (this.recordPlayingUpFor > 0)
         {
-            float f2 = (float) recordPlayingUpFor - partialTicks;
+            float f2 = (float) this.recordPlayingUpFor - partialTicks;
             int j3 = (int) ((f2 * 256F) / 20F);
             if (j3 > 255)
             {
@@ -588,11 +586,11 @@ public class HudIngame extends Gui
                 GL11.glEnable(3042 /* GL_BLEND */);
                 GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
                 int k4 = 0xffffff;
-                if (colorString)
+                if (this.colorString)
                 {
                     k4 = Color.HSBtoRGB(f2 / 50F, 0.7F, 0.6F) & 0xffffff;
                 }
-                drawStringNoShadow(this.fontRenderer, recordPlaying, MathHelper.ceil(-fontRenderer.stringWidthDouble(recordPlaying) / 2), -4, k4 + (j3 << 24));
+                drawStringNoShadow(this.fontRenderer, this.recordPlaying, MathHelper.ceil(-this.fontRenderer.stringWidthDouble(this.recordPlaying) / 2), -4, k4 + (j3 << 24));
                 GL11.glDisable(3042 /* GL_BLEND */);
                 GL11.glPopMatrix();
             }
@@ -601,21 +599,21 @@ public class HudIngame extends Gui
 
     public void drawChat(int width, int height, int sp)
     {
-        if (mc.gameSettings.chatVisibility.value == ChatVisibility.NEVER_SHOW) return;
+        if (this.mc.gameSettings.chatVisibility.value == ChatVisibility.NEVER_SHOW) return;
 //        if(mc.currentScreen instanceof ScreenChat && ((ScreenChat) mc.currentScreen).message.startsWith("/")) return;
         int linesToShow = 10;
         boolean ignoreFadeout = false;
-        if (mc.currentScreen instanceof ScreenChat)
+        if (this.mc.currentScreen instanceof ScreenChat)
         {
             int acceptableSize = height - 48 - 48;
             linesToShow = acceptableSize / 9;
             ignoreFadeout = true;
-        } else if (mc.gameSettings.chatVisibility.value == ChatVisibility.SHOW_WHEN_CHATTING) {
+        } else if (this.mc.gameSettings.chatVisibility.value == ChatVisibility.SHOW_WHEN_CHATTING) {
             return;
         }
 
-        if (chatScroll > chatMessageList.size() - linesToShow) chatScroll = chatMessageList.size() - linesToShow;
-        if (chatScroll < 0) chatScroll = 0;
+        if (this.chatScroll > this.chatMessageList.size() - linesToShow) this.chatScroll = this.chatMessageList.size() - linesToShow;
+        if (this.chatScroll < 0) this.chatScroll = 0;
 
         GL11.glEnable(GL_BLEND);
         GL11.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -697,7 +695,7 @@ public class HudIngame extends Gui
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         GL11.glDisable(3008 /* GL_ALPHA_TEST */);
-        mc.textureManager.loadTexture("/assets/minecraft/textures/misc/pumpkinblur.png").bind();
+        this.mc.textureManager.loadTexture("/assets/minecraft/textures/misc/pumpkinblur.png").bind();
         Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
         tessellator.addVertexWithUV(0.0D, ySize, -90D, 0.0D, 1.0D);
@@ -714,12 +712,12 @@ public class HudIngame extends Gui
     protected void renderVignette(float intensity, int xSize, int ySize)
     {
         intensity = MathHelper.clamp(1.0f - intensity, 0.0f, 1.0f);
-        prevVignetteBrightness += (double) (intensity - prevVignetteBrightness) * 0.01D;
+        this.prevVignetteBrightness += (double) (intensity - this.prevVignetteBrightness) * 0.01D;
         GL11.glDisable(2929 /* GL_DEPTH_TEST */);
         GL11.glDepthMask(false);
         GL11.glBlendFunc(0, 769);
-        GL11.glColor4f(prevVignetteBrightness, prevVignetteBrightness, prevVignetteBrightness, 1.0F);
-        mc.textureManager.loadTexture("/assets/minecraft/textures/misc/vignette.png").bind();
+        GL11.glColor4f(this.prevVignetteBrightness, this.prevVignetteBrightness, this.prevVignetteBrightness, 1.0F);
+        this.mc.textureManager.loadTexture("/assets/minecraft/textures/misc/vignette.png").bind();
         Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
         tessellator.addVertexWithUV(0.0D, ySize, -90D, 0.0D, 1.0D);
@@ -746,7 +744,7 @@ public class HudIngame extends Gui
         GL11.glDepthMask(false);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, intensity);
-        IconCoordinate portal = BlockModelDispatcher.getInstance().getDispatch(Blocks.getBlock(mc.thePlayer.portalID)).getOverlayTexture(mc.thePlayer.portalColor.blockMeta << 4 | BlockLogicPortal.MASK_COLOR_SET);
+        IconCoordinate portal = BlockModelDispatcher.getInstance().getDispatch(Blocks.getBlock(this.mc.thePlayer.portalID)).getOverlayTexture(this.mc.thePlayer.portalColor.blockMeta << 4 | BlockLogicPortal.MASK_COLOR_SET);
         portal.parentAtlas.bind();
         float f1 = (float) portal.getIconUMin();
         float f2 = (float) portal.getIconVMin();
@@ -767,12 +765,12 @@ public class HudIngame extends Gui
 
     public void updateTick()
     {
-        if (recordPlayingUpFor > 0)
+        if (this.recordPlayingUpFor > 0)
         {
-            recordPlayingUpFor--;
+            this.recordPlayingUpFor--;
         }
-        updateCounter++;
-        for (ChatLine chatLine : chatMessageList) {
+        this.updateCounter++;
+        for (ChatLine chatLine : this.chatMessageList) {
             chatLine.updateCounter++;
         }
 
@@ -780,7 +778,7 @@ public class HudIngame extends Gui
 
     public void clearChatMessages()
     {
-        chatMessageList.clear();
+        this.chatMessageList.clear();
     }
 
     public void addChatMessage(final CharSequence s)
@@ -794,9 +792,9 @@ public class HudIngame extends Gui
 
     public void setRecordPlayingMessage(String s)
     {
-        recordPlaying = I18n.getInstance().translateKeyAndFormat("gui.ingame.label.now_playing", s);
-        recordPlayingUpFor = 60;
-        colorString = true;
+        this.recordPlaying = I18n.getInstance().translateKeyAndFormat("gui.ingame.label.now_playing", s);
+        this.recordPlayingUpFor = 60;
+        this.colorString = true;
     }
 
     public static Direction getFacingDirection(Player player)
diff --git a/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentHealthBar.java b/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentHealthBar.java
index 31f8d35ba..312cf9a30 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentHealthBar.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentHealthBar.java
@@ -38,49 +38,41 @@ public class HudComponentHealthBar
         GL11.glDisable(GL11.GL_BLEND);
 
         boolean heartsFlash = (mc.thePlayer.heartsFlashTime / 3) % 2 == 1;
-        if (mc.thePlayer.heartsFlashTime < 10)
-        {
+        if (mc.thePlayer.heartsFlashTime < 10) {
             heartsFlash = false;
         }
         int health = mc.thePlayer.getHealth();
         int prevHealth = mc.thePlayer.prevHealth;
-        random.setSeed(hud.updateCounter * 0x4c627L);
+        this.random.setSeed(hud.updateCounter * 0x4c627L);
         boolean isHardcore = mc.thePlayer.getGamemode() == Gamemode.hardcore;
 
         for (int i = 0; i < 10; i++) {
             int heartOffset = 0;
-            if (heartsFlash)
-            {
+            if (heartsFlash) {
                 heartOffset = 1;
             }
             int xHeart = x + i * 8;
             int yHeart = y;
-            if (health <= 4)
-            {
-                yHeart += random.nextInt(2);
+            if (health <= 4) {
+                yHeart += this.random.nextInt(2);
             }
 
             hud.drawGuiIcon(xHeart, yHeart, 9, 9, heartOffset == 0 ? TextureRegistry.getTexture("minecraft:gui/hud/heart/container") : TextureRegistry.getTexture("minecraft:gui/hud/heart/container_blinking"));
-            if (heartsFlash)
-            {
-                if (i * 2 + 1 < prevHealth)
-                {
+            if (heartsFlash) {
+                if (i * 2 + 1 < prevHealth) {
                     // Half flash heart icon
                     hud.drawGuiIcon(xHeart, yHeart, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/" + (isHardcore ? "hardcore_" : "") + "full_blinking"));
                 }
-                if (i * 2 + 1 == prevHealth)
-                {
+                if (i * 2 + 1 == prevHealth) {
                     // Full flash heart icon
                     hud.drawGuiIcon(xHeart, yHeart, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/" + (isHardcore ? "hardcore_" : "") + "half_blinking"));
                 }
             }
-            if (i * 2 + 1 < health)
-            {
+            if (i * 2 + 1 < health) {
                 // Full heart icon
                 hud.drawGuiIcon(xHeart, yHeart, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/" + (isHardcore ? "hardcore_" : "") + "full"));
             }
-            if (i * 2 + 1 == health)
-            {
+            if (i * 2 + 1 == health) {
                 // Half heart icon
                 hud.drawGuiIcon(xHeart, yHeart, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/" + (isHardcore ? "hardcore_" : "") + "half"));
             }
@@ -95,9 +87,9 @@ public class HudComponentHealthBar
                     }
                 }
                 if (mc.objectMouseOver instanceof HitResult.Tile hitTile) {
-                    Block<?> b = mc.currentWorld.getBlock(hitTile.tilePos.x, hitTile.tilePos.y, hitTile.tilePos.z);
+                    Block<?> b = mc.currentWorld.getBlock(hitTile.tilePos);
                     if (Block.getLogicClass(b) instanceof BlockLogicEdible edible) {
-                        healing = edible.getHealAmount(mc.currentWorld, hitTile.tilePos.x, hitTile.tilePos.y, hitTile.tilePos.z);
+                        healing = edible.getHealAmount(mc.currentWorld, hitTile.tilePos);
                     }
                 }
                 if (healing > 0) {
@@ -128,13 +120,11 @@ public class HudComponentHealthBar
         for (int i = 0; i < 10; i++) {
             int xHeart = x + i * 8;
             gui.drawGuiIcon(xHeart, y, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/container"));
-            if (i * 2 + 1 < health)
-            {
+            if (i * 2 + 1 < health) {
                 // Full heart icon
                 gui.drawGuiIcon(xHeart, y, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/full"));
             }
-            if (i * 2 + 1 == health)
-            {
+            if (i * 2 + 1 == health) {
                 // Half heart icon
                 gui.drawGuiIcon(xHeart, y, 9, 9, TextureRegistry.getTexture("minecraft:gui/hud/heart/half"));
             }
diff --git a/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentOxygenBar.java b/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentOxygenBar.java
index 87e372230..368d59643 100644
--- a/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentOxygenBar.java
+++ b/game/client/src/main/java/net/minecraft/client/gui/hud/component/HudComponentOxygenBar.java
@@ -1,12 +1,11 @@
 package net.minecraft.client.gui.hud.component;
 
-import net.minecraft.client.Minecraft;
 import net.minecraft.client.gui.Gui;
 import net.minecraft.client.gui.hud.HudIngame;
 import net.minecraft.client.gui.hud.component.layout.Layout;
 import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import org.lwjgl.opengl.GL11;
 
 public class HudComponentOxygenBar
@@ -21,7 +20,7 @@ public class HudComponentOxygenBar
 
     @Override
     public boolean isVisible() {
-        return mc.gameSettings.immersiveMode.drawHotbar() && mc.playerController.canHurtPlayer() && !mc.thePlayer.getGamemode().isPlayerInvulnerable() && mc.thePlayer.isUnderLiquid(Material.water);
+        return mc.gameSettings.immersiveMode.drawHotbar() && mc.playerController.canHurtPlayer() && !mc.thePlayer.getGamemode().isPlayerInvulnerable() && mc.thePlayer.isUnderLiquid(Materials.WATER);
     }
 
     @Override
diff --git a/game/client/src/main/java/net/minecraft/client/net/command/ClientCommandSource.java b/game/client/src/main/java/net/minecraft/client/net/command/ClientCommandSource.java
index bae86aa98..2546a7b1b 100644
--- a/game/client/src/main/java/net/minecraft/client/net/command/ClientCommandSource.java
+++ b/game/client/src/main/java/net/minecraft/client/net/command/ClientCommandSource.java
@@ -6,12 +6,15 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.helpers.EntitySelector;
 import net.minecraft.core.net.packet.Packet;
-import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -68,19 +71,20 @@ public class ClientCommandSource implements CommandSource {
     }
 
     @Override
-    public @NotNull Vec3 getCoordinates(boolean offsetHeight) {
-        Vec3 position = this.getSender().getPosition(1.0f, false);
-        if (offsetHeight) return position.add(0.0f, -this.getSender().heightOffset, 0.0f);
+    public @Nullable Vector3dc getCoordinates(boolean offsetHeight) {
+        Vector3dc position = this.getSender().getPosition(1.0f, false);
+        if (offsetHeight) return position.add(0.0f, -this.getSender().heightOffset, 0.0f, new Vector3d());
         return position;
     }
 
     @Override
-    public @NotNull Vec3 getBlockCoordinates() {
+    public @Nullable TilePosc getBlockCoordinates() {
         if (this.mc.objectMouseOver instanceof HitResult.Tile hitTile) {
-            return Vec3.fromPool(hitTile.tilePos.x, hitTile.tilePos.y, hitTile.tilePos.z);
+            return hitTile.tilePos;
         }
-        Vec3 playerCoordinates = this.getCoordinates(true);
-        return Vec3.fromPool(MathHelper.floor(playerCoordinates.x), MathHelper.floor(playerCoordinates.y), MathHelper.floor(playerCoordinates.z));
+        Vector3dc playerCoordinates = this.getCoordinates(true);
+        assert playerCoordinates != null;
+        return new TilePos(playerCoordinates);
     }
 
     @Override
diff --git a/game/client/src/main/java/net/minecraft/client/net/handler/PacketHandlerClient.java b/game/client/src/main/java/net/minecraft/client/net/handler/PacketHandlerClient.java
index 1d2162d27..83778423c 100644
--- a/game/client/src/main/java/net/minecraft/client/net/handler/PacketHandlerClient.java
+++ b/game/client/src/main/java/net/minecraft/client/net/handler/PacketHandlerClient.java
@@ -68,6 +68,7 @@ import net.minecraft.core.world.save.LevelData;
 import net.minecraft.core.world.saveddata.SavedDataStorage;
 import net.minecraft.core.world.weather.Weather;
 import net.minecraft.core.world.weather.Weathers;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 
 import java.io.BufferedReader;
@@ -155,24 +156,24 @@ public class PacketHandlerClient extends PacketHandler
 
 
     @Override
-    public void handleLogin(PacketLogin loginPacket)
+    public void handleLogin(@NotNull PacketLogin packetLogin)
     {
         mc.playerController = new PlayerControllerMP(mc, this);
         mc.statsCounter.add(StatList.joinMultiplayerStat, 1);
-        worldClientMP = new WorldClientMP(this, loginPacket.worldSeed, loginPacket.dimensionId, loginPacket.worldTypeId);
+        worldClientMP = new WorldClientMP(this, packetLogin.worldSeed, packetLogin.dimensionId, packetLogin.worldTypeId);
         worldClientMP.isClientSide = true;
         mc.changeWorld(worldClientMP);
-        mc.thePlayer.dimension = loginPacket.dimensionId;
+        mc.thePlayer.dimension = packetLogin.dimensionId;
         mc.displayScreen(new ScreenDownloadTerrain(this));
-        mc.thePlayer.id = loginPacket.playerEntityIdAndProtocolVersion;
-        NetworkManager.PACKET_DELAY = loginPacket.packetDelay;
+        mc.thePlayer.id = packetLogin.playerEntityIdAndProtocolVersion;
+        NetworkManager.PACKET_DELAY = packetLogin.packetDelay;
         Registries.RECIPES = new RecipeRegistry();
 
         addToSendQueue(new PacketPlayerConfig(mc.thePlayer.playerConfig));
     }
 
     @Override
-    public void handlePlayerConfig(PacketPlayerConfig packetPlayerConfig) {
+    public void handlePlayerConfig(@NotNull PacketPlayerConfig packetPlayerConfig) {
         if (packetPlayerConfig.entityId >= 0 && packetPlayerConfig.entityId != mc.thePlayer.id) {
             Entity e = getEntityByID(packetPlayerConfig.entityId);
             if (e instanceof Player) {
@@ -182,50 +183,50 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handlePickupSpawn(PacketAddItemEntity addItemEntityPacket)
+    public void handleAddItemEntity(@NotNull PacketAddItemEntity packetAddItemEntity)
     {
-        double x = addItemEntityPacket.xPosition / 32D;
-        double y = addItemEntityPacket.yPosition / 32D;
-        double z = addItemEntityPacket.zPosition / 32D;
-        EntityItem entityItem = new EntityItem(worldClientMP, x, y, z, new ItemStack(addItemEntityPacket.itemID, addItemEntityPacket.count, addItemEntityPacket.itemDamage, addItemEntityPacket.tag));
-        entityItem.xd = (double) addItemEntityPacket.xd / 128D;
-        entityItem.yd = (double) addItemEntityPacket.yd / 128D;
-        entityItem.zd = (double) addItemEntityPacket.zd / 128D;
-        entityItem.serverPosX = addItemEntityPacket.xPosition;
-        entityItem.serverPosY = addItemEntityPacket.yPosition;
-        entityItem.serverPosZ = addItemEntityPacket.zPosition;
-        worldClientMP.addEntityToWorld(addItemEntityPacket.entityId, entityItem);
+        double x = packetAddItemEntity.xPosition / 32D;
+        double y = packetAddItemEntity.yPosition / 32D;
+        double z = packetAddItemEntity.zPosition / 32D;
+        EntityItem entityItem = new EntityItem(worldClientMP, x, y, z, new ItemStack(packetAddItemEntity.itemID, packetAddItemEntity.count, packetAddItemEntity.itemDamage, packetAddItemEntity.tag));
+        entityItem.xd = (double) packetAddItemEntity.xd / 128D;
+        entityItem.yd = (double) packetAddItemEntity.yd / 128D;
+        entityItem.zd = (double) packetAddItemEntity.zd / 128D;
+        entityItem.serverPosX = packetAddItemEntity.xPosition;
+        entityItem.serverPosY = packetAddItemEntity.yPosition;
+        entityItem.serverPosZ = packetAddItemEntity.zPosition;
+        worldClientMP.addEntityToWorld(packetAddItemEntity.entityId, entityItem);
     }
 
 
     @Override
-    public void handleVehicleSpawn(PacketAddEntity addEntityPacket) {
-        if (!NetEntityHandler.hasType(addEntityPacket.type)){ return; }
-        double xPosition = ((double) addEntityPacket.xPosition) / 32D;
-        double yPosition = ((double) addEntityPacket.yPosition) / 32D;
-        double zPosition = ((double) addEntityPacket.zPosition) / 32D;
+    public void handleAddEntity(@NotNull PacketAddEntity packetAddEntity) {
+        if (!NetEntityHandler.hasType(packetAddEntity.type)){ return; }
+        double xPosition = ((double) packetAddEntity.xPosition) / 32D;
+        double yPosition = ((double) packetAddEntity.yPosition) / 32D;
+        double zPosition = ((double) packetAddEntity.zPosition) / 32D;
         Entity owner;
-        if (addEntityPacket.ownerId >= 0){
-            owner = getEntityByID(addEntityPacket.ownerId);
+        if (packetAddEntity.ownerId >= 0){
+            owner = getEntityByID(packetAddEntity.ownerId);
         } else {
             owner = null;
         }
-        Entity newEntity = NetEntityHandler.getTypeEntry(addEntityPacket.type).getEntity(worldClientMP, xPosition, yPosition, zPosition, addEntityPacket.metaData, addEntityPacket.hasVelocity, addEntityPacket.xVelocity / 8000D, addEntityPacket.yVelocity / 8000D, addEntityPacket.zVelocity / 8000D, owner, addEntityPacket.tag);
+        Entity newEntity = NetEntityHandler.getTypeEntry(packetAddEntity.type).getEntity(worldClientMP, xPosition, yPosition, zPosition, packetAddEntity.metaData, packetAddEntity.hasVelocity, packetAddEntity.xVelocity / 8000D, packetAddEntity.yVelocity / 8000D, packetAddEntity.zVelocity / 8000D, owner, packetAddEntity.tag);
         if (newEntity != null) {
-            newEntity.serverPosX = addEntityPacket.xPosition;
-            newEntity.serverPosY = addEntityPacket.yPosition;
-            newEntity.serverPosZ = addEntityPacket.zPosition;
-            newEntity.yRot = addEntityPacket.yaw;
-            newEntity.xRot = addEntityPacket.pitch;
-            newEntity.id = addEntityPacket.entityId;
-            worldClientMP.addEntityToWorld(addEntityPacket.entityId, newEntity);
+            newEntity.serverPosX = packetAddEntity.xPosition;
+            newEntity.serverPosY = packetAddEntity.yPosition;
+            newEntity.serverPosZ = packetAddEntity.zPosition;
+            newEntity.yRot = packetAddEntity.yaw;
+            newEntity.xRot = packetAddEntity.pitch;
+            newEntity.id = packetAddEntity.entityId;
+            worldClientMP.addEntityToWorld(packetAddEntity.entityId, newEntity);
             if (owner instanceof Mob && newEntity instanceof Projectile){
                 ((Projectile) newEntity).owner = (Mob) owner;
             }
-            if (addEntityPacket.hasVelocity){
-                newEntity.lerpMotion(((double) addEntityPacket.xVelocity) / 8000D, ((double) addEntityPacket.yVelocity) / 8000D, ((double) addEntityPacket.zVelocity) / 8000D);
+            if (packetAddEntity.hasVelocity){
+                newEntity.lerpMotion(((double) packetAddEntity.xVelocity) / 8000D, ((double) packetAddEntity.yVelocity) / 8000D, ((double) packetAddEntity.zVelocity) / 8000D);
             }
-            List<SynchedEntityData.DataItem<?>> list = addEntityPacket.getUnpackedData();
+            List<SynchedEntityData.DataItem<?>> list = packetAddEntity.getUnpackedData();
             if (list != null)
             {
                 newEntity.getEntityData().assignValues(list);
@@ -234,29 +235,29 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleWeather(PacketWeatherEffect weatherEffectPacket)
+    public void handleWeatherEffect(@NotNull PacketWeatherEffect packetWeatherEffect)
     {
-        double x = (double) weatherEffectPacket.x / 32D;
-        double y = (double) weatherEffectPacket.y / 32D;
-        double z = (double) weatherEffectPacket.z / 32D;
+        double x = (double) packetWeatherEffect.x / 32D;
+        double y = (double) packetWeatherEffect.y / 32D;
+        double z = (double) packetWeatherEffect.z / 32D;
         Entity weatherEntity = null;
-        if (weatherEffectPacket.effectId == PacketWeatherEffect.EFFECT_LIGHTNING) {
+        if (packetWeatherEffect.effectId == PacketWeatherEffect.EFFECT_LIGHTNING) {
             weatherEntity = new EntityLightning(worldClientMP, x, y, z);
         }
         if (weatherEntity != null)
         {
-            weatherEntity.serverPosX = weatherEffectPacket.x;
-            weatherEntity.serverPosY = weatherEffectPacket.y;
-            weatherEntity.serverPosZ = weatherEffectPacket.z;
+            weatherEntity.serverPosX = packetWeatherEffect.x;
+            weatherEntity.serverPosY = packetWeatherEffect.y;
+            weatherEntity.serverPosZ = packetWeatherEffect.z;
             weatherEntity.yRot = 0.0F;
             weatherEntity.xRot = 0.0F;
-            weatherEntity.id = weatherEffectPacket.id;
+            weatherEntity.id = packetWeatherEffect.id;
             worldClientMP.addWeatherEffect(weatherEntity);
         }
     }
 
     @Override
-    public void handleWeatherStatus(PacketWeatherStatus packet)
+    public void handleWeatherStatus(@NotNull PacketWeatherStatus packet)
     {
         if (worldClientMP.dimension.id != packet.dimId) return;
         Weather currentWeather = packet.id == -1 ? null : Weathers.WEATHERS[packet.id];
@@ -265,42 +266,42 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleEntityPainting(PacketAddPainting addPaintingPacket)
+    public void handleAddPainting(@NotNull PacketAddPainting packetAddPainting)
     {
-        Entity entity = worldClientMP.getEntityFromId(addPaintingPacket.entityId);
+        Entity entity = worldClientMP.getEntityFromId(packetAddPainting.entityId);
         if (entity instanceof EntityPainting){
             EntityPainting painting = (EntityPainting) entity;
-            painting.blockX = addPaintingPacket.xPosition;
-            painting.blockY = addPaintingPacket.yPosition;
-            painting.blockZ = addPaintingPacket.zPosition;
+            painting.blockX = packetAddPainting.xPosition;
+            painting.blockY = packetAddPainting.yPosition;
+            painting.blockZ = packetAddPainting.zPosition;
 
-            if (ArtType.map.containsKey(addPaintingPacket.key)) painting.art = ArtType.map.get(addPaintingPacket.key);
+            if (ArtType.map.containsKey(packetAddPainting.key)) painting.art = ArtType.map.get(packetAddPainting.key);
 
-            painting.setDirection(addPaintingPacket.direction);
-            if (addPaintingPacket.itemID > 0){
-                painting.setStack(new ItemStack(addPaintingPacket.itemID, 1, addPaintingPacket.meta));
+            painting.setDirection(packetAddPainting.direction);
+            if (packetAddPainting.itemID > 0){
+                painting.setStack(new ItemStack(packetAddPainting.itemID, 1, packetAddPainting.meta));
             }
         } else {
-            EntityPainting entitypainting = new EntityPainting(worldClientMP, addPaintingPacket.xPosition, addPaintingPacket.yPosition, addPaintingPacket.zPosition, addPaintingPacket.direction, addPaintingPacket.key);
-            worldClientMP.addEntityToWorld(addPaintingPacket.entityId, entitypainting);
-            if (addPaintingPacket.itemID > 0){
-                entitypainting.setStack(new ItemStack(addPaintingPacket.itemID, 1, addPaintingPacket.meta));
+            EntityPainting entitypainting = new EntityPainting(worldClientMP, packetAddPainting.xPosition, packetAddPainting.yPosition, packetAddPainting.zPosition, packetAddPainting.direction, packetAddPainting.key);
+            worldClientMP.addEntityToWorld(packetAddPainting.entityId, entitypainting);
+            if (packetAddPainting.itemID > 0){
+                entitypainting.setStack(new ItemStack(packetAddPainting.itemID, 1, packetAddPainting.meta));
             }
         }
 
     }
 
     @Override
-    public void handleEntityVelocity(PacketSetEntityMotion setEntityMotionPacket)
+    public void handleSetEntityMotion(@NotNull PacketSetEntityMotion packetSetEntityMotion)
     {
-        Entity entity = getEntityByID(setEntityMotionPacket.entityId);
+        Entity entity = getEntityByID(packetSetEntityMotion.entityId);
         if (entity != null) {
-            entity.lerpMotion((double) setEntityMotionPacket.motionX / 8000D, (double) setEntityMotionPacket.motionY / 8000D, (double) setEntityMotionPacket.motionZ / 8000D);
+            entity.lerpMotion((double) packetSetEntityMotion.motionX / 8000D, (double) packetSetEntityMotion.motionY / 8000D, (double) packetSetEntityMotion.motionZ / 8000D);
         }
     }
 
     @Override
-    public void handleEntityFling(final PacketEntityFling packetEntityFling) {
+    public void handleEntityFling(final @NotNull PacketEntityFling packetEntityFling) {
         final Entity entity = getEntityByID(packetEntityFling.entityId);
         if (entity != null) {
             entity.pushesThisTick = packetEntityFling.pushesTick;
@@ -313,30 +314,30 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleEntityMetadata(PacketSetEntityData setEntityDataPacket)
+    public void handleSetEntityData(@NotNull PacketSetEntityData packetSetEntityData)
     {
-        Entity entity = getEntityByID(setEntityDataPacket.entityId);
-        if (entity != null && setEntityDataPacket.getUnpackedData() != null)
+        Entity entity = getEntityByID(packetSetEntityData.entityId);
+        if (entity != null && packetSetEntityData.getUnpackedData() != null)
         {
-            entity.getEntityData().assignValues(setEntityDataPacket.getUnpackedData());
+            entity.getEntityData().assignValues(packetSetEntityData.getUnpackedData());
         }
     }
 
     @Override
-    public void handleNamedEntitySpawn(final PacketAddPlayer addPlayerPacket)
+    public void handleAddPlayer(final @NotNull PacketAddPlayer packetAddPlayer)
     {
-        final double x = (double) addPlayerPacket.xPosition / 32D;
-        final double y = (double) addPlayerPacket.yPosition / 32D;
-        final double z = (double) addPlayerPacket.zPosition / 32D;
-        final float yRot = (float) (addPlayerPacket.rotation * 360) / 256F;
-        final float xRot = (float) (addPlayerPacket.pitch * 360) / 256F;
-        final PlayerRemote playerRemote = new PlayerRemote(this.mc.currentWorld, addPlayerPacket.name, addPlayerPacket.uuid);
-        UUIDHelper.nameToUUIDMap.put(addPlayerPacket.name, addPlayerPacket.uuid);
-        playerRemote.playerConfig.config = addPlayerPacket.playerConfig;
-        playerRemote.xo = playerRemote.serverPosX = addPlayerPacket.xPosition;
-        playerRemote.yo = playerRemote.serverPosY = addPlayerPacket.yPosition;
-        playerRemote.zo = playerRemote.serverPosZ = addPlayerPacket.zPosition;
-        final int itemId = addPlayerPacket.currentItem;
+        final double x = (double) packetAddPlayer.xPosition / 32D;
+        final double y = (double) packetAddPlayer.yPosition / 32D;
+        final double z = (double) packetAddPlayer.zPosition / 32D;
+        final float yRot = (float) (packetAddPlayer.rotation * 360) / 256F;
+        final float xRot = (float) (packetAddPlayer.pitch * 360) / 256F;
+        final PlayerRemote playerRemote = new PlayerRemote(this.mc.currentWorld, packetAddPlayer.name, packetAddPlayer.uuid);
+        UUIDHelper.nameToUUIDMap.put(packetAddPlayer.name, packetAddPlayer.uuid);
+        playerRemote.playerConfig.config = packetAddPlayer.playerConfig;
+        playerRemote.xo = playerRemote.serverPosX = packetAddPlayer.xPosition;
+        playerRemote.yo = playerRemote.serverPosY = packetAddPlayer.yPosition;
+        playerRemote.zo = playerRemote.serverPosZ = packetAddPlayer.zPosition;
+        final int itemId = packetAddPlayer.currentItem;
         if (itemId == 0)
         {
             playerRemote.inventory.mainInventory[playerRemote.inventory.getCurrentItemIndex()] = null;
@@ -346,83 +347,83 @@ public class PacketHandlerClient extends PacketHandler
             playerRemote.inventory.mainInventory[playerRemote.inventory.getCurrentItemIndex()] = new ItemStack(itemId, 1, 0);
         }
         playerRemote.absMoveTo(x, y, z, yRot, xRot);
-        this.worldClientMP.addEntityToWorld(addPlayerPacket.entityId, playerRemote);
-        playerRemote.nickname = StringUtils.substring(addPlayerPacket.nickname, 0, 32);
-        playerRemote.chatColor = addPlayerPacket.chatColor;
-        if (addPlayerPacket.gamemode >= 0 && addPlayerPacket.gamemode < Gamemode.gamemodesList.length) {
-            playerRemote.setGamemode(Gamemode.gamemodesList[addPlayerPacket.gamemode]);
+        this.worldClientMP.addEntityToWorld(packetAddPlayer.entityId, playerRemote);
+        playerRemote.nickname = StringUtils.substring(packetAddPlayer.nickname, 0, 32);
+        playerRemote.chatColor = packetAddPlayer.chatColor;
+        if (packetAddPlayer.gamemode >= 0 && packetAddPlayer.gamemode < Gamemode.gamemodesList.length) {
+            playerRemote.setGamemode(Gamemode.gamemodesList[packetAddPlayer.gamemode]);
         }
 
-        playerRemote.setHeldObject(addPlayerPacket.heldObjectTag == null ? null : ICarriable.createAndLoadCarriable(playerRemote, addPlayerPacket.heldObjectTag));
+        playerRemote.setHeldObject(packetAddPlayer.heldObjectTag == null ? null : ICarriable.createAndLoadCarriable(playerRemote, packetAddPlayer.heldObjectTag));
     }
 
     @Override
-    public void handleEntityTeleport(PacketTeleportEntity teleportEntityPacket)
+    public void handleTeleportEntity(@NotNull PacketTeleportEntity packetTeleportEntity)
     {
-        Entity entity = getEntityByID(teleportEntityPacket.id);
+        Entity entity = getEntityByID(packetTeleportEntity.id);
         if (entity != null) {
-            entity.serverPosX = teleportEntityPacket.x;
-            entity.serverPosY = teleportEntityPacket.y;
-            entity.serverPosZ = teleportEntityPacket.z;
+            entity.serverPosX = packetTeleportEntity.x;
+            entity.serverPosY = packetTeleportEntity.y;
+            entity.serverPosZ = packetTeleportEntity.z;
             double d = (double) entity.serverPosX / 32D;
             double d1 = (double) entity.serverPosY / 32D + 0.015625D;
             double d2 = (double) entity.serverPosZ / 32D;
-            float f = (float) (teleportEntityPacket.yaw * 360) / 256F;
-            float f1 = (float) (teleportEntityPacket.pitch * 360) / 256F;
+            float f = (float) (packetTeleportEntity.yaw * 360) / 256F;
+            float f1 = (float) (packetTeleportEntity.pitch * 360) / 256F;
             entity.lerpTo(d, d1, d2, f, f1, 3);
         }
     }
 
     @Override
-    public void handleEntity(PacketMoveEntity moveEntityPacket)
+    public void handleMoveEntity(@NotNull PacketMoveEntity packetMoveEntity)
     {
-        Entity entity = getEntityByID(moveEntityPacket.id);
+        Entity entity = getEntityByID(packetMoveEntity.id);
         if (entity != null) {
-            entity.serverPosX += moveEntityPacket.x;
-            entity.serverPosY += moveEntityPacket.y;
-            entity.serverPosZ += moveEntityPacket.z;
+            entity.serverPosX += packetMoveEntity.x;
+            entity.serverPosY += packetMoveEntity.y;
+            entity.serverPosZ += packetMoveEntity.z;
             double d = (double) entity.serverPosX / 32D;
             double d1 = (double) entity.serverPosY / 32D;
             double d2 = (double) entity.serverPosZ / 32D;
-            float f = moveEntityPacket.rotating ? (float) (moveEntityPacket.yaw * 360) / 256F : entity.yRot;
-            float f1 = moveEntityPacket.rotating ? (float) (moveEntityPacket.pitch * 360) / 256F : entity.xRot;
+            float f = packetMoveEntity.rotating ? (float) (packetMoveEntity.yaw * 360) / 256F : entity.yRot;
+            float f1 = packetMoveEntity.rotating ? (float) (packetMoveEntity.pitch * 360) / 256F : entity.xRot;
             entity.lerpTo(d, d1, d2, f, f1, 3);
         }
     }
 
     @Override
-    public void handleEntityTagData(PacketEntityTagData entityTagDataPacket) {
-        Entity entity = getEntityByID(entityTagDataPacket.entityId);
+    public void handleEntityTagData(@NotNull PacketEntityTagData packetEntityTagData) {
+        Entity entity = getEntityByID(packetEntityTagData.entityId);
         if (entity != null) {
-            entity.readAdditionalSaveData(entityTagDataPacket.tag);
+            entity.readAdditionalSaveData(packetEntityTagData.tag);
         }
     }
 
     @Override
-    public void handleSetMobSpawner(PacketSetMobSpawner setMobSpawnerPacket) {
-        if (this.mc.currentWorld.isBlockLoaded(setMobSpawnerPacket.tilePos)) {
-            TileEntity tileentity = this.mc.currentWorld.getTileEntity(setMobSpawnerPacket.tilePos);
+    public void handleSetMobSpawner(@NotNull PacketSetMobSpawner packetSetMobSpawner) {
+        if (this.mc.currentWorld.isBlockLoaded(packetSetMobSpawner.tilePos)) {
+            TileEntity tileentity = this.mc.currentWorld.getTileEntity(packetSetMobSpawner.tilePos);
             if (tileentity instanceof TileEntityMobSpawner spawner) {
-                NamespaceID namespaceID = setMobSpawnerPacket.dispatcherEntry != null ? setMobSpawnerPacket.dispatcherEntry.namespaceID : null;
+                NamespaceID namespaceID = packetSetMobSpawner.dispatcherEntry != null ? packetSetMobSpawner.dispatcherEntry.namespaceID : null;
                 spawner.setMobId(namespaceID == null ? "none" : namespaceID.toString());
                 spawner.setChanged();
             }
         }
     }
     @Override
-    public void handleSetHotbarOffset(PacketSetHotbarOffset setHotbarOffsetPacket)
+    public void handleSetHotbarOffset(@NotNull PacketSetHotbarOffset packetSetHotbarOffset)
     {
-        mc.thePlayer.inventory.setHotbarOffset(setHotbarOffsetPacket.hotbarOffset, true);
+        mc.thePlayer.inventory.setHotbarOffset(packetSetHotbarOffset.hotbarOffset, true);
     }
 
     @Override
-    public void handleDestroyEntity(PacketRemoveEntity removeEntityPacket)
+    public void handleRemoveEntity(@NotNull PacketRemoveEntity packetRemoveEntity)
     {
-        worldClientMP.removeEntityFromWorld(removeEntityPacket.entityId);
+        worldClientMP.removeEntityFromWorld(packetRemoveEntity.entityId);
     }
 
     @Override
-    public void handleFlying(PacketMovePlayer movePlayerPacket)
+    public void handleMovePlayer(@NotNull PacketMovePlayer packetMovePlayer)
     {
         PlayerLocal entityplayersp = mc.thePlayer;
         double d = ((Player) (entityplayersp)).x;
@@ -430,24 +431,24 @@ public class PacketHandlerClient extends PacketHandler
         double d2 = ((Player) (entityplayersp)).z;
         float f = ((Player) (entityplayersp)).yRot;
         float f1 = ((Player) (entityplayersp)).xRot;
-        if (movePlayerPacket.hasPosition)
+        if (packetMovePlayer.hasPosition)
         {
-            d = movePlayerPacket.x;
-            d1 = movePlayerPacket.y;
-            d2 = movePlayerPacket.z;
+            d = packetMovePlayer.x;
+            d1 = packetMovePlayer.y;
+            d2 = packetMovePlayer.z;
         }
-        if (movePlayerPacket.hasRotation)
+        if (packetMovePlayer.hasRotation)
         {
-            f = movePlayerPacket.yaw;
-            f1 = movePlayerPacket.pitch;
+            f = packetMovePlayer.yaw;
+            f1 = packetMovePlayer.pitch;
         }
         entityplayersp.ySlideOffset = 0.0F;
         entityplayersp.xd = entityplayersp.yd = entityplayersp.zd = 0.0D;
         entityplayersp.absMoveTo(d, d1, d2, f, f1);
-        movePlayerPacket.x = ((Player) (entityplayersp)).x;
-        movePlayerPacket.y = ((Player) (entityplayersp)).bb.minY;
-        movePlayerPacket.z = ((Player) (entityplayersp)).z;
-        netManager.addToSendQueue(movePlayerPacket);
+        packetMovePlayer.x = ((Player) (entityplayersp)).x;
+        packetMovePlayer.y = ((Player) (entityplayersp)).bb.minY;
+        packetMovePlayer.z = ((Player) (entityplayersp)).z;
+        netManager.addToSendQueue(packetMovePlayer);
         if (!started)
         {
             mc.thePlayer.xo = mc.thePlayer.x;
@@ -459,21 +460,21 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handlePreChunk(PacketChunkVisibility chunkVisibilityPacket)
+    public void handleChunkVisibility(@NotNull PacketChunkVisibility packetChunkVisibility)
     {
-        worldClientMP.doPreChunk(chunkVisibilityPacket.chunkX, chunkVisibilityPacket.chunkZ, chunkVisibilityPacket.playerAdded);
+        worldClientMP.doPreChunk(packetChunkVisibility.chunkX, packetChunkVisibility.chunkZ, packetChunkVisibility.playerAdded);
     }
 
     @Override
-    public void handleMultiBlockChange(PacketChunkBlocksUpdate chunkBlocksUpdatePacket)
+    public void handleChunkBlocksUpdate(@NotNull PacketChunkBlocksUpdate packetChunkBlocksUpdate)
     {
-        int xBase = chunkBlocksUpdatePacket.xChunk * 16;
-        int zBase = chunkBlocksUpdatePacket.zChunk * 16;
-        for (int k = 0; k < chunkBlocksUpdatePacket.size; k++)
+        int xBase = packetChunkBlocksUpdate.xChunk * 16;
+        int zBase = packetChunkBlocksUpdate.zChunk * 16;
+        for (int k = 0; k < packetChunkBlocksUpdate.size; k++)
         {
-            int coord = chunkBlocksUpdatePacket.coordinateArray[k];
-            int type = chunkBlocksUpdatePacket.typeArray[k] & 0x3fff;
-            byte data = chunkBlocksUpdatePacket.metadataArray[k];
+            int coord = packetChunkBlocksUpdate.coordinateArray[k];
+            int type = packetChunkBlocksUpdate.typeArray[k] & 0x3fff;
+            byte data = packetChunkBlocksUpdate.metadataArray[k];
             int x = coord >> 0 & 0xf;
             int y = coord >> 8 & 0xff;
             int z = coord >> 4 & 0xf;
@@ -485,31 +486,31 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleMapChunk(PacketBlockRegionUpdate blockRegionUpdatePacket)
+    public void handleBlockRegionUpdate(@NotNull PacketBlockRegionUpdate packetBlockRegionUpdate)
     {
-        for (int x = blockRegionUpdatePacket.xPosition / 16; x <= blockRegionUpdatePacket.xPosition / 16 + blockRegionUpdatePacket.xSize / 16; x++) {
-            for (int z = blockRegionUpdatePacket.zPosition / 16; z <= blockRegionUpdatePacket.zPosition / 16 + blockRegionUpdatePacket.zSize / 16; z++) {
+        for (int x = packetBlockRegionUpdate.xPosition / 16; x <= packetBlockRegionUpdate.xPosition / 16 + packetBlockRegionUpdate.xSize / 16; x++) {
+            for (int z = packetBlockRegionUpdate.zPosition / 16; z <= packetBlockRegionUpdate.zPosition / 16 + packetBlockRegionUpdate.zSize / 16; z++) {
                 worldClientMP.doPreChunk(x, z, true);
             }
         }
-        worldClientMP.removePositionTypesInBounds(blockRegionUpdatePacket.xPosition, blockRegionUpdatePacket.yPosition, blockRegionUpdatePacket.zPosition, (blockRegionUpdatePacket.xPosition + blockRegionUpdatePacket.xSize) - 1, (blockRegionUpdatePacket.yPosition + blockRegionUpdatePacket.ySize) - 1, (blockRegionUpdatePacket.zPosition + blockRegionUpdatePacket.zSize) - 1);
-        worldClientMP.setChunkData(blockRegionUpdatePacket.xPosition, blockRegionUpdatePacket.yPosition, blockRegionUpdatePacket.zPosition, blockRegionUpdatePacket.xSize, blockRegionUpdatePacket.ySize, blockRegionUpdatePacket.zSize, blockRegionUpdatePacket.chunk);
+        worldClientMP.removePositionTypesInBounds(packetBlockRegionUpdate.xPosition, packetBlockRegionUpdate.yPosition, packetBlockRegionUpdate.zPosition, (packetBlockRegionUpdate.xPosition + packetBlockRegionUpdate.xSize) - 1, (packetBlockRegionUpdate.yPosition + packetBlockRegionUpdate.ySize) - 1, (packetBlockRegionUpdate.zPosition + packetBlockRegionUpdate.zSize) - 1);
+        worldClientMP.setChunkData(packetBlockRegionUpdate.xPosition, packetBlockRegionUpdate.yPosition, packetBlockRegionUpdate.zPosition, packetBlockRegionUpdate.xSize, packetBlockRegionUpdate.ySize, packetBlockRegionUpdate.zSize, packetBlockRegionUpdate.chunk);
     }
 
     @Override
-    public void handleBlockUpdate(PacketBlockUpdate blockUpdatePacket)
+    public void handleBlockUpdate(@NotNull PacketBlockUpdate packetBlockUpdate)
     {
-        worldClientMP.blockChange(blockUpdatePacket.xPosition, blockUpdatePacket.yPosition, blockUpdatePacket.zPosition, blockUpdatePacket.blockId, blockUpdatePacket.metadata);
+        worldClientMP.blockChange(packetBlockUpdate.xPosition, packetBlockUpdate.yPosition, packetBlockUpdate.zPosition, packetBlockUpdate.blockId, packetBlockUpdate.metadata);
     }
 
     @Override
-    public void handleKickDisconnect(PacketDisconnect packet255KickdisconnectPacket)
+    public void handleDisconnect(@NotNull PacketDisconnect packetDisconnect)
     {
         netManager.networkShutdown("disconnect.kicked", new Object[0]);
         disconnected = true;
         mc.changeWorld(null);
         mc.displayScreen(new ScreenConnectFailed("disconnect.disconnected", "disconnect.genericReason", new Object[]{
-            packet255KickdisconnectPacket.reason
+            packetDisconnect.reason
         }));
     }
 
@@ -549,10 +550,10 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleCollect(PacketTakeItemEntity takeItemEntityPacket)
+    public void handleTakeItemEntity(@NotNull PacketTakeItemEntity packetTakeItemEntity)
     {
-        Entity item = getEntityByID(takeItemEntityPacket.collectedEntityId);
-        Entity collector = getEntityByID(takeItemEntityPacket.collectorEntityId);
+        Entity item = getEntityByID(packetTakeItemEntity.collectedEntityId);
+        Entity collector = getEntityByID(packetTakeItemEntity.collectorEntityId);
         if (collector == null)
         {
             collector = mc.thePlayer;
@@ -563,12 +564,12 @@ public class PacketHandlerClient extends PacketHandler
             // something about that isn't working on servers if the player changed their gamemode.
             worldClientMP.playSoundAtEntity(null, item, "item.pickup", 1F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 4.0F);
             mc.particleEngine.add(new ParticlePickupAnimation(mc.currentWorld, item, collector, -0.5F));
-            worldClientMP.removeEntityFromWorld(takeItemEntityPacket.collectedEntityId);
+            worldClientMP.removeEntityFromWorld(packetTakeItemEntity.collectedEntityId);
         }
     }
 
 	@Override
-	public void handleChat(PacketChat packet) {
+	public void handleChat(@NotNull PacketChat packet) {
 		String message;
 		if(packet.encrypted) {
 			try {
@@ -599,28 +600,28 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleAnimation(PacketAnimate animatePacket)
+    public void handleAnimation(@NotNull PacketAnimate packetAnimate)
     {
-        Entity entity = getEntityByID(animatePacket.entityId);
+        Entity entity = getEntityByID(packetAnimate.entityId);
         if (entity == null)
         {
             return;
         }
-        if (animatePacket.animate == 1)
+        if (packetAnimate.animate == 1)
         {
             Player entityplayer = (Player) entity;
             entityplayer.swingItem();
         }
-        else if (animatePacket.animate == 2)
+        else if (packetAnimate.animate == 2)
         {
             entity.animateHurt();
         }
-        else if (animatePacket.animate == 3)
+        else if (packetAnimate.animate == 3)
         {
             Player player = (Player) entity;
             player.wakeUpPlayer(false, false);
         }
-        else if (animatePacket.animate == 4)
+        else if (packetAnimate.animate == 4)
         {
             Player player = (Player) entity;
             player.animate4();
@@ -628,33 +629,33 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleBoatControl(PacketBoatControl boatControlPacket)
+    public void handleBoatControl(@NotNull PacketBoatControl packetBoatControl)
     {
-        Entity e = worldClientMP.getEntityFromId(boatControlPacket.entityId);
+        Entity e = worldClientMP.getEntityFromId(packetBoatControl.entityId);
         if (e instanceof EntityBoat) {
-            ((EntityBoat)e).handleControlDirect(boatControlPacket.targetXD, boatControlPacket.targetZD, boatControlPacket.targetYRot);
+            ((EntityBoat)e).handleControlDirect(packetBoatControl.targetXD, packetBoatControl.targetZD, packetBoatControl.targetYRot);
         }
     }
 
     @Override
-    public void handleSleep(PacketSleep sleepPacket)
+    public void handleSleep(@NotNull PacketSleep packetSleep)
     {
-        Entity entity = getEntityByID(sleepPacket.entityID);
+        Entity entity = getEntityByID(packetSleep.entityID);
         if (entity == null)
         {
             return;
         }
-        if (sleepPacket.field_22046_e == 0)
+        if (packetSleep.field_22046_e == 0)
         {
             Player entityplayer = (Player) entity;
-            entityplayer.sleepInBedAt(sleepPacket.x, sleepPacket.y, sleepPacket.z);
+            entityplayer.sleepInBedAt(packetSleep.x, packetSleep.y, packetSleep.z);
         }
     }
 
     @Override
-    public void handleHandshake(PacketPreLogin preLoginPacket)
+    public void handleHandshake(@NotNull PacketHandshake packetHandshake)
     {
-        if (preLoginPacket.username.equals("-"))
+        if (packetHandshake.username.equals("-"))
         {
             try
             {
@@ -670,7 +671,7 @@ public class PacketHandlerClient extends PacketHandler
         {
             try
             {
-                URL url = new URL("http://session.minecraft.net/game/joinserver.jsp?user=" + mc.session.username + "&sessionId=" + mc.session.sessionId + "&serverId=" + preLoginPacket.username);
+                URL url = new URL("http://session.minecraft.net/game/joinserver.jsp?user=" + mc.session.username + "&sessionId=" + mc.session.sessionId + "&serverId=" + packetHandshake.username);
                 BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
                 String s = bufferedreader.readLine();
                 bufferedreader.close();
@@ -704,11 +705,11 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleSendKey(PacketAESSendKey AESSendKeyPacket)
+    public void handleAESSendKey(@NotNull PacketAESSendKey packetAESSendKey)
     {
         try
         {
-            AES.clientKeyChain = AES.getKey(RSA.decrypt(AESSendKeyPacket.KEY, RSA.RSAKeyChain.getPrivate()));
+            AES.clientKeyChain = AES.getKey(RSA.decrypt(packetAESSendKey.KEY, RSA.RSAKeyChain.getPrivate()));
         }
         catch (Exception e)
         {
@@ -717,11 +718,11 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handlePlayerList(PacketPlayerList playerListPacket)
+    public void handlePlayerList(@NotNull PacketPlayerList packetPlayerList)
     {
         playerList.clear();
-        String[] players = playerListPacket.players;
-        String[] scores = playerListPacket.scores;
+        String[] players = packetPlayerList.players;
+        String[] scores = packetPlayerList.scores;
         for (int i = 0; i < players.length; i++)
         {
             playerList.put(players[i], scores[i]);
@@ -736,56 +737,56 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleMobSpawn(PacketAddMob addMobPacket)
+    public void handleAddMob(@NotNull PacketAddMob packetAddMob)
     {
-        double d = (double) addMobPacket.x / 32D;
-        double d1 = (double) addMobPacket.y / 32D;
-        double d2 = (double) addMobPacket.z / 32D;
-        float f = (float) (addMobPacket.yaw * 360) / 256F;
-        float f1 = (float) (addMobPacket.pitch * 360) / 256F;
-        Mob mob = (Mob) EntityDispatcher.getInstance().createEntity(addMobPacket.type, mc.currentWorld);
-        mob.serverPosX = addMobPacket.x;
-        mob.serverPosY = addMobPacket.y;
-        mob.serverPosZ = addMobPacket.z;
-        mob.id = addMobPacket.id;
+        double d = (double) packetAddMob.x / 32D;
+        double d1 = (double) packetAddMob.y / 32D;
+        double d2 = (double) packetAddMob.z / 32D;
+        float f = (float) (packetAddMob.yaw * 360) / 256F;
+        float f1 = (float) (packetAddMob.pitch * 360) / 256F;
+        Mob mob = (Mob) EntityDispatcher.getInstance().createEntity(packetAddMob.type, mc.currentWorld);
+        mob.serverPosX = packetAddMob.x;
+        mob.serverPosY = packetAddMob.y;
+        mob.serverPosZ = packetAddMob.z;
+        mob.id = packetAddMob.id;
         mob.absMoveTo(d, d1, d2, f, f1);
         mob.isMultiplayerEntity = true;
-        worldClientMP.addEntityToWorld(addMobPacket.id, mob);
-        List<SynchedEntityData.DataItem<?>> list = addMobPacket.getUnpackedData();
+        worldClientMP.addEntityToWorld(packetAddMob.id, mob);
+        List<SynchedEntityData.DataItem<?>> list = packetAddMob.getUnpackedData();
         if (list != null)
         {
             mob.getEntityData().assignValues(list);
         }
-        mob.nickname = StringUtils.substring(addMobPacket.nickname, 0, 32);
-        mob.chatColor = addMobPacket.chatColor;
+        mob.nickname = StringUtils.substring(packetAddMob.nickname, 0, 32);
+        mob.chatColor = packetAddMob.chatColor;
     }
 
     @Override
-    public void handleUpdateTime(PacketSetTime setTimePacket)
+    public void handleSetTime(@NotNull PacketSetTime packetSetTime)
     {
-        mc.currentWorld.setWorldTime(setTimePacket.time);
+        mc.currentWorld.setWorldTime(packetSetTime.time);
     }
 
     @Override
-    public void handleSpawnPosition(PacketSetSpawnPosition setSpawnPositionPacket)
+    public void handleSetSpawnPosition(@NotNull PacketSetSpawnPosition packetSetSpawnPosition)
     {
-        mc.thePlayer.setPlayerSpawnPoint(new TilePos(setSpawnPositionPacket.x, setSpawnPositionPacket.y, setSpawnPositionPacket.z));
-        mc.currentWorld.getLevelData().setSpawn(setSpawnPositionPacket.x, setSpawnPositionPacket.y, setSpawnPositionPacket.z);
+        mc.thePlayer.setPlayerSpawnPoint(new TilePos(packetSetSpawnPosition.x, packetSetSpawnPosition.y, packetSetSpawnPosition.z));
+        mc.currentWorld.getLevelData().setSpawn(packetSetSpawnPosition.x, packetSetSpawnPosition.y, packetSetSpawnPosition.z);
     }
 
     @Override
-    public void handleAttachEntity(PacketSetRiding setRidingPacket)
+    public void handleSetRiding(@NotNull PacketSetRiding packetSetRiding)
     {
-        Entity passenger = getEntityByID(setRidingPacket.passengerId);
+        Entity passenger = getEntityByID(packetSetRiding.passengerId);
         IVehicle vehicle;
-        if (setRidingPacket.passengerId == mc.thePlayer.id)
+        if (packetSetRiding.passengerId == mc.thePlayer.id)
         {
             passenger = mc.thePlayer;
         }
-        if (setRidingPacket.isTileEntity) {
-            vehicle = (IVehicle) worldClientMP.getTileEntity(setRidingPacket.x, setRidingPacket.y, setRidingPacket.z);
+        if (packetSetRiding.isTileEntity) {
+            vehicle = (IVehicle) worldClientMP.getTileEntity(packetSetRiding.x, packetSetRiding.y, packetSetRiding.z);
         } else {
-            vehicle = getEntityByID(setRidingPacket.vehicleId);
+            vehicle = getEntityByID(packetSetRiding.vehicleId);
         }
         if (passenger != null && vehicle != null) {
             passenger.startRiding(vehicle);
@@ -793,12 +794,12 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleEntityStatus(PacketEntityEvent enitityEventPacket)
+    public void handleEntityEvent(@NotNull PacketEntityEvent packetEntityEvent)
     {
-        Entity entity = getEntityByID(enitityEventPacket.entityId);
+        Entity entity = getEntityByID(packetEntityEvent.entityId);
         if (entity != null)
         {
-            entity.handleEntityEvent(enitityEventPacket.entityStatus, enitityEventPacket.attackedAtYaw);
+            entity.handleEntityEvent(packetEntityEvent.entityStatus, packetEntityEvent.attackedAtYaw);
         }
     }
 
@@ -815,13 +816,13 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleUpdateHealth(PacketSetHealth setHealthPacket)
+    public void handleSetHealth(@NotNull PacketSetHealth packetSetHealth)
     {
-        mc.thePlayer.setHealth(setHealthPacket.healthMP);
+        mc.thePlayer.setHealth(packetSetHealth.healthMP);
     }
 
     @Override
-    public void handleUpdatePlayerProfile(PacketUpdatePlayerProfile profilePacket)
+    public void handleUpdatePlayerProfile(@NotNull PacketUpdatePlayerProfile profilePacket)
     {
         PlayerProfile playerProfile = new PlayerProfile(profilePacket.username, profilePacket.nickname, profilePacket.uuid, profilePacket.score, profilePacket.chatColor, profilePacket.isOperator);
         if (playerProfile.uuid.equals(mc.thePlayer.uuid))
@@ -847,75 +848,75 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleRespawn(PacketRespawn respawnPacket)
+    public void handleRespawn(@NotNull PacketRespawn packetRespawn)
     {
-        if (respawnPacket.respawnDimensionId != mc.thePlayer.dimension)
+        if (packetRespawn.respawnDimensionId != mc.thePlayer.dimension)
         {
             started = false;
-            worldClientMP = new WorldClientMP(this, worldClientMP.getLevelData().getRandomSeed(), respawnPacket.respawnDimensionId, respawnPacket.respawnWorldTypeId);
+            worldClientMP = new WorldClientMP(this, worldClientMP.getLevelData().getRandomSeed(), packetRespawn.respawnDimensionId, packetRespawn.respawnWorldTypeId);
             worldClientMP.isClientSide = true;
             mc.changeWorld(worldClientMP);
-            mc.thePlayer.dimension = respawnPacket.respawnDimensionId;
+            mc.thePlayer.dimension = packetRespawn.respawnDimensionId;
             mc.displayScreen(new ScreenDownloadTerrain(this));
         }
-        mc.respawn(true, respawnPacket.respawnDimensionId);
+        mc.respawn(true, packetRespawn.respawnDimensionId);
     }
 
     @Override
-    public void handleExplosion(PacketExplosion explosionPacket)
+    public void handleExplosion(@NotNull PacketExplosion packetExplosion)
     {
         Explosion explosion;
-        if (explosionPacket.isCannonball)
+        if (packetExplosion.isCannonball)
         {
-            explosion = new ExplosionCannonball(mc.currentWorld, null, explosionPacket.explosionX, explosionPacket.explosionY, explosionPacket.explosionZ, explosionPacket.explosionSize);
+            explosion = new ExplosionCannonball(mc.currentWorld, null, packetExplosion.explosionX, packetExplosion.explosionY, packetExplosion.explosionZ, packetExplosion.explosionSize);
         }
         else
         {
-            explosion = new Explosion(mc.currentWorld, null, explosionPacket.explosionX, explosionPacket.explosionY, explosionPacket.explosionZ, explosionPacket.explosionSize);
+            explosion = new Explosion(mc.currentWorld, null, packetExplosion.explosionX, packetExplosion.explosionY, packetExplosion.explosionZ, packetExplosion.explosionSize);
         }
-        explosion.destroyedBlockPositions = explosionPacket.destroyedBlockPositions;
+        explosion.destroyedBlockPositions = packetExplosion.destroyedBlockPositions;
         //explosion.doExplosionA();
         explosion.addEffects(true);
     }
 
     @Override
-    public void handleOpenWindow(PacketContainerOpen containerOpenPacket)
+    public void handleContainerOpen(@NotNull PacketContainerOpen packetContainerOpen)
     {
-        switch (containerOpenPacket.inventoryType) {
+        switch (packetContainerOpen.inventoryType) {
             case PacketContainerOpen.TYPE_GENERIC_CONTAINER: {
-                ContainerSimple simpleContainer = new ContainerSimple(containerOpenPacket.windowTitle, containerOpenPacket.slotsCount);
+                ContainerSimple simpleContainer = new ContainerSimple(packetContainerOpen.windowTitle, packetContainerOpen.slotsCount);
                 mc.thePlayer.displayContainerScreen(simpleContainer);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_FURNACE: {
                 TileEntityFurnace tileEntityFurnace = new TileEntityFurnace();
                 mc.thePlayer.displayFurnaceScreen(tileEntityFurnace);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_DISPENSER: {
                 TileEntityDispenser tileEntityDispenser = new TileEntityDispenser();
                 mc.thePlayer.displayDispenserScreen(tileEntityDispenser);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_ACTIVATOR: {
                 TileEntityActivator tileEntityActivator = new TileEntityActivator();
                 mc.thePlayer.displayActivatorScreen(tileEntityActivator);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_BLAST_FURNACE: {
                 TileEntityFurnaceBlast tileEntityFurnaceBlast = new TileEntityFurnaceBlast();
                 mc.thePlayer.displayBlastFurnaceScreen(tileEntityFurnaceBlast);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_TROMMEL: {
                 TileEntityTrommel tileEntityTrommel = new TileEntityTrommel();
                 mc.thePlayer.displayTrommelScreen(tileEntityTrommel);
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             case PacketContainerOpen.TYPE_PAINTING: {
@@ -925,138 +926,138 @@ public class PacketHandlerClient extends PacketHandler
             case PacketContainerOpen.TYPE_CRAFTING: {
                 PlayerLocal playerLocal = mc.thePlayer;
                 mc.thePlayer.displayWorkbenchScreen(new TilePos(playerLocal.x, playerLocal.y, playerLocal.z));
-                mc.thePlayer.craftingInventory.containerId = containerOpenPacket.windowId;
+                mc.thePlayer.craftingInventory.containerId = packetContainerOpen.windowId;
                 break;
             }
             default: {
-                LOGGER.warn("No defined before for container open '{}' with type {}!", containerOpenPacket.windowId, containerOpenPacket.inventoryType);
+                LOGGER.warn("No defined before for container open '{}' with type {}!", packetContainerOpen.windowId, packetContainerOpen.inventoryType);
             }
         }
     }
 
     @Override
-    public void handleOpenFlagWindow(PacketFlagOpen flagOpenPacket)
+    public void handleFlagOpen(@NotNull PacketFlagOpen packetFlagOpen)
     {
-        TileEntity tileEntity = worldClientMP.getTileEntity(flagOpenPacket.x, flagOpenPacket.y, flagOpenPacket.z);
+        TileEntity tileEntity = worldClientMP.getTileEntity(packetFlagOpen.x, packetFlagOpen.y, packetFlagOpen.z);
         if (tileEntity instanceof TileEntityFlag)
         {
             TileEntityFlag tileEntityFlag = (TileEntityFlag) tileEntity;
             mc.thePlayer.displayFlagEditorScreen(tileEntityFlag);
-            mc.thePlayer.craftingInventory.containerId = flagOpenPacket.windowId;
+            mc.thePlayer.craftingInventory.containerId = packetFlagOpen.windowId;
         }
     }
 
     @Override
-    public void handlePhotoMode(PacketPhotoMode photoModePacket)
+    public void handlePhotoMode(@NotNull PacketPhotoMode packetPhotoMode)
     {
-        ScreenPause.photoModeDisabled = photoModePacket.disabled;
+        ScreenPause.photoModeDisabled = packetPhotoMode.disabled;
     }
 
     @Override
-    public void handleSetSlot(PacketContainerSetSlot containerSetslotPacket)
+    public void handleContainerSetSlot(@NotNull PacketContainerSetSlot packetContainerSetSlot)
     {
-        if (containerSetslotPacket.windowId == -1)
+        if (packetContainerSetSlot.windowId == -1)
         {
-            mc.thePlayer.inventory.setHeldItemStack(containerSetslotPacket.myItemStack);
+            mc.thePlayer.inventory.setHeldItemStack(packetContainerSetSlot.myItemStack);
         }
-        else if (containerSetslotPacket.windowId == 0 && containerSetslotPacket.itemSlot >= 36 && containerSetslotPacket.itemSlot < 45)
+        else if (packetContainerSetSlot.windowId == 0 && packetContainerSetSlot.itemSlot >= 36 && packetContainerSetSlot.itemSlot < 45)
         {
-            ItemStack itemstack = mc.thePlayer.inventorySlots.getSlot(containerSetslotPacket.itemSlot).getItemStack();
-            if (containerSetslotPacket.myItemStack != null && (itemstack == null || itemstack.stackSize < containerSetslotPacket.myItemStack.stackSize))
+            ItemStack itemstack = mc.thePlayer.inventorySlots.getSlot(packetContainerSetSlot.itemSlot).getItemStack();
+            if (packetContainerSetSlot.myItemStack != null && (itemstack == null || itemstack.stackSize < packetContainerSetSlot.myItemStack.stackSize))
             {
-                containerSetslotPacket.myItemStack.animationsToGo = 5;
+                packetContainerSetSlot.myItemStack.animationsToGo = 5;
             }
-            mc.thePlayer.inventorySlots.setItem(containerSetslotPacket.itemSlot, containerSetslotPacket.myItemStack);
+            mc.thePlayer.inventorySlots.setItem(packetContainerSetSlot.itemSlot, packetContainerSetSlot.myItemStack);
         }
-        else if (containerSetslotPacket.windowId == mc.thePlayer.craftingInventory.containerId)
+        else if (packetContainerSetSlot.windowId == mc.thePlayer.craftingInventory.containerId)
         {
-            mc.thePlayer.craftingInventory.setItem(containerSetslotPacket.itemSlot, containerSetslotPacket.myItemStack);
+            mc.thePlayer.craftingInventory.setItem(packetContainerSetSlot.itemSlot, packetContainerSetSlot.myItemStack);
         }
     }
 
     @Override
-    public void handleTransaction(PacketContainerAck containerAckPacket)
+    public void handleContainerAck(@NotNull PacketContainerAck packetContainerAck)
     {
         MenuAbstract container = null;
-        if (containerAckPacket.windowId == 0)
+        if (packetContainerAck.windowId == 0)
         {
             container = mc.thePlayer.inventorySlots;
         }
-        else if (containerAckPacket.windowId == mc.thePlayer.craftingInventory.containerId)
+        else if (packetContainerAck.windowId == mc.thePlayer.craftingInventory.containerId)
         {
             container = mc.thePlayer.craftingInventory;
         }
         if (container != null)
         {
-            if (containerAckPacket.accepted)
+            if (packetContainerAck.accepted)
             {
-                container.deleteBackup(containerAckPacket.shortWindowId);
+                container.deleteBackup(packetContainerAck.shortWindowId);
             }
             else
             {
-                container.rollbackToBackup(containerAckPacket.shortWindowId);
-                addToSendQueue(new PacketContainerAck(containerAckPacket.windowId, containerAckPacket.shortWindowId, true));
+                container.rollbackToBackup(packetContainerAck.shortWindowId);
+                addToSendQueue(new PacketContainerAck(packetContainerAck.windowId, packetContainerAck.shortWindowId, true));
             }
         }
     }
 
     @Override
-    public void handleWindowItems(PacketContainerSetContent containerSetContentPacket)
+    public void handleContainerSetContent(@NotNull PacketContainerSetContent packetContainerSetContent)
     {
-        if (containerSetContentPacket.windowId == 0)
+        if (packetContainerSetContent.windowId == 0)
         {
-            mc.thePlayer.inventorySlots.setAll(containerSetContentPacket.stackList);
+            mc.thePlayer.inventorySlots.setAll(packetContainerSetContent.stackList);
         }
-        else if (containerSetContentPacket.windowId == mc.thePlayer.craftingInventory.containerId)
+        else if (packetContainerSetContent.windowId == mc.thePlayer.craftingInventory.containerId)
         {
-            mc.thePlayer.craftingInventory.setAll(containerSetContentPacket.stackList);
+            mc.thePlayer.craftingInventory.setAll(packetContainerSetContent.stackList);
         }
     }
 
     @Override
-    public void handleUpdateProgressbar(PacketContainerSetData containerSetDataPacket)
+    public void handleContainerSetData(@NotNull PacketContainerSetData packetContainerSetData)
     {
-        handleInvalidPacket(containerSetDataPacket);
-        if (mc.thePlayer.craftingInventory != null && mc.thePlayer.craftingInventory.containerId == containerSetDataPacket.windowId)
+        handleInvalidPacket(packetContainerSetData);
+        if (mc.thePlayer.craftingInventory != null && mc.thePlayer.craftingInventory.containerId == packetContainerSetData.windowId)
         {
-            mc.thePlayer.craftingInventory.setData(containerSetDataPacket.progressBar, containerSetDataPacket.progressBarValue);
+            mc.thePlayer.craftingInventory.setData(packetContainerSetData.progressBar, packetContainerSetData.progressBarValue);
         }
     }
 
     @Override
-    public void handlePlayerInventory(PacketSetEquippedItem setEquippedItemPacket)
+    public void handleSetEquippedItem(@NotNull PacketSetEquippedItem packetSetEquippedItem)
     {
-        Entity entity = getEntityByID(setEquippedItemPacket.entityID);
+        Entity entity = getEntityByID(packetSetEquippedItem.entityID);
         if (entity != null)
         {
-            entity.setEquippedSlot(setEquippedItemPacket.slot, setEquippedItemPacket.itemID, setEquippedItemPacket.itemMeta, setEquippedItemPacket.itemData);
+            entity.setEquippedSlot(packetSetEquippedItem.slot, packetSetEquippedItem.itemID, packetSetEquippedItem.itemMeta, packetSetEquippedItem.itemData);
         }
     }
 
     @Override
-    public void handlePlayerHeldObject(PacketSetHeldObject setHeldObjectPacket) {
-        Entity entity = getEntityByID(setHeldObjectPacket.entityID);
+    public void handleSetHeldObject(@NotNull PacketSetHeldObject packetSetHeldObject) {
+        Entity entity = getEntityByID(packetSetHeldObject.entityID);
         if (entity != null) {
-            entity.setHeldObject(setHeldObjectPacket.objectTag == null ? null : ICarriable.createAndLoadCarriable(entity, setHeldObjectPacket.objectTag));
+            entity.setHeldObject(packetSetHeldObject.objectTag == null ? null : ICarriable.createAndLoadCarriable(entity, packetSetHeldObject.objectTag));
         }
     }
 
     @Override
-    public void handleCloseWindow(PacketContainerClose containerClosePacket)
+    public void handleContainerClose(@NotNull PacketContainerClose packetContainerClose)
     {
         mc.thePlayer.closeScreen();
     }
 
     @Override
-    public void handleBlockEvent(PacketBlockEvent blockEventPacket)
+    public void handleBlockEvent(@NotNull PacketBlockEvent packetBlockEvent)
     {
-        mc.currentWorld.triggerEvent(blockEventPacket.xLocation, blockEventPacket.yLocation, blockEventPacket.zLocation, blockEventPacket.index, blockEventPacket.data);
+        mc.currentWorld.triggerEvent(packetBlockEvent.xLocation, packetBlockEvent.yLocation, packetBlockEvent.zLocation, packetBlockEvent.index, packetBlockEvent.data);
     }
 
     @Override
-    public void handleBed(PacketBedMessage bedMessagePacket)
+    public void handleBedMessage(@NotNull PacketBedMessage packetBedMessage)
     {
-        int state = bedMessagePacket.bedState;
+        int state = packetBedMessage.bedState;
         if (state >= 0 && state < PacketBedMessage.BED_MESSAGE_KEYS.length && PacketBedMessage.BED_MESSAGE_KEYS[state] != null)
         {
             mc.thePlayer.sendTranslatedChatMessage(PacketBedMessage.BED_MESSAGE_KEYS[state]);
@@ -1064,26 +1065,26 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleMapData(PacketMapData mapdataPacket)
+    public void handleMapData(@NotNull PacketMapData packetMapData)
     {
-        if (mapdataPacket.itemId == Items.MAP.id)
+        if (packetMapData.itemId == Items.MAP.id)
         {
-            ItemMap.getOrCreateSavedData(mapdataPacket.meta, mapdataPacket.scale, mc.currentWorld).setColors(mapdataPacket.mapData).setMapWaypoints(mapdataPacket.waypoints);
+            ItemMap.getOrCreateSavedData(packetMapData.meta, packetMapData.scale, mc.currentWorld).setColors(packetMapData.mapData).setMapWaypoints(packetMapData.waypoints);
         }
         else
         {
-            LOGGER.warn("Unexpected itemId: {}", mapdataPacket.itemId);
+            LOGGER.warn("Unexpected itemId: {}", packetMapData.itemId);
         }
     }
 
     @Override
-    public void handlePlaySoundEffect(PacketPlaySoundEffect playSoundEffectPacket)
+    public void handlePlaySoundEffect(@NotNull PacketPlaySound packetPlaySound)
     {
-        mc.currentWorld.playBlockEvent(playSoundEffectPacket.soundID, playSoundEffectPacket.x, playSoundEffectPacket.y, playSoundEffectPacket.z, playSoundEffectPacket.data);
+        mc.currentWorld.playBlockEvent(packetPlaySound.soundID, packetPlaySound.x, packetPlaySound.y, packetPlaySound.z, packetPlaySound.data);
     }
 
 	@Override
-	public void handlePlaySoundDirectly(PacketPlaySoundEffectDirect packet) {
+	public void handlePlaySoundDirectly(@NotNull PacketPlaySoundDirect packet) {
 		String soundPath = SoundTypes.getSoundById(packet.soundId);
 		if(soundPath == null) {
 			return;
@@ -1092,42 +1093,42 @@ public class PacketHandlerClient extends PacketHandler
 	}
     
     @Override
-    public void handleSpawnParticle(PacketAddParticle addParticlePacket)
-    {
-        if (addParticlePacket.isGroup){
-            for (int i = 0; i < addParticlePacket.amount; i++) {
-                mc.renderGlobal.addParticle(addParticlePacket.particleKey,
-                        addParticlePacket.x + rand.nextDouble() * addParticlePacket.randOffX,
-                        addParticlePacket.y + rand.nextDouble() * addParticlePacket.randOffY,
-                        addParticlePacket.z + rand.nextDouble() * addParticlePacket.randOffZ,
-                        addParticlePacket.motionX + rand.nextGaussian() * addParticlePacket.randMotionX,
-                        addParticlePacket.motionY + rand.nextGaussian() * addParticlePacket.randMotionY,
-                        addParticlePacket.motionZ + rand.nextGaussian() * addParticlePacket.randMotionZ,
-                        addParticlePacket.data,
-                        addParticlePacket.maxDistance);
+    public void handleAddParticle(@NotNull PacketAddParticle packetAddParticle)
+    {
+        if (packetAddParticle.isGroup){
+            for (int i = 0; i < packetAddParticle.amount; i++) {
+                mc.renderGlobal.addParticle(packetAddParticle.particleKey,
+                        packetAddParticle.x + rand.nextDouble() * packetAddParticle.randOffX,
+                        packetAddParticle.y + rand.nextDouble() * packetAddParticle.randOffY,
+                        packetAddParticle.z + rand.nextDouble() * packetAddParticle.randOffZ,
+                        packetAddParticle.motionX + rand.nextGaussian() * packetAddParticle.randMotionX,
+                        packetAddParticle.motionY + rand.nextGaussian() * packetAddParticle.randMotionY,
+                        packetAddParticle.motionZ + rand.nextGaussian() * packetAddParticle.randMotionZ,
+                        packetAddParticle.data,
+                        packetAddParticle.maxDistance);
             }
         } else {
-            mc.renderGlobal.addParticle(addParticlePacket.particleKey,
-                    addParticlePacket.x,
-                    addParticlePacket.y,
-                    addParticlePacket.z,
-                    addParticlePacket.motionX,
-                    addParticlePacket.motionY,
-                    addParticlePacket.motionZ,
-                    addParticlePacket.data,
-                    addParticlePacket.maxDistance);
+            mc.renderGlobal.addParticle(packetAddParticle.particleKey,
+                    packetAddParticle.x,
+                    packetAddParticle.y,
+                    packetAddParticle.z,
+                    packetAddParticle.motionX,
+                    packetAddParticle.motionY,
+                    packetAddParticle.motionZ,
+                    packetAddParticle.data,
+                    packetAddParticle.maxDistance);
         }
 
     }
 
     @Override
-    public void handleStatistic(final PacketStatistic statisticPacket)
+    public void handleStatistic(final @NotNull PacketStatistic packetStatistic)
     {
         NamespaceID id;
         try {
-            id = NamespaceID.fromPool(statisticPacket.statID);
+            id = NamespaceID.fromPool(packetStatistic.statID);
         } catch (HardIllegalArgumentException e) {
-            LOGGER.error("Received invalid stat id '{}' from server!", statisticPacket.statID);
+            LOGGER.error("Received invalid stat id '{}' from server!", packetStatistic.statID);
             return;
         }
         final Stat stat = StatList.getStat(id);
@@ -1136,11 +1137,11 @@ public class PacketHandlerClient extends PacketHandler
             return;
         }
         if (stat.clientside) return; // Don't allow server to give client side only stats
-        mc.thePlayer.addStat(stat, statisticPacket.valueChange);
+        mc.thePlayer.addStat(stat, packetStatistic.valueChange);
     }
 
     @Override
-    public void handleEntityPlayerGamemode(PacketPlayerGamemode packet)
+    public void handlePlayerGamemode(@NotNull PacketPlayerGamemode packet)
     {
         Entity entity = getEntityByID(packet.entityId);
         if (entity instanceof Player){
@@ -1149,13 +1150,13 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleEntityNickname(PacketEntityNickname entityNicknamePacket)
+    public void handleEntityNickname(@NotNull PacketEntityNickname packetEntityNickname)
     {
-        Entity entity = getEntityByID(entityNicknamePacket.entityId);
+        Entity entity = getEntityByID(packetEntityNickname.entityId);
 
         if (entity instanceof Mob) {
-            ((Mob) entity).nickname = StringUtils.substring(entityNicknamePacket.nickname, 0, 32);
-            ((Mob) entity).chatColor = entityNicknamePacket.chatColor;
+            ((Mob) entity).nickname = StringUtils.substring(packetEntityNickname.nickname, 0, 32);
+            ((Mob) entity).chatColor = packetEntityNickname.chatColor;
         }
     }
 
@@ -1166,12 +1167,12 @@ public class PacketHandlerClient extends PacketHandler
     }
     
     @Override
-    public void handleBlockItemSwitch(PacketSetCarriedItem setCarriedItemPacket) {
-        mc.thePlayer.inventory.setCurrentItemIndex(setCarriedItemPacket.id, true);
+    public void handleSetCarriedItem(@NotNull PacketSetCarriedItem packetSetCarriedItem) {
+        mc.thePlayer.inventory.setCurrentItemIndex(packetSetCarriedItem.id, true);
     }
 
     @Override
-    public void handleTileEntityData(PacketTileEntityData packetTileEntityData)
+    public void handleTileEntityData(@NotNull PacketTileEntityData packetTileEntityData)
     {
         Class<?> clazz = TileEntityDispatcher.getClassFromID(packetTileEntityData.tag.getString("id"));
         if (clazz == null) return;
@@ -1192,7 +1193,7 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleGameRule(PacketGameRule packet) {
+    public void handleGameRule(@NotNull PacketGameRule packet) {
         LevelData levelData = mc.currentWorld.getLevelData();
         if (packet.getGameRules() != null) {
             levelData.getGameRules().setValues(packet.getGameRules());
@@ -1200,12 +1201,12 @@ public class PacketHandlerClient extends PacketHandler
     }
 
     @Override
-    public void handleSyncedRecipe(PacketRecipeSync recipeSyncPacket) {
+    public void handleRecipeSync(@NotNull PacketRecipeSync packetRecipeSync) {
         if(Registries.RECIPES.getAllSerializableRecipes().isEmpty()){
-            LOGGER.info("Receiving {} recipes from server..", recipeSyncPacket.maxRecipes);
+            LOGGER.info("Receiving {} recipes from server..", packetRecipeSync.maxRecipes);
         }
-        DataLoader.loadRecipeFromServer(recipeSyncPacket);
-        if(Registries.RECIPES.getAllSerializableRecipes().size() == recipeSyncPacket.maxRecipes){
+        DataLoader.loadRecipeFromServer(packetRecipeSync);
+        if(Registries.RECIPES.getAllSerializableRecipes().size() == packetRecipeSync.maxRecipes){
             LOGGER.info("All recipes received!");
             Registries.RECIPES.invalidateCaches();
             GuidebookPageSearch.searchField.setText("_");
@@ -1218,26 +1219,26 @@ public class PacketHandlerClient extends PacketHandler
     }
     
     @Override
-    public void handleIds(PacketSyncIDs syncIDsPacket) {
-        if (syncIDsPacket.destinationId == PacketSyncIDs.DESTINATION_SOUND_IDS) {
-            SoundTypes.setSoundIds(syncIDsPacket.mapping);
-        } else if (syncIDsPacket.destinationId == PacketSyncIDs.DESTINATION_ENTITY_IDS) {
-            EntityDispatcher.getInstance().setNumericIds(syncIDsPacket.mapping);
+    public void handleSyncIDs(@NotNull PacketSyncIDs packetSyncIDs) {
+        if (packetSyncIDs.destinationId == PacketSyncIDs.DESTINATION_SOUND_IDS) {
+            SoundTypes.setSoundIds(packetSyncIDs.mapping);
+        } else if (packetSyncIDs.destinationId == PacketSyncIDs.DESTINATION_ENTITY_IDS) {
+            EntityDispatcher.getInstance().setNumericIds(packetSyncIDs.mapping);
         }
     }
     
     @Override
-    public void handleCustomPayload(PacketCustomPayload customPayloadPacket) {
-        if(PacketCustomPayload.CHANNEL_RAINBOW_START.equals(customPayloadPacket.channel)) {
+    public void handleCustomPayload(@NotNull PacketCustomPayload packetCustomPayload) {
+        if(PacketCustomPayload.CHANNEL_RAINBOW_START.equals(packetCustomPayload.channel)) {
 //            System.out.printf("b0:%s b1:%s b2:%s b3:%s\n", packet.data[0], packet.data[1], packet.data[2], packet.data[3]);
-            int rainbowTicks = Byte.toUnsignedInt(customPayloadPacket.data[0]) << 24 | Byte.toUnsignedInt(customPayloadPacket.data[1]) << 16 | Byte.toUnsignedInt(customPayloadPacket.data[2]) << 8 | Byte.toUnsignedInt(customPayloadPacket.data[3]);
+            int rainbowTicks = Byte.toUnsignedInt(packetCustomPayload.data[0]) << 24 | Byte.toUnsignedInt(packetCustomPayload.data[1]) << 16 | Byte.toUnsignedInt(packetCustomPayload.data[2]) << 8 | Byte.toUnsignedInt(packetCustomPayload.data[3]);
 //            System.out.println("Added rainbow with " + rainbowTicks + " ticks");
             worldClientMP.addRainbow(rainbowTicks);
         }
     }
 
     @Override
-    public void handleCommandManagerPacket(PacketCommandManager commandManagerPacket) {
-        GuiElementChatSuggestions.serverSuggestions = commandManagerPacket.suggestions;
+    public void handleCommandManager(@NotNull PacketCommandManager packetCommandManager) {
+        GuiElementChatSuggestions.serverSuggestions = packetCommandManager.suggestions;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/net/handler/PingPacketHandler.java b/game/client/src/main/java/net/minecraft/client/net/handler/PingPacketHandler.java
index f5d71fcd5..912ee3174 100644
--- a/game/client/src/main/java/net/minecraft/client/net/handler/PingPacketHandler.java
+++ b/game/client/src/main/java/net/minecraft/client/net/handler/PingPacketHandler.java
@@ -9,6 +9,7 @@ import net.minecraft.core.net.handler.PacketHandler;
 import net.minecraft.core.net.packet.PacketDisconnect;
 import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.net.packet.PacketServerIcon;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 
 import javax.imageio.ImageIO;
@@ -61,10 +62,10 @@ public class PingPacketHandler
     }
 
     @Override
-    public void handleKickDisconnect(PacketDisconnect packet) {
-        if (packet.reason.startsWith("§1"))
+    public void handleDisconnect(@NotNull PacketDisconnect packetDisconnect) {
+        if (packetDisconnect.reason.startsWith("§1"))
         {
-            String[] serverInfo = packet.reason.split("\0");
+            String[] serverInfo = packetDisconnect.reason.split("\0");
             server.isUp = true;
             server.protocolVersion = parseIntWithDefault(serverInfo[1], -1);
             server.version = serverInfo[2];
@@ -91,7 +92,7 @@ public class PingPacketHandler
     }
 
     @Override
-    public void handleServerIconPacket(PacketServerIcon packetServerIcon) {
+    public void handleServerIcon(@NotNull PacketServerIcon packetServerIcon) {
         try {
             server.queuedIcon = ImageIO.read(new ByteArrayInputStream(packetServerIcon.image));
         } catch (IOException e) {
diff --git a/game/client/src/main/java/net/minecraft/client/player/controller/PlayerControllerMP.java b/game/client/src/main/java/net/minecraft/client/player/controller/PlayerControllerMP.java
index d27ea97f6..2aba8d3e4 100644
--- a/game/client/src/main/java/net/minecraft/client/player/controller/PlayerControllerMP.java
+++ b/game/client/src/main/java/net/minecraft/client/player/controller/PlayerControllerMP.java
@@ -93,14 +93,14 @@ public class PlayerControllerMP extends PlayerController {
 	@Override
 	public void attack(@NotNull Player entityplayer, @NotNull Entity entity) {
 		syncCurrentPlayItem();
-		netHandler.addToSendQueue(new PacketInteract(entityplayer.id, entity.id, PacketInteract.ACTION_ATTACK));
+		netHandler.addToSendQueue(new PacketEntityInteract(entityplayer.id, entity.id, PacketEntityInteract.ACTION_ATTACK));
 		entityplayer.attackTargetEntityWithCurrentItem(entity);
 	}
 
 	@Override
 	public boolean interact(Player entityplayer, Entity entity) {
 		syncCurrentPlayItem();
-		netHandler.addToSendQueue(new PacketInteract(entityplayer.id, entity.id, PacketInteract.ACTION_INTERACT));
+		netHandler.addToSendQueue(new PacketEntityInteract(entityplayer.id, entity.id, PacketEntityInteract.ACTION_INTERACT));
 		return entityplayer.useCurrentItemOnEntity(entity);
 	}
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/FogManager.java b/game/client/src/main/java/net/minecraft/client/render/FogManager.java
index 24587ee2b..10ab8e7ab 100644
--- a/game/client/src/main/java/net/minecraft/client/render/FogManager.java
+++ b/game/client/src/main/java/net/minecraft/client/render/FogManager.java
@@ -5,17 +5,18 @@ import static org.lwjgl.opengl.GL11.*;
 import java.nio.FloatBuffer;
 
 import net.minecraft.client.world.WorldClient;
-import net.minecraft.core.util.phys.Vec3;
+import net.minecraft.core.block.material.Materials;
+import net.minecraft.core.world.pos.TilePos;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3fc;
 import org.lwjgl.opengl.NVFogDistance;
 
 import net.minecraft.client.GLAllocation;
 import net.minecraft.client.Minecraft;
 import net.minecraft.client.gui.ScreenPhotoMode;
 import net.minecraft.client.gui.modelviewer.ScreenModelViewer;
-import net.minecraft.client.option.enums.RenderDistance;
 import net.minecraft.client.render.camera.CameraUtil;
 import net.minecraft.client.render.colorizer.Colorizers;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.Dimension;
 
@@ -23,7 +24,7 @@ public class FogManager {
     public static final int FOG_MODE_SKY = -1;
     public static final int FOG_MODE_NORMAL = 0;
 
-    public final Minecraft mc;
+    public final @NotNull Minecraft mc;
 
     public float fogRed;
     public float fogGreen;
@@ -32,36 +33,35 @@ public class FogManager {
     public float fogBrightnessOld;
     public float fogBrightness;
 
-    private final FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);
+    private final @NotNull FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);
 
-    public FogManager(Minecraft mc) {
+    public FogManager(@NotNull Minecraft mc) {
         this.mc = mc;
     }
 
     public void updateBrightness() {
-        fogBrightnessOld = fogBrightness;
+        this.fogBrightnessOld = this.fogBrightness;
 
-        float fogModifier = mc.currentWorld.getCurrentWeather() != null ? mc.currentWorld.getCurrentWeather().getFogDistanceMultiplier() : 1.0f;
-        fogModifier = (1.0f - ((1.0f - fogModifier) * mc.currentWorld.weatherManager.getWeatherIntensity() * mc.currentWorld.weatherManager.getWeatherPower()));
+        float fogModifier = this.mc.currentWorld.getCurrentWeather() != null ? this.mc.currentWorld.getCurrentWeather().getFogDistanceMultiplier() : 1.0f;
+        fogModifier = (1.0f - ((1.0f - fogModifier) * this.mc.currentWorld.weatherManager.getWeatherIntensity() * this.mc.currentWorld.weatherManager.getWeatherPower()));
 
-        float brightnessAtCamera = mc.currentWorld.getLightBrightness(MathHelper.floor(mc.activeCamera.getX(1f)), MathHelper.floor(mc.activeCamera.getY(1f)), MathHelper.floor(mc.activeCamera.getZ(1f)));
-        if (mc.fullbright) brightnessAtCamera = 1.0f;
-        float renderDistanceModifier = (((mc.gameSettings.renderDistance.highest - mc.gameSettings.renderDistance.value) * fogModifier) / (float) mc.gameSettings.renderDistance.highest);
+        float brightnessAtCamera = this.mc.currentWorld.getLightBrightness(this.mc.activeCamera.getTilePos());
+        if (this.mc.fullbright) brightnessAtCamera = 1.0f;
+        float renderDistanceModifier = (((this.mc.gameSettings.renderDistance.highest - this.mc.gameSettings.renderDistance.value) * fogModifier) / (float) this.mc.gameSettings.renderDistance.highest);
 
         float newBrightness = brightnessAtCamera * (1.0F - renderDistanceModifier) + renderDistanceModifier;
 
-        fogBrightness += (newBrightness - fogBrightness) * 0.1F;
+        this.fogBrightness += (newBrightness - this.fogBrightness) * 0.1F;
     }
 
-    public void setupFog(int fogMode, float farPlaneDistance, float partialTick)
-    {
-        glFogfv(GL_FOG_COLOR, buffer(fogRed, fogGreen, fogBlue, 0.5F));
+    public void setupFog(int fogMode, float farPlaneDistance, float partialTick) {
+        glFogfv(GL_FOG_COLOR, buffer(this.fogRed, this.fogGreen, this.fogBlue, 0.5F));
         glNormal3f(0.0F, -1F, 0.0F);
         glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-        if (!mc.gameSettings.fog.value && fogMode != FOG_MODE_SKY) {
+        if (!this.mc.gameSettings.fog.value && fogMode != FOG_MODE_SKY) {
             glFogi(GL_FOG_MODE, GL_EXP);
             glFogf(GL_FOG_DENSITY, 0.0F);
-            float maxFogDistance = mc.gameSettings.renderDistance.highest * 16;
+            float maxFogDistance = this.mc.gameSettings.renderDistance.highest * 16;
             glFogf(GL_FOG_START, maxFogDistance * 0.25F);
             glFogf(GL_FOG_END, maxFogDistance);
             glEnable(GL_COLOR_MATERIAL);
@@ -69,46 +69,37 @@ public class FogManager {
             return;
         }
 
-        if(CameraUtil.isUnderLiquid(mc.activeCamera, mc.currentWorld, Material.water, partialTick))
-        {
+        if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Materials.WATER, partialTick)) {
             glFogi(GL_FOG_MODE, GL_EXP);
             glFogf(GL_FOG_DENSITY, 0.1F);
-        }
-        else if(CameraUtil.isUnderLiquid(mc.activeCamera, mc.currentWorld, Material.lava, partialTick))
-        {
+        } else if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Materials.LAVA, partialTick)) {
             glFogi(GL_FOG_MODE, GL_EXP);
             glFogf(GL_FOG_DENSITY, 2.0F);
-        }
-        else
-        {
+        } else {
             float fogDistance = farPlaneDistance;
-            float maxFogDistance = mc.gameSettings.renderDistance.highest * 16;
+            float maxFogDistance = this.mc.gameSettings.renderDistance.highest * 16;
 
-            float fogModifier = mc.currentWorld.getCurrentWeather() != null ? mc.currentWorld.getCurrentWeather().getFogDistanceMultiplier() : 1.0f;
-            fogModifier = (1.0f - ((1.0f - fogModifier) * mc.currentWorld.weatherManager.getWeatherIntensity() * mc.currentWorld.weatherManager.getWeatherPower()));
+            float fogModifier = this.mc.currentWorld.getCurrentWeather() != null ? this.mc.currentWorld.getCurrentWeather().getFogDistanceMultiplier() : 1.0f;
+            fogModifier = (1.0f - ((1.0f - fogModifier) * this.mc.currentWorld.weatherManager.getWeatherIntensity() * this.mc.currentWorld.weatherManager.getWeatherPower()));
 
             if (fogDistance > maxFogDistance * fogModifier) fogDistance = maxFogDistance * fogModifier;
 
-            if (mc.currentScreen instanceof ScreenPhotoMode)
-            {
-                fogDistance = farPlaneDistance * ((ScreenPhotoMode)mc.currentScreen).getFog(partialTick);
+            if (this.mc.currentScreen instanceof ScreenPhotoMode) {
+                fogDistance = farPlaneDistance * ((ScreenPhotoMode) this.mc.currentScreen).getFog(partialTick);
             }
 
             glFogi(GL_FOG_MODE, GL_LINEAR);
             glFogf(GL_FOG_START, (fogDistance * 0.25F) * fogModifier);
             glFogf(GL_FOG_END, fogDistance);
             glFogf(GL_FOG_DENSITY, 1);
-            if(fogMode == FOG_MODE_SKY)
-            {
+            if (fogMode == FOG_MODE_SKY) {
                 glFogf(GL_FOG_START, 0.0F);
                 glFogf(GL_FOG_END, fogDistance * 0.8F);
             }
-            if(OpenGLHelper.enableSphericalFog)
-            {
+            if (OpenGLHelper.enableSphericalFog) {
                 glFogi(NVFogDistance.GL_FOG_DISTANCE_MODE_NV, NVFogDistance.GL_EYE_RADIAL_NV);
             }
-            if(mc.currentWorld.dimension == Dimension.NETHER)
-            {
+            if (this.mc.currentWorld.dimension == Dimension.NETHER) {
                 glFogf(GL_FOG_START, 0.0F);
             }
         }
@@ -116,47 +107,42 @@ public class FogManager {
         glColorMaterial(GL_FRONT, GL_AMBIENT);
     }
 
-    public void updateFogColor(float partialTick)
-    {
-        WorldClient world = mc.currentWorld;
+    public void updateFogColor(float partialTick) {
+        WorldClient world = this.mc.currentWorld;
 
-        float renderDistanceScale = 1.0F / (float)((mc.gameSettings.renderDistance.highest + 8) - mc.gameSettings.renderDistance.value);
+        float renderDistanceScale = 1.0F / (float) ((this.mc.gameSettings.renderDistance.highest + 8) - this.mc.gameSettings.renderDistance.value);
         renderDistanceScale = 1.0F - (float) Math.pow(renderDistanceScale, 0.25D);
 
-        Vec3 skyColor = world.getSkyColor(mc.activeCamera, partialTick);
-        float rSky = (float)skyColor.x;
-        float gSky = (float)skyColor.y;
-        float bSky = (float)skyColor.z;
-
-        Vec3 worldColor = world.getFogColor(mc.activeCamera, partialTick);
-        fogRed = (float)worldColor.x;
-        fogGreen = (float)worldColor.y;
-        fogBlue = (float)worldColor.z;
-
-        fogRed += (rSky - fogRed) * renderDistanceScale;
-        fogGreen += (gSky - fogGreen) * renderDistanceScale;
-        fogBlue += (bSky - fogBlue) * renderDistanceScale;
-
-        if (world.getCurrentWeather() != null)
-        {
-            float[] out = world.getCurrentWeather().modifyFogColor(fogRed, fogGreen, fogBlue, world.weatherManager.getWeatherIntensity() * world.weatherManager.getWeatherPower());
-            fogRed = out[0];
-            fogGreen = out[1];
-            fogBlue = out[2];
+        Vector3fc skyColor = world.getSkyColor(this.mc.activeCamera, partialTick);
+        float rSky = skyColor.x();
+        float gSky = skyColor.y();
+        float bSky = skyColor.z();
+
+        Vector3fc worldColor = world.getFogColor(this.mc.activeCamera, partialTick);
+        this.fogRed = worldColor.x();
+        this.fogGreen = worldColor.y();
+        this.fogBlue = worldColor.z();
+
+        this.fogRed += (rSky - this.fogRed) * renderDistanceScale;
+        this.fogGreen += (gSky - this.fogGreen) * renderDistanceScale;
+        this.fogBlue += (bSky - this.fogBlue) * renderDistanceScale;
+
+        if (world.getCurrentWeather() != null) {
+            float[] out = world.getCurrentWeather().modifyFogColor(this.fogRed, this.fogGreen, this.fogBlue, world.weatherManager.getWeatherIntensity() * world.weatherManager.getWeatherPower());
+            this.fogRed = out[0];
+            this.fogGreen = out[1];
+            this.fogBlue = out[2];
         }
-        if(CameraUtil.isUnderLiquid(mc.activeCamera, world, Material.water, partialTick))
-        {
-            fogRed = 0.02F;
-            fogGreen = 0.02F;
-            fogBlue = 0.2F;
-            if(mc.gameSettings.biomeWater.value)
-            {
-                int x = MathHelper.floor(mc.activeCamera.getX(partialTick));
-                int z = MathHelper.floor(mc.activeCamera.getZ(partialTick));
-                double temp = world.getBlockTemperature(x, z);
-                double humid = world.getBlockHumidity(x, z);
+        if (CameraUtil.isUnderLiquid(this.mc.activeCamera, world, Materials.WATER, partialTick)) {
+            this.fogRed = 0.02F;
+            this.fogGreen = 0.02F;
+            this.fogBlue = 0.2F;
+            if (this.mc.gameSettings.biomeWater.value) {
+                TilePos cameraTile = this.mc.activeCamera.getTilePos();
+                double temp = world.getBlockTemperature(cameraTile);
+                double humid = world.getBlockHumidity(cameraTile);
                 int waterColor = Colorizers.water.getColor(temp, humid);
-                
+
                 float red = ((waterColor >> 16) & 0xFF) / 255F;
                 float green = ((waterColor >> 8) & 0xFF) / 255F;
                 float blue = (waterColor & 0xFF) / 255F;
@@ -165,36 +151,33 @@ public class FogManager {
                 green = MathHelper.clamp(green, 0, 1);
                 blue = MathHelper.clamp(blue, 0, 1);
 
-                fogRed = red * 0.5f;
-                fogGreen = green * 0.5f;
-                fogBlue = blue * 0.5f;
+                this.fogRed = red * 0.5f;
+                this.fogGreen = green * 0.5f;
+                this.fogBlue = blue * 0.5f;
             }
-        }
-        else if(CameraUtil.isUnderLiquid(mc.activeCamera, world, Material.lava, partialTick))
-        {
-            fogRed = 0.6F;
-            fogGreen = 0.1F;
-            fogBlue = 0.0F;
+        } else if (CameraUtil.isUnderLiquid(this.mc.activeCamera, world, Materials.LAVA, partialTick)) {
+            this.fogRed = 0.6F;
+            this.fogGreen = 0.1F;
+            this.fogBlue = 0.0F;
         }
 
-        float brightness = fogBrightnessOld + (fogBrightness - fogBrightnessOld) * partialTick;
-        fogRed *= brightness;
-        fogGreen *= brightness;
-        fogBlue *= brightness;
-        if (mc.currentScreen instanceof ScreenModelViewer) {
-            float[] color = ((ScreenModelViewer) mc.currentScreen).getBackgroundFogColor();
-            fogRed = color[0];
-            fogGreen = color[1];
-            fogBlue = color[2];
+        float brightness = this.fogBrightnessOld + (this.fogBrightness - this.fogBrightnessOld) * partialTick;
+        this.fogRed *= brightness;
+        this.fogGreen *= brightness;
+        this.fogBlue *= brightness;
+        if (this.mc.currentScreen instanceof ScreenModelViewer screenModelViewer) {
+            float[] color = screenModelViewer.getBackgroundFogColor();
+            this.fogRed = color[0];
+            this.fogGreen = color[1];
+            this.fogBlue = color[2];
         }
-        glClearColor(fogRed, fogGreen, fogBlue, 0.0F);
+        glClearColor(this.fogRed, this.fogGreen, this.fogBlue, 0.0F);
     }
 
-    private FloatBuffer buffer(float r, float g, float b, float a)
-    {
-        fogColorBuffer.clear();
-        fogColorBuffer.put(r).put(g).put(b).put(a);
-        fogColorBuffer.flip();
-        return fogColorBuffer;
+    private @NotNull FloatBuffer buffer(float r, float g, float b, float a) {
+        this.fogColorBuffer.clear();
+        this.fogColorBuffer.put(r).put(g).put(b).put(a);
+        this.fogColorBuffer.flip();
+        return this.fogColorBuffer;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/ItemRenderer.java b/game/client/src/main/java/net/minecraft/client/render/ItemRenderer.java
index 1f503d8d5..d37c4bc33 100644
--- a/game/client/src/main/java/net/minecraft/client/render/ItemRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/ItemRenderer.java
@@ -3,6 +3,7 @@ package net.minecraft.client.render;
 import net.minecraft.client.entity.player.PlayerLocal;
 import net.minecraft.client.render.entity.MobRendererPlayer;
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.block.material.Materials;
 import org.lwjgl.opengl.GL11;
 
 import net.minecraft.client.Minecraft;
@@ -14,7 +15,6 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.MathHelper;
@@ -202,7 +202,7 @@ public class ItemRenderer
 			}
 
 		}
-		if(mc.thePlayer.isUnderLiquid(Material.water)) {
+		if(mc.thePlayer.isUnderLiquid(Materials.WATER)) {
             mc.textureManager.loadTexture("/assets/minecraft/textures/misc/water.png").bind();
 			renderWarpedTextureOverlay(partialTicks);
 		}
diff --git a/game/client/src/main/java/net/minecraft/client/render/Lighting.java b/game/client/src/main/java/net/minecraft/client/render/Lighting.java
index 4e9a23776..206bd726c 100644
--- a/game/client/src/main/java/net/minecraft/client/render/Lighting.java
+++ b/game/client/src/main/java/net/minecraft/client/render/Lighting.java
@@ -5,66 +5,67 @@ import static org.lwjgl.opengl.GL11.*;
 import java.nio.FloatBuffer;
 
 import net.minecraft.client.GLAllocation;
-import net.minecraft.core.util.phys.Vec3;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3f;
 
 public class Lighting {
+    private static final @NotNull FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
+    private static final @NotNull Vector3f vec = new Vector3f();
 
-	public Lighting() {
-	}
+    public Lighting() {
+    }
 
-	public static void disable() {
-		glDisable(GL_LIGHTING);
-		glDisable(GL_LIGHT0);
-		glDisable(GL_LIGHT1);
-		glDisable(GL_COLOR_MATERIAL);
-	}
+    public static void disable() {
+        glDisable(GL_LIGHTING);
+        glDisable(GL_LIGHT0);
+        glDisable(GL_LIGHT1);
+        glDisable(GL_COLOR_MATERIAL);
+    }
 
-	public static void enableInventoryLight() {
-		glPushMatrix();
-		glRotatef(-30.0f, 0.0F, 1.0F, 0.0F);
-		glRotatef(155.0f, 1.0F, 0.0F, 0.0F);
-		enableLight(0.4f, 0.5f);
-		glPopMatrix();
-	}
+    public static void enableInventoryLight() {
+        glPushMatrix();
+        glRotatef(-30.0f, 0.0F, 1.0F, 0.0F);
+        glRotatef(155.0f, 1.0F, 0.0F, 0.0F);
+        enableLight(0.4f, 0.5f);
+        glPopMatrix();
+    }
 
-	public static void enableLight() {
-		enableLight(0.4f, 0.6f);
-	}
-	
-	public static void enableLight(float ambientBrightness, float lightBrightness) {
-		glEnable(GL_LIGHTING);
-		glEnable(GL_LIGHT0);
-		glEnable(GL_LIGHT1);
-		glEnable(GL_COLOR_MATERIAL);
-		glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
-		
-		Vec3 vec = Vec3.fromPool(0.2D, 1.0D, -0.7D).normalize();
-		glLightfv(GL_LIGHT0, GL_POSITION, getBuffer(vec.x, vec.y, vec.z, 0.0D));
-		glLightfv(GL_LIGHT0, GL_DIFFUSE, getBuffer(lightBrightness, lightBrightness, lightBrightness, 1.0F));
-		glLightfv(GL_LIGHT0, GL_AMBIENT, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
-		glLightfv(GL_LIGHT0, GL_SPECULAR, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
-		
-		vec = Vec3.fromPool(-0.2D, 1.0D, 0.7D).normalize();
-		glLightfv(GL_LIGHT1, GL_POSITION, getBuffer(vec.x, vec.y, vec.z, 0.0D));
-		glLightfv(GL_LIGHT1, GL_DIFFUSE, getBuffer(lightBrightness, lightBrightness, lightBrightness, 1.0F));
-		glLightfv(GL_LIGHT1, GL_AMBIENT, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
-		glLightfv(GL_LIGHT1, GL_SPECULAR, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
-		
-		glShadeModel(GL_FLAT);
-		glLightModelfv(GL_LIGHT_MODEL_AMBIENT, getBuffer(ambientBrightness, ambientBrightness, ambientBrightness, 1.0F));
-	}
+    public static void enableLight() {
+        enableLight(0.4f, 0.6f);
+    }
 
-	private static FloatBuffer getBuffer(double d, double d1, double d2, double d3) {
-		return getBuffer((float) d, (float) d1, (float) d2, (float) d3);
-	}
+    public static void enableLight(float ambientBrightness, float lightBrightness) {
+        glEnable(GL_LIGHTING);
+        glEnable(GL_LIGHT0);
+        glEnable(GL_LIGHT1);
+        glEnable(GL_COLOR_MATERIAL);
+        glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
 
-	private static FloatBuffer getBuffer(float f, float f1, float f2, float f3) {
-		buffer.clear();
-		buffer.put(f).put(f1).put(f2).put(f3);
-		buffer.flip();
-		return buffer;
-	}
+        vec.set(0.2f, 1.0f, -0.7f).normalize();
+        glLightfv(GL_LIGHT0, GL_POSITION, getBuffer(vec.x, vec.y, vec.z, 0.0f));
+        glLightfv(GL_LIGHT0, GL_DIFFUSE, getBuffer(lightBrightness, lightBrightness, lightBrightness, 1.0F));
+        glLightfv(GL_LIGHT0, GL_AMBIENT, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
+        glLightfv(GL_LIGHT0, GL_SPECULAR, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
 
-	private static final FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
+        vec.set(-0.2f, 1.0f, 0.7f).normalize();
+        glLightfv(GL_LIGHT1, GL_POSITION, getBuffer(vec.x, vec.y, vec.z, 0.0f));
+        glLightfv(GL_LIGHT1, GL_DIFFUSE, getBuffer(lightBrightness, lightBrightness, lightBrightness, 1.0F));
+        glLightfv(GL_LIGHT1, GL_AMBIENT, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
+        glLightfv(GL_LIGHT1, GL_SPECULAR, getBuffer(0.0F, 0.0F, 0.0F, 1.0F));
+
+        glShadeModel(GL_FLAT);
+        glLightModelfv(GL_LIGHT_MODEL_AMBIENT, getBuffer(ambientBrightness, ambientBrightness, ambientBrightness, 1.0F));
+    }
+
+    private static @NotNull FloatBuffer getBuffer(double d1, double d2, double d3, double d4) {
+        return getBuffer((float) d1, (float) d2, (float) d3, (float) d4);
+    }
+
+    private static @NotNull FloatBuffer getBuffer(float f1, float f2, float f3, float f4) {
+        buffer.clear();
+        buffer.put(f1).put(f2).put(f3).put(f4);
+        buffer.flip();
+        return buffer;
+    }
 
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/LightingCache.java b/game/client/src/main/java/net/minecraft/client/render/LightingCache.java
index 5c9300f6e..13ec0ce71 100644
--- a/game/client/src/main/java/net/minecraft/client/render/LightingCache.java
+++ b/game/client/src/main/java/net/minecraft/client/render/LightingCache.java
@@ -6,95 +6,95 @@ import net.minecraft.client.Minecraft;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 final public class LightingCache {
     private final Minecraft mc = Minecraft.getMinecraft();
-    
+
     private static final int CACHE_RANGE = 1;
-    private static final int CACHE_SIZE = CACHE_RANGE*2+1;
-    
-    private final boolean[] brightnessCached = new boolean[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    private final float[] brightnessValue = new float[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    
-    private final boolean[] opacityCached = new boolean[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    private final boolean[] opacityValue = new boolean[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    
-    private final boolean[] lightmapCoordCached = new boolean[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    private final int[] lightmapCoordValue = new int[CACHE_SIZE*CACHE_SIZE*CACHE_SIZE];
-    
-    private int offsetX = Integer.MAX_VALUE;
-    private int offsetY = Integer.MAX_VALUE;
-    private int offsetZ = Integer.MAX_VALUE;
-    
+    private static final int CACHE_SIZE = CACHE_RANGE * 2 + 1;
+
+    private final boolean[] brightnessCached = new boolean[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+    private final float[] brightnessValue = new float[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+
+    private final boolean[] opacityCached = new boolean[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+    private final boolean[] opacityValue = new boolean[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+
+    private final boolean[] lightmapCoordCached = new boolean[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+    private final int[] lightmapCoordValue = new int[CACHE_SIZE * CACHE_SIZE * CACHE_SIZE];
+
+    private final @NotNull TilePos offset = new TilePos(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+
     private Block<?> block;
     private WorldSource access;
 
-    public void setupCache(Block<?> block, WorldSource access, int x, int y, int z){
-        if(x != offsetX || y != offsetY || z != offsetZ || this.block != block || this.access != access) {
+    @Deprecated
+    public void setupCache(@NotNull Block<?> block, @NotNull WorldSource source, int x, int y, int z) {
+        setupCache(block, source, new TilePos(x, y, z));
+    }
+
+    public void setupCache(@NotNull Block<?> block, @NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        if (!tilePos.equals(this.offset) || this.block != block || this.access != source) {
             this.block = block;
-            this.access = access;
-            Arrays.fill(brightnessCached, false);
-            Arrays.fill(opacityCached, false);
-            Arrays.fill(lightmapCoordCached, false);
-            offsetX = x;
-            offsetY = y;
-            offsetZ = z;
+            this.access = source;
+            Arrays.fill(this.brightnessCached, false);
+            Arrays.fill(this.opacityCached, false);
+            Arrays.fill(this.lightmapCoordCached, false);
+            this.offset.set(tilePos);
         }
     }
-    
-    private float calcBrightness(final int x, final int y, final int z) {
-        final int blockId = this.access.getBlockId(x, y, z);
+
+    private float calcBrightness(final @NotNull TilePos tilePos) {
+        final int blockId = this.access.getBlockId(tilePos);
         final Block<?> block = Blocks.getBlock(blockId);
 
-        if(LightmapHelper.isLightmapEnabled() || this.mc.fullbright) {
-            if(this.block.emission >= 15) {
+        if (LightmapHelper.isLightmapEnabled() || this.mc.fullbright) {
+            if (this.block.emission >= 15) {
                 return 1.0f;
             }
-            if(!this.mc.isAmbientOcclusionEnabled()) {
+            if (!this.mc.isAmbientOcclusionEnabled()) {
                 return 1.0f;
             }
-            if(block == null) {
+            if (block == null) {
                 return 1.0f;
             }
-            return 1.0f - block.getAmbientOcclusionStrength(this.access, x, y, z);
+            return 1.0f - block.getAmbientOcclusionStrength(this.access, tilePos);
         }
         final int emission = Blocks.lightEmission[blockId];
-        final float brightness = this.access.getBrightness(x, y, z, emission);
+        final float brightness = this.access.getBrightness(tilePos, emission);
 
-        return Math.min(brightness, (this.mc.isAmbientOcclusionEnabled() && block != null) ? (1 - block.getAmbientOcclusionStrength(this.access, x, y, z)) : 1);
+        return Math.min(brightness, (this.mc.isAmbientOcclusionEnabled() && block != null) ? (1 - block.getAmbientOcclusionStrength(this.access, tilePos)) : 1);
     }
-    
-	public float getBrightness(int relX, int relY, int relZ) {
-		int index = (relX + CACHE_RANGE) * CACHE_SIZE * CACHE_SIZE + (relY + CACHE_RANGE) * CACHE_SIZE + (relZ + CACHE_RANGE);
-		
-		if(!brightnessCached[index]) {
-			int x1 = relX + offsetX;
-			int y1 = relY + offsetY;
-			int z1 = relZ + offsetZ;
-			
-			brightnessValue[index] = calcBrightness(x1, y1, z1);
-			brightnessCached[index] = true;
-		}
-		
-		return brightnessValue[index];
-	}
-	
+
+    public float getBrightness(int relX, int relY, int relZ) {
+        int index = (relX + CACHE_RANGE) * CACHE_SIZE * CACHE_SIZE + (relY + CACHE_RANGE) * CACHE_SIZE + (relZ + CACHE_RANGE);
+
+        if (!this.brightnessCached[index]) {
+            this.brightnessValue[index] = calcBrightness(this.offset.add(relX, relY, relZ, new TilePos()));
+            this.brightnessCached[index] = true;
+        }
+
+        return this.brightnessValue[index];
+    }
+
     public boolean getOpacity(int relX, int relY, int relZ) {
-        int index = (relX+CACHE_RANGE)*CACHE_SIZE*CACHE_SIZE+(relY+CACHE_RANGE)*CACHE_SIZE+(relZ+CACHE_RANGE);
-        if(!opacityCached[index]){
-            opacityValue[index] = Blocks.solid[access.getBlockId(relX+ offsetX, relY+ offsetY, relZ+ offsetZ)];
-            opacityCached[index] = true;
+        int index = (relX + CACHE_RANGE) * CACHE_SIZE * CACHE_SIZE + (relY + CACHE_RANGE) * CACHE_SIZE + (relZ + CACHE_RANGE);
+        if (!this.opacityCached[index]) {
+            this.opacityValue[index] = Blocks.solid[this.access.getBlockId(this.offset.add(relX, relY, relZ, new TilePos()))];
+            this.opacityCached[index] = true;
         }
-        return opacityValue[index];
+        return this.opacityValue[index];
     }
-    
+
     public int getLightmapCoord(int relX, int relY, int relZ) {
-    	int index = (relX + CACHE_RANGE) * CACHE_SIZE * CACHE_SIZE + (relY + CACHE_RANGE) * CACHE_SIZE + (relZ + CACHE_RANGE);
-    	if(!lightmapCoordCached[index]) {
-    		int lightEmission = block.emission;
-    		lightmapCoordValue[index] = access.getLightmapCoord(relX + offsetX, relY + offsetY, relZ + offsetZ, lightEmission);
-    		lightmapCoordCached[index] = true;
-    	}
-    	return lightmapCoordValue[index];
+        int index = (relX + CACHE_RANGE) * CACHE_SIZE * CACHE_SIZE + (relY + CACHE_RANGE) * CACHE_SIZE + (relZ + CACHE_RANGE);
+        if (!this.lightmapCoordCached[index]) {
+            int lightEmission = this.block.emission;
+            this.lightmapCoordValue[index] = this.access.getLightmapCoord(this.offset.add(relX, relY, relZ, new TilePos()), lightEmission);
+            this.lightmapCoordCached[index] = true;
+        }
+        return this.lightmapCoordValue[index];
     }
 }
\ No newline at end of file
diff --git a/game/client/src/main/java/net/minecraft/client/render/ParticleEngine.java b/game/client/src/main/java/net/minecraft/client/render/ParticleEngine.java
index affe21f7b..3ef5d30fc 100644
--- a/game/client/src/main/java/net/minecraft/client/render/ParticleEngine.java
+++ b/game/client/src/main/java/net/minecraft/client/render/ParticleEngine.java
@@ -10,11 +10,12 @@ import net.minecraft.client.render.tessellator.ParticleTessellator;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 /**
@@ -163,7 +164,7 @@ public final class ParticleEngine {
                     double yp = y + (yy + 0.5D) / amount;
                     double zp = z + (zz + 0.5D) / amount;
                     Side side = Side.getSideById(this.rand.nextInt(6));
-                    add((new ParticleBlockBreaking(this.world, xp, yp, zp, xp - x - 0.5D, yp - y - 0.5D, zp - z - 0.5D, block, side, data)).init(x, y, z));
+                    add((new ParticleBlockBreaking(this.world, xp, yp, zp, xp - x - 0.5D, yp - y - 0.5D, zp - z - 0.5D, block, side, data)).init(new TilePos(x, y, z)));
                 }
             }
         }
@@ -183,25 +184,25 @@ public final class ParticleEngine {
             return;
         }
         Block<?> block = Blocks.blocksList[id];
-        AABB bounds = block.getBounds();
+        AABBdc bounds = block.getBounds();
         float r = 0.1F;
-        double xp = x + this.rand.nextDouble() * (bounds.maxX - bounds.minX - (r * 2.0F)) + r + bounds.minX;
-        double yp = y + this.rand.nextDouble() * (bounds.maxY - bounds.minY - (r * 2.0F)) + r + bounds.minY;
-        double zp = z + this.rand.nextDouble() * (bounds.maxZ - bounds.minZ - (r * 2.0F)) + r + bounds.minZ;
+        double xp = x + this.rand.nextDouble() * (bounds.maxX() - bounds.minX() - (r * 2.0F)) + r + bounds.minX();
+        double yp = y + this.rand.nextDouble() * (bounds.maxY() - bounds.minY() - (r * 2.0F)) + r + bounds.minY();
+        double zp = z + this.rand.nextDouble() * (bounds.maxZ() - bounds.minZ() - (r * 2.0F)) + r + bounds.minZ();
         if (side == Side.BOTTOM) {
-            yp = (y + bounds.minY) - r;
+            yp = (y + bounds.minY()) - r;
         } else if (side == Side.TOP) {
-            yp = (y + bounds.maxY) + r;
+            yp = (y + bounds.maxY()) + r;
         } else if (side == Side.NORTH) {
-            zp = (z + bounds.minZ) - r;
+            zp = (z + bounds.minZ()) - r;
         } else if (side == Side.SOUTH) {
-            zp = (z + bounds.maxZ) + r;
+            zp = (z + bounds.maxZ()) + r;
         } else if (side == Side.WEST) {
-            xp = (x + bounds.minX) - r;
+            xp = (x + bounds.minX()) - r;
         } else if (side == Side.EAST) {
-            xp = x + bounds.maxX + r;
+            xp = x + bounds.maxX() + r;
         }
-        add((new ParticleBlockBreaking(this.world, xp, yp, zp, 0.0D, 0.0D, 0.0D, block, side, this.world.getBlockMetadata(x, y, z))).init(x, y, z).setPower(0.2F).setScale(0.6F));
+        add((new ParticleBlockBreaking(this.world, xp, yp, zp, 0.0D, 0.0D, 0.0D, block, side, this.world.getBlockMetadata(x, y, z))).init(new TilePos(x, y, z)).setPower(0.2F).setScale(0.6F));
     }
 
     public int countParticles() {
diff --git a/game/client/src/main/java/net/minecraft/client/render/RenderGlobal.java b/game/client/src/main/java/net/minecraft/client/render/RenderGlobal.java
index 7348afccc..6706e3f2a 100644
--- a/game/client/src/main/java/net/minecraft/client/render/RenderGlobal.java
+++ b/game/client/src/main/java/net/minecraft/client/render/RenderGlobal.java
@@ -27,6 +27,7 @@ import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemDiscMusic;
 import net.minecraft.core.lang.I18n;
+import net.minecraft.core.util.helper.Color;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.phys.HitResult;
@@ -38,16 +39,20 @@ import net.minecraft.core.item.Item;
 import net.minecraft.core.player.gamemode.Gamemode;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.BoundingVolume;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.AuroraProvider;
 import net.minecraft.core.world.LevelListener;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.season.Seasons;
 import net.minecraft.core.world.weather.Weather;
 import net.minecraft.core.world.weather.Weathers;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.Vector3fc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.ARBOcclusionQuery;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL15;
@@ -58,6 +63,7 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Random;
 
+import static java.awt.Color.HSBtoRGB;
 import static org.lwjgl.opengl.GL11.*;
 
 public class RenderGlobal
@@ -127,34 +133,31 @@ public class RenderGlobal
 
     private double auroraBrightness = 0.0f;
     private double targetAuroraBrightness = Double.NaN;
-    private double auroraBrightnessDelta = Double.NaN;
 
     private double rainbowBrightness = 0.0f;
-    private double targetRainbowBrightness = Double.NaN;
-    private double rainbowBrightnessDelta = Double.NaN;
 
     public RenderGlobal(Minecraft mc, TextureManager textureManager) {
         this.mc = mc;
         this.textureManager = textureManager;
-        chunkLists = GLAllocation.generateDisplayLists(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * MAX_VISIBLE_REBUILDS_PER_FRAME);
-        occlusionCheck = OpenGLHelper.enableOcclusionCheck;
-        if (occlusionCheck) {
-            resultBuffer.clear();
-            occlusionCheckIds = GLAllocation.createDirectIntBuffer(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH);
-            occlusionCheckIds.clear();
-            occlusionCheckIds.position(0);
-            occlusionCheckIds.limit(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH);
-            ARBOcclusionQuery.glGenQueriesARB(occlusionCheckIds);
+        this.chunkLists = GLAllocation.generateDisplayLists(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * MAX_VISIBLE_REBUILDS_PER_FRAME);
+        this.occlusionCheck = OpenGLHelper.enableOcclusionCheck;
+        if (this.occlusionCheck) {
+            this.resultBuffer.clear();
+            this.occlusionCheckIds = GLAllocation.createDirectIntBuffer(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH);
+            this.occlusionCheckIds.clear();
+            this.occlusionCheckIds.position(0);
+            this.occlusionCheckIds.limit(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH);
+            ARBOcclusionQuery.glGenQueriesARB(this.occlusionCheckIds);
         }
 
         // Set up call list for stars
-        starList = GLAllocation.generateDisplayLists(3);
+        this.starList = GLAllocation.generateDisplayLists(3);
         updateStars();
 
         // Set up call list for sky
         Tessellator t = Tessellator.instance;
-        skyList = starList + 1;
-        GL11.glNewList(skyList, GL11.GL_COMPILE);
+        this.skyList = this.starList + 1;
+        GL11.glNewList(this.skyList, GL11.GL_COMPILE);
         int s = 64;
         int d = 256 / s + 2;
         float yy = 16F;
@@ -173,7 +176,7 @@ public class RenderGlobal
 
     public void updateStars() {
         GL11.glPushMatrix();
-        GL11.glNewList(starList, GL11.GL_COMPILE);
+        GL11.glNewList(this.starList, GL11.GL_COMPILE);
         renderStars();
         GL11.glEndList();
         GL11.glPopMatrix();
@@ -252,59 +255,59 @@ public class RenderGlobal
         // Delete all display lists - this is a (hopefully temporary) workaround to AMD's OpenGL driver leaking memory
         // See https://community.amd.com/t5/opengl-vulkan/high-vram-consumption-in-minecraft/m-p/607299
         deleteChunkLists();
-        chunkLists = GLAllocation.generateDisplayLists(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * MAX_VISIBLE_REBUILDS_PER_FRAME);
+        this.chunkLists = GLAllocation.generateDisplayLists(RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * RENDER_LIST_BASE_WIDTH * MAX_VISIBLE_REBUILDS_PER_FRAME);
 
-        BlockModelLeaves.setGraphicsLevel(mc.gameSettings.fancyGraphics.value == 1);
-        renderDistance = mc.gameSettings.renderDistance.value;
-        if (world == null) return;
+        BlockModelLeaves.setGraphicsLevel(this.mc.gameSettings.fancyGraphics.value == 1);
+        this.renderDistance = this.mc.gameSettings.renderDistance.value;
+        if (this.world == null) return;
 
         // Reset all world renderers
-        if (chunkRenderers != null) {
-            for (ChunkRenderer chunkRenderer : chunkRenderers) {
+        if (this.chunkRenderers != null) {
+            for (ChunkRenderer chunkRenderer : this.chunkRenderers) {
                 chunkRenderer.delete();
             }
         }
-        int dist = renderDistance * 16 * 2;
+        int dist = this.renderDistance * 16 * 2;
 
-        xChunks = dist / RENDER_CHUNK_SIZE + 1;
-        yChunks = world.getHeightBlocks() / RENDER_CHUNK_SIZE;
-        zChunks = dist / RENDER_CHUNK_SIZE + 1;
+        this.xChunks = dist / RENDER_CHUNK_SIZE + 1;
+        this.yChunks = this.world.getHeightBlocks() / RENDER_CHUNK_SIZE;
+        this.zChunks = dist / RENDER_CHUNK_SIZE + 1;
 
-        chunkRenderers = new ChunkRenderer[xChunks * yChunks * zChunks];
-        sortedChunkRenderers = new ChunkRenderer[xChunks * yChunks * zChunks];
+        this.chunkRenderers = new ChunkRenderer[this.xChunks * this.yChunks * this.zChunks];
+        this.sortedChunkRenderers = new ChunkRenderer[this.xChunks * this.yChunks * this.zChunks];
 
         int id = 0;
         int count = 0;
 
-        xMinChunk = 0;
-        yMinChunk = 0;
-        zMinChunk = 0;
-        xMaxChunk = xChunks;
-        yMaxChunk = yChunks;
-        zMaxChunk = zChunks;
+        this.xMinChunk = 0;
+        this.yMinChunk = 0;
+        this.zMinChunk = 0;
+        this.xMaxChunk = this.xChunks;
+        this.yMaxChunk = this.yChunks;
+        this.zMaxChunk = this.zChunks;
 
-        for (ChunkRenderer cr : dirtyChunks) {
+        for (ChunkRenderer cr : this.dirtyChunks) {
             cr.dirty = false;
         }
 
-        dirtyChunks.clear();
-        renderableTileEntities.clear();
+        this.dirtyChunks.clear();
+        this.renderableTileEntities.clear();
 
-        for (int x = 0; x < xChunks; x++) {
-            for (int y = 0; y < yChunks; y++) {
-                for (int z = 0; z < zChunks; z++) {
-                    int index = (z * yChunks + y) * xChunks + x;
-                    chunkRenderers[index] = mc.terrainRenderer.createChunkRenderer(world, renderableTileEntities, x * RENDER_CHUNK_SIZE, y * RENDER_CHUNK_SIZE, z * RENDER_CHUNK_SIZE, RENDER_CHUNK_SIZE, chunkLists + id);
-                    if (occlusionCheck) {
-                        chunkRenderers[index].occlusionId = occlusionCheckIds.get(count);
+        for (int x = 0; x < this.xChunks; x++) {
+            for (int y = 0; y < this.yChunks; y++) {
+                for (int z = 0; z < this.zChunks; z++) {
+                    int index = (z * this.yChunks + y) * this.xChunks + x;
+                    this.chunkRenderers[index] = this.mc.terrainRenderer.createChunkRenderer(this.world, this.renderableTileEntities, x * RENDER_CHUNK_SIZE, y * RENDER_CHUNK_SIZE, z * RENDER_CHUNK_SIZE, RENDER_CHUNK_SIZE, this.chunkLists + id);
+                    if (this.occlusionCheck) {
+                        this.chunkRenderers[index].occlusionId = this.occlusionCheckIds.get(count);
                     }
-                    chunkRenderers[index].occlusionQuerying = false;
-                    chunkRenderers[index].occlusionVisible = true;
-                    chunkRenderers[index].visible = true;
-                    chunkRenderers[index].id = count++;
-                    chunkRenderers[index].setDirty();
-                    sortedChunkRenderers[index] = chunkRenderers[index];
-                    dirtyChunks.add(chunkRenderers[index]);
+                    this.chunkRenderers[index].occlusionQuerying = false;
+                    this.chunkRenderers[index].occlusionVisible = true;
+                    this.chunkRenderers[index].visible = true;
+                    this.chunkRenderers[index].id = count++;
+                    this.chunkRenderers[index].setDirty();
+                    this.sortedChunkRenderers[index] = this.chunkRenderers[index];
+                    this.dirtyChunks.add(this.chunkRenderers[index]);
                     id += ChunkRenderer.MAX_RENDER_PASSES + 1;
                 }
 
@@ -312,27 +315,27 @@ public class RenderGlobal
 
         }
 
-        if (world != null) {
-            if (mc.activeCamera != null) {
-                resortChunks(MathHelper.floor(mc.activeCamera.getX()), MathHelper.floor(mc.activeCamera.getY()), MathHelper.floor(mc.activeCamera.getZ()));
-                Arrays.sort(sortedChunkRenderers, new CameraSorter(mc.activeCamera));
+        if (this.world != null) {
+            if (this.mc.activeCamera != null) {
+                resortChunks(MathHelper.floor(this.mc.activeCamera.getX()), MathHelper.floor(this.mc.activeCamera.getY()), MathHelper.floor(this.mc.activeCamera.getZ()));
+                Arrays.sort(this.sortedChunkRenderers, new CameraSorter(this.mc.activeCamera));
             }
         }
 
-        noEntityRenderFrames = 2;
+        this.noEntityRenderFrames = 2;
     }
 
     public void renderAurora(ICamera camera, float partialTick) {
-        float celestialAngle = world.getCelestialAngle(partialTick);
+        float celestialAngle = this.world.getCelestialAngle(partialTick);
         if (celestialAngle < 0.25f) return;
 
         double cameraX = camera.getX(partialTick);
         double cameraY = camera.getY(partialTick);
         double cameraZ = camera.getZ(partialTick);
         double cameraYaw = camera.getYRot(partialTick);
-        double temperature = world.getBlockTemperature((int) cameraX, (int) cameraZ);
+        double temperature = this.world.getBlockTemperature((int) cameraX, (int) cameraZ);
         float mult = 0.0f;
-        if ((temperature <= 0.4f || world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER_ENDLESS) && world.isChunkLoaded((int) cameraX, (int) cameraZ)) {
+        if ((temperature <= 0.4f || this.world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER_ENDLESS) && this.world.isChunkLoaded((int) cameraX, (int) cameraZ)) {
             // temperature from 0.0f to 0.4f
             temperature /= 0.4f;
             // temperature from 0.0f to 1.0f
@@ -341,8 +344,8 @@ public class RenderGlobal
             mult += temperature;
         }
 
-        double altitude = world.getWorldType().getYPercentage((int) cameraY);
-        if ((temperature <= 0.6f || world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER || world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER_ENDLESS) && altitude >= 0.8f) {
+        double altitude = this.world.getWorldType().getYPercentage((int) cameraY);
+        if ((temperature <= 0.6f || this.world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER || this.world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER_ENDLESS) && altitude >= 0.8f) {
             // altitude from 0.8f to 1.0f
             altitude -= 0.8f;
             // altitude from 0.0f to 0.4f
@@ -353,14 +356,14 @@ public class RenderGlobal
         if (mult < 0.0f) mult = 0.0f;
         if (mult > 1.0f) mult = 1.0f;
 
-        if (Double.isNaN(targetAuroraBrightness)) {
-            auroraBrightness = mult;
+        if (Double.isNaN(this.targetAuroraBrightness)) {
+            this.auroraBrightness = mult;
         }
 
-        targetAuroraBrightness = mult;
-        double totalDelta = targetAuroraBrightness - auroraBrightness;
-        auroraBrightnessDelta = totalDelta / 100;
-        auroraBrightness += auroraBrightnessDelta * partialTick;
+        this.targetAuroraBrightness = mult;
+        double totalDelta = this.targetAuroraBrightness - this.auroraBrightness;
+        double auroraBrightnessDelta = totalDelta / 100;
+        this.auroraBrightness += auroraBrightnessDelta * partialTick;
 
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -371,18 +374,18 @@ public class RenderGlobal
         GL11.glDisable(GL11.GL_ALPHA_TEST);
 
         final double scale = 1f;
-        double auroraY = (world.getWorldType().getMinY() + world.getWorldType().getYRange() + 64f) * 2f;
+        double auroraY = (this.world.getWorldType().getMinY() + this.world.getWorldType().getYRange() + 64f) * 2f;
 
         // Draw pieces
         double rotationX = Math.cos(((cameraYaw * Math.PI) / 180D));
         double rotationZ = Math.sin(((cameraYaw * Math.PI) / 180D));
 
-        textureManager.bindTexture(textureManager.loadTexture("/assets/minecraft/textures/environment/aurora.png"));
-        double time = world.getWorldTime() + partialTick;
-        AuroraProvider aurora = world.auroraProvider;
+        this.textureManager.bindTexture(this.textureManager.loadTexture("/assets/minecraft/textures/environment/aurora.png"));
+        double time = this.world.getWorldTime() + partialTick;
+        AuroraProvider aurora = this.world.auroraProvider;
 
         double radius = 512;
-        long worldTime = world.getWorldTime();
+        long worldTime = this.world.getWorldTime();
 
         Tessellator.instance.startDrawingQuads();
         for (double x = -radius; x < radius; x += 16) {
@@ -394,7 +397,7 @@ public class RenderGlobal
                 double distanceSqPercentage = distanceSq / (radius * radius + radius * radius);
                 distanceSqPercentage = 1f - distanceSqPercentage;
 
-                double sample = aurora.getAuroraPresence(posX, posZ, worldTime, celestialAngle) * auroraBrightness;
+                double sample = aurora.getAuroraPresence(posX, posZ, worldTime, celestialAngle) * this.auroraBrightness;
                 if (sample * 0.3f * distanceSqPercentage < 0.01f) continue;
 
                 for (int i = 0; i < 2; i++) {
@@ -436,29 +439,30 @@ public class RenderGlobal
     }
 
     public void renderEntities(ICamera camera, float partialTick) {
-        if (noEntityRenderFrames > 0) {
-            noEntityRenderFrames--;
+        if (this.noEntityRenderFrames > 0) {
+            this.noEntityRenderFrames--;
             return;
         }
-        TileEntityRenderDispatcher.instance.cacheActiveRenderInfo(world, camera, partialTick);
-        EntityRenderDispatcher.instance.cacheActiveRenderInfo(world, camera, partialTick);
-        totalEntities = 0;
-        renderedEntities = 0;
-        culledEntities = 0;
+        TileEntityRenderDispatcher.instance.cacheActiveRenderInfo(this.world, camera, partialTick);
+        EntityRenderDispatcher.instance.cacheActiveRenderInfo(this.world, camera, partialTick);
+        this.totalEntities = 0;
+        this.renderedEntities = 0;
+        this.culledEntities = 0;
         EntityRenderDispatcher.renderPosX = camera.getX(partialTick);
         EntityRenderDispatcher.renderPosY = camera.getY(partialTick);
         EntityRenderDispatcher.renderPosZ = camera.getZ(partialTick);
         TileEntityRenderDispatcher.renderPosX = camera.getX(partialTick);
         TileEntityRenderDispatcher.renderPosY = camera.getY(partialTick);
         TileEntityRenderDispatcher.renderPosZ = camera.getZ(partialTick);
-        List<Entity> loadedEntities = world.getLoadedEntityList();
-        totalEntities = loadedEntities.size();
+        List<Entity> loadedEntities = this.world.getLoadedEntityList();
+        this.totalEntities = loadedEntities.size();
         Tessellator tessellator = Tessellator.instance;
+        Vector3dc cameraPos = camera.getPosition(partialTick);
         // Render weather effects
-        for (int i = 0; i < world.weatherEffects.size(); i++) {
-            Entity entity = world.weatherEffects.get(i);
-            renderedEntities++;
-            if (entity.shouldRender(camera.getPosition(partialTick), 1) || mc.thePlayer.vehicle == entity) {
+        for (int i = 0; i < this.world.weatherEffects.size(); i++) {
+            Entity entity = this.world.weatherEffects.get(i);
+            this.renderedEntities++;
+            if (entity.shouldRender(cameraPos, 1) || this.mc.thePlayer.vehicle == entity) {
                 EntityRenderDispatcher.instance.renderEntity(tessellator, entity, partialTick);
             }
         }
@@ -466,41 +470,41 @@ public class RenderGlobal
         // DO NOT TURN THIS INTO A FOREACH
         for (int i = 0; i < loadedEntities.size(); i++) {
             Entity entity = loadedEntities.get(i);
-            if (mc.activeCamera != null && mc.activeCamera instanceof EntityCamera && ((EntityCamera) mc.activeCamera).mob == entity) {
-                if (!mc.activeCamera.showPlayer()) {
+            if (this.mc.activeCamera != null && this.mc.activeCamera instanceof EntityCamera && ((EntityCamera) this.mc.activeCamera).mob == entity) {
+                if (!this.mc.activeCamera.showPlayer()) {
                     continue;
                 }
             }
-            if (mc.thePlayer.vehicle != entity && (!entity.shouldRender(camera.getPosition(partialTick), mc.gameSettings.entityRenderDistance.value) || !entity.ignoreFrustumCheck && !camera.getFrustum().isVisible(EntityRenderDispatcher.instance.getRenderer(entity).entityViewBox(entity), partialTick))) {
+            if (this.mc.thePlayer.vehicle != entity && (!entity.shouldRender(cameraPos, this.mc.gameSettings.entityRenderDistance.value) || !entity.ignoreFrustumCheck && !camera.getFrustum().isVisible(EntityRenderDispatcher.instance.getRenderer(entity).entityViewBox(entity), partialTick))) {
                 continue;
             }
             int floorY = MathHelper.floor(entity.y);
             if (floorY < 0) {
                 floorY = 0;
             }
-            if (floorY >= world.getHeightBlocks()) {
-                floorY = world.getHeightBlocks() - 1;
+            if (floorY >= this.world.getHeightBlocks()) {
+                floorY = this.world.getHeightBlocks() - 1;
 
             }
-            if (world.isBlockLoaded(MathHelper.floor(entity.x), floorY, MathHelper.floor(entity.z)) || mc.thePlayer.vehicle == entity) {
-                renderedEntities++;
+            if (this.world.isBlockLoaded(MathHelper.floor(entity.x), floorY, MathHelper.floor(entity.z)) || this.mc.thePlayer.vehicle == entity) {
+                this.renderedEntities++;
                 EntityRenderDispatcher.instance.renderEntity(tessellator, entity, partialTick);
             }
         }
 
         // DO NOT TURN THIS INTO A FOREACH EITHER
-        for (int i = 0, tileEntitiesSize = renderableTileEntities.size(); i < tileEntitiesSize; i++) {
-            TileEntity tileEntity = renderableTileEntities.get(i);
+        for (int i = 0, tileEntitiesSize = this.renderableTileEntities.size(); i < tileEntitiesSize; i++) {
+            TileEntity tileEntity = this.renderableTileEntities.get(i);
             TileEntityRenderDispatcher.instance.renderTileEntity(tessellator, camera, tileEntity, partialTick);
         }
     }
 
     public String getRendererDebugInfo() {
-        return "C: " + renderedChunks + "/" + totalChunks + ". F: " + offscreenChunks + ", O: " + occludedChunks + ", E: " + emptyChunks;
+        return "C: " + this.renderedChunks + "/" + this.totalChunks + ". F: " + this.offscreenChunks + ", O: " + this.occludedChunks + ", E: " + this.emptyChunks;
     }
 
     public String getEntityDebugInfo() {
-        return "E: " + renderedEntities + "/" + totalEntities + ". B: " + culledEntities + ", I: " + (totalEntities - culledEntities - renderedEntities);
+        return "E: " + this.renderedEntities + "/" + this.totalEntities + ". B: " + this.culledEntities + ", I: " + (this.totalEntities - this.culledEntities - this.renderedEntities);
     }
 
     public void resortChunks(int xc, int yc, int zc) {
@@ -508,17 +512,17 @@ public class RenderGlobal
 //        yc -= 8;
         zc -= 8;
 
-        xMinChunk = Integer.MAX_VALUE;
-        yMinChunk = Integer.MAX_VALUE;
-        zMinChunk = Integer.MAX_VALUE;
-        xMaxChunk = Integer.MIN_VALUE;
-        yMaxChunk = Integer.MIN_VALUE;
-        zMaxChunk = Integer.MIN_VALUE;
+        this.xMinChunk = Integer.MAX_VALUE;
+        this.yMinChunk = Integer.MAX_VALUE;
+        this.zMinChunk = Integer.MAX_VALUE;
+        this.xMaxChunk = Integer.MIN_VALUE;
+        this.yMaxChunk = Integer.MIN_VALUE;
+        this.zMaxChunk = Integer.MIN_VALUE;
 
-        int s2 = xChunks * RENDER_CHUNK_SIZE;
+        int s2 = this.xChunks * RENDER_CHUNK_SIZE;
         int s1 = s2 / 2;
 
-        for (int x = 0; x < xChunks; x++) {
+        for (int x = 0; x < this.xChunks; x++) {
             int xx = x * RENDER_CHUNK_SIZE;
             int xOff = (xx + s1) - xc;
             if (xOff < 0) {
@@ -527,15 +531,15 @@ public class RenderGlobal
 
             xOff /= s2;
             xx -= xOff * s2;
-            if (xx < xMinChunk) {
-                xMinChunk = xx;
+            if (xx < this.xMinChunk) {
+                this.xMinChunk = xx;
             }
 
-            if (xx > xMaxChunk) {
-                xMaxChunk = xx;
+            if (xx > this.xMaxChunk) {
+                this.xMaxChunk = xx;
             }
 
-            for (int z = 0; z < zChunks; z++) {
+            for (int z = 0; z < this.zChunks; z++) {
                 int zz = z * RENDER_CHUNK_SIZE;
                 int zOff = (zz + s1) - zc;
                 if (zOff < 0) {
@@ -544,28 +548,28 @@ public class RenderGlobal
 
                 zOff /= s2;
                 zz -= zOff * s2;
-                if (zz < zMinChunk) {
-                    zMinChunk = zz;
+                if (zz < this.zMinChunk) {
+                    this.zMinChunk = zz;
                 }
 
-                if (zz > zMaxChunk) {
-                    zMaxChunk = zz;
+                if (zz > this.zMaxChunk) {
+                    this.zMaxChunk = zz;
                 }
 
-                for (int y = 0; y < yChunks; y++) {
+                for (int y = 0; y < this.yChunks; y++) {
                     int yy = y * RENDER_CHUNK_SIZE;
-                    if (yy < yMinChunk) {
-                        yMinChunk = yy;
+                    if (yy < this.yMinChunk) {
+                        this.yMinChunk = yy;
                     }
-                    if (yy > yMaxChunk) {
-                        yMaxChunk = yy;
+                    if (yy > this.yMaxChunk) {
+                        this.yMaxChunk = yy;
                     }
 
-                    ChunkRenderer renderer = chunkRenderers[(z * yChunks + y) * xChunks + x];
+                    ChunkRenderer renderer = this.chunkRenderers[(z * this.yChunks + y) * this.xChunks + x];
                     boolean wasDirty = renderer.dirty;
                     renderer.setPos(xx, yy, zz);
                     if (!wasDirty && renderer.dirty) {
-                        dirtyChunks.add(renderer);
+                        this.dirtyChunks.add(renderer);
                     }
                 }
 
@@ -578,55 +582,55 @@ public class RenderGlobal
     public int render(ICamera camera, int renderPass, double partialTick) {
         // Find which renderers need updating
         for (int i = 0; i < 10; i++) {
-            chunkFixOffs = (chunkFixOffs + 1) % chunkRenderers.length;
-            ChunkRenderer chunkRenderer = chunkRenderers[chunkFixOffs];
-            if (chunkRenderer.dirty && !dirtyChunks.contains(chunkRenderer)) {
-                dirtyChunks.add(chunkRenderer);
+            this.chunkFixOffs = (this.chunkFixOffs + 1) % this.chunkRenderers.length;
+            ChunkRenderer chunkRenderer = this.chunkRenderers[this.chunkFixOffs];
+            if (chunkRenderer.dirty && !this.dirtyChunks.contains(chunkRenderer)) {
+                this.dirtyChunks.add(chunkRenderer);
             }
         }
 
-        if (mc.gameSettings.renderDistance.value != renderDistance) {
+        if (this.mc.gameSettings.renderDistance.value != this.renderDistance) {
             allChanged();
         }
 
         if (renderPass == 0) {
-            totalChunks = 0;
-            offscreenChunks = 0;
-            occludedChunks = 0;
-            renderedChunks = 0;
-            emptyChunks = 0;
+            this.totalChunks = 0;
+            this.offscreenChunks = 0;
+            this.occludedChunks = 0;
+            this.renderedChunks = 0;
+            this.emptyChunks = 0;
         }
 
         double xOff = camera.getX((float) partialTick);
         double yOff = camera.getY((float) partialTick);
         double zOff = camera.getZ((float) partialTick);
-        double xd = camera.getX() - xOld;
-        double yd = camera.getY() - yOld;
-        double zd = camera.getZ() - zOld;
+        double xd = camera.getX() - this.xOld;
+        double yd = camera.getY() - this.yOld;
+        double zd = camera.getZ() - this.zOld;
         if (xd * xd + yd * yd + zd * zd > RENDER_CHUNK_SIZE) {
-            xOld = camera.getX();
-            yOld = camera.getY();
-            zOld = camera.getZ();
+            this.xOld = camera.getX();
+            this.yOld = camera.getY();
+            this.zOld = camera.getZ();
             resortChunks(MathHelper.floor(camera.getX()), MathHelper.floor(camera.getY()), MathHelper.floor(camera.getZ()));
-            Arrays.sort(sortedChunkRenderers, new CameraSorter(camera));
+            Arrays.sort(this.sortedChunkRenderers, new CameraSorter(camera));
         }
 
         Lighting.disable();
         int count = 0;
-        if (occlusionCheck && mc.gameSettings.advancedOpenGL.value && renderPass == 0) {
+        if (this.occlusionCheck && this.mc.gameSettings.advancedOpenGL.value && renderPass == 0) {
             int from = 0;
             int to = RENDER_CHUNK_SIZE;
             checkQueryResults(from, to);
             for (int i = from; i < to; i++) {
-                sortedChunkRenderers[i].occlusionVisible = true;
+                this.sortedChunkRenderers[i].occlusionVisible = true;
             }
 
             count += renderChunks(from, to, renderPass, partialTick);
             do {
                 from = to;
                 to *= 2;
-                if (to > sortedChunkRenderers.length) {
-                    to = sortedChunkRenderers.length;
+                if (to > this.sortedChunkRenderers.length) {
+                    to = this.sortedChunkRenderers.length;
                 }
                 GL11.glDisable(GL11.GL_TEXTURE_2D);
                 GL11.glDisable(GL11.GL_LIGHTING);
@@ -640,22 +644,22 @@ public class RenderGlobal
                 float yo = 0.0F;
                 float zo = 0.0F;
                 for (int ix = from; ix < to; ix++) {
-                    if (sortedChunkRenderers[ix].isEmpty()) {
-                        sortedChunkRenderers[ix].visible = false;
+                    if (this.sortedChunkRenderers[ix].isEmpty()) {
+                        this.sortedChunkRenderers[ix].visible = false;
                         continue;
                     }
-                    if (!sortedChunkRenderers[ix].visible) {
-                        sortedChunkRenderers[ix].occlusionVisible = true;
+                    if (!this.sortedChunkRenderers[ix].visible) {
+                        this.sortedChunkRenderers[ix].occlusionVisible = true;
                     }
-                    if (!sortedChunkRenderers[ix].visible || sortedChunkRenderers[ix].occlusionQuerying) {
+                    if (!this.sortedChunkRenderers[ix].visible || this.sortedChunkRenderers[ix].occlusionQuerying) {
                         continue;
                     }
-                    float dist = MathHelper.sqrt_float(sortedChunkRenderers[ix].distanceToCameraSquared(camera));
+                    float dist = MathHelper.sqrt_float(this.sortedChunkRenderers[ix].distanceToCameraSquared(camera));
                     int frequency = (int) (1.0F + dist / 128F);
-                    if (ticks % frequency != ix % frequency) {
+                    if (this.ticks % frequency != ix % frequency) {
                         continue;
                     }
-                    ChunkRenderer chunkRenderer = sortedChunkRenderers[ix];
+                    ChunkRenderer chunkRenderer = this.sortedChunkRenderers[ix];
                     float xt = (float) ((double) chunkRenderer.xRender - xOff);
                     float yt = (float) ((double) chunkRenderer.yRender - yOff);
                     float zt = (float) ((double) chunkRenderer.zRender - zOff);
@@ -668,10 +672,10 @@ public class RenderGlobal
                         yo += ydd;
                         zo += zdd;
                     }
-                    ARBOcclusionQuery.glBeginQueryARB(GL15.GL_SAMPLES_PASSED, sortedChunkRenderers[ix].occlusionId);
-                    sortedChunkRenderers[ix].renderBB();
+                    ARBOcclusionQuery.glBeginQueryARB(GL15.GL_SAMPLES_PASSED, this.sortedChunkRenderers[ix].occlusionId);
+                    this.sortedChunkRenderers[ix].renderBB();
                     ARBOcclusionQuery.glEndQueryARB(GL15.GL_SAMPLES_PASSED);
-                    sortedChunkRenderers[ix].occlusionQuerying = true;
+                    this.sortedChunkRenderers[ix].occlusionQuerying = true;
                 }
 
                 GL11.glPopMatrix();
@@ -681,139 +685,139 @@ public class RenderGlobal
                 GL11.glEnable(GL11.GL_ALPHA_TEST);
                 GL11.glEnable(GL11.GL_FOG);
                 count += renderChunks(from, to, renderPass, partialTick);
-            } while (to < sortedChunkRenderers.length);
+            } while (to < this.sortedChunkRenderers.length);
         } else {
-            count += renderChunks(0, sortedChunkRenderers.length, renderPass, partialTick);
+            count += renderChunks(0, this.sortedChunkRenderers.length, renderPass, partialTick);
         }
         return count;
     }
 
     private void checkQueryResults(int from, int to) {
         for (int i = from; i < to; i++) {
-            if (!sortedChunkRenderers[i].occlusionQuerying) {
+            if (!this.sortedChunkRenderers[i].occlusionQuerying) {
                 continue;
             }
-            resultBuffer.clear();
-            ARBOcclusionQuery.glGetQueryObjectuivARB(sortedChunkRenderers[i].occlusionId, GL15.GL_QUERY_RESULT_AVAILABLE, resultBuffer);
-            if (resultBuffer.get(0) != 0) {
-                sortedChunkRenderers[i].occlusionQuerying = false;
-                resultBuffer.clear();
-                ARBOcclusionQuery.glGetQueryObjectuivARB(sortedChunkRenderers[i].occlusionId, GL15.GL_QUERY_RESULT, resultBuffer);
-                sortedChunkRenderers[i].occlusionVisible = resultBuffer.get(0) != 0;
+            this.resultBuffer.clear();
+            ARBOcclusionQuery.glGetQueryObjectuivARB(this.sortedChunkRenderers[i].occlusionId, GL15.GL_QUERY_RESULT_AVAILABLE, this.resultBuffer);
+            if (this.resultBuffer.get(0) != 0) {
+                this.sortedChunkRenderers[i].occlusionQuerying = false;
+                this.resultBuffer.clear();
+                ARBOcclusionQuery.glGetQueryObjectuivARB(this.sortedChunkRenderers[i].occlusionId, GL15.GL_QUERY_RESULT, this.resultBuffer);
+                this.sortedChunkRenderers[i].occlusionVisible = this.resultBuffer.get(0) != 0;
             }
         }
 
     }
 
     private int renderChunks(int from, int to, int renderPass, double partialTick) {
-        renderChunks.clear();
+        this.renderChunks.clear();
         int count = 0;
 
         for (int i = from; i < to; i++) {
             if (renderPass == 0) {
-                totalChunks++;
-                if (sortedChunkRenderers[i].empty[renderPass]) {
-                    emptyChunks++;
-                } else if (!sortedChunkRenderers[i].visible) {
-                    offscreenChunks++;
-                } else if (occlusionCheck && !sortedChunkRenderers[i].occlusionVisible) {
-                    occludedChunks++;
+                this.totalChunks++;
+                if (this.sortedChunkRenderers[i].empty[renderPass]) {
+                    this.emptyChunks++;
+                } else if (!this.sortedChunkRenderers[i].visible) {
+                    this.offscreenChunks++;
+                } else if (this.occlusionCheck && !this.sortedChunkRenderers[i].occlusionVisible) {
+                    this.occludedChunks++;
                 } else {
-                    renderedChunks++;
+                    this.renderedChunks++;
                 }
             }
 
-            if (sortedChunkRenderers[i].empty[renderPass] || !sortedChunkRenderers[i].visible || occlusionCheck && !sortedChunkRenderers[i].occlusionVisible) {
+            if (this.sortedChunkRenderers[i].empty[renderPass] || !this.sortedChunkRenderers[i].visible || this.occlusionCheck && !this.sortedChunkRenderers[i].occlusionVisible) {
                 continue;
             }
-            int list = sortedChunkRenderers[i].getList(renderPass);
+            int list = this.sortedChunkRenderers[i].getList(renderPass);
             if (list >= 0) {
-                renderChunks.add(sortedChunkRenderers[i]);
+                this.renderChunks.add(this.sortedChunkRenderers[i]);
                 count++;
             }
         }
 
-        double xOff = mc.activeCamera.getX((float) partialTick);
-        double yOff = mc.activeCamera.getY((float) partialTick);
-        double zOff = mc.activeCamera.getZ((float) partialTick);
+        double xOff = this.mc.activeCamera.getX((float) partialTick);
+        double yOff = this.mc.activeCamera.getY((float) partialTick);
+        double zOff = this.mc.activeCamera.getZ((float) partialTick);
         int lists = 0;
-        for (DisplayList displayList : renderLists) {
+        for (DisplayList displayList : this.renderLists) {
             displayList.clear();
         }
 
-        for (ChunkRenderer renderer : renderChunks) {
+        for (ChunkRenderer renderer : this.renderChunks) {
             int list = -1;
             for (int i = 0; i < lists; i++) {
-                if (renderLists[i].isSetToPos(renderer.xRender, renderer.yRender, renderer.zRender)) {
+                if (this.renderLists[i].isSetToPos(renderer.xRender, renderer.yRender, renderer.zRender)) {
                     list = i;
                 }
             }
 
             if (list < 0) {
                 list = lists++;
-                renderLists[list].setToPos(renderer.xRender, renderer.yRender, renderer.zRender, xOff, yOff, zOff);
+                this.renderLists[list].setToPos(renderer.xRender, renderer.yRender, renderer.zRender, xOff, yOff, zOff);
             }
-            renderLists[list].addCallToList(renderer.getList(renderPass));
+            this.renderLists[list].addCallToList(renderer.getList(renderPass));
         }
 
-        if (!mc.gameSettings.fog.value) {
+        if (!this.mc.gameSettings.fog.value) {
             GL11.glDisable(GL11.GL_FOG);
         }
         renderSameAsLast(renderPass, partialTick);
-        if (!mc.gameSettings.fog.value) {
+        if (!this.mc.gameSettings.fog.value) {
             GL11.glEnable(GL11.GL_FOG);
         }
         return count;
     }
 
     public void renderSameAsLast(int renderPass, double partialTick) {
-        for (DisplayList displayList : renderLists) {
+        for (DisplayList displayList : this.renderLists) {
             displayList.call();
         }
 
     }
 
     public void tick() {
-        float windDirection = world.worldType.getWindManager().getWindDirection(world, 0.0f, 500f, 0.0f);
-        float windIntensity = world.worldType.getWindManager().getWindIntensity(world, 0.0f, 500f, 0.0f);
+        float windDirection = this.world.worldType.getWindManager().getWindDirection(this.world, 0.0f, 500f, 0.0f);
+        float windIntensity = this.world.worldType.getWindManager().getWindIntensity(this.world, 0.0f, 500f, 0.0f);
 
         float dx = -(float) (Math.cos(windDirection * Math.PI * 2) * windIntensity);
         float dz = -(float) (Math.sin(windDirection * Math.PI * 2) * windIntensity);
 
-        cloudVelocityX += dx;
-        cloudVelocityZ += dz;
+        this.cloudVelocityX += dx;
+        this.cloudVelocityZ += dz;
 
         float maxVel = 1.5f;
-        if (cloudVelocityX > maxVel) cloudVelocityX = maxVel;
-        if (cloudVelocityX < -maxVel) cloudVelocityX = -maxVel;
-        if (cloudVelocityZ > maxVel) cloudVelocityZ = maxVel;
-        if (cloudVelocityZ < -maxVel) cloudVelocityZ = -maxVel;
+        if (this.cloudVelocityX > maxVel) this.cloudVelocityX = maxVel;
+        if (this.cloudVelocityX < -maxVel) this.cloudVelocityX = -maxVel;
+        if (this.cloudVelocityZ > maxVel) this.cloudVelocityZ = maxVel;
+        if (this.cloudVelocityZ < -maxVel) this.cloudVelocityZ = -maxVel;
 
-        lastCloudOffsetX = cloudOffsetX;
-        lastCloudOffsetZ = cloudOffsetZ;
-        cloudOffsetX += cloudVelocityX;
-        cloudOffsetZ += cloudVelocityZ;
+        this.lastCloudOffsetX = this.cloudOffsetX;
+        this.lastCloudOffsetZ = this.cloudOffsetZ;
+        this.cloudOffsetX += this.cloudVelocityX;
+        this.cloudOffsetZ += this.cloudVelocityZ;
 
-        ticks++;
+        this.ticks++;
     }
 
     public void renderSky(float partialTick) {
-        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(mc.currentWorld.getWorldType());
-        if (!worldTypeFX.hasSky() || mc.currentScreen instanceof ScreenModelViewer) {
+        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(this.mc.currentWorld.getWorldType());
+        if (!worldTypeFX.hasSky() || this.mc.currentScreen instanceof ScreenModelViewer) {
             return;
         }
-        float celestialAngle = world.getCelestialAngle(partialTick);
+        float celestialAngle = this.world.getCelestialAngle(partialTick);
         GL11.glDisable(GL_TEXTURE_2D);
-        Vec3 skyColor = world.getSkyColor(mc.activeCamera, partialTick);
-        float r = (float) skyColor.x;
-        float g = (float) skyColor.y;
-        float b = (float) skyColor.z;
+        Vector3fc skyColor = this.world.getSkyColor(this.mc.activeCamera, partialTick);
+        float r = skyColor.x();
+        float g = skyColor.y();
+        float b = skyColor.z();
         GL11.glColor3f(r, g, b);
         Tessellator t = Tessellator.instance;
         GL11.glDepthMask(false);
         GL11.glEnable(GL_FOG);
         GL11.glColor3f(r, g, b);
-        GL11.glCallList(skyList);
+        GL11.glCallList(this.skyList);
         GL11.glDisable(GL_FOG);
         GL11.glDisable(GL_ALPHA_TEST);
         GL11.glEnable(GL_BLEND);
@@ -849,7 +853,7 @@ public class RenderGlobal
         GL11.glEnable(GL_TEXTURE_2D);
         GL11.glBlendFunc(GL_SRC_ALPHA, GL_ONE);
         GL11.glPushMatrix();
-        float sunAlpha = 1.0F - (world.getCurrentWeather() != null && world.getCurrentWeather() != Weathers.OVERWORLD_CLEAR ? (world.weatherManager.getWeatherIntensity() * world.weatherManager.getWeatherPower()) * 1.5f : 0.0f);
+        float sunAlpha = 1.0F - (this.world.getCurrentWeather() != null && this.world.getCurrentWeather() != Weathers.OVERWORLD_CLEAR ? (this.world.weatherManager.getWeatherIntensity() * this.world.weatherManager.getWeatherPower()) * 1.5f : 0.0f);
 
         float x = 0.0F;
         float y = 0.0F;
@@ -861,7 +865,7 @@ public class RenderGlobal
 
         // Render sun
         float size = 30F;
-        textureManager.loadTexture("/assets/minecraft/textures/terrain/sun.png").bind();
+        this.textureManager.loadTexture("/assets/minecraft/textures/terrain/sun.png").bind();
         GL11.glColor4f(1.0F, 1.0F, 1.0F, sunAlpha);
         t.startDrawingQuads();
         t.addVertexWithUV(-size, 100D, -size, 0.0D, 0.0D);
@@ -871,10 +875,10 @@ public class RenderGlobal
         t.draw();
 
         // Render Rainbow
-        if (world.rainbowTicks > 0 || (!Double.isNaN(rainbowBrightness) && rainbowBrightness > 0)) {
+        if (this.world.rainbowTicks > 0 || (!Double.isNaN(this.rainbowBrightness) && this.rainbowBrightness > 0)) {
             // Calculates the progress through the rainbow, with peak brightness halfway through its lifespawn
-            final float halfRainbowLength = (world.startingRainbowTicks / 2f);
-            float rainbowTimeScalar = 1 - (Math.abs((world.rainbowTicks + partialTick) - halfRainbowLength) / halfRainbowLength);
+            final float halfRainbowLength = (this.world.startingRainbowTicks / 2f);
+            float rainbowTimeScalar = 1 - (Math.abs((this.world.rainbowTicks + partialTick) - halfRainbowLength) / halfRainbowLength);
 
             // Calculates the potential max rainbow brightness based on time of day
             float timeScalar;
@@ -894,41 +898,39 @@ public class RenderGlobal
             timeScalar *= cutoff;
             timeScalar *= rainbowTimeScalar;
 
-            Weather[] blocked = world.getBlockBiome(MathHelper.floor(mc.thePlayer.x), MathHelper.floor(mc.thePlayer.y), MathHelper.floor(mc.thePlayer.z)).blockedWeathers;
+            Weather[] blocked = this.world.getBlockBiome(new TilePos(this.mc.thePlayer)).blockedWeathers;
             boolean isWeatherBlocked = false;
             for (Weather w : blocked) {
-                if (w.equals(world.weatherManager.getLastWeather())) {
+                if (w.equals(this.world.weatherManager.getLastWeather())) {
                     isWeatherBlocked = true;
                     break;
                 }
             }
 
+            double targetRainbowBrightness;
             if (isWeatherBlocked) {
                 targetRainbowBrightness = 0;
             } else {
                 targetRainbowBrightness = timeScalar;
             }
 
-            if (Double.isNaN(rainbowBrightness)) {
-                rainbowBrightness = targetRainbowBrightness;
+            if (Double.isNaN(this.rainbowBrightness)) {
+                this.rainbowBrightness = targetRainbowBrightness;
             }
 
-            double totalDelta = targetRainbowBrightness - rainbowBrightness;
-            rainbowBrightnessDelta = totalDelta / 100;
-            rainbowBrightness += rainbowBrightnessDelta * partialTick;
+            double totalDelta = targetRainbowBrightness - this.rainbowBrightness;
+            double rainbowBrightnessDelta = totalDelta / 100;
+            this.rainbowBrightness += rainbowBrightnessDelta * partialTick;
 
             // Draws and colors ring textures to make the rainbow
-            textureManager.loadTexture("/assets/minecraft/textures/terrain/rainbow.png").bind();
+            this.textureManager.loadTexture("/assets/minecraft/textures/terrain/rainbow.png").bind();
             t.startDrawingQuads();
             final int iterations = 10;
             for (int i = 0; i < iterations; i++) {
                 size = 200F - i * 4;
-                int color = java.awt.Color.HSBtoRGB(i / (float) iterations, 1, (float) (0.3f * rainbowBrightness));
-                float colR = ((color >> 16) & 0xFF) / 255f;
-                float colG = ((color >> 8) & 0xFF) / 255f;
-                float colB = ((color >> 0) & 0xFF) / 255f;
-                float rainbowAlpha = (float) ((0.35f - (0.15f * Math.abs(i - iterations / 2) / (iterations / 2f))) * rainbowBrightness);
-                t.setColorRGBA_F(colR, colG, colB, rainbowAlpha);
+                int color = HSBtoRGB(i / (float) iterations, 1, (float) (0.3f * this.rainbowBrightness));
+                float rainbowAlpha = (float) ((0.35f - (0.15f * Math.abs(i - iterations / 2) / (iterations / 2f))) * this.rainbowBrightness);
+                t.setColorRGBA_F(Color.redFromInt(color) / 255f, Color.greenFromInt(color) / 255f, Color.blueFromInt(color) / 255f, rainbowAlpha);
                 t.addVertexWithUV(-size, -100D, size, 1.0D, 1.0D);
                 t.addVertexWithUV(size, -100D, size, 0.0D, 1.0D);
                 t.addVertexWithUV(size, -100D, -size, 0.0D, 0.0D);
@@ -936,14 +938,12 @@ public class RenderGlobal
             }
             t.draw();
         } else {
-            rainbowBrightness = 0;
-            rainbowBrightnessDelta = 0;
-            targetRainbowBrightness = 0;
+            this.rainbowBrightness = 0;
         }
 
         // Render moon
         size = 20F;
-        textureManager.loadTexture("/assets/minecraft/textures/terrain/moon.png").bind();
+        this.textureManager.loadTexture("/assets/minecraft/textures/terrain/moon.png").bind();
         GL11.glColor4f(1.0F, 1.0F, 1.0F, sunAlpha);
         t.startDrawingQuads();
         t.addVertexWithUV(-size, -100D, size, 1.0D, 1.0D);
@@ -952,11 +952,11 @@ public class RenderGlobal
         t.addVertexWithUV(-size, -100D, -size, 1.0D, 0.0D);
         t.draw();
 
-        float f17 = world.getStarBrightness(partialTick) * sunAlpha;
+        float f17 = this.world.getStarBrightness(partialTick) * sunAlpha;
         if (f17 > 0.0F) {
-            textureManager.loadTexture("/assets/minecraft/textures/colormap/stars/default.png").bind();
+            this.textureManager.loadTexture("/assets/minecraft/textures/colormap/stars/default.png").bind();
             GL11.glColor4f(f17, f17, f17, f17);
-            GL11.glCallList(starList);
+            GL11.glCallList(this.starList);
         }
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         GL11.glDisable(GL11.GL_TEXTURE_2D);
@@ -974,36 +974,36 @@ public class RenderGlobal
     }
 
     private float getCloudHeightModifier() {
-        return mc.gameSettings.cloudHeight.value * 128;
+        return this.mc.gameSettings.cloudHeight.value * 128;
     }
 
     public void renderClouds(float partialTick) {
-        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(mc.currentWorld.getWorldType());
+        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(this.mc.currentWorld.getWorldType());
         if (!worldTypeFX.hasClouds()) {
             return;
         }
-        if (mc.currentScreen instanceof ScreenPhotoMode) {
+        if (this.mc.currentScreen instanceof ScreenPhotoMode) {
             return;
         }
-        if (mc.gameSettings.fancyGraphics.value == 1) {
+        if (this.mc.gameSettings.fancyGraphics.value == 1) {
             renderCloudsFancy(partialTick);
             return;
         }
         GL11.glDisable(GL11.GL_CULL_FACE);
-        float cameraY = (float) mc.activeCamera.getY(partialTick);
+        float cameraY = (float) this.mc.activeCamera.getY(partialTick);
         byte cloudRadius = 32;
         int i = 256 / cloudRadius;
         Tessellator tessellator = Tessellator.instance;
-        textureManager.loadTexture("/assets/minecraft/textures/environment/clouds.png").bind();
+        this.textureManager.loadTexture("/assets/minecraft/textures/environment/clouds.png").bind();
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-        Vec3 dimensionColor = world.getDimensionColor(mc.activeCamera, partialTick);
-        float r = (float) dimensionColor.x;
-        float g = (float) dimensionColor.y;
-        float b = (float) dimensionColor.z;
+        Vector3fc dimensionColor = this.world.getDimensionColor(this.mc.activeCamera, partialTick);
+        float r = dimensionColor.x();
+        float g = dimensionColor.y();
+        float b = dimensionColor.z();
         float f6 = 1f / 2048f;
-        double posX = mc.activeCamera.getX(partialTick) + (double) ((lastCloudOffsetX + (cloudOffsetX - lastCloudOffsetX) * partialTick) * 0.03F);
-        double posZ = mc.activeCamera.getZ(partialTick) + (double) ((lastCloudOffsetZ + (cloudOffsetZ - lastCloudOffsetZ) * partialTick) * 0.03F);
+        double posX = this.mc.activeCamera.getX(partialTick) + (double) ((this.lastCloudOffsetX + (this.cloudOffsetX - this.lastCloudOffsetX) * partialTick) * 0.03F);
+        double posZ = this.mc.activeCamera.getZ(partialTick) + (double) ((this.lastCloudOffsetZ + (this.cloudOffsetZ - this.lastCloudOffsetZ) * partialTick) * 0.03F);
         int j = MathHelper.floor(posX / 2048D);
         int k = MathHelper.floor(posZ / 2048D);
         posX -= j * 2048;
@@ -1030,10 +1030,10 @@ public class RenderGlobal
     }
 
     public void renderCloudsFancy(float partialTick) {
-        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(mc.currentWorld.getWorldType());
-        mc.renderer.beginRenderClouds(partialTick);
+        WorldTypeFX worldTypeFX = WorldTypeFXDispatcher.getInstance().getDispatch(this.mc.currentWorld.getWorldType());
+        this.mc.renderer.beginRenderClouds(partialTick);
 
-        float celestialAngle = world.getCelestialAngle(partialTick);
+        float celestialAngle = this.world.getCelestialAngle(partialTick);
         float[] sunriseColor = worldTypeFX.getSunriseColor(celestialAngle, partialTick);
         float rSun = 0.0f, gSun = 0.0f, bSun = 0.0f, aSun = 0.0f;
         if (sunriseColor != null) {
@@ -1043,24 +1043,24 @@ public class RenderGlobal
             aSun = sunriseColor[3] / 2;
         }
 
-        Vec3 dimensionColor = world.getDimensionColor(mc.activeCamera, partialTick);
-        final float rDim = (float) dimensionColor.x;
-        final float gDim = (float) dimensionColor.y;
-        final float bDim = (float) dimensionColor.z;
+        Vector3fc dimensionColor = this.world.getDimensionColor(this.mc.activeCamera, partialTick);
+        final float rDim = dimensionColor.x();
+        final float gDim = dimensionColor.y();
+        final float bDim = dimensionColor.z();
 
         GL11.glDisable(GL11.GL_CULL_FACE);
-        float cameraY = (float) mc.activeCamera.getY(partialTick);
+        float cameraY = (float) this.mc.activeCamera.getY(partialTick);
         Tessellator tessellator = Tessellator.instance;
         float cloudWidth = 12F;
         float cloudThickness = 4F;
-        double dx = (mc.activeCamera.getX(partialTick) + (double) ((lastCloudOffsetX + (cloudOffsetX - lastCloudOffsetX) * partialTick) * 0.03F)) / (double) cloudWidth;
-        double dz = (mc.activeCamera.getZ(partialTick) + (double) ((lastCloudOffsetZ + (cloudOffsetZ - lastCloudOffsetZ) * partialTick) * 0.03F)) / (double) cloudWidth + 0.33D;
+        double dx = (this.mc.activeCamera.getX(partialTick) + (double) ((this.lastCloudOffsetX + (this.cloudOffsetX - this.lastCloudOffsetX) * partialTick) * 0.03F)) / (double) cloudWidth;
+        double dz = (this.mc.activeCamera.getZ(partialTick) + (double) ((this.lastCloudOffsetZ + (this.cloudOffsetZ - this.lastCloudOffsetZ) * partialTick) * 0.03F)) / (double) cloudWidth + 0.33D;
         float dy = (worldTypeFX.getCloudHeight() - cameraY) + 0.33F + getCloudHeightModifier();
         int i = MathHelper.floor(dx / 2048D);
         int j = MathHelper.floor(dz / 2048D);
         dx -= i * 2048;
         dz -= j * 2048;
-        textureManager.loadTexture("/assets/minecraft/textures/environment/clouds.png").bind();
+        this.textureManager.loadTexture("/assets/minecraft/textures/environment/clouds.png").bind();
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         float f13 = 1F / 256F;
@@ -1160,7 +1160,7 @@ public class RenderGlobal
         GL11.glDisable(GL11.GL_BLEND);
         GL11.glEnable(GL11.GL_CULL_FACE);
 
-        mc.renderer.endRenderClouds(partialTick);
+        this.mc.renderer.endRenderClouds(partialTick);
     }
 
     private final DirtyChunkRendererSorter dirtyChunkRendererSorter = new DirtyChunkRendererSorter();
@@ -1190,79 +1190,81 @@ public class RenderGlobal
 //        return this.dirtyChunks.size() <= this.cantBuildRenderers.size(); // Return true if no more dirty renderers
 //    }
 
-    private @Nullable ChunkRenderer @NotNull [] toAdd = new ChunkRenderer[MAX_VISIBLE_REBUILDS_PER_FRAME];
-    private @NotNull List<@NotNull ChunkRenderer> nearChunks = new ArrayList<>();
+    private final @Nullable ChunkRenderer @NotNull [] toAdd = new ChunkRenderer[MAX_VISIBLE_REBUILDS_PER_FRAME];
+    private final @NotNull List<@NotNull ChunkRenderer> nearChunks = new ArrayList<>();
+
     public boolean updateDirtyChunks(@NotNull ICamera camera) {
-        dirtyChunkRendererSorter.setActiveCamera(camera);
-        Arrays.fill(toAdd, null);
+        this.dirtyChunkRendererSorter.setActiveCamera(camera);
+        Arrays.fill(this.toAdd, null);
         this.nearChunks.clear();
 
-        final int pendingChunkSize = dirtyChunks.size();
+        final int pendingChunkSize = this.dirtyChunks.size();
 
-        for(int i = 0; i < pendingChunkSize; i++) {
-            final ChunkRenderer renderer = dirtyChunks.get(i);
-            if(renderer.distanceToCameraSquared(camera) > 2048f) {
+        for (int i = 0; i < pendingChunkSize; i++) {
+            final ChunkRenderer renderer = this.dirtyChunks.get(i);
+            if (renderer.distanceToCameraSquared(camera) > 2048f) {
                 int index = 0;
 
-                while (index < MAX_VISIBLE_REBUILDS_PER_FRAME && (toAdd[index] == null || dirtyChunkRendererSorter.compare(toAdd[index], renderer) <= 0)) {
+                while (index < MAX_VISIBLE_REBUILDS_PER_FRAME && (this.toAdd[index] == null || this.dirtyChunkRendererSorter.compare(this.toAdd[index], renderer) <= 0)) {
                     index++;
                 }
 
-                if(--index <= 0) {
+                if (--index <= 0) {
                     continue;
                 }
 
-                for(int x = index; --x != 0;) {
-                    toAdd[x - 1] = toAdd[x];
+                for (int x = index; --x != 0; ) {
+                    this.toAdd[x - 1] = this.toAdd[x];
                 }
 
-                toAdd[index] = renderer;
+                this.toAdd[index] = renderer;
                 continue;
             }
 
-            nearChunks.add(renderer);
+            this.nearChunks.add(renderer);
         }
 
-        if(!nearChunks.isEmpty()) {
-            if(nearChunks.size() > 1) {
-                nearChunks.sort(dirtyChunkRendererSorter);
+        if (!this.nearChunks.isEmpty()) {
+            if (this.nearChunks.size() > 1) {
+                this.nearChunks.sort(this.dirtyChunkRendererSorter);
             }
-            for (ChunkRenderer renderer : nearChunks){
+            for (ChunkRenderer renderer : this.nearChunks) {
                 if (renderer.rebuild(true)) {
                     renderer.dirty = false;
-                    dirtyChunks.remove(renderer);
+                    this.dirtyChunks.remove(renderer);
                 }
             }
         }
 
-        for(int i = MAX_VISIBLE_REBUILDS_PER_FRAME - 1; i >= 0; i--) {
-            ChunkRenderer chunkx = toAdd[i];
-            if(chunkx == null) { continue; }
-            if(!chunkx.visible && i != MAX_VISIBLE_REBUILDS_PER_FRAME - 1) {
-                toAdd[i] = null;
+        for (int i = MAX_VISIBLE_REBUILDS_PER_FRAME - 1; i >= 0; i--) {
+            ChunkRenderer chunkx = this.toAdd[i];
+            if (chunkx == null) {
+                continue;
+            }
+            if (!chunkx.visible && i != MAX_VISIBLE_REBUILDS_PER_FRAME - 1) {
+                this.toAdd[i] = null;
                 break;
             }
             if (chunkx.rebuild(false)) {
                 chunkx.dirty = false;
-                dirtyChunks.remove(chunkx);
+                this.dirtyChunks.remove(chunkx);
             }
         }
-        return dirtyChunks.isEmpty();
+        return this.dirtyChunks.isEmpty();
     }
 
-    public void drawBlockBreaking(@NotNull ICamera camera, @NotNull HitResult.Tile tileHit, float partialTick)
-    {
+    public void drawBlockBreaking(@NotNull ICamera camera, @NotNull HitResult.Tile tileHit, float partialTick) {
         Tessellator tessellator = Tessellator.instance;
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glEnable(GL11.GL_ALPHA_TEST);
         GL11.glBlendFunc(770, 1);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, (MathHelper.sin((float) System.currentTimeMillis() / 100F) * 0.2F + 0.4F) * 0.5F);
-        if (destroyProgress > 0.0F) {
+        if (this.destroyProgress > 0.0F) {
             GL11.glBlendFunc(774, 768);
             TextureRegistry.blockAtlas.bind();
             GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
             GL11.glPushMatrix();
-            int k = world.getBlockId(tileHit.tilePos.x, tileHit.tilePos.y, tileHit.tilePos.z);
+            int k = this.world.getBlockId(tileHit.tilePos);
             Block<?> block = k <= 0 ? null : Blocks.blocksList[k];
             GL11.glDisable(GL11.GL_ALPHA_TEST);
             GL11.glPolygonOffset(-3F, -3F);
@@ -1285,11 +1287,9 @@ public class RenderGlobal
                 .getDispatch(block)
                 .renderWithOverrideTexture(
                     tessellator,
-                    world,
-                    tileHit.tilePos.x,
-                    tileHit.tilePos.y,
-                    tileHit.tilePos.z,
-                    breakingAnimation[MathHelper.clamp((int)(destroyProgress * 10F), 0, breakingAnimation.length - 1)]);
+                    this.world,
+                    tileHit.tilePos,
+                    breakingAnimation[MathHelper.clamp((int) (this.destroyProgress * 10F), 0, breakingAnimation.length - 1)]);
             tessellator.draw();
             tessellator.setTranslation(0.0D, 0.0D, 0.0D);
             GL11.glDisable(GL11.GL_ALPHA_TEST);
@@ -1304,10 +1304,10 @@ public class RenderGlobal
     }
 
     public void drawSelectionBox(ICamera camera, HitResult hitResult, float partialTick) {
-        if (mc.gameSettings.immersiveMode.drawOutline() && mc.gameSettings.blockOutlineWidth.value > 0.01f && !(mc.currentScreen instanceof ScreenModelViewer)) {
+        if (this.mc.gameSettings.immersiveMode.drawOutline() && this.mc.gameSettings.blockOutlineWidth.value > 0.01f && !(this.mc.currentScreen instanceof ScreenModelViewer)) {
             GL11.glEnable(GL11.GL_BLEND);
             GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-            float w = mc.getOutlineWidth();
+            float w = this.mc.getOutlineWidth();
             GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.35f + w * 0.3f);
             GL11.glLineWidth(java.lang.Math.max(4.0f * w * 2.0f, 1.0f));
             GL11.glDisable(GL11.GL_TEXTURE_2D);
@@ -1316,37 +1316,34 @@ public class RenderGlobal
             double offsetY = camera.getY(partialTick);
             double offsetZ = camera.getZ(partialTick);
 
-            if(hitResult instanceof HitResult.Tile hitTile)
-            {
+            if (hitResult instanceof HitResult.Tile hitTile) {
                 float expand = 0.002F;
-                Block<?> block = world.getBlock(hitTile.tilePos);
-                if(block != null)
-                {
-                    BoundingVolume volume = block.getBoundingVolume(world, hitTile.tilePos);
-                    if (volume != null)
-                    {
-                        drawOutlinedVolume(volume, hitTile.tilePos.x - offsetX, hitTile.tilePos.y - offsetY, hitTile.tilePos.z - offsetZ, expand);
-                    }
-                    else
-                    {
-                        drawOutlinedBoundingBox(block.getSelectionAABB(world, hitTile.tilePos).grow(expand, expand, expand).cloneMove(-offsetX, -offsetY, -offsetZ));
+                Block<?> block = this.world.getBlock(hitTile.tilePos);
+                if (block != null) {
+                    BoundingVolume volume = block.getBoundingVolume(this.world, hitTile.tilePos);
+                    if (volume != null) {
+                        drawOutlinedVolume(volume, hitTile.tilePos.x() - offsetX, hitTile.tilePos.y() - offsetY, hitTile.tilePos.z() - offsetZ, expand);
+                    } else {
+                        AABBd selectionBB = MathHelper.aabbGrow(block.getSelectionAABB(this.world, hitTile.tilePos), expand, expand, expand, new AABBd());
+                        selectionBB.translate(-offsetX, -offsetY, -offsetZ);
+                        drawOutlinedBoundingBox(selectionBB);
                     }
-                    if (mc.gameSettings.viewSupportMode.value) {
+                    if (this.mc.gameSettings.viewSupportMode.value) {
                         Tessellator t = Tessellator.instance;
 
-                        double x = hitTile.tilePos.x - offsetX;
-                        double y = hitTile.tilePos.y - offsetY;
-                        double z = hitTile.tilePos.z - offsetZ;
+                        double x = hitTile.tilePos.x() - offsetX;
+                        double y = hitTile.tilePos.y() - offsetY;
+                        double z = hitTile.tilePos.z() - offsetZ;
 
                         double oMin = -0.01;
                         double oMax = 1.01;
 
-                        ISupport sBottom = block.getSupport(world, hitTile.tilePos, Side.BOTTOM);
-                        ISupport sTop = block.getSupport(world, hitTile.tilePos, Side.TOP);
-                        ISupport sNorth = block.getSupport(world, hitTile.tilePos, Side.NORTH);
-                        ISupport sSouth = block.getSupport(world, hitTile.tilePos, Side.SOUTH);
-                        ISupport sWest = block.getSupport(world, hitTile.tilePos, Side.WEST);
-                        ISupport sEast = block.getSupport(world, hitTile.tilePos, Side.EAST);
+                        ISupport sBottom = block.getSupport(this.world, hitTile.tilePos, Side.BOTTOM);
+                        ISupport sTop = block.getSupport(this.world, hitTile.tilePos, Side.TOP);
+                        ISupport sNorth = block.getSupport(this.world, hitTile.tilePos, Side.NORTH);
+                        ISupport sSouth = block.getSupport(this.world, hitTile.tilePos, Side.SOUTH);
+                        ISupport sWest = block.getSupport(this.world, hitTile.tilePos, Side.WEST);
+                        ISupport sEast = block.getSupport(this.world, hitTile.tilePos, Side.EAST);
 
                         t.startDrawingQuads();
 
@@ -1665,9 +1662,7 @@ public class RenderGlobal
                         t.draw();
                     }
                 }
-            }
-            else if (hitResult instanceof HitResult.Entity hitEntity && hitEntity.entity.showBoundingBoxOnHover() && !mc.gameSettings.showCollisionBoxes.value)
-            {
+            } else if (hitResult instanceof HitResult.Entity hitEntity && hitEntity.entity.showBoundingBoxOnHover() && !this.mc.gameSettings.showCollisionBoxes.value) {
                 drawInterpolatedEntityBoundingBox(hitEntity.entity, hitEntity.entity.bb, camera, partialTick);
             }
 
@@ -1685,28 +1680,30 @@ public class RenderGlobal
         double offsetY = camera.getY(partialTicks);
         double offsetZ = camera.getZ(partialTicks);
         float expand = 0.002F;
-        List<AABB> collidingBoundingBoxes = world.getCubes(mc.thePlayer, mc.thePlayer.bb.grow(expand, expand, expand));
+        List<AABBdc> collidingBoundingBoxes = this.world.getCubes(this.mc.thePlayer, MathHelper.aabbGrow(this.mc.thePlayer.bb, expand, expand, expand, new AABBd()));
         glColor4f(0.0f, 0.0f, 1.0f, 1.0f);
-        for (AABB aabb : collidingBoundingBoxes) {
-            drawOutlinedBoundingBox(aabb.cloneMove(-offsetX, -offsetY, -offsetZ).grow(expand, expand, expand));
+        for (AABBdc aabb : collidingBoundingBoxes) {
+            AABBd bb = aabb.translate(-offsetX, -offsetY, -offsetZ, new AABBd());
+            MathHelper.aabbGrow(bb, expand, expand, expand, bb);
+            drawOutlinedBoundingBox(bb);
         }
 
         float entityRadius = 10.0f;
-        if (mc.thePlayer.getGamemode() == Gamemode.creative) {
+        if (this.mc.thePlayer.getGamemode() == Gamemode.creative) {
             entityRadius = 100.0f;
         }
-        List<Entity> entitiesNearby = world.getEntitiesWithinAABBExcludingEntity(null, mc.thePlayer.bb.grow(entityRadius, entityRadius, entityRadius));
+        List<Entity> entitiesNearby = this.world.getEntitiesWithinAABBExcludingEntity(null, MathHelper.aabbGrow(this.mc.thePlayer.bb, entityRadius, entityRadius, entityRadius, new AABBd()));
         for (Entity e : entitiesNearby) {
             glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
             drawInterpolatedEntityBoundingBox(e, e.bb, camera, partialTicks); // Bounds
 
             glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
-            final AABB head = e.bb.copy();
-            head.set(head.minX, e.y + e.getHeadHeight() - 0.005, head.minZ, head.maxX, e.y + e.getHeadHeight() + 0.005, head.maxZ);
+            final AABBd head = new AABBd(e.bb);
+            head.setMin(head.minX, e.y + e.getHeadHeight() - 0.005, head.minZ).setMax(head.maxX, e.y + e.getHeadHeight() + 0.005, head.maxZ);
             drawInterpolatedEntityBoundingBox(e, head, camera, partialTicks); // Head
 
             glColor4f(1.0f, 0.0f, 1.0f, 1.0f);
-            final AABB feet = AABB.fromPool(e.bb.minX, e.y - 0.005, e.bb.minZ, e.bb.maxX, e.y + 0.005, e.bb.maxZ);
+            final AABBd feet = new AABBd(e.bb.minX, e.y - 0.005, e.bb.minZ, e.bb.maxX, e.y + 0.005, e.bb.maxZ);
             drawInterpolatedEntityBoundingBox(e, feet, camera, partialTicks); // Feet
 
             glColor4f(0.75f, 0.75f, 1.0f, 1.0f);
@@ -1715,7 +1712,7 @@ public class RenderGlobal
             double lerpOffsetX = MathHelper.lerp(e.xo, e.x, partialTicks) - camera.getX(partialTicks);
             double lerpOffsetY = MathHelper.lerp(e.yo, e.y, partialTicks) - camera.getY(partialTicks);
             double lerpOffsetZ = MathHelper.lerp(e.zo, e.z, partialTicks) - camera.getZ(partialTicks);
-            drawDebugVec(Tessellator.instance, Vec3.fromPool(lerpOffsetX, lerpOffsetY + e.getHeadHeight(), lerpOffsetZ), e.getViewVector(partialTicks), 1, 0, 1, 0, 1);
+            drawDebugVec(Tessellator.instance, new Vector3d(lerpOffsetX, lerpOffsetY + e.getHeadHeight(), lerpOffsetZ), e.getViewVector(partialTicks), 1, 0, 1, 0, 1);
             glDisable(GL_TEXTURE_2D);
             GL11.glLineWidth(2);
         }
@@ -1723,22 +1720,22 @@ public class RenderGlobal
         glEnable(GL_TEXTURE_2D);
     }
 
-    public static void drawDebugVec(final Tessellator tessellator, final Vec3 pos, final Vec3 vec, final double scale, final float r, final float g, final float b, final float a) {
-        if (pos == null || vec == null) return;
+    public static void drawDebugVec(final @NotNull Tessellator tessellator, final @NotNull Vector3dc pos, final @Nullable Vector3dc vec, final double scale, final float r, final float g, final float b, final float a) {
+        if (vec == null) return;
         GL11.glLineWidth(10);
         GL11.glDisable(GL11.GL_TEXTURE_2D);
         tessellator.startDrawing(GL11.GL_LINES);
         tessellator.setColorRGBA_F(r, g, b, a);
-        tessellator.addVertex(pos.x, pos.y, pos.z);
+        tessellator.addVertex(pos.x(), pos.y(), pos.z());
         tessellator.addVertex(
-            pos.x + vec.x * scale,
-            pos.y + vec.y * scale,
-            pos.z + vec.z * scale);
+            pos.x() + vec.x() * scale,
+            pos.y() + vec.y() * scale,
+            pos.z() + vec.z() * scale);
         tessellator.draw();
         GL11.glEnable(GL11.GL_TEXTURE_2D);
     }
 
-    public void drawInterpolatedEntityBoundingBox(Entity entity, AABB boundingBox, ICamera camera, float partialTicks) {
+    public void drawInterpolatedEntityBoundingBox(@NotNull Entity entity, @NotNull AABBdc boundingBox, @NotNull ICamera camera, float partialTicks) {
         double cameraX = camera.getX(partialTicks);
         double cameraY = camera.getY(partialTicks);
         double cameraZ = camera.getZ(partialTicks);
@@ -1746,14 +1743,14 @@ public class RenderGlobal
         double lerpOffsetX = entity.xo + (entity.x - entity.xo) * partialTicks;
         double lerpOffsetY = entity.yo + (entity.y - entity.yo) * partialTicks;
         double lerpOffsetZ = entity.zo + (entity.z - entity.zo) * partialTicks;
-        boundingBox = boundingBox.grow(expand, expand, expand);
-        boundingBox = boundingBox.cloneMove(-entity.x, -entity.y, -entity.z);
-        boundingBox = boundingBox.cloneMove(-cameraX, -cameraY, -cameraZ);
-        boundingBox = boundingBox.cloneMove(lerpOffsetX, lerpOffsetY, lerpOffsetZ);
-        drawOutlinedBoundingBox(boundingBox);
+        AABBd bb = MathHelper.aabbGrow(boundingBox, expand, expand, expand, new AABBd());
+        bb.translate(-entity.x, -entity.y, -entity.z);
+        bb.translate(-cameraX, -cameraY, -cameraZ);
+        bb.translate(lerpOffsetX, lerpOffsetY, lerpOffsetZ);
+        drawOutlinedBoundingBox(bb);
     }
 
-    public void drawDebugChunkBorders(ICamera camera, float partialTicks) {
+    public void drawDebugChunkBorders(@NotNull ICamera camera, float partialTicks) {
         glDisable(GL_TEXTURE_2D);
         glDisable(GL_FOG);
 
@@ -1764,8 +1761,8 @@ public class RenderGlobal
         Tessellator tessellator = Tessellator.instance;
         tessellator.setTranslation(-offsetX, -offsetY, -offsetZ);
 
-        int blockX = MathHelper.floor(mc.thePlayer.x);
-        int blockZ = MathHelper.floor(mc.thePlayer.z);
+        int blockX = MathHelper.floor(this.mc.thePlayer.x);
+        int blockZ = MathHelper.floor(this.mc.thePlayer.z);
 
         int chunkX = blockX >> 4;
         int chunkZ = blockZ >> 4;
@@ -1776,7 +1773,7 @@ public class RenderGlobal
         int x1 = x0 + 16;
         int z1 = z0 + 16;
 
-        int worldHeight = mc.currentWorld.getHeightBlocks();
+        int worldHeight = this.mc.currentWorld.getHeightBlocks();
 
         glLineWidth(2.0f);
         glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
@@ -1841,31 +1838,31 @@ public class RenderGlobal
         glEnable(GL_FOG);
     }
 
-    public void drawOutlinedBoundingBox(AABB aabb) {
+    public void drawOutlinedBoundingBox(@NotNull AABBdc aabb) {
         Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawing(GL11.GL_LINE_STRIP);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
         tessellator.draw();
         tessellator.startDrawing(GL11.GL_LINE_STRIP);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
         tessellator.draw();
         tessellator.startDrawing(GL11.GL_LINES);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
         tessellator.draw();
     }
 
@@ -1890,25 +1887,25 @@ public class RenderGlobal
         int _y1 = MathHelper.bucketInt(y1, RENDER_CHUNK_SIZE);
         int _z1 = MathHelper.bucketInt(z1, RENDER_CHUNK_SIZE);
         for (int x = _x0; x <= _x1; x++) {
-            int xx = x % xChunks;
+            int xx = x % this.xChunks;
             if (xx < 0) {
-                xx += xChunks;
+                xx += this.xChunks;
             }
             for (int y = _y0; y <= _y1; y++) {
-                int yy = y % yChunks;
+                int yy = y % this.yChunks;
                 if (yy < 0) {
-                    yy += yChunks;
+                    yy += this.yChunks;
                 }
                 for (int z = _z0; z <= _z1; z++) {
-                    int zz = z % zChunks;
+                    int zz = z % this.zChunks;
                     if (zz < 0) {
-                        zz += zChunks;
+                        zz += this.zChunks;
                     }
-                    int p = (zz * yChunks + yy) * xChunks + xx;
+                    int p = (zz * this.yChunks + yy) * this.xChunks + xx;
 
-                    ChunkRenderer renderer = chunkRenderers[p];
+                    ChunkRenderer renderer = this.chunkRenderers[p];
                     if (!renderer.dirty) {
-                        dirtyChunks.add(renderer);
+                        this.dirtyChunks.add(renderer);
                         renderer.setDirty();
                     }
                 }
@@ -1927,31 +1924,31 @@ public class RenderGlobal
     }
 
     public void cull(CameraFrustum frustum, float partialTick) {
-        for (int i = 0; i < chunkRenderers.length; i++) {
-            if (!chunkRenderers[i].isEmpty() && (!chunkRenderers[i].visible || (i + cullStep & 0xf) == 0)) {
-                chunkRenderers[i].cull(frustum, partialTick);
+        for (int i = 0; i < this.chunkRenderers.length; i++) {
+            if (!this.chunkRenderers[i].isEmpty() && (!this.chunkRenderers[i].visible || (i + this.cullStep & 0xf) == 0)) {
+                this.chunkRenderers[i].cull(frustum, partialTick);
             }
         }
 
-        cullStep++;
+        this.cullStep++;
     }
 
     @Override
     public void playStreamingMusic(String soundPath, String author, int x, int y, int z) {
         if (soundPath != null) {
             if (author != null && !author.isEmpty()) {
-                mc.hudIngame.setRecordPlayingMessage(author + " - " + I18n.getInstance().translateKey(soundPath));
+                this.mc.hudIngame.setRecordPlayingMessage(author + " - " + I18n.getInstance().translateKey(soundPath));
             } else {
-                mc.hudIngame.setRecordPlayingMessage(I18n.getInstance().translateKey(soundPath));
+                this.mc.hudIngame.setRecordPlayingMessage(I18n.getInstance().translateKey(soundPath));
             }
         }
-        mc.sndManager.playMusic(soundPath, x, y, z, 1.0F, 1.0F);
+        this.mc.sndManager.playMusic(soundPath, x, y, z, 1.0F, 1.0F);
     }
 
     @Override
     public void playSound(Entity player, String soundPath, SoundCategory category, double x, double y, double z,
                           float volume, float pitch) {
-        mc.sndManager.playSoundAt(soundPath, category, (float) x, (float) y, (float) z, volume, pitch);
+        this.mc.sndManager.playSoundAt(soundPath, category, (float) x, (float) y, (float) z, volume, pitch);
     }
 
     @Override
@@ -1962,18 +1959,18 @@ public class RenderGlobal
     @Override
     public void addParticle(String particleId, double x, double y, double z,
                             double motionX, double motionY, double motionZ, int data, double maxDistance) {
-        if (mc == null || mc.activeCamera == null || mc.particleEngine == null) {
+        if (this.mc == null || this.mc.activeCamera == null || this.mc.particleEngine == null) {
             return;
         }
-        double d6 = mc.activeCamera.getX() - x;
-        double d7 = mc.activeCamera.getY() - y;
-        double d8 = mc.activeCamera.getZ() - z;
+        double d6 = this.mc.activeCamera.getX() - x;
+        double d7 = this.mc.activeCamera.getY() - y;
+        double d8 = this.mc.activeCamera.getZ() - z;
         if (d6 * d6 + d7 * d7 + d8 * d8 > maxDistance * maxDistance) {
             return;
         }
-        Particle fx = ParticleDispatcher.getInstance().getDispatch(particleId).newParticle(world, x, y, z, motionX, motionY, motionZ, data);
+        Particle fx = ParticleDispatcher.getInstance().getDispatch(particleId).newParticle(this.world, x, y, z, motionX, motionY, motionZ, data);
         if (fx != null) {
-            mc.particleEngine.add(fx);
+            this.mc.particleEngine.add(fx);
         }
     }
 
@@ -1983,9 +1980,9 @@ public class RenderGlobal
             Colorizers.update(false);
         }
         if (seasonChanged || lightChanged && !LightmapHelper.isLightmapEnabled()) {
-            for (ChunkRenderer chunkRenderer : chunkRenderers) {
+            for (ChunkRenderer chunkRenderer : this.chunkRenderers) {
                 if (chunkRenderer.skyLit && !chunkRenderer.dirty) {
-                    dirtyChunks.add(chunkRenderer);
+                    this.dirtyChunks.add(chunkRenderer);
                     chunkRenderer.setDirty();
                 }
             }
@@ -1997,28 +1994,25 @@ public class RenderGlobal
     }
 
     public void deleteChunkLists() {
-        if (chunkLists >= 0) {
-            GLAllocation.deleteDisplayList(chunkLists);
+        if (this.chunkLists >= 0) {
+            GLAllocation.deleteDisplayList(this.chunkLists);
         }
     }
 
     @Override
     public void levelEvent(@Nullable Player player, int id, int x, int y, int z, int data) {
-        Random random = world.rand;
+        Random random = this.world.rand;
         switch (id) {
-            default:
-                break;
-
             case EVENT_DISPENSER_EMPTY: // Dispenser empty click
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.click", 1.0F, 1.0F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.click", 1.0F, 1.0F);
                 break;
 
             case EVENT_DISPENSER_ITEM: // Dispenser fire item
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.eject", 1.0F, 1.0F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.eject", 1.0F, 1.0F);
                 break;
 
             case EVENT_DISPENSER_PROJECTILE: // Dispenser fire projectile
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.fire", 1.0F, 1.2F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x, y, z, "tile.dispenser.fire", 1.0F, 1.2F);
                 break;
 
             case EVENT_DISPENSER_PARTICLES: // Dispenser eject particles
@@ -2046,37 +2040,39 @@ public class RenderGlobal
                 if (data > 0) {
                     Block<?> block = Blocks.blocksList[data];
 
-                    world.playBlockSoundEffect(null, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, block, EnumBlockSoundEffectType.MINE);
+                    this.world.playBlockSoundEffect(null, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, block, EnumBlockSoundEffectType.MINE);
                 }
-                mc.particleEngine.destroy(x, y, z, data, world.getBlockMetadata(x, y, z));
+                this.mc.particleEngine.destroy(x, y, z, data, this.world.getBlockMetadata(x, y, z));
                 break;
 
             case EVENT_DOOR_SOUND: // Door sound
                 if (java.lang.Math.random() < 0.5D) {
-                    world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "random.door_open", 1.0F, world.rand.nextFloat() * 0.1F + 0.9F);
+                    this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "random.door_open", 1.0F, this.world.rand.nextFloat() * 0.1F + 0.9F);
                 } else {
-                    world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "random.door_close", 1.0F, world.rand.nextFloat() * 0.1F + 0.9F);
+                    this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "random.door_close", 1.0F, this.world.rand.nextFloat() * 0.1F + 0.9F);
                 }
                 break;
 
             case EVENT_FIRE_EXTINGUISH: // Fire extinguish sound
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, "random.fizz", 0.5F, 2.6F + (random.nextFloat() - random.nextFloat()) * 0.8F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, "random.fizz", 0.5F, 2.6F + (random.nextFloat() - random.nextFloat()) * 0.8F);
                 break;
 
             case EVENT_JUKEBOX_TOGGLE: // Jukebox play/stop record
-                if (Item.itemsList[data] instanceof ItemDiscMusic) {
-                    ItemDiscMusic record = ((ItemDiscMusic) Item.itemsList[data]);
-                    world.playRecord(record.recordName, record.recordAuthor, x, y, z);
+                if (Item.itemsList[data] instanceof ItemDiscMusic record) {
+                    this.world.playRecord(record.recordName, record.recordAuthor, x, y, z);
                 } else {
-                    world.playRecord(null, null, x, y, z);
+                    this.world.playRecord(null, null, x, y, z);
                 }
                 break;
             case EVENT_PISTON_EXTEND: // Piston extend
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5F, (double) y + 0.5F, (double) z + 0.5F, "tile.piston.out", 0.5F, world.rand.nextFloat() * 0.25F + 0.6F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5F, (double) y + 0.5F, (double) z + 0.5F, "tile.piston.out", 0.5F, this.world.rand.nextFloat() * 0.25F + 0.6F);
                 break;
             case EVENT_PISTON_RETRACT: // Piston retract
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5F, (double) y + 0.5F, (double) z + 0.5F, "tile.piston.in", 0.5F, world.rand.nextFloat() * 0.25F + 0.6F);
+                this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) x + 0.5F, (double) y + 0.5F, (double) z + 0.5F, "tile.piston.in", 0.5F, this.world.rand.nextFloat() * 0.25F + 0.6F);
                 break;
+            default:
+                break;
+
         }
     }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/WorldRenderer.java b/game/client/src/main/java/net/minecraft/client/render/WorldRenderer.java
index b9cacd461..9765a92d1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/WorldRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/WorldRenderer.java
@@ -9,12 +9,16 @@ import com.mojang.logging.LogUtils;
 import net.minecraft.client.render.window.CursorShape;
 import net.minecraft.client.render.worldtype.WorldTypeFXDispatcher;
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.animal.MobPig;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.weather.IPrecipitation;
 import org.jetbrains.annotations.NotNull;
 import org.joml.Matrix4f;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.input.Mouse;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.util.glu.GLU;
@@ -41,21 +45,18 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.util.debug.Debug;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Time;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.chunk.provider.IChunkProvider;
 import net.minecraft.core.world.weather.Weather;
 import org.slf4j.Logger;
 
-public class WorldRenderer
-{
+public class WorldRenderer {
     private static final Logger LOGGER = LogUtils.getLogger();
     public static final long nsPerSecond = 1_000_000_000L;
     public final LightmapHelper lightmapHelper;
@@ -67,7 +68,7 @@ public class WorldRenderer
     private Entity pointedEntity;
     private final MouseFilter mouseFilterXAxis;
     private final MouseFilter mouseFilterYAxis;
-    private float fovModifier;
+    private final float fovModifier;
     private float fovModifierLast;
     private long systemTime;
     private final Random random;
@@ -75,157 +76,153 @@ public class WorldRenderer
     public boolean zooming = false;
     private float zoomProgress;
 
-    public WorldRenderer(Minecraft minecraft)
-    {
-    	this.mc = minecraft;
-    	this.lightmapHelper = new LightmapHelper(minecraft, this);
-        farPlaneDistance = 0.0F;
-        pointedEntity = null;
-        mouseFilterXAxis = new MouseFilter();
-        mouseFilterYAxis = new MouseFilter();
-        fovModifier = 0.0F;
-        fovModifierLast = 0.0F;
-        systemTime = 0L;
-        random = new Random();
-        rainSoundCounter = 0;
-        itemRenderer = new ItemRenderer(minecraft);
-        fogManager = new FogManager(mc);
+    public WorldRenderer(Minecraft minecraft) {
+        this.mc = minecraft;
+        this.lightmapHelper = new LightmapHelper(minecraft, this);
+        this.farPlaneDistance = 0.0F;
+        this.pointedEntity = null;
+        this.mouseFilterXAxis = new MouseFilter();
+        this.mouseFilterYAxis = new MouseFilter();
+        this.fovModifier = 0.0F;
+        this.fovModifierLast = 0.0F;
+        this.systemTime = 0L;
+        this.random = new Random();
+        this.rainSoundCounter = 0;
+        this.itemRenderer = new ItemRenderer(minecraft);
+        this.fogManager = new FogManager(this.mc);
     }
 
-    public void updateRenderer()
-    {
+    public void updateRenderer() {
         updateSpeedFov();
-        fovModifierLast = fovModifier;
-        if(mc.activeCamera == null)
-        {
-            mc.activeCamera = new EntityCameraFirstPerson(mc, mc.thePlayer);
+        this.fovModifierLast = this.fovModifier;
+        if (this.mc.activeCamera == null) {
+            this.mc.activeCamera = new EntityCameraFirstPerson(this.mc, this.mc.thePlayer);
         }
-        mc.activeCamera.tick();
+        this.mc.activeCamera.tick();
 
-        fogManager.updateBrightness();
+        this.fogManager.updateBrightness();
 
-        rendererUpdateCount++;
-        itemRenderer.updateEquippedItem();
+        this.rendererUpdateCount++;
+        this.itemRenderer.updateEquippedItem();
         addRainParticles();
-        lightmapHelper.tick();
+        this.lightmapHelper.tick();
     }
 
     private float b = 1.0f;
     private float a = 1.0f;
     private float currentFovModifier = 1.0f;
 
-    private void updateSpeedFov()
-    {
-        PlayerLocal player = mc.thePlayer;
-        currentFovModifier = mc.gameSettings.fovModification.value ? player.getFovModifier() : 1f;
-        a = b;
-        b += (currentFovModifier - b) * 0.5f;
+    private void updateSpeedFov() {
+        PlayerLocal player = this.mc.thePlayer;
+        this.currentFovModifier = this.mc.gameSettings.fovModification.value ? player.getFovModifier() : 1f;
+        this.a = this.b;
+        this.b += (this.currentFovModifier - this.b) * 0.5f;
     }
 
-	public void getMouseOver(float partialTicks) {
-		if(mc.activeCamera == null) {
-			return;
-		}
-		if(mc.currentWorld == null) {
-			return;
-		}
-		
-		final double blockReach = mc.playerController.getBlockReachDistance();
-		final double entityReach = mc.playerController.getEntityReachDistance();
-		
-		Vec3 pos1 = mc.thePlayer.getPosition(partialTicks, true);
-		Vec3 look = mc.thePlayer.getViewVector(partialTicks);
-		Vec3 pos2 = pos1.add(look.x * blockReach, look.y * blockReach, look.z * blockReach);
-		
-		// Raytrace blocks
-		mc.objectMouseOver = mc.thePlayer.rayCast(blockReach, partialTicks, false, false, true);
+    public void getMouseOver(float partialTicks) {
+        if (this.mc.activeCamera == null) {
+            return;
+        }
+        if (this.mc.currentWorld == null) {
+            return;
+        }
+
+        final double blockReach = this.mc.playerController.getBlockReachDistance();
+        final double entityReach = this.mc.playerController.getEntityReachDistance();
+
+        Vector3dc pos1 = this.mc.thePlayer.getPosition(partialTicks, true);
+        Vector3dc look = this.mc.thePlayer.getViewVector(partialTicks);
+        assert look != null;
+        Vector3dc pos2 = pos1.add(look.x() * blockReach, look.y() * blockReach, look.z() * blockReach, new Vector3d());
+
+        // Raytrace blocks
+        this.mc.objectMouseOver = this.mc.thePlayer.rayCast(blockReach, partialTicks, false, false, true);
 //		mc.objectMouseOver = mc.currentWorld.checkBlockCollisionBetweenPoints(pos1, pos2, false, false, true);
 
-		// Calculate again because block raytrace changes the values
+        // Calculate again because block raytrace changes the values
 //		pos1 = mc.thePlayer.getPosition(partialTicks, false);
 //		look = mc.thePlayer.getViewVector(partialTicks);
 //		pos2 = pos1.add(look.x * entityReach, look.y * entityReach, look.z * entityReach);
-		
-		double hitBlockDistance = 1000.0;
-		if(mc.objectMouseOver != null) {
-			hitBlockDistance = pos1.distanceTo(mc.objectMouseOver.location);
-		}
-		
-		this.pointedEntity = null;
-		float expand = 1.0f;
-		AABB entitySearchBox = mc.thePlayer.bb.expand(look.x * entityReach, look.y * entityReach, look.z * entityReach).grow(expand, expand, expand);
-		
-		List<Entity> entities = mc.currentWorld.getEntitiesWithinAABBExcludingEntity(mc.thePlayer, entitySearchBox);
-		
-		// Search for the closest hit entity
-		double pointedEntityDistance = 0.0;
-		for (int i = 0; i < entities.size(); i++) {
-			Entity entity = entities.get(i);
-			if(!entity.isSelectable()) {
-				continue;
-			}
-			
-			float hitRadius = entity == mc.thePlayer.vehicle ? 0 : entity.getPickRadius();
-			AABB hitBox = entity.bb.grow(hitRadius, hitRadius, hitRadius);
-			
-			if(hitBox.contains(pos1)) {
-				this.pointedEntity = entity;
-				pointedEntityDistance = 0.0;
-				continue;
-			}
-			
-			HitResult hitResult = hitBox.clip(pos1, pos2);
-			if(hitResult == null) {
-				continue;
-			}
-			
-			double entityDistance = pos1.distanceTo(hitResult.location);
-			if(this.pointedEntity == null || entityDistance < pointedEntityDistance) {
-				this.pointedEntity = entity;
-				pointedEntityDistance = entityDistance;
-			}
-		}
-		
-		// Check if the entity can be reached, and if the entity is not behind a block
-		if(pointedEntityDistance > hitBlockDistance || pointedEntityDistance > entityReach) {
-			this.pointedEntity = null;
-		}
-		
-		if(pointedEntity != null) {
-			mc.objectMouseOver = new HitResult.Entity(pointedEntity);
-		}
-		
-	}
-
-    private float getFOVModifier(float partialTick, boolean isModifiedByFOV)
-    {
+
+        double hitBlockDistance = 1000.0;
+        if (this.mc.objectMouseOver != null) {
+            hitBlockDistance = pos1.distance(this.mc.objectMouseOver.location);
+        }
+
+        this.pointedEntity = null;
+        float expand = 1.0f;
+        AABBd entitySearchBox = MathHelper.aabbExpand(this.mc.thePlayer.bb, look.x() * entityReach, look.y() * entityReach, look.z() * entityReach, new AABBd());
+        MathHelper.aabbGrow(entitySearchBox, expand, expand, expand, entitySearchBox);
+
+        List<Entity> entities = this.mc.currentWorld.getEntitiesWithinAABBExcludingEntity(this.mc.thePlayer, entitySearchBox);
+
+        // Search for the closest hit entity
+        double pointedEntityDistance = 0.0;
+        for (int i = 0; i < entities.size(); i++) {
+            Entity entity = entities.get(i);
+            if (!entity.isSelectable()) {
+                continue;
+            }
+
+            float hitRadius = entity == this.mc.thePlayer.vehicle ? 0 : entity.getPickRadius();
+            AABBdc hitBox = MathHelper.aabbGrow(entity.bb, hitRadius, hitRadius, hitRadius, new AABBd());
+
+            if (hitBox.containsPoint(pos1)) {
+                this.pointedEntity = entity;
+                pointedEntityDistance = 0.0;
+                continue;
+            }
+
+            HitResult hitResult = MathHelper.aabbClip(hitBox, pos1, pos2);
+            if (hitResult == null) {
+                continue;
+            }
+
+            double entityDistance = pos1.distance(hitResult.location);
+            if (this.pointedEntity == null || entityDistance < pointedEntityDistance) {
+                this.pointedEntity = entity;
+                pointedEntityDistance = entityDistance;
+            }
+        }
+
+        // Check if the entity can be reached, and if the entity is not behind a block
+        if (pointedEntityDistance > hitBlockDistance || pointedEntityDistance > entityReach) {
+            this.pointedEntity = null;
+        }
+
+        if (this.pointedEntity != null) {
+            this.mc.objectMouseOver = new HitResult.Entity(this.pointedEntity);
+        }
+
+    }
+
+    private float getFOVModifier(float partialTick, boolean isModifiedByFOV) {
         Mob entityliving = null;
-        if (mc.activeCamera instanceof EntityCamera entityCamera) {
+        if (this.mc.activeCamera instanceof EntityCamera entityCamera) {
             entityliving = entityCamera.mob;
         }
         float fov = 70f;
-        if(isModifiedByFOV) {
-            fov = (int)(mc.activeCamera.getFov() * 100 + 30);
-            fov *= a + (b - a) * partialTick;
+        if (isModifiedByFOV) {
+            fov = (int) (this.mc.activeCamera.getFov() * 100 + 30);
+            fov *= this.a + (this.b - this.a) * partialTick;
         }
-        if(mc.gameSettings.fovModification.value && CameraUtil.isUnderLiquid(mc.activeCamera, mc.currentWorld, Material.water, partialTick)) {
+        if (this.mc.gameSettings.fovModification.value && CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Materials.WATER, partialTick)) {
             fov = fov - 10;
         }
-        if(entityliving != null && entityliving.getHealth() <= 0) {
-            float f2 = (float)entityliving.deathTime + partialTick;
+        if (entityliving != null && entityliving.getHealth() <= 0) {
+            float f2 = (float) entityliving.deathTime + partialTick;
             fov /= (1.0F - 500F / (f2 + 500F)) * 2.0F + 1.0F;
         }
         return fov + this.fovModifierLast + (this.fovModifier - this.fovModifierLast) * partialTick;
     }
 
     @Deprecated
-    private void hurtCameraEffect(float partialTick)
-    {
+    private void hurtCameraEffect(float partialTick) {
         if (!(this.mc.activeCamera instanceof EntityCamera entityCamera)) return;
         Mob mob = entityCamera.mob;
-        float f1 = (float)mob.hurtTime - partialTick;
-        if(mob.getHealth() <= 0) {
-            float f2 = (float)mob.deathTime + partialTick;
+        float f1 = (float) mob.hurtTime - partialTick;
+        if (mob.getHealth() <= 0) {
+            float f2 = (float) mob.deathTime + partialTick;
             glRotatef(40F - 8000F / (f2 + 200F), 0.0F, 0.0F, 1.0F);
         }
         if (f1 >= 0.0F) {
@@ -241,9 +238,9 @@ public class WorldRenderer
     private @NotNull Matrix4f hurtCameraEffect(@NotNull Matrix4f matrix, float partialTick) {
         if (!(this.mc.activeCamera instanceof EntityCamera entityCamera)) return matrix;
         Mob mob = entityCamera.mob;
-        float hurtInterp = (float)mob.hurtTime - partialTick;
-        if(mob.getHealth() <= 0) {
-            float f2 = (float)mob.deathTime + partialTick;
+        float hurtInterp = (float) mob.hurtTime - partialTick;
+        if (mob.getHealth() <= 0) {
+            float f2 = (float) mob.deathTime + partialTick;
             matrix.rotate(org.joml.Math.toRadians(40F - 8000F / (f2 + 200F)), 0.0F, 0.0F, 1.0F);
         }
         if (hurtInterp >= 0.0F) {
@@ -258,11 +255,8 @@ public class WorldRenderer
     }
 
     @Deprecated
-    private void setupViewBobbing(float partialTick, boolean isHand)
-    {
-        if (mc.activeCamera instanceof EntityCamera && ((EntityCamera) mc.activeCamera).mob instanceof Player)
-        {
-            Player player = (Player)((EntityCamera) mc.activeCamera).mob;
+    private void setupViewBobbing(float partialTick, boolean isHand) {
+        if (this.mc.activeCamera instanceof EntityCamera && ((EntityCamera) this.mc.activeCamera).mob instanceof Player player) {
             float walkDist = -MathHelper.lerp(player.walkDistO, player.walkDist, partialTick);
             float cameraVel = MathHelper.lerp(player.cameraVelocityOld, player.cameraVelocity, partialTick);
             float cameraPitch = MathHelper.lerp(player.prevCameraPitch, player.cameraPitch, partialTick);
@@ -283,7 +277,7 @@ public class WorldRenderer
     }
 
     private @NotNull Matrix4f setupViewBobbing(@NotNull Matrix4f matrix, float partialTick, boolean isHand) {
-        if (mc.activeCamera instanceof EntityCamera entityCamera && entityCamera.mob instanceof Player player) {
+        if (this.mc.activeCamera instanceof EntityCamera entityCamera && entityCamera.mob instanceof Player player) {
             float walkDist = -MathHelper.lerp(player.walkDistO, player.walkDist, partialTick);
             float cameraVel = MathHelper.lerp(player.cameraVelocityOld, player.cameraVelocity, partialTick);
             float cameraPitch = MathHelper.lerp(player.prevCameraPitch, player.cameraPitch, partialTick);
@@ -304,69 +298,54 @@ public class WorldRenderer
         return matrix;
     }
 
-    private void setupCamera(float partialTick)
-    {
-        if (mc.activeCamera instanceof EntityCamera entityCamera)
-        {
+    private void setupCamera(float partialTick) {
+        if (this.mc.activeCamera instanceof EntityCamera entityCamera) {
             Mob mob = entityCamera.mob;
-            if (mc.currentScreen instanceof ScreenPhotoMode)
-            {
-                mc.activeCamera = new EntityCameraIsometric(mc, mob);
-            }
-            else if (mob.isPlayerSleeping())
-            {
-                if (!(mc.activeCamera instanceof EntityCameraSleeping))
-                {
-                    mc.activeCamera = new EntityCameraSleeping(mc, mob,
-                            MathHelper.floor(mob.x), MathHelper.floor(mob.y), MathHelper.floor(mob.z),
-                            mc.activeCamera.getX(partialTick), mc.activeCamera.getY(partialTick), mc.activeCamera.getZ(partialTick), mc.activeCamera.getYRot(partialTick), mc.activeCamera.getXRot(partialTick)
+            if (this.mc.currentScreen instanceof ScreenPhotoMode) {
+                this.mc.activeCamera = new EntityCameraIsometric(this.mc, mob);
+            } else if (mob.isPlayerSleeping()) {
+                if (!(this.mc.activeCamera instanceof EntityCameraSleeping)) {
+                    this.mc.activeCamera = new EntityCameraSleeping(this.mc, mob,
+                        MathHelper.floor(mob.x), MathHelper.floor(mob.y), MathHelper.floor(mob.z),
+                        this.mc.activeCamera.getX(partialTick), this.mc.activeCamera.getY(partialTick), this.mc.activeCamera.getZ(partialTick), this.mc.activeCamera.getYRot(partialTick), this.mc.activeCamera.getXRot(partialTick)
                     );
                 }
-            }
-            else if (mc.gameSettings.thirdPersonView.value == 0 && !(mc.activeCamera instanceof EntityCameraFirstPerson))
-            {
-                mc.activeCamera = new EntityCameraFirstPerson(mc, mob);
-            }
-            else if (mc.gameSettings.thirdPersonView.value == 1 && !(mc.activeCamera instanceof EntityCameraThirdPersonRear))
-            {
-                mc.activeCamera = new EntityCameraThirdPersonRear(mc, mob);
-            }
-            else if (mc.gameSettings.thirdPersonView.value == 2 && !(mc.activeCamera instanceof EntityCameraThirdPersonFront))
-            {
-                mc.activeCamera = new EntityCameraThirdPersonFront(mc, mob);
+            } else if (this.mc.gameSettings.thirdPersonView.value == 0 && !(this.mc.activeCamera instanceof EntityCameraFirstPerson)) {
+                this.mc.activeCamera = new EntityCameraFirstPerson(this.mc, mob);
+            } else if (this.mc.gameSettings.thirdPersonView.value == 1 && !(this.mc.activeCamera instanceof EntityCameraThirdPersonRear)) {
+                this.mc.activeCamera = new EntityCameraThirdPersonRear(this.mc, mob);
+            } else if (this.mc.gameSettings.thirdPersonView.value == 2 && !(this.mc.activeCamera instanceof EntityCameraThirdPersonFront)) {
+                this.mc.activeCamera = new EntityCameraThirdPersonFront(this.mc, mob);
             }
         }
 
     }
 
     @Deprecated
-    private void orientCamera(float partialTick)
-    {
+    private void orientCamera(float partialTick) {
         setupCamera(partialTick);
-        mc.activeCamera.applyGlTransformations();
+        this.mc.activeCamera.applyGlTransformations();
 
-        if(!(mc.currentScreen instanceof ScreenPhotoMode) && !mc.gameSettings.lockCamera.value)
-        {
-            glRotatef((float) mc.activeCamera.getXRot(partialTick), 1.0F, 0.0F, 0.0F);
-            glRotatef((float) (mc.activeCamera.getYRot(partialTick) + 180F), 0.0F, 1.0F, 0.0F);
+        if (!(this.mc.currentScreen instanceof ScreenPhotoMode) && !this.mc.gameSettings.lockCamera.value) {
+            glRotatef((float) this.mc.activeCamera.getXRot(partialTick), 1.0F, 0.0F, 0.0F);
+            glRotatef((float) (this.mc.activeCamera.getYRot(partialTick) + 180F), 0.0F, 1.0F, 0.0F);
         }
 
-        if (mc.currentScreen instanceof ScreenPhotoMode)
-        {
-            glRotatef(((ScreenPhotoMode)mc.currentScreen).getTilt(partialTick), 1.0F, 0.0F, 0.0F);
-            glRotatef(45f + 45F * ((ScreenPhotoMode)mc.currentScreen).getRotation(partialTick), 0.0F, 1.0F, 0.0F);
+        if (this.mc.currentScreen instanceof ScreenPhotoMode) {
+            glRotatef(((ScreenPhotoMode) this.mc.currentScreen).getTilt(partialTick), 1.0F, 0.0F, 0.0F);
+            glRotatef(45f + 45F * ((ScreenPhotoMode) this.mc.currentScreen).getRotation(partialTick), 0.0F, 1.0F, 0.0F);
         }
     }
 
     public @NotNull Matrix4f orientCamera(@NotNull Matrix4f matrix, float partialTick) {
         setupCamera(partialTick);
 
-        if(!(mc.currentScreen instanceof ScreenPhotoMode) && !mc.gameSettings.lockCamera.value) {
-            matrix.rotate(org.joml.Math.toRadians((float) mc.activeCamera.getXRot(partialTick)), 1.0F, 0.0F, 0.0F);
-            matrix.rotate(org.joml.Math.toRadians((float) (mc.activeCamera.getYRot(partialTick) + 180F)), 0.0F, 1.0F, 0.0F);
+        if (!(this.mc.currentScreen instanceof ScreenPhotoMode) && !this.mc.gameSettings.lockCamera.value) {
+            matrix.rotate(org.joml.Math.toRadians((float) this.mc.activeCamera.getXRot(partialTick)), 1.0F, 0.0F, 0.0F);
+            matrix.rotate(org.joml.Math.toRadians((float) (this.mc.activeCamera.getYRot(partialTick) + 180F)), 0.0F, 1.0F, 0.0F);
         }
 
-        if (mc.currentScreen instanceof ScreenPhotoMode screenPhotoMode) {
+        if (this.mc.currentScreen instanceof ScreenPhotoMode screenPhotoMode) {
             matrix.rotate(org.joml.Math.toRadians(screenPhotoMode.getTilt(partialTick)), 1.0F, 0.0F, 0.0F);
             matrix.rotate(org.joml.Math.toRadians(45f + 45F * screenPhotoMode.getRotation(partialTick)), 0.0F, 1.0F, 0.0F);
         }
@@ -374,37 +353,32 @@ public class WorldRenderer
     }
 
     @Deprecated
-    private void setupCameraTransform(final float partialTicks)
-    {
+    private void setupCameraTransform(final float partialTicks) {
         this.farPlaneDistance = this.mc.gameSettings.renderDistance.value * 16;
         glMatrixMode(GL_PROJECTION);
         glLoadIdentity();
         float fov = getFOVModifier(partialTicks, true);
-        if(this.zooming) {
+        if (this.zooming) {
             fov = getZoomedFOV(fov, partialTicks);
         } else {
             this.zoomProgress = 0;
         }
-        if (this.mc.currentScreen instanceof ScreenPhotoMode)
-        {
+        if (this.mc.currentScreen instanceof ScreenPhotoMode) {
             final double div = java.lang.Math.pow(2, ((ScreenPhotoMode) this.mc.currentScreen).getZoom(partialTicks));
             glTranslatef(1, 1, 0);
             glOrtho(0, this.mc.gameWindow.getWidthPixels() / div, 0, this.mc.gameWindow.getHeightPixels() / div, this.farPlaneDistance * -2.0f, this.farPlaneDistance * 2.0f);
             glTranslatef(((ScreenPhotoMode) this.mc.currentScreen).getPanX(partialTicks), -((ScreenPhotoMode) this.mc.currentScreen).getPanY(partialTicks), 0);
-        } else
-        {
+        } else {
             GLU.gluPerspective(fov, (float) this.mc.gameWindow.getWidthPixels() / (float) this.mc.gameWindow.getHeightPixels(), 0.05F, this.farPlaneDistance * 2.0F);
         }
         glMatrixMode(GL_MODELVIEW);
         glLoadIdentity();
         hurtCameraEffect(partialTicks);
-        if(this.mc.gameSettings.viewBobbing.value && !(this.mc.currentScreen instanceof ScreenPhotoMode))
-        {
+        if (this.mc.gameSettings.viewBobbing.value && !(this.mc.currentScreen instanceof ScreenPhotoMode)) {
             setupViewBobbing(partialTicks, false);
         }
         final float portalIntensity = this.mc.gameSettings.screenMotionEffects.value ? MathHelper.lerp(this.mc.thePlayer.prevTimeInPortal, this.mc.thePlayer.timeInPortal, partialTicks) : 0f;
-        if(portalIntensity > 0.0F)
-        {
+        if (portalIntensity > 0.0F) {
             float f3 = 5F / (portalIntensity * portalIntensity + 5F) - portalIntensity * 0.04F;
             f3 *= f3;
             glRotatef(((float) this.rendererUpdateCount + partialTicks) * 20F, 0.0F, 1.0F, 1.0F);
@@ -417,7 +391,7 @@ public class WorldRenderer
     public @NotNull Matrix4f getProjectionMatrix(@NotNull Matrix4f matrix, float partialTick) {
         this.farPlaneDistance = this.mc.gameSettings.renderDistance.value * 16;
         float fov = getFOVModifier(partialTick, true);
-        if(this.zooming) {
+        if (this.zooming) {
             fov = getZoomedFOV(fov, partialTick);
         } else {
             this.zoomProgress = 0;
@@ -426,7 +400,7 @@ public class WorldRenderer
             final double div = java.lang.Math.pow(2, screenPhotoMode.getZoom(partialTick));
             matrix.translate(1, 1, 0);
             matrix.ortho(0f, (float) (this.mc.gameWindow.getWidthPixels() / div), 0f, (float) (this.mc.gameWindow.getHeightPixels() / div), this.farPlaneDistance * -2.0f, this.farPlaneDistance * 2.0f);
-            matrix.translate(screenPhotoMode.getPanX(partialTick), -((ScreenPhotoMode) this.mc.currentScreen).getPanY(partialTick), 0);
+            matrix.translate(screenPhotoMode.getPanX(partialTick), -screenPhotoMode.getPanY(partialTick), 0);
         } else {
             matrix.identity().perspective(org.joml.Math.toRadians(fov), (float) this.mc.gameWindow.getWidthPixels() / (float) this.mc.gameWindow.getHeightPixels(), 0.05F, this.farPlaneDistance * 2.0F);
         }
@@ -441,7 +415,7 @@ public class WorldRenderer
         }
 
         final float portalIntensity = this.mc.gameSettings.screenMotionEffects.value ? MathHelper.lerp(this.mc.thePlayer.prevTimeInPortal, this.mc.thePlayer.timeInPortal, partialTick) : 0f;
-        if(portalIntensity > 0.0F) {
+        if (portalIntensity > 0.0F) {
             float f3 = 5F / (portalIntensity * portalIntensity + 5F) - portalIntensity * 0.04F;
             f3 *= f3;
             matrix.rotate(org.joml.Math.toRadians(((float) this.rendererUpdateCount + partialTick) * 20F), 0.0F, 1.0F, 1.0F);
@@ -453,519 +427,468 @@ public class WorldRenderer
         return matrix;
     }
 
-    private void renderHand(float partialTick)
-    {
+    private void renderHand(float partialTick) {
         glMatrixMode(GL_PROJECTION);
         glLoadIdentity();
         float fov = getFOVModifier(partialTick, false);
-        if(zooming){
+        if (this.zooming) {
             fov = getZoomedFOV(fov, partialTick);
         } else {
-            zoomProgress = 0;
+            this.zoomProgress = 0;
         }
         // Fix hand being rendered inside of blocks / behind rain
         glTranslatef(0.0f, 0.0f, -1.0f);
         glScalef(1.0f, 1.0f, 0.1f);
-        
-        GLU.gluPerspective(fov, (float)mc.gameWindow.getWidthPixels() / (float)mc.gameWindow.getHeightPixels(), 0.05F, farPlaneDistance * 2.0F);
+
+        GLU.gluPerspective(fov, (float) this.mc.gameWindow.getWidthPixels() / (float) this.mc.gameWindow.getHeightPixels(), 0.05F, this.farPlaneDistance * 2.0F);
         glMatrixMode(GL_MODELVIEW);
         glLoadIdentity();
 
         glPushMatrix();
         hurtCameraEffect(partialTick);
-        if(mc.gameSettings.viewBobbing.value)
-        {
+        if (this.mc.gameSettings.viewBobbing.value) {
             setupViewBobbing(partialTick, true);
         }
-        if(mc.gameSettings.thirdPersonView.value == 0 && !(mc.currentScreen instanceof ScreenPhotoMode) && !(!(mc.activeCamera instanceof EntityCamera) || ((EntityCamera) mc.activeCamera).mob.isPlayerSleeping()) && mc.gameSettings.immersiveMode.drawHand())
-        {
-            lightmapHelper.enableLightmapRendering();
-            if(!zooming) itemRenderer.renderItemInFirstPerson(partialTick);
-            lightmapHelper.disableLightmapRendering();
+        if (this.mc.gameSettings.thirdPersonView.value == 0 && !(this.mc.currentScreen instanceof ScreenPhotoMode) && !(!(this.mc.activeCamera instanceof EntityCamera) || ((EntityCamera) this.mc.activeCamera).mob.isPlayerSleeping()) && this.mc.gameSettings.immersiveMode.drawHand()) {
+            this.lightmapHelper.enableLightmapRendering();
+            if (!this.zooming) this.itemRenderer.renderItemInFirstPerson(partialTick);
+            this.lightmapHelper.disableLightmapRendering();
         }
         glPopMatrix();
-        
+
         Debug.change("post");
-        mc.renderer.endRenderWorld(partialTick);
-        
-        if(mc.gameSettings.thirdPersonView.value == 0 && !(!(mc.activeCamera instanceof EntityCamera) || ((EntityCamera) mc.activeCamera).mob.isPlayerSleeping()))
-        {
-            itemRenderer.renderOverlays(partialTick);
+        this.mc.renderer.endRenderWorld(partialTick);
+
+        if (this.mc.gameSettings.thirdPersonView.value == 0 && !(!(this.mc.activeCamera instanceof EntityCamera) || ((EntityCamera) this.mc.activeCamera).mob.isPlayerSleeping())) {
+            this.itemRenderer.renderOverlays(partialTick);
             hurtCameraEffect(partialTick);
         }
-        if(mc.gameSettings.viewBobbing.value)
-        {
+        if (this.mc.gameSettings.viewBobbing.value) {
             setupViewBobbing(partialTick, false);
         }
     }
-    private float getZoomedFOV(float currentFov, float partialTick){
+
+    private float getZoomedFOV(float currentFov, float partialTick) {
         currentFov *= 0.45f;
-        float prevZoomProgress = zoomProgress;
-        zoomProgress -= Mouse.getDWheel()/4f;
-        zoomProgress = MathHelper.clamp(zoomProgress, -7.5f, 7.5f);
+        float prevZoomProgress = this.zoomProgress;
+        this.zoomProgress -= Mouse.getDWheel() / 4f;
+        this.zoomProgress = MathHelper.clamp(this.zoomProgress, -7.5f, 7.5f);
         final float maxFOV = 160f;
         final float minFOV = 5f;
-        float _zoom = prevZoomProgress + (zoomProgress - prevZoomProgress) * partialTick;
-        if (zoomProgress > 0){
+        float _zoom = prevZoomProgress + (this.zoomProgress - prevZoomProgress) * partialTick;
+        if (this.zoomProgress > 0) {
             return currentFov + 2 * (maxFOV - currentFov) * (logisticFunc(_zoom) - 0.5f);
         }
         return minFOV + 2 * (currentFov - minFOV) * logisticFunc(_zoom);
     }
-    
-    
-    private float logisticFunc(float val){
+
+
+    private float logisticFunc(float val) {
         final float L = 1;
         final float k = 1.1f;
         final float xo = 0f;
-        return (float) ((L)/(1 + Math.pow(Math.E, -k * (val - xo))));
+        return (float) ((L) / (1 + Math.pow(Math.E, -k * (val - xo))));
     }
 
-    public void updateCameraAndRender(float partialTick)
-    {
-    	lightmapHelper.update(partialTick);
-        if(mc.inGameHasFocus)
-        {
-			if(Mouse.isGrabbed()) {
-				float sensitivity = mc.gameSettings.mouseSensitivity.value * 0.6F + 0.2F;
-				sensitivity = sensitivity * sensitivity * sensitivity * 8.0f;
-				if(zooming) sensitivity *= 0.25f;
-				
-				float deltaX = (float) mc.mouseInput.deltaX * sensitivity;
-				float deltaY = (float) mc.mouseInput.deltaY * sensitivity;
+    public void updateCameraAndRender(float partialTick) {
+        this.lightmapHelper.update(partialTick);
+        if (this.mc.inGameHasFocus) {
+            if (Mouse.isGrabbed()) {
+                float sensitivity = this.mc.gameSettings.mouseSensitivity.value * 0.6F + 0.2F;
+                sensitivity = sensitivity * sensitivity * sensitivity * 8.0f;
+                if (this.zooming) sensitivity *= 0.25f;
+
+                float deltaX = (float) this.mc.mouseInput.deltaX * sensitivity;
+                float deltaY = (float) this.mc.mouseInput.deltaY * sensitivity;
 
 //                System.out.printf("%s %s\n", deltaX, deltaY);
 
-				int l = 1;
-				if(mc.gameSettings.invertMouse.value) {
-					l = -1;
-				}
-				if(mc.gameSettings.smoothCamera.value) {
-					deltaX = mouseFilterXAxis.getSmoothedDelta(deltaX, 0.05F * sensitivity);
-					deltaY = mouseFilterYAxis.getSmoothedDelta(deltaY, 0.05F * sensitivity);
-				} else {
-                    mouseFilterXAxis.reset();
-                    mouseFilterYAxis.reset();
+                int l = 1;
+                if (this.mc.gameSettings.invertMouse.value) {
+                    l = -1;
                 }
-				mc.thePlayer.interpolateTurn(deltaX, deltaY * (float) l);
+                if (this.mc.gameSettings.smoothCamera.value) {
+                    deltaX = this.mouseFilterXAxis.getSmoothedDelta(deltaX, 0.05F * sensitivity);
+                    deltaY = this.mouseFilterYAxis.getSmoothedDelta(deltaY, 0.05F * sensitivity);
+                } else {
+                    this.mouseFilterXAxis.reset();
+                    this.mouseFilterYAxis.reset();
+                }
+                this.mc.thePlayer.interpolateTurn(deltaX, deltaY * (float) l);
             }
-            if (mc.controllerInput != null) {
-                double speed = Time.delta * 2000 * (mc.gameSettings.controllerSensitivity.value + 0.5f);
-                if(zooming) speed *= 0.25f;
+            if (this.mc.controllerInput != null) {
+                double speed = Time.delta * 2000 * (this.mc.gameSettings.controllerSensitivity.value + 0.5f);
+                if (this.zooming) speed *= 0.25f;
 
-                double x = mc.controllerInput.joyRight.getX() * speed;
-                double y = -mc.controllerInput.joyRight.getY() * speed;
+                double x = this.mc.controllerInput.joyRight.getX() * speed;
+                double y = -this.mc.controllerInput.joyRight.getY() * speed;
 
-                mc.thePlayer.interpolateTurn((float)x, (float)y);
+                this.mc.thePlayer.interpolateTurn((float) x, (float) y);
             }
-            if(!mc.gameSettings.showFrameTimes.value){
-            	// Arrow key turning
-            	// !!!!! Needs to happen somewhere that isnt updated only 20 times per second
-                PlayerInput playerInput = mc.thePlayer.input;
-                
+            if (!this.mc.gameSettings.showFrameTimes.value) {
+                // Arrow key turning
+                // !!!!! Needs to happen somewhere that isnt updated only 20 times per second
+                PlayerInput playerInput = this.mc.thePlayer.input;
+
                 float x = 0.0f;
                 float y = 0.0f;
-                
-                playerInput.pressedLookUp = mc.gameSettings.keyLookUp.isPressed();
-                playerInput.pressedLookDown = mc.gameSettings.keyLookDown.isPressed();
-                playerInput.pressedLookLeft = mc.gameSettings.keyLookLeft.isPressed();
-                playerInput.pressedLookRight = mc.gameSettings.keyLookRight.isPressed();
-                
-                if(playerInput.pressedLookUp) y++;
-                if(playerInput.pressedLookDown) y--;
-                
-                if(playerInput.pressedLookLeft) x--;
-                if(playerInput.pressedLookRight) x++;
-                
-                float sensitivity = (float) (Time.delta * 1000 * (mc.gameSettings.mouseSensitivity.value + 0.5f));
-                if(mc.thePlayer.isSneaking()) sensitivity *= 0.5f;
-				if(zooming) sensitivity *= 0.25f;
-                
+
+                playerInput.pressedLookUp = this.mc.gameSettings.keyLookUp.isPressed();
+                playerInput.pressedLookDown = this.mc.gameSettings.keyLookDown.isPressed();
+                playerInput.pressedLookLeft = this.mc.gameSettings.keyLookLeft.isPressed();
+                playerInput.pressedLookRight = this.mc.gameSettings.keyLookRight.isPressed();
+
+                if (playerInput.pressedLookUp) y++;
+                if (playerInput.pressedLookDown) y--;
+
+                if (playerInput.pressedLookLeft) x--;
+                if (playerInput.pressedLookRight) x++;
+
+                float sensitivity = (float) (Time.delta * 1000 * (this.mc.gameSettings.mouseSensitivity.value + 0.5f));
+                if (this.mc.thePlayer.isSneaking()) sensitivity *= 0.5f;
+                if (this.zooming) sensitivity *= 0.25f;
+
                 x *= sensitivity;
                 y *= sensitivity;
-                
-                mc.thePlayer.interpolateTurn(x, y);
+
+                this.mc.thePlayer.interpolateTurn(x, y);
             }
         }
-        if(mc.skipRenderWorld)
-        {
+        if (this.mc.skipRenderWorld) {
             return;
         }
-        int width = mc.resolution.getScaledWidthScreenCoords();
-        int height = mc.resolution.getScaledHeightScreenCoords();
-        int mouseX = (Mouse.getX() * width) / mc.resolution.getWidthScreenCoords();
-        int mouseY = height - (Mouse.getY() * height) / mc.resolution.getHeightScreenCoords() - 1;
+        int width = this.mc.resolution.getScaledWidthScreenCoords();
+        int height = this.mc.resolution.getScaledHeightScreenCoords();
+        int mouseX = (Mouse.getX() * width) / this.mc.resolution.getWidthScreenCoords();
+        int mouseY = height - (Mouse.getY() * height) / this.mc.resolution.getHeightScreenCoords() - 1;
         int c = 200;
-        if(mc.gameSettings.enableVsync.value) // VSync
+        if (this.mc.gameSettings.enableVsync.value) // VSync
         {
 //        	c = mc.gameWindow.getFrequency(); // Cap fps when minimized
             c = 999;
         } else {
-            c = mc.gameSettings.customFpsLimit.value;
+            c = this.mc.gameSettings.customFpsLimit.value;
         }
         if (c <= 0) c = 1;
-        glViewport(0, 0, mc.gameWindow.getWidthPixels(), mc.gameWindow.getHeightPixels());
-        if(mc.currentWorld != null)
-        {
+        glViewport(0, 0, this.mc.gameWindow.getWidthPixels(), this.mc.gameWindow.getHeightPixels());
+        if (this.mc.currentWorld != null) {
             Debug.change("world");
-            if(!mc.gameSettings.enableVsync.value && mc.gameSettings.customFpsLimit.value == 0) // Max FPS
+            if (!this.mc.gameSettings.enableVsync.value && this.mc.gameSettings.customFpsLimit.value == 0) // Max FPS
             {
                 renderWorld(partialTick, 0);
-            }
-            else
-            {
-                renderWorld(partialTick, systemTime + (nsPerSecond / c));
+            } else {
+                renderWorld(partialTick, this.systemTime + (nsPerSecond / c));
             }
             Debug.change("misc");
-            if(mc.gameSettings.enableVsync.value || mc.gameSettings.customFpsLimit.value > 0) // Power saver
+            if (this.mc.gameSettings.enableVsync.value || this.mc.gameSettings.customFpsLimit.value > 0) // Power saver
             {
                 Debug.change("sleep");
-                long timeToSleep = ((systemTime + (nsPerSecond / c)) - System.nanoTime());
+                long timeToSleep = ((this.systemTime + (nsPerSecond / c)) - System.nanoTime());
                 long millis = timeToSleep / 1_000_000L;
                 int nanos = (int) (timeToSleep - (millis * 1_000_000L));
-                if(millis > 0L && millis < 500L)
-                {
-                    try
-                    {
+                if (millis > 0L && millis < 500L) {
+                    try {
                         Thread.sleep(millis, nanos);
-                    }
-                    catch(InterruptedException e)
-                    {
+                    } catch (InterruptedException e) {
                         LOGGER.error("", e);
                     }
                 }
                 Debug.change("misc");
             }
-            systemTime = System.nanoTime();
-            
+            this.systemTime = System.nanoTime();
+
             Debug.change("hud");
-            mc.hudIngame.renderGameOverlay(partialTick, mc.currentScreen != null, mouseX, mouseY);
+            this.mc.hudIngame.renderGameOverlay(partialTick, this.mc.currentScreen != null, mouseX, mouseY);
             Debug.change("misc");
-        } else
-        {
+        } else {
             glMatrixMode(GL_PROJECTION);
             glLoadIdentity();
             glMatrixMode(GL_MODELVIEW);
             glLoadIdentity();
             setupScaledResolution();
-            if(mc.gameSettings.enableVsync.value || mc.gameSettings.customFpsLimit.value > 0)
-            {
+            if (this.mc.gameSettings.enableVsync.value || this.mc.gameSettings.customFpsLimit.value > 0) {
                 Debug.change("sleep");
-                long l2 = ((systemTime + (long)(1_000_000_000L / c)) - System.nanoTime()) / 1_000_000L;
-                if(l2 < 0L)
-                {
+                long l2 = ((this.systemTime + (1_000_000_000L / c)) - System.nanoTime()) / 1_000_000L;
+                if (l2 < 0L) {
                     l2 += 10L;
                 }
-                if(l2 > 0L && l2 < 500L)
-                {
-                    try
-                    {
+                if (l2 > 0L && l2 < 500L) {
+                    try {
                         Thread.sleep(l2);
-                    }
-                    catch(InterruptedException e)
-                    {
+                    } catch (InterruptedException e) {
                         LOGGER.error("", e);
                     }
                 }
                 Debug.change("misc");
             }
-            systemTime = System.nanoTime();
+            this.systemTime = System.nanoTime();
         }
 
         // Render toasts
-        mc.guiToasts.render(partialTick);
+        this.mc.guiToasts.render(partialTick);
 
-        if(mc.currentScreen != null)
-        {
+        if (this.mc.currentScreen != null) {
             Debug.change("gui");
             glClear(256);
-            if(mc.inputType == InputType.CONTROLLER) {
-                mouseX = (int) mc.controllerInput.cursorX;
-                mouseY = (int) mc.controllerInput.cursorY;
+            if (this.mc.inputType == InputType.CONTROLLER) {
+                mouseX = (int) this.mc.controllerInput.cursorX;
+                mouseY = (int) this.mc.controllerInput.cursorY;
             }
-            mc.currentScreen.setDesiredCursor(CursorShape.ARROW);
-            mc.currentScreen.render(mouseX, mouseY, partialTick);
+            this.mc.currentScreen.setDesiredCursor(CursorShape.ARROW);
+            this.mc.currentScreen.render(mouseX, mouseY, partialTick);
 
-            if (mc.currentScreen != null) {
-                CursorShape newCursor = mc.currentScreen.getDesiredCursor();
-                if(!mc.gameSettings.dynamicCursor.value) {
+            if (this.mc.currentScreen != null) {
+                CursorShape newCursor = this.mc.currentScreen.getDesiredCursor();
+                if (!this.mc.gameSettings.dynamicCursor.value) {
                     newCursor = CursorShape.ARROW;
                 }
-                if (mc.gameWindow.getCursorShape() != newCursor) {
-                    mc.gameWindow.setCursorShape(newCursor);
+                if (this.mc.gameWindow.getCursorShape() != newCursor) {
+                    this.mc.gameWindow.setCursorShape(newCursor);
                 }
             }
-            if(mc.inputType == InputType.CONTROLLER && mc.currentScreen != null) {
-                mc.currentScreen.drawControllerCursor();
+            if (this.mc.inputType == InputType.CONTROLLER && this.mc.currentScreen != null) {
+                this.mc.currentScreen.drawControllerCursor();
             }
             Debug.change("misc");
         }
     }
 
-    public void renderWorld(float partialTicks, long updateRenderersUntil)
-    {
-    	Debug.push("misc");
+    public void renderWorld(float partialTicks, long updateRenderersUntil) {
+        Debug.push("misc");
         Colorizers.update(false);
-        
-        RenderGlobal renderGlobal = mc.renderGlobal;
-        ParticleEngine particleEngine = mc.particleEngine;
-        
+
+        RenderGlobal renderGlobal = this.mc.renderGlobal;
+        ParticleEngine particleEngine = this.mc.particleEngine;
+
         glEnable(GL_CULL_FACE);
         glEnable(GL_DEPTH_TEST);
-        if(mc.activeCamera == null)
-        {
-            mc.activeCamera = new EntityCameraFirstPerson(mc, mc.thePlayer);
+        if (this.mc.activeCamera == null) {
+            this.mc.activeCamera = new EntityCameraFirstPerson(this.mc, this.mc.thePlayer);
         }
         getMouseOver(partialTicks);
         Mob activeEntity = null;
-        if (mc.activeCamera instanceof EntityCamera)
-        {
-            activeEntity = ((EntityCamera)mc.activeCamera).mob;
+        if (this.mc.activeCamera instanceof EntityCamera) {
+            activeEntity = ((EntityCamera) this.mc.activeCamera).mob;
         }
 
-        if (activeEntity != null)
-        {
-            double viewEntityX = activeEntity.xo + (activeEntity.x - activeEntity.xo) * (double)partialTicks;
-            double viewEntityZ = activeEntity.zo + (activeEntity.z - activeEntity.zo) * (double)partialTicks;
-            IChunkProvider iChunkProvider = mc.currentWorld.getChunkProvider();
-            int chunkX = MathHelper.floor_float((int)viewEntityX) >> 4;
-            int chunkZ = MathHelper.floor_float((int)viewEntityZ) >> 4;
+        if (activeEntity != null) {
+            double viewEntityX = activeEntity.xo + (activeEntity.x - activeEntity.xo) * (double) partialTicks;
+            double viewEntityZ = activeEntity.zo + (activeEntity.z - activeEntity.zo) * (double) partialTicks;
+            IChunkProvider iChunkProvider = this.mc.currentWorld.getChunkProvider();
+            int chunkX = MathHelper.floor_float((int) viewEntityX) >> 4;
+            int chunkZ = MathHelper.floor_float((int) viewEntityZ) >> 4;
             iChunkProvider.setCurrentChunkOver(chunkX, chunkZ);
         }
 
-        fogManager.updateFogColor(partialTicks);
-        
+        this.fogManager.updateFogColor(partialTicks);
+
         Debug.change("post");
-        mc.renderer.beginRenderWorld(partialTicks);
+        this.mc.renderer.beginRenderWorld(partialTicks);
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
         glEnable(GL_CULL_FACE);
-        setupCameraTransform((mc.activeCamera instanceof EntityCamera && ((EntityCamera) mc.activeCamera).mob.isRemoved()) ? 1f : partialTicks);
+        setupCameraTransform((this.mc.activeCamera instanceof EntityCamera && ((EntityCamera) this.mc.activeCamera).mob.isRemoved()) ? 1f : partialTicks);
         Frustum.getFrustum();
         Debug.change("sky");
-        if((mc.gameSettings.renderDistance.value > 4) /* Used to use Renderdistance rendersky! */ && !(mc.currentScreen instanceof ScreenModelViewer))
-        {
-            fogManager.setupFog(FogManager.FOG_MODE_SKY, farPlaneDistance, partialTicks);
+        if ((this.mc.gameSettings.renderDistance.value > 4) /* Used to use Renderdistance rendersky! */ && !(this.mc.currentScreen instanceof ScreenModelViewer)) {
+            this.fogManager.setupFog(FogManager.FOG_MODE_SKY, this.farPlaneDistance, partialTicks);
             glDisable(GL_FOG);
 
             renderGlobal.renderSky(partialTicks);
         }
-        
+
         Debug.change("misc");
         glEnable(GL_FOG);
-        fogManager.setupFog(FogManager.FOG_MODE_NORMAL, farPlaneDistance, partialTicks);
-        if(mc.gameSettings.ambientOcclusion.value)
-        {
+        this.fogManager.setupFog(FogManager.FOG_MODE_NORMAL, this.farPlaneDistance, partialTicks);
+        if (this.mc.gameSettings.ambientOcclusion.value) {
             glShadeModel(GL11.GL_SMOOTH);
         }
-        
-        mc.renderGlobal.cull(mc.activeCamera.getFrustum(), partialTicks);
+
+        this.mc.renderGlobal.cull(this.mc.activeCamera.getFrustum(), partialTicks);
 
         Debug.change("aurora");
-        if (mc.gameSettings.aurora.value && WorldTypeFXDispatcher.getInstance().getDispatch(mc.currentWorld.getWorldType()).hasAurora())
-        {
-            renderGlobal.renderAurora(mc.activeCamera, partialTicks);
+        if (this.mc.gameSettings.aurora.value && WorldTypeFXDispatcher.getInstance().getDispatch(this.mc.currentWorld.getWorldType()).hasAurora()) {
+            renderGlobal.renderAurora(this.mc.activeCamera, partialTicks);
         }
         Debug.change("update");
 
         int loops = 1;
-        if(mc.gameSettings.keyLoadChunksQuickly.isPressed()) {
-        	loops = 40;
+        if (this.mc.gameSettings.keyLoadChunksQuickly.isPressed()) {
+            loops = 40;
         }
-        for(int i=0; i < loops; i++) {
+        for (int i = 0; i < loops; i++) {
             long timeRemaining;
-            do
-            {
-                if(mc.renderGlobal.updateDirtyChunks(mc.activeCamera) || updateRenderersUntil == 0L)
-                {
+            do {
+                if (this.mc.renderGlobal.updateDirtyChunks(this.mc.activeCamera) || updateRenderersUntil == 0L) {
                     break;
                 }
                 timeRemaining = updateRenderersUntil - System.nanoTime();
-            } while(timeRemaining >= 0L && timeRemaining <= nsPerSecond);
+            } while (timeRemaining >= 0L && timeRemaining <= nsPerSecond);
         }
 
-        fogManager.setupFog(FogManager.FOG_MODE_NORMAL, farPlaneDistance, partialTicks);
+        this.fogManager.setupFog(FogManager.FOG_MODE_NORMAL, this.farPlaneDistance, partialTicks);
         glEnable(GL_FOG);
         TextureRegistry.blockAtlas.bind();
         Lighting.disable();
 
         Debug.change("terrain");
-        lightmapHelper.enableLightmapRendering();
-        mc.terrainRenderer.renderSolidTerrain(partialTicks);
+        this.lightmapHelper.enableLightmapRendering();
+        this.mc.terrainRenderer.renderSolidTerrain(partialTicks);
 
         Debug.change("entities");
         glShadeModel(GL_FLAT);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         Lighting.enableLight();
-        if (!mc.gameSettings.fog.value)
-        {
+        if (!this.mc.gameSettings.fog.value) {
             glDisable(GL_FOG);
         }
-        renderGlobal.renderEntities(mc.activeCamera, partialTicks);
-        if (!mc.gameSettings.fog.value)
-        {
+        renderGlobal.renderEntities(this.mc.activeCamera, partialTicks);
+        if (!this.mc.gameSettings.fog.value) {
             glEnable(GL_FOG);
         }
-        
+
         Debug.change("particles");
         glDisable(GL_BLEND);
-        particleEngine.renderLitParticles(mc.activeCamera, partialTicks);
+        particleEngine.renderLitParticles(this.mc.activeCamera, partialTicks);
         Lighting.disable();
-        fogManager.setupFog(FogManager.FOG_MODE_NORMAL, farPlaneDistance, partialTicks);
-        mc.renderer.beginRenderParticles(partialTicks);
-        particleEngine.renderParticles(mc.renderer.getParticleTessellator(), mc.activeCamera, partialTicks);
-        mc.renderer.endRenderParticles(partialTicks);
+        this.fogManager.setupFog(FogManager.FOG_MODE_NORMAL, this.farPlaneDistance, partialTicks);
+        this.mc.renderer.beginRenderParticles(partialTicks);
+        particleEngine.renderParticles(this.mc.renderer.getParticleTessellator(), this.mc.activeCamera, partialTicks);
+        this.mc.renderer.endRenderParticles(partialTicks);
+
+        this.lightmapHelper.disableLightmapRendering();
 
-        lightmapHelper.disableLightmapRendering();
-        
         Debug.change("outline");
-        if(mc.objectMouseOver != null)
-        {
+        if (this.mc.objectMouseOver != null) {
             glDisable(GL_ALPHA_TEST);
-            if(mc.objectMouseOver instanceof HitResult.Tile hitTile) {
-                renderGlobal.drawBlockBreaking(mc.activeCamera, hitTile, partialTicks);
+            if (this.mc.objectMouseOver instanceof HitResult.Tile hitTile) {
+                renderGlobal.drawBlockBreaking(this.mc.activeCamera, hitTile, partialTicks);
             }
-            renderGlobal.drawSelectionBox(mc.activeCamera, mc.objectMouseOver, partialTicks);
+            renderGlobal.drawSelectionBox(this.mc.activeCamera, this.mc.objectMouseOver, partialTicks);
             glEnable(GL_ALPHA_TEST);
         }
-        
+
         Debug.change("debugoverlays");
-        if(mc.gameSettings.showCollisionBoxes.value)
-        {
-        	renderGlobal.drawDebugEntityOutlines(mc.activeCamera, partialTicks);
+        if (this.mc.gameSettings.showCollisionBoxes.value) {
+            renderGlobal.drawDebugEntityOutlines(this.mc.activeCamera, partialTicks);
         }
-        if(mc.gameSettings.showChunkBorders.value)
-        {
-        	renderGlobal.drawDebugChunkBorders(mc.activeCamera, partialTicks);
+        if (this.mc.gameSettings.showChunkBorders.value) {
+            renderGlobal.drawDebugChunkBorders(this.mc.activeCamera, partialTicks);
         }
         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-        fogManager.setupFog(FogManager.FOG_MODE_NORMAL, farPlaneDistance, partialTicks);
+        this.fogManager.setupFog(FogManager.FOG_MODE_NORMAL, this.farPlaneDistance, partialTicks);
         glEnable(GL_BLEND);
         glDisable(GL_CULL_FACE);
         TextureRegistry.blockAtlas.bind();
 
         Debug.change("water");
-		lightmapHelper.enableLightmapRendering();
-		if(mc.gameSettings.ambientOcclusion.value) {
-			glShadeModel(GL_SMOOTH);
-		}
-		if(!mc.gameSettings.fog.value) {
-			glDisable(GL_FOG);
-		}
-        mc.terrainRenderer.renderTranslucentTerrain(partialTicks);
-		if(!mc.gameSettings.fog.value) {
-			glEnable(GL_FOG);
-		}
-		glShadeModel(GL_FLAT);
-		lightmapHelper.disableLightmapRendering();
-        
+        this.lightmapHelper.enableLightmapRendering();
+        if (this.mc.gameSettings.ambientOcclusion.value) {
+            glShadeModel(GL_SMOOTH);
+        }
+        if (!this.mc.gameSettings.fog.value) {
+            glDisable(GL_FOG);
+        }
+        this.mc.terrainRenderer.renderTranslucentTerrain(partialTicks);
+        if (!this.mc.gameSettings.fog.value) {
+            glEnable(GL_FOG);
+        }
+        glShadeModel(GL_FLAT);
+        this.lightmapHelper.disableLightmapRendering();
+
         Debug.change("weather");
         glDepthMask(true);
         glEnable(GL_CULL_FACE);
         glDisable(GL_BLEND);
         renderRainSnow(partialTicks);
         glDisable(GL_FOG);
-        if(mc.gameSettings.clouds.value) {
-        	Debug.change("clouds");
-            fogManager.setupFog(FogManager.FOG_MODE_NORMAL, farPlaneDistance, partialTicks);
+        if (this.mc.gameSettings.clouds.value) {
+            Debug.change("clouds");
+            this.fogManager.setupFog(FogManager.FOG_MODE_NORMAL, this.farPlaneDistance, partialTicks);
             glEnable(GL_FOG);
             renderGlobal.renderClouds(partialTicks);
             glDisable(GL_FOG);
         }
 
         Debug.change("misc");
-        fogManager.setupFog(1, farPlaneDistance, partialTicks);
-        renderHand((mc.activeCamera instanceof EntityCamera && ((EntityCamera) mc.activeCamera).mob.isRemoved()) ? 1f : partialTicks);
-        
+        this.fogManager.setupFog(1, this.farPlaneDistance, partialTicks);
+        renderHand((this.mc.activeCamera instanceof EntityCamera && ((EntityCamera) this.mc.activeCamera).mob.isRemoved()) ? 1f : partialTicks);
+
         glColorMask(true, true, true, true);
         Debug.pop();
     }
 
-    private void addRainParticles()
-    {
-        Weather weather = mc.currentWorld.getCurrentWeather();
+    private void addRainParticles() {
+        Weather weather = this.mc.currentWorld.getCurrentWeather();
         if (!(weather instanceof IPrecipitation) || !((IPrecipitation) weather).spawnRainParticles()) return;
 
-        float f = mc.currentWorld.weatherManager.getWeatherIntensity() * mc.currentWorld.weatherManager.getWeatherPower();
-        
-        if(mc.gameSettings.fancyGraphics.value != 1)
-        {
+        float f = this.mc.currentWorld.weatherManager.getWeatherIntensity() * this.mc.currentWorld.weatherManager.getWeatherPower();
+
+        if (this.mc.gameSettings.fancyGraphics.value != 1) {
             f /= 2.0F;
         }
-        if(f == 0.0F)
-        {
+        if (f == 0.0F) {
             return;
         }
-        random.setSeed((long)rendererUpdateCount * 0x12a7ce5fL);
-        World world = mc.currentWorld;
-        int cameraX = MathHelper.floor(mc.activeCamera.getX());
-        int cameraY = MathHelper.floor(mc.activeCamera.getY());
-        int cameraZ = MathHelper.floor(mc.activeCamera.getZ());
+        this.random.setSeed((long) this.rendererUpdateCount * 0x12a7ce5fL);
+        World world = this.mc.currentWorld;
+        int cameraX = MathHelper.floor(this.mc.activeCamera.getX());
+        int cameraY = MathHelper.floor(this.mc.activeCamera.getY());
+        int cameraZ = MathHelper.floor(this.mc.activeCamera.getZ());
         byte byte0 = 10;
         double d = 0.0D;
         double d1 = 0.0D;
         double d2 = 0.0D;
         int l = 0;
         blockedWeather:
-        for(int i1 = 0; i1 < (int)(100F * f * f); i1++)
-        {
-            int randX = (cameraX + random.nextInt(byte0)) - random.nextInt(byte0);
-            int randZ = (cameraZ + random.nextInt(byte0)) - random.nextInt(byte0);
+        for (int i1 = 0; i1 < (int) (100F * f * f); i1++) {
+            int randX = (cameraX + this.random.nextInt(byte0)) - this.random.nextInt(byte0);
+            int randZ = (cameraZ + this.random.nextInt(byte0)) - this.random.nextInt(byte0);
             int y = world.findTopSolidBlock(randX, randZ);
             int i2 = world.getBlockId(randX, y - 1, randZ);
-            
+
             Biome biome = world.getBlockBiome(randX, y, randZ);
-            for (int q = 0; q < biome.blockedWeathers.length; q++)
-            {
+            for (int q = 0; q < biome.blockedWeathers.length; q++) {
                 if (biome.blockedWeathers[q] == weather) continue blockedWeather;
             }
-            
-            if(y > cameraY + byte0 || y < cameraY - byte0)
-            {
+
+            if (y > cameraY + byte0 || y < cameraY - byte0) {
                 continue;
             }
-            float f1 = random.nextFloat();
-            float f2 = random.nextFloat();
-            if(i2 <= 0)
-            {
+            float f1 = this.random.nextFloat();
+            float f2 = this.random.nextFloat();
+            if (i2 <= 0) {
                 continue;
             }
-            if(Blocks.blocksList[i2].getMaterial() == Material.lava)
-            {
-                mc.particleEngine.add(new ParticleSmoke(world, (float)randX + f1, (double)((float)y + 0.1F) - Blocks.blocksList[i2].getBounds().minY, (float)randZ + f2, 0.0D, 0.0D, 0.0D, 1.0f, 0));
+            if (Blocks.blocksList[i2].getMaterial() == Materials.LAVA) {
+                this.mc.particleEngine.add(new ParticleSmoke(world, (float) randX + f1, (double) ((float) y + 0.1F) - Blocks.blocksList[i2].getBounds().minY(), (float) randZ + f2, 0.0D, 0.0D, 0.0D, 1.0f, 0));
                 continue;
             }
-            if(random.nextInt(++l) == 0)
-            {
-                d = (float)randX + f1;
-                d1 = (double)((float)y + 0.1F) - Blocks.blocksList[i2].getBounds().minY;
-                d2 = (float)randZ + f2;
+            if (this.random.nextInt(++l) == 0) {
+                d = (float) randX + f1;
+                d1 = (double) ((float) y + 0.1F) - Blocks.blocksList[i2].getBounds().minY();
+                d2 = (float) randZ + f2;
             }
-            mc.particleEngine.add(new ParticleWaterDrop(world, (float)randX + f1, (double)((float)y + 0.1F) - Blocks.blocksList[i2].getBounds().minY, (float)randZ + f2));
+            this.mc.particleEngine.add(new ParticleWaterDrop(world, (float) randX + f1, (double) ((float) y + 0.1F) - Blocks.blocksList[i2].getBounds().minY(), (float) randZ + f2));
         }
 
-        if(l > 0 && random.nextInt(3) < rainSoundCounter++)
-        {
-            rainSoundCounter = 0;
-            if(d1 > mc.activeCamera.getY() + 1.0D && world.getHeightValue(MathHelper.floor(mc.activeCamera.getX()), MathHelper.floor(mc.activeCamera.getZ())) > MathHelper.floor(mc.activeCamera.getY()))
-            {
-                mc.currentWorld.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, d, d1, d2, "ambient.weather.rain", 0.1F * mc.currentWorld.weatherManager.getWeatherIntensity() * mc.currentWorld.weatherManager.getWeatherPower() * 0.5f, 0.5F);
-            } else
-            {
-                mc.currentWorld.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, d, d1, d2, "ambient.weather.rain", 0.2F * mc.currentWorld.weatherManager.getWeatherIntensity() * mc.currentWorld.weatherManager.getWeatherPower() * 0.5f, 1.0F);
+        if (l > 0 && this.random.nextInt(3) < this.rainSoundCounter++) {
+            this.rainSoundCounter = 0;
+            if (d1 > this.mc.activeCamera.getY() + 1.0D && world.getHeightValue(MathHelper.floor(this.mc.activeCamera.getX()), MathHelper.floor(this.mc.activeCamera.getZ())) > MathHelper.floor(this.mc.activeCamera.getY())) {
+                this.mc.currentWorld.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, d, d1, d2, "ambient.weather.rain", 0.1F * this.mc.currentWorld.weatherManager.getWeatherIntensity() * this.mc.currentWorld.weatherManager.getWeatherPower() * 0.5f, 0.5F);
+            } else {
+                this.mc.currentWorld.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, d, d1, d2, "ambient.weather.rain", 0.2F * this.mc.currentWorld.weatherManager.getWeatherIntensity() * this.mc.currentWorld.weatherManager.getWeatherPower() * 0.5f, 1.0F);
             }
         }
     }
 
-    protected void renderRainSnow(float partialTick)
-    {
-        Weather weather = mc.currentWorld.getCurrentWeather();
-        if (!(weather instanceof IPrecipitation)) return;
-
-        final @NotNull IPrecipitation precipitation = (IPrecipitation) weather;
-        
-        World world = mc.currentWorld;
-        int posX = MathHelper.floor(mc.activeCamera.getX());
-        int posY = MathHelper.floor(mc.activeCamera.getY());
-        int posZ = MathHelper.floor(mc.activeCamera.getZ());
+    protected void renderRainSnow(float partialTick) {
+        Weather weather = this.mc.currentWorld.getCurrentWeather();
+        if (!(weather instanceof @NotNull IPrecipitation precipitation)) return;
+
+        World world = this.mc.currentWorld;
+        int posX = MathHelper.floor(this.mc.activeCamera.getX());
+        int posY = MathHelper.floor(this.mc.activeCamera.getY());
+        int posZ = MathHelper.floor(this.mc.activeCamera.getZ());
         Tessellator tessellator = Tessellator.instance;
         glDisable(GL11.GL_CULL_FACE);
         glNormal3f(0.0F, 1.0F, 0.0F);
@@ -973,19 +896,18 @@ public class WorldRenderer
         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
         glAlphaFunc(516, 0.01F);
 
-        mc.textureManager.loadTexture(precipitation.getPrecipitationTexturePath(world.weatherManager.getWeatherPower(), world.weatherManager.getWeatherIntensity())).bind();
-        
-        double nextPosX = mc.activeCamera.getX(partialTick);
-        double nextPosY = mc.activeCamera.getY(partialTick);
-        double nextPosZ = mc.activeCamera.getZ(partialTick);
+        this.mc.textureManager.loadTexture(precipitation.getPrecipitationTexturePath(world.weatherManager.getWeatherPower(), world.weatherManager.getWeatherIntensity())).bind();
+
+        double nextPosX = this.mc.activeCamera.getX(partialTick);
+        double nextPosY = this.mc.activeCamera.getY(partialTick);
+        double nextPosZ = this.mc.activeCamera.getZ(partialTick);
         int floorPosY = MathHelper.floor(nextPosY);
         int radiusEffect = 10;
 
-        if (precipitation.getPrecipitationType() == IPrecipitation.Type.SNOW_LIKE)
-        {
-            for(int x = posX - radiusEffect; x <= posX + radiusEffect; x++) {
+        if (precipitation.getPrecipitationType() == IPrecipitation.Type.SNOW_LIKE) {
+            for (int x = posX - radiusEffect; x <= posX + radiusEffect; x++) {
                 blockedWeather:
-                for(int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++) {
+                for (int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++) {
                     int y = world.findTopSolidBlock(x, z);
                     Biome biomegenbase = world.getBlockBiome(x, y, z);
                     for (int q = 0; q < biomegenbase.blockedWeathers.length; q++) {
@@ -993,56 +915,54 @@ public class WorldRenderer
                             continue blockedWeather;
                         }
                     }
-                    if(y < 0) {
+                    if (y < 0) {
                         y = 0;
                     }
                     int i3 = y;
-                    if(i3 < floorPosY) {
+                    if (i3 < floorPosY) {
                         i3 = floorPosY;
                     }
                     int k3 = posY - radiusEffect;
                     int i4 = posY + radiusEffect;
-                    if(k3 < y) {
+                    if (k3 < y) {
                         k3 = y;
                     }
-                    if(i4 < y) {
+                    if (i4 < y) {
                         i4 = y;
                     }
                     float f3 = 1.0F;
-                    if(k3 != i4) {
-                        random.setSeed(x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761);
-                        float f5 = (float)rendererUpdateCount + partialTick;
-                        float f6 = ((float)(rendererUpdateCount & 0x1ff) + partialTick) / 512F;
-                        float f7 = random.nextFloat() + f5 * 0.01F * (float)random.nextGaussian();
-                        float f8 = random.nextFloat() + f5 * (float)random.nextGaussian() * 0.001F;
-                        double d5 = (double)((float)x + 0.5F) - mc.activeCamera.getX();
-                        double d6 = (double)((float)z + 0.5F) - mc.activeCamera.getZ();
-                        float f11 = MathHelper.sqrt(d5 * d5 + d6 * d6) / (float)radiusEffect;
+                    if (k3 != i4) {
+                        this.random.setSeed((long) x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abbL + (long) z * z * 0x66397 + z * 13761L);
+                        float f5 = (float) this.rendererUpdateCount + partialTick;
+                        float f6 = ((float) (this.rendererUpdateCount & 0x1ff) + partialTick) / 512F;
+                        float f7 = this.random.nextFloat() + f5 * 0.01F * (float) this.random.nextGaussian();
+                        float f8 = this.random.nextFloat() + f5 * (float) this.random.nextGaussian() * 0.001F;
+                        double d5 = (double) ((float) x + 0.5F) - this.mc.activeCamera.getX();
+                        double d6 = (double) ((float) z + 0.5F) - this.mc.activeCamera.getZ();
+                        float f11 = MathHelper.sqrt(d5 * d5 + d6 * d6) / (float) radiusEffect;
                         tessellator.startDrawingQuads();
                         float f12 = world.getLightBrightness(x, i3, z);
-                        if (mc.fullbright) f12 = 1.0f;
+                        if (this.mc.fullbright) f12 = 1.0f;
                         glColor4f(f12, f12, f12, ((1.0F - f11 * f11) * 0.3F + 0.5F) * world.weatherManager.getWeatherIntensity() * world.weatherManager.getWeatherPower());
-                        tessellator.setTranslation(-nextPosX * 1.0D, -nextPosY * 1.0D, -nextPosZ * 1.0D);
-                        tessellator.addVertexWithUV(x + 0, k3, (double)z + 0.5D, 0.0F * f3 + f7, ((float)k3 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV(x + 1, k3, (double)z + 0.5D, 1.0F * f3 + f7, ((float)k3 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV(x + 1, i4, (double)z + 0.5D, 1.0F * f3 + f7, ((float)i4 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV(x + 0, i4, (double)z + 0.5D, 0.0F * f3 + f7, ((float)i4 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV((double)x + 0.5D, k3, z + 0, 0.0F * f3 + f7, ((float)k3 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV((double)x + 0.5D, k3, z + 1, 1.0F * f3 + f7, ((float)k3 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV((double)x + 0.5D, i4, z + 1, 1.0F * f3 + f7, ((float)i4 * f3) / 4F + f6 * f3 + f8);
-                        tessellator.addVertexWithUV((double)x + 0.5D, i4, z + 0, 0.0F * f3 + f7, ((float)i4 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.setTranslation(-nextPosX, -nextPosY, -nextPosZ);
+                        tessellator.addVertexWithUV(x, k3, (double) z + 0.5D, 0.0F * f3 + f7, ((float) k3 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV(x + 1, k3, (double) z + 0.5D, f3 + f7, ((float) k3 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV(x + 1, i4, (double) z + 0.5D, f3 + f7, ((float) i4 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV(x, i4, (double) z + 0.5D, 0.0F * f3 + f7, ((float) i4 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV((double) x + 0.5D, k3, z, 0.0F * f3 + f7, ((float) k3 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV((double) x + 0.5D, k3, z + 1, f3 + f7, ((float) k3 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV((double) x + 0.5D, i4, z + 1, f3 + f7, ((float) i4 * f3) / 4F + f6 * f3 + f8);
+                        tessellator.addVertexWithUV((double) x + 0.5D, i4, z, 0.0F * f3 + f7, ((float) i4 * f3) / 4F + f6 * f3 + f8);
                         tessellator.setTranslation(0.0D, 0.0D, 0.0D);
                         tessellator.draw();
                     }
                 }
 
             }
-        }
-        else if (precipitation.getPrecipitationType() == IPrecipitation.Type.RAIN_LIKE)
-        {
-            for(int x = posX - radiusEffect; x <= posX + radiusEffect; x++) {
+        } else if (precipitation.getPrecipitationType() == IPrecipitation.Type.RAIN_LIKE) {
+            for (int x = posX - radiusEffect; x <= posX + radiusEffect; x++) {
                 blockedWeather:
-                for(int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++) {
+                for (int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++) {
                     int y = world.findTopSolidBlock(x, z);
                     Biome biome = world.getBlockBiome(x, y, z);
                     for (int q = 0; q < biome.blockedWeathers.length; q++) {
@@ -1052,86 +972,77 @@ public class WorldRenderer
                     }
                     int j3 = posY - radiusEffect;
                     int l3 = posY + radiusEffect;
-                    if(j3 < y) {
+                    if (j3 < y) {
                         j3 = y;
                     }
-                    if(l3 < y) {
+                    if (l3 < y) {
                         l3 = y;
                     }
                     float f2 = 1.0F;
-                    if(j3 != l3) {
-                        random.setSeed(x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761);
-                        float f4 = (((float)(rendererUpdateCount + x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761 & 0x1f) + partialTick) / 32F) * (3F + random.nextFloat());
-                        double d3 = (double)((float)x + 0.5F) - mc.activeCamera.getX();
-                        double d4 = (double)((float)z + 0.5F) - mc.activeCamera.getZ();
-                        float f9 = MathHelper.sqrt(d3 * d3 + d4 * d4) / (float)radiusEffect;
+                    if (j3 != l3) {
+                        this.random.setSeed((long) x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abbL + (long) z * z * 0x66397 + z * 13761L);
+                        float f4 = (((float) (this.rendererUpdateCount + x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761 & 0x1f) + partialTick) / 32F) * (3F + this.random.nextFloat());
+                        double d3 = (double) ((float) x + 0.5F) - this.mc.activeCamera.getX();
+                        double d4 = (double) ((float) z + 0.5F) - this.mc.activeCamera.getZ();
+                        float f9 = MathHelper.sqrt(d3 * d3 + d4 * d4) / (float) radiusEffect;
                         tessellator.startDrawingQuads();
                         float f10 = world.getLightBrightness(x, world.getHeightBlocks(), z) * 0.85F + 0.15F;
-                        if (mc.fullbright) f10 = 1.0f;
+                        if (this.mc.fullbright) f10 = 1.0f;
                         glColor4f(f10, f10, f10, ((1.0F - f9 * f9) * 0.5F + 0.5F) * (world.weatherManager.getWeatherIntensity() - 0.1f) * world.weatherManager.getWeatherPower());
-                        tessellator.setTranslation(-nextPosX * 1.0D, -nextPosY * 1.0D, -nextPosZ * 1.0D);
-                        tessellator.addVertexWithUV(x + 0, j3, (double)z + 0.5D, 0.0F * f2, ((float)j3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV(x + 1, j3, (double)z + 0.5D, 1.0F * f2, ((float)j3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV(x + 1, l3, (double)z + 0.5D, 1.0F * f2, ((float)l3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV(x + 0, l3, (double)z + 0.5D, 0.0F * f2, ((float)l3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, j3, z + 0, 0.0F * f2, ((float)j3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, j3, z + 1, 1.0F * f2, ((float)j3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, l3, z + 1, 1.0F * f2, ((float)l3 * f2) / 4F + f4 * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, l3, z + 0, 0.0F * f2, ((float)l3 * f2) / 4F + f4 * f2);
+                        tessellator.setTranslation(-nextPosX, -nextPosY, -nextPosZ);
+                        tessellator.addVertexWithUV(x, j3, (double) z + 0.5D, 0.0F * f2, ((float) j3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV(x + 1, j3, (double) z + 0.5D, f2, ((float) j3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV(x + 1, l3, (double) z + 0.5D, f2, ((float) l3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV(x, l3, (double) z + 0.5D, 0.0F * f2, ((float) l3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, j3, z, 0.0F * f2, ((float) j3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, j3, z + 1, f2, ((float) j3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, l3, z + 1, f2, ((float) l3 * f2) / 4F + f4 * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, l3, z, 0.0F * f2, ((float) l3 * f2) / 4F + f4 * f2);
                         tessellator.setTranslation(0.0D, 0.0D, 0.0D);
                         tessellator.draw();
                     }
                 }
 
             }
-        }
-        else if (precipitation.getPrecipitationType() == IPrecipitation.Type.INVERTED_RAIN_LIKE)
-        {
-            for(int x = posX - radiusEffect; x <= posX + radiusEffect; x++)
-            {
+        } else if (precipitation.getPrecipitationType() == IPrecipitation.Type.INVERTED_RAIN_LIKE) {
+            for (int x = posX - radiusEffect; x <= posX + radiusEffect; x++) {
                 blockedWeather:
-                for(int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++)
-                {
+                for (int z = posZ - radiusEffect; z <= posZ + radiusEffect; z++) {
                     int topSolidY = world.findTopSolidBlock(x, z);
                     Biome biome = world.getBlockBiome(x, topSolidY, z);
-                    for (int i = 0; i < biome.blockedWeathers.length; i++)
-                    {
-                        if (biome.blockedWeathers[i] == weather)
-                        {
+                    for (int i = 0; i < biome.blockedWeathers.length; i++) {
+                        if (biome.blockedWeathers[i] == weather) {
                             continue blockedWeather;
                         }
                     }
                     int j3 = posY - radiusEffect;
                     int l3 = posY + radiusEffect;
-                    if(j3 < topSolidY)
-                    {
+                    if (j3 < topSolidY) {
                         j3 = topSolidY;
                     }
-                    if(l3 < topSolidY)
-                    {
+                    if (l3 < topSolidY) {
                         l3 = topSolidY;
                     }
                     float f2 = 1.0F;
-                    if(j3 != l3)
-                    {
-                        random.setSeed(x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761);
-                        float vOffset = (((float)(rendererUpdateCount + x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761 & 0x1f) + partialTick) / 32F) * (3F + random.nextFloat());
-                        double d3 = (double)((float)x + 0.5F) - mc.activeCamera.getX();
-                        double d4 = (double)((float)z + 0.5F) - mc.activeCamera.getZ();
-                        float f9 = MathHelper.sqrt(d3 * d3 + d4 * d4) / (float)radiusEffect;
+                    if (j3 != l3) {
+                        this.random.setSeed((long) x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abbL + (long) z * z * 0x66397 + z * 13761L);
+                        float vOffset = (((float) (this.rendererUpdateCount + x * x * 3121 /*GL_RGBA_MODE*/ + x * 0x2b24abb + z * z * 0x66397 + z * 13761 & 0x1f) + partialTick) / 32F) * (3F + this.random.nextFloat());
+                        double d3 = (double) ((float) x + 0.5F) - this.mc.activeCamera.getX();
+                        double d4 = (double) ((float) z + 0.5F) - this.mc.activeCamera.getZ();
+                        float f9 = MathHelper.sqrt(d3 * d3 + d4 * d4) / (float) radiusEffect;
                         tessellator.startDrawingQuads();
                         float f10 = world.getLightBrightness(x, world.getHeightBlocks(), z) * 0.85F + 0.15F;
-                        if (mc.fullbright) f10 = 1.0f;
+                        if (this.mc.fullbright) f10 = 1.0f;
                         glColor4f(f10, f10, f10, ((1.0F - f9 * f9) * 0.5F + 0.5F) * (world.weatherManager.getWeatherIntensity() - 0.1f) * world.weatherManager.getWeatherPower());
-                        tessellator.setTranslation(-nextPosX * 1.0D, -nextPosY * 1.0D, -nextPosZ * 1.0D);
-                        tessellator.addVertexWithUV(x + 0, j3, (double)z + 0.5D, 0.0F * f2, ((float)j3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV(x + 1, j3, (double)z + 0.5D, 1.0F * f2, ((float)j3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV(x + 1, l3, (double)z + 0.5D, 1.0F * f2, ((float)l3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV(x + 0, l3, (double)z + 0.5D, 0.0F * f2, ((float)l3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, j3, z + 0, 0.0F * f2, ((float)j3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, j3, z + 1, 1.0F * f2, ((float)j3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, l3, z + 1, 1.0F * f2, ((float)l3 * f2) / 4F - vOffset * f2);
-                        tessellator.addVertexWithUV((double)x + 0.5D, l3, z + 0, 0.0F * f2, ((float)l3 * f2) / 4F - vOffset * f2);
+                        tessellator.setTranslation(-nextPosX, -nextPosY, -nextPosZ);
+                        tessellator.addVertexWithUV(x, j3, (double) z + 0.5D, 0.0F * f2, ((float) j3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV(x + 1, j3, (double) z + 0.5D, f2, ((float) j3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV(x + 1, l3, (double) z + 0.5D, f2, ((float) l3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV(x, l3, (double) z + 0.5D, 0.0F * f2, ((float) l3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, j3, z, 0.0F * f2, ((float) j3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, j3, z + 1, f2, ((float) j3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, l3, z + 1, f2, ((float) l3 * f2) / 4F - vOffset * f2);
+                        tessellator.addVertexWithUV((double) x + 0.5D, l3, z, 0.0F * f2, ((float) l3 * f2) / 4F - vOffset * f2);
                         tessellator.setTranslation(0.0D, 0.0D, 0.0D);
                         tessellator.draw();
                     }
@@ -1146,12 +1057,11 @@ public class WorldRenderer
         glAlphaFunc(516, 0.1F);
     }
 
-    public void setupScaledResolution()
-    {
+    public void setupScaledResolution() {
         glClear(256);
         glMatrixMode(GL11.GL_PROJECTION);
         glLoadIdentity();
-        glOrtho(0.0D, mc.resolution.getExactScaledWidthScreenCoords(), mc.resolution.getExactScaledHeightScreenCoords(), 0.0D, 1000D, 3000D);
+        glOrtho(0.0D, this.mc.resolution.getExactScaledWidthScreenCoords(), this.mc.resolution.getExactScaledHeightScreenCoords(), 0.0D, 1000D, 3000D);
         glMatrixMode(GL11.GL_MODELVIEW);
         glLoadIdentity();
         glTranslatef(0.0F, 0.0F, -2000F);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColor.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColor.java
index 1647148dd..b85d9562b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColor.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColor.java
@@ -1,10 +1,17 @@
 package net.minecraft.client.render.block.color;
 
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public abstract class BlockColor
 {
     public abstract int getFallbackColor(int meta, int tintIndex);
 
-    public abstract int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex);
+    public abstract int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex);
+    @Deprecated
+    public final int getWorldColor(@NotNull WorldSource source, int x, int y, int z, int tintIndex) {
+        return getWorldColor(source, new TilePos(x, y, z), tintIndex);
+    }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCrystal.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCrystal.java
index c14f23a9a..768ff8e96 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCrystal.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCrystal.java
@@ -3,6 +3,8 @@ package net.minecraft.client.render.block.color;
 import net.minecraft.client.render.colorizer.Colorizer;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.noise.ImprovedNoise;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
@@ -13,7 +15,7 @@ public class BlockColorCrystal extends BlockColorCustom{
     }
     protected static ImprovedNoise crystalPerlinNoise = new ImprovedNoise(new Random(0));
     @Override
-    public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
 
         int color = 0xc40e26;
 //        float offsetR = (float) (crystalPerlinNoise.getValue(x / 10f, z / 10f)) * 0.5f;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCustom.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCustom.java
index a0a63f884..7a7787d57 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCustom.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorCustom.java
@@ -2,27 +2,25 @@ package net.minecraft.client.render.block.color;
 
 import net.minecraft.client.render.colorizer.Colorizer;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorCustom extends BlockColor {
 
-	public Colorizer colorizer;
-	
-	public BlockColorCustom(Colorizer colorizer) {
-		this.colorizer = colorizer;
-		
-		if(colorizer == null) {
-			throw new NullPointerException();
-		}
-	}
-	
-	@Override
-	public int getFallbackColor(int meta, int tintIndex) {
-		return colorizer.getDefaultColor(1.0, 0.7);
-	}
+    public final @NotNull Colorizer colorizer;
 
-	@Override
-	public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
-		return colorizer.getColor(world, x, y, z);
-	}
+    public BlockColorCustom(@NotNull Colorizer colorizer) {
+        this.colorizer = colorizer;
+    }
+
+    @Override
+    public int getFallbackColor(int meta, int tintIndex) {
+        return this.colorizer.getDefaultColor(1.0, 0.7);
+    }
+
+    @Override
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
+        return this.colorizer.getColor(source, tilePos);
+    }
 
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorDefault.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorDefault.java
index daea781e4..8186f835c 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorDefault.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorDefault.java
@@ -1,6 +1,8 @@
 package net.minecraft.client.render.block.color;
 
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorDefault
     extends BlockColor
@@ -12,7 +14,7 @@ public class BlockColorDefault
     }
 
     @Override
-    public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex)
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex)
     {
         return 0xFFFFFF;
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorLeavesOak.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorLeavesOak.java
index ab76b451c..4185895da 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorLeavesOak.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorLeavesOak.java
@@ -5,38 +5,40 @@ import java.util.Random;
 import net.minecraft.client.render.colorizer.Colorizer;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.noise.ImprovedNoise;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.Season;
 import net.minecraft.core.world.season.Seasons;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorLeavesOak extends BlockColorCustom {
-	
-	private static ImprovedNoise fallColorPerlin = new ImprovedNoise(new Random(0));
-	
-	public BlockColorLeavesOak(Colorizer colorizer) {
-		super(colorizer);
-	}
-	
-	@Override
-	public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
-		int color = super.getWorldColor(world, x, y, z, tintIndex);
-		
-		Season season = world.getSeasonManager().getCurrentSeason();
-		if(season != null) {
-			float progress = world.getSeasonManager().getSeasonProgress();
-			if(season == Seasons.OVERWORLD_FALL) {
-				float offsetIntensity = 1 - Math.abs((progress * 2) - 1);
-				float green = ((color & 0x00FF00) >> 8) / 255F;
-				float greenOffset = (float) fallColorPerlin.getValue(x / 10D, y / 10D, z / 10D) * offsetIntensity * 0.5f;
-				if(green + greenOffset > 0.8f)
-					greenOffset = 0.8f - green;
-				if(green + greenOffset < 0.0f)
-					greenOffset = -green;
-				int newGreen = ((int) ((green + greenOffset) * 255)) & 0xFF;
-				color &= 0xFF00FF;
-				color |= (newGreen << 8);
-			}
-		}
-		
-		return color;
-	}
+
+    private static final @NotNull ImprovedNoise fallColorPerlin = new ImprovedNoise(new Random(0));
+
+    public BlockColorLeavesOak(Colorizer colorizer) {
+        super(colorizer);
+    }
+
+    @Override
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
+        int color = super.getWorldColor(source, tilePos, tintIndex);
+
+        Season season = source.getSeasonManager().getCurrentSeason();
+        if (season != null) {
+            float progress = source.getSeasonManager().getSeasonProgress();
+            if (season == Seasons.OVERWORLD_FALL) {
+                float offsetIntensity = 1 - Math.abs((progress * 2) - 1);
+                float green = ((color & 0x00FF00) >> 8) / 255F;
+                float greenOffset = (float) fallColorPerlin.getValue(tilePos.x() / 10D, tilePos.y() / 10D, tilePos.z() / 10D) * offsetIntensity * 0.5f;
+                if (green + greenOffset > 0.8f)
+                    greenOffset = 0.8f - green;
+                if (green + greenOffset < 0.0f)
+                    greenOffset = -green;
+                int newGreen = ((int) ((green + greenOffset) * 255)) & 0xFF;
+                color &= 0xFF00FF;
+                color |= (newGreen << 8);
+            }
+        }
+
+        return color;
+    }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorPortal.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorPortal.java
index a854a0bd2..fd122ffd8 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorPortal.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorPortal.java
@@ -2,6 +2,8 @@ package net.minecraft.client.render.block.color;
 
 import net.minecraft.client.util.helper.Colors;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorPortal extends BlockColor{
     @Override
@@ -10,7 +12,7 @@ public class BlockColorPortal extends BlockColor{
     }
 
     @Override
-    public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
-        return Colors.allPortalColors[(world.getBlockMetadata(x, y, z) >> 4) & 0xF].getARGB();
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
+        return Colors.allPortalColors[(source.getBlockData(tilePos) >> 4) & 0xF].getARGB();
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorTallGrass.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorTallGrass.java
index 14e018f9d..3222c3591 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorTallGrass.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorTallGrass.java
@@ -6,29 +6,31 @@ import net.minecraft.client.render.colorizer.Colorizer;
 import net.minecraft.client.render.colorizer.Colorizers;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.noise.ImprovedNoise;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorTallGrass extends BlockColorCustom {
 	
 	protected static ImprovedNoise grassColorPerlin = new ImprovedNoise(new Random(0));
 	
-	public BlockColorTallGrass(Colorizer colorizer) {
+	public BlockColorTallGrass(@NotNull Colorizer colorizer) {
 		super(colorizer);
 	}
 	
 	@Override
-	public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
+	public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
 
-		double localTemperature = world.getBlockTemperature(x, z);
-		double localHumidity = world.getBlockHumidity(x, z);
+		double localTemperature = source.getBlockTemperature(tilePos);
+		double localHumidity = source.getBlockHumidity(tilePos);
 
-		long l1 = x * 0x2fc20fL + z * 0x5d8875L + y;
+		long l1 = tilePos.x() * 0x2fc20fL + tilePos.z() * 0x5d8875L + tilePos.y();
 		l1 = l1 * l1 * 0x285b825L + l1 * 11L;
-		int xO = (int) ((long) x + (l1 >> 14 & 31L));
-		int yO = (int) ((long) y + (l1 >> 19 & 31L));
-		int zO = (int) ((long) z + (l1 >> 24 & 31L));
+		int xO = (int) ((long) tilePos.x() + (l1 >> 14 & 31L));
+		int yO = (int) ((long) tilePos.y() + (l1 >> 19 & 31L));
+		int zO = (int) ((long) tilePos.z() + (l1 >> 24 & 31L));
 
-		float offsetT = (float) grassColorPerlin.getValue(xO / 32D, yO / 32D, z / 32D) / 2.5F;
-		float offsetH = (float) grassColorPerlin.getValue(x / 32D, yO / 32D, zO / 32D) / 2.5F;
+		float offsetT = (float) grassColorPerlin.getValue(xO / 32D, yO / 32D, tilePos.z() / 32D) / 2.5F;
+		float offsetH = (float) grassColorPerlin.getValue(tilePos.x() / 32D, yO / 32D, zO / 32D) / 2.5F;
 
 		localTemperature += offsetT;
 		localHumidity += offsetH;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWater.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWater.java
index 44d929a40..ec3ceaed2 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWater.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWater.java
@@ -3,29 +3,31 @@ package net.minecraft.client.render.block.color;
 import net.minecraft.client.Minecraft;
 import net.minecraft.client.render.colorizer.Colorizer;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorWater extends BlockColorCustom {
 
 	public Minecraft mc = Minecraft.getMinecraft();
 	
-	public BlockColorWater(Colorizer colorizer) {
+	public BlockColorWater(@NotNull Colorizer colorizer) {
 		super(colorizer);
 	}
 	
 	@Override
 	public int getFallbackColor(int meta, int tintIndex) {
-		if(!mc.gameSettings.biomeWater.value || (mc.currentWorld != null && mc.currentWorld.isRetro())) {
+		if(!this.mc.gameSettings.biomeWater.value || (this.mc.currentWorld != null && this.mc.currentWorld.isRetro())) {
 			return 0xFFFFFFFF;
 		}
 		return super.getFallbackColor(meta, tintIndex);
 	}
 	
 	@Override
-	public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex) {
-		if(!mc.gameSettings.biomeWater.value || world.isRetro()) {
+	public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
+		if(!this.mc.gameSettings.biomeWater.value || source.isRetro()) {
 			return 0xFFFFFFFF;
 		}
-		return super.getWorldColor(world, x, y, z, tintIndex);
+		return super.getWorldColor(source, tilePos, tintIndex);
 	}
 
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWireRedstone.java b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWireRedstone.java
index 9eea2d4f5..c019718b9 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWireRedstone.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/color/BlockColorWireRedstone.java
@@ -2,21 +2,20 @@ package net.minecraft.client.render.block.color;
 
 import net.minecraft.client.util.helper.Colors;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockColorWireRedstone
-    extends BlockColor
-{
+    extends BlockColor {
 
     @Override
-    public int getFallbackColor(int meta, int tintIndex)
-    {
+    public int getFallbackColor(int meta, int tintIndex) {
         return Colors.allRedstoneColors[15].getARGB();
     }
 
     @Override
-    public int getWorldColor(WorldSource world, int x, int y, int z, int tintIndex)
-    {
+    public int getWorldColor(@NotNull WorldSource source, @NotNull TilePosc tilePos, int tintIndex) {
         // Colored by renderer
-    	return Colors.allRedstoneColors[15].getARGB();
+        return Colors.allRedstoneColors[15].getARGB();
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModel.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModel.java
index 7b141fe5f..b9043ea79 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModel.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModel.java
@@ -7,6 +7,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
@@ -21,10 +22,10 @@ public abstract class BlockModel<T extends BlockLogic>
     public BlockModel(final Block<T> block){
         this.block = block;
     }
-    public abstract boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z);
-    public abstract boolean renderOverbright(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z);
-    public abstract boolean renderNoCulling(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z);
-    public abstract boolean renderWithOverrideTexture(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z, IconCoordinate textureIndex);
+    public abstract boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos);
+    public abstract boolean renderOverbright(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos);
+    public abstract boolean renderNoCulling(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos);
+    public abstract boolean renderWithOverrideTexture(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos, IconCoordinate textureIndex);
     public abstract void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate);
 
     public abstract boolean shouldItemRender3d();
@@ -36,7 +37,7 @@ public abstract class BlockModel<T extends BlockLogic>
 
     public abstract @Nullable IconCoordinate getParticleTexture(@NotNull Side side, int meta);
     public abstract @Nullable IconCoordinate getOverlayTexture(int meta);
-    public abstract int particleColorIndex(@NotNull WorldSource worldSource, int x, int y, int z, @NotNull Side side, int meta);
+    public abstract int particleColorIndex(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos, @NotNull Side side, int meta);
 
     public boolean hasOverbright(){
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelActivator.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelActivator.java
index 01e2d00c4..4d773ef7f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelActivator.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelActivator.java
@@ -6,6 +6,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicActivator;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelActivator<T extends BlockLogic> extends BlockModelVeryRotatable<T> {
@@ -20,7 +21,7 @@ public class BlockModelActivator<T extends BlockLogic> extends BlockModelVeryRot
 
     public BlockModelActivator(Block<T> block) {
         super(block);
-        overbrightTextures
+        this.overbrightTextures
             .set("minecraft:block/activator/bottom_active_overlay", Side.BOTTOM)
             .set("minecraft:block/activator/top_active_overlay", Side.TOP)
             .set("minecraft:block/activator/front_active_overlay", Side.SOUTH)
@@ -33,18 +34,16 @@ public class BlockModelActivator<T extends BlockLogic> extends BlockModelVeryRot
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         if ((data & BlockLogicActivator.MASK_POWERED) != 0) {
-            return poweredTextures[getRotatedSide(side, data).getId()];
+            return this.poweredTextures[getRotatedSide(side, data).getId()];
         } else {
             return super.getBlockTextureFromSideAndMetadata(side, data);
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
         boolean isPowered = (data & BlockLogicActivator.MASK_POWERED) != 0;
         if (!isPowered) return null;
         return super.getBlockOverbrightTextureFromSideAndMeta(side, data);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAlgae.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAlgae.java
index a55617fa6..4ae60d49b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAlgae.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAlgae.java
@@ -7,9 +7,10 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelAlgae<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelAlgae(Block<T> block) {
@@ -17,40 +18,38 @@ public class BlockModelAlgae<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
         float brightness = 1.0f;
-        if(!LightmapHelper.isLightmapEnabled()) {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-        }else {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
+        if (!LightmapHelper.isLightmapEnabled()) {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+        } else {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
         }
 
-        int color = BlockColorDispatcher.getInstance().getDispatch(block).getWorldColor(worldSource, x, y, z, 0);
-        float red = (float)(color >> 16 & 0xff) / 255F;
-        float green = (float)(color >> 8 & 0xff) / 255F;
-        float blue = (float)(color & 0xff) / 255F;
+        int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getWorldColor(worldSource, tilePos, 0);
+        float red = (float) (color >> 16 & 0xff) / 255F;
+        float green = (float) (color >> 8 & 0xff) / 255F;
+        float blue = (float) (color & 0xff) / 255F;
 
         tessellator.setColorOpaque_F(red * brightness, green * brightness, blue * brightness);
-        IconCoordinate tex = getBlockTextureFromSideAndMetadata(Side.TOP, worldSource.getBlockMetadata(x, y, z));
-        renderBlocks.renderTopFace(tessellator, bounds, x, y - 0.1125, z, tex);
-        renderBlocks.renderBottomFace(tessellator, bounds, x, y + 0.0125, z, tex);
+        IconCoordinate tex = getBlockTextureFromSideAndMetadata(Side.TOP, worldSource.getBlockData(tilePos));
+        renderBlocks.renderTopFace(tessellator, bounds, tilePos.x(), tilePos.y() - 0.1125, tilePos.z(), tex);
+        renderBlocks.renderBottomFace(tessellator, bounds, tilePos.x(), tilePos.y() + 0.0125, tilePos.z(), tex);
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
+
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        if(side == Side.TOP)
-        {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (side == Side.TOP) {
             return true;
-        } else
-        {
-            return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
         }
+        return super.shouldSideBeRendered(source, bounds, tilePos, side);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAxisAligned.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAxisAligned.java
index a4fb3b83f..2efffecb6 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAxisAligned.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelAxisAligned.java
@@ -10,6 +10,7 @@ import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,11 +20,10 @@ public class BlockModelAxisAligned<T extends BlockLogic> extends BlockModelStand
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         Axis axis = BlockLogicAxisAligned.metaToAxis(meta);
-        switch(axis)
-        {
+        switch (axis) {
             case Y:
                 renderBlocks.uvRotateEast = 0;
                 renderBlocks.uvRotateWest = 0;
@@ -43,22 +43,21 @@ public class BlockModelAxisAligned<T extends BlockLogic> extends BlockModelStand
                 renderBlocks.uvRotateBottom = 1;
                 break;
         }
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
         renderBlocks.resetRenderBlocks();
 
         return true;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         Side rotated = getRotatedSide(side, data);
         if (rotated == Side.NONE) return TextureRegistry.getTexture("minecraft:block/grass_top");
         return super.getBlockTextureFromSideAndMetadata(rotated, data);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data) {
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
         Side rotated = getRotatedSide(side, data);
         if (rotated == Side.NONE) return null;
         return super.getBlockOverbrightTextureFromSideAndMeta(rotated, data);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBasket.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBasket.java
index d80fe57bf..fabeaf9fa 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBasket.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBasket.java
@@ -6,57 +6,56 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicBasket;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 public class BlockModelBasket<T extends BlockLogicBasket> extends BlockModelStandard<T> {
     protected IconCoordinate fillTexture = TextureRegistry.getTexture("minecraft:block/basket/fill");
+
     public BlockModelBasket(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBounds();
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBd bounds = new AABBd(this.block.getBounds());
         // Render basket
         final float onePix = 1.0f / 16;
         final float basketHeight = onePix * 16;
 
         // Basket walls
-        bounds.set(0, 0, 0, 1, onePix, 1);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // Bottom
+        bounds.setMin(0, 0, 0).setMax(1, onePix, 1);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // Bottom
 
         renderBlocks.setRenderSide(Side.EAST, false);
         renderBlocks.setRenderSide(Side.WEST, false);
         renderBlocks.setRenderSide(Side.BOTTOM, false);
-        bounds.set(0, 0, 0, 1, basketHeight, onePix);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // North
-        bounds.set(0, 0, 1 - onePix, 1, basketHeight, 1); // south
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // South
+        bounds.setMin(0, 0, 0).setMax(1, basketHeight, onePix);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // North
+        bounds.setMin(0, 0, 1 - onePix).setMax(1, basketHeight, 1); // south
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // South
         renderBlocks.renderBitMask = 0;
 
         renderBlocks.setRenderSide(Side.NORTH, false);
         renderBlocks.setRenderSide(Side.SOUTH, false);
         renderBlocks.setRenderSide(Side.BOTTOM, false);
-        bounds.set(0, 0, 0, onePix, basketHeight, 1);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // West
-        bounds.set(1 - onePix, 0, 0, 1, basketHeight, 1);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // East
-        bounds.set(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
+        bounds.setMin(0, 0, 0).setMax(onePix, basketHeight, 1);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // West
+        bounds.setMin(1 - onePix, 0, 0).setMax(1, basketHeight, 1);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // East
+        bounds.setMin(0.0f, 0.0f, 0.0f).setMax(1.0f, 1.0f, 1.0f);
         renderBlocks.renderBitMask = 0;
 
-        final int height = block.getLogic().getFillLevel(worldSource, x, y, z);
+        final int height = this.block.getLogic().getFillLevel(worldSource, tilePos);
         // Interior
-        if (height > 0)
-        {
-            renderBlocks.renderTopFace(tessellator, bounds, x, (y - 1) + onePix + onePix * height, z, fillTexture);
+        if (height > 0) {
+            renderBlocks.renderTopFace(tessellator, bounds, tilePos.x(), (tilePos.y() - 1) + onePix + onePix * height, tilePos.z(), this.fillTexture);
         }
-
-        bounds.set(0, 0, 0, 1, basketHeight, 1);
-
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBed.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBed.java
index 1287366f8..a3d4b4b01 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBed.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBed.java
@@ -7,10 +7,12 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicBed;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
 public class BlockModelBed<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate underTexture = TextureRegistry.getTexture("minecraft:block/bed/bottom");
@@ -18,101 +20,94 @@ public class BlockModelBed<T extends BlockLogic> extends BlockModelStandard<T> {
 
     public BlockModelBed(Block<T> block) {
         super(block);
-        bedTextures[0] = TextureRegistry.getTexture("minecraft:block/bed/foot_front");
-        bedTextures[1] = TextureRegistry.getTexture("minecraft:block/bed/foot_side");
-        bedTextures[2] = TextureRegistry.getTexture("minecraft:block/bed/foot_top");
-        bedTextures[3] = TextureRegistry.getTexture("minecraft:block/bed/head_front");
-        bedTextures[4] = TextureRegistry.getTexture("minecraft:block/bed/head_side");
-        bedTextures[5] = TextureRegistry.getTexture("minecraft:block/bed/head_top");
+        this.bedTextures[0] = TextureRegistry.getTexture("minecraft:block/bed/foot_front");
+        this.bedTextures[1] = TextureRegistry.getTexture("minecraft:block/bed/foot_side");
+        this.bedTextures[2] = TextureRegistry.getTexture("minecraft:block/bed/foot_top");
+        this.bedTextures[3] = TextureRegistry.getTexture("minecraft:block/bed/head_front");
+        this.bedTextures[4] = TextureRegistry.getTexture("minecraft:block/bed/head_side");
+        this.bedTextures[5] = TextureRegistry.getTexture("minecraft:block/bed/head_top");
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        AABBd bounds = new AABBd(this.block.getBoundsFromState(worldSource, tilePos));
         renderBlocks.enableAO = true;
-        renderBlocks.cache.setupCache(block, worldSource, x, y, z);
+        renderBlocks.cache.setupCache(this.block, worldSource, tilePos);
 
-        final int meta = worldSource.getBlockMetadata(x, y, z);
+        final int meta = worldSource.getBlockData(tilePos);
         final int direction = BlockLogicBed.getDirection(meta);
         final boolean isFootOfBed = BlockLogicBed.isBlockFootOfBed(meta);
 
         final double minY = bounds.minY;
         bounds.minY += 0.1875D;
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1f, 1f, 1f, Side.BOTTOM, meta);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1f, 1f, 1f, Side.BOTTOM, meta);
         bounds.minY = minY;
 
-        if(direction == 0)
-        {
+        if (direction == 0) {
             renderBlocks.uvRotateTop = 1;
-        } else
-        if(direction == 2)
-        {
+        } else if (direction == 2) {
             renderBlocks.uvRotateTop = 2;
-        } else
-        if(direction == 1)
-        {
+        } else if (direction == 1) {
             renderBlocks.uvRotateTop = 3;
         }
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.TOP, meta);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.TOP, meta);
 
         renderBlocks.uvRotateTop = 0;
         final int f17 = isFootOfBed ? BlockLogicBed.headOfBedMap[BlockLogicBed.footToHeadMap[direction]] : BlockLogicBed.headOfBedMap[direction];
 
-        if(f17 != 2 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, x, y, z - 1, Side.NORTH)))
-        {
+        if (f17 != 2 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, tilePos.north(queryPos), Side.NORTH))) {
             renderBlocks.flipTexture = direction == 3;
-            renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.NORTH, meta);
+            renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.NORTH, meta);
         }
 
-        if(f17 != 3 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, x, y, z + 1, Side.SOUTH)))
-        {
+        if (f17 != 3 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, tilePos.south(queryPos), Side.SOUTH))) {
             renderBlocks.flipTexture = direction == 1;
-            renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.SOUTH, meta);
+            renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.SOUTH, meta);
         }
 
-        if(f17 != 4 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, x - 1, y, z, Side.WEST)))
-        {
+        if (f17 != 4 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, tilePos.west(queryPos), Side.WEST))) {
             renderBlocks.flipTexture = direction == 2;
-            renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.WEST, meta);
+            renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.WEST, meta);
         }
 
-        if(f17 != 5 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, x + 1, y, z, Side.EAST)))
-        {
+        if (f17 != 5 && (renderBlocks.renderAllFaces || shouldSideBeRendered(worldSource, bounds, tilePos.east(queryPos), Side.EAST))) {
             renderBlocks.flipTexture = direction == 0;
-            renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.EAST, meta);
+            renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.EAST, meta);
         }
         renderBlocks.resetRenderBlocks();
         return true;
     }
+
     @Override
-    public boolean shouldItemRender3d(){
+    public boolean shouldItemRender3d() {
         return false;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
-        if(side == Side.BOTTOM) {
-            return underTexture;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (side == Side.BOTTOM) {
+            return this.underTexture;
         }
         int k = BlockLogicBed.getDirection(data);
         int l = BlockLogicBed.bedDirection[k][side.getId()];
-        if(BlockLogicBed.isBlockFootOfBed(data)) {
-            if(l == 2) {
-                return bedTextures[3];
+        if (BlockLogicBed.isBlockFootOfBed(data)) {
+            if (l == 2) {
+                return this.bedTextures[3];
             }
-            if(l == 5 || l == 4) {
-                return bedTextures[4];
+            if (l == 5 || l == 4) {
+                return this.bedTextures[4];
             } else {
-                return bedTextures[5];
+                return this.bedTextures[5];
             }
         }
-        if(l == 3) {
-            return bedTextures[0];
+        if (l == 3) {
+            return this.bedTextures[0];
         }
-        if(l == 5 || l == 4) {
-            return bedTextures[1];
+        if (l == 5 || l == 4) {
+            return this.bedTextures[1];
         } else {
-            return bedTextures[2];
+            return this.bedTextures[2];
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBrazier.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBrazier.java
index aff52d9ca..5130dd287 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBrazier.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelBrazier.java
@@ -7,10 +7,13 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicBrazier;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelBrazier<T extends BlockLogicBrazier>
@@ -24,29 +27,30 @@ public class BlockModelBrazier<T extends BlockLogicBrazier>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         tessellator.setColorOpaque_I(0xFFFFFF);
 
         renderBlocks.enableAO = true;
-        renderBlocks.cache.setupCache(block, worldSource, x, y, z);
-        AABB bounds = block.getBounds();
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.NORTH, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.SOUTH, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.EAST, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.WEST, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.BOTTOM, 0);
+        renderBlocks.cache.setupCache(this.block, worldSource, tilePos);
+        AABBd bounds = new AABBd(this.block.getBounds());
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.NORTH, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.SOUTH, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.EAST, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.WEST, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, Side.BOTTOM, 0);
 
         final double zFightOffset = 0.005;
-        bounds.set(-zFightOffset, -zFightOffset, -zFightOffset, 1 + zFightOffset, 1 + zFightOffset, 1 + zFightOffset);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z + 1, 0, 0, 0, Side.NORTH, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z - 1, 0, 0, 0, Side.SOUTH, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x - 1, y, z, 0, 0, 0, Side.EAST, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x + 1, y, z, 0, 0, 0, Side.WEST, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y - 1, z, 0, 0, 0, Side.TOP, 0);
+        bounds.setMin(-zFightOffset, -zFightOffset, -zFightOffset).setMax(1 + zFightOffset, 1 + zFightOffset, 1 + zFightOffset);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos.south(queryPos), 0, 0, 0, Side.NORTH, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos.north(queryPos), 0, 0, 0, Side.SOUTH, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos.west(queryPos), 0, 0, 0, Side.EAST, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos.east(queryPos), 0, 0, 0, Side.WEST, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos.down(queryPos), 0, 0, 0, Side.TOP, 0);
         renderBlocks.enableAO = false;
 
-        if (block.getLogic().isBurning()) {
-            fireModel.render(tessellator, worldSource, x, y, z);
+        if (this.block.getLogic().isBurning()) {
+            this.fireModel.render(tessellator, worldSource, tilePos);
         }
 
         return true;
@@ -54,66 +58,66 @@ public class BlockModelBrazier<T extends BlockLogicBrazier>
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        AABB bounds = block.getBounds();
+        AABBdc bounds = this.block.getBounds();
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
         GL11.glColor4f(brightness, brightness, brightness, alpha);
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, -1F, 0.0F);
-        renderBlocks.renderBottomFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, baseTexture);
+        renderBlocks.renderBottomFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.baseTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 1.0F, 0.0F);
-        renderBlocks.renderTopFace(tessellator, bounds, 0.0D, -1.0D, 0.0D, baseTexture);
+        renderBlocks.renderTopFace(tessellator, bounds, 0.0D, -1.0D, 0.0D, this.baseTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 0.0F, -1F);
-        renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 0.0F, -1F);
-        renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 1.0D, sideTexture);
+        renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 1.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 0.0F, 1.0F);
-        renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 0.0F, 1.0F);
-        renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, -1.0D, sideTexture);
+        renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, -1.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(-1F, 0.0F, 0.0F);
-        renderBlocks.renderWestFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderWestFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(-1F, 0.0F, 0.0F);
-        renderBlocks.renderWestFace(tessellator, bounds, 1.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderWestFace(tessellator, bounds, 1.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(1.0F, 0.0F, 0.0F);
-        renderBlocks.renderEastFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderEastFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(1.0F, 0.0F, 0.0F);
-        renderBlocks.renderEastFace(tessellator, bounds, -1.0D, 0.0D, 0.0D, sideTexture);
+        renderBlocks.renderEastFace(tessellator, bounds, -1.0D, 0.0D, 0.0D, this.sideTexture);
         tessellator.draw();
 
         GL11.glTranslatef(0.5F, 0.5F, 0.5F);
     }
 
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side) {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
         return true;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelButtonPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelButtonPainted.java
index d8fa8116d..dadade9ea 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelButtonPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelButtonPainted.java
@@ -6,19 +6,21 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelButtonPainted<T extends BlockLogic> extends BlockModelStandard<T> {
     protected final IconCoordinate[] texCoords = new IconCoordinate[DyeColor.COLOR_AMOUNT];
+
     public BlockModelButtonPainted(final Block<T> block) {
         super(block);
-        for (final DyeColor c : DyeColor.blockOrderedColors()){
+        for (final DyeColor c : DyeColor.blockOrderedColors()) {
             this.texCoords[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/planks/" + c.colorID);
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(final Side side, final int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(final @NotNull Side side, final int meta) {
         return this.texCoords[(meta >> 4) & DyeColor.MASK_COLOR];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCactus.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCactus.java
index 55dd58cd8..2bb322c01 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCactus.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCactus.java
@@ -5,10 +5,12 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelCactus<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -17,36 +19,36 @@ public class BlockModelCactus<T extends BlockLogic> extends BlockModelStandard<T
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         final float sidesOffset = 0.0625F;
 
-        AABB bounds = block.getBounds();
-        bounds.set(sidesOffset, 0, 0, 1 - sidesOffset, 1, 1);
+        AABBd bounds = new AABBd(this.block.getBounds());
+        bounds.setMin(sidesOffset, 0, 0).setMax(1 - sidesOffset, 1, 1);
         renderBlocks.setRenderSide(Side.SOUTH, false);
         renderBlocks.setRenderSide(Side.NORTH, false);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         renderBlocks.renderBitMask = 0b111111;
 
-        bounds.set(0, 0, sidesOffset, 1, 1, 1 - sidesOffset);
+        bounds.setMin(0, 0, sidesOffset).setMax(1, 1, 1 - sidesOffset);
         renderBlocks.setRenderSide(Side.SOUTH, true);
         renderBlocks.setRenderSide(Side.NORTH, true);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         renderBlocks.renderBitMask = 0;
 
         return true;
     }
+
     @Override
-    public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate){
-        if(renderBlocks.useInventoryTint)
-        {
-            int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float r = (float)(color >> 16 & 0xff) / 255F;
-            float g = (float)(color >> 8 & 0xff) / 255F;
-            float b = (float)(color & 0xff) / 255F;
+    public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float r = (float) (color >> 16 & 0xff) / 255F;
+            float g = (float) (color >> 8 & 0xff) / 255F;
+            float b = (float) (color & 0xff) / 255F;
             GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
         }
 
-        AABB bounds = getBlockBoundsForItemRender();
+        AABBdc bounds = getBlockBoundsForItemRender();
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
         final float sidesOffset = 0.0625F;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCake.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCake.java
index 6086aa3ab..78244c2f9 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCake.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCake.java
@@ -5,10 +5,12 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelCake<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate cakeInner = TextureRegistry.getTexture("minecraft:block/cake/inner");
+
     public BlockModelCake(Block<T> block) {
         super(block);
         float f = 0.0625F;
@@ -17,11 +19,9 @@ public class BlockModelCake<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if(data > 0 && side == Side.WEST)
-        {
-            return cakeInner;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (data > 0 && side == Side.WEST) {
+            return this.cakeInner;
         }
         return super.getBlockTextureFromSideAndMetadata(side, data);
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCandle.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCandle.java
index eb60a4427..f390ed53b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCandle.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCandle.java
@@ -6,6 +6,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockModelCandle<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -14,21 +15,20 @@ public class BlockModelCandle<T extends BlockLogic> extends BlockModelStandard<T
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        boolean isLit = (worldSource.getBlockMetadata(x, y, z) & 0b00000001) == 0;
-        float brightness = isLit ? 1.0f : renderBlocks.getBlockBrightness(worldSource, x, y, z);
-
-        float minX = x + 0.5f - (1.5f / 16f);
-        float minY = y + 0f;
-        float minZ = z + 0.5f - (1.5f / 16f);
-        float maxX = x + 0.5f + (1.5f / 16f);
-        float maxY = y + 0.5f;
-        float maxZ = z + 0.5f + (1.5f / 16f);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        boolean isLit = (worldSource.getBlockData(tilePos) & 0b00000001) == 0;
+        float brightness = isLit ? 1.0f : renderBlocks.getBlockBrightness(worldSource, tilePos);
+
+        float minX = tilePos.x() + 0.5f - (1.5f / 16f);
+        float minY = tilePos.y() + 0f;
+        float minZ = tilePos.z() + 0.5f - (1.5f / 16f);
+        float maxX = tilePos.x() + 0.5f + (1.5f / 16f);
+        float maxY = tilePos.y() + 0.5f;
+        float maxZ = tilePos.z() + 0.5f + (1.5f / 16f);
         float wickMaxY = maxY + (6f / 16f);
 
         IconCoordinate texIndex = getParticleTexture(Side.TOP, 0);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             texIndex = renderBlocks.overrideBlockTexture;
         }
         double texU = texIndex.getIconUMin();
@@ -117,6 +117,7 @@ public class BlockModelCandle<T extends BlockLogic> extends BlockModelStandard<T
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChest.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChest.java
index c0d8200ef..0dcb496d4 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChest.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChest.java
@@ -8,6 +8,7 @@ import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
@@ -26,17 +27,18 @@ public class BlockModelChest<T extends BlockLogic> extends BlockModelStandard<T>
     protected IconCoordinate chestTopRight;
     protected IconCoordinate chestSide;
     protected IconCoordinate chestTop;
+
     public BlockModelChest(Block<T> block, String rootKey) {
         super(block);
-        chestFrontSingle = TextureRegistry.getTexture(rootKey + "front");
-        chestFrontLeft = TextureRegistry.getTexture(rootKey + "left_front");
-        chestFrontRight = TextureRegistry.getTexture(rootKey + "right_front");
-        chestTopLeft = TextureRegistry.getTexture(rootKey + "top_left");
-        chestTopRight = TextureRegistry.getTexture(rootKey + "top_right");
-        chestBackLeft = TextureRegistry.getTexture(rootKey + "left_back");
-        chestBackRight = TextureRegistry.getTexture(rootKey + "right_back");
-        chestSide = TextureRegistry.getTexture(rootKey + "side");
-        chestTop = TextureRegistry.getTexture(rootKey + "top");
+        this.chestFrontSingle = TextureRegistry.getTexture(rootKey + "front");
+        this.chestFrontLeft = TextureRegistry.getTexture(rootKey + "left_front");
+        this.chestFrontRight = TextureRegistry.getTexture(rootKey + "right_front");
+        this.chestTopLeft = TextureRegistry.getTexture(rootKey + "top_left");
+        this.chestTopRight = TextureRegistry.getTexture(rootKey + "top_right");
+        this.chestBackLeft = TextureRegistry.getTexture(rootKey + "left_back");
+        this.chestBackRight = TextureRegistry.getTexture(rootKey + "right_back");
+        this.chestSide = TextureRegistry.getTexture(rootKey + "side");
+        this.chestTop = TextureRegistry.getTexture(rootKey + "top");
 
         setDisplayPos(DisplayPos.GUI, CHEST_GUI);
         setDisplayPos(DisplayPos.HEAD, CHEST_HEAD);
@@ -44,8 +46,8 @@ public class BlockModelChest<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         final Direction dir = BlockLogicChest.getDirectionFromMeta(meta);
         switch (dir) {
             case NORTH:
@@ -63,62 +65,62 @@ public class BlockModelChest<T extends BlockLogic> extends BlockModelStandard<T>
                 break;
         }
 
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
         renderBlocks.resetRenderBlocks();
         return true;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side) {
-        int meta = blockAccess.getBlockMetadata(x, y, z);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        int meta = source.getBlockData(tilePos);
 
         Side facing = BlockLogicChest.getDirectionFromMeta(meta).getSide();
         BlockLogicChest.Type type = BlockLogicChest.getTypeFromMeta(meta);
 
-        if(side == Side.TOP || side == Side.BOTTOM) {
-            if(type == BlockLogicChest.Type.RIGHT) {
-                return chestTopRight;
+        if (side == Side.TOP || side == Side.BOTTOM) {
+            if (type == BlockLogicChest.Type.RIGHT) {
+                return this.chestTopRight;
             }
-            if(type == BlockLogicChest.Type.LEFT) {
-                return chestTopLeft;
+            if (type == BlockLogicChest.Type.LEFT) {
+                return this.chestTopLeft;
             }
 
-            return chestTop;
+            return this.chestTop;
         }
 
-        if(type == BlockLogicChest.Type.SINGLE) {
-            if(side == facing) {
-                return chestFrontSingle;
+        if (type == BlockLogicChest.Type.SINGLE) {
+            if (side == facing) {
+                return this.chestFrontSingle;
             }
         }
 
-        if(type == BlockLogicChest.Type.LEFT) {
-            if(side == facing) {
-                return chestFrontLeft;
+        if (type == BlockLogicChest.Type.LEFT) {
+            if (side == facing) {
+                return this.chestFrontLeft;
             }
-            if(side == facing.getOpposite()) {
-                return chestBackRight;
+            if (side == facing.getOpposite()) {
+                return this.chestBackRight;
             }
         }
-        if(type == BlockLogicChest.Type.RIGHT) {
-            if(side == facing) {
-                return chestFrontRight;
+        if (type == BlockLogicChest.Type.RIGHT) {
+            if (side == facing) {
+                return this.chestFrontRight;
             }
-            if(side == facing.getOpposite()) {
-                return chestBackLeft;
+            if (side == facing.getOpposite()) {
+                return this.chestBackLeft;
             }
         }
-        if(side.getAxis() != Axis.Y) {
-            return chestSide;
+        if (side.getAxis() != Axis.Y) {
+            return this.chestSide;
         }
 
-        return chestTop;
+        return this.chestTop;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
-        if (side == Side.SOUTH) return chestFrontSingle;
-        if (side.isHorizontal()) return chestSide;
-        return chestTop;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (side == Side.SOUTH) return this.chestFrontSingle;
+        if (side.isHorizontal()) return this.chestSide;
+        return this.chestTop;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChestPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChestPainted.java
index f2b7c1592..1179a1c46 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChestPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelChestPainted.java
@@ -9,6 +9,8 @@ import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelChestPainted<T extends BlockLogic> extends BlockModelChest<T> {
@@ -43,8 +45,8 @@ public class BlockModelChestPainted<T extends BlockLogic> extends BlockModelChes
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side) {
-        int meta = blockAccess.getBlockMetadata(x, y, z);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource blockAccess, @NotNull TilePosc tilePos, @NotNull Side side) {
+        int meta = blockAccess.getBlockData(tilePos);
         int color = meta >> 4;
 
         Side facing = BlockLogicChest.getDirectionFromMeta(meta).getSide();
@@ -91,7 +93,7 @@ public class BlockModelChestPainted<T extends BlockLogic> extends BlockModelChes
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         int color = data >> 4;
         if (side == Side.SOUTH) return texCoords[color][TEX_SINGLE_FRONT];
         if (side.isHorizontal()) return texCoords[color][TEX_SIDE];
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCobbledNetherrack.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCobbledNetherrack.java
index 3ccfcec23..09d16022f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCobbledNetherrack.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCobbledNetherrack.java
@@ -5,21 +5,27 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 public class BlockModelCobbledNetherrack<T extends BlockLogic> extends BlockModelStandard<T> {
-    private IconCoordinate ashSide = TextureRegistry.getTexture("minecraft:block/cobbled_netherrack/ashen_side");
+    private final IconCoordinate ashSide = TextureRegistry.getTexture("minecraft:block/cobbled_netherrack/ashen_side");
+
     public BlockModelCobbledNetherrack(Block<T> block) {
         super(block);
     }
 
     @Override
-    public IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side) {
-        Material material = blockAccess.getBlockMaterial(x, y + 1, z);
-        if ((material == Material.topAsh || material == Material.ash) && (side.getAxis() != Axis.Y)) {
-            return ashSide;
-        } else return super.getBlockTexture(blockAccess, x, y, z, side);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        Material material = source.getBlockMaterial(tilePos.up(new TilePos()));
+        if ((material == Materials.TOP_ASH || material == Materials.ASH) && (side.getAxis() != Axis.Y)) {
+            return this.ashSide;
+        } else return super.getBlockTexture(source, tilePos, side);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsPumpkin.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsPumpkin.java
index af2bcd3d6..a7889c1d1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsPumpkin.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsPumpkin.java
@@ -8,21 +8,22 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelCropsPumpkin<T extends BlockLogic> extends BlockModelStandard<T> {
     public static final IconCoordinate[] GROWTH_STAGE_TEXTURES_TOP = {
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage1_top"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage2_top"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage3_top"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage4_top")
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage1_top"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage2_top"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage3_top"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage4_top")
     };
     public static final IconCoordinate[] GROWTH_STAGE_TEXTURES_SIDE = {
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage1_side"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage2_side"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage3_side"),
-            TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage4_side")
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage1_side"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage2_side"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage3_side"),
+        TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage4_side")
     };
 
     public static final IconCoordinate LEAF_TEXTURE = TextureRegistry.getTexture("minecraft:block/crops_pumpkin/stage0");
@@ -32,19 +33,18 @@ public class BlockModelCropsPumpkin<T extends BlockLogic> extends BlockModelStan
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
-        final int meta = worldSource.getBlockMetadata(x, y, z);
+        final int meta = worldSource.getBlockData(tilePos);
         IconCoordinate leafTexture = LEAF_TEXTURE;
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             leafTexture = renderBlocks.overrideBlockTexture;
         }
         double uMin = leafTexture.getIconUMin();
@@ -52,12 +52,12 @@ public class BlockModelCropsPumpkin<T extends BlockLogic> extends BlockModelStan
         double vMin = leafTexture.getIconVMin();
         double vMax = leafTexture.getIconVMax();
 
-        double xMin = (x + 0.5D) - 0.25D;
-        double xMax = x + 0.5D + 0.25D;
-        double yMin = y + 0.0D;
-        double yMax = y + (3.0D / 16.0D);
-        double zMin = (z + 0.5D) - 0.5D;
-        double zMax = z + 0.5D + 0.5D;
+        double xMin = tilePos.x() + 0.5D - 0.25D;
+        double xMax = tilePos.x() + 0.5D + 0.25D;
+        double yMin = tilePos.y() + 0.0D;
+        double yMax = tilePos.y() + (3.0D / 16.0D);
+        double zMin = tilePos.z() + 0.5D - 0.5D;
+        double zMax = tilePos.z() + 0.5D + 0.5D;
         double extra = (10d / 16d);
         tessellator.addVertexWithUV(xMin - extra, yMax, zMax, uMin, vMin);
         tessellator.addVertexWithUV(xMax, yMin, zMax, uMin, vMax);
@@ -78,16 +78,18 @@ public class BlockModelCropsPumpkin<T extends BlockLogic> extends BlockModelStan
         tessellator.addVertexWithUV(xMin, yMin, zMax, uMin, vMax);
         tessellator.addVertexWithUV(xMin, yMin, zMin, uMax, vMax);
         tessellator.addVertexWithUV(xMax + extra, yMax, zMin, uMax, vMin);
-        if (meta >= 1) renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+        if (meta >= 1)
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         if (data < 1 || data > 4) {
             data = 1;
         }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsWheat.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsWheat.java
index 0f6b485c7..f55d93447 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsWheat.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCropsWheat.java
@@ -10,51 +10,51 @@ import net.minecraft.core.block.BlockLogicCropsWheat;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelCropsWheat<T extends BlockLogic> extends BlockModelStandard<T> {
     public final IconCoordinate[] growthStageTextures = {
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage0"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage1"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage2"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage3"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage4"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage5"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage6"),
-            TextureRegistry.getTexture("minecraft:block/crops_wheat/stage7")
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage0"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage1"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage2"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage3"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage4"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage5"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage6"),
+        TextureRegistry.getTexture("minecraft:block/crops_wheat/stage7")
     };
 
     public BlockModelCropsWheat(Block<T> block) {
         super(block);
-        assert growthStageTextures.length == BlockLogicCropsWheat.MAX_GROWTH_STATE + 1 : "There must be a texture for each wheat growth stage!";
+        assert this.growthStageTextures.length == BlockLogicCropsWheat.MAX_GROWTH_STATE + 1 : "There must be a texture for each wheat growth stage!";
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
-        IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.BOTTOM, worldSource.getBlockMetadata(x, y, z));
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.BOTTOM, worldSource.getBlockData(tilePos));
+        if (renderBlocks.overrideBlockTexture != null) {
             texture = renderBlocks.overrideBlockTexture;
         }
         double uMin = texture.getIconUMin();
         double uMax = texture.getIconUMax();
         double vMin = texture.getIconVMin();
         double vMax = texture.getIconVMax();
-        double xMin = ((double) x + 0.5D) - 0.25D;
-        double xMax = (double) x + 0.5D + 0.25D;
-        double zMin = ((double) z + 0.5D) - 0.5D;
-        double zMax = (double) z + 0.5D + 0.5D;
+        double xMin = tilePos.x() + 0.5D - 0.25D;
+        double xMax = tilePos.x() + 0.5D + 0.25D;
+        double zMin = tilePos.z() + 0.5D - 0.5D;
+        double zMax = tilePos.z() + 0.5D + 0.5D;
 
-        double yd = (float)y - 0.0625F;
+        double yd = (float) tilePos.y() - 0.0625F;
         tessellator.addVertexWithUV(xMin, yd + 1.0D, zMin, uMin, vMin);
         tessellator.addVertexWithUV(xMin, yd + 0.0D, zMin, uMin, vMax);
         tessellator.addVertexWithUV(xMin, yd + 0.0D, zMax, uMax, vMax);
@@ -72,10 +72,10 @@ public class BlockModelCropsWheat<T extends BlockLogic> extends BlockModelStanda
         tessellator.addVertexWithUV(xMax, yd + 0.0D, zMax, uMax, vMax);
         tessellator.addVertexWithUV(xMax, yd + 1.0D, zMax, uMax, vMin);
 
-        xMin = ((double) x + 0.5D) - 0.5D;
-        xMax = (double) x + 0.5D + 0.5D;
-        zMin = ((double) z + 0.5D) - 0.25D;
-        zMax = (double) z + 0.5D + 0.25D;
+        xMin = tilePos.x() + 0.5D - 0.5D;
+        xMax = tilePos.x() + 0.5D + 0.5D;
+        zMin = tilePos.z() + 0.5D - 0.25D;
+        zMax = tilePos.z() + 0.5D + 0.25D;
         tessellator.addVertexWithUV(xMin, yd + 1.0D, zMin, uMin, vMin);
         tessellator.addVertexWithUV(xMin, yd + 0.0D, zMin, uMin, vMax);
         tessellator.addVertexWithUV(xMax, yd + 0.0D, zMin, uMax, vMax);
@@ -94,14 +94,14 @@ public class BlockModelCropsWheat<T extends BlockLogic> extends BlockModelStanda
         tessellator.addVertexWithUV(xMax, yd + 1.0D, zMax, uMax, vMin);
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        return growthStageTextures[MathHelper.clamp(data, 0, BlockLogicCropsWheat.MAX_GROWTH_STATE)];
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        return this.growthStageTextures[MathHelper.clamp(data, 0, BlockLogicCropsWheat.MAX_GROWTH_STATE)];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrossedSquares.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrossedSquares.java
index c0a0ff117..25f506ac0 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrossedSquares.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrossedSquares.java
@@ -9,39 +9,38 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.lwjgl.opengl.GL11;
-import org.useless.dragonfly.DisplayPos;
 
 public class BlockModelCrossedSquares<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelCrossedSquares(Block<T> block) {
         super(block);
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if (LightmapHelper.isLightmapEnabled()){
+        if (LightmapHelper.isLightmapEnabled()) {
             brightness = 1f;
         }
         float r = 1f;
         float g = 1f;
         float b = 1f;
         // Used for the rendering for the block inside the jar
-        GL11.glColor4f(1f, 1f, 1f,1f);
-        if(renderBlocks.useInventoryTint)
-        {
-            int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            r = (float)(color >> 16 & 0xff) / 255F;
-            g = (float)(color >> 8 & 0xff) / 255F;
-            b = (float)(color & 0xff) / 255F;
+        GL11.glColor4f(1f, 1f, 1f, 1f);
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            r = (float) (color >> 16 & 0xff) / 255F;
+            g = (float) (color >> 8 & 0xff) / 255F;
+            b = (float) (color & 0xff) / 255F;
         }
         final float yOffset = 0.0F;
 
         GL11.glTranslatef(-0.5F, -0.5f, -0.5F);
 
         IconCoordinate texIndex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, metadata);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             texIndex = renderBlocks.overrideBlockTexture;
         }
         final double minU = texIndex.getIconUMin();
@@ -51,7 +50,7 @@ public class BlockModelCrossedSquares<T extends BlockLogic> extends BlockModelSt
 
         tessellator.startDrawingQuads();
         tessellator.setColorRGBA_F(r * brightness, g * brightness, b * brightness, alpha);
-        if (LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null){
+        if (LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null) {
             tessellator.setLightmapCoord(lightmapCoordinate);
         }
 
@@ -87,38 +86,36 @@ public class BlockModelCrossedSquares<T extends BlockLogic> extends BlockModelSt
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(!LightmapHelper.isLightmapEnabled()) {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-        }else {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
+        if (!LightmapHelper.isLightmapEnabled()) {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+        } else {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
         }
-        
-        int color = BlockColorDispatcher.getInstance().getDispatch(block).getWorldColor(worldSource, x, y, z, 0);
-        float r = (float)(color >> 16 & 0xff) / 255F;
-        float g = (float)(color >> 8 & 0xff) / 255F;
-        float b = (float)(color & 0xff) / 255F;
+
+        int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getWorldColor(worldSource, tilePos, 0);
+        float r = (float) (color >> 16 & 0xff) / 255F;
+        float g = (float) (color >> 8 & 0xff) / 255F;
+        float b = (float) (color & 0xff) / 255F;
         tessellator.setColorOpaque_F(brightness * r, brightness * g, brightness * b);
 
-        double xd = x;
-        double yd = y;
-        double zd = z;
+        double xd = tilePos.x();
+        double yd = tilePos.y();
+        double zd = tilePos.z();
 
         // Shift grass position with deterministic position based random
-        if(block == Blocks.TALLGRASS || block == Blocks.TALLGRASS_FERN || block == Blocks.SPINIFEX)
-        {
-            long dRandom = (x * 0x2fc20fL) ^ (long)z * 0x6ebfff5L ^ (long)y;
+        if (this.block == Blocks.TALLGRASS || this.block == Blocks.TALLGRASS_FERN || this.block == Blocks.SPINIFEX) {
+            long dRandom = (tilePos.x() * 0x2fc20fL) ^ (long) tilePos.z() * 0x6ebfff5L ^ (long) tilePos.y();
             dRandom = dRandom * dRandom * 0x285b825L + dRandom * 11L;
-            xd += ((double)((float)(dRandom >> 16 & 15L) / 15F) - 0.5D) * 0.5D;
-            yd += ((double)((float)(dRandom >> 20 & 15L) / 15F) - 1.0D) * 0.2D;
-            zd += ((double)((float)(dRandom >> 24 & 15L) / 15F) - 0.5D) * 0.5D;
+            xd += ((double) ((float) (dRandom >> 16 & 15L) / 15F) - 0.5D) * 0.5D;
+            yd += ((double) ((float) (dRandom >> 20 & 15L) / 15F) - 1.0D) * 0.2D;
+            zd += ((double) ((float) (dRandom >> 24 & 15L) / 15F) - 0.5D) * 0.5D;
         }
 
-        int metadata = worldSource.getBlockMetadata(x, y, z);
+        int metadata = worldSource.getBlockData(tilePos);
         IconCoordinate texIndex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, metadata);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             texIndex = renderBlocks.overrideBlockTexture;
         }
         final double minU = texIndex.getIconUMin();
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrystallineNetherrack.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrystallineNetherrack.java
index 866218565..f25fd0de9 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrystallineNetherrack.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelCrystallineNetherrack.java
@@ -6,28 +6,31 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelCrystallineNetherrack<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate overlay;
+
     public BlockModelCrystallineNetherrack(Block<T> block) {
         super(block);
-        overlay = TextureRegistry.getTexture("minecraft:block/nether_crystal/overlay");
+        this.overlay = TextureRegistry.getTexture("minecraft:block/nether_crystal/overlay");
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z, 1.0f, 1.0f, 1.0f);
-        renderBlocks.overrideBlockTexture = overlay;
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos, 1.0f, 1.0f, 1.0f);
+        renderBlocks.overrideBlockTexture = this.overlay;
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         renderBlocks.overrideBlockTexture = null;
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         renderBlocks.useInventoryTint = false;
@@ -35,14 +38,14 @@ public class BlockModelCrystallineNetherrack<T extends BlockLogic> extends Block
         renderBlocks.useInventoryTint = true;
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
-        int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-        float r = (float)(color >> 16 & 0xff) / 255F;
-        float g = (float)(color >> 8 & 0xff) / 255F;
-        float b = (float)(color & 0xff) / 255F;
+        int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+        float r = (float) (color >> 16 & 0xff) / 255F;
+        float g = (float) (color >> 8 & 0xff) / 255F;
+        float b = (float) (color & 0xff) / 255F;
         GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
 
-        AABB bounds = block.getBounds();
-        IconCoordinate coord = overlay;
+        AABBdc bounds = this.block.getBounds();
+        IconCoordinate coord = this.overlay;
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, -1F, 0.0F);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDispatcher.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDispatcher.java
index e6acd9aa6..442561d01 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDispatcher.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDispatcher.java
@@ -17,32 +17,32 @@ import static net.minecraft.client.render.block.model.BlockModelStandard.OVERBRI
 import static net.minecraft.client.render.block.model.BlockModelStandard.RETRO_BLOCK_TEXTURES;
 
 public final class BlockModelDispatcher
-    extends Dispatcher<Block<?>, BlockModel<?>>
-{
+    extends Dispatcher<Block<?>, BlockModel<?>> {
     private static final Side[] S_TB = {Side.TOP, Side.BOTTOM};
     private static final Side[] S_SIDES = {Side.NORTH, Side.EAST, Side.SOUTH, Side.WEST};
 
     private static BlockModelDispatcher instance = new BlockModelDispatcher();
-    public static BlockModelDispatcher getInstance()
-    {
+
+    public static BlockModelDispatcher getInstance() {
         return instance;
     }
+
     public static BlockModelEmpty<?> modelEmpty = new BlockModelEmpty<>(null);
-    public void addDispatch(final BlockModel<?> model)
-    {
+
+    public void addDispatch(final BlockModel<?> model) {
         addDispatch(model.block, model);
     }
+
     @Override
-    public void addDispatch(final Block<?> key, final BlockModel<?> value)
-    {
-        if (hasDispatch(key)){
+    public void addDispatch(final Block<?> key, final BlockModel<?> value) {
+        if (hasDispatch(key)) {
             throw new IllegalArgumentException("Block '" + key.toString() + "' already assigned a model!");
         }
         this.dispatches.put(key, value);
     }
+
     @Override
-    protected BlockModel<?> getDefault()
-    {
+    protected BlockModel<?> getDefault() {
         return modelEmpty;
     }
 
@@ -431,9 +431,9 @@ public final class BlockModelDispatcher
         addDispatch(new BlockModelStandard<>(Blocks.ORE_DIAMOND_GRANITE).setAllTextures(BLOCK_TEXTURES, "minecraft:block/ore/diamond/granite"));
         addDispatch(new BlockModelStandard<>(Blocks.ORE_DIAMOND_PERMAFROST).setAllTextures(BLOCK_TEXTURES, "minecraft:block/ore/diamond/permafrost"));
 
-        addDispatch(new BlockModelStandard<>(Blocks.CRYSTAL).setAllTextures(BLOCK_TEXTURES,"minecraft:block/nether_crystal/crystal"));
-        addDispatch(new BlockModelCrossedSquares<>(Blocks.CRYSTAL_STALK).setAllTextures(BLOCK_TEXTURES,"minecraft:block/nether_crystal/stalk"));
-        addDispatch(new BlockModelCrystallineNetherrack<>(Blocks.NETHERRACK_CRYSTALLINE).setAllTextures(BLOCK_TEXTURES,"minecraft:block/nether_crystal/crystal_netherrack"));
+        addDispatch(new BlockModelStandard<>(Blocks.CRYSTAL).setAllTextures(BLOCK_TEXTURES, "minecraft:block/nether_crystal/crystal"));
+        addDispatch(new BlockModelCrossedSquares<>(Blocks.CRYSTAL_STALK).setAllTextures(BLOCK_TEXTURES, "minecraft:block/nether_crystal/stalk"));
+        addDispatch(new BlockModelCrystallineNetherrack<>(Blocks.NETHERRACK_CRYSTALLINE).setAllTextures(BLOCK_TEXTURES, "minecraft:block/nether_crystal/crystal_netherrack"));
 
         addDispatch(new BlockModelStandard<>(Blocks.ORE_NETHERCOAL_NETHERRACK)
             .setAllTextures(BLOCK_TEXTURES, "minecraft:block/ore/nethercoal/netherrack")
@@ -516,21 +516,21 @@ public final class BlockModelDispatcher
             TextureRegistry.getTexture("minecraft:block/piston/face"))
             .setPistonTextures("minecraft:block/piston/side", "minecraft:block/piston/top", "minecraft:block/piston/bottom")
             .setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston/face")
-            .withCustomItemBounds(0,0,0,1,1,1));
+            .withCustomItemBounds(0, 0, 0, 1, 1, 1));
         addDispatch(new BlockModelPiston<>(Blocks.PISTON_BASE_STICKY,
             TextureRegistry.getTexture("minecraft:block/piston_sticky/face"))
             .setPistonTextures("minecraft:block/piston_sticky/side", "minecraft:block/piston_sticky/top", "minecraft:block/piston_sticky/bottom")
             .setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston_sticky/face")
-            .withCustomItemBounds(0,0,0,1,1,1));
+            .withCustomItemBounds(0, 0, 0, 1, 1, 1));
         addDispatch(new BlockModelPiston<>(Blocks.PISTON_BASE_STEEL,
-            TextureRegistry.getTexture("minecraft:block/piston_steel/face"), 6/16d)
+            TextureRegistry.getTexture("minecraft:block/piston_steel/face"), 6 / 16d)
             .setPistonTextures("minecraft:block/piston_steel/side", "minecraft:block/piston_steel/top", "minecraft:block/piston_steel/bottom")
             .setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston_steel/face")
-            .withCustomItemBounds(0,0,0,1,1,1));
+            .withCustomItemBounds(0, 0, 0, 1, 1, 1));
 
         addDispatch(new BlockModelPistonHead(Blocks.PISTON_HEAD, TextureRegistry.getTexture("minecraft:block/piston/head"), TextureRegistry.getTexture("minecraft:block/piston/shaft")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston/face"));
         addDispatch(new BlockModelEmpty<>(Blocks.PISTON_MOVING).setAllTextures(BLOCK_TEXTURES, (IconCoordinate) null));
-        addDispatch(new BlockModelPistonHead(Blocks.PISTON_HEAD_STEEL, TextureRegistry.getTexture("minecraft:block/piston_steel/head"), TextureRegistry.getTexture("minecraft:block/piston_steel/shaft"), 6/16d, 8d/16d).setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston_steel/face"));
+        addDispatch(new BlockModelPistonHead(Blocks.PISTON_HEAD_STEEL, TextureRegistry.getTexture("minecraft:block/piston_steel/head"), TextureRegistry.getTexture("minecraft:block/piston_steel/shaft"), 6 / 16d, 8d / 16d).setAllTextures(BLOCK_TEXTURES, "minecraft:block/piston_steel/face"));
 
         addDispatch(new BlockModelStandard<>(Blocks.NOTEBLOCK).setAllTextures(BLOCK_TEXTURES, "minecraft:block/noteblock"));
 
@@ -791,9 +791,9 @@ public final class BlockModelDispatcher
 
         addDispatch(new BlockModelPebbles<>(Blocks.OVERLAY_PEBBLES));
 
-        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_CHAINLINK,TextureRegistry.getTexture("minecraft:block/fence_chain/center"), null, TextureRegistry.getTexture("minecraft:block/fence_chain/top"), TextureRegistry.getTexture("minecraft:block/fence_chain/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_chain/center"));
-        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_PAPER_WALL,TextureRegistry.getTexture("minecraft:block/fence_paper/center"), null, null, TextureRegistry.getTexture("minecraft:block/fence_paper/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_paper/center"));
-        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_STEEL,TextureRegistry.getTexture("minecraft:block/fence_steel/center"), null, TextureRegistry.getTexture("minecraft:block/fence_steel/top"), TextureRegistry.getTexture("minecraft:block/fence_steel/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_steel/center"));
+        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_CHAINLINK, TextureRegistry.getTexture("minecraft:block/fence_chain/center"), null, TextureRegistry.getTexture("minecraft:block/fence_chain/top"), TextureRegistry.getTexture("minecraft:block/fence_chain/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_chain/center"));
+        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_PAPER_WALL, TextureRegistry.getTexture("minecraft:block/fence_paper/center"), null, null, TextureRegistry.getTexture("minecraft:block/fence_paper/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_paper/center"));
+        addDispatch(new BlockModelFenceThin<>(Blocks.FENCE_STEEL, TextureRegistry.getTexture("minecraft:block/fence_steel/center"), null, TextureRegistry.getTexture("minecraft:block/fence_steel/top"), TextureRegistry.getTexture("minecraft:block/fence_steel/column")).setAllTextures(BLOCK_TEXTURES, "minecraft:block/fence_steel/center"));
 
         addDispatch(new BlockModelBasket<>(Blocks.BASKET)
             .setTex(BLOCK_TEXTURES, "minecraft:block/basket/bottom", S_TB)
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoor.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoor.java
index 6f9ac3165..dade5a67e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoor.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoor.java
@@ -6,119 +6,121 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicDoor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelDoor<T extends BlockLogicDoor> extends BlockModelStandard<T> {
     public BlockModelDoor(Block<T> block) {
         super(block);
     }
-    
-    public void setBrightness(Tessellator tessellator, WorldSource worldSource, int x, int y, int z, float sideBrightness) {
-    	float brightness = sideBrightness;
-    	if(LightmapHelper.isLightmapEnabled()) {
-    		tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-    	}else {
-    		brightness *= renderBlocks.getBlockBrightness(worldSource, x, y, z);
-    	}
-    	tessellator.setColorOpaque_F(brightness, brightness, brightness);
+
+    public void setBrightness(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos, float sideBrightness) {
+        float brightness = sideBrightness;
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness *= renderBlocks.getBlockBrightness(worldSource, tilePos);
+        }
+        tessellator.setColorOpaque_F(brightness, brightness, brightness);
     }
-    
+
     @Override
-	public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-    	if(LightmapHelper.isLightmapEnabled()) {
-    		tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
-    	}
-    	tessellator.setColorOpaque_F(1.0f, 1.0f, 1.0f);
-
-		AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
-
-		float sideBottom = 1.0f;
-		float sideTop = 1.0f;
-		float sideNorthSouth = 1.0f;
-		float sideEastWest = 1.0f;
-		if(ENABLE_DIRECTIONAL_LIGHTING) {
-			sideBottom = 0.5f;
-			sideTop = 1.0f;
-			sideNorthSouth = 0.8f;
-			sideEastWest = 0.6f;
-		}
-		
-		boolean aboveIsDoor = Block.hasLogicClass(worldSource.getBlock(x, y + 1, z), BlockLogicDoor.class);
-		boolean belowIsDoor = Block.hasLogicClass(worldSource.getBlock(x, y - 1, z), BlockLogicDoor.class);
-
-		int meta = worldSource.getBlockMetadata(x, y, z);
-		
-		// Bottom
-		if(!belowIsDoor) {
-			setBrightness(tessellator, worldSource, x, y - 1, z, sideBottom);
-			renderBlocks.renderBottomFace(tessellator, bounds, x, y, z, getBlockTexture(worldSource, x, y, z, Side.BOTTOM));
-		}
-		
-		// Top
-		if(!aboveIsDoor) {
-			setBrightness(tessellator, worldSource, x, y + 1, z, sideTop);
-			renderBlocks.renderTopFace(tessellator, bounds, x, y, z, getBlockTexture(worldSource, x, y, z, Side.TOP));
-		}
-		
-		// North
-		if(bounds.minZ > FULL_CUBE_THRESHOLD) {
-			setBrightness(tessellator, worldSource, x, y, z, sideNorthSouth);
-		}else {
-			setBrightness(tessellator, worldSource, x, y, z - 1, sideNorthSouth);
-		}
-		renderBlocks.flipTexture = shouldFlipTexture(Side.NORTH, meta);
-		IconCoordinate texture = getBlockTexture(worldSource, x, y, z, Side.NORTH);
-		renderBlocks.renderNorthFace(tessellator, bounds, x, y, z, texture);
-		renderBlocks.flipTexture = false;
-		
-		// South
-		if(bounds.maxZ < 1.0f - FULL_CUBE_THRESHOLD) {
-			setBrightness(tessellator, worldSource, x, y, z, sideNorthSouth);
-		}else {
-			setBrightness(tessellator, worldSource, x, y, z + 1, sideNorthSouth);
-		}
-		renderBlocks.flipTexture = shouldFlipTexture(Side.SOUTH, meta);
-		texture = getBlockTexture(worldSource, x, y, z, Side.SOUTH);
-		renderBlocks.renderSouthFace(tessellator, bounds, x, y, z, texture);
-		renderBlocks.flipTexture = false;
-		
-		// West
-		if(bounds.minX > FULL_CUBE_THRESHOLD) {
-			setBrightness(tessellator, worldSource, x, y, z, sideEastWest);
-		}else {
-			setBrightness(tessellator, worldSource, x - 1, y, z, sideEastWest);
-		}
-		renderBlocks.flipTexture = shouldFlipTexture(Side.WEST, meta);
-		texture = getBlockTexture(worldSource, x, y, z, Side.WEST);
-		renderBlocks.renderWestFace(tessellator, bounds, x, y, z, texture);
-		renderBlocks.flipTexture = false;
-		
-		// East
-		if(bounds.maxX < 1.0f - FULL_CUBE_THRESHOLD) {
-			setBrightness(tessellator, worldSource, x, y, z, sideEastWest);
-		}else {
-			setBrightness(tessellator, worldSource, x + 1, y, z, sideEastWest);
-		}
-		renderBlocks.flipTexture = shouldFlipTexture(Side.EAST, meta);
-		texture = getBlockTexture(worldSource, x, y, z, Side.EAST);
-		renderBlocks.renderEastFace(tessellator, bounds, x, y, z, texture);
-		renderBlocks.flipTexture = false;
-		return true;
-	}
-    
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
+        }
+        tessellator.setColorOpaque_F(1.0f, 1.0f, 1.0f);
+
+        AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
+        TilePos queryPos = new TilePos();
+
+        float sideBottom = 1.0f;
+        float sideTop = 1.0f;
+        float sideNorthSouth = 1.0f;
+        float sideEastWest = 1.0f;
+        if (ENABLE_DIRECTIONAL_LIGHTING) {
+            sideBottom = 0.5f;
+            sideTop = 1.0f;
+            sideNorthSouth = 0.8f;
+            sideEastWest = 0.6f;
+        }
+
+        boolean aboveIsDoor = Block.hasLogicClass(worldSource.getBlock(tilePos.up(queryPos)), BlockLogicDoor.class);
+        boolean belowIsDoor = Block.hasLogicClass(worldSource.getBlock(tilePos.down(queryPos)), BlockLogicDoor.class);
+
+        int meta = worldSource.getBlockData(tilePos);
+
+        // Bottom
+        if (!belowIsDoor) {
+            setBrightness(tessellator, worldSource, tilePos.down(queryPos), sideBottom);
+            renderBlocks.renderBottomFace(tessellator, bounds, tilePos, getBlockTexture(worldSource, tilePos, Side.BOTTOM));
+        }
+
+        // Top
+        if (!aboveIsDoor) {
+            setBrightness(tessellator, worldSource, tilePos.up(queryPos), sideTop);
+            renderBlocks.renderTopFace(tessellator, bounds, tilePos, getBlockTexture(worldSource, tilePos, Side.TOP));
+        }
+
+        // North
+        if (bounds.minZ() > FULL_CUBE_THRESHOLD) {
+            setBrightness(tessellator, worldSource, tilePos, sideNorthSouth);
+        } else {
+            setBrightness(tessellator, worldSource, tilePos.north(queryPos), sideNorthSouth);
+        }
+        renderBlocks.flipTexture = shouldFlipTexture(Side.NORTH, meta);
+        IconCoordinate texture = getBlockTexture(worldSource, tilePos, Side.NORTH);
+        renderBlocks.renderNorthFace(tessellator, bounds, tilePos, texture);
+        renderBlocks.flipTexture = false;
+
+        // South
+        if (bounds.maxZ() < 1.0f - FULL_CUBE_THRESHOLD) {
+            setBrightness(tessellator, worldSource, tilePos, sideNorthSouth);
+        } else {
+            setBrightness(tessellator, worldSource, tilePos.south(queryPos), sideNorthSouth);
+        }
+        renderBlocks.flipTexture = shouldFlipTexture(Side.SOUTH, meta);
+        texture = getBlockTexture(worldSource, tilePos, Side.SOUTH);
+        renderBlocks.renderSouthFace(tessellator, bounds, tilePos, texture);
+        renderBlocks.flipTexture = false;
+
+        // West
+        if (bounds.minX() > FULL_CUBE_THRESHOLD) {
+            setBrightness(tessellator, worldSource, tilePos, sideEastWest);
+        } else {
+            setBrightness(tessellator, worldSource, tilePos.west(queryPos), sideEastWest);
+        }
+        renderBlocks.flipTexture = shouldFlipTexture(Side.WEST, meta);
+        texture = getBlockTexture(worldSource, tilePos, Side.WEST);
+        renderBlocks.renderWestFace(tessellator, bounds, tilePos, texture);
+        renderBlocks.flipTexture = false;
+
+        // East
+        if (bounds.maxX() < 1.0f - FULL_CUBE_THRESHOLD) {
+            setBrightness(tessellator, worldSource, tilePos, sideEastWest);
+        } else {
+            setBrightness(tessellator, worldSource, tilePos.east(queryPos), sideEastWest);
+        }
+        renderBlocks.flipTexture = shouldFlipTexture(Side.EAST, meta);
+        texture = getBlockTexture(worldSource, tilePos, Side.EAST);
+        renderBlocks.renderEastFace(tessellator, bounds, tilePos, texture);
+        renderBlocks.flipTexture = false;
+        return true;
+    }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
 
-    protected boolean shouldFlipTexture(Side side, int meta){
-        if(side == Side.TOP || side == Side.BOTTOM) return false;
-        int state = block.getLogic().getRotation(meta);
+    protected boolean shouldFlipTexture(@NotNull Side side, int meta) {
+        if (side == Side.TOP || side == Side.BOTTOM) return false;
+        int state = this.block.getLogic().getRotation(meta);
         int l = state / 2 + (side.getId() & 1 ^ state);
-        if((state == 0 || state == 2) ^ (side.getId() <= 3))
-        {
+        if ((state == 0 || state == 2) ^ (side.getId() <= 3)) {
             return false;
         }
         l += (meta & 4) / 4;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorGlass.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorGlass.java
index cecdafc59..659a04668 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorGlass.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorGlass.java
@@ -3,13 +3,14 @@ package net.minecraft.client.render.block.model;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicDoor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 
 public class BlockModelDoorGlass<T extends BlockLogicDoor> extends BlockModelDoor<T> {
     public BlockModelDoorGlass(Block<T> block) {
         super(block);
     }
     @Override
-    protected boolean shouldFlipTexture(Side side, int meta){
+    protected boolean shouldFlipTexture(@NotNull Side side, int meta){
         return false;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorPainted.java
index 5e9e61c16..3bf6d7473 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelDoorPainted.java
@@ -7,6 +7,7 @@ import net.minecraft.core.block.BlockLogicDoor;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelDoorPainted<T extends BlockLogicDoor> extends BlockModelDoor<T> {
@@ -27,12 +28,12 @@ public class BlockModelDoorPainted<T extends BlockLogicDoor> extends BlockModelD
         this.isTop = isTop;
     }
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data)
     {
         int color = (data >> 4) & DyeColor.MASK_COLOR;
         if (side.getAxis() == Axis.Y){
             return frameTopTextures[color];
-        } else if (isTop){
+        } else if (this.isTop){
             return doorTopTextures[color];
         }
         return doorBottomTextures[color];
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelEmpty.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelEmpty.java
index b1d381d22..36d0d7d2b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelEmpty.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelEmpty.java
@@ -5,6 +5,7 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -15,7 +16,7 @@ public class BlockModelEmpty<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z) {
+    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos) {
         return false;
     }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFarmland.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFarmland.java
index d3e746ab6..3b9a2ad41 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFarmland.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFarmland.java
@@ -6,6 +6,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicFarmland;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelFarmland<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -20,24 +21,24 @@ public class BlockModelFarmland<T extends BlockLogic> extends BlockModelStandard
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, final int data)
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, final int data)
     {
         boolean isWet = BlockLogicFarmland.isWet(data);
         boolean isFertilized = BlockLogicFarmland.isFertilized(data);
 
         if (side == Side.TOP) {
             if (isWet && isFertilized) {
-                return topWetFertilized;
+                return this.topWetFertilized;
             } else if (isWet) {
-                return topWet;
+                return this.topWet;
             } else if (isFertilized) {
-                return topDryFertilized;
+                return this.topDryFertilized;
             } else {
-                return topDry;
+                return this.topDry;
             }
         } else {
             if (isWet) {
-                return mud;
+                return this.mud;
             }
             return super.getBlockTextureFromSideAndMetadata(side, data);
         }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFence.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFence.java
index 9c84b7a54..8ffd6326b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFence.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFence.java
@@ -5,16 +5,19 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFence;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.DisplayPos;
 
-public class BlockModelFence<T  extends BlockLogicFence> extends BlockModelStandard<T> {
+public class BlockModelFence<T extends BlockLogicFence> extends BlockModelStandard<T> {
     protected static final DisplayPos FENCE_GUI = new DisplayPos(0, 0, 0, 30, 225 - 90, 0, 0.625f, 0.625f, 0.625f);
     protected static final DisplayPos FENCE_HEAD = new DisplayPos(0, 0, 0, 0, 90, 0, 1f, 1f, 1f);
+
     public BlockModelFence(Block<T> block) {
         super(block);
 
@@ -23,28 +26,25 @@ public class BlockModelFence<T  extends BlockLogicFence> extends BlockModelStand
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         final float f = 0.375F;
         final float f1 = 0.625F;
-        AABB bounds = AABB.fromPool(f, 0.0F, f, f1, 1.0F, f1);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        AABBd bounds = new AABBd(f, 0.0F, f, f1, 1.0F, f1);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         boolean connectedWestEast = false;
         boolean connectedNorthSouth = false;
-        BlockLogicFence fence = block.getLogic();
-        if(fence.canConnectTo(worldSource, x, y, z, Side.WEST) || fence.canConnectTo(worldSource, x, y, z, Side.EAST))
-        {
+        BlockLogicFence fence = this.block.getLogic();
+        if (fence.canConnectTo(worldSource, tilePos, Side.WEST) || fence.canConnectTo(worldSource, tilePos, Side.EAST)) {
             connectedWestEast = true;
         }
-        if(fence.canConnectTo(worldSource, x, y, z, Side.NORTH) || fence.canConnectTo(worldSource, x, y, z, Side.SOUTH))
-        {
+        if (fence.canConnectTo(worldSource, tilePos, Side.NORTH) || fence.canConnectTo(worldSource, tilePos, Side.SOUTH)) {
             connectedNorthSouth = true;
         }
-        boolean flag3 = fence.canConnectTo(worldSource, x, y, z, Side.WEST);
-        boolean flag4 = fence.canConnectTo(worldSource, x, y, z, Side.EAST);
-        boolean flag5 = fence.canConnectTo(worldSource, x, y, z, Side.NORTH);
-        boolean flag6 = fence.canConnectTo(worldSource, x, y, z, Side.SOUTH);
-        if(!connectedWestEast && !connectedNorthSouth)
-        {
+        boolean flag3 = fence.canConnectTo(worldSource, tilePos, Side.WEST);
+        boolean flag4 = fence.canConnectTo(worldSource, tilePos, Side.EAST);
+        boolean flag5 = fence.canConnectTo(worldSource, tilePos, Side.NORTH);
+        boolean flag6 = fence.canConnectTo(worldSource, tilePos, Side.SOUTH);
+        if (!connectedWestEast && !connectedNorthSouth) {
             connectedWestEast = true;
         }
         final float f8 = 0.4375F;
@@ -55,65 +55,50 @@ public class BlockModelFence<T  extends BlockLogicFence> extends BlockModelStand
         final float f5 = flag4 ? 1.0F : f9;
         final float f6 = flag5 ? 0.0F : f8;
         final float f7 = flag6 ? 1.0F : f9;
-        if(connectedWestEast)
-        {
-            bounds.set(f4, f2, f8, f5, f3, f9);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (connectedWestEast) {
+            bounds.setMin(f4, f2, f8).setMax(f5, f3, f9);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if(connectedNorthSouth)
-        {
-            bounds.set(f8, f2, f6, f9, f3, f7);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (connectedNorthSouth) {
+            bounds.setMin(f8, f2, f6).setMax(f9, f3, f7);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
         final float f10 = 0.375F;
         final float f11 = 0.5625F;
-        if(connectedWestEast)
-        {
-            bounds.set(f4, f10, f8, f5, f11, f9);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (connectedWestEast) {
+            bounds.setMin(f4, f10, f8).setMax(f5, f11, f9);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if(connectedNorthSouth)
-        {
-            bounds.set(f8, f10, f6, f9, f11, f7);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (connectedNorthSouth) {
+            bounds.setMin(f8, f10, f6).setMax(f9, f11, f7);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
         return true;
     }
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(renderBlocks.useInventoryTint)
-        {
-            int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float r = (float)(color >> 16 & 0xff) / 255F;
-            float g = (float)(color >> 8 & 0xff) / 255F;
-            float b = (float)(color & 0xff) / 255F;
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float r = (float) (color >> 16 & 0xff) / 255F;
+            float g = (float) (color >> 8 & 0xff) / 255F;
+            float b = (float) (color & 0xff) / 255F;
             GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
         }
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
-        for(int cube = 0; cube < 4; cube++)
-        {
+        for (int cube = 0; cube < 4; cube++) {
 
-            AABB bounds;
+            AABBdc bounds;
             final float radius = 0.125F;
             final float f5 = 0.0625F;
-            switch (cube) {
+            bounds = switch (cube) {
                 // Vertical Beams
-                case 0:
-                    bounds = AABB.fromPool(0.5F - radius, 0.0F, 0.0F, 0.5F + radius, 1.0F, radius * 2.0F);
-                    break;
-                case 1:
-                    bounds = AABB.fromPool(0.5F - radius, 0.0F, 1.0F - radius * 2.0F, 0.5F + radius, 1.0F, 1.0F);
-                    break;
+                case 0 -> new AABBd(0.5F - radius, 0.0F, 0.0F, 0.5F + radius, 1.0F, radius * 2.0F);
+                case 1 -> new AABBd(0.5F - radius, 0.0F, 1.0F - radius * 2.0F, 0.5F + radius, 1.0F, 1.0F);
                 // Horizontal Beams
-                case 2:
-                    bounds = AABB.fromPool(0.5F - f5, 1.0F - f5 * 3F, -f5 * 2.0F, 0.5F + f5, 1.0F - f5, 1.0F + f5 * 2.0F);
-                    break;
-                case 3:
-                default:
-                    bounds = AABB.fromPool(0.5F - f5, 0.5F - f5 * 3F, -f5 * 2.0F, 0.5F + f5, 0.5F - f5, 1.0F + f5 * 2.0F);
-                    break;
-            }
+                case 2 -> new AABBd(0.5F - f5, 1.0F - f5 * 3F, -f5 * 2.0F, 0.5F + f5, 1.0F - f5, 1.0F + f5 * 2.0F);
+                default -> new AABBd(0.5F - f5, 0.5F - f5 * 3F, -f5 * 2.0F, 0.5F + f5, 0.5F - f5, 1.0F + f5 * 2.0F);
+            };
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, -1F, 0.0F);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
index 4ccd36f55..6d9e951f4 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
@@ -5,16 +5,18 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFenceGate;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.DisplayPos;
 
 public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockModelStandard<T> {
     protected static final DisplayPos FENCE_GUI = new DisplayPos(0, 0, 0, 30, 225 - 90, 0, 0.625f, 0.625f, 0.625f);
     protected static final DisplayPos FENCE_HEAD = new DisplayPos(0, 0, 0, 0, 90, 0, 1f, 1f, 1f);
+
     public BlockModelFenceGate(Block<T> block) {
         super(block);
 
@@ -23,177 +25,159 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBounds();
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBd bounds = new AABBd(this.block.getBounds());
         boolean flag = true;
-        int meta = worldSource.getBlockMetadata(x, y, z);
+        int meta = worldSource.getBlockData(tilePos);
         boolean isOpen = BlockLogicFenceGate.isOpen(meta);
         int direction = BlockLogicFenceGate.getDirection(meta);
-        if(direction == 3 || direction == 1)
-        {
+        if (direction == 3 || direction == 1) {
             float f = 0.4375F;
             float f4 = 0.5625F;
             float f8 = 0.0F;
             float f12 = 0.125F;
-            bounds.set(f, 0.3125F, f8, f4, 1.0F, f12);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            bounds.setMin(f, 0.3125F, f8).setMax(f4, 1.0F, f12);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
             f8 = 0.875F;
             f12 = 1.0F;
-            bounds.set(f, 0.3125F, f8, f4, 1.0F, f12);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        {
+            bounds.setMin(f, 0.3125F, f8).setMax(f4, 1.0F, f12);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else {
             float f1 = 0.0F;
             float f5 = 0.125F;
             float f9 = 0.4375F;
             float f13 = 0.5625F;
-            bounds.set(f1, 0.3125F, f9, f5, 1.0F, f13);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            bounds.setMin(f1, 0.3125F, f9).setMax(f5, 1.0F, f13);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
             f1 = 0.875F;
             f5 = 1.0F;
-            bounds.set(f1, 0.3125F, f9, f5, 1.0F, f13);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            bounds.setMin(f1, 0.3125F, f9).setMax(f5, 1.0F, f13);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if(!isOpen)
-        {
-            if(direction == 3 || direction == 1)
-            {
+        if (!isOpen) {
+            if (direction == 3 || direction == 1) {
                 float f2 = 0.4375F;
                 float f6 = 0.5625F;
                 float f10 = 0.375F;
                 float f14 = 0.5F;
-                bounds.set(f2, 0.375F, f10, f6, 0.9375F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f2, 0.375F, f10).setMax(f6, 0.9375F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f10 = 0.5F;
                 f14 = 0.625F;
-                bounds.set(f2, 0.375F, f10, f6, 0.9375F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f2, 0.375F, f10).setMax(f6, 0.9375F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f10 = 0.625F;
                 f14 = 0.875F;
-                bounds.set(f2, 0.375F, f10, f6, 0.5625F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-                bounds.set(f2, 0.75F, f10, f6, 0.9375F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f2, 0.375F, f10).setMax(f6, 0.5625F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+                bounds.setMin(f2, 0.75F, f10).setMax(f6, 0.9375F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f10 = 0.125F;
                 f14 = 0.375F;
-                bounds.set(f2, 0.375F, f10, f6, 0.5625F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-                bounds.set(f2, 0.75F, f10, f6, 0.9375F, f14);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            } else
-            {
+                bounds.setMin(f2, 0.375F, f10).setMax(f6, 0.5625F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+                bounds.setMin(f2, 0.75F, f10).setMax(f6, 0.9375F, f14);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            } else {
                 float f3 = 0.375F;
                 float f7 = 0.5F;
                 float f11 = 0.4375F;
                 float f15 = 0.5625F;
-                bounds.set(f3, 0.375F, f11, f7, 0.9375F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f3, 0.375F, f11).setMax(f7, 0.9375F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f3 = 0.5F;
                 f7 = 0.625F;
-                bounds.set(f3, 0.375F, f11, f7, 0.9375F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f3, 0.375F, f11).setMax(f7, 0.9375F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f3 = 0.625F;
                 f7 = 0.875F;
-                bounds.set(f3, 0.375F, f11, f7, 0.5625F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-                bounds.set(f3, 0.75F, f11, f7, 0.9375F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f3, 0.375F, f11).setMax(f7, 0.5625F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+                bounds.setMin(f3, 0.75F, f11).setMax(f7, 0.9375F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
                 f3 = 0.125F;
                 f7 = 0.375F;
-                bounds.set(f3, 0.375F, f11, f7, 0.5625F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-                bounds.set(f3, 0.75F, f11, f7, 0.9375F, f15);
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+                bounds.setMin(f3, 0.375F, f11).setMax(f7, 0.5625F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+                bounds.setMin(f3, 0.75F, f11).setMax(f7, 0.9375F, f15);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
             }
-        } else
-        if(direction == 3)
-        {
-            bounds.set(0.8125F, 0.375F, 0.0F, 0.9375F, 0.9375F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.8125F, 0.375F, 0.875F, 0.9375F, 0.9375F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5625F, 0.375F, 0.0F, 0.8125F, 0.5625F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5625F, 0.375F, 0.875F, 0.8125F, 0.5625F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5625F, 0.75F, 0.0F, 0.8125F, 0.9375F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5625F, 0.75F, 0.875F, 0.8125F, 0.9375F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        if(direction == 1)
-        {
-            bounds.set(0.0625F, 0.375F, 0.0F, 0.1875F, 0.9375F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0625F, 0.375F, 0.875F, 0.1875F, 0.9375F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.1875F, 0.375F, 0.0F, 0.4375F, 0.5625F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.1875F, 0.375F, 0.875F, 0.4375F, 0.5625F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.1875F, 0.75F, 0.0F, 0.4375F, 0.9375F, 0.125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.1875F, 0.75F, 0.875F, 0.4375F, 0.9375F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        if(direction == 0)
-        {
-            bounds.set(0.0F, 0.375F, 0.8125F, 0.125F, 0.9375F, 0.9375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.375F, 0.8125F, 1.0F, 0.9375F, 0.9375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.375F, 0.5625F, 0.125F, 0.5625F, 0.8125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.375F, 0.5625F, 1.0F, 0.5625F, 0.8125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.75F, 0.5625F, 0.125F, 0.9375F, 0.8125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.75F, 0.5625F, 1.0F, 0.9375F, 0.8125F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        if(direction == 2)
-        {
-            bounds.set(0.0F, 0.375F, 0.0625F, 0.125F, 0.9375F, 0.1875F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.375F, 0.0625F, 1.0F, 0.9375F, 0.1875F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.375F, 0.1875F, 0.125F, 0.5625F, 0.4375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.375F, 0.1875F, 1.0F, 0.5625F, 0.4375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.75F, 0.1875F, 0.125F, 0.9375F, 0.4375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.875F, 0.75F, 0.1875F, 1.0F, 0.9375F, 0.4375F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        } else if (direction == 3) {
+            bounds.setMin(0.8125F, 0.375F, 0.0F).setMax(0.9375F, 0.9375F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.8125F, 0.375F, 0.875F).setMax(0.9375F, 0.9375F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5625F, 0.375F, 0.0F).setMax(0.8125F, 0.5625F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5625F, 0.375F, 0.875F).setMax(0.8125F, 0.5625F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5625F, 0.75F, 0.0F).setMax(0.8125F, 0.9375F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5625F, 0.75F, 0.875F).setMax(0.8125F, 0.9375F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else if (direction == 1) {
+            bounds.setMin(0.0625F, 0.375F, 0.0F).setMax(0.1875F, 0.9375F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0625F, 0.375F, 0.875F).setMax(0.1875F, 0.9375F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.1875F, 0.375F, 0.0F).setMax(0.4375F, 0.5625F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.1875F, 0.375F, 0.875F).setMax(0.4375F, 0.5625F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.1875F, 0.75F, 0.0F).setMax(0.4375F, 0.9375F, 0.125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.1875F, 0.75F, 0.875F).setMax(0.4375F, 0.9375F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else if (direction == 0) {
+            bounds.setMin(0.0F, 0.375F, 0.8125F).setMax(0.125F, 0.9375F, 0.9375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.375F, 0.8125F).setMax(1.0F, 0.9375F, 0.9375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.375F, 0.5625F).setMax(0.125F, 0.5625F, 0.8125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.375F, 0.5625F).setMax(1.0F, 0.5625F, 0.8125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.75F, 0.5625F).setMax(0.125F, 0.9375F, 0.8125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.75F, 0.5625F).setMax(1.0F, 0.9375F, 0.8125F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else if (direction == 2) {
+            bounds.setMin(0.0F, 0.375F, 0.0625F).setMax(0.125F, 0.9375F, 0.1875F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.375F, 0.0625F).setMax(1.0F, 0.9375F, 0.1875F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.375F, 0.1875F).setMax(0.125F, 0.5625F, 0.4375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.375F, 0.1875F).setMax(1.0F, 0.5625F, 0.4375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.75F, 0.1875F).setMax(0.125F, 0.9375F, 0.4375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.875F, 0.75F, 0.1875F).setMax(1.0F, 0.9375F, 0.4375F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
         return flag;
     }
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(renderBlocks.useInventoryTint)
-        {
-            int j = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float f1 = (float)(j >> 16 & 0xff) / 255F;
-            float f3 = (float)(j >> 8 & 0xff) / 255F;
-            float f5 = (float)(j & 0xff) / 255F;
+        if (renderBlocks.useInventoryTint) {
+            int j = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float f1 = (float) (j >> 16 & 0xff) / 255F;
+            float f3 = (float) (j >> 8 & 0xff) / 255F;
+            float f5 = (float) (j & 0xff) / 255F;
             GL11.glColor4f(f1 * brightness, f3 * brightness, f5 * brightness, alpha);
         }
-        for(int k1 = 0; k1 < 3; k1++)
-        {
+        for (int k1 = 0; k1 < 3; k1++) {
             float f6 = 0.0625F;
-            AABB bounds = block.getBounds();
-            if(k1 == 0)
-            {
-                bounds.set(0.5F - f6, 0.3F, 0.0F, 0.5F + f6, 1.0F, f6 * 2.0F);
+            AABBd bounds = new AABBd(this.block.getBounds());
+            if (k1 == 0) {
+                bounds.setMin(0.5F - f6, 0.3F, 0.0F).setMax(0.5F + f6, 1.0F, f6 * 2.0F);
             }
-            if(k1 == 1)
-            {
-                bounds.set(0.5F - f6, 0.3F, 1.0F - f6 * 2.0F, 0.5F + f6, 1.0F, 1.0F);
+            if (k1 == 1) {
+                bounds.setMin(0.5F - f6, 0.3F, 1.0F - f6 * 2.0F).setMax(0.5F + f6, 1.0F, 1.0F);
             }
-            if(k1 == 2)
-            {
-                bounds.set(0.5F - f6, 0.5F, 0.0F, 0.5F + f6, 1.0F - f6, 1.0F);
+            if (k1 == 2) {
+                bounds.setMin(0.5F - f6, 0.5F, 0.0F).setMax(0.5F + f6, 1.0F - f6, 1.0F);
             }
             GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
             tessellator.startDrawingQuads();
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGatePainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGatePainted.java
index e8b5811dc..268fe9fa5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGatePainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGatePainted.java
@@ -4,6 +4,7 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFenceGate;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelFenceGatePainted<T extends BlockLogicFenceGate> extends BlockModelFenceGate<T> {
@@ -12,7 +13,7 @@ public class BlockModelFenceGatePainted<T extends BlockLogicFenceGate> extends B
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
         meta = meta >> 4;
         return BlockModelPlanksPainted.texCoords[meta & 0x0F];
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFencePainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFencePainted.java
index d953a6520..ec1faba39 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFencePainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFencePainted.java
@@ -4,6 +4,7 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFence;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelFencePainted<T extends BlockLogicFence> extends BlockModelFence<T> {
@@ -14,7 +15,7 @@ public class BlockModelFencePainted<T extends BlockLogicFence> extends BlockMode
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
         return BlockModelPlanksPainted.texCoords[meta & 15];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceThin.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceThin.java
index 4a8e6f692..d1647fb68 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceThin.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceThin.java
@@ -6,24 +6,24 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFenceThin;
-import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.DisplayPos;
 
 public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockModelStandard<T> {
     protected static final DisplayPos FENCE_THIN_FIRST_PERSON_RIGHT_HAND = new DisplayPos(0, 0, 0, 0, 45 - 90, 0, 0.4f, 0.4f, 0.4f);
-    private final IconCoordinate texIndex;
-    private final IconCoordinate bottomTexIndex;
-    private final IconCoordinate topTexIndex;
-    private final IconCoordinate columnTexIndex;
+    private final @NotNull IconCoordinate texIndex;
+    private final @Nullable IconCoordinate bottomTexIndex;
+    private final @Nullable IconCoordinate topTexIndex;
+    private final @NotNull IconCoordinate columnTexIndex;
 
-    public BlockModelFenceThin(Block<T> block, IconCoordinate texIndex, IconCoordinate bottomTexIndex, IconCoordinate topTexIndex, IconCoordinate columnTexIndex){
+    public BlockModelFenceThin(Block<T> block, @NotNull IconCoordinate texIndex, @Nullable IconCoordinate bottomTexIndex, @Nullable IconCoordinate topTexIndex, @NotNull IconCoordinate columnTexIndex) {
         super(block);
         this.texIndex = texIndex;
         this.bottomTexIndex = bottomTexIndex;
@@ -32,47 +32,50 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
 
         setDisplayPos(DisplayPos.FIRST_PERSON_RIGHT_HAND, FENCE_THIN_FIRST_PERSON_RIGHT_HAND);
     }
+
     @Override
-    public boolean render(@NotNull Tessellator t, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator t, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	t.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            t.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         t.setColorOpaque_F(brightness, brightness, brightness);
-        
-		float cBottom = 1.0f;
-		float cTop = 1.0f;
-		float cNorthSouth = 1.0f;
-		float cEastWest = 1.0f;
-		if(ENABLE_DIRECTIONAL_LIGHTING) {
-			cBottom = 0.5f;
-			cTop = 1.0f;
-			cNorthSouth = 0.8f;
-			cEastWest = 0.6f;
-		}
-        BlockLogicFenceThin thin = block.getLogic();
-        boolean connectNorth = thin.canConnectTo(worldSource, x, y, z, Side.NORTH);
-        boolean connectSouth = thin.canConnectTo(worldSource, x, y, z, Side.SOUTH);
-        boolean connectEast = thin.canConnectTo(worldSource, x, y, z , Side.EAST);
-        boolean connectWest = thin.canConnectTo(worldSource, x, y, z , Side.WEST);
+
+        TilePos queryPos = new TilePos();
+
+        float cBottom = 1.0f;
+        float cTop = 1.0f;
+        float cNorthSouth = 1.0f;
+        float cEastWest = 1.0f;
+        if (ENABLE_DIRECTIONAL_LIGHTING) {
+            cBottom = 0.5f;
+            cTop = 1.0f;
+            cNorthSouth = 0.8f;
+            cEastWest = 0.6f;
+        }
+        BlockLogicFenceThin thin = this.block.getLogic();
+        boolean connectNorth = thin.canConnectTo(worldSource, tilePos, Side.NORTH);
+        boolean connectSouth = thin.canConnectTo(worldSource, tilePos, Side.SOUTH);
+        boolean connectEast = thin.canConnectTo(worldSource, tilePos, Side.EAST);
+        boolean connectWest = thin.canConnectTo(worldSource, tilePos, Side.WEST);
 
         boolean lineNorthSouth = connectNorth && connectSouth;
         boolean lineEastWest = connectEast && connectWest;
 
         double onePix = 1f / 16;
 
-        double fenceNormalMinU = texIndex.getIconUMin();
-        double fenceNormalMinV = texIndex.getIconVMin();
-        double fenceNormalMaxU = texIndex.getSubIconU(onePix * 16);
-        double fenceNormalMaxV = texIndex.getSubIconV(onePix * 16);
+        double fenceNormalMinU = this.texIndex.getIconUMin();
+        double fenceNormalMinV = this.texIndex.getIconVMin();
+        double fenceNormalMaxU = this.texIndex.getSubIconU(onePix * 16);
+        double fenceNormalMaxV = this.texIndex.getSubIconV(onePix * 16);
 
         IconCoordinate fenceTopmostTex;
-        if (topTexIndex == null) {
-            fenceTopmostTex = texIndex;
+        if (this.topTexIndex == null) {
+            fenceTopmostTex = this.texIndex;
         } else {
-            fenceTopmostTex = topTexIndex;
+            fenceTopmostTex = this.topTexIndex;
         }
 
         double fenceTopmostMinU = fenceTopmostTex.getIconUMin();
@@ -81,10 +84,10 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
         double fenceTopmostMaxV = fenceTopmostTex.getSubIconV(onePix * 16);
 
         IconCoordinate fenceBottommostTex;
-        if (bottomTexIndex == null) {
-            fenceBottommostTex = texIndex;
+        if (this.bottomTexIndex == null) {
+            fenceBottommostTex = this.texIndex;
         } else {
-            fenceBottommostTex = bottomTexIndex;
+            fenceBottommostTex = this.bottomTexIndex;
         }
 
         double fenceBottommostMinU = fenceBottommostTex.getIconUMin();
@@ -92,31 +95,30 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
         double fenceBottommostMaxU = fenceBottommostTex.getSubIconU(onePix * 16);
         double fenceBottommostMaxV = fenceBottommostTex.getSubIconV(onePix * 16);
 
-        Block<?> blockAbove = worldSource.getBlock(x, y + 1, z);
-        boolean connectUpNorth = blockAbove == block && thin.canConnectTo(worldSource, x, y + 1, z, Side.NORTH);
-        boolean connectUpSouth = blockAbove == block && thin.canConnectTo(worldSource, x, y + 1, z, Side.SOUTH);
-        boolean connectUpEast = blockAbove == block && thin.canConnectTo(worldSource, x, y + 1, z, Side.EAST);
-        boolean connectUpWest = blockAbove == block && thin.canConnectTo(worldSource, x, y + 1, z, Side.WEST);
-
-        Block<?> blockBelow = worldSource.getBlock(x, y - 1, z);
-        boolean connectDownNorth = blockBelow == block && thin.canConnectTo(worldSource, x, y - 1, z, Side.NORTH);
-        boolean connectDownSouth = blockBelow == block && thin.canConnectTo(worldSource, x, y - 1, z, Side.SOUTH);
-        boolean connectDownEast = blockBelow == block && thin.canConnectTo(worldSource, x, y - 1, z, Side.EAST);
-        boolean connectDownWest = blockBelow == block && thin.canConnectTo(worldSource, x, y - 1, z, Side.WEST);
-
-        if (thin.shouldDrawColumn(worldSource, new TilePos(x, y, z)))
-        {
-            double sidesMinU = columnTexIndex.getIconUMin();
-            double sidesMinV = columnTexIndex.getIconVMin();
-            double sidesMaxU = columnTexIndex.getSubIconU(onePix * 2);
-            double sidesMaxV = columnTexIndex.getSubIconV(onePix * 16);
-
-            float minX = x + ((16 / 2f) - (2 / 2f)) / 16f;
-            float minY = y;
-            float minZ = z + ((16 / 2f) - (2 / 2f)) / 16f;
-            float maxX = x + ((16 / 2f) + (2 / 2f)) / 16f;
-            float maxY = y + 1.0f;
-            float maxZ = z + ((16 / 2f) + (2 / 2f)) / 16f;
+        Block<?> blockAbove = worldSource.getBlock(tilePos.up(queryPos));
+        boolean connectUpNorth = blockAbove == this.block && thin.canConnectTo(worldSource, tilePos.up(queryPos), Side.NORTH);
+        boolean connectUpSouth = blockAbove == this.block && thin.canConnectTo(worldSource, tilePos.up(queryPos), Side.SOUTH);
+        boolean connectUpEast = blockAbove == this.block && thin.canConnectTo(worldSource, tilePos.up(queryPos), Side.EAST);
+        boolean connectUpWest = blockAbove == this.block && thin.canConnectTo(worldSource, tilePos.up(queryPos), Side.WEST);
+
+        Block<?> blockBelow = worldSource.getBlock(tilePos.down(queryPos));
+        boolean connectDownNorth = blockBelow == this.block && thin.canConnectTo(worldSource, tilePos.down(queryPos), Side.NORTH);
+        boolean connectDownSouth = blockBelow == this.block && thin.canConnectTo(worldSource, tilePos.down(queryPos), Side.SOUTH);
+        boolean connectDownEast = blockBelow == this.block && thin.canConnectTo(worldSource, tilePos.down(queryPos), Side.EAST);
+        boolean connectDownWest = blockBelow == this.block && thin.canConnectTo(worldSource, tilePos.down(queryPos), Side.WEST);
+
+        if (thin.shouldDrawColumn(worldSource, tilePos)) {
+            double sidesMinU = this.columnTexIndex.getIconUMin();
+            double sidesMinV = this.columnTexIndex.getIconVMin();
+            double sidesMaxU = this.columnTexIndex.getSubIconU(onePix * 2);
+            double sidesMaxV = this.columnTexIndex.getSubIconV(onePix * 16);
+
+            float minX = tilePos.x() + ((16 / 2f) - (2 / 2f)) / 16f;
+            float minY = tilePos.y();
+            float minZ = tilePos.z() + ((16 / 2f) - (2 / 2f)) / 16f;
+            float maxX = tilePos.x() + ((16 / 2f) + (2 / 2f)) / 16f;
+            float maxY = tilePos.y() + 1.0f;
+            float maxZ = tilePos.z() + ((16 / 2f) + (2 / 2f)) / 16f;
 
             // Render sides
             t.setColorOpaque_F(cNorthSouth * brightness, cNorthSouth * brightness, cNorthSouth * brightness);
@@ -141,10 +143,10 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
             t.addVertexWithUV(minX, maxY, maxZ, sidesMaxU, sidesMinV);
             t.addVertexWithUV(minX, maxY, minZ, sidesMinU, sidesMinV);
 
-            double topBottomMinU = columnTexIndex.getIconUMin();
-            double topBottomMinV = columnTexIndex.getIconVMin();
-            double topBottomMaxU = columnTexIndex.getSubIconU(onePix * 2);
-            double topBottomMaxV = columnTexIndex.getSubIconV(onePix * 2);
+            double topBottomMinU = this.columnTexIndex.getIconUMin();
+            double topBottomMinV = this.columnTexIndex.getIconVMin();
+            double topBottomMaxU = this.columnTexIndex.getSubIconU(onePix * 2);
+            double topBottomMaxV = this.columnTexIndex.getSubIconV(onePix * 2);
 
             // Render top
             t.setColorOpaque_F(cTop * brightness, cTop * brightness, cTop * brightness);
@@ -161,41 +163,35 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
             t.addVertexWithUV(minX, minY, maxZ, topBottomMinU, topBottomMaxV);
         }
 
-        if (connectNorth)
-        {
+        if (connectNorth) {
             double sidesMinU;
             double sidesMinV;
             double sidesMaxU;
             double sidesMaxV;
 
-            if (bottomTexIndex != null && !connectDownNorth)
-            {
+            if (this.bottomTexIndex != null && !connectDownNorth) {
                 sidesMinU = fenceBottommostMinU;
                 sidesMinV = fenceBottommostMinV;
                 sidesMaxV = fenceBottommostMaxV;
                 sidesMaxU = fenceBottommostTex.getSubIconU(onePix * 8);
-            }
-            else if (topTexIndex != null && !connectUpNorth)
-            {
+            } else if (this.topTexIndex != null && !connectUpNorth) {
                 sidesMinU = fenceTopmostMinU;
                 sidesMinV = fenceTopmostMinV;
                 sidesMaxV = fenceTopmostMaxV;
                 sidesMaxU = fenceTopmostTex.getSubIconU(onePix * 8);
-            }
-            else
-            {
+            } else {
                 sidesMinU = fenceNormalMinU;
                 sidesMinV = fenceNormalMinV;
                 sidesMaxV = fenceNormalMaxV;
-                sidesMaxU = texIndex.getSubIconU(onePix * 8);
+                sidesMaxU = this.texIndex.getSubIconU(onePix * 8);
             }
 
-            float minX = x + (8f / 16f);
-            float minY = y;
-            float minZ = z;
-            float maxX = x + (8f / 16f);
-            float maxY = y + 1.0f;
-            float maxZ = z + (8f / 16f);
+            float minX = tilePos.x() + (8f / 16f);
+            float minY = tilePos.y();
+            float minZ = tilePos.z();
+            float maxX = tilePos.x() + (8f / 16f);
+            float maxY = tilePos.y() + 1.0f;
+            float maxZ = tilePos.z() + (8f / 16f);
 
             t.setColorOpaque_F(cEastWest * brightness, cEastWest * brightness, cEastWest * brightness);
             t.addVertexWithUV(maxX, minY, maxZ, sidesMinU, sidesMaxV);
@@ -209,41 +205,35 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
             t.addVertexWithUV(minX, maxY, minZ, sidesMaxU, sidesMinV);
         }
 
-        if (connectSouth)
-        {
+        if (connectSouth) {
             double sidesMinU;
             double sidesMinV;
             double sidesMaxU;
             double sidesMaxV;
 
-            if (bottomTexIndex != null && !connectDownSouth)
-            {
+            if (this.bottomTexIndex != null && !connectDownSouth) {
                 sidesMinU = fenceBottommostTex.getSubIconU(onePix * 8);
                 sidesMaxU = fenceBottommostTex.getIconUMax();
                 sidesMinV = fenceBottommostMinV;
                 sidesMaxV = fenceBottommostMaxV;
-            }
-            else if (topTexIndex != null && !connectUpSouth)
-            {
+            } else if (this.topTexIndex != null && !connectUpSouth) {
                 sidesMinU = fenceTopmostTex.getSubIconU(onePix * 8);
                 sidesMaxU = fenceTopmostTex.getIconUMax();
                 sidesMinV = fenceTopmostMinV;
                 sidesMaxV = fenceTopmostMaxV;
-            }
-            else
-            {
-                sidesMinU = texIndex.getSubIconU(onePix * 8);
-                sidesMaxU = texIndex.getIconUMax();
+            } else {
+                sidesMinU = this.texIndex.getSubIconU(onePix * 8);
+                sidesMaxU = this.texIndex.getIconUMax();
                 sidesMinV = fenceNormalMinV;
                 sidesMaxV = fenceNormalMaxV;
             }
 
-            float minX = x + (8f / 16f);
-            float minY = y;
-            float minZ = z + (8f / 16f);
-            float maxX = x + (8f / 16f);
-            float maxY = y + 1.0f;
-            float maxZ = z + 1.0f;
+            float minX = tilePos.x() + (8f / 16f);
+            float minY = tilePos.y();
+            float minZ = tilePos.z() + (8f / 16f);
+            float maxX = tilePos.x() + (8f / 16f);
+            float maxY = tilePos.y() + 1.0f;
+            float maxZ = tilePos.z() + 1.0f;
 
             t.setColorOpaque_F(cEastWest * brightness, cEastWest * brightness, cEastWest * brightness);
             t.addVertexWithUV(maxX, minY, maxZ, sidesMinU, sidesMaxV);
@@ -257,41 +247,35 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
             t.addVertexWithUV(minX, maxY, minZ, sidesMaxU, sidesMinV);
         }
 
-        if (connectWest)
-        {
+        if (connectWest) {
             double sidesMinU;
             double sidesMinV;
             double sidesMaxU;
             double sidesMaxV;
 
-            if (bottomTexIndex != null && !connectDownWest)
-            {
+            if (this.bottomTexIndex != null && !connectDownWest) {
                 sidesMinU = fenceBottommostMinU;
                 sidesMinV = fenceBottommostMinV;
                 sidesMaxV = fenceBottommostMaxV;
                 sidesMaxU = fenceBottommostTex.getSubIconU(onePix * 8);
-            }
-            else if (topTexIndex != null && !connectUpWest)
-            {
+            } else if (this.topTexIndex != null && !connectUpWest) {
                 sidesMinU = fenceTopmostMinU;
                 sidesMinV = fenceTopmostMinV;
                 sidesMaxV = fenceTopmostMaxV;
                 sidesMaxU = fenceTopmostTex.getSubIconU(onePix * 8);
-            }
-            else
-            {
+            } else {
                 sidesMinU = fenceNormalMinU;
                 sidesMinV = fenceNormalMinV;
                 sidesMaxV = fenceNormalMaxV;
-                sidesMaxU = texIndex.getSubIconU(onePix * 8);
+                sidesMaxU = this.texIndex.getSubIconU(onePix * 8);
             }
 
-            float minX = x;
-            float minY = y;
-            float minZ = z + (8f / 16f);
-            float maxX = x + (8f / 16f);
-            float maxY = y + 1.0f;
-            float maxZ = z + (8f / 16f);
+            float minX = tilePos.x();
+            float minY = tilePos.y();
+            float minZ = tilePos.z() + (8f / 16f);
+            float maxX = tilePos.x() + (8f / 16f);
+            float maxY = tilePos.y() + 1.0f;
+            float maxZ = tilePos.z() + (8f / 16f);
 
             t.setColorOpaque_F(cNorthSouth * brightness, cNorthSouth * brightness, cNorthSouth * brightness);
             t.addVertexWithUV(maxX, minY, minZ, sidesMinU, sidesMaxV);
@@ -305,41 +289,35 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
             t.addVertexWithUV(minX, maxY, maxZ, sidesMaxU, sidesMinV);
         }
 
-        if (connectEast)
-        {
+        if (connectEast) {
             double sidesMinU;
             double sidesMinV;
             double sidesMaxU;
             double sidesMaxV;
 
-            if (bottomTexIndex != null && !connectDownEast)
-            {
+            if (this.bottomTexIndex != null && !connectDownEast) {
                 sidesMinU = fenceBottommostTex.getSubIconU(onePix * 8);
                 sidesMaxU = fenceBottommostTex.getIconUMax();
                 sidesMinV = fenceBottommostMinV;
                 sidesMaxV = fenceBottommostMaxV;
-            }
-            else if (topTexIndex != null && !connectUpEast)
-            {
+            } else if (this.topTexIndex != null && !connectUpEast) {
                 sidesMinU = fenceTopmostTex.getSubIconU(onePix * 8);
                 sidesMaxU = fenceTopmostTex.getIconUMax();
                 sidesMinV = fenceTopmostMinV;
                 sidesMaxV = fenceTopmostMaxV;
-            }
-            else
-            {
-                sidesMinU = texIndex.getSubIconU(onePix * 8);
-                sidesMaxU = texIndex.getIconUMax();
+            } else {
+                sidesMinU = this.texIndex.getSubIconU(onePix * 8);
+                sidesMaxU = this.texIndex.getIconUMax();
                 sidesMinV = fenceNormalMinV;
                 sidesMaxV = fenceNormalMaxV;
             }
 
-            float minX = x + (8f / 16f);
-            float minY = y;
-            float minZ = z + (8f / 16f);
-            float maxX = x + 1.0f;
-            float maxY = y + 1.0f;
-            float maxZ = z + (8f / 16f);
+            float minX = tilePos.x() + (8f / 16f);
+            float minY = tilePos.y();
+            float minZ = tilePos.z() + (8f / 16f);
+            float maxX = tilePos.x() + 1.0f;
+            float maxY = tilePos.y() + 1.0f;
+            float maxZ = tilePos.z() + (8f / 16f);
 
             t.setColorOpaque_F(cNorthSouth * brightness, cNorthSouth * brightness, cNorthSouth * brightness);
             t.addVertexWithUV(maxX, minY, minZ, sidesMinU, sidesMaxV);
@@ -358,65 +336,62 @@ public class BlockModelFenceThin<T extends BlockLogicFenceThin> extends BlockMod
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(renderBlocks.useInventoryTint)
-        {
-            int j = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float f1 = (float)(j >> 16 & 0xff) / 255F;
-            float f3 = (float)(j >> 8 & 0xff) / 255F;
-            float f5 = (float)(j & 0xff) / 255F;
-            GL11.glColor4f(f1 * brightness, f3 * brightness, f5 * brightness, alpha);
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float r = (float) (color >> 16 & 0xff) / 255F;
+            float g = (float) (color >> 8 & 0xff) / 255F;
+            float b = (float) (color & 0xff) / 255F;
+            GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
         }
         GL11.glRotatef(90, 0, 1, 0);
-        AABB bounds = AABB.fromPool(0, 0, 0, 1, 1, 1);
-        for(int i1 = 0; i1 < 2; i1++)
-        {
+        AABBd bounds = new AABBd(0, 0, 0, 1, 1, 1);
+        for (int i1 = 0; i1 < 2; i1++) {
             GL11.glPushMatrix();
             float f4 = 0.125F / 2;
-            bounds.set(0, 0.0F, 0.0F, 2 * f4, 1.0F, f4 * 2.0F);
+            bounds.setMin(0, 0.0F, 0.0F).setMax(2 * f4, 1.0F, f4 * 2.0F);
             GL11.glTranslatef(0.5f - f4, 0, 0);
-            if(i1 == 1)
-            {
+            if (i1 == 1) {
                 GL11.glTranslatef(0, 0, 1f - (f4 * 2));
             }
             GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, -1F, 0.0F);
-            renderBlocks.renderBottomFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderBottomFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, 1.0F, 0.0F);
-            renderBlocks.renderTopFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderTopFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, 0.0F, -1F);
-            renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderNorthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, 0.0F, 1.0F);
-            renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderSouthFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(-1F, 0.0F, 0.0F);
-            renderBlocks.renderWestFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderWestFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
 
             tessellator.startDrawingQuads();
             tessellator.setNormal(1.0F, 0.0F, 0.0F);
-            renderBlocks.renderEastFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, columnTexIndex);
+            renderBlocks.renderEastFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, this.columnTexIndex);
             tessellator.draw();
             GL11.glPopMatrix();
         }
 
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
         GL11.glDisable(GL11.GL_CULL_FACE);
-        bounds.set(0, 0, 0, 0.5f, 1, 1);
+        bounds.setMin(0, 0, 0).setMax(0.5f, 1, 1);
         tessellator.startDrawingQuads();
         tessellator.setNormal(1.0F, 0.0F, 0.0F);
-        renderBlocks.renderEastFace(tessellator, bounds, 0, 0, 0, texIndex);
+        renderBlocks.renderEastFace(tessellator, bounds, 0, 0, 0, this.texIndex);
         tessellator.draw();
         GL11.glTranslatef(0.5F, 0.5F, 0.5F);
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFire.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFire.java
index a8dc1258a..cd535bb6d 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFire.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFire.java
@@ -11,10 +11,12 @@ import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockModelFire<T extends BlockLogic> extends BlockModelStandard<T> {
     private final boolean overrideRender;
+
     public BlockModelFire(Block<T> block) {
         this(block, false);
     }
@@ -25,17 +27,16 @@ public class BlockModelFire<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        IconCoordinate tex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, worldSource.getBlockMetadata(x, y, z));
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        IconCoordinate tex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, worldSource.getBlockData(tilePos));
+        if (renderBlocks.overrideBlockTexture != null) {
             tex = renderBlocks.overrideBlockTexture;
         }
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, x, y, z)));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, tilePos)));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         double uMin = tex.getIconUMin();
@@ -43,174 +44,171 @@ public class BlockModelFire<T extends BlockLogic> extends BlockModelStandard<T>
         double vMin = tex.getIconVMin();
         double vMax = tex.getIconVMax();
         final float yOffset = 1.4F;
-        if(overrideRender || worldSource.isBlockNormalCube(x, y - 1, z) || BlockLogicFire.canBurn(worldSource, new TilePos(x, y - 1, z)) || worldSource == WorldClient.EMPTY_WORLD)
-        {
-            double d8 = (double)x + 0.5D + 0.2D;
-            double d9 = ((double)x + 0.5D) - 0.2D;
-            double d12 = (double)z + 0.5D + 0.2D;
-            double d14 = ((double)z + 0.5D) - 0.2D;
-            double d16 = ((double)x + 0.5D) - 0.3D;
-            double d18 = (double)x + 0.5D + 0.3D;
-            double d20 = ((double)z + 0.5D) - 0.3D;
-            double d22 = (double)z + 0.5D + 0.3D;
-            tessellator.addVertexWithUV(d16, (float)y + yOffset, z + 1, uMax, vMin);
+
+        TilePos queryPos = new TilePos();
+
+        int x = tilePos.x();
+        int y = tilePos.y();
+        int z = tilePos.z();
+
+        if (this.overrideRender || worldSource.isBlockNormalCube(tilePos.down(queryPos)) || BlockLogicFire.canBurn(worldSource, tilePos.down(queryPos)) || worldSource == WorldClient.EMPTY_WORLD) {
+            double d8 = (double) x + 0.5D + 0.2D;
+            double d9 = ((double) x + 0.5D) - 0.2D;
+            double d12 = (double) z + 0.5D + 0.2D;
+            double d14 = ((double) z + 0.5D) - 0.2D;
+            double d16 = ((double) x + 0.5D) - 0.3D;
+            double d18 = (double) x + 0.5D + 0.3D;
+            double d20 = ((double) z + 0.5D) - 0.3D;
+            double d22 = (double) z + 0.5D + 0.3D;
+            tessellator.addVertexWithUV(d16, (float) y + yOffset, z + 1, uMax, vMin);
             tessellator.addVertexWithUV(d8, y, z + 1, uMax, vMax);
             tessellator.addVertexWithUV(d8, y, z, uMin, vMax);
-            tessellator.addVertexWithUV(d16, (float)y + yOffset, z, uMin, vMin);
-            tessellator.addVertexWithUV(d18, (float)y + yOffset, z, uMax, vMin);
+            tessellator.addVertexWithUV(d16, (float) y + yOffset, z, uMin, vMin);
+            tessellator.addVertexWithUV(d18, (float) y + yOffset, z, uMax, vMin);
             tessellator.addVertexWithUV(d9, y, z, uMax, vMax);
             tessellator.addVertexWithUV(d9, y, z + 1, uMin, vMax);
-            tessellator.addVertexWithUV(d18, (float)y + yOffset, z + 1, uMin, vMin);
+            tessellator.addVertexWithUV(d18, (float) y + yOffset, z + 1, uMin, vMin);
             uMin = tex.getIconUMin();
             uMax = tex.getIconUMax();
             vMin = tex.getIconVMin();
             vMax = tex.getIconVMax(); //2x
-            tessellator.addVertexWithUV(x + 1, (float)y + yOffset, d22, uMax, vMin);
+            tessellator.addVertexWithUV(x + 1, (float) y + yOffset, d22, uMax, vMin);
             tessellator.addVertexWithUV(x + 1, y, d14, uMax, vMax);
             tessellator.addVertexWithUV(x, y, d14, uMin, vMax);
-            tessellator.addVertexWithUV(x, (float)y + yOffset, d22, uMin, vMin);
-            tessellator.addVertexWithUV(x, (float)y + yOffset, d20, uMax, vMin);
+            tessellator.addVertexWithUV(x, (float) y + yOffset, d22, uMin, vMin);
+            tessellator.addVertexWithUV(x, (float) y + yOffset, d20, uMax, vMin);
             tessellator.addVertexWithUV(x, y, d12, uMax, vMax);
             tessellator.addVertexWithUV(x + 1, y, d12, uMin, vMax);
-            tessellator.addVertexWithUV(x + 1, (float)y + yOffset, d20, uMin, vMin);
-            d8 = ((double)x + 0.5D) - 0.5D;
-            d9 = (double)x + 0.5D + 0.5D;
-            d12 = ((double)z + 0.5D) - 0.5D;
-            d14 = (double)z + 0.5D + 0.5D;
-            d16 = ((double)x + 0.5D) - 0.4D;
-            d18 = (double)x + 0.5D + 0.4D;
-            d20 = ((double)z + 0.5D) - 0.4D;
-            d22 = (double)z + 0.5D + 0.4D;
-            tessellator.addVertexWithUV(d16, (float)y + yOffset, z, uMin, vMin);
+            tessellator.addVertexWithUV(x + 1, (float) y + yOffset, d20, uMin, vMin);
+            d8 = ((double) x + 0.5D) - 0.5D;
+            d9 = (double) x + 0.5D + 0.5D;
+            d12 = ((double) z + 0.5D) - 0.5D;
+            d14 = (double) z + 0.5D + 0.5D;
+            d16 = ((double) x + 0.5D) - 0.4D;
+            d18 = (double) x + 0.5D + 0.4D;
+            d20 = ((double) z + 0.5D) - 0.4D;
+            d22 = (double) z + 0.5D + 0.4D;
+            tessellator.addVertexWithUV(d16, (float) y + yOffset, z, uMin, vMin);
             tessellator.addVertexWithUV(d8, y, z, uMin, vMax);
             tessellator.addVertexWithUV(d8, y, z + 1, uMax, vMax);
-            tessellator.addVertexWithUV(d16, (float)y + yOffset, z + 1, uMax, vMin);
-            tessellator.addVertexWithUV(d18, (float)y + yOffset, z + 1, uMin, vMin);
+            tessellator.addVertexWithUV(d16, (float) y + yOffset, z + 1, uMax, vMin);
+            tessellator.addVertexWithUV(d18, (float) y + yOffset, z + 1, uMin, vMin);
             tessellator.addVertexWithUV(d9, y, z + 1, uMin, vMax);
             tessellator.addVertexWithUV(d9, y, z, uMax, vMax);
-            tessellator.addVertexWithUV(d18, (float)y + yOffset, z, uMax, vMin);
+            tessellator.addVertexWithUV(d18, (float) y + yOffset, z, uMax, vMin);
             uMin = tex.getIconUMin();
             uMax = tex.getIconUMax();
             vMin = tex.getIconVMin();
             vMax = tex.getIconVMax();
-            tessellator.addVertexWithUV(x, (float)y + yOffset, d22, uMin, vMin);
+            tessellator.addVertexWithUV(x, (float) y + yOffset, d22, uMin, vMin);
             tessellator.addVertexWithUV(x, y, d14, uMin, vMax);
             tessellator.addVertexWithUV(x + 1, y, d14, uMax, vMax);
-            tessellator.addVertexWithUV(x + 1, (float)y + yOffset, d22, uMax, vMin);
-            tessellator.addVertexWithUV(x + 1, (float)y + yOffset, d20, uMin, vMin);
+            tessellator.addVertexWithUV(x + 1, (float) y + yOffset, d22, uMax, vMin);
+            tessellator.addVertexWithUV(x + 1, (float) y + yOffset, d20, uMin, vMin);
             tessellator.addVertexWithUV(x + 1, y, d12, uMin, vMax);
             tessellator.addVertexWithUV(x, y, d12, uMax, vMax);
-            tessellator.addVertexWithUV(x, (float)y + yOffset, d20, uMax, vMin);
-        } else
-        {
+            tessellator.addVertexWithUV(x, (float) y + yOffset, d20, uMax, vMin);
+        } else {
             float f3 = 0.2F;
             float f4 = 0.0625F;
-            if((x + y + z & 1) == 1)
-            {
+            if ((x + y + z & 1) == 1) {
                 uMin = tex.getIconUMin();
                 uMax = tex.getIconUMax();
                 vMin = tex.getIconVMin();
                 vMax = tex.getIconVMax(); // 2x
             }
-            if((x / 2 + y / 2 + z / 2 & 1) == 1)
-            {
+            if ((x / 2 + y / 2 + z / 2 & 1) == 1) {
                 double d10 = uMax;
                 uMax = uMin;
                 uMin = d10;
             }
-            if(BlockLogicFire.canBurn(worldSource, new TilePos(x - 1, y, z)))
-            {
-                tessellator.addVertexWithUV((float)x + f3, (float)y + yOffset + f4, z + 1, uMax, vMin);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z + 1, uMax, vMax);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV((float)x + f3, (float)y + yOffset + f4, z, uMin, vMin);
-                tessellator.addVertexWithUV((float)x + f3, (float)y + yOffset + f4, z, uMin, vMin);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z + 1, uMax, vMax);
-                tessellator.addVertexWithUV((float)x + f3, (float)y + yOffset + f4, z + 1, uMax, vMin);
+            if (BlockLogicFire.canBurn(worldSource, tilePos.west(queryPos))) {
+                tessellator.addVertexWithUV((float) x + f3, (float) y + yOffset + f4, z + 1, uMax, vMin);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z + 1, uMax, vMax);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV((float) x + f3, (float) y + yOffset + f4, z, uMin, vMin);
+                tessellator.addVertexWithUV((float) x + f3, (float) y + yOffset + f4, z, uMin, vMin);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z + 1, uMax, vMax);
+                tessellator.addVertexWithUV((float) x + f3, (float) y + yOffset + f4, z + 1, uMax, vMin);
             }
-            if(BlockLogicFire.canBurn(worldSource, new TilePos(x + 1, y, z)))
-            {
-                tessellator.addVertexWithUV((float)(x + 1) - f3, (float)y + yOffset + f4, z, uMin, vMin);
-                tessellator.addVertexWithUV((x + 1), (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV((x + 1), (float)(y) + f4, z + 1, uMax, vMax);
-                tessellator.addVertexWithUV((float)(x + 1) - f3, (float)y + yOffset + f4, z + 1, uMax, vMin);
-                tessellator.addVertexWithUV((float)(x + 1) - f3, (float)y + yOffset + f4, z + 1, uMax, vMin);
-                tessellator.addVertexWithUV((x + 1), (float)(y) + f4, z + 1, uMax, vMax);
-                tessellator.addVertexWithUV((x + 1), (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV((float)(x + 1) - f3, (float)y + yOffset + f4, z, uMin, vMin);
+            if (BlockLogicFire.canBurn(worldSource, tilePos.east(queryPos))) {
+                tessellator.addVertexWithUV((float) (x + 1) - f3, (float) y + yOffset + f4, z, uMin, vMin);
+                tessellator.addVertexWithUV((x + 1), (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV((x + 1), (float) (y) + f4, z + 1, uMax, vMax);
+                tessellator.addVertexWithUV((float) (x + 1) - f3, (float) y + yOffset + f4, z + 1, uMax, vMin);
+                tessellator.addVertexWithUV((float) (x + 1) - f3, (float) y + yOffset + f4, z + 1, uMax, vMin);
+                tessellator.addVertexWithUV((x + 1), (float) (y) + f4, z + 1, uMax, vMax);
+                tessellator.addVertexWithUV((x + 1), (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV((float) (x + 1) - f3, (float) y + yOffset + f4, z, uMin, vMin);
             }
-            if(BlockLogicFire.canBurn(worldSource, new TilePos(x, y, z - 1)))
-            {
-                tessellator.addVertexWithUV(x, (float)y + yOffset + f4, (float)z + f3, uMax, vMin);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z, uMax, vMax);
-                tessellator.addVertexWithUV(x + 1, (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV(x + 1, (float)y + yOffset + f4, (float)z + f3, uMin, vMin);
-                tessellator.addVertexWithUV(x + 1, (float)y + yOffset + f4, (float)z + f3, uMin, vMin);
-                tessellator.addVertexWithUV(x + 1, (float)(y) + f4, z, uMin, vMax);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, z, uMax, vMax);
-                tessellator.addVertexWithUV(x, (float)y + yOffset + f4, (float)z + f3, uMax, vMin);
+            if (BlockLogicFire.canBurn(worldSource, tilePos.north(queryPos))) {
+                tessellator.addVertexWithUV(x, (float) y + yOffset + f4, (float) z + f3, uMax, vMin);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z, uMax, vMax);
+                tessellator.addVertexWithUV(x + 1, (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV(x + 1, (float) y + yOffset + f4, (float) z + f3, uMin, vMin);
+                tessellator.addVertexWithUV(x + 1, (float) y + yOffset + f4, (float) z + f3, uMin, vMin);
+                tessellator.addVertexWithUV(x + 1, (float) (y) + f4, z, uMin, vMax);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, z, uMax, vMax);
+                tessellator.addVertexWithUV(x, (float) y + yOffset + f4, (float) z + f3, uMax, vMin);
             }
-            if(BlockLogicFire.canBurn(worldSource, new TilePos(x, y, z + 1)))
-            {
-                tessellator.addVertexWithUV(x + 1, (float)y + yOffset + f4, (float)(z + 1) - f3, uMin, vMin);
-                tessellator.addVertexWithUV(x + 1, (float)(y) + f4, (z + 1), uMin, vMax);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, (z + 1), uMax, vMax);
-                tessellator.addVertexWithUV(x, (float)y + yOffset + f4, (float)(z + 1) - f3, uMax, vMin);
-                tessellator.addVertexWithUV(x, (float)y + yOffset + f4, (float)(z + 1) - f3, uMax, vMin);
-                tessellator.addVertexWithUV(x, (float)(y) + f4, (z + 1), uMax, vMax);
-                tessellator.addVertexWithUV(x + 1, (float)(y) + f4, (z + 1), uMin, vMax);
-                tessellator.addVertexWithUV(x + 1, (float)y + yOffset + f4, (float)(z + 1) - f3, uMin, vMin);
+            if (BlockLogicFire.canBurn(worldSource, tilePos.south(queryPos))) {
+                tessellator.addVertexWithUV(x + 1, (float) y + yOffset + f4, (float) (z + 1) - f3, uMin, vMin);
+                tessellator.addVertexWithUV(x + 1, (float) (y) + f4, (z + 1), uMin, vMax);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, (z + 1), uMax, vMax);
+                tessellator.addVertexWithUV(x, (float) y + yOffset + f4, (float) (z + 1) - f3, uMax, vMin);
+                tessellator.addVertexWithUV(x, (float) y + yOffset + f4, (float) (z + 1) - f3, uMax, vMin);
+                tessellator.addVertexWithUV(x, (float) (y) + f4, (z + 1), uMax, vMax);
+                tessellator.addVertexWithUV(x + 1, (float) (y) + f4, (z + 1), uMin, vMax);
+                tessellator.addVertexWithUV(x + 1, (float) y + yOffset + f4, (float) (z + 1) - f3, uMin, vMin);
             }
-            if(BlockLogicFire.canBurn(worldSource, new TilePos(x, y + 1, z)))
-            {
-                double d11 = (double)x + 0.5D + 0.5D;
-                double d13 = ((double)x + 0.5D) - 0.5D;
-                double d15 = (double)z + 0.5D + 0.5D;
-                double d17 = ((double)z + 0.5D) - 0.5D;
-                double d19 = ((double)x + 0.5D) - 0.5D;
-                double d21 = (double)x + 0.5D + 0.5D;
-                double d23 = ((double)z + 0.5D) - 0.5D;
-                double d24 = (double)z + 0.5D + 0.5D;
+            if (BlockLogicFire.canBurn(worldSource, tilePos.up(queryPos))) {
+                double d11 = (double) x + 0.5D + 0.5D;
+                double d13 = ((double) x + 0.5D) - 0.5D;
+                double d15 = (double) z + 0.5D + 0.5D;
+                double d17 = ((double) z + 0.5D) - 0.5D;
+                double d19 = ((double) x + 0.5D) - 0.5D;
+                double d21 = (double) x + 0.5D + 0.5D;
+                double d23 = ((double) z + 0.5D) - 0.5D;
+                double d24 = (double) z + 0.5D + 0.5D;
                 double d1 = tex.getIconUMin();
                 double d3 = tex.getIconUMax();
                 double d5 = tex.getIconVMin();
                 double d7 = tex.getIconVMax();
                 y++;
                 float f2 = -0.2F;
-                if((x + y + z & 1) == 0)
-                {
-                    tessellator.addVertexWithUV(d19, (float)y + f2, z, d3, d5);
+                if ((x + y + z & 1) == 0) {
+                    tessellator.addVertexWithUV(d19, (float) y + f2, z, d3, d5);
                     tessellator.addVertexWithUV(d11, y, z, d3, d7);
                     tessellator.addVertexWithUV(d11, y, z + 1, d1, d7);
-                    tessellator.addVertexWithUV(d19, (float)y + f2, z + 1, d1, d5);
+                    tessellator.addVertexWithUV(d19, (float) y + f2, z + 1, d1, d5);
                     d1 = tex.getIconUMin();
                     d3 = tex.getIconUMax();
                     d5 = tex.getIconVMin();
                     d7 = tex.getIconVMax();
-                    tessellator.addVertexWithUV(d21, (float)y + f2, z + 1, d3, d5);
+                    tessellator.addVertexWithUV(d21, (float) y + f2, z + 1, d3, d5);
                     tessellator.addVertexWithUV(d13, y, z + 1, d3, d7);
                     tessellator.addVertexWithUV(d13, y, z, d1, d7);
-                    tessellator.addVertexWithUV(d21, (float)y + f2, z, d1, d5);
-                } else
-                {
-                    tessellator.addVertexWithUV(x, (float)y + f2, d24, d3, d5);
+                    tessellator.addVertexWithUV(d21, (float) y + f2, z, d1, d5);
+                } else {
+                    tessellator.addVertexWithUV(x, (float) y + f2, d24, d3, d5);
                     tessellator.addVertexWithUV(x, y, d17, d3, d7);
                     tessellator.addVertexWithUV(x + 1, y, d17, d1, d7);
-                    tessellator.addVertexWithUV(x + 1, (float)y + f2, d24, d1, d5);
+                    tessellator.addVertexWithUV(x + 1, (float) y + f2, d24, d1, d5);
                     d1 = tex.getIconUMin();
                     d3 = tex.getIconUMax();
                     d5 = tex.getIconVMin();
                     d7 = tex.getIconVMax(); // 2x
-                    tessellator.addVertexWithUV(x + 1, (float)y + f2, d23, d3, d5);
+                    tessellator.addVertexWithUV(x + 1, (float) y + f2, d23, d3, d5);
                     tessellator.addVertexWithUV(x + 1, y, d15, d3, d7);
                     tessellator.addVertexWithUV(x, y, d15, d1, d7);
-                    tessellator.addVertexWithUV(x, (float)y + f2, d23, d1, d5);
+                    tessellator.addVertexWithUV(x, (float) y + f2, d23, d1, d5);
                 }
             }
         }
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFlowerStackable.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFlowerStackable.java
index 9c7e400f1..297cdc899 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFlowerStackable.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFlowerStackable.java
@@ -5,6 +5,7 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicFlowerStackable;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelFlowerStackable<T extends BlockLogicFlowerStackable> extends BlockModelCrossedSquares<T> {
@@ -13,19 +14,19 @@ public class BlockModelFlowerStackable<T extends BlockLogicFlowerStackable> exte
     public BlockModelFlowerStackable(Block<T> block, String baseTexture) {
         super(block);
 
-        ICONS = new IconCoordinate[T.MAX_STACK_COUNT + 1];
+        this.ICONS = new IconCoordinate[T.MAX_STACK_COUNT + 1];
         for (int i = 0; i < T.MAX_STACK_COUNT + 1; i++) {
-            ICONS[i] = TextureRegistry.getTexture(baseTexture + i);
+            this.ICONS[i] = TextureRegistry.getTexture(baseTexture + i);
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         final int stackCount = T.getStackCount(data);
         if (stackCount > T.MAX_STACK_COUNT) {
-            return ICONS[0];
+            return this.ICONS[0];
         }
 
-        return ICONS[stackCount];
+        return this.ICONS[stackCount];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
index 479bf0e34..6c6ebda32 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
@@ -5,15 +5,16 @@ import net.minecraft.client.render.block.color.BlockColorDispatcher;
 import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
-import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicFluid;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStandard<T> {
     public BlockModelFluid(Block<T> block) {
@@ -21,63 +22,66 @@ public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStanda
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int color = BlockColorDispatcher.getInstance().getDispatch(block).getWorldColor(worldSource, x, y, z, 0);
-        float r = (float)(color >> 16 & 0xff) / 255F;
-        float g = (float)(color >> 8 & 0xff) / 255F;
-        float b = (float)(color & 0xff) / 255F;
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getWorldColor(worldSource, tilePos, 0);
+        float r = (float) (color >> 16 & 0xff) / 255F;
+        float g = (float) (color >> 8 & 0xff) / 255F;
+        float b = (float) (color & 0xff) / 255F;
 
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
+        TilePos queryPos = new TilePos();
 
-        boolean renderTop = shouldSideBeRendered(worldSource, bounds, x, y + 1, z, Side.TOP);
-        boolean flag1 = shouldSideBeRendered(worldSource, bounds, x, y - 1, z, Side.BOTTOM);
+        final int x = tilePos.x();
+        final int y = tilePos.y();
+        final int z = tilePos.z();
+
+        AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
+
+        boolean renderTop = shouldSideBeRendered(worldSource, bounds, tilePos.up(queryPos), Side.TOP);
+        boolean flag1 = shouldSideBeRendered(worldSource, bounds, tilePos.down(queryPos), Side.BOTTOM);
         boolean[] aflag = new boolean[4];
-        aflag[0] = shouldSideBeRendered(worldSource, bounds, x, y, z - 1, Side.NORTH);
-        aflag[1] = shouldSideBeRendered(worldSource, bounds, x, y, z + 1, Side.SOUTH);
-        aflag[2] = shouldSideBeRendered(worldSource, bounds, x - 1, y, z, Side.WEST);
-        aflag[3] = shouldSideBeRendered(worldSource, bounds, x + 1, y, z, Side.EAST);
-        if(!renderTop && !flag1 && !aflag[0] && !aflag[1] && !aflag[2] && !aflag[3])
-        {
+        aflag[0] = shouldSideBeRendered(worldSource, bounds, tilePos.north(queryPos), Side.NORTH);
+        aflag[1] = shouldSideBeRendered(worldSource, bounds, tilePos.south(queryPos), Side.SOUTH);
+        aflag[2] = shouldSideBeRendered(worldSource, bounds, tilePos.west(queryPos), Side.WEST);
+        aflag[3] = shouldSideBeRendered(worldSource, bounds, tilePos.east(queryPos), Side.EAST);
+        if (!renderTop && !flag1 && !aflag[0] && !aflag[1] && !aflag[2] && !aflag[3]) {
             return false;
         }
         boolean didRender = false;
-        
+
         final float sideBottom = 0.5f;
         final float sideTop = 1.0f;
         final float sideNorthSouth = 0.8f;
         final float sideEastWest = 0.6f;
 
         final float yOff = 0.001f;
-        int meta = worldSource.getBlockMetadata(x, y, z);
-        float f7 = block.getLogic().getFluidHeight(worldSource, new TilePos(x, y, z));
-        float f8 = block.getLogic().getFluidHeight(worldSource, new TilePos(x, y, z + 1));
-        float f9 = block.getLogic().getFluidHeight(worldSource, new TilePos(x + 1, y, z + 1));
-        float f10 = block.getLogic().getFluidHeight(worldSource, new TilePos(x + 1, y, z));
-        if(renderBlocks.renderAllFaces || renderTop)
-        {
+        int meta = worldSource.getBlockData(tilePos);
+        float f7 = this.block.getLogic().getFluidHeight(worldSource, tilePos);
+        float f8 = this.block.getLogic().getFluidHeight(worldSource, tilePos.add(0, 0, 1, queryPos));
+        float f9 = this.block.getLogic().getFluidHeight(worldSource, tilePos.add(1, 0, 1, queryPos));
+        float f10 = this.block.getLogic().getFluidHeight(worldSource, tilePos.add(1, 0, 0, queryPos));
+        if (renderBlocks.renderAllFaces || renderTop) {
             didRender = true;
             IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.TOP, meta);
-            float rotation = (float) this.block.getLogic().getSlopeAngle(worldSource, new TilePos(x, y, z));
-            if(rotation > -999F)
-            {
+            float rotation = (float) this.block.getLogic().getSlopeAngle(worldSource, tilePos);
+            if (rotation > -999F) {
                 texture = getBlockTextureFromSideAndMetadata(Side.NORTH, meta);
             } else {
                 rotation = 0.0F;
             }
             float blockBrightness = 1.0f;
-            if(LightmapHelper.isLightmapEnabled()) {
-            	int light = block.getLightmapCoord(worldSource, x, y, z);
-            	int lightUp = block.getLightmapCoord(worldSource, x, y + 1, z);
-            	
-            	tessellator.setLightmapCoord(LightmapHelper.max(light, lightUp));
-            }else {
-            	blockBrightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+            if (LightmapHelper.isLightmapEnabled()) {
+                int light = this.block.getLightmapCoord(worldSource, tilePos);
+                int lightUp = this.block.getLightmapCoord(worldSource, tilePos.up(queryPos));
+
+                tessellator.setLightmapCoord(LightmapHelper.max(light, lightUp));
+            } else {
+                blockBrightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
             }
-            if (texture.namespaceId.toString().contains("_flowing")){
+            if (texture.namespaceId.toString().contains("_flowing")) {
                 double centerU = texture.getSubIconU(0.5);
                 double centerV = texture.getSubIconV(0.5);
-                float cSin = MathHelper.cos(rotation)/2;
-                float sin = MathHelper.sin(rotation)/2;
+                float cSin = MathHelper.cos(rotation) / 2;
+                float sin = MathHelper.sin(rotation) / 2;
 
                 double minU = texture.getIconUMin();
                 double maxU = texture.getIconUMax();
@@ -85,62 +89,48 @@ public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStanda
                 double maxV = texture.getIconVMax();
 
                 tessellator.setColorOpaque_F(sideTop * blockBrightness * r, sideTop * blockBrightness * g, sideTop * blockBrightness * b);
-                tessellator.addVertexWithUV(x,      (float)y + f7,      z,      ((minU - centerU) * sin - (maxV - centerV) * cSin) + centerU, ((maxV - centerV) * sin + (minU - centerU) * cSin) + centerV);
-                tessellator.addVertexWithUV(x,      (float)y + f8,      z + 1,  ((maxU - centerU) * sin - (maxV - centerV) * cSin) + centerU, ((maxV - centerV) * sin + (maxU - centerU) * cSin) + centerV);
-                tessellator.addVertexWithUV(x + 1,  (float)y + f9,      z + 1,  ((maxU - centerU) * sin - (minV - centerV) * cSin) + centerU, ((minV - centerV) * sin + (maxU - centerU) * cSin) + centerV);
-                tessellator.addVertexWithUV(x + 1,  (float)y + f10,     z,      ((minU - centerU) * sin - (minV - centerV) * cSin) + centerU, ((minV - centerV) * sin + (minU - centerU) * cSin) + centerV);
+                tessellator.addVertexWithUV(x, (float) y + f7, z, ((minU - centerU) * sin - (maxV - centerV) * cSin) + centerU, ((maxV - centerV) * sin + (minU - centerU) * cSin) + centerV);
+                tessellator.addVertexWithUV(x, (float) y + f8, z + 1, ((maxU - centerU) * sin - (maxV - centerV) * cSin) + centerU, ((maxV - centerV) * sin + (maxU - centerU) * cSin) + centerV);
+                tessellator.addVertexWithUV(x + 1, (float) y + f9, z + 1, ((maxU - centerU) * sin - (minV - centerV) * cSin) + centerU, ((minV - centerV) * sin + (maxU - centerU) * cSin) + centerV);
+                tessellator.addVertexWithUV(x + 1, (float) y + f10, z, ((minU - centerU) * sin - (minV - centerV) * cSin) + centerU, ((minV - centerV) * sin + (minU - centerU) * cSin) + centerV);
             } else {
                 tessellator.setColorOpaque_F(sideTop * blockBrightness * r, sideTop * blockBrightness * g, sideTop * blockBrightness * b);
-                tessellator.addVertexWithUV(x,      (float)y + f7,      z,      texture.getIconUMin(), texture.getIconVMax());
-                tessellator.addVertexWithUV(x,      (float)y + f8,      z + 1,  texture.getIconUMax(), texture.getIconVMax());
-                tessellator.addVertexWithUV(x + 1,  (float)y + f9,      z + 1,  texture.getIconUMax(), texture.getIconVMin());
-                tessellator.addVertexWithUV(x + 1,  (float)y + f10,     z,      texture.getIconUMin(), texture.getIconVMin());
+                tessellator.addVertexWithUV(x, (float) y + f7, z, texture.getIconUMin(), texture.getIconVMax());
+                tessellator.addVertexWithUV(x, (float) y + f8, z + 1, texture.getIconUMax(), texture.getIconVMax());
+                tessellator.addVertexWithUV(x + 1, (float) y + f9, z + 1, texture.getIconUMax(), texture.getIconVMin());
+                tessellator.addVertexWithUV(x + 1, (float) y + f10, z, texture.getIconUMin(), texture.getIconVMin());
             }
 
         }
-        if(renderBlocks.renderAllFaces || flag1)
-        {
+        if (renderBlocks.renderAllFaces || flag1) {
             float brightness = 1.0f;
-            if(LightmapHelper.isLightmapEnabled()) {
-            	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y - 1, z));
-            }else {
-            	brightness = renderBlocks.getBlockBrightness(worldSource, x, y - 1, z);
+            if (LightmapHelper.isLightmapEnabled()) {
+                tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos.down(queryPos)));
+            } else {
+                brightness = renderBlocks.getBlockBrightness(worldSource, tilePos.down(queryPos));
             }
             tessellator.setColorOpaque_F(sideBottom * brightness * r, sideBottom * brightness * g, sideBottom * brightness * b);
 
-            renderBlocks.renderBottomFace(tessellator, bounds,x, y + yOff, z, getBlockTextureFromSideAndMetadata(Side.TOP, 0));
+            renderBlocks.renderBottomFace(tessellator, bounds, x, y + yOff, z, getBlockTextureFromSideAndMetadata(Side.TOP, 0));
             didRender = true;
         }
-        for(int side = 0; side < 4; side++)
-        {
-            int xB = x;
-            int yB = y;
-            int zB = z;
-            if(side == 0)
-            {
-                zB--;
-            }
-            if(side == 1)
-            {
-                zB++;
-            }
-            if(side == 2)
-            {
-                xB--;
-            }
-            if(side == 3)
-            {
-                xB++;
+        TilePos posB = new TilePos(0, 0, 0);
+        for (int side = 0; side < 4; side++) {
+            posB.set(x, y, z);
+            switch (side) {
+                case 0 -> posB.set(x, y, z - 1); // North
+                case 1 -> posB.set(x, y, z + 1); // South
+                case 2 -> posB.set(x - 1, y, z); // West
+                case 3 -> posB.set(x + 1, y, z); // East
             }
             float uOff;
-            if (side == 0 || side == 1){
+            if (side == 0 || side == 1) {
                 uOff = (x & 1) == 0 ? 0.0f : 0.5f;
             } else {
                 uOff = (z & 1) == 0 ? 0.0f : 0.5f;
             }
             IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.getSideById(side + 2), meta);
-            if(!renderBlocks.renderAllFaces && !aflag[side])
-            {
+            if (!renderBlocks.renderAllFaces && !aflag[side]) {
                 continue;
             }
             float f13;
@@ -149,34 +139,28 @@ public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStanda
             float f19;
             float f20;
             float f21;
-            if(side == 0)
-            {
+            if (side == 0) {
                 f13 = f7;
                 f15 = f10;
                 f17 = x + 0.0001f;
                 f20 = x + 1 - 0.0001f;
                 f19 = z + 0.0001f;
                 f21 = z + 0.0001f;
-            } else
-            if(side == 1)
-            {
+            } else if (side == 1) {
                 f13 = f9;
                 f15 = f8;
                 f17 = x + 1 - 0.0001f;
                 f20 = x + 0.0001f;
                 f19 = z + 1 - 0.0001f;
                 f21 = z + 1 - 0.001f;
-            } else
-            if(side == 2)
-            {
+            } else if (side == 2) {
                 f13 = f8;
                 f15 = f7;
                 f17 = x + 0.0001f;
                 f20 = x + 0.0001f;
                 f19 = z + 1 - 0.0001f;
                 f21 = z + 0.0001f;
-            } else
-            {
+            } else {
                 f13 = f10;
                 f15 = f9;
                 f17 = x + 1 - 0.0001f;
@@ -188,23 +172,23 @@ public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStanda
             float vOff = (y & 1) == 0 ? 0.0F : 0.5f;
             double d4 = texture.getSubIconU(0.0F + uOff);
             double d5 = texture.getSubIconU(0.5F + uOff);
-            double d6 = texture.getSubIconV(0.5F - f13/2 + vOff);
-            double d7 = texture.getSubIconV(0.5F - f15/2 + vOff);
+            double d6 = texture.getSubIconV(0.5F - f13 / 2 + vOff);
+            double d7 = texture.getSubIconV(0.5F - f15 / 2 + vOff);
             double d8 = texture.getSubIconV(0.5F + vOff);
-			float brightness = 1.0f;
-			if(LightmapHelper.isLightmapEnabled()) {
-				tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, xB, yB, zB));
-			}else {
-				brightness = renderBlocks.getBlockBrightness(worldSource, xB, yB, zB);
-			}
-			if(side < 2) {
-				brightness *= sideNorthSouth;
-			}else {
-				brightness *= sideEastWest;
-			}
+            float brightness = 1.0f;
+            if (LightmapHelper.isLightmapEnabled()) {
+                tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, posB));
+            } else {
+                brightness = renderBlocks.getBlockBrightness(worldSource, posB);
+            }
+            if (side < 2) {
+                brightness *= sideNorthSouth;
+            } else {
+                brightness *= sideEastWest;
+            }
             tessellator.setColorOpaque_F(sideTop * brightness * r, sideTop * brightness * g, sideTop * brightness * b);
-            tessellator.addVertexWithUV(f17, (float)y + f13, f19, d4, d6);
-            tessellator.addVertexWithUV(f20, (float)y + f15, f21, d5, d7);
+            tessellator.addVertexWithUV(f17, (float) y + f13, f19, d4, d6);
+            tessellator.addVertexWithUV(f20, (float) y + f15, f21, d5, d7);
             tessellator.addVertexWithUV(f20, y, f21, d5, d8);
             tessellator.addVertexWithUV(f17, y, f19, d4, d8);
         }
@@ -217,24 +201,18 @@ public class BlockModelFluid<T extends BlockLogicFluid> extends BlockModelStanda
     }
 
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        Material material = blockAccess.getBlockMaterial(x, y, z);
-        if(material == block.getMaterial())
-        {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        Material material = source.getBlockMaterial(tilePos);
+        if (material == this.block.getMaterial()) {
             return false;
         }
-        if(material == Material.ice)
-        {
+        if (material == Materials.ICE) {
             return true;
         }
-        if(side == Side.TOP)
-        {
+        if (side == Side.TOP) {
             return true;
-        }
-        else
-        {
-            return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+        } else {
+            return super.shouldSideBeRendered(source, bounds, tilePos, side);
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFullyRotatable.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFullyRotatable.java
index 0db8d6a2a..c7dc78262 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFullyRotatable.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFullyRotatable.java
@@ -8,6 +8,7 @@ import net.minecraft.core.block.BlockLogicFullyRotatable;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -17,8 +18,8 @@ public class BlockModelFullyRotatable<T extends BlockLogic> extends BlockModelSt
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        final int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        final int meta = worldSource.getBlockData(tilePos);
         final Direction dir = BlockLogicFullyRotatable.metaToDirection(meta);
 
         switch (dir) {
@@ -55,7 +56,7 @@ public class BlockModelFullyRotatable<T extends BlockLogic> extends BlockModelSt
                 renderBlocks.uvRotateBottom = 2;
                 break;
         }
-        final boolean result = renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+        final boolean result = renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
         renderBlocks.resetRenderBlocks();
 
         return result;
@@ -68,11 +69,11 @@ public class BlockModelFullyRotatable<T extends BlockLogic> extends BlockModelSt
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         final Direction dir = BlockLogicFullyRotatable.metaToDirection(data);
         if (side == dir.getSide()) {
-            return blockTextures.get(Side.TOP);
+            return this.blockTextures.get(Side.TOP);
         }
-        return side.getDirection() != dir.getOpposite() ? blockTextures.get(Side.NORTH) : blockTextures.get(Side.BOTTOM);
+        return side.getDirection() != dir.getOpposite() ? this.blockTextures.get(Side.NORTH) : this.blockTextures.get(Side.BOTTOM);
     }
 }
\ No newline at end of file
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFurnace.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFurnace.java
index 64a4a8a16..53d351639 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFurnace.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFurnace.java
@@ -8,6 +8,8 @@ import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelFurnace<T extends BlockLogic>
@@ -18,13 +20,13 @@ public class BlockModelFurnace<T extends BlockLogic>
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side) {
-        int data = blockAccess.getBlockMetadata(x, y, z);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource blockAccess, @NotNull TilePosc tilePos, @NotNull Side side) {
+        int data = blockAccess.getBlockData(tilePos);
         int index = Sides.orientationLookUpHorizontal[6 * Math.min(data, 5) + side.getId()];
-        if (index >= Sides.orientationLookUpHorizontal.length) return blockTextures.get(Side.BOTTOM);
+        if (index >= Sides.orientationLookUpHorizontal.length) return this.blockTextures.get(Side.BOTTOM);
         if (index == Side.NORTH.getId()) {
-            IconCoordinate originalFront = blockTextures.get(Side.NORTH);
-            Container container = (Container) blockAccess.getTileEntity(x, y, z);
+            IconCoordinate originalFront = this.blockTextures.get(Side.NORTH);
+            Container container = (Container) blockAccess.getTileEntity(tilePos);
             if (container != null) {
                 boolean hasOutput = container.getItem(2) != null;
                 if (hasOutput) {
@@ -33,6 +35,6 @@ public class BlockModelFurnace<T extends BlockLogic>
             }
             return originalFront;
         }
-        return blockTextures.get(Side.getSideById(index));
+        return this.blockTextures.get(Side.getSideById(index));
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGeneric.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGeneric.java
index 3fbcede22..23dbdad33 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGeneric.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGeneric.java
@@ -7,13 +7,14 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
 import org.useless.dragonfly.data.block.BlockModelData;
 import org.useless.dragonfly.models.block.StaticBlockModel;
 
-public class BlockModelGeneric<T extends BlockLogic> extends BlockModel<T>{
+public class BlockModelGeneric<T extends BlockLogic> extends BlockModel<T> {
     private final StaticBlockModel staticModel;
 
     public BlockModelGeneric(@NotNull final Block<T> block, @NotNull final StaticBlockModel staticModel) {
@@ -27,37 +28,40 @@ public class BlockModelGeneric<T extends BlockLogic> extends BlockModel<T>{
     }
 
     @Override
-    public boolean renderNoCulling(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z) {
+    public boolean renderNoCulling(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos) {
         return this.staticModel.renderAttached(this,
             tessellator,
-            worldSource, x,
-            y,
-            z,
+            worldSource,
+            tilePos.x(),
+            tilePos.y(),
+            tilePos.z(),
             0, 0, 0, false, null);
     }
 
     @Override
-    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z) {
+    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos) {
         return this.staticModel.renderAttached(this,
             tessellator,
-            worldSource, x,
-            y,
-            z,
+            worldSource,
+            tilePos.x(),
+            tilePos.y(),
+            tilePos.z(),
             0, 0, 0, true, null);
     }
 
     @Override
-    public boolean renderOverbright(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z) {
+    public boolean renderOverbright(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos) {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public boolean renderWithOverrideTexture(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z, final IconCoordinate textureIndex) {
+    public boolean renderWithOverrideTexture(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos, final IconCoordinate textureIndex) {
         return this.staticModel.renderAttached(this,
             tessellator,
-            worldSource, x,
-            y,
-            z,
+            worldSource,
+            tilePos.x(),
+            tilePos.y(),
+            tilePos.z(),
             0, 0, 0, true, textureIndex);
     }
 
@@ -96,7 +100,7 @@ public class BlockModelGeneric<T extends BlockLogic> extends BlockModel<T>{
     }
 
     @Override
-    public int particleColorIndex(@NotNull final WorldSource worldSource, final int x, final int y, final int z, @NotNull final Side side, final int meta) {
+    public int particleColorIndex(@NotNull final WorldSource worldSource, final @NotNull TilePosc tilePos, @NotNull final Side side, final int meta) {
         return this.staticModel.particleColorIndex(side);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGlass.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGlass.java
index 2a2d7230b..d37924c1d 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGlass.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGlass.java
@@ -7,10 +7,12 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockModelGlass<T extends BlockLogic> extends BlockModelTransparent<T>{
+public class BlockModelGlass<T extends BlockLogic> extends BlockModelTransparent<T> {
     public static final int UP = 1 << 0;
     public static final int DOWN = 1 << 1;
     public static final int LEFT = 1 << 2;
@@ -46,49 +48,50 @@ public class BlockModelGlass<T extends BlockLogic> extends BlockModelTransparent
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(final WorldSource blockAccess, final int x, final int y, final int z, final Side side) {
+    public @Nullable IconCoordinate getBlockTexture(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (Minecraft.getMinecraft().gameSettings.connectedGlass.value) {
             final boolean u;
             final boolean d;
             final boolean l;
             final boolean r;
+            TilePos queryPos = new TilePos();
             switch (side) {
                 case SOUTH:
-                    u = blockAccess.getBlockId(x + Side.TOP.getOffsetX(), y + Side.TOP.getOffsetY(), z + Side.TOP.getOffsetZ()) == this.block.id();
-                    d = blockAccess.getBlockId(x + Side.BOTTOM.getOffsetX(), y + Side.BOTTOM.getOffsetY(), z + Side.BOTTOM.getOffsetZ()) == this.block.id();
-                    l = blockAccess.getBlockId(x + Side.WEST.getOffsetX(), y + Side.WEST.getOffsetY(), z + Side.WEST.getOffsetZ()) == this.block.id();
-                    r = blockAccess.getBlockId(x + Side.EAST.getOffsetX(), y + Side.EAST.getOffsetY(), z + Side.EAST.getOffsetZ()) == this.block.id();
+                    u = source.getBlockId(tilePos.up(queryPos)) == this.block.id();
+                    d = source.getBlockId(tilePos.down(queryPos)) == this.block.id();
+                    l = source.getBlockId(tilePos.west(queryPos)) == this.block.id();
+                    r = source.getBlockId(tilePos.east(queryPos)) == this.block.id();
                     break;
                 case NORTH:
-                    u = blockAccess.getBlockId(x + Side.TOP.getOffsetX(), y + Side.TOP.getOffsetY(), z + Side.TOP.getOffsetZ()) == this.block.id();
-                    d = blockAccess.getBlockId(x + Side.BOTTOM.getOffsetX(), y + Side.BOTTOM.getOffsetY(), z + Side.BOTTOM.getOffsetZ()) == this.block.id();
-                    l = blockAccess.getBlockId(x + Side.EAST.getOffsetX(), y + Side.EAST.getOffsetY(), z + Side.EAST.getOffsetZ()) == this.block.id();
-                    r = blockAccess.getBlockId(x + Side.WEST.getOffsetX(), y + Side.WEST.getOffsetY(), z + Side.WEST.getOffsetZ()) == this.block.id();
+                    u = source.getBlockId(tilePos.up(queryPos)) == this.block.id();
+                    d = source.getBlockId(tilePos.down(queryPos)) == this.block.id();
+                    l = source.getBlockId(tilePos.east(queryPos)) == this.block.id();
+                    r = source.getBlockId(tilePos.west(queryPos)) == this.block.id();
                     break;
                 case WEST:
-                    u = blockAccess.getBlockId(x + Side.TOP.getOffsetX(), y + Side.TOP.getOffsetY(), z + Side.TOP.getOffsetZ()) == this.block.id();
-                    d = blockAccess.getBlockId(x + Side.BOTTOM.getOffsetX(), y + Side.BOTTOM.getOffsetY(), z + Side.BOTTOM.getOffsetZ()) == this.block.id();
-                    l = blockAccess.getBlockId(x + Side.NORTH.getOffsetX(), y + Side.NORTH.getOffsetY(), z + Side.NORTH.getOffsetZ()) == this.block.id();
-                    r = blockAccess.getBlockId(x + Side.SOUTH.getOffsetX(), y + Side.SOUTH.getOffsetY(), z + Side.SOUTH.getOffsetZ()) == this.block.id();
+                    u = source.getBlockId(tilePos.up(queryPos)) == this.block.id();
+                    d = source.getBlockId(tilePos.down(queryPos)) == this.block.id();
+                    l = source.getBlockId(tilePos.north(queryPos)) == this.block.id();
+                    r = source.getBlockId(tilePos.south(queryPos)) == this.block.id();
                     break;
                 case EAST:
-                    u = blockAccess.getBlockId(x + Side.TOP.getOffsetX(), y + Side.TOP.getOffsetY(), z + Side.TOP.getOffsetZ()) == this.block.id();
-                    d = blockAccess.getBlockId(x + Side.BOTTOM.getOffsetX(), y + Side.BOTTOM.getOffsetY(), z + Side.BOTTOM.getOffsetZ()) == this.block.id();
-                    l = blockAccess.getBlockId(x + Side.SOUTH.getOffsetX(), y + Side.SOUTH.getOffsetY(), z + Side.SOUTH.getOffsetZ()) == this.block.id();
-                    r = blockAccess.getBlockId(x + Side.NORTH.getOffsetX(), y + Side.NORTH.getOffsetY(), z + Side.NORTH.getOffsetZ()) == this.block.id();
+                    u = source.getBlockId(tilePos.up(queryPos)) == this.block.id();
+                    d = source.getBlockId(tilePos.down(queryPos)) == this.block.id();
+                    l = source.getBlockId(tilePos.south(queryPos)) == this.block.id();
+                    r = source.getBlockId(tilePos.north(queryPos)) == this.block.id();
                     break;
                 case TOP:
                 case BOTTOM:
                 default:
-                    u = blockAccess.getBlockId(x + Side.NORTH.getOffsetX(), y + Side.NORTH.getOffsetY(), z + Side.NORTH.getOffsetZ()) == this.block.id();
-                    d = blockAccess.getBlockId(x + Side.SOUTH.getOffsetX(), y + Side.SOUTH.getOffsetY(), z + Side.SOUTH.getOffsetZ()) == this.block.id();
-                    l = blockAccess.getBlockId(x + Side.WEST.getOffsetX(), y + Side.WEST.getOffsetY(), z + Side.WEST.getOffsetZ()) == this.block.id();
-                    r = blockAccess.getBlockId(x + Side.EAST.getOffsetX(), y + Side.EAST.getOffsetY(), z + Side.EAST.getOffsetZ()) == this.block.id();
+                    u = source.getBlockId(tilePos.north(queryPos)) == this.block.id();
+                    d = source.getBlockId(tilePos.south(queryPos)) == this.block.id();
+                    l = source.getBlockId(tilePos.west(queryPos)) == this.block.id();
+                    r = source.getBlockId(tilePos.east(queryPos)) == this.block.id();
                     break;
             }
             return this.coordinates[(u ? UP : 0) | (d ? DOWN : 0) | (l ? LEFT : 0) | (r ? RIGHT : 0)];
         } else {
-            return super.getBlockTexture(blockAccess, x, y, z, side);
+            return super.getBlockTexture(source, tilePos, side);
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGrass.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGrass.java
index e1a58925b..354264236 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGrass.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelGrass.java
@@ -7,46 +7,51 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelGrass<T extends BlockLogic> extends BlockModelStandard<T> {
     public static boolean fancyGrass = false;
     public static boolean useOverlay = false;
     private static final IconCoordinate[] overlayIndices = new IconCoordinate[]{
-            null,
-            null,
-            TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
-            TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
-            TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
-            TextureRegistry.getTexture("minecraft:block/grass/side_overlay")};
+        null,
+        null,
+        TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
+        TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
+        TextureRegistry.getTexture("minecraft:block/grass/side_overlay"),
+        TextureRegistry.getTexture("minecraft:block/grass/side_overlay")};
     protected IconCoordinate snowSide = TextureRegistry.getTexture("minecraft:block/grass/snowy_side");
+
     public BlockModelGrass(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBounds();
-        boolean didRender = isRetro() ? renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1) : renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        if (fancyGrass && !(retroBlockTextures.hasTexture() && isRetro())){
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBdc bounds = this.block.getBounds();
+        boolean didRender = isRetro() ? renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1) : renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        if (fancyGrass && !(this.retroBlockTextures.hasTexture() && isRetro())) {
             useOverlay = true;
-            didRender |= renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            didRender |= renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
             useOverlay = false;
         }
         return didRender;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         GL11.glColor4f(brightness, brightness, brightness, alpha);
         float yOffset = 0.5F;
 
-        AABB bounds = getBlockBoundsForItemRender();
+        AABBdc bounds = getBlockBoundsForItemRender();
         GL11.glTranslatef(-0.5F, 0.0F - yOffset, -0.5F);
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, -1F, 0.0F);
@@ -72,19 +77,18 @@ public class BlockModelGrass<T extends BlockLogic> extends BlockModelStandard<T>
         tessellator.setNormal(1.0F, 0.0F, 0.0F);
         renderBlocks.renderEastFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, getBlockTextureFromSideAndMetadata(Side.EAST, metadata));
         tessellator.draw();
-        if(renderBlocks.useInventoryTint && !isRetro())
-        {
-            int l = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float f4 = (float)(l >> 16 & 0xff) / 255F;
-            float f8 = (float)(l >> 8 & 0xff) / 255F;
-            float f9 = (float)(l & 0xff) / 255F;
+        if (renderBlocks.useInventoryTint && !isRetro()) {
+            int l = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float f4 = (float) (l >> 16 & 0xff) / 255F;
+            float f8 = (float) (l >> 8 & 0xff) / 255F;
+            float f9 = (float) (l & 0xff) / 255F;
             GL11.glColor4f(f4 * brightness, f8 * brightness, f9 * brightness, alpha);
         }
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, 1.0F, 0.0F);
         renderBlocks.renderTopFace(tessellator, bounds, 0.0D, 0.0D, 0.0D, getBlockTextureFromSideAndMetadata(Side.TOP, metadata));
         tessellator.draw();
-        if (fancyGrass && !isRetro()){
+        if (fancyGrass && !isRetro()) {
             useOverlay = true;
             tessellator.startDrawingQuads();
             tessellator.setNormal(0.0F, 0.0F, -1F);
@@ -106,26 +110,27 @@ public class BlockModelGrass<T extends BlockLogic> extends BlockModelStandard<T>
         }
         GL11.glTranslatef(0.5F, 0.5F, 0.5F);
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        Material material = blockAccess.getBlockMaterial(x, y + 1, z);
-        if ((material == Material.topSnow || material == Material.snow) && (side.getAxis() != Axis.Y)) {
-            return snowSide;
-        } else return super.getBlockTexture(blockAccess, x, y, z, side);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        Material material = source.getBlockMaterial(tilePos.up(new TilePos()));
+        if ((material == Materials.TOP_SNOW || material == Materials.SNOW) && (side.getAxis() != Axis.Y)) {
+            return this.snowSide;
+        } else return super.getBlockTexture(source, tilePos, side);
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if (useOverlay){
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (useOverlay) {
             return overlayIndices[side.getId()];
         }
         return super.getBlockTextureFromSideAndMetadata(side, data);
     }
+
     @Override
-    public boolean shouldSideBeColored(@NotNull WorldSource worldSource, int x, int y, int z, @NotNull Side side, int meta){
-        Material material = worldSource.getBlockMaterial(x, y + 1, z);
-        if (material == Material.topSnow || material == Material.snow) {
+    public boolean shouldSideBeColored(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos, @NotNull Side side, int meta) {
+        Material material = worldSource.getBlockMaterial(tilePos.up(new TilePos()));
+        if (material == Materials.TOP_SNOW || material == Materials.SNOW) {
             return false;
         }
         return useOverlay || side == Side.TOP;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelHorizontalRotation.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelHorizontalRotation.java
index 7c9aab868..71c67f963 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelHorizontalRotation.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelHorizontalRotation.java
@@ -6,6 +6,7 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicRotatable;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
 
@@ -23,17 +24,17 @@ public class BlockModelHorizontalRotation<T extends BlockLogic> extends BlockMod
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data) {
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
         int index = Sides.orientationLookUpHorizontal[6 * Math.min(data & BlockLogicRotatable.MASK_DIRECTION, 5) + side.getId()];
-        if (index >= Sides.orientationLookUpHorizontal.length) return overbrightTextures.get(Side.BOTTOM);
+        if (index >= Sides.orientationLookUpHorizontal.length) return this.overbrightTextures.get(Side.BOTTOM);
         return super.getBlockOverbrightTextureFromSideAndMeta(Side.getSideById(index), data);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data)
     {
         int index = Sides.orientationLookUpHorizontal[6 * Math.min(data & BlockLogicRotatable.MASK_DIRECTION, 5) + side.getId()];
-        if (index >= Sides.orientationLookUpHorizontal.length) return blockTextures.get(Side.BOTTOM);
+        if (index >= Sides.orientationLookUpHorizontal.length) return this.blockTextures.get(Side.BOTTOM);
         return super.getBlockTextureFromSideAndMetadata(Side.getSideById(index), data);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJar.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJar.java
index 8332ef277..0dd084c01 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJar.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJar.java
@@ -8,50 +8,52 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelJar<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate jarEmpty = TextureRegistry.getTexture("minecraft:block/jar");
     protected IconCoordinate jarFull = TextureRegistry.getTexture("minecraft:block/jar_dirt");
+
     public BlockModelJar(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         // todo: yes, i know this is horrible.
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         float yOffset = 0f;
-        int meta = worldSource.getBlockMetadata(x, y, z);
+        int meta = worldSource.getBlockData(tilePos);
 
-        float extMinX = x + 0.5f - (3f / 16f);
-        float extMinY = y + yOffset;
-        float extMinZ = z + 0.5f - (3f / 16f);
-        float extMaxX = x + 0.5f + (3f / 16f);
-        float extMaxY = y + (0.5f + yOffset);
-        float extMaxZ = z + 0.5f + (3f / 16f);
+        float extMinX = tilePos.x() + 0.5f - (3f / 16f);
+        float extMinY = tilePos.y() + yOffset;
+        float extMinZ = tilePos.z() + 0.5f - (3f / 16f);
+        float extMaxX = tilePos.x() + 0.5f + (3f / 16f);
+        float extMaxY = tilePos.y() + (0.5f + yOffset);
+        float extMaxZ = tilePos.z() + 0.5f + (3f / 16f);
 
-        float fillMaxY = y + (0.5f + yOffset) - (4f / 16f);
+        float fillMaxY = tilePos.y() + (0.5f + yOffset) - (4f / 16f);
 
-        float intMinX = x + 0.5f - (3f / 16f);
-        float intMinY = y + yOffset;
-        float intMinZ = z + 0.5f - (3f / 16f);
-        float intMaxX = x + 0.5f + (3f / 16f);
-        float intMaxY = y + (0.5f + yOffset);
-        float intMaxZ = z + 0.5f + (3f / 16f);
+        float intMinX = tilePos.x() + 0.5f - (3f / 16f);
+        float intMinY = tilePos.y() + yOffset;
+        float intMinZ = tilePos.z() + 0.5f - (3f / 16f);
+        float intMaxX = tilePos.x() + 0.5f + (3f / 16f);
+        float intMaxY = tilePos.y() + (0.5f + yOffset);
+        float intMaxZ = tilePos.z() + 0.5f + (3f / 16f);
 
         IconCoordinate texIndex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, meta);
 
         double texU = texIndex.getIconUMin();
         double texV = texIndex.getIconVMin();
 
-        double onePix = 1f/16;
+        double onePix = 1f / 16;
 
         //exterior shell uvs
         double extSideMinU = texU;
@@ -99,10 +101,10 @@ public class BlockModelJar<T extends BlockLogic> extends BlockModelStandard<T> {
         tessellator.addVertexWithUV(extMinX, fillMaxY, extMinZ, extTopMinU, extTopMinV);
 
         // Render bottom int
-        tessellator.addVertexWithUV(extMinX, extMinY+0.01F, extMaxZ, extBottomMinU, extBottomMaxV);
-        tessellator.addVertexWithUV(extMaxX, extMinY+0.01F, extMaxZ, extBottomMaxU, extBottomMaxV);
-        tessellator.addVertexWithUV(extMaxX, extMinY+0.01F, extMinZ, extBottomMaxU, extBottomMinV);
-        tessellator.addVertexWithUV(extMinX, extMinY+0.01F, extMinZ, extBottomMinU, extBottomMinV);
+        tessellator.addVertexWithUV(extMinX, extMinY + 0.01F, extMaxZ, extBottomMinU, extBottomMaxV);
+        tessellator.addVertexWithUV(extMaxX, extMinY + 0.01F, extMaxZ, extBottomMaxU, extBottomMaxV);
+        tessellator.addVertexWithUV(extMaxX, extMinY + 0.01F, extMinZ, extBottomMaxU, extBottomMinV);
+        tessellator.addVertexWithUV(extMinX, extMinY + 0.01F, extMinZ, extBottomMinU, extBottomMinV);
 
         // Render sides ext
         tessellator.addVertexWithUV(extMaxX, extMinY, extMinZ, extSideMinU, extSideMaxV);
@@ -139,16 +141,16 @@ public class BlockModelJar<T extends BlockLogic> extends BlockModelStandard<T> {
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta)
-    {
-        if(meta == 1)
-            return jarFull;
-        return jarEmpty;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
+        if (meta == 1)
+            return this.jarFull;
+        return this.jarEmpty;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJarButterfly.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJarButterfly.java
index 4198dd0ee..ba1badcef 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJarButterfly.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelJarButterfly.java
@@ -8,49 +8,50 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicJarButterfly;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class BlockModelJarButterfly<T extends BlockLogic> extends BlockModelStandard<T>{
+public class BlockModelJarButterfly<T extends BlockLogic> extends BlockModelStandard<T> {
 
     public BlockModelJarButterfly(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         boolean isHanging = (meta & BlockLogicJarButterfly.MASK_HANGING) == 0;
         boolean isAngled = (meta & BlockLogicJarButterfly.MASK_ANGLED) != 0;
 
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-            tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-            brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
         float yOffset = isHanging ? 0f : 0.375f;
 
-        float intMinX = x + 0.5f - (2f / 16f);
-        float intMinY = y + yOffset + (1f / 16f);
-        float intMinZ = z + 0.5f - (2f / 16f);
-        float intMaxX = x + 0.5f + (2f / 16f);
-        float intMaxY = y + (0.4375f + yOffset);
-        float intMaxZ = z + 0.5f + (2f / 16f);
-
-        float extMinX = x + 0.5f - (3f / 16f);
-        float extMinY = y + yOffset;
-        float extMinZ = z + 0.5f - (3f / 16f);
-        float extMaxX = x + 0.5f + (3f / 16f);
-        float extMaxY = y + (0.5f + yOffset);
-        float extMaxZ = z + 0.5f + (3f / 16f);
-
-        float hookMinX = x + 0.5f - (2f / 16f);
-        float hookMinZ = z + 0.5f - (2f / 16f);
-        float hookMaxX = x + 0.5f + (2f / 16f);
+        float intMinX = tilePos.x() + 0.5f - (2f / 16f);
+        float intMinY = tilePos.y() + yOffset + (1f / 16f);
+        float intMinZ = tilePos.z() + 0.5f - (2f / 16f);
+        float intMaxX = tilePos.x() + 0.5f + (2f / 16f);
+        float intMaxY = tilePos.y() + (0.4375f + yOffset);
+        float intMaxZ = tilePos.z() + 0.5f + (2f / 16f);
+
+        float extMinX = tilePos.x() + 0.5f - (3f / 16f);
+        float extMinY = tilePos.y() + yOffset;
+        float extMinZ = tilePos.z() + 0.5f - (3f / 16f);
+        float extMaxX = tilePos.x() + 0.5f + (3f / 16f);
+        float extMaxY = tilePos.y() + (0.5f + yOffset);
+        float extMaxZ = tilePos.z() + 0.5f + (3f / 16f);
+
+        float hookMinX = tilePos.x() + 0.5f - (2f / 16f);
+        float hookMinZ = tilePos.z() + 0.5f - (2f / 16f);
+        float hookMaxX = tilePos.x() + 0.5f + (2f / 16f);
         float hookMaxY = intMaxY + (4f / 16f);
-        float hookMaxZ = z + 0.5f + (2f / 16f);
+        float hookMaxZ = tilePos.z() + 0.5f + (2f / 16f);
 
 //        if (isAngled)
 //        {
@@ -95,7 +96,7 @@ public class BlockModelJarButterfly<T extends BlockLogic> extends BlockModelStan
         double texU = texIndex.getIconUMin();
         double texV = texIndex.getIconVMin();
 
-        double onePix = 1f/16;
+        double onePix = 1f / 16;
 
         //exterior shell uvs
         double extSideMinU = texU;
@@ -175,6 +176,7 @@ public class BlockModelJarButterfly<T extends BlockLogic> extends BlockModelStan
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLadder.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLadder.java
index afd16a355..afdd888df 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLadder.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLadder.java
@@ -5,66 +5,66 @@ import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
+import net.minecraft.core.block.BlockLogicLadder;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class BlockModelLadder<T extends BlockLogic> extends BlockModelStandard<T> {
+public class BlockModelLadder<T extends BlockLogicLadder> extends BlockModelStandard<T> {
     public BlockModelLadder(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int k1 = worldSource.getBlockMetadata(x, y, z);
-        IconCoordinate l = getBlockTextureFromSideAndMetadata(Side.BOTTOM, k1);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
-            l = renderBlocks.overrideBlockTexture;
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int data = worldSource.getBlockData(tilePos);
+        IconCoordinate tex = getBlockTextureFromSideAndMetadata(Side.BOTTOM, data);
+        if (renderBlocks.overrideBlockTexture != null) {
+            tex = renderBlocks.overrideBlockTexture;
         }
         float brightness = 1.0f;
-        if(!LightmapHelper.isLightmapEnabled()) {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-        }else {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
+        if (!LightmapHelper.isLightmapEnabled()) {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+        } else {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
-        double d = l.getIconUMin();
-        double d1 = l.getIconUMax();
-        double d2 = l.getIconVMin();
-        double d3 = l.getIconVMax();
+        double uMin = tex.getIconUMin();
+        double uMax = tex.getIconUMax();
+        double vMin = tex.getIconVMin();
+        double vMax = tex.getIconVMax();
         float f1 = 0.0F;
         float f2 = 0.05F;
-        if(k1 == 5)
-        {
-            tessellator.addVertexWithUV((float)x + f2, (float)(y + 1) + f1, (float)(z + 1) + f1, d, d2);
-            tessellator.addVertexWithUV((float)x + f2, (float)(y) - f1,     (float)(z + 1) + f1, d, d3);
-            tessellator.addVertexWithUV((float)x + f2, (float)(y) - f1,     (float)(z) - f1, d1, d3);
-            tessellator.addVertexWithUV((float)x + f2, (float)(y + 1) + f1, (float)(z) - f1, d1, d2);
-        }
-        if(k1 == 4)
-        {
-            tessellator.addVertexWithUV((float)(x + 1) - f2,(float)(y) - f1,    (float)(z + 1) + f1, d1, d3);
-            tessellator.addVertexWithUV((float)(x + 1) - f2,(float)(y + 1) + f1,(float)(z + 1) + f1, d1, d2);
-            tessellator.addVertexWithUV((float)(x + 1) - f2,(float)(y + 1) + f1,(float)(z) - f1, d, d2);
-            tessellator.addVertexWithUV((float)(x + 1) - f2,(float)(y) - f1,    (float)(z) - f1, d, d3);
-        }
-        if(k1 == 3)
-        {
-            tessellator.addVertexWithUV((float)(x + 1) + f1,(float)(y) - f1,    (float)z + f2, d1, d3);
-            tessellator.addVertexWithUV((float)(x + 1) + f1,(float)(y + 1) + f1,(float)z + f2, d1, d2);
-            tessellator.addVertexWithUV((float)(x) - f1,    (float)(y + 1) + f1,(float)z + f2, d, d2);
-            tessellator.addVertexWithUV((float)(x) - f1,    (float)(y) - f1,    (float)z + f2, d, d3);
-        }
-        if(k1 == 2)
-        {
-            tessellator.addVertexWithUV((float)(x + 1) + f1,(float)(y + 1) + f1,(float)(z + 1) - f2, d, d2);
-            tessellator.addVertexWithUV((float)(x + 1) + f1,(float)(y) - f1,    (float)(z + 1) - f2, d, d3);
-            tessellator.addVertexWithUV((float)(x) - f1,    (float)(y) - f1,    (float)(z + 1) - f2, d1, d3);
-            tessellator.addVertexWithUV((float)(x) - f1,    (float)(y + 1) + f1,(float)(z + 1) - f2, d1, d2);
+        switch (this.block.getLogic().getSideFromMeta(data)) {
+            case EAST -> {
+                tessellator.addVertexWithUV((float) tilePos.x() + f2, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z() + 1) + f1, uMin, vMin);
+                tessellator.addVertexWithUV((float) tilePos.x() + f2, (float) (tilePos.y()) - f1, (float) (tilePos.z() + 1) + f1, uMin, vMax);
+                tessellator.addVertexWithUV((float) tilePos.x() + f2, (float) (tilePos.y()) - f1, (float) (tilePos.z()) - f1, uMax, vMax);
+                tessellator.addVertexWithUV((float) tilePos.x() + f2, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z()) - f1, uMax, vMin);
+            }
+            case WEST -> {
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) - f2, (float) (tilePos.y()) - f1, (float) (tilePos.z() + 1) + f1, uMax, vMax);
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) - f2, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z() + 1) + f1, uMax, vMin);
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) - f2, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z()) - f1, uMin, vMin);
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) - f2, (float) (tilePos.y()) - f1, (float) (tilePos.z()) - f1, uMin, vMax);
+            }
+            case SOUTH -> {
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) + f1, (float) (tilePos.y()) - f1, (float) tilePos.z() + f2, uMax, vMax);
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) + f1, (float) (tilePos.y() + 1) + f1, (float) tilePos.z() + f2, uMax, vMin);
+                tessellator.addVertexWithUV((float) (tilePos.x()) - f1, (float) (tilePos.y() + 1) + f1, (float) tilePos.z() + f2, uMin, vMin);
+                tessellator.addVertexWithUV((float) (tilePos.x()) - f1, (float) (tilePos.y()) - f1, (float) tilePos.z() + f2, uMin, vMax);
+            }
+            case NORTH -> {
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) + f1, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z() + 1) - f2, uMin, vMin);
+                tessellator.addVertexWithUV((float) (tilePos.x() + 1) + f1, (float) (tilePos.y()) - f1, (float) (tilePos.z() + 1) - f2, uMin, vMax);
+                tessellator.addVertexWithUV((float) (tilePos.x()) - f1, (float) (tilePos.y()) - f1, (float) (tilePos.z() + 1) - f2, uMax, vMax);
+                tessellator.addVertexWithUV((float) (tilePos.x()) - f1, (float) (tilePos.y() + 1) + f1, (float) (tilePos.z() + 1) - f2, uMax, vMin);
+            }
         }
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLamp.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLamp.java
index 790ddaf82..02239ccac 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLamp.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLamp.java
@@ -7,6 +7,8 @@ import net.minecraft.core.block.BlockLogicLamp;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelLamp<T extends BlockLogicLamp> extends BlockModelStandard<T> {
@@ -14,7 +16,7 @@ public class BlockModelLamp<T extends BlockLogicLamp> extends BlockModelStandard
     private static final IconCoordinate[] texCoordsActive = new IconCoordinate[DyeColor.COLOR_AMOUNT];
 
     static {
-        for (DyeColor c : DyeColor.blockOrderedColors()){
+        for (DyeColor c : DyeColor.blockOrderedColors()) {
             texCoordsInactive[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/lamp/" + c.colorID + "_idle");
             texCoordsActive[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/lamp/" + c.colorID + "_active");
         }
@@ -25,19 +27,17 @@ public class BlockModelLamp<T extends BlockLogicLamp> extends BlockModelStandard
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource worldSource, int x, int y, int z, Side side)
-    {
-        int color = worldSource.getBlockMetadata(x, y, z) & DyeColor.MASK_COLOR;
-        if (block.getLogic().isActive) {
-            return texCoordsActive[color];
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        int data = source.getBlockData(tilePos) & DyeColor.MASK_COLOR;
+        if (this.block.getLogic().isActive) {
+            return texCoordsActive[data];
         } else {
-            return texCoordsInactive[color];
+            return texCoordsInactive[data];
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         return texCoordsActive[data & DyeColor.MASK_COLOR];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLantern.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLantern.java
index d839f33a6..0c12ca9fe 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLantern.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLantern.java
@@ -8,6 +8,7 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicLanternFirefly;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockModelLantern<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -16,40 +17,40 @@ public class BlockModelLantern<T extends BlockLogic> extends BlockModelStandard<
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         boolean isHanging = (meta & BlockLogicLanternFirefly.MASK_HANGING) == 0;
 //        boolean isAngled = (meta & BlockLogicLanternFirefly.MASK_ANGLED) != 0;
 
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
         float yOffset = isHanging ? 0f : 0.375f;
 
-        float intMinX = x + 0.5f - (2f / 16f);
-        float intMinY = y + yOffset + (1f / 16f);
-        float intMinZ = z + 0.5f - (2f / 16f);
-        float intMaxX = x + 0.5f + (2f / 16f);
-        float intMaxY = y + (0.4375f + yOffset);
-        float intMaxZ = z + 0.5f + (2f / 16f);
-
-        float extMinX = x + 0.5f - (3f / 16f);
-        float extMinY = y + yOffset;
-        float extMinZ = z + 0.5f - (3f / 16f);
-        float extMaxX = x + 0.5f + (3f / 16f);
-        float extMaxY = y + (0.5f + yOffset);
-        float extMaxZ = z + 0.5f + (3f / 16f);
-
-        float hookMinX = x + 0.5f - (2f / 16f);
-        float hookMinZ = z + 0.5f - (2f / 16f);
-        float hookMaxX = x + 0.5f + (2f / 16f);
+        float intMinX = tilePos.x() + 0.5f - (2f / 16f);
+        float intMinY = tilePos.y() + yOffset + (1f / 16f);
+        float intMinZ = tilePos.z() + 0.5f - (2f / 16f);
+        float intMaxX = tilePos.x() + 0.5f + (2f / 16f);
+        float intMaxY = tilePos.y() + (0.4375f + yOffset);
+        float intMaxZ = tilePos.z() + 0.5f + (2f / 16f);
+
+        float extMinX = tilePos.x() + 0.5f - (3f / 16f);
+        float extMinY = tilePos.y() + yOffset;
+        float extMinZ = tilePos.z() + 0.5f - (3f / 16f);
+        float extMaxX = tilePos.x() + 0.5f + (3f / 16f);
+        float extMaxY = tilePos.y() + (0.5f + yOffset);
+        float extMaxZ = tilePos.z() + 0.5f + (3f / 16f);
+
+        float hookMinX = tilePos.x() + 0.5f - (2f / 16f);
+        float hookMinZ = tilePos.z() + 0.5f - (2f / 16f);
+        float hookMaxX = tilePos.x() + 0.5f + (2f / 16f);
         float hookMaxY = intMaxY + (4f / 16f);
-        float hookMaxZ = z + 0.5f + (2f / 16f);
+        float hookMaxZ = tilePos.z() + 0.5f + (2f / 16f);
 
 //        if (isAngled)
 //        {
@@ -94,7 +95,7 @@ public class BlockModelLantern<T extends BlockLogic> extends BlockModelStandard<
         double texU = texIndex.getIconUMin();
         double texV = texIndex.getIconVMin();
 
-        double onePix = 1f/16;
+        double onePix = 1f / 16;
 
         //exterior shell uvs
         double extSideMinU = texU;
@@ -223,6 +224,7 @@ public class BlockModelLantern<T extends BlockLogic> extends BlockModelStandard<
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLayer.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLayer.java
index 54209d1ff..f414a1ad3 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLayer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLayer.java
@@ -4,10 +4,11 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelLayer<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -15,6 +16,7 @@ public class BlockModelLayer<T extends BlockLogic> extends BlockModelStandard<T>
         super(block);
         withCustomItemBounds(0.0f, 0.0f, 0.0f, 1.0f, 2 / 16F, 1.0f);
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         GL11.glTranslatef(0, 0.25f, 0);
@@ -22,11 +24,10 @@ public class BlockModelLayer<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side, int meta)
-    {
-        if(!side.isVertical() && blockAccess.getBlockId(x, y, z) == block.id() && blockAccess.getBlockMetadata(x, y, z) == meta){
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePos tilePos, @NotNull Side side, int meta) {
+        if (!side.isVertical() && source.getBlockId(tilePos) == this.block.id() && source.getBlockData(tilePos) == meta) {
             return false;
         }
-        return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+        return super.shouldSideBeRendered(source, bounds, tilePos, side);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeaves.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeaves.java
index 6454f3867..5c213027b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeaves.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeaves.java
@@ -6,10 +6,11 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelLeaves<T extends BlockLogic> extends BlockModelStandard<T> {
     protected static boolean fancyGraphics;
@@ -26,49 +27,44 @@ public class BlockModelLeaves<T extends BlockLogic> extends BlockModelStandard<T
     public BlockModelLeaves(Block<T> block, String leavesTex, boolean canBeRetro) {
         super(block);
         setAllTextures(BLOCK_TEXTURES, leavesTex);
-        fancyLeavesTexture = TextureRegistry.getTexture(leavesTex + "_fancy");
+        this.fancyLeavesTexture = TextureRegistry.getTexture(leavesTex + "_fancy");
         this.canBeRetro = canBeRetro;
     }
 
-    public static void setGraphicsLevel(boolean graphicsLevel)
-    {
+    public static void setGraphicsLevel(boolean graphicsLevel) {
         fancyGraphics = graphicsLevel;
     }
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         boolean invTint = renderBlocks.useInventoryTint;
-        renderBlocks.useInventoryTint = !canBeRetro || !isRetro();
+        renderBlocks.useInventoryTint = !this.canBeRetro || !isRetro();
         super.renderStandalone(tessellator, metadata, brightness, alpha, lightmapCoordinate);
         renderBlocks.useInventoryTint = invTint;
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        if (canBeRetro && isRetro()) {
-            return renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z, 1, 1, 1);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        if (this.canBeRetro && isRetro()) {
+            return renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos, 1, 1, 1);
         }
-        return super.render(tessellator, worldSource, x, y, z);
+        return super.render(tessellator, worldSource, tilePos);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if (canBeRetro && isRetro()) {
-            return fancyGraphics ? retroLeavesFancy : retroLeaves;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (this.canBeRetro && isRetro()) {
+            return fancyGraphics ? this.retroLeavesFancy : this.retroLeaves;
         }
-        return fancyGraphics ? fancyLeavesTexture : super.getBlockTextureFromSideAndMetadata(side, data);
+        return fancyGraphics ? this.fancyLeavesTexture : super.getBlockTextureFromSideAndMetadata(side, data);
     }
+
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        int i1 = blockAccess.getBlockId(x, y, z);
-        if(!fancyGraphics && i1 == block.id())
-        {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (!fancyGraphics && source.getBlockId(tilePos) == this.block.id()) {
             return false;
-        } else
-        {
-            return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+        } else {
+            return super.shouldSideBeRendered(source, bounds, tilePos, side);
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCacao.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCacao.java
index 26dd801ef..e2f5fd36b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCacao.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCacao.java
@@ -7,40 +7,42 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicLeavesCacao;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelLeavesCacao<T extends BlockLogic> extends BlockModelLeaves<T> {
     protected IconCoordinate[] growthStages = new IconCoordinate[]{
-            TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage0"),
-            TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage1"),
-            TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage2"),
-            TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage3")};
+        TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage0"),
+        TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage1"),
+        TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage2"),
+        TextureRegistry.getTexture("minecraft:block/leaves/cacao_bean_stage3")};
+
     public BlockModelLeavesCacao(Block<T> block) {
         super(block, "minecraft:block/leaves/cacao");
-        assert growthStages.length == BlockLogicLeavesCacao.MAX_GROWTH_STATE : "There must be a texture associated with every cacao bean stage!";
+        assert this.growthStages.length == BlockLogicLeavesCacao.MAX_GROWTH_STATE : "There must be a texture associated with every cacao bean stage!";
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        super.render(tessellator, worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        super.render(tessellator, worldSource, tilePos);
 
-        AABB bounds = block.getBounds();
+        AABBdc bounds = this.block.getBounds();
 
-        final int growthRate = BlockLogicLeavesCacao.getGrowthRate(worldSource.getBlockMetadata(x, y, z));
+        final int growthRate = BlockLogicLeavesCacao.getGrowthRate(worldSource.getBlockData(tilePos));
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-            int lmc = block.getLightmapCoord(worldSource, x, y, z);
-            if(block.emission > 0) {
+        if (LightmapHelper.isLightmapEnabled()) {
+            int lmc = this.block.getLightmapCoord(worldSource, tilePos);
+            if (this.block.emission > 0) {
                 lmc = LightmapHelper.setBlocklightValue(lmc, 15);
             }
             tessellator.setLightmapCoord(lmc);
-        }else {
-            brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-            if(block.emission > 0) {
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            if (this.block.emission > 0) {
                 brightness = 1.0f;
             }
         }
@@ -48,26 +50,27 @@ public class BlockModelLeavesCacao<T extends BlockLogic> extends BlockModelLeave
         final float cNorthSouth = 0.8F;
         final float cEastWest = 0.6F;
         if (growthRate > 0) {
-            renderBlocks.overrideBlockTexture = growthStages[Math.min(growthRate - 1, BlockLogicLeavesCacao.MAX_GROWTH_STATE - 1)];
+            renderBlocks.overrideBlockTexture = this.growthStages[Math.min(growthRate - 1, BlockLogicLeavesCacao.MAX_GROWTH_STATE - 1)];
             tessellator.setColorOpaque_F(cNorthSouth * brightness, cNorthSouth * brightness, cNorthSouth * brightness);
-            renderBlocks.renderNorthFace(tessellator, bounds, x, y, z, renderBlocks.overrideBlockTexture);
-            renderBlocks.renderSouthFace(tessellator, bounds, x, y, z, renderBlocks.overrideBlockTexture);
+            renderBlocks.renderNorthFace(tessellator, bounds, tilePos, renderBlocks.overrideBlockTexture);
+            renderBlocks.renderSouthFace(tessellator, bounds, tilePos, renderBlocks.overrideBlockTexture);
             tessellator.setColorOpaque_F(cEastWest * brightness, cEastWest * brightness, cEastWest * brightness);
-            renderBlocks.renderEastFace(tessellator, bounds, x, y, z, renderBlocks.overrideBlockTexture);
-            renderBlocks.renderWestFace(tessellator, bounds, x, y, z, renderBlocks.overrideBlockTexture);
+            renderBlocks.renderEastFace(tessellator, bounds, tilePos, renderBlocks.overrideBlockTexture);
+            renderBlocks.renderWestFace(tessellator, bounds, tilePos, renderBlocks.overrideBlockTexture);
             renderBlocks.overrideBlockTexture = null;
         }
 
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         super.renderStandalone(tessellator, metadata, brightness, alpha, lightmapCoordinate);
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
-        AABB bounds = block.getBounds();
+        AABBdc bounds = this.block.getBounds();
 
-        final IconCoordinate cacaoCoord = growthStages[BlockLogicLeavesCacao.MAX_GROWTH_STATE - 1];
+        final IconCoordinate cacaoCoord = this.growthStages[BlockLogicLeavesCacao.MAX_GROWTH_STATE - 1];
         GL11.glColor4f(brightness, brightness, brightness, alpha);
 
         tessellator.startDrawingQuads();
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCherryFlowering.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCherryFlowering.java
index b832795d9..8b0bbdaa1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCherryFlowering.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLeavesCherryFlowering.java
@@ -6,43 +6,46 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicLeavesCherryFlowering;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelLeavesCherryFlowering<T extends BlockLogic> extends BlockModelLeaves<T> {
     private final IconCoordinate grownCherryOverlay = TextureRegistry.getTexture("minecraft:block/leaves/cherry_overlay");
     private final IconCoordinate floweringCherryOverlay = TextureRegistry.getTexture("minecraft:block/leaves/cherry_flowering_overlay");
+
     public BlockModelLeavesCherryFlowering(Block<T> block) {
         super(block, "minecraft:block/leaves/cherry");
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        super.render(tessellator, worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        super.render(tessellator, worldSource, tilePos);
 
-        int growthRate = BlockLogicLeavesCherryFlowering.getGrowthRate(worldSource.getBlockMetadata(x, y, z));
-        if(growthRate > 0) {
-            renderBlocks.overrideBlockTexture = grownCherryOverlay;
+        int growthRate = BlockLogicLeavesCherryFlowering.getGrowthRate(worldSource.getBlockData(tilePos));
+        if (growthRate > 0) {
+            renderBlocks.overrideBlockTexture = this.grownCherryOverlay;
         } else {
-            renderBlocks.overrideBlockTexture = floweringCherryOverlay;
+            renderBlocks.overrideBlockTexture = this.floweringCherryOverlay;
         }
 
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBoundsRaw(), x, y, z, 1.0f, 1.0f, 1.0f);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsRaw(), tilePos, 1.0f, 1.0f, 1.0f);
         renderBlocks.overrideBlockTexture = null;
 
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         super.renderStandalone(tessellator, metadata, brightness, alpha, lightmapCoordinate);
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
-        AABB bounds = block.getBoundsRaw();
+        AABBdc bounds = this.block.getBoundsRaw();
 
-        IconCoordinate cherryCoord = grownCherryOverlay;
+        IconCoordinate cherryCoord = this.grownCherryOverlay;
         GL11.glColor4f(brightness, brightness, brightness, alpha);
 
         tessellator.startDrawingQuads();
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLever.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLever.java
index f98e5308b..b5aef22a4 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLever.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelLever.java
@@ -9,11 +9,11 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicLever;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
-import org.useless.dragonfly.DisplayPos;
+import org.joml.Vector3d;
+import org.joml.primitives.AABBd;
 
 public class BlockModelLever<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelLever(Block<T> block) {
@@ -21,193 +21,165 @@ public class BlockModelLever<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int l = worldSource.getBlockMetadata(x, y, z);
-        int i1 = l & 15;
-        boolean flag = (l & 16) > 0;
-        boolean flag1 = renderBlocks.overrideBlockTexture != null;
-        if(!flag1)
-        {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int data = worldSource.getBlockData(tilePos);
+        int rotation = data & BlockLogicLever.MASK_ROTATION;
+        boolean powered = (data & BlockLogicLever.MASK_POWERED) != 0;
+        boolean overrideTexture = renderBlocks.overrideBlockTexture != null;
+        if (!overrideTexture) {
             renderBlocks.overrideBlockTexture = TextureRegistry.getTexture("minecraft:block/cobbled_stone");
         }
         float f = 0.25F;
         float f1 = 0.1875F;
         float f2 = 0.1875F;
-        AABB bounds = block.getBounds();
-        switch (i1) {
+        AABBd bounds = new AABBd(this.block.getBounds());
+        switch (rotation) {
             case BlockLogicLever.ROTATION_BOTTOM_NS:
-                bounds.set(0.5F - f1, 1f - f2, 0.5F - f, 0.5F + f1, 1f, 0.5F + f);
+                bounds.setMin(0.5F - f1, 1f - f2, 0.5F - f).setMax(0.5F + f1, 1f, 0.5F + f);
                 break;
             case BlockLogicLever.ROTATION_BOTTOM_WE:
-                bounds.set(0.5F - f, 1f - f2, 0.5F - f1, 0.5F + f, 1f, 0.5F + f1);
+                bounds.setMin(0.5F - f, 1f - f2, 0.5F - f1).setMax(0.5F + f, 1f, 0.5F + f1);
                 break;
             case BlockLogicLever.ROTATION_TOP_NS:
-                bounds.set(0.5F - f1, 0.0F, 0.5F - f, 0.5F + f1, f2, 0.5F + f);
+                bounds.setMin(0.5F - f1, 0.0F, 0.5F - f).setMax(0.5F + f1, f2, 0.5F + f);
                 break;
             case BlockLogicLever.ROTATION_TOP_WE:
-                bounds.set(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, f2, 0.5F + f1);
+                bounds.setMin(0.5F - f, 0.0F, 0.5F - f1).setMax(0.5F + f, f2, 0.5F + f1);
                 break;
             case BlockLogicLever.ROTATION_NORTH:
-                bounds.set(0.5F - f1, 0.5F - f, 1.0F - f2, 0.5F + f1, 0.5F + f, 1.0F);
+                bounds.setMin(0.5F - f1, 0.5F - f, 1.0F - f2).setMax(0.5F + f1, 0.5F + f, 1.0F);
                 break;
             case BlockLogicLever.ROTATION_SOUTH:
-                bounds.set(0.5F - f1, 0.5F - f, 0.0F, 0.5F + f1, 0.5F + f, f2);
+                bounds.setMin(0.5F - f1, 0.5F - f, 0.0F).setMax(0.5F + f1, 0.5F + f, f2);
                 break;
             case BlockLogicLever.ROTATION_WEST:
-                bounds.set(1.0F - f2, 0.5F - f, 0.5F - f1, 1.0F, 0.5F + f, 0.5F + f1);
+                bounds.setMin(1.0F - f2, 0.5F - f, 0.5F - f1).setMax(1.0F, 0.5F + f, 0.5F + f1);
                 break;
             case BlockLogicLever.ROTATION_EAST:
-                bounds.set(0.0F, 0.5F - f, 0.5F - f1, f2, 0.5F + f, 0.5F + f1);
+                bounds.setMin(0.0F, 0.5F - f, 0.5F - f1).setMax(f2, 0.5F + f, 0.5F + f1);
                 break;
         }
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        if(!flag1)
-        {
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        if (!overrideTexture) {
             renderBlocks.overrideBlockTexture = null;
         }
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-			if(block.emission > 0) {
-				brightness = 1.0f;
-			}else {
-				brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-			}
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            if (this.block.emission <= 0) {
+                brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            }
         }
-        
+
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
-        IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.BOTTOM, l);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.BOTTOM, data);
+        if (renderBlocks.overrideBlockTexture != null) {
             texture = renderBlocks.overrideBlockTexture;
         }
         double f4 = texture.getIconUMin();
         double f5 = texture.getIconUMax();
         double f6 = texture.getIconVMin();
         double f7 = texture.getIconVMax();
-        Vec3[] avec3 = new Vec3[8];
+        Vector3d[] renderVecs = new Vector3d[8];
         float f8 = 0.0625F;
         float f9 = 0.0625F;
         float f10 = 0.625F;
-        avec3[0] = Vec3.fromPool(-f8, 0.0D, -f9);
-        avec3[1] = Vec3.fromPool(f8, 0.0D, -f9);
-        avec3[2] = Vec3.fromPool(f8, 0.0D, f9);
-        avec3[3] = Vec3.fromPool(-f8, 0.0D, f9);
-        avec3[4] = Vec3.fromPool(-f8, f10, -f9);
-        avec3[5] = Vec3.fromPool(f8, f10, -f9);
-        avec3[6] = Vec3.fromPool(f8, f10, f9);
-        avec3[7] = Vec3.fromPool(-f8, f10, f9);
-        for(int i2 = 0; i2 < 8; i2++)
-        {
-            if(flag)
-            {
-                avec3[i2].z -= 0.0625D;
-                avec3[i2].rotateAroundX(0.6981317F);
-            } else
-            {
-                avec3[i2].z += 0.0625D;
-                avec3[i2].rotateAroundX(-0.6981317F);
+        renderVecs[0] = new Vector3d(-f8, 0.0D, -f9);
+        renderVecs[1] = new Vector3d(f8, 0.0D, -f9);
+        renderVecs[2] = new Vector3d(f8, 0.0D, f9);
+        renderVecs[3] = new Vector3d(-f8, 0.0D, f9);
+        renderVecs[4] = new Vector3d(-f8, f10, -f9);
+        renderVecs[5] = new Vector3d(f8, f10, -f9);
+        renderVecs[6] = new Vector3d(f8, f10, f9);
+        renderVecs[7] = new Vector3d(-f8, f10, f9);
+        for (int i2 = 0; i2 < 8; i2++) {
+            if (powered) {
+                renderVecs[i2].z -= 0.0625D;
+                renderVecs[i2].rotateX(0.6981317F);
+            } else {
+                renderVecs[i2].z += 0.0625D;
+                renderVecs[i2].rotateX(-0.6981317F);
             }
-            if(i1 == 6 || i1 == 8)
-            {
-                avec3[i2].rotateAroundY(MathHelper.PI/2f);
+            if (rotation == 6 || rotation == 8) {
+                renderVecs[i2].rotateY(MathHelper.PI / 2f);
             }
-            if(i1 < 5)
-            {
-                avec3[i2].y -= 0.375D;
-                avec3[i2].rotateAroundX(MathHelper.PI/2f);
-                if(i1 == 4)
-                {
-                    avec3[i2].rotateAroundY(0.0F);
+            if (rotation < 5) {
+                renderVecs[i2].y -= 0.375D;
+                renderVecs[i2].rotateX(MathHelper.PI / 2f);
+                if (rotation == 4) {
+                    renderVecs[i2].rotateY(0.0F);
                 }
-                if(i1 == 3)
-                {
-                    avec3[i2].rotateAroundY(MathHelper.PI);
+                if (rotation == 3) {
+                    renderVecs[i2].rotateY(MathHelper.PI);
                 }
-                if(i1 == 2)
-                {
-                    avec3[i2].rotateAroundY(MathHelper.PI/2f);
+                if (rotation == 2) {
+                    renderVecs[i2].rotateY(MathHelper.PI / 2f);
                 }
-                if(i1 == 1)
-                {
-                    avec3[i2].rotateAroundY(-MathHelper.PI/2f);
+                if (rotation == 1) {
+                    renderVecs[i2].rotateY(-MathHelper.PI / 2f);
                 }
-                avec3[i2].x += (double)x + 0.5D;
-                avec3[i2].y += (float)y + 0.5F;
-                avec3[i2].z += (double)z + 0.5D;
-            } else if (i1 == 5 || i1 == 6)
-            {
-                avec3[i2].x += (double)x + 0.5D;
-                avec3[i2].y += (float)y + 0.125F;
-                avec3[i2].z += (double)z + 0.5D;
+                renderVecs[i2].x += (double) tilePos.x() + 0.5D;
+                renderVecs[i2].y += (float) tilePos.y() + 0.5F;
+                renderVecs[i2].z += (double) tilePos.z() + 0.5D;
+            } else if (rotation == 5 || rotation == 6) {
+                renderVecs[i2].x += (double) tilePos.x() + 0.5D;
+                renderVecs[i2].y += (float) tilePos.y() + 0.125F;
+                renderVecs[i2].z += (double) tilePos.z() + 0.5D;
             } else {
-                avec3[i2].rotateAroundX(MathHelper.PI);
-                avec3[i2].x += (double)x + 0.5D;
-                avec3[i2].y += (float)(y + 1) - 0.125F;
-                avec3[i2].z += (double)z + 0.5D;
+                renderVecs[i2].rotateX(MathHelper.PI);
+                renderVecs[i2].x += (double) tilePos.x() + 0.5D;
+                renderVecs[i2].y += (float) (tilePos.y() + 1) - 0.125D;
+                renderVecs[i2].z += (double) tilePos.z() + 0.5D;
             }
         }
 
-        Vec3 vec3;
-        Vec3 vec31;
-        Vec3 vec32;
-        Vec3 vec3d3;
-        for(int j2 = 0; j2 < 6; j2++)
-        {
-            if(j2 == 0)
-            {
+        Vector3d vec3;
+        Vector3d vec31;
+        Vector3d vec32;
+        Vector3d vec3d3;
+        for (int j2 = 0; j2 < 6; j2++) {
+            if (j2 == 0) {
                 f4 = texture.getSubIconU(0.4375);
                 f5 = texture.getSubIconU(0.5625);
                 f6 = texture.getSubIconV(0.375);
                 f7 = texture.getSubIconV(0.5);
-            } else
-            if(j2 == 2)
-            {
+            } else if (j2 == 2) {
                 f4 = texture.getSubIconU(0.4375);
                 f5 = texture.getSubIconU(0.5625);
                 f6 = texture.getSubIconV(0.375);
                 f7 = texture.getIconVMax();
             }
-            if(j2 == 0)
-            {
-                vec3 = avec3[0];
-                vec31 = avec3[1];
-                vec32 = avec3[2];
-                vec3d3 = avec3[3];
-            } else
-            if(j2 == 1)
-            {
-                vec3 = avec3[7];
-                vec31 = avec3[6];
-                vec32 = avec3[5];
-                vec3d3 = avec3[4];
-            } else
-            if(j2 == 2)
-            {
-                vec3 = avec3[1];
-                vec31 = avec3[0];
-                vec32 = avec3[4];
-                vec3d3 = avec3[5];
-            } else
-            if(j2 == 3)
-            {
-                vec3 = avec3[2];
-                vec31 = avec3[1];
-                vec32 = avec3[5];
-                vec3d3 = avec3[6];
-            } else
-            if(j2 == 4)
-            {
-                vec3 = avec3[3];
-                vec31 = avec3[2];
-                vec32 = avec3[6];
-                vec3d3 = avec3[7];
+            if (j2 == 0) {
+                vec3 = renderVecs[0];
+                vec31 = renderVecs[1];
+                vec32 = renderVecs[2];
+                vec3d3 = renderVecs[3];
+            } else if (j2 == 1) {
+                vec3 = renderVecs[7];
+                vec31 = renderVecs[6];
+                vec32 = renderVecs[5];
+                vec3d3 = renderVecs[4];
+            } else if (j2 == 2) {
+                vec3 = renderVecs[1];
+                vec31 = renderVecs[0];
+                vec32 = renderVecs[4];
+                vec3d3 = renderVecs[5];
+            } else if (j2 == 3) {
+                vec3 = renderVecs[2];
+                vec31 = renderVecs[1];
+                vec32 = renderVecs[5];
+                vec3d3 = renderVecs[6];
+            } else if (j2 == 4) {
+                vec3 = renderVecs[3];
+                vec31 = renderVecs[2];
+                vec32 = renderVecs[6];
+                vec3d3 = renderVecs[7];
             } else {
-                vec3 = avec3[0];
-                vec31 = avec3[3];
-                vec32 = avec3[7];
-                vec3d3 = avec3[4];
+                vec3 = renderVecs[0];
+                vec31 = renderVecs[3];
+                vec32 = renderVecs[7];
+                vec3d3 = renderVecs[4];
             }
             tessellator.addVertexWithUV(vec3.x, vec3.y, vec3.z, f4, f7);
             tessellator.addVertexWithUV(vec31.x, vec31.y, vec31.z, f5, f7);
@@ -217,6 +189,7 @@ public class BlockModelLever<T extends BlockLogic> extends BlockModelStandard<T>
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelMatcher.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelMatcher.java
index f5da93dcc..2def7f40e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelMatcher.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelMatcher.java
@@ -7,6 +7,7 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
@@ -21,41 +22,41 @@ public class BlockModelMatcher<T extends BlockLogic> extends BlockModelAxisAlign
 
     public BlockModelMatcher(Block<T> block, boolean isPowered) {
         super(block);
-        frontVariants = new IconCoordinate[4];
-        frontOverlayVariants = new IconCoordinate[frontVariants.length];
-        for (int i = 0; i < frontVariants.length; i++) {
-            frontVariants[i] = TextureRegistry.getTexture("minecraft:block/matcher/front" + (isPowered ? "_active" : "") + i);
-            frontOverlayVariants[i] = TextureRegistry.getTexture("minecraft:block/matcher/front" + (isPowered ? "_active" : "") + "_overlay" + i);
+        this.frontVariants = new IconCoordinate[4];
+        this.frontOverlayVariants = new IconCoordinate[this.frontVariants.length];
+        for (int i = 0; i < this.frontVariants.length; i++) {
+            this.frontVariants[i] = TextureRegistry.getTexture("minecraft:block/matcher/front" + (isPowered ? "_active" : "") + i);
+            this.frontOverlayVariants[i] = TextureRegistry.getTexture("minecraft:block/matcher/front" + (isPowered ? "_active" : "") + "_overlay" + i);
         }
 
-        for (Map.Entry<String, DisplayPos> e : displayPosMap.entrySet()) {
-            DisplayPos p = displayPosMap.get(e.getKey());
+        for (Map.Entry<String, DisplayPos> e : this.displayPosMap.entrySet()) {
+            DisplayPos p = this.displayPosMap.get(e.getKey());
             boolean flip = e.getKey().equals(DisplayPos.FIRST_PERSON_RIGHT_HAND) || e.getKey().equals(DisplayPos.THIRD_PERSON_RIGHT_HAND) || e.getKey().equals(DisplayPos.THIRD_PERSON_LEFT_HAND);
-            displayPosMap.put(e.getKey(), new DisplayPos(p.tx, p.ty, p.tz, p.rx, p.ry + (flip ? -90 : 90), p.rz, p.sx, p.sy, p.sz));
+            this.displayPosMap.put(e.getKey(), new DisplayPos(p.tx, p.ty, p.tz, p.rx, p.ry + (flip ? -90 : 90), p.rz, p.sx, p.sy, p.sz));
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side) {
-        Side rotated = getRotatedSide(side, blockAccess.getBlockMetadata(x, y, z));
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        Side rotated = getRotatedSide(side, source.getBlockData(tilePos));
         if (rotated.getAxis() == Axis.Y) {
-            random.setSeed(getPositionalSeed(x, y, z));
-            return frontVariants[random.nextInt(frontVariants.length)];
+            this.random.setSeed(getPositionalSeed(tilePos));
+            return this.frontVariants[this.random.nextInt(this.frontVariants.length)];
         }
-        return super.getBlockTexture(blockAccess, x, y, z, side);
+        return super.getBlockTexture(source, tilePos, side);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTexture(WorldSource blockAccess, int x, int y, int z, @NotNull Side side) {
-        Side rotated = getRotatedSide(side, blockAccess.getBlockMetadata(x, y, z));
+    public @Nullable IconCoordinate getBlockOverbrightTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        Side rotated = getRotatedSide(side, source.getBlockData(tilePos));
         if (rotated.getAxis() == Axis.Y) {
-            random.setSeed(getPositionalSeed(x, y, z));
-            return frontOverlayVariants[random.nextInt(frontVariants.length)];
+            this.random.setSeed(getPositionalSeed(tilePos));
+            return this.frontOverlayVariants[this.random.nextInt(this.frontVariants.length)];
         }
-        return super.getBlockOverbrightTexture(blockAccess, x, y, z, side);
+        return super.getBlockOverbrightTexture(source, tilePos, side);
     }
 
-    public long getPositionalSeed(int x, int y, int z) {
-        return x * 374761393 + y * 668265263 + z * 968290493;
+    public long getPositionalSeed(@NotNull TilePosc tilePos) {
+        return tilePos.x() * 374761393L + tilePos.y() * 668265263L + tilePos.z() * 968290493L;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelOverlayLeaves.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelOverlayLeaves.java
index f65c25dd4..476c3c5b5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelOverlayLeaves.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelOverlayLeaves.java
@@ -5,37 +5,40 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelOverlayLeaves<T extends BlockLogic> extends BlockModelLeaves<T> {
     protected final IconCoordinate overlayTexture;
+
     public BlockModelOverlayLeaves(Block<T> block, String leavesTex, String overlayTex) {
         super(block, leavesTex);
-        overlayTexture = TextureRegistry.getTexture(overlayTex);
+        this.overlayTexture = TextureRegistry.getTexture(overlayTex);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        super.render(tessellator, worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        super.render(tessellator, worldSource, tilePos);
 
-        renderBlocks.overrideBlockTexture = overlayTexture;
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBoundsRaw(), x, y, z, 1.0f, 1.0f, 1.0f);
+        renderBlocks.overrideBlockTexture = this.overlayTexture;
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsRaw(), tilePos, 1.0f, 1.0f, 1.0f);
         renderBlocks.overrideBlockTexture = null;
 
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         super.renderStandalone(tessellator, metadata, brightness, alpha, lightmapCoordinate);
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
-        AABB bounds = block.getBounds();
+        AABBdc bounds = this.block.getBounds();
 
-        IconCoordinate overlayCoord = overlayTexture;
+        IconCoordinate overlayCoord = this.overlayTexture;
         GL11.glColor4f(brightness, brightness, brightness, alpha);
 
         tessellator.startDrawingQuads();
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPebbles.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPebbles.java
index 62b54ba2a..5b6112f5b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPebbles.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPebbles.java
@@ -9,42 +9,46 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelPebbles<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate[] pebbles = {
-            TextureRegistry.getTexture("minecraft:block/pebbles/0"),
-            TextureRegistry.getTexture("minecraft:block/pebbles/1"),
-            TextureRegistry.getTexture("minecraft:block/pebbles/2")
+        TextureRegistry.getTexture("minecraft:block/pebbles/0"),
+        TextureRegistry.getTexture("minecraft:block/pebbles/1"),
+        TextureRegistry.getTexture("minecraft:block/pebbles/2")
     };
+
     public BlockModelPebbles(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(LightmapHelper.max(block.getLightmapCoord(worldSource, x, y, z), block.getLightmapCoord(worldSource, x, y - 1, z)));
-        }else {
-        	brightness = Math.max(renderBlocks.getBlockBrightness(worldSource, x, y, z), renderBlocks.getBlockBrightness(worldSource, x, y - 1, z));
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(LightmapHelper.max(this.block.getLightmapCoord(worldSource, tilePos), this.block.getLightmapCoord(worldSource, tilePos.down(new TilePos()))));
+        } else {
+            brightness = Math.max(renderBlocks.getBlockBrightness(worldSource, tilePos), renderBlocks.getBlockBrightness(worldSource, tilePos.down(new TilePos())));
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         renderBlocks.renderTopFace(tessellator,
-            block.getBlockBoundsFromState(worldSource, x, y, z),
-            x, y, z,
-            getBlockTextureFromSideAndMetadata(Side.TOP, worldSource.getBlockMetadata(x, y, z)));
+            this.block.getBoundsFromState(worldSource, tilePos),
+            tilePos,
+            getBlockTextureFromSideAndMetadata(Side.TOP, worldSource.getBlockData(tilePos)));
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        return pebbles[MathHelper.clamp(data, 0, 2)];
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        return this.pebbles[MathHelper.clamp(data, 0, 2)];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiePumpkin.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiePumpkin.java
index c9dbad2b4..ad075a78b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiePumpkin.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiePumpkin.java
@@ -6,9 +6,11 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicEdible;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelPiePumpkin<T extends BlockLogicEdible> extends BlockModelStandard<T> {
     protected IconCoordinate sideTexture = TextureRegistry.getTexture("minecraft:block/pumpkin_pie/side");
@@ -22,15 +24,15 @@ public class BlockModelPiePumpkin<T extends BlockLogicEdible> extends BlockModel
         withCustomItemBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f);
     }
 
-    public void renderSliceSide(final Tessellator tessellator, final WorldSource worldSource, final AABB bounds, final int x, final int y, final int z, final Side side, final boolean overrideTex) {
-        if(overrideTex)
+    public void renderSliceSide(final @NotNull Tessellator tessellator, final @NotNull WorldSource worldSource, final @NotNull AABBdc bounds, @NotNull TilePosc tilePos, final @NotNull Side side, final boolean overrideTex) {
+        if (overrideTex)
             renderBlocks.overrideBlockTexture = this.insideTexture;
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, side, 0);
-        if(overrideTex)
+        renderBlocks.renderSide(tessellator, worldSource, this, bounds, tilePos, 1, 1, 1, side, 0);
+        if (overrideTex)
             renderBlocks.overrideBlockTexture = null;
     }
 
-    private void renderSlice(final Tessellator tessellator, final WorldSource worldSource, final AABB bounds, final int x, final int y, final int z, final int sliceX, final int sliceZ) {
+    private void renderSlice(final @NotNull Tessellator tessellator, final @NotNull WorldSource worldSource, final @NotNull AABBdc bounds, @NotNull TilePosc tilePos, final int sliceX, final int sliceZ) {
 
         final double onePix = 0.0625;
         final double sliceWidth = onePix * 8;
@@ -38,7 +40,7 @@ public class BlockModelPiePumpkin<T extends BlockLogicEdible> extends BlockModel
         final double xMin = 0.0F + (sliceWidth * sliceX);
         final double xMax = xMin + sliceWidth;
 
-        final double zMin =  0.0F + (sliceWidth * sliceZ);
+        final double zMin = 0.0F + (sliceWidth * sliceZ);
         final double zMax = zMin + sliceWidth;
         final double offsetXMin = sliceX == 0 ? onePix : 0;
         final double offsetXMax = sliceX == 1 ? onePix : 0;
@@ -47,34 +49,34 @@ public class BlockModelPiePumpkin<T extends BlockLogicEdible> extends BlockModel
 
         final boolean insideSouth = sliceZ == 0;
         final boolean insideNorth = sliceZ == 1;
-        final boolean insideEast = sliceX == 0 ;
+        final boolean insideEast = sliceX == 0;
         final boolean insideWest = sliceX == 1;
 
-        bounds.set(xMin + offsetXMin, 0.0F, zMin + offsetZMin, xMax - offsetXMax, 0.375F, zMax - offsetZMax);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.TOP, 0);
-        renderBlocks.renderSide(tessellator, worldSource, this, bounds, x, y, z, 1, 1, 1, Side.BOTTOM, 0);
-        renderSliceSide(tessellator, worldSource, bounds, x, y, z, Side.SOUTH, insideSouth);
-        renderSliceSide(tessellator, worldSource, bounds, x, y, z, Side.WEST, insideWest);
+        AABBdc newBounds = new AABBd(xMin + offsetXMin, 0.0F, zMin + offsetZMin, xMax - offsetXMax, 0.375F, zMax - offsetZMax);
+        renderBlocks.renderSide(tessellator, worldSource, this, newBounds, tilePos, 1, 1, 1, Side.TOP, 0);
+        renderBlocks.renderSide(tessellator, worldSource, this, newBounds, tilePos, 1, 1, 1, Side.BOTTOM, 0);
+        renderSliceSide(tessellator, worldSource, newBounds, tilePos, Side.SOUTH, insideSouth);
+        renderSliceSide(tessellator, worldSource, newBounds, tilePos, Side.WEST, insideWest);
         renderBlocks.flipTexture = true;
-        renderSliceSide(tessellator, worldSource, bounds, x, y, z, Side.NORTH, insideNorth);
-        renderSliceSide(tessellator, worldSource, bounds, x, y, z, Side.EAST, insideEast);
+        renderSliceSide(tessellator, worldSource, newBounds, tilePos, Side.NORTH, insideNorth);
+        renderSliceSide(tessellator, worldSource, newBounds, tilePos, Side.EAST, insideEast);
         renderBlocks.flipTexture = false;
     }
 
     @Override
-    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, final int x, final int y, final int z) {
-        final AABB bounds = this.block.getBlockBoundsFromState(worldSource, x, y, z);
+    public boolean render(@NotNull final Tessellator tessellator, @NotNull final WorldSource worldSource, @NotNull TilePosc tilePos) {
+        final AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
 
-        final int meta = worldSource.getBlockMetadata(x, y, z);
+        final int meta = worldSource.getBlockData(tilePos);
         renderBlocks.enableAO = true;
-        renderBlocks.cache.setupCache(this.block, worldSource, x, y, z);
+        renderBlocks.cache.setupCache(this.block, worldSource, tilePos);
         int slices = 0;
-        for(int xSlice = 0; xSlice < 2; xSlice++){
-            for(int zSlice = 0; zSlice < 2; zSlice++) {
+        for (int xSlice = 0; xSlice < 2; xSlice++) {
+            for (int zSlice = 0; zSlice < 2; zSlice++) {
                 slices++;
-                if(meta >= slices)
+                if (meta >= slices)
                     continue;
-                renderSlice(tessellator, worldSource, bounds, x, y, z, xSlice, zSlice);
+                renderSlice(tessellator, worldSource, bounds, tilePos, xSlice, zSlice);
             }
         }
 
@@ -83,5 +85,4 @@ public class BlockModelPiePumpkin<T extends BlockLogicEdible> extends BlockModel
     }
 
 
-
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiston.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiston.java
index db51b879d..58838765d 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiston.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPiston.java
@@ -7,78 +7,82 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.piston.BlockLogicPistonBase;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelPiston<T extends BlockLogicPistonBase> extends BlockModelStandard<T> {
-    private final IconCoordinate faceTexture;
-    protected IconCoordinate sideTexture = TextureRegistry.getTexture("minecraft:block/piston/side");
-    protected IconCoordinate topTexture = TextureRegistry.getTexture("minecraft:block/piston/top");
-    protected IconCoordinate bottomTexture = TextureRegistry.getTexture("minecraft:block/piston/bottom");
+    private final @NotNull IconCoordinate faceTexture;
+    protected @NotNull IconCoordinate sideTexture = TextureRegistry.getTexture("minecraft:block/piston/side");
+    protected @NotNull IconCoordinate topTexture = TextureRegistry.getTexture("minecraft:block/piston/top");
+    protected @NotNull IconCoordinate bottomTexture = TextureRegistry.getTexture("minecraft:block/piston/bottom");
 
     protected final double headThickness;
-    public BlockModelPiston(Block<T> block, IconCoordinate faceTexture){
-        this(block, faceTexture, 4/16d);
+
+    public BlockModelPiston(Block<T> block, @NotNull IconCoordinate faceTexture) {
+        this(block, faceTexture, 4 / 16d);
     }
 
-    public BlockModelPiston(Block<T> block, IconCoordinate faceTexture, double headThickness){
+    public BlockModelPiston(Block<T> block, @NotNull IconCoordinate faceTexture, double headThickness) {
         super(block);
         this.headThickness = headThickness;
         this.faceTexture = faceTexture;
     }
 
-    public BlockModelPiston<T> setPistonTextures(IconCoordinate sideTexture, IconCoordinate topTexture, IconCoordinate bottomTexture) {
+    public BlockModelPiston<T> setPistonTextures(@NotNull IconCoordinate sideTexture, @NotNull IconCoordinate topTexture, @NotNull IconCoordinate bottomTexture) {
         this.sideTexture = sideTexture;
         this.topTexture = topTexture;
         this.bottomTexture = bottomTexture;
         return this;
     }
 
-    public BlockModelPiston<T> setPistonTextures(String sideTexture, String topTexture, String bottomTexture) {
+    public BlockModelPiston<T> setPistonTextures(@NotNull String sideTexture, @NotNull String topTexture, @NotNull String bottomTexture) {
         return setPistonTextures(TextureRegistry.getTexture(sideTexture), TextureRegistry.getTexture(topTexture), TextureRegistry.getTexture(bottomTexture));
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z){
-        return renderPistonBase(tessellator, worldSource, x, y, z, false);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        return renderPistonBase(tessellator, worldSource, tilePos, false);
     }
 
     private boolean headless = false;
-    public boolean renderHeadless(Tessellator tessellator, WorldSource worldSource, int x, int y, int z) {
+
+    public boolean renderHeadless(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePos tilePos) {
         renderBlocks.renderAllFaces = true;
-        headless = true;
-        boolean result = renderPistonBase(tessellator, worldSource, x, y, z, true);
-        headless = false;
+        this.headless = true;
+        boolean result = renderPistonBase(tessellator, worldSource, tilePos, true);
+        this.headless = false;
         renderBlocks.renderAllFaces = false;
         return result;
     }
-    protected boolean renderPistonBase(Tessellator tessellator, WorldSource worldSource, int x, int y, int z, boolean noCulling) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+
+    protected boolean renderPistonBase(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos, boolean noCulling) {
+        int meta = worldSource.getBlockData(tilePos);
         boolean extended = noCulling || (meta & 8) != 0;
         Direction direction = BlockLogicPistonBase.getDirection(meta);
-        AABB bounds;
-        if(extended)
-        {
-            switch(direction)
-            {
+        AABBdc bounds;
+        if (extended) {
+            switch (direction) {
                 case DOWN: // '\0'
                     renderBlocks.uvRotateEast = 3;
                     renderBlocks.uvRotateWest = 3;
                     renderBlocks.uvRotateSouth = 3;
                     renderBlocks.uvRotateNorth = 3;
-                    bounds = AABB.fromPool(0.0F, headThickness, 0.0F, 1.0F, 1.0F, 1.0F);
+                    bounds = new AABBd(0.0F, this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F);
                     break;
 
                 case UP: // '\001'
-                    bounds = AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1 - headThickness, 1.0F);
+                    bounds = new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1 - this.headThickness, 1.0F);
                     break;
 
                 case NORTH: // '\002'
                     renderBlocks.uvRotateSouth = 1;
                     renderBlocks.uvRotateNorth = 2;
-                    bounds = AABB.fromPool(0.0F, 0.0F, headThickness, 1.0F, 1.0F, 1.0F);
+                    bounds = new AABBd(0.0F, 0.0F, this.headThickness, 1.0F, 1.0F, 1.0F);
                     break;
 
                 case SOUTH: // '\003'
@@ -86,7 +90,7 @@ public class BlockModelPiston<T extends BlockLogicPistonBase> extends BlockModel
                     renderBlocks.uvRotateNorth = 1;
                     renderBlocks.uvRotateTop = 3;
                     renderBlocks.uvRotateBottom = 3;
-                    bounds = AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1 - headThickness);
+                    bounds = new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1 - this.headThickness);
                     break;
 
                 case WEST: // '\004'
@@ -94,7 +98,7 @@ public class BlockModelPiston<T extends BlockLogicPistonBase> extends BlockModel
                     renderBlocks.uvRotateWest = 2;
                     renderBlocks.uvRotateTop = 2;
                     renderBlocks.uvRotateBottom = 1;
-                    bounds = AABB.fromPool(headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+                    bounds = new AABBd(this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                     break;
 
                 case EAST: // '\005'
@@ -102,18 +106,16 @@ public class BlockModelPiston<T extends BlockLogicPistonBase> extends BlockModel
                     renderBlocks.uvRotateWest = 1;
                     renderBlocks.uvRotateTop = 1;
                     renderBlocks.uvRotateBottom = 2;
-                    bounds = AABB.fromPool(0.0F, 0.0F, 0.0F, 1 - headThickness, 1.0F, 1.0F);
+                    bounds = new AABBd(0.0F, 0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F);
                     break;
 
                 default:
-                    bounds = AABB.fromPool(0, 0, 0, 1, 1, 1);
+                    bounds = new AABBd(0, 0, 0, 1, 1, 1);
             }
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
             renderBlocks.resetRenderBlocks();
-        } else
-        {
-            switch(direction)
-            {
+        } else {
+            switch (direction) {
                 case DOWN: // '\0'
                     renderBlocks.uvRotateEast = 3;
                     renderBlocks.uvRotateWest = 3;
@@ -147,39 +149,34 @@ public class BlockModelPiston<T extends BlockLogicPistonBase> extends BlockModel
                     renderBlocks.uvRotateBottom = 2;
                     break;
             }
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBounds(), x, y, z);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBounds(), tilePos);
             renderBlocks.resetRenderBlocks();
         }
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         super.renderStandalone(tessellator, 1, brightness, alpha, lightmapCoordinate);
     }
-    public IconCoordinate getFaceTexture()
-    {
-        return faceTexture;
+
+    public @NotNull IconCoordinate getFaceTexture() {
+        return this.faceTexture;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         Direction direction = BlockLogicPistonBase.getDirection(data);
-        if (direction == Direction.NONE)
-        {
-            return blockTextures.get(Side.BOTTOM);
+        if (direction == Direction.NONE) {
+            return this.blockTextures.get(Side.BOTTOM);
         }
-        if (side.getDirection() == direction)
-        {
-            if (BlockLogicPistonBase.isPowered(data) || headless)
-            {
-                return topTexture;
-            }
-            else
-            {
-                return blockTextures.get(Side.BOTTOM);
+        if (side.getDirection() == direction) {
+            if (BlockLogicPistonBase.isPowered(data) || this.headless) {
+                return this.topTexture;
+            } else {
+                return this.blockTextures.get(Side.BOTTOM);
             }
         }
-        return side.getDirection() != direction.getOpposite() ? sideTexture : bottomTexture;
+        return side.getDirection() != direction.getOpposite() ? this.sideTexture : this.bottomTexture;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPistonHead.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPistonHead.java
index 598f5c9a9..29fa670d5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPistonHead.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPistonHead.java
@@ -9,10 +9,12 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.piston.BlockLogicPistonHead;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
 public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHead> {
     protected IconCoordinate pistonHead;
@@ -25,8 +27,9 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
 
     protected final double headThickness;
     protected final double shaftThickness;
+
     public BlockModelPistonHead(final Block<BlockLogicPistonHead> block, final IconCoordinate pistonHead, final IconCoordinate pistonShaft) {
-        this(block, pistonHead, pistonShaft, 4/16d, 4/16d);
+        this(block, pistonHead, pistonShaft, 4 / 16d, 4 / 16d);
     }
 
     public BlockModelPistonHead(final Block<BlockLogicPistonHead> block, final IconCoordinate pistonHead, final IconCoordinate pistonShaft, final double headThickness, final double shaftThickness) {
@@ -38,58 +41,65 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        return renderPistonHead(tessellator, worldSource, block, x, y, z, true);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        return renderPistonHead(tessellator, worldSource, this.block, tilePos, true);
     }
-    public void renderPistonHeadNoCulling(Tessellator tessellator, WorldSource worldSource, Block<BlockLogicPistonHead> block, int x, int y, int z, boolean flag) {
+
+    public void renderPistonHeadNoCulling(Tessellator tessellator, WorldSource worldSource, Block<BlockLogicPistonHead> block, @NotNull TilePos tilePos, boolean flag) {
         renderBlocks.renderAllFaces = true;
-        renderPistonHead(tessellator, worldSource, block, x, y, z, flag);
+        renderPistonHead(tessellator, worldSource, block, tilePos, flag);
         renderBlocks.renderAllFaces = false;
     }
-    public void setFaceTextureOverride(@Nullable final IconCoordinate faceTexture){
+
+    public void setFaceTextureOverride(@Nullable final IconCoordinate faceTexture) {
         this.faceTextureOverride = faceTexture;
     }
-    protected boolean renderPistonHead(Tessellator tessellator, WorldSource worldSource, Block<BlockLogicPistonHead> block, int x, int y, int z, boolean flag) {
-        int metadata = worldSource.getBlockMetadata(x, y, z);
+
+    protected boolean renderPistonHead(Tessellator tessellator, WorldSource worldSource, Block<BlockLogicPistonHead> block, @NotNull TilePosc tilePos, boolean flag) {
+        int metadata = worldSource.getBlockData(tilePos);
         Direction direction = BlockLogicPistonHead.getDirectionFromMeta(metadata);
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-        	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
         }
         final float f1 = flag ? 1.0F : 0.5F;
-        final double width = flag ? 1 : 1/2d;
-        switch(direction)
-        {
+        final double width = flag ? 1 : 1 / 2d;
+
+        final int x = tilePos.x();
+        final int y = tilePos.y();
+        final int z = tilePos.z();
+
+        switch (direction) {
             case DOWN: // BOTTOM
                 renderBlocks.uvRotateEast = 3;
                 renderBlocks.uvRotateWest = 3;
                 renderBlocks.uvRotateSouth = 3;
                 renderBlocks.uvRotateNorth = 3;
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F), x, y, z);
-                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 + this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.8F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 - this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.8F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.6F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.6F, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F), tilePos);
+                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 + this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.8F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 - this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.8F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.6F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + this.headThickness, y + this.headThickness + f1, z + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.6F, width);
                 break;
 
             case UP: // TOP
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F), x, y, z);
-                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 + this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.8F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 - this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.8F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.6F, width);
-                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.6F, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F), tilePos);
+                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 + this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.8F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 - this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.8F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.6F, width);
+                renderHeadTopBottom(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, ((y - this.headThickness) + 1.0F) - f1, (y - this.headThickness) + 1.0F, z + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.6F, width);
                 break;
 
             case NORTH: // NORTH
                 renderBlocks.uvRotateSouth = 1;
                 renderBlocks.uvRotateNorth = 2;
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness), x, y, z);
-                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.6F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.6F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.5F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + this.headThickness, z + this.headThickness + f1, brightness, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness), tilePos);
+                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.6F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.6F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + this.headThickness, z + this.headThickness + f1, brightness * 0.5F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + this.headThickness, z + this.headThickness + f1, brightness, width);
                 break;
 
             case SOUTH: // SOUTH
@@ -97,11 +107,11 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
                 renderBlocks.uvRotateNorth = 1;
                 renderBlocks.uvRotateTop = 3;
                 renderBlocks.uvRotateBottom = 3;
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F), x, y, z);
-                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.6F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.6F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness/2, x + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.5F, width);
-                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness/2, x + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F), tilePos);
+                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.6F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.6F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 - this.shaftThickness / 2, x + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness * 0.5F, width);
+                renderHeadNorthSouth(tessellator, x + 0.5 + this.shaftThickness / 2, x + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, ((z - this.headThickness) + 1.0F) - f1, (z - this.headThickness) + 1.0F, brightness, width);
                 break;
 
             case WEST: // WEST
@@ -109,11 +119,11 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
                 renderBlocks.uvRotateWest = 2;
                 renderBlocks.uvRotateTop = 2;
                 renderBlocks.uvRotateBottom = 1;
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F), x, y, z);
-                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 - this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.5F, width);
-                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 + this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness, width);
-                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.6F, width);
-                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.6F, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F), tilePos);
+                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 - this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.5F, width);
+                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 + this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness, width);
+                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.6F, width);
+                renderHeadEastWest(tessellator, x + this.headThickness, x + this.headThickness + f1, y + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.6F, width);
                 break;
 
             case EAST: // EAST
@@ -121,22 +131,22 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
                 renderBlocks.uvRotateWest = 1;
                 renderBlocks.uvRotateTop = 1;
                 renderBlocks.uvRotateBottom = 2;
-                renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F), x, y, z);
-                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 - this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.5F, width);
-                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 + this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness, width);
-                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 - this.shaftThickness/2, y + 0.5 + this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, z + 0.5 - this.shaftThickness/2, brightness * 0.6F, width);
-                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 + this.shaftThickness/2, y + 0.5 - this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, z + 0.5 + this.shaftThickness/2, brightness * 0.6F, width);
+                renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F), tilePos);
+                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 - this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.5F, width);
+                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 + this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness, width);
+                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 - this.shaftThickness / 2, y + 0.5 + this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, z + 0.5 - this.shaftThickness / 2, brightness * 0.6F, width);
+                renderHeadEastWest(tessellator, ((x - this.headThickness) + 1.0F) - f1, (x - this.headThickness) + 1.0F, y + 0.5 + this.shaftThickness / 2, y + 0.5 - this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, z + 0.5 + this.shaftThickness / 2, brightness * 0.6F, width);
                 break;
         }
         renderBlocks.resetRenderBlocks();
         return true;
     }
-    private void renderHeadTopBottom(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width)
-    {
+
+    private void renderHeadTopBottom(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width) {
         final IconCoordinate i = renderBlocks.overrideBlockTexture != null ? renderBlocks.overrideBlockTexture : this.pistonShaft;
-        final double uMin = i.getSubIconU(0.5 - this.shaftThickness/2);
+        final double uMin = i.getSubIconU(0.5 - this.shaftThickness / 2);
         final double vMin = i.getIconVMin();
-        final double uMax = i.getSubIconU(0.5 + this.shaftThickness/2);
+        final double uMax = i.getSubIconU(0.5 + this.shaftThickness / 2);
         final double vMax = i.getSubIconV(width);
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         tessellator.addVertexWithUV(xMin, yMax, zMin, uMax, vMax);
@@ -145,12 +155,11 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
         tessellator.addVertexWithUV(xMax, yMax, zMax, uMin, vMax);
     }
 
-    private void renderHeadNorthSouth(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width)
-    {
+    private void renderHeadNorthSouth(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width) {
         final IconCoordinate i = renderBlocks.overrideBlockTexture != null ? renderBlocks.overrideBlockTexture : this.pistonShaft;
-        final double uMin = i.getSubIconU(0.5 - this.shaftThickness/2);
+        final double uMin = i.getSubIconU(0.5 - this.shaftThickness / 2);
         final double vMin = i.getIconVMin();
-        final double uMax = i.getSubIconU(0.5 + this.shaftThickness/2);
+        final double uMax = i.getSubIconU(0.5 + this.shaftThickness / 2);
         final double vMax = i.getSubIconV(width);
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         tessellator.addVertexWithUV(xMin, yMin, zMax, uMax, vMax);
@@ -159,12 +168,11 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
         tessellator.addVertexWithUV(xMax, yMax, zMax, uMin, vMax);
     }
 
-    private void renderHeadEastWest(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width)
-    {
+    private void renderHeadEastWest(final Tessellator tessellator, final double xMin, final double xMax, final double yMin, final double yMax, final double zMin, final double zMax, final float brightness, final double width) {
         final IconCoordinate i = renderBlocks.overrideBlockTexture != null ? renderBlocks.overrideBlockTexture : this.pistonShaft;
-        final double uMin = i.getSubIconU(0.5 - this.shaftThickness/2);
+        final double uMin = i.getSubIconU(0.5 - this.shaftThickness / 2);
         final double vMin = i.getIconVMin();
-        final double uMax = i.getSubIconU(0.5 + this.shaftThickness/2);
+        final double uMax = i.getSubIconU(0.5 + this.shaftThickness / 2);
         final double vMax = i.getSubIconV(width);
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         tessellator.addVertexWithUV(xMax, yMin, zMin, uMax, vMax);
@@ -172,18 +180,17 @@ public class BlockModelPistonHead extends BlockModelStandard<BlockLogicPistonHea
         tessellator.addVertexWithUV(xMin, yMax, zMax, uMin, vMin);
         tessellator.addVertexWithUV(xMax, yMax, zMax, uMin, vMax);
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         final Direction direction = BlockLogicPistonHead.getDirectionFromMeta(data);
-        if(side.getDirection() == direction)
-        {
-            if(this.faceTextureOverride != null)
-            {
+        if (side.getDirection() == direction) {
+            if (this.faceTextureOverride != null) {
                 return this.faceTextureOverride;
             }
             switch (BlockLogicPistonHead.getPistonType(data)) {
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPlanksPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPlanksPainted.java
index 0937562b6..98d876720 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPlanksPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPlanksPainted.java
@@ -6,13 +6,14 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelPlanksPainted<T extends BlockLogic> extends BlockModelStandard<T> {
     public static final IconCoordinate[] texCoords = new IconCoordinate[DyeColor.COLOR_AMOUNT];
 
     static {
-        for (DyeColor c : DyeColor.blockOrderedColors()){
+        for (DyeColor c : DyeColor.blockOrderedColors()) {
             texCoords[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/planks/" + c.colorID);
         }
     }
@@ -22,7 +23,7 @@ public class BlockModelPlanksPainted<T extends BlockLogic> extends BlockModelSta
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
         return texCoords[meta & DyeColor.MASK_COLOR];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPortal.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPortal.java
index 04576c568..2685af80c 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPortal.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPortal.java
@@ -6,33 +6,34 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicPortal;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelPortal<T extends BlockLogicPortal> extends BlockModelTransparent<T> {
     protected IconCoordinate[] colors = new IconCoordinate[16];
+
     public BlockModelPortal(Block<T> block, String rootTexKey) {
         super(block, false);
         for (DyeColor color : DyeColor.values()) {
-            colors[color.blockMeta] = TextureRegistry.getTexture(rootTexKey + color.colorID);
+            this.colors[color.blockMeta] = TextureRegistry.getTexture(rootTexKey + color.colorID);
         }
         onRenderLayer(1);
     }
+
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        if(blockAccess.getBlockId(x, y, z) == block.id())
-        {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (source.getBlockId(tilePos) == this.block.id()) {
             return false;
         }
-        return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+        return super.shouldSideBeRendered(source, bounds, tilePos, side);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
-        return colors[block.getLogic().fromMetadata(data).blockMeta];
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        return this.colors[this.block.getLogic().fromMetadata(data).blockMeta];
     }
 
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPressurePlatePainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPressurePlatePainted.java
index 7f08fa84c..d58283d25 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPressurePlatePainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPressurePlatePainted.java
@@ -6,19 +6,21 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelPressurePlatePainted<T extends BlockLogic> extends BlockModelStandard<T> {
     protected final IconCoordinate[] texCoords = new IconCoordinate[DyeColor.COLOR_AMOUNT];
+
     public BlockModelPressurePlatePainted(final Block<T> block) {
         super(block);
-        for (final DyeColor c : DyeColor.blockOrderedColors()){
+        for (final DyeColor c : DyeColor.blockOrderedColors()) {
             this.texCoords[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/planks/" + c.colorID);
         }
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(final Side side, final int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(final @NotNull Side side, final int meta) {
         return this.texCoords[(meta >> 4) & DyeColor.MASK_COLOR];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPumice.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPumice.java
index 360b391c6..7edf9ef17 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPumice.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelPumice.java
@@ -9,75 +9,77 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelPumice<T extends BlockLogic> extends BlockModelStandard<T> {
     private boolean lavaFlag = false;
+
     public BlockModelPumice(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        lavaFlag = true;
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        this.lavaFlag = true;
         boolean ob = renderBlocks.overbright;
         renderBlocks.overbright = true;
 //        block.setBlockBounds(0.005, 0.005, 0.005, 0.995, 0.995, 0.995);
-        boolean rendered = super.render(tessellator, worldSource, x, y, z);
+        boolean rendered = super.render(tessellator, worldSource, tilePos);
 
         renderBlocks.overbright = ob;
-        lavaFlag = false;
+        this.lavaFlag = false;
 //        block.setBlockBounds(0, 0, 0, 1, 1, 1);
-        rendered |= super.render(tessellator, worldSource, x, y, z);
+        rendered |= super.render(tessellator, worldSource, tilePos);
         return rendered;
     }
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(renderBlocks.useInventoryTint) {
-            int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
             float r = (float) (color >> 16 & 0xff) / 255F;
             float g = (float) (color >> 8 & 0xff) / 255F;
             float b = (float) (color & 0xff) / 255F;
             GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
-        }else {
+        } else {
             GL11.glColor4f(brightness, brightness, brightness, alpha);
         }
         float yOffset = 0.5F;
 
         GL11.glTranslatef(-0.5F, 0.0F - yOffset, -0.5F);
 
-        lavaFlag = true;
+        this.lavaFlag = true;
         boolean ob = renderBlocks.overbright;
         renderBlocks.overbright = true;
         final double depthFixOffset = 0.001d;
-        AABB bounds = AABB.fromPool(depthFixOffset, depthFixOffset, depthFixOffset, 1 - depthFixOffset, 1 - depthFixOffset, 1 - depthFixOffset);
+        AABBd bounds = new AABBd(depthFixOffset, depthFixOffset, depthFixOffset, 1 - depthFixOffset, 1 - depthFixOffset, 1 - depthFixOffset);
         renderBlockWithBounds(tessellator, bounds, metadata, brightness, alpha, LightmapHelper.getLightmapCoord(15, 15));
 
         renderBlocks.overbright = ob;
-        lavaFlag = false;
+        this.lavaFlag = false;
         if (LightmapHelper.isLightmapEnabled()) {
             lightmapCoordinate = Minecraft.getMinecraft().thePlayer.getLightmap(1f);
         }
-        bounds.set(0, 0, 0, 1, 1, 1);
+        bounds.setMin(0, 0, 0).setMax(1, 1, 1);
         renderBlockWithBounds(tessellator, bounds, metadata, brightness, alpha, lightmapCoordinate);
 
         GL11.glTranslatef(0.5F, yOffset, 0.5F);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
-        if (lavaFlag) return TextureRegistry.getTexture("minecraft:block/lava_still");
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (this.lavaFlag) return TextureRegistry.getTexture("minecraft:block/lava_still");
         return super.getBlockTextureFromSideAndMetadata(side, data);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data) {
-        if (lavaFlag) return TextureRegistry.getTexture("minecraft:block/lava_still");
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
+        if (this.lavaFlag) return TextureRegistry.getTexture("minecraft:block/lava_still");
         return super.getBlockOverbrightTextureFromSideAndMeta(side, data);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRail.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRail.java
index abbbf2c02..364a4033e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRail.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRail.java
@@ -11,7 +11,7 @@ import net.minecraft.core.block.logic.RailDirection;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -31,30 +31,31 @@ public class BlockModelRail<T extends BlockLogicRail> extends BlockModelStandard
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         IconCoordinate icon = getBlockTextureFromSideAndMetadata(Side.BOTTOM, meta);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             icon = renderBlocks.overrideBlockTexture;
         }
-        RailDirection railDirection = block.getLogic().getRailDirection(worldSource, new TilePos(x, y, z));
-		float brightness = 1.0f;
-		if(LightmapHelper.isLightmapEnabled()) {
-			if(renderBlocks.overbright) {
-				tessellator.setLightmapCoord(LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, x, y, z)));
-			}else {
-				tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-			}
-		}else {
-			if(!renderBlocks.overbright) {
-				brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-			}
-		}
-		if(renderBlocks.overbright) {
-			icon = getBlockOverbrightTexture(worldSource, x, y, z, Side.BOTTOM);
-		}
-        if(icon == null) { return false; }
+        RailDirection railDirection = this.block.getLogic().getRailDirection(worldSource, tilePos);
+        float brightness = 1.0f;
+        if (LightmapHelper.isLightmapEnabled()) {
+            if (renderBlocks.overbright) {
+                tessellator.setLightmapCoord(LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, tilePos)));
+            } else {
+                tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+            }
+        } else {
+            if (!renderBlocks.overbright) {
+                brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            }
+        }
+        if (renderBlocks.overbright) {
+            icon = getBlockOverbrightTexture(worldSource, tilePos, Side.BOTTOM);
+        }
+        if (icon == null) {
+            return false;
+        }
 
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         final double minU = icon.getIconUMin();
@@ -62,39 +63,39 @@ public class BlockModelRail<T extends BlockLogicRail> extends BlockModelStandard
         final double minV = icon.getIconVMin();
         final double maxV = icon.getIconVMax();
         final float yOffset = 1 / 16f; // Offset from the ground
-        float vX1 = x + 1;
-        float vX2 = x + 1;
-        float vX3 = x;
-        float vX4 = x;
-        float vZ1 = z;
-        float vZ2 = z + 1;
-        float vZ3 = z + 1;
-        float vZ4 = z;
-        float vY1 = (float)y + yOffset;
-        float vY2 = (float)y + yOffset;
-        float vY3 = (float)y + yOffset;
-        float vY4 = (float)y + yOffset;
+        float vX1 = tilePos.x() + 1;
+        float vX2 = tilePos.x() + 1;
+        float vX3 = tilePos.x();
+        float vX4 = tilePos.x();
+        float vZ1 = tilePos.z();
+        float vZ2 = tilePos.z() + 1;
+        float vZ3 = tilePos.z() + 1;
+        float vZ4 = tilePos.z();
+        float vY1 = (float) tilePos.y() + yOffset;
+        float vY2 = (float) tilePos.y() + yOffset;
+        float vY3 = (float) tilePos.y() + yOffset;
+        float vY4 = (float) tilePos.y() + yOffset;
         switch (railDirection) {
             case STRAIGHT_EW:
             case SLOPE_E:
             case SLOPE_W:
             case TURN_WS:
-                vX1 = vX4 = x + 1;
-                vX2 = vX3 = x;
-                vZ1 = vZ2 = z + 1;
-                vZ3 = vZ4 = z;
+                vX1 = vX4 = tilePos.x() + 1;
+                vX2 = vX3 = tilePos.x();
+                vZ1 = vZ2 = tilePos.z() + 1;
+                vZ3 = vZ4 = tilePos.z();
                 break;
             case TURN_WN:
-                vX1 = vX2 = x;
-                vX3 = vX4 = x + 1;
-                vZ1 = vZ4 = z + 1;
-                vZ2 = vZ3 = z;
+                vX1 = vX2 = tilePos.x();
+                vX3 = vX4 = tilePos.x() + 1;
+                vZ1 = vZ4 = tilePos.z() + 1;
+                vZ2 = vZ3 = tilePos.z();
                 break;
             case TURN_EN:
-                vX1 = vX4 = x;
-                vX2 = vX3 = x + 1;
-                vZ1 = vZ2 = z;
-                vZ3 = vZ4 = z + 1;
+                vX1 = vX4 = tilePos.x();
+                vX2 = vX3 = tilePos.x() + 1;
+                vZ1 = vZ2 = tilePos.z();
+                vZ3 = vZ4 = tilePos.z() + 1;
                 break;
         }
         switch (railDirection) {
@@ -120,27 +121,26 @@ public class BlockModelRail<T extends BlockLogicRail> extends BlockModelStandard
         tessellator.addVertexWithUV(vX1, vY1, vZ1, maxU, minV);
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTexture(WorldSource blockAccess, int x, int y, int z, @NotNull Side side)
-    {
-        if (!block.getLogic().isPowered || (blockAccess.getBlockMetadata(x, y, z) & BlockLogicRail.MASK_POWERED) == 0) return null;
+    public @Nullable IconCoordinate getBlockOverbrightTexture(@NotNull WorldSource blockAccess, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (!this.block.getLogic().isPowered || (blockAccess.getBlockData(tilePos) & BlockLogicRail.MASK_POWERED) == 0)
+            return null;
 
-        return block == Blocks.RAIL_POWERED ? powerActiveOverlay : detectorActiveOverlay;
+        return this.block == Blocks.RAIL_POWERED ? this.powerActiveOverlay : this.detectorActiveOverlay;
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if(block == Blocks.RAIL_POWERED && (data & BlockLogicRail.MASK_POWERED) != 0)
-        {
-            return powerActive;
-        } else if(!block.getLogic().isPowered && data >= 6)
-        {
-            return railCurve;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (this.block == Blocks.RAIL_POWERED && (data & BlockLogicRail.MASK_POWERED) != 0) {
+            return this.powerActive;
+        } else if (!this.block.getLogic().isPowered && data >= 6) {
+            return this.railCurve;
         }
         return super.getBlockTextureFromSideAndMetadata(side, data);
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
index 7eb2acc04..db6a31ca3 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
@@ -7,56 +7,56 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicRepeater;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelRepeater extends BlockModelStandard<BlockLogicRepeater> {
-	private static final BlockModelTorch<?> modelTorchActive = (BlockModelTorch<?>) BlockModelDispatcher.getInstance().getDispatch(Blocks.TORCH_REDSTONE_ACTIVE);
-    private static final BlockModelTorch<?> modelTorchIdle = (BlockModelTorch<?>) BlockModelDispatcher.getInstance().getDispatch(Blocks.TORCH_REDSTONE_IDLE);
+    private static final @NotNull BlockModelTorch<?> modelTorchActive = (BlockModelTorch<?>) BlockModelDispatcher.getInstance().getDispatch(Blocks.TORCH_REDSTONE_ACTIVE);
+    private static final @NotNull BlockModelTorch<?> modelTorchIdle = (BlockModelTorch<?>) BlockModelDispatcher.getInstance().getDispatch(Blocks.TORCH_REDSTONE_IDLE);
 
     public BlockModelRepeater(Block<BlockLogicRepeater> block) {
         super(block);
     }
 
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z){
-        int meta = worldSource.getBlockMetadata(x, y, z);
-        int i1 = meta & 3;
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
+        int direction = meta & BlockLogicRepeater.MASK_DIRECTION;
 
-        switch(i1)
-        {
-            case 0: // '\0'
+        switch (direction) {
+            case BlockLogicRepeater.DIRECTION_SOUTH:
                 renderBlocks.uvRotateTop = 0;
                 break;
 
-            case 2: // '\002'
+            case BlockLogicRepeater.DIRECTION_NORTH:
                 renderBlocks.uvRotateTop = 3;
                 break;
 
-            case 3: // '\003'
+            case BlockLogicRepeater.DIRECTION_EAST:
                 renderBlocks.uvRotateTop = 2;
                 break;
 
-            case 1: // '\001'
+            case BlockLogicRepeater.DIRECTION_WEST:
                 renderBlocks.uvRotateTop = 1;
                 break;
         }
 
         int j1 = (meta & 0xc) >> 2;
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
         renderBlocks.resetRenderBlocks();
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-        	int lmc = block.getLightmapCoord(worldSource, x, y, z);
-        	if(block.emission > 0) {
-        		lmc = LightmapHelper.setBlocklightValue(lmc, 15);
-        	}
-        	tessellator.setLightmapCoord(lmc);
-        }else {
-    		brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-    		if(block.emission > 0 || Global.accessor.isFullbrightEnabled()) {
-    			brightness = 1.0f;
-    		}
+        if (LightmapHelper.isLightmapEnabled()) {
+            int lmc = this.block.getLightmapCoord(worldSource, tilePos);
+            if (this.block.emission > 0) {
+                lmc = LightmapHelper.setBlocklightValue(lmc, 15);
+            }
+            tessellator.setLightmapCoord(lmc);
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            if (this.block.emission > 0 || Global.accessor.isFullbrightEnabled()) {
+                brightness = 1.0f;
+            }
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
         double d = -0.1875D;
@@ -64,46 +64,45 @@ public class BlockModelRepeater extends BlockModelStandard<BlockLogicRepeater> {
         double d2 = 0.0D;
         double d3 = 0.0D;
         double d4 = 0.0D;
-        switch(i1)
-        {
-            case 0: // '\0'
+        switch (direction) {
+            case BlockLogicRepeater.DIRECTION_SOUTH:
                 d4 = -0.3125D;
                 d2 = BlockLogicRepeater.torchPosOffset[j1];
                 break;
 
-            case 2: // '\002'
+            case BlockLogicRepeater.DIRECTION_NORTH:
                 d4 = 0.3125D;
                 d2 = -BlockLogicRepeater.torchPosOffset[j1];
                 break;
 
-            case 3: // '\003'
+            case BlockLogicRepeater.DIRECTION_EAST:
                 d3 = -0.3125D;
                 d1 = BlockLogicRepeater.torchPosOffset[j1];
                 break;
 
-            case 1: // '\001'
+            case BlockLogicRepeater.DIRECTION_WEST:
                 d3 = 0.3125D;
                 d1 = -BlockLogicRepeater.torchPosOffset[j1];
                 break;
         }
-        BlockModelTorch<?> modelTorch = block.getLogic().isRepeaterPowered ? modelTorchActive : modelTorchIdle;
-        if (renderBlocks.overbright && block.getLogic().isRepeaterPowered) {
-            modelTorch.renderTorchAtAngle(tessellator, (double)x + d1, (double)y + d, (double)z + d2, 0.0D, 0.0D);
-            modelTorch.renderTorchAtAngle(tessellator, (double)x + d3, (double)y + d, (double)z + d4, 0.0D, 0.0D);
+        BlockModelTorch<?> modelTorch = this.block.getLogic().isRepeaterPowered ? modelTorchActive : modelTorchIdle;
+        if (renderBlocks.overbright && this.block.getLogic().isRepeaterPowered) {
+            modelTorch.renderTorchAtAngle(tessellator, (double) tilePos.x() + d1, (double) tilePos.y() + d, (double) tilePos.z() + d2, 0.0D, 0.0D);
+            modelTorch.renderTorchAtAngle(tessellator, (double) tilePos.x() + d3, (double) tilePos.y() + d, (double) tilePos.z() + d4, 0.0D, 0.0D);
         } else if (!renderBlocks.overbright) {
-            modelTorch.renderTorchAtAngle(tessellator, (double)x + d1, (double)y + d, (double)z + d2, 0.0D, 0.0D);
-            modelTorch.renderTorchAtAngle(tessellator, (double)x + d3, (double)y + d, (double)z + d4, 0.0D, 0.0D);
+            modelTorch.renderTorchAtAngle(tessellator, (double) tilePos.x() + d1, (double) tilePos.y() + d, (double) tilePos.z() + d2, 0.0D, 0.0D);
+            modelTorch.renderTorchAtAngle(tessellator, (double) tilePos.x() + d3, (double) tilePos.y() + d, (double) tilePos.z() + d4, 0.0D, 0.0D);
         }
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
     }
 
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
         return true;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRope.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRope.java
index 83f489b63..4d5fea1bf 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRope.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRope.java
@@ -6,100 +6,95 @@ import net.minecraft.core.block.BlockLogicJarButterfly;
 import net.minecraft.core.block.BlockLogicLanternFirefly;
 import net.minecraft.core.block.BlockLogicRope;
 import net.minecraft.core.block.tag.BlockTags;
-import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 public class BlockModelRope<T extends BlockLogicRope>
-extends BlockModelStandard<T> {
+    extends BlockModelStandard<T> {
     public BlockModelRope(Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        WorldSource world = worldSource;
-        Block<?> below;
-        boolean hasFloor = (below = world.getBlock(x, y - 1, z)) != null && below.canPlaceOnSurface();
-        boolean hasBlockNegX = canConnect(world, x, y, z, Side.WEST);
-        boolean hasBlockPosX = canConnect(world, x, y, z, Side.EAST);
-        boolean hasBlockNegY = canConnect(world, x, y, z, Side.BOTTOM) || hasFloor;
-        boolean hasBlockPosY = canConnect(world, x, y, z, Side.TOP);
-        boolean hasBlockNegZ = canConnect(world, x, y, z, Side.NORTH);
-        boolean hasBlockPosZ = canConnect(world, x, y, z, Side.SOUTH);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        Block<?> below = worldSource.getBlock(tilePos.down(new TilePos()));
+        boolean hasFloor = below != null && below.canPlaceOnSurface();
+        boolean hasBlockNegX = canConnect(worldSource, tilePos, Direction.WEST);
+        boolean hasBlockPosX = canConnect(worldSource, tilePos, Direction.EAST);
+        boolean hasBlockNegY = canConnect(worldSource, tilePos, Direction.DOWN) || hasFloor;
+        boolean hasBlockPosY = canConnect(worldSource, tilePos, Direction.UP);
+        boolean hasBlockNegZ = canConnect(worldSource, tilePos, Direction.NORTH);
+        boolean hasBlockPosZ = canConnect(worldSource, tilePos, Direction.SOUTH);
 
 
-        boolean drawKnot =  !(hasBlockNegX && hasBlockPosX && !hasBlockNegY && !hasBlockPosY && !hasBlockNegZ && !hasBlockPosZ) &&
+        boolean drawKnot = !(hasBlockNegX && hasBlockPosX && !hasBlockNegY && !hasBlockPosY && !hasBlockNegZ && !hasBlockPosZ) &&
             !(!hasBlockNegX && !hasBlockPosX && hasBlockNegY && hasBlockPosY && !hasBlockNegZ && !hasBlockPosZ) &&
             !(!hasBlockNegX && !hasBlockPosX && !hasBlockNegY && !hasBlockPosY && hasBlockNegZ && hasBlockPosZ);
 
-        AABB bounds = AABB.fromPool(0, 0, 0, 1, 1, 1);
+        AABBd bounds = new AABBd(0, 0, 0, 1, 1, 1);
 
         final float ropeThickness = (1 / 16f);
         final float knotThickness = (2 / 16f);
         final float pileWidth = (3 / 16f);
 
-        if (drawKnot)
-        {
-            bounds.set(0.5f - knotThickness, 0.5f - knotThickness, 0.5f - knotThickness, 0.5f + knotThickness, 0.5f + knotThickness, 0.5f + knotThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (drawKnot) {
+            bounds.setMin(0.5f - knotThickness, 0.5f - knotThickness, 0.5f - knotThickness).setMax(0.5f + knotThickness, 0.5f + knotThickness, 0.5f + knotThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
 
-        if (hasBlockPosY)
-        {
-            bounds.set(0.5f - ropeThickness, 0.5f, 0.5f - ropeThickness, 0.5f + ropeThickness, 1, 0.5f + ropeThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockPosY) {
+            bounds.setMin(0.5f - ropeThickness, 0.5f, 0.5f - ropeThickness).setMax(0.5f + ropeThickness, 1, 0.5f + ropeThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasBlockNegY)
-        {
-            bounds.set(0.5f - ropeThickness, 0, 0.5f - ropeThickness, 0.5f + ropeThickness, 0.5f, 0.5f + ropeThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockNegY) {
+            bounds.setMin(0.5f - ropeThickness, 0, 0.5f - ropeThickness).setMax(0.5f + ropeThickness, 0.5f, 0.5f + ropeThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasBlockPosX)
-        {
-            bounds.set(0.5f, 0.5f - ropeThickness, 0.5f - ropeThickness, 1, 0.5f + ropeThickness, 0.5f + ropeThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockPosX) {
+            bounds.setMin(0.5f, 0.5f - ropeThickness, 0.5f - ropeThickness).setMax(1, 0.5f + ropeThickness, 0.5f + ropeThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasBlockNegX)
-        {
-            bounds.set(0, 0.5f - ropeThickness, 0.5f - ropeThickness, 0.5f, 0.5f + ropeThickness, 0.5f + ropeThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockNegX) {
+            bounds.setMin(0, 0.5f - ropeThickness, 0.5f - ropeThickness).setMax(0.5f, 0.5f + ropeThickness, 0.5f + ropeThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasBlockPosZ)
-        {
-            bounds.set(0.5f - ropeThickness, 0.5f - ropeThickness, 0.5f, 0.5f + ropeThickness, 0.5f + ropeThickness, 1);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockPosZ) {
+            bounds.setMin(0.5f - ropeThickness, 0.5f - ropeThickness, 0.5f).setMax(0.5f + ropeThickness, 0.5f + ropeThickness, 1);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasBlockNegZ)
-        {
-            bounds.set(0.5f - ropeThickness, 0.5f - ropeThickness, 0f, 0.5f + ropeThickness, 0.5f + ropeThickness, 0.5f);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasBlockNegZ) {
+            bounds.setMin(0.5f - ropeThickness, 0.5f - ropeThickness, 0f).setMax(0.5f + ropeThickness, 0.5f + ropeThickness, 0.5f);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
-        if (hasFloor){
-            bounds.set(0.5f - pileWidth, 0,0.5f - pileWidth, 0.5f + pileWidth, knotThickness, 0.5f + pileWidth);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5f - knotThickness, 0,0.5f - knotThickness, 0.5f + knotThickness, ropeThickness * 3, 0.5f + knotThickness);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        if (hasFloor) {
+            bounds.setMin(0.5f - pileWidth, 0, 0.5f - pileWidth).setMax(0.5f + pileWidth, knotThickness, 0.5f + pileWidth);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5f - knotThickness, 0, 0.5f - knotThickness).setMax(0.5f + knotThickness, ropeThickness * 3, 0.5f + knotThickness);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
 
         return true;
     }
-    private boolean canConnect(WorldSource worldSource, int x, int y, int z, Side side){
-        int blockX = x + side.getOffsetX();
-        int blockY = y + side.getOffsetY();
-        int blockZ = z + side.getOffsetZ();
-        Block<?> _block = worldSource.getBlock(blockX, blockY, blockZ);
-        if (side == Side.BOTTOM){ // TODO replace with a proper system for querying what block another block is "attached" to
-            if (Block.hasLogicClass(_block, BlockLogicLanternFirefly.class) && (worldSource.getBlockMetadata(blockX, blockY, blockZ) & 0b1) != 0){
+
+    private boolean canConnect(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos, @NotNull Direction direction) {
+        TilePos shiftedPos = tilePos.add(direction, new TilePos());
+        Block<?> _block = worldSource.getBlock(shiftedPos);
+        if (direction == Direction.DOWN) { // TODO replace with a proper system for querying what block another block is "attached" to
+            if (Block.hasLogicClass(_block, BlockLogicLanternFirefly.class) && (worldSource.getBlockData(shiftedPos) & 0b1) != 0) {
                 return true;
-            } else if (Block.hasLogicClass(_block, BlockLogicJarButterfly.class) && (worldSource.getBlockMetadata(blockX, blockY, blockZ) & 0b1) != 0) {
+            } else if (Block.hasLogicClass(_block, BlockLogicJarButterfly.class) && (worldSource.getBlockData(shiftedPos) & 0b1) != 0) {
                 return true;
             }
-        } else if (side == Side.TOP) {
-            if (worldSource.isBlockOpaqueCube(blockX, blockY, blockZ) || BlockTags.CAN_HANG_OFF.appliesTo(_block)) return true;
+        } else if (direction == Direction.UP) {
+            if (worldSource.isBlockOpaqueCube(shiftedPos) || BlockTags.CAN_HANG_OFF.appliesTo(_block))
+                return true;
         }
-        if ((worldSource.getBlockMetadata(x, y, z) & 0b1000_0000) != 0 && worldSource.isBlockOpaqueCube(blockX, blockY, blockZ)) return true;
-        return _block == block;
+        if ((worldSource.getBlockData(tilePos) & 0b1000_0000) != 0 && worldSource.isBlockOpaqueCube(shiftedPos))
+            return true;
+        return _block == this.block;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRotatable.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRotatable.java
index 78260b389..d73c9d3f5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRotatable.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelRotatable.java
@@ -5,6 +5,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelRotatable<T extends BlockLogic> extends BlockModelStandard<T> {
@@ -13,9 +14,8 @@ public class BlockModelRotatable<T extends BlockLogic> extends BlockModelStandar
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         int index = Sides.orientationLookUp[6 * data + side.getId()];
-        return blockTextures.get(Side.getSideById(index));
+        return this.blockTextures.get(Side.getSideById(index));
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSeat.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSeat.java
index 4155a8f1f..7ecdf85a9 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSeat.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSeat.java
@@ -4,9 +4,10 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 public class BlockModelSeat<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelSeat(Block<T> block) {
@@ -14,24 +15,25 @@ public class BlockModelSeat<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBd bounds = new AABBd(this.block.getBoundsFromState(worldSource, tilePos));
 
         renderBlocks.setRenderSide(Side.BOTTOM, false); // Set bottom face to not render
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // Render seat
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // Render seat
 
         // Set only the bottom face to render
         renderBlocks.renderBitMask = 0b111111;
         renderBlocks.setRenderSide(Side.BOTTOM, true);
         bounds.minY += 0.1875D; // Shift the bottom face up
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z); // Render Seat
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos); // Render Seat
 
         // Reset block values
         renderBlocks.renderBitMask = 0;
         return true;
     }
+
     @Override
-    public boolean shouldItemRender3d(){
+    public boolean shouldItemRender3d() {
         return false;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlab.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlab.java
index e8a6e1f00..78a09a529 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlab.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlab.java
@@ -5,33 +5,35 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicSlab;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelSlab<T extends BlockLogicSlab> extends BlockModelStandard<T> {
     protected BlockModelStandard<T> parentModel;
-    public BlockModelSlab(Block<T> block){
+
+    public BlockModelSlab(Block<T> block) {
         super(block);
-        parentModel = (BlockModelStandard<T>)BlockModelDispatcher.getInstance().getDispatch(this.block.getLogic().modelBlock);
-        blockTextures.copy(parentModel.blockTextures);
-        overbrightTextures.copy(parentModel.overbrightTextures);
-        retroBlockTextures.copy(parentModel.retroBlockTextures);
-        retroOverbrightTextures.copy(parentModel.retroOverbrightTextures);
+        this.parentModel = (BlockModelStandard<T>) BlockModelDispatcher.getInstance().getDispatch(this.block.getLogic().modelBlock);
+        this.blockTextures.copy(this.parentModel.blockTextures);
+        this.overbrightTextures.copy(this.parentModel.overbrightTextures);
+        this.retroBlockTextures.copy(this.parentModel.retroBlockTextures);
+        this.retroOverbrightTextures.copy(this.parentModel.retroOverbrightTextures);
         withCustomItemBounds(0, 0, 0, 1, 0.5d, 1);
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        return parentModel.getBlockTextureFromSideAndMetadata(side, block.getLogic().modelBlockMetadata);
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        return this.parentModel.getBlockTextureFromSideAndMetadata(side, this.block.getLogic().modelBlockMetadata);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return parentModel.getBlockTextureFromSideAndMetadata(side, block.getLogic().modelBlockMetadata);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return this.parentModel.getBlockTextureFromSideAndMetadata(side, this.block.getLogic().modelBlockMetadata);
     }
 
     @Override
     public int renderLayer() {
-        return parentModel.renderLayer();
+        return this.parentModel.renderLayer();
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabMarble.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabMarble.java
index b756ab8ae..031d08560 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabMarble.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabMarble.java
@@ -7,25 +7,26 @@ import net.minecraft.core.block.BlockLogicSlab;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelSlabMarble<T extends BlockLogicSlab> extends BlockModelSlab<T> {
     protected IconCoordinate slabSide = TextureRegistry.getTexture("minecraft:block/carved_marble");
+
     public BlockModelSlabMarble(Block<T> block) {
         super(block);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return getBlockTextureFromSideAndMetadata(side, blockAccess.getBlockMetadata(x, y, z));
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return getBlockTextureFromSideAndMetadata(side, source.getBlockData(tilePos));
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if(data != 1 && (side.getAxis() != Axis.Y))
-        {
-            return slabSide;
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (data != 1 && (side.getAxis() != Axis.Y)) {
+            return this.slabSide;
         }
         return super.getBlockTextureFromSideAndMetadata(side, data);
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabPainted.java
index 7fb6e7ce3..4a80401dd 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSlabPainted.java
@@ -5,6 +5,8 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicSlab;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelSlabPainted<T extends BlockLogicSlab> extends BlockModelSlab<T> {
@@ -13,14 +15,13 @@ public class BlockModelSlabPainted<T extends BlockLogicSlab> extends BlockModelS
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
         meta = meta >> 4;
         return BlockModelPlanksPainted.texCoords[meta & 0x0F];
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return getBlockTextureFromSideAndMetadata(side, blockAccess.getBlockMetadata(x, y, z));
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return getBlockTextureFromSideAndMetadata(side, source.getBlockData(tilePos));
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSpikes.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSpikes.java
index 9dd740c5a..060ab63f3 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSpikes.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelSpikes.java
@@ -7,10 +7,10 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicSpikes;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
-import org.useless.dragonfly.DisplayPos;
+import org.joml.primitives.AABBd;
 
 public class BlockModelSpikes<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelSpikes(Block<T> block) {
@@ -18,28 +18,32 @@ public class BlockModelSpikes<T extends BlockLogic> extends BlockModelStandard<T
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int metaData = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int metaData = worldSource.getBlockData(tilePos);
         IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.EAST, metaData);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             texture = renderBlocks.overrideBlockTexture;
         }
 
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.1875F, 1.0F), x, y, z);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.1875F, 1.0F), tilePos);
 
-        if(BlockLogicSpikes.isSpikesUp(metaData)) {
+        if (BlockLogicSpikes.isSpikesUp(metaData)) {
             float brightness = 1.0f;
-            if(LightmapHelper.isLightmapEnabled()) {
-            	tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-            }else {
-            	brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
+            if (LightmapHelper.isLightmapEnabled()) {
+                tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+            } else {
+                brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
             }
             tessellator.setColorOpaque_F(brightness, brightness, brightness);
             double uMin = texture.getIconUMin();
             double uMax = texture.getIconUMax();
             double vMin = texture.getIconVMin();
             double vMax = texture.getIconVMax();
+
+            final int x = tilePos.x();
+            final int y = tilePos.y();
+            final int z = tilePos.z();
+
             double d7 = (x + 0.5D) - 0.25D;
             double d8 = x + 0.5D + 0.25D;
             double d9 = (z + 0.5D) - 0.5D;
@@ -105,6 +109,7 @@ public class BlockModelSpikes<T extends BlockLogic> extends BlockModelStandard<T
         }
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairs.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairs.java
index 0503af27e..4d04daa49 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairs.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairs.java
@@ -6,25 +6,28 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicStairs;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.DisplayPos;
 
 public class BlockModelStairs<T extends BlockLogicStairs> extends BlockModelStandard<T> {
     protected static final DisplayPos STAIRS_GUI = new DisplayPos(0, 0, 0, 30, 135, 0, 0.625f, 0.625f, 0.625f);
     protected static final DisplayPos STAIRS_HEAD = new DisplayPos(0, 0, 0, 0, -90, 0, 1f, 1f, 1f);
-    protected static final DisplayPos STAIRS_THIRD_PERSON_LEFT_HAND = new DisplayPos(0, 2.5f/16f, 0, 75, -135, 0, 0.375f, 0.375f, 0.375f);
+    protected static final DisplayPos STAIRS_THIRD_PERSON_LEFT_HAND = new DisplayPos(0, 2.5f / 16f, 0, 75, -135, 0, 0.375f, 0.375f, 0.375f);
     protected BlockModelStandard<T> parentModel;
+
     public BlockModelStairs(Block<T> block) {
         super(block);
-        parentModel = (BlockModelStandard<T>)BlockModelDispatcher.getInstance().getDispatch(this.block.getLogic().modelBlock);
-        blockTextures.copy(parentModel.blockTextures);
-        overbrightTextures.copy(parentModel.overbrightTextures);
-        retroBlockTextures.copy(parentModel.retroBlockTextures);
-        retroOverbrightTextures.copy(parentModel.retroOverbrightTextures);
+        this.parentModel = (BlockModelStandard<T>) BlockModelDispatcher.getInstance().getDispatch(this.block.getLogic().modelBlock);
+        this.blockTextures.copy(this.parentModel.blockTextures);
+        this.overbrightTextures.copy(this.parentModel.overbrightTextures);
+        this.retroBlockTextures.copy(this.parentModel.retroBlockTextures);
+        this.retroOverbrightTextures.copy(this.parentModel.retroOverbrightTextures);
 
         setDisplayPos(DisplayPos.GUI, STAIRS_GUI);
         setDisplayPos(DisplayPos.HEAD, STAIRS_HEAD);
@@ -32,62 +35,54 @@ public class BlockModelStairs<T extends BlockLogicStairs> extends BlockModelStan
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
         int hRotation = meta & 0b0011;
         int vRotation = meta & 0b1000;
 
         float stepYOffset = vRotation > 0 ? 0.5f : 0.0f;
 
-        AABB bounds = AABB.fromPool(0, 0, 0, 1, 1, 1);
-
-        if(hRotation == 0)
-        {
-            bounds.set(0.0F, 0.0F + stepYOffset, 0.0F, 0.5F, 0.5F + stepYOffset, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        if(hRotation == 1)
-        {
-            bounds.set(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.5F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-        } else
-        if(hRotation == 2)
-        {
-            bounds.set(0.0F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 0.5F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+        AABBd bounds = new AABBd(0, 0, 0, 1, 1, 1);
+
+        if (hRotation == 0) {
+            bounds.setMin(0.0F, 0.0F + stepYOffset, 0.0F).setMax(0.5F, 0.5F + stepYOffset, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5F, 0.0F, 0.0F).setMax(1.0F, 1.0F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else if (hRotation == 1) {
+            bounds.setMin(0.0F, 0.0F, 0.0F).setMax(0.5F, 1.0F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.5F, 0.0F + stepYOffset, 0.0F).setMax(1.0F, 0.5F + stepYOffset, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+        } else if (hRotation == 2) {
+            bounds.setMin(0.0F, 0.0F + stepYOffset, 0.0F).setMax(1.0F, 0.5F + stepYOffset, 0.5F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.0F, 0.5F).setMax(1.0F, 1.0F, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         } else {
-            bounds.set(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
-            bounds.set(0.0F, 0.0F + stepYOffset, 0.5F, 1.0F, 0.5F + stepYOffset, 1.0F);
-            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+            bounds.setMin(0.0F, 0.0F, 0.0F).setMax(1.0F, 1.0F, 0.5F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
+            bounds.setMin(0.0F, 0.0F + stepYOffset, 0.5F).setMax(1.0F, 0.5F + stepYOffset, 1.0F);
+            renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         }
         return true;
     }
 
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(renderBlocks.useInventoryTint)
-        {
-            int j = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-            float f1 = (float)(j >> 16 & 0xff) / 255F;
-            float f3 = (float)(j >> 8 & 0xff) / 255F;
-            float f5 = (float)(j & 0xff) / 255F;
+        if (renderBlocks.useInventoryTint) {
+            int j = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float f1 = (float) (j >> 16 & 0xff) / 255F;
+            float f3 = (float) (j >> 8 & 0xff) / 255F;
+            float f5 = (float) (j & 0xff) / 255F;
             GL11.glColor4f(f1 * brightness, f3 * brightness, f5 * brightness, alpha);
         }
-        for(int l = 0; l < 2; l++)
-        {
-            AABB bounds;
-            if(l == 0)
-            {
-                bounds = AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
+        for (int l = 0; l < 2; l++) {
+            AABBdc bounds;
+            if (l == 0) {
+                bounds = new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
             } else {
-                bounds = AABB.fromPool(0.5F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F);
+                bounds = new AABBd(0.5F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F);
             }
             GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
             tessellator.startDrawingQuads();
@@ -123,20 +118,19 @@ public class BlockModelStairs<T extends BlockLogicStairs> extends BlockModelStan
             GL11.glTranslatef(0.5F, 0.5F, 0.5F);
         }
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        return parentModel.getBlockTextureFromSideAndMetadata(side, data);
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        return this.parentModel.getBlockTextureFromSideAndMetadata(side, data);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return parentModel.getBlockTexture(blockAccess, x, y, z, side);
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return this.parentModel.getBlockTexture(source, tilePos, side);
     }
 
     @Override
     public int renderLayer() {
-        return parentModel.renderLayer();
+        return this.parentModel.renderLayer();
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairsPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairsPainted.java
index 3aa0e7be2..5127fb1a2 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairsPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStairsPainted.java
@@ -5,6 +5,8 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicStairs;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelStairsPainted<T extends BlockLogicStairs> extends BlockModelStairs<T> {
@@ -13,14 +15,13 @@ public class BlockModelStairsPainted<T extends BlockLogicStairs> extends BlockMo
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int meta) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int meta) {
         meta = meta >> 4;
         return BlockModelPlanksPainted.texCoords[meta & 0x0F];
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return getBlockTextureFromSideAndMetadata(side, blockAccess.getBlockMetadata(x, y, z));
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return getBlockTextureFromSideAndMetadata(side, source.getBlockData(tilePos));
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStandard.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStandard.java
index f35c93315..cba9efab6 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStandard.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStandard.java
@@ -1,7 +1,6 @@
 package net.minecraft.client.render.block.model;
 
 import net.minecraft.client.render.LightmapHelper;
-import net.minecraft.client.render.item.model.ItemModelStandard;
 import net.minecraft.client.render.texture.stitcher.IconCoordinate;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
@@ -9,10 +8,13 @@ import net.minecraft.client.render.block.color.BlockColorDispatcher;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.DisplayPos;
 
@@ -20,20 +22,20 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
-public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
+public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T> {
     protected static final RenderBlocks renderBlocks = new RenderBlocks();
 
     protected static final DisplayPos DEFAULT_BLOCK_GUI = new DisplayPos(0, 0, 0, 30, 225, 0, 0.625f, 0.625f, 0.625f);
-    protected static final DisplayPos DEFAULT_BLOCK_GROUND = new DisplayPos(0, 3/16f, 0, 0, 0, 0, 0.25f, 0.25f, 0.25f);
+    protected static final DisplayPos DEFAULT_BLOCK_GROUND = new DisplayPos(0, 3 / 16f, 0, 0, 0, 0, 0.25f, 0.25f, 0.25f);
     protected static final DisplayPos DEFAULT_BLOCK_FIXED = new DisplayPos(0, 0, 0, 0, 0, 0, 0.5f, 0.5f, 0.5f);
-    protected static final DisplayPos DEFAULT_BLOCK_THIRD_PERSON_RIGHT_HAND = new DisplayPos(0, 2.5f/16f, 0, 75, 45, 0, 0.375f, 0.375f, 0.375f);
-    protected static final DisplayPos DEFAULT_BLOCK_THIRD_PERSON_LEFT_HAND = new DisplayPos(-0, 2.5f/16f, 0, 75, 45, 0, 0.375f, 0.375f, 0.375f);
+    protected static final DisplayPos DEFAULT_BLOCK_THIRD_PERSON_RIGHT_HAND = new DisplayPos(0, 2.5f / 16f, 0, 75, 45, 0, 0.375f, 0.375f, 0.375f);
+    protected static final DisplayPos DEFAULT_BLOCK_THIRD_PERSON_LEFT_HAND = new DisplayPos(-0, 2.5f / 16f, 0, 75, 45, 0, 0.375f, 0.375f, 0.375f);
     protected static final DisplayPos DEFAULT_BLOCK_FIRST_PERSON_RIGHT_HAND = new DisplayPos(0, 0, 0, 0, 45, 0, 0.4f, 0.4f, 0.4f);
     protected static final DisplayPos DEFAULT_BLOCK_FIRST_PERSON_LEFT_HAND = new DisplayPos(0, 0, 0, 0, 225, 0, 0.4f, 0.4f, 0.4f);
 
     public static final IconCoordinate BLOCK_TEXTURE_MISSING = TextureRegistry.getTexture("minecraft:block/texture_missing");
     public static final IconCoordinate BLOCK_TEXTURE_UNASSIGNED = TextureRegistry.getTexture("minecraft:block/texture_unassigned");
-    public @Nullable AABB itemRenderBounds = null;
+    public @Nullable AABBdc itemRenderBounds = null;
     public int renderLayer = 0;
 
     public static final int BLOCK_TEXTURES = 0;
@@ -50,65 +52,65 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
 
     public BlockModelStandard(Block<T> block) {
         super(block);
-        displayPosMap.put(DisplayPos.GUI, DEFAULT_BLOCK_GUI);
-        displayPosMap.put(DisplayPos.GROUND, DEFAULT_BLOCK_GROUND);
-        displayPosMap.put(DisplayPos.FIXED, DEFAULT_BLOCK_FIXED);
-        displayPosMap.put(DisplayPos.THIRD_PERSON_RIGHT_HAND, DEFAULT_BLOCK_THIRD_PERSON_RIGHT_HAND);
-        displayPosMap.put(DisplayPos.THIRD_PERSON_LEFT_HAND, DEFAULT_BLOCK_THIRD_PERSON_LEFT_HAND); // TODO make automatic since its just the axis flipped
-        displayPosMap.put(DisplayPos.FIRST_PERSON_RIGHT_HAND, DEFAULT_BLOCK_FIRST_PERSON_RIGHT_HAND);
-        displayPosMap.put(DisplayPos.FIRST_PERSON_LEFT_HAND, DEFAULT_BLOCK_FIRST_PERSON_LEFT_HAND);
+        this.displayPosMap.put(DisplayPos.GUI, DEFAULT_BLOCK_GUI);
+        this.displayPosMap.put(DisplayPos.GROUND, DEFAULT_BLOCK_GROUND);
+        this.displayPosMap.put(DisplayPos.FIXED, DEFAULT_BLOCK_FIXED);
+        this.displayPosMap.put(DisplayPos.THIRD_PERSON_RIGHT_HAND, DEFAULT_BLOCK_THIRD_PERSON_RIGHT_HAND);
+        this.displayPosMap.put(DisplayPos.THIRD_PERSON_LEFT_HAND, DEFAULT_BLOCK_THIRD_PERSON_LEFT_HAND); // TODO make automatic since its just the axis flipped
+        this.displayPosMap.put(DisplayPos.FIRST_PERSON_RIGHT_HAND, DEFAULT_BLOCK_FIRST_PERSON_RIGHT_HAND);
+        this.displayPosMap.put(DisplayPos.FIRST_PERSON_LEFT_HAND, DEFAULT_BLOCK_FIRST_PERSON_LEFT_HAND);
     }
 
     @Override
-    public boolean renderNoCulling(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean renderNoCulling(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         renderBlocks.renderAllFaces = true;
-        boolean result = render(tessellator, worldSource, x, y, z);
+        boolean result = render(tessellator, worldSource, tilePos);
         renderBlocks.renderAllFaces = false;
         return result;
     }
 
     @Override
-    public boolean renderWithOverrideTexture(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z, IconCoordinate textureIndex) {
+    public boolean renderWithOverrideTexture(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos, IconCoordinate textureIndex) {
         renderBlocks.overrideBlockTexture = textureIndex;
-        boolean result = render(tessellator, worldSource, x, y, z);
+        boolean result = render(tessellator, worldSource, tilePos);
         renderBlocks.overrideBlockTexture = null;
         return result;
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        return renderBlocks.renderStandardBlock(tessellator, worldSource, this, block.getBlockBoundsFromState(worldSource, x, y, z), x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        return renderBlocks.renderStandardBlock(tessellator, worldSource, this, this.block.getBoundsFromState(worldSource, tilePos), tilePos);
     }
 
     @Override
-    public boolean renderOverbright(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean renderOverbright(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         renderBlocks.overbright = true;
-        boolean result = render(tessellator, worldSource, x, y, z);
+        boolean result = render(tessellator, worldSource, tilePos);
         renderBlocks.overbright = false;
         return result;
     }
 
     @Override
-	public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-		if(renderBlocks.useInventoryTint) {
-			int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-			float r = (float) (color >> 16 & 0xff) / 255F;
-			float g = (float) (color >> 8 & 0xff) / 255F;
-			float b = (float) (color & 0xff) / 255F;
-			GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
-		}else {
-			GL11.glColor4f(brightness, brightness, brightness, alpha);
-		}
-		float yOffset = 0.5F;
-
-        AABB bounds = getBlockBoundsForItemRender();
-		GL11.glTranslatef(-0.5F, 0.0F - yOffset, -0.5F);
-		renderBlockWithBounds(tessellator, bounds, metadata, brightness, alpha, lightmapCoordinate);
-		GL11.glTranslatef(0.5F, yOffset, 0.5F);
-	}
-
-    public void renderBlockWithBounds(Tessellator tessellator, AABB bounds, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
-        if(LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null) {
+    public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
+        if (renderBlocks.useInventoryTint) {
+            int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+            float r = (float) (color >> 16 & 0xff) / 255F;
+            float g = (float) (color >> 8 & 0xff) / 255F;
+            float b = (float) (color & 0xff) / 255F;
+            GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
+        } else {
+            GL11.glColor4f(brightness, brightness, brightness, alpha);
+        }
+        float yOffset = 0.5F;
+
+        AABBdc bounds = getBlockBoundsForItemRender();
+        GL11.glTranslatef(-0.5F, 0.0F - yOffset, -0.5F);
+        renderBlockWithBounds(tessellator, bounds, metadata, brightness, alpha, lightmapCoordinate);
+        GL11.glTranslatef(0.5F, yOffset, 0.5F);
+    }
+
+    public void renderBlockWithBounds(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
+        if (LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null) {
             LightmapHelper.setLightmapCoord(lightmapCoordinate);
         }
 
@@ -134,25 +136,25 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
 
         tessellator.draw();
 
-        if(LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null) {
+        if (LightmapHelper.isLightmapEnabled() && lightmapCoordinate != null) {
             LightmapHelper.setLastLightmapCoord();
         }
 
-        if(hasOverbright()) {
+        if (hasOverbright()) {
 //			GL11.glDisable(GL11.GL_LIGHTING);
 
             float brightnessOver = 1.0f;
-            if(renderBlocks.useInventoryTint) {
-                int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
+            if (renderBlocks.useInventoryTint) {
+                int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
                 float r = (float) (color >> 16 & 0xff) / 255F;
                 float g = (float) (color >> 8 & 0xff) / 255F;
                 float b = (float) (color & 0xff) / 255F;
                 GL11.glColor4f(r * brightnessOver, g * brightnessOver, b * brightnessOver, alpha);
-            }else {
+            } else {
                 GL11.glColor4f(brightnessOver, brightnessOver, brightnessOver, alpha);
             }
 
-            if(LightmapHelper.isLightmapEnabled()) {
+            if (LightmapHelper.isLightmapEnabled()) {
                 LightmapHelper.setLightmapCoord(15, 15);
             }
 
@@ -178,7 +180,7 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
 
             tessellator.draw();
 
-            if(LightmapHelper.isLightmapEnabled()) {
+            if (LightmapHelper.isLightmapEnabled()) {
                 LightmapHelper.setLastLightmapCoord();
             }
 
@@ -193,7 +195,7 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
 
     @Override
     public @NotNull DisplayPos getItemDisplayPos(@NotNull String id) {
-        return displayPosMap.getOrDefault(id, DisplayPos.DEFAULT_DISPLAY_POS);
+        return this.displayPosMap.getOrDefault(id, DisplayPos.DEFAULT_DISPLAY_POS);
     }
 
     public @NotNull BlockModelStandard<T> setDisplayPos(@NotNull String id, @NotNull DisplayPos displayPos) {
@@ -201,37 +203,45 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
         return this;
     }
 
-    public @Nullable IconCoordinate getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side side)
-    {
-        return getBlockTextureFromSideAndMetadata(side, blockAccess.getBlockMetadata(x, y, z));
+    @Deprecated
+    public final @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, int x, int y, int z, @NotNull Side side) {
+        return getBlockTexture(source, new TilePos(x, y, z), side);
+    }
+
+    public @Nullable IconCoordinate getBlockTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return getBlockTextureFromSideAndMetadata(side, source.getBlockData(tilePos));
     }
 
-    public @Nullable IconCoordinate getBlockOverbrightTexture(WorldSource blockAccess, int x, int y, int z, @NotNull Side side)
-    {
-        return getBlockOverbrightTextureFromSideAndMeta(side, blockAccess.getBlockMetadata(x, y, z));
+    @Deprecated
+    public final @Nullable IconCoordinate getBlockOverbrightTexture(@NotNull WorldSource source, int x, int y, int z, @NotNull Side side) {
+        return getBlockOverbrightTexture(source, new TilePos(x, y, z), side);
+    }
+
+    public @Nullable IconCoordinate getBlockOverbrightTexture(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return getBlockOverbrightTextureFromSideAndMeta(side, source.getBlockData(tilePos));
     }
 
     @Override
     public boolean hasOverbright() {
-        return overbrightTextures.hasTexture();
+        return this.overbrightTextures.hasTexture();
     }
 
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data) {
-        if (retroOverbrightTextures.hasTexture && isRetro()) {
-            return retroOverbrightTextures.get(side);
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
+        if (this.retroOverbrightTextures.hasTexture && isRetro()) {
+            return this.retroOverbrightTextures.get(side);
         }
-        return overbrightTextures.get(side);
+        return this.overbrightTextures.get(side);
     }
 
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if (retroBlockTextures.hasTexture && isRetro()) {
-            return retroBlockTextures.get(side);
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (this.retroBlockTextures.hasTexture && isRetro()) {
+            return this.retroBlockTextures.get(side);
         }
-        return blockTextures.get(side);
+        return this.blockTextures.get(side);
     }
+
     @Override
-    public @Nullable IconCoordinate getParticleTexture(@NotNull Side side, int meta){
+    public @Nullable IconCoordinate getParticleTexture(@NotNull Side side, int meta) {
         return getBlockTextureFromSideAndMetadata(side, meta);
     }
 
@@ -240,63 +250,57 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
         return getBlockTextureFromSideAndMetadata(Side.NORTH, meta);
     }
 
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side, int meta)
-    {
-        return shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+    @Deprecated
+    public final boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, int x, int y, int z, @NotNull Side side, int meta) {
+        return shouldSideBeRendered(source, bounds, new TilePos(x, y, z), side, meta);
+    }
+
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePos tilePos, @NotNull Side side, int meta) {
+        return shouldSideBeRendered(source, bounds, tilePos, side);
     }
 
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        if(side == Side.BOTTOM && bounds.minY > 0.0D)
-        {
+    @Deprecated
+    public final boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, int x, int y, int z, @NotNull Side side) {
+        return shouldSideBeRendered(source, bounds, new TilePos(x, y, z), side);
+    }
+
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (side == Side.BOTTOM && bounds.minY() > 0.0D) {
             return true;
-        }
-        else if(side == Side.TOP && bounds.maxY < 1.0D)
-        {
+        } else if (side == Side.TOP && bounds.maxY() < 1.0D) {
             return true;
-        }
-        else if(side == Side.NORTH && bounds.minZ > 0.0D)
-        {
+        } else if (side == Side.NORTH && bounds.minZ() > 0.0D) {
             return true;
-        }
-        else if(side == Side.SOUTH && bounds.maxZ < 1.0D)
-        {
+        } else if (side == Side.SOUTH && bounds.maxZ() < 1.0D) {
             return true;
-        }
-        else if(side == Side.WEST && bounds.minX > 0.0D)
-        {
+        } else if (side == Side.WEST && bounds.minX() > 0.0D) {
             return true;
-        }
-        else if(side == Side.EAST && bounds.maxX < 1.0D)
-        {
+        } else if (side == Side.EAST && bounds.maxX() < 1.0D) {
             return true;
-        }
-        else
-        {
-            return !blockAccess.isBlockOpaqueCube(x, y, z);
+        } else {
+            return !source.isBlockOpaqueCube(tilePos);
         }
     }
 
-    public boolean shouldSideBeColored(@NotNull WorldSource worldSource, int x, int y, int z, @NotNull Side side, int meta){
+    public boolean shouldSideBeColored(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos, @NotNull Side side, int meta) {
         return true;
     }
 
     @Override
-    public int particleColorIndex(@NotNull WorldSource worldSource, int x, int y, int z, @NotNull Side side, int meta) {
-        return shouldSideBeColored(worldSource, x, y, z, side, meta) ? 0 : -1;
+    public int particleColorIndex(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos, @NotNull Side side, int meta) {
+        return shouldSideBeColored(worldSource, tilePos, side, meta) ? 0 : -1;
     }
 
-    public AABB getBlockBoundsForItemRender()
-    {
-        if (itemRenderBounds != null){
-            return itemRenderBounds;
+    public @NotNull AABBdc getBlockBoundsForItemRender() {
+        if (this.itemRenderBounds != null) {
+            return this.itemRenderBounds;
         }
-        return block.getBounds();
+        return this.block.getBounds();
     }
 
     @Override
     public int renderLayer() {
-        return renderLayer;
+        return this.renderLayer;
     }
 
     public BlockModelStandard<T> onRenderLayer(int layer) {
@@ -304,42 +308,42 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
         return this;
     }
 
-    public BlockModelStandard<T> withCustomItemBounds(double minX, double minY, double minZ, double maxX, double maxY, double maxZ){
-        this.itemRenderBounds = AABB.fromPool(minX, minY, minZ, maxX, maxY, maxZ).copyUnpooled();
+    public BlockModelStandard<T> withCustomItemBounds(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
+        this.itemRenderBounds = new AABBd(minX, minY, minZ, maxX, maxY, maxZ);
         return this;
     }
 
-    public BlockModelStandard<T> setTex(int layer, @Nullable IconCoordinate coordinate, Side ... sides) {
+    public BlockModelStandard<T> setTex(int layer, @Nullable IconCoordinate coordinate, Side... sides) {
         switch (layer) {
             case BLOCK_TEXTURES:
-                blockTextures.set(coordinate, sides);
+                this.blockTextures.set(coordinate, sides);
                 break;
             case OVERBRIGHT_TEXTURES:
-                overbrightTextures.set(coordinate, sides);
+                this.overbrightTextures.set(coordinate, sides);
                 break;
             case RETRO_BLOCK_TEXTURES:
-                retroBlockTextures.set(coordinate, sides);
+                this.retroBlockTextures.set(coordinate, sides);
                 break;
             case RETRO_OVERBRIGHT_TEXTURES:
-                retroOverbrightTextures.set(coordinate, sides);
+                this.retroOverbrightTextures.set(coordinate, sides);
                 break;
         }
         return this;
     }
 
-    public BlockModelStandard<T> setTex(int layer, @Nullable String texture, Side ... sides) {
+    public BlockModelStandard<T> setTex(int layer, @Nullable String texture, Side... sides) {
         switch (layer) {
             case BLOCK_TEXTURES:
-                blockTextures.set(texture, sides);
+                this.blockTextures.set(texture, sides);
                 break;
             case OVERBRIGHT_TEXTURES:
-                overbrightTextures.set(texture, sides);
+                this.overbrightTextures.set(texture, sides);
                 break;
             case RETRO_BLOCK_TEXTURES:
-                retroBlockTextures.set(texture, sides);
+                this.retroBlockTextures.set(texture, sides);
                 break;
             case RETRO_OVERBRIGHT_TEXTURES:
-                retroOverbrightTextures.set(texture, sides);
+                this.retroOverbrightTextures.set(texture, sides);
                 break;
         }
         return this;
@@ -348,16 +352,16 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
     public BlockModelStandard<T> setAllTextures(int layer, @Nullable IconCoordinate coordinate) {
         switch (layer) {
             case BLOCK_TEXTURES:
-                blockTextures.setAll(coordinate);
+                this.blockTextures.setAll(coordinate);
                 break;
             case OVERBRIGHT_TEXTURES:
-                overbrightTextures.setAll(coordinate);
+                this.overbrightTextures.setAll(coordinate);
                 break;
             case RETRO_BLOCK_TEXTURES:
-                retroBlockTextures.setAll(coordinate);
+                this.retroBlockTextures.setAll(coordinate);
                 break;
             case RETRO_OVERBRIGHT_TEXTURES:
-                retroOverbrightTextures.setAll(coordinate);
+                this.retroOverbrightTextures.setAll(coordinate);
                 break;
         }
         return this;
@@ -366,16 +370,16 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
     public BlockModelStandard<T> setAllTextures(int layer, @Nullable String texture) {
         switch (layer) {
             case BLOCK_TEXTURES:
-                blockTextures.setAll(texture);
+                this.blockTextures.setAll(texture);
                 break;
             case OVERBRIGHT_TEXTURES:
-                overbrightTextures.setAll(texture);
+                this.overbrightTextures.setAll(texture);
                 break;
             case RETRO_BLOCK_TEXTURES:
-                retroBlockTextures.setAll(texture);
+                this.retroBlockTextures.setAll(texture);
                 break;
             case RETRO_OVERBRIGHT_TEXTURES:
-                retroOverbrightTextures.setAll(texture);
+                this.retroOverbrightTextures.setAll(texture);
                 break;
         }
         return this;
@@ -383,34 +387,37 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
 
 
     @Deprecated
-    public BlockModelStandard<T> withOverbrightTexture(String texture)
-    {
-        overbrightTextures.setAll(texture);
+    public BlockModelStandard<T> withOverbrightTexture(String texture) {
+        this.overbrightTextures.setAll(texture);
         return this;
     }
+
     @Deprecated
-    public BlockModelStandard<T> withTextures(String texture){
-        blockTextures.setAll(texture);
+    public BlockModelStandard<T> withTextures(String texture) {
+        this.blockTextures.setAll(texture);
         return this;
     }
+
     @Deprecated
-    public BlockModelStandard<T> withTextures(String textureTopBottom, String textureSides){
-        blockTextures
+    public BlockModelStandard<T> withTextures(String textureTopBottom, String textureSides) {
+        this.blockTextures
             .set(textureTopBottom, Side.TOP, Side.BOTTOM)
             .set(textureSides, Side.NORTH, Side.EAST, Side.SOUTH, Side.WEST);
         return this;
     }
+
     @Deprecated
-    public BlockModelStandard<T> withTextures(String textureTop, String textureBottom, String textureSides){
-        blockTextures
+    public BlockModelStandard<T> withTextures(String textureTop, String textureBottom, String textureSides) {
+        this.blockTextures
             .set(textureTop, Side.TOP)
             .set(textureBottom, Side.BOTTOM)
             .set(textureSides, Side.NORTH, Side.EAST, Side.SOUTH, Side.WEST);
         return this;
     }
+
     @Deprecated
-    public BlockModelStandard<T> withTextures(String textureTop, String textureBottom, String textureNorth, String textureEast, String textureSouth, String textureWest){
-        blockTextures
+    public BlockModelStandard<T> withTextures(String textureTop, String textureBottom, String textureNorth, String textureEast, String textureSouth, String textureWest) {
+        this.blockTextures
             .set(textureTop, Side.TOP)
             .set(textureBottom, Side.BOTTOM)
             .set(textureNorth, Side.NORTH)
@@ -424,27 +431,27 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
         private final @Nullable IconCoordinate @NotNull [] coordinates = new IconCoordinate[6];
         private boolean hasTexture = false;
 
-        public TextureLayer set(@Nullable IconCoordinate coordinate, Side ... sides) {
+        public TextureLayer set(@Nullable IconCoordinate coordinate, Side... sides) {
             for (Side s : sides) {
                 assert s != Side.NONE : "Cannot set texture on a 'NONE' side!";
-                coordinates[s.getId()] = coordinate;
+                this.coordinates[s.getId()] = coordinate;
             }
 
-            hasTexture = false;
-            for (int i = 0, coordinatesLength = coordinates.length; i < coordinatesLength; i++) {
-                IconCoordinate iconCoordinate = coordinates[i];
-                hasTexture |= iconCoordinate != null;
+            this.hasTexture = false;
+            for (int i = 0, coordinatesLength = this.coordinates.length; i < coordinatesLength; i++) {
+                IconCoordinate iconCoordinate = this.coordinates[i];
+                this.hasTexture |= iconCoordinate != null;
             }
             return this;
         }
 
-        public TextureLayer set(@Nullable String texture, Side ... sides) {
+        public TextureLayer set(@Nullable String texture, Side... sides) {
             return set(texture == null ? null : TextureRegistry.getTexture(texture), sides);
         }
 
         public TextureLayer setAll(@Nullable IconCoordinate coordinate) {
-            Arrays.fill(coordinates, coordinate);
-            hasTexture = coordinate != null;
+            Arrays.fill(this.coordinates, coordinate);
+            this.hasTexture = coordinate != null;
             return this;
         }
 
@@ -453,20 +460,20 @@ public class BlockModelStandard<T extends BlockLogic> extends BlockModel<T>{
         }
 
         public TextureLayer copy(@NotNull TextureLayer layer) {
-            System.arraycopy(layer.coordinates, 0, coordinates, 0, 6);
+            System.arraycopy(layer.coordinates, 0, this.coordinates, 0, 6);
             this.hasTexture = layer.hasTexture;
             return this;
         }
 
         public @Nullable IconCoordinate get(@NotNull Side side) {
             assert side != Side.NONE : "Cannot set texture on a 'NONE' side!";
-            return coordinates[side.getId()];
+            return this.coordinates[side.getId()];
         }
 
         public @Nullable IconCoordinate get(int index) {
             assert index >= 0 : "Index must be greater then or equal to 0!";
-            assert index < coordinates.length : "Index must be less then " + coordinates.length + "!";
-            return coordinates[index];
+            assert index < this.coordinates.length : "Index must be less then " + this.coordinates.length + "!";
+            return this.coordinates[index];
         }
 
         public boolean hasTexture() {
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStoneMossy.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStoneMossy.java
index 1b96cab2b..176048d57 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStoneMossy.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelStoneMossy.java
@@ -6,25 +6,27 @@ import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.client.render.block.color.BlockColorDispatcher;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 public class BlockModelStoneMossy<T extends BlockLogic> extends BlockModelStandard<T> {
     protected IconCoordinate mossOverlay;
+
     public BlockModelStoneMossy(Block<T> block) {
         super(block);
-        mossOverlay = TextureRegistry.getTexture("minecraft:block/moss_overlay");
+        this.mossOverlay = TextureRegistry.getTexture("minecraft:block/moss_overlay");
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        AABB bounds = block.getBlockBoundsFromState(worldSource, x, y, z);
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z, 1.0f, 1.0f, 1.0f);
-        renderBlocks.overrideBlockTexture = mossOverlay;
-        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        AABBdc bounds = this.block.getBoundsFromState(worldSource, tilePos);
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos, 1.0f, 1.0f, 1.0f);
+        renderBlocks.overrideBlockTexture = this.mossOverlay;
+        renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, tilePos);
         renderBlocks.overrideBlockTexture = null;
         return true;
     }
@@ -36,14 +38,14 @@ public class BlockModelStoneMossy<T extends BlockLogic> extends BlockModelStanda
         renderBlocks.useInventoryTint = true;
         GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
 
-        int color = BlockColorDispatcher.getInstance().getDispatch(block).getFallbackColor(metadata, 0);
-        float r = (float)(color >> 16 & 0xff) / 255F;
-        float g = (float)(color >> 8 & 0xff) / 255F;
-        float b = (float)(color & 0xff) / 255F;
+        int color = BlockColorDispatcher.getInstance().getDispatch(this.block).getFallbackColor(metadata, 0);
+        float r = (float) (color >> 16 & 0xff) / 255F;
+        float g = (float) (color >> 8 & 0xff) / 255F;
+        float b = (float) (color & 0xff) / 255F;
         GL11.glColor4f(r * brightness, g * brightness, b * brightness, alpha);
 
-        AABB bounds = block.getBounds();
-        IconCoordinate mossCoord = mossOverlay;
+        AABBdc bounds = this.block.getBounds();
+        IconCoordinate mossCoord = this.mossOverlay;
 
         tessellator.startDrawingQuads();
         tessellator.setNormal(0.0F, -1F, 0.0F);
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorch.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorch.java
index b99e1643a..3c8aad47b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorch.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorch.java
@@ -8,8 +8,8 @@ import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.block.BlockLogicTorch;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
-import org.useless.dragonfly.DisplayPos;
 
 public class BlockModelTorch<T extends BlockLogic> extends BlockModelStandard<T> {
     public BlockModelTorch(Block<T> block) {
@@ -17,13 +17,13 @@ public class BlockModelTorch<T extends BlockLogic> extends BlockModelStandard<T>
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-            tessellator.setLightmapCoord(block.getLightmapCoord(worldSource, x, y, z));
-        }else {
-            brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-            if(block.emission > 0) {
+        if (LightmapHelper.isLightmapEnabled()) {
+            tessellator.setLightmapCoord(this.block.getLightmapCoord(worldSource, tilePos));
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            if (this.block.emission > 0) {
                 brightness = 1.0F;
             }
         }
@@ -31,31 +31,30 @@ public class BlockModelTorch<T extends BlockLogic> extends BlockModelStandard<T>
         double d = 0.4;
         double d1 = 0.5D - d;
         double d2 = 0.2;
-        int direction = worldSource.getBlockMetadata(x, y, z) & BlockLogicTorch.MASK_DIRECTION;
+        int direction = worldSource.getBlockData(tilePos) & BlockLogicTorch.MASK_DIRECTION;
         switch (direction) {
             case BlockLogicTorch.SIDE_WEST:
-                renderTorchAtAngle(tessellator, (double) x - d1, (double) y + d2, z, -d, 0.0D);
+                renderTorchAtAngle(tessellator, (double) tilePos.x() - d1, (double) tilePos.y() + d2, tilePos.z(), -d, 0.0D);
                 break;
             case BlockLogicTorch.SIDE_EAST:
-                renderTorchAtAngle(tessellator, (double) x + d1, (double) y + d2, z, d, 0.0D);
+                renderTorchAtAngle(tessellator, (double) tilePos.x() + d1, (double) tilePos.y() + d2, tilePos.z(), d, 0.0D);
                 break;
             case BlockLogicTorch.SIDE_NORTH:
-                renderTorchAtAngle(tessellator, x, (double) y + d2, (double) z - d1, 0.0D, -d);
+                renderTorchAtAngle(tessellator, tilePos.x(), (double) tilePos.y() + d2, (double) tilePos.z() - d1, 0.0D, -d);
                 break;
             case BlockLogicTorch.SIDE_SOUTH:
-                renderTorchAtAngle(tessellator, x, (double) y + d2, (double) z + d1, 0.0D, d);
+                renderTorchAtAngle(tessellator, tilePos.x(), (double) tilePos.y() + d2, (double) tilePos.z() + d1, 0.0D, d);
                 break;
             default:
-                renderTorchAtAngle(tessellator, x, y, z, 0.0D, 0.0D);
+                renderTorchAtAngle(tessellator, tilePos.x(), tilePos.y(), tilePos.z(), 0.0D, 0.0D);
                 break;
         }
         return true;
     }
-    public void renderTorchAtAngle(Tessellator tessellator, double x, double y, double z, double topOffsetX, double topOffsetZ)
-    {
+
+    public void renderTorchAtAngle(Tessellator tessellator, double x, double y, double z, double topOffsetX, double topOffsetZ) {
         IconCoordinate texture = getBlockTextureFromSideAndMetadata(Side.BOTTOM, 0);
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+        if (renderBlocks.overrideBlockTexture != null) {
             texture = renderBlocks.overrideBlockTexture;
         }
 
@@ -106,6 +105,7 @@ public class BlockModelTorch<T extends BlockLogic> extends BlockModelStandard<T>
         tessellator.addVertexWithUV(d9 + topOffsetX, y + 0.0D, (z - d13) + topOffsetZ, maxU, maxV);
         tessellator.addVertexWithUV(d9, y + 1.0D, z - d13, maxU, minV);
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorchRedstone.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorchRedstone.java
index 205245bb4..c04006598 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorchRedstone.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTorchRedstone.java
@@ -16,19 +16,16 @@ public class BlockModelTorchRedstone<T extends BlockLogic> extends BlockModelTor
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
-        if(side == Side.TOP)
-        {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
+        if (side == Side.TOP) {
             return redstoneWire.getBlockTextureFromSideAndMetadata(side, data);
-        } else
-        {
+        } else {
             return super.getBlockTextureFromSideAndMetadata(side, data);
         }
     }
 
     @Override
     public @Nullable IconCoordinate getParticleTexture(@NotNull Side side, int meta) {
-        return blockTextures.get(Side.NORTH);
+        return this.blockTextures.get(Side.NORTH);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTransparent.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTransparent.java
index eff666ee2..c7202598d 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTransparent.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTransparent.java
@@ -3,25 +3,25 @@ package net.minecraft.client.render.block.model;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class BlockModelTransparent<T extends BlockLogic> extends BlockModelStandard<T> {
     private final boolean renderInside;
-    public BlockModelTransparent(Block<T> block, boolean renderInside){
+
+    public BlockModelTransparent(Block<T> block, boolean renderInside) {
         super(block);
         this.renderInside = renderInside;
     }
+
     @Override
-    public boolean shouldSideBeRendered(WorldSource blockAccess, AABB bounds, int x, int y, int z, @NotNull Side side)
-    {
-        if(!renderInside && blockAccess.getBlockId(x, y, z) == block.id())
-        {
+    public boolean shouldSideBeRendered(@NotNull WorldSource source, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (!this.renderInside && source.getBlockId(tilePos) == this.block.id()) {
             return false;
-        } else
-        {
-            return super.shouldSideBeRendered(blockAccess, bounds, x, y, z, side);
+        } else {
+            return super.shouldSideBeRendered(source, bounds, tilePos, side);
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoor.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoor.java
index 8096fe0a9..66be3fbd1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoor.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoor.java
@@ -9,6 +9,7 @@ import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.lwjgl.opengl.GL11;
@@ -21,11 +22,11 @@ public class BlockModelTrapDoor<T extends BlockLogic> extends BlockModelStandard
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int metadata = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int metadata = worldSource.getBlockData(tilePos);
         boolean isUp = BlockLogicTrapDoor.isTrapdoorOpen(metadata);
 
-        if(isUp) {
+        if (isUp) {
             switch (metadata & 3) {
                 case 0:
 
@@ -55,36 +56,36 @@ public class BlockModelTrapDoor<T extends BlockLogic> extends BlockModelStandard
                     renderBlocks.uvRotateWest = 1;
                     break;
             }
-        }
-        else{
-            if(BlockLogicTrapDoor.isUpperHalf(metadata)){
+        } else {
+            if (BlockLogicTrapDoor.isUpperHalf(metadata)) {
                 renderBlocks.uvRotateSouth = 3;
                 renderBlocks.uvRotateNorth = 3;
                 renderBlocks.uvRotateEast = 3;
                 renderBlocks.uvRotateWest = 3;
             }
         }
-        super.render(tessellator, worldSource, x, y, z);
+        super.render(tessellator, worldSource, tilePos);
         renderBlocks.resetRenderBlocks();
         return true;
     }
+
     @Override
     public void renderStandalone(@NotNull Tessellator tessellator, int metadata, float brightness, float alpha, @Nullable Integer lightmapCoordinate) {
         GL11.glTranslatef(0, 0.25f, 0);
         super.renderStandalone(tessellator, metadata, brightness, alpha, lightmapCoordinate);
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         int orientation = data & 3;
-        if(BlockLogicTrapDoor.isTrapdoorOpen(data)) {
+        if (BlockLogicTrapDoor.isTrapdoorOpen(data)) {
             int index = Sides.orientationLookUpTrapdoorOpen[6 * orientation + side.getId()];
-            return blockTextures.get(index);
+            return this.blockTextures.get(index);
         } else {
-            if(side.getAxis() == Axis.Y) {
-                return blockTextures.get(Side.BOTTOM);
-            }else {
-                return blockTextures.get(Side.SOUTH);
+            if (side.getAxis() == Axis.Y) {
+                return this.blockTextures.get(Side.BOTTOM);
+            } else {
+                return this.blockTextures.get(Side.SOUTH);
             }
         }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoorPainted.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoorPainted.java
index 2e5c882fb..4999bd1c5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoorPainted.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelTrapDoorPainted.java
@@ -9,6 +9,7 @@ import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.Sides;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelTrapDoorPainted<T extends BlockLogic> extends BlockModelTrapDoor<T> {
@@ -16,27 +17,28 @@ public class BlockModelTrapDoorPainted<T extends BlockLogic> extends BlockModelT
     public static final IconCoordinate[] sideTextures = new IconCoordinate[DyeColor.COLOR_AMOUNT];
 
     static {
-        for (DyeColor c : DyeColor.blockOrderedColors()){
+        for (DyeColor c : DyeColor.blockOrderedColors()) {
             topTextures[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/trapdoor/planks_" + c.colorID + "/top");
             sideTextures[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/trapdoor/planks_" + c.colorID + "/side");
         }
     }
+
     public BlockModelTrapDoorPainted(Block<T> block) {
         super(block);
     }
+
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         int color = (data >> 4) & DyeColor.MASK_COLOR;
         int orientation = data & 3;
-        if(BlockLogicTrapDoor.isTrapdoorOpen(data)) {
+        if (BlockLogicTrapDoor.isTrapdoorOpen(data)) {
             int index = Sides.orientationLookUpTrapdoorOpen[6 * orientation + side.getId()];
             if (index < 2) return topTextures[color];
             return sideTextures[color];
         } else {
-            if(side.getAxis() == Axis.Y) {
+            if (side.getAxis() == Axis.Y) {
                 return topTextures[color];
-            }else {
+            } else {
                 return sideTextures[color];
             }
         }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelVeryRotatable.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelVeryRotatable.java
index 9613b9034..84eb9d1ae 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelVeryRotatable.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelVeryRotatable.java
@@ -8,6 +8,7 @@ import net.minecraft.core.block.BlockLogicVeryRotatable;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.useless.dragonfly.DisplayPos;
@@ -26,8 +27,8 @@ public class BlockModelVeryRotatable<T extends BlockLogic> extends BlockModelSta
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        final int meta = worldSource.getBlockMetadata(x, y, z);
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        final int meta = worldSource.getBlockData(tilePos);
         final Direction dir = BlockLogicVeryRotatable.metaToDirection(meta);
 
         if (dir == Direction.DOWN || dir == Direction.UP) {
@@ -39,7 +40,7 @@ public class BlockModelVeryRotatable<T extends BlockLogic> extends BlockModelSta
             renderBlocks.uvRotateTop = 1;
             renderBlocks.uvRotateBottom = 1;
         }
-        final boolean result = super.render(tessellator, worldSource, x, y, z);
+        final boolean result = super.render(tessellator, worldSource, tilePos);
         renderBlocks.resetRenderBlocks();
 
         return result;
@@ -55,13 +56,12 @@ public class BlockModelVeryRotatable<T extends BlockLogic> extends BlockModelSta
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(Side side, int data) {
+    public @Nullable IconCoordinate getBlockOverbrightTextureFromSideAndMeta(@NotNull Side side, int data) {
         return super.getBlockOverbrightTextureFromSideAndMeta(getRotatedSide(side, data), data);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data)
-    {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         return super.getBlockTextureFromSideAndMetadata(getRotatedSide(side, data), data);
     }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWireRedstone.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWireRedstone.java
index 4c87b01d4..6ca2e9507 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWireRedstone.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWireRedstone.java
@@ -12,39 +12,41 @@ import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.util.helper.Color;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockModelWireRedstone<T extends BlockLogic> extends BlockModelStandard<T> {
     protected final IconCoordinate wireStraight = TextureRegistry.getTexture("minecraft:block/wire_redstone_straight");
     protected final IconCoordinate wireCross = TextureRegistry.getTexture("minecraft:block/wire_redstone_cross");
+
     public BlockModelWireRedstone(Block<T> block) {
         super(block);
         setAllTextures(BLOCK_TEXTURES, "minecraft:block/wire_redstone_cross");
     }
 
     @Override
-    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
-        int meta = worldSource.getBlockMetadata(x, y, z);
-        IconCoordinate straight = wireStraight;
-        IconCoordinate cross = wireCross;
-        if(renderBlocks.overrideBlockTexture != null)
-        {
+    public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        int meta = worldSource.getBlockData(tilePos);
+        IconCoordinate straight = this.wireStraight;
+        IconCoordinate cross = this.wireCross;
+        if (renderBlocks.overrideBlockTexture != null) {
             cross = renderBlocks.overrideBlockTexture;
         }
         float brightness = 1.0f;
-        if(LightmapHelper.isLightmapEnabled()) {
-//            int lmc = block.getLightmapCoord(worldSource, x, y, z);
+        if (LightmapHelper.isLightmapEnabled()) {
+//            int lmc = block.getLightmapCoord(worldSource, tilePos);
 //            if(Blocks.lightEmission[block.id] > 0) {
 //                lmc = LightmapHelper.setBlocklightValue(lmc, 15);
 //            }
-            int lmc = LightmapHelper.getLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, x, y, z), Math.max(worldSource.getSavedLightValue(LightLayer.Block, x, y, z), meta & 0xF));
+            int lmc = LightmapHelper.getLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, tilePos), Math.max(worldSource.getSavedLightValue(LightLayer.Block, tilePos), meta & 0xF));
             tessellator.setLightmapCoord(lmc);
-        }else {
-            brightness = renderBlocks.getBlockBrightness(worldSource, x, y, z);
-            if(block.emission > 0) {
+        } else {
+            brightness = renderBlocks.getBlockBrightness(worldSource, tilePos);
+            if (this.block.emission > 0) {
                 brightness = 1.0f;
             }
-            brightness = Math.max(brightness, (meta & 0xF)/16f);
+            brightness = Math.max(brightness, (meta & 0xF) / 16f);
         }
         tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
@@ -53,54 +55,54 @@ public class BlockModelWireRedstone<T extends BlockLogic> extends BlockModelStan
         float green = color.getGreen() / 255.0f;
         float blue = color.getBlue() / 255.0f;
 
+        TilePos queryPos = new TilePos();
+
         tessellator.setColorOpaque_F(brightness * red, brightness * green, brightness * blue);
-        boolean west = BlockLogicWireRedstone.shouldConnectTo(worldSource, x - 1, y, z, Side.WEST) || !worldSource.isBlockNormalCube(x - 1, y, z) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x - 1, y - 1, z, Side.NONE, Side.BOTTOM);
-        boolean east = BlockLogicWireRedstone.shouldConnectTo(worldSource, x + 1, y, z, Side.EAST) || !worldSource.isBlockNormalCube(x + 1, y, z) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x + 1, y - 1, z, Side.NONE, Side.BOTTOM);
-        boolean north = BlockLogicWireRedstone.shouldConnectTo(worldSource, x, y, z - 1, Side.NORTH) || !worldSource.isBlockNormalCube(x, y, z - 1) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x, y - 1, z - 1, Side.NONE, Side.BOTTOM);
-        boolean south = BlockLogicWireRedstone.shouldConnectTo(worldSource, x, y, z + 1, Side.SOUTH) || !worldSource.isBlockNormalCube(x, y, z + 1) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x, y - 1, z + 1, Side.NONE, Side.BOTTOM);
+        boolean west = BlockLogicWireRedstone.shouldConnectTo(worldSource, tilePos.west(queryPos), Side.WEST) || !worldSource.isBlockNormalCube(tilePos.west(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(-1, -1, 0, queryPos), Side.NONE, Side.BOTTOM);
+        boolean east = BlockLogicWireRedstone.shouldConnectTo(worldSource, tilePos.east(queryPos), Side.EAST) || !worldSource.isBlockNormalCube(tilePos.east(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(1, -1, 0, queryPos), Side.NONE, Side.BOTTOM);
+        boolean north = BlockLogicWireRedstone.shouldConnectTo(worldSource, tilePos.north(queryPos), Side.NORTH) || !worldSource.isBlockNormalCube(tilePos.north(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(0, -1, -1, queryPos), Side.NONE, Side.BOTTOM);
+        boolean south = BlockLogicWireRedstone.shouldConnectTo(worldSource, tilePos.south(queryPos), Side.SOUTH) || !worldSource.isBlockNormalCube(tilePos.south(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(0, -1, 1, queryPos), Side.NONE, Side.BOTTOM);
         boolean westUp = false;
         boolean eastUp = false;
         boolean northUp = false;
         boolean southUp = false;
-        if(!worldSource.isBlockOpaqueCube(x, y + 1, z))
-        {
-            if(worldSource.isBlockNormalCube(x - 1, y, z) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x - 1, y + 1, z, Side.NONE, Side.TOP))
-            {
+        if (!worldSource.isBlockOpaqueCube(tilePos.up(queryPos))) {
+            if (worldSource.isBlockNormalCube(tilePos.west(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(-1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 west = true;
                 westUp = true;
             }
-            if(worldSource.isBlockNormalCube(x + 1, y, z) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x + 1, y + 1, z, Side.NONE, Side.TOP))
-            {
+            if (worldSource.isBlockNormalCube(tilePos.east(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 east = true;
                 eastUp = true;
             }
-            if(worldSource.isBlockNormalCube(x, y, z - 1) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x, y + 1, z - 1, Side.NONE, Side.TOP))
-            {
+            if (worldSource.isBlockNormalCube(tilePos.north(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(0, 1, -1, queryPos), Side.NONE, Side.TOP)) {
                 north = true;
                 northUp = true;
             }
-            if(worldSource.isBlockNormalCube(x, y, z + 1) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, x, y + 1, z + 1, Side.NONE, Side.TOP))
-            {
+            if (worldSource.isBlockNormalCube(tilePos.south(queryPos)) && BlockLogicWireRedstone.shouldConnectToDiagonal(worldSource, tilePos.add(0, 1, 1, queryPos), Side.NONE, Side.TOP)) {
                 south = true;
                 southUp = true;
             }
         }
+
+        final int x = tilePos.x();
+        final int y = tilePos.y();
+        final int z = tilePos.z();
+
         float xMin = x;
         float xMax = x + 1;
         float zMin = z;
         float zMax = z + 1;
 
-        final float onePix = 1f/16;
+        final float onePix = 1f / 16;
         final float renderOffset = 0.015625F;
 
 
         byte type = 0;
-        if((west || east) && !north && !south)
-        {
+        if ((west || east) && !north && !south) {
             type = 1;
         }
-        if((north || south) && !east && !west)
-        {
+        if ((north || south) && !east && !west) {
             type = 2;
         }
 
@@ -110,106 +112,107 @@ public class BlockModelWireRedstone<T extends BlockLogic> extends BlockModelStan
         if (north) amount++;
         if (south) amount++;
 
-        if (type == 0){
-            if (amount != 0){
+        if (type == 0) {
+            if (amount != 0) {
                 // Render Dot
                 float w = west ? 0 : onePix * 5;
                 float e = east ? 0 : onePix * 5;
                 float s = south ? 0 : onePix * 5;
                 float n = north ? 0 : onePix * 5;
 
-                tessellator.addVertexWithUV(xMax - e, (float)y + renderOffset, zMax - s,  cross.getSubIconU(1 - e), cross.getSubIconV(1 - s));
-                tessellator.addVertexWithUV(xMax - e, (float)y + renderOffset, zMin + n,  cross.getSubIconU(1 - e), cross.getSubIconV(n));
-                tessellator.addVertexWithUV(xMin + w, (float)y + renderOffset, zMin + n,  cross.getSubIconU(w),     cross.getSubIconV(n));
-                tessellator.addVertexWithUV(xMin + w, (float)y + renderOffset, zMax - s,  cross.getSubIconU(w),     cross.getSubIconV(1 - s));
+                tessellator.addVertexWithUV(xMax - e, (float) y + renderOffset, zMax - s, cross.getSubIconU(1 - e), cross.getSubIconV(1 - s));
+                tessellator.addVertexWithUV(xMax - e, (float) y + renderOffset, zMin + n, cross.getSubIconU(1 - e), cross.getSubIconV(n));
+                tessellator.addVertexWithUV(xMin + w, (float) y + renderOffset, zMin + n, cross.getSubIconU(w), cross.getSubIconV(n));
+                tessellator.addVertexWithUV(xMin + w, (float) y + renderOffset, zMax - s, cross.getSubIconU(w), cross.getSubIconV(1 - s));
 
-                tessellator.addVertexWithUV(xMax - e, (float)y + renderOffset, zMax - s,  cross.getSubIconU(1 - e), cross.getSubIconV(1 - s));
-                tessellator.addVertexWithUV(xMin + w, (float)y + renderOffset, zMax - s,  cross.getSubIconU(w),     cross.getSubIconV(1 - s));
-                tessellator.addVertexWithUV(xMin + w, (float)y + renderOffset, zMin + n,  cross.getSubIconU(w),     cross.getSubIconV(n));
-                tessellator.addVertexWithUV(xMax - e, (float)y + renderOffset, zMin + n,  cross.getSubIconU(1 - e), cross.getSubIconV(n));
+                tessellator.addVertexWithUV(xMax - e, (float) y + renderOffset, zMax - s, cross.getSubIconU(1 - e), cross.getSubIconV(1 - s));
+                tessellator.addVertexWithUV(xMin + w, (float) y + renderOffset, zMax - s, cross.getSubIconU(w), cross.getSubIconV(1 - s));
+                tessellator.addVertexWithUV(xMin + w, (float) y + renderOffset, zMin + n, cross.getSubIconU(w), cross.getSubIconV(n));
+                tessellator.addVertexWithUV(xMax - e, (float) y + renderOffset, zMin + n, cross.getSubIconU(1 - e), cross.getSubIconV(n));
 
 
             } else {
-                tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, cross.getIconUMax(), cross.getIconVMax());
-                tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, cross.getIconUMax(), cross.getIconVMin());
-                tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, cross.getIconUMin(), cross.getIconVMin());
-                tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, cross.getIconUMin(), cross.getIconVMax());
-
-                tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, cross.getIconUMax(), cross.getIconVMax());
-                tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, cross.getIconUMin(), cross.getIconVMax());
-                tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, cross.getIconUMin(), cross.getIconVMin());
-                tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, cross.getIconUMax(), cross.getIconVMin());
+                tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, cross.getIconUMax(), cross.getIconVMax());
+                tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, cross.getIconUMax(), cross.getIconVMin());
+                tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, cross.getIconUMin(), cross.getIconVMin());
+                tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, cross.getIconUMin(), cross.getIconVMax());
+
+                tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, cross.getIconUMax(), cross.getIconVMax());
+                tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, cross.getIconUMin(), cross.getIconVMax());
+                tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, cross.getIconUMin(), cross.getIconVMin());
+                tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, cross.getIconUMax(), cross.getIconVMin());
             }
 
         } else if (type == 1) { // East-West
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, straight.getIconUMin(), straight.getIconVMax());
-
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, straight.getIconUMin(), straight.getIconVMax());
+
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, straight.getIconUMax(), straight.getIconVMin());
         } else { // North-South
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMin());
-
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMax, (float)y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMin());
+
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMax, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y + renderOffset, zMin, straight.getIconUMin(), straight.getIconVMax());
         }
 
-        if (northUp){
-            tessellator.addVertexWithUV(xMin, (float)y + 1, z + renderOffset,   straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y,     z + renderOffset,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMax, (float)y,     z + renderOffset,   straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMax, (float)y + 1, z + renderOffset,   straight.getIconUMin(), straight.getIconVMax());
+        if (northUp) {
+            tessellator.addVertexWithUV(xMin, (float) y + 1, z + renderOffset, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y, z + renderOffset, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y, z + renderOffset, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y + 1, z + renderOffset, straight.getIconUMin(), straight.getIconVMax());
 
-            tessellator.addVertexWithUV(xMin, (float)y + 1, z + renderOffset,   straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMax, (float)y + 1, z + renderOffset,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMax, (float)y,     z + renderOffset,   straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y,     z + renderOffset,   straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + 1, z + renderOffset, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y + 1, z + renderOffset, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y, z + renderOffset, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y, z + renderOffset, straight.getIconUMax(), straight.getIconVMin());
         }
-        if (southUp){
-            tessellator.addVertexWithUV(xMax, (float)y + 1, z + 1 - renderOffset,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMax, (float)y,     z + 1 - renderOffset,   straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y,     z + 1 - renderOffset,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y + 1, z + 1 - renderOffset,   straight.getIconUMin(), straight.getIconVMin());
-
-            tessellator.addVertexWithUV(xMax, (float)y + 1, z + 1 - renderOffset,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(xMin, (float)y + 1, z + 1 - renderOffset,   straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMin, (float)y,     z + 1 - renderOffset,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(xMax, (float)y,     z + 1 - renderOffset,   straight.getIconUMax(), straight.getIconVMax());
+        if (southUp) {
+            tessellator.addVertexWithUV(xMax, (float) y + 1, z + 1 - renderOffset, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMax, (float) y, z + 1 - renderOffset, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y, z + 1 - renderOffset, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y + 1, z + 1 - renderOffset, straight.getIconUMin(), straight.getIconVMin());
+
+            tessellator.addVertexWithUV(xMax, (float) y + 1, z + 1 - renderOffset, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(xMin, (float) y + 1, z + 1 - renderOffset, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMin, (float) y, z + 1 - renderOffset, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(xMax, (float) y, z + 1 - renderOffset, straight.getIconUMax(), straight.getIconVMax());
         }
-        if (eastUp){
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y + 1, zMin,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y,     zMin,   straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y,     zMax,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y + 1, zMax,   straight.getIconUMin(), straight.getIconVMin());
-
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y + 1, zMin,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y + 1, zMax,   straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y,     zMax,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + 1 - renderOffset, (float)y,     zMin,   straight.getIconUMax(), straight.getIconVMax());
+        if (eastUp) {
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y + 1, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y, zMin, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y, zMax, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y + 1, zMax, straight.getIconUMin(), straight.getIconVMin());
+
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y + 1, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y + 1, zMax, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y, zMax, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + 1 - renderOffset, (float) y, zMin, straight.getIconUMax(), straight.getIconVMax());
         }
-        if (westUp){
-            tessellator.addVertexWithUV(x + renderOffset, (float)y + 1, zMin,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y + 1, zMax,   straight.getIconUMin(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y,     zMax,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y,     zMin,   straight.getIconUMax(), straight.getIconVMax());
-
-            tessellator.addVertexWithUV(x + renderOffset, (float)y + 1, zMin,   straight.getIconUMin(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y,     zMin,   straight.getIconUMax(), straight.getIconVMax());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y,     zMax,   straight.getIconUMax(), straight.getIconVMin());
-            tessellator.addVertexWithUV(x + renderOffset, (float)y + 1, zMax,   straight.getIconUMin(), straight.getIconVMin());
+        if (westUp) {
+            tessellator.addVertexWithUV(x + renderOffset, (float) y + 1, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y + 1, zMax, straight.getIconUMin(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y, zMax, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y, zMin, straight.getIconUMax(), straight.getIconVMax());
+
+            tessellator.addVertexWithUV(x + renderOffset, (float) y + 1, zMin, straight.getIconUMin(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y, zMin, straight.getIconUMax(), straight.getIconVMax());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y, zMax, straight.getIconUMax(), straight.getIconVMin());
+            tessellator.addVertexWithUV(x + renderOffset, (float) y + 1, zMax, straight.getIconUMin(), straight.getIconVMin());
         }
 
         return true;
     }
+
     @Override
     public boolean shouldItemRender3d() {
         return false;
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWool.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWool.java
index 8c00fc865..51517ce2f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWool.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelWool.java
@@ -6,22 +6,24 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockModelWool<T extends BlockLogic> extends BlockModelStandard<T> {
     public static final IconCoordinate[] texCoords = new IconCoordinate[DyeColor.COLOR_AMOUNT];
 
     static {
-        for (DyeColor c : DyeColor.blockOrderedColors()){
+        for (DyeColor c : DyeColor.blockOrderedColors()) {
             texCoords[c.blockMeta] = TextureRegistry.getTexture("minecraft:block/wool/" + c.colorID);
         }
     }
+
     public BlockModelWool(Block<T> block) {
         super(block);
     }
 
     @Override
-    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(Side side, int data) {
+    public @Nullable IconCoordinate getBlockTextureFromSideAndMetadata(@NotNull Side side, int data) {
         return texCoords[data & DyeColor.MASK_COLOR];
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/RenderBlocks.java b/game/client/src/main/java/net/minecraft/client/render/block/model/RenderBlocks.java
index 2cfc6e101..fedbd41da 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/RenderBlocks.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/RenderBlocks.java
@@ -3,9 +3,11 @@ package net.minecraft.client.render.block.model;
 import net.minecraft.client.render.LightingCache;
 import net.minecraft.client.render.LightmapHelper;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.util.phys.AABB;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
-import org.lwjgl.opengl.GL11;
+import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import net.minecraft.client.Minecraft;
 import net.minecraft.client.render.block.color.BlockColorDispatcher;
@@ -15,13 +17,11 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
-import org.jetbrains.annotations.NotNull;
 
 import static net.minecraft.client.render.block.model.BlockModel.FULL_CUBE_THRESHOLD;
 import static net.minecraft.client.render.block.model.BlockModel.SIDE_LIGHT_MULTIPLIER;
 
-public final class RenderBlocks
-{
+public final class RenderBlocks {
     public final Minecraft mc;
     public IconCoordinate overrideBlockTexture;
     public boolean flipTexture;
@@ -54,260 +54,284 @@ public final class RenderBlocks
     public boolean overbright;
     public LightingCache cache = new LightingCache();
 
-    public RenderBlocks()
-    {
-        overrideBlockTexture = null;
-        flipTexture = false;
-        renderAllFaces = false;
-        useInventoryTint = true;
-        uvRotateEast = 0;
-        uvRotateWest = 0;
-        uvRotateSouth = 0;
-        uvRotateNorth = 0;
-        uvRotateTop = 0;
-        uvRotateBottom = 0;
-        renderBitMask = 0;
+    public RenderBlocks() {
+        this.overrideBlockTexture = null;
+        this.flipTexture = false;
+        this.renderAllFaces = false;
+        this.useInventoryTint = true;
+        this.uvRotateEast = 0;
+        this.uvRotateWest = 0;
+        this.uvRotateSouth = 0;
+        this.uvRotateNorth = 0;
+        this.uvRotateTop = 0;
+        this.uvRotateBottom = 0;
+        this.renderBitMask = 0;
         this.mc = Minecraft.getMinecraft();
     }
 
-    public void resetRenderBlocks(){
-        renderAllFaces = false;
-        enableAO = false;
+    public void resetRenderBlocks() {
+        this.renderAllFaces = false;
+        this.enableAO = false;
 //        overbright = false;
-        useInventoryTint = true;
-        flipTexture = false;
-        overrideBlockTexture = null;
-        uvRotateEast = 0;
-        uvRotateWest = 0;
-        uvRotateSouth = 0;
-        uvRotateNorth = 0;
-        uvRotateTop = 0;
-        uvRotateBottom = 0;
-        renderBitMask = 0;
+        this.useInventoryTint = true;
+        this.flipTexture = false;
+        this.overrideBlockTexture = null;
+        this.uvRotateEast = 0;
+        this.uvRotateWest = 0;
+        this.uvRotateSouth = 0;
+        this.uvRotateNorth = 0;
+        this.uvRotateTop = 0;
+        this.uvRotateBottom = 0;
+        this.renderBitMask = 0;
     }
 
-    public void setRenderSide(Side side, boolean shouldRender){
-        if (!shouldRender){
-            renderBitMask |= (byte) (1 << side.getId());
+    public void setRenderSide(@NotNull Side side, boolean shouldRender) {
+        if (!shouldRender) {
+            this.renderBitMask |= (byte) (1 << side.getId());
         } else {
-            renderBitMask &= (byte) ~(1 << side.getId());
+            this.renderBitMask &= (byte) ~(1 << side.getId());
         }
     }
 
-    public float getBlockBrightness(WorldSource blockAccess, int x, int y, int z)
-    {
-        if (mc.fullbright) return 1.0f;
-        int id = blockAccess.getBlockId(x, y, z);
-        Block<?> block = blockAccess.getBlock(x, y, z);
-        if (block != null)
-        {
+    @Deprecated
+    public float getBlockBrightness(@NotNull WorldSource worldSource, int x, int y, int z) {
+        return getBlockBrightness(worldSource, new TilePos(x, y, z));
+    }
+
+    public float getBlockBrightness(@NotNull WorldSource worldSource, @NotNull TilePosc tilePos) {
+        if (this.mc.fullbright) return 1.0f;
+        int id = worldSource.getBlockId(tilePos);
+        Block<?> block = worldSource.getBlock(tilePos);
+        if (block != null) {
 
-            return block.getBlockBrightness(blockAccess, x, y, z);
+            return block.getBrightness(worldSource, tilePos);
         }
 
-        return blockAccess.getBrightness(x, y, z, Blocks.lightEmission[id]);
+        return worldSource.getBrightness(tilePos, Blocks.lightEmission[id]);
     }
 
-    public boolean renderStandardBlock(Tessellator tessellator, WorldSource worldSource, BlockModelStandard<?> blockModel, AABB bounds, int x, int y, int z)
-    {
-        int color = BlockColorDispatcher.getInstance().getDispatch(blockModel.block).getWorldColor(worldSource, x, y, z, 0);
-        float r = (float)(color >> 16 & 0xff) / 255F;
-        float g = (float)(color >> 8 & 0xff) / 255F;
-        float b = (float)(color & 0xff) / 255F;
-        return renderStandardBlock(tessellator, worldSource, blockModel, bounds, x, y, z, r, g, b);
+    @Deprecated
+    public boolean renderStandardBlock(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, int x, int y, int z) {
+        return renderStandardBlock(tessellator, worldSource, blockModel, bounds, new TilePos(x, y, z));
+    }
+
+    public boolean renderStandardBlock(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, @NotNull TilePosc tilePos) {
+        int color = BlockColorDispatcher.getInstance().getDispatch(blockModel.block).getWorldColor(worldSource, tilePos, 0);
+        float r = (float) (color >> 16 & 0xff) / 255F;
+        float g = (float) (color >> 8 & 0xff) / 255F;
+        float b = (float) (color & 0xff) / 255F;
+        return renderStandardBlock(tessellator, worldSource, blockModel, bounds, tilePos, r, g, b);
     }
 
     /**
      * @author CyborgCabbage
      * Thanks! :D
      */
-    public boolean renderStandardBlock(Tessellator tessellator, WorldSource worldSource, BlockModelStandard<?> blockModel, AABB bounds, int x, int y, int z, float r, float g, float b) {
+    @Deprecated
+    public boolean renderStandardBlock(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, int x, int y, int z, float r, float g, float b) {
+        return renderStandardBlock(tessellator, worldSource, blockModel, bounds, new TilePos(x, y, z), r, g, b);
+    }
+
+    public boolean renderStandardBlock(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, float r, float g, float b) {
         this.enableAO = true;
-        int meta = worldSource.getBlockMetadata(x, y, z);
-        cache.setupCache(blockModel.block, worldSource, x, y, z);
+        int meta = worldSource.getBlockData(tilePos);
+        this.cache.setupCache(blockModel.block, worldSource, tilePos);
         boolean somethingRendered = false;
-        for (Side side : Side.sides){
-            somethingRendered |= renderSide(tessellator, worldSource, blockModel, bounds, x, y, z, r, g, b, side, meta);
+        for (Side side : Side.sides) {
+            somethingRendered |= renderSide(tessellator, worldSource, blockModel, bounds, tilePos, r, g, b, side, meta);
         }
         this.enableAO = false;
         return somethingRendered;
     }
-    public boolean renderSide(Tessellator tessellator, WorldSource worldSource, BlockModelStandard<?> blockModel, AABB bounds, int x, int y, int z, float r, float g, float b, Side side, int meta){
+
+    @Deprecated
+    public boolean renderSide(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, int x, int y, int z, float r, float g, float b, @NotNull Side side, int meta) {
+        return renderSide(tessellator, worldSource, blockModel, bounds, new TilePos(x, y, z), r, g, b, side, meta);
+    }
+
+    public boolean renderSide(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, float r, float g, float b, @NotNull Side side, int meta) {
         boolean useColor;
-        switch (side){
-            case BOTTOM:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        0, -1, 0, (float)bounds.minY,
-                        0, 0, 1, (float)bounds.maxZ, (float)bounds.minZ,
-                        -1, 0, 0, 1-(float)bounds.minX, 1-(float)bounds.maxX);
-            case TOP:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        0,1,0, 1-(float)bounds.maxY,
-                        0,0,1, (float)bounds.maxZ, (float)bounds.minZ,
-                        1,0,0, (float)bounds.maxX, (float)bounds.minX);
-            case NORTH:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        0,0,-1, (float)bounds.minZ,
-                        -1,0,0, 1-(float)bounds.minX, 1-(float)bounds.maxX,
-                        0,1,0, (float)bounds.maxY, (float)bounds.minY);
-            case SOUTH:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        0,0,1, 1-(float)bounds.maxZ,
-                        0,1,0, (float)bounds.maxY, (float)bounds.minY,
-                        -1,0,0, 1-(float)bounds.minX, 1-(float)bounds.maxX);
-            case WEST:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        -1,0,0, (float)bounds.minX,
-                        0,0,1, (float)bounds.maxZ, (float)bounds.minZ,
-                        0,1,0, (float)bounds.maxY, (float)bounds.minY);
-            case EAST:
-                useColor = blockModel.shouldSideBeColored(worldSource, x, y, z, side, meta);
-                return renderSide(tessellator, worldSource, blockModel, bounds, x, y, z,
-                        useColor ? r : 1, useColor ? g : 1, useColor ? b : 1,side, meta,
-                        1,0,0, 1-(float)bounds.maxX,
-                        0,0,1, (float)bounds.maxZ, (float)bounds.minZ,
-                        0,-1,0, 1-(float)bounds.minY, 1-(float)bounds.maxY);
-            default:
-                throw new IllegalArgumentException("Side " + side + " not expected!");
-        }
+        return switch (side) {
+            case BOTTOM -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    0, -1, 0, (float) bounds.minY(),
+                    0, 0, 1, (float) bounds.maxZ(), (float) bounds.minZ(),
+                    -1, 0, 0, 1 - (float) bounds.minX(), 1 - (float) bounds.maxX());
+            }
+            case TOP -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    0, 1, 0, 1 - (float) bounds.maxY(),
+                    0, 0, 1, (float) bounds.maxZ(), (float) bounds.minZ(),
+                    1, 0, 0, (float) bounds.maxX(), (float) bounds.minX());
+            }
+            case NORTH -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    0, 0, -1, (float) bounds.minZ(),
+                    -1, 0, 0, 1 - (float) bounds.minX(), 1 - (float) bounds.maxX(),
+                    0, 1, 0, (float) bounds.maxY(), (float) bounds.minY());
+            }
+            case SOUTH -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    0, 0, 1, 1 - (float) bounds.maxZ(),
+                    0, 1, 0, (float) bounds.maxY(), (float) bounds.minY(),
+                    -1, 0, 0, 1 - (float) bounds.minX(), 1 - (float) bounds.maxX());
+            }
+            case WEST -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    -1, 0, 0, (float) bounds.minX(),
+                    0, 0, 1, (float) bounds.maxZ(), (float) bounds.minZ(),
+                    0, 1, 0, (float) bounds.maxY(), (float) bounds.minY());
+            }
+            case EAST -> {
+                useColor = blockModel.shouldSideBeColored(worldSource, tilePos, side, meta);
+                yield renderSide(tessellator, worldSource, blockModel, bounds, tilePos,
+                    useColor ? r : 1, useColor ? g : 1, useColor ? b : 1, side, meta,
+                    1, 0, 0, 1 - (float) bounds.maxX(),
+                    0, 0, 1, (float) bounds.maxZ(), (float) bounds.minZ(),
+                    0, -1, 0, 1 - (float) bounds.minY(), 1 - (float) bounds.maxY());
+            }
+            default -> throw new IllegalArgumentException("Side " + side + " not expected!");
+        };
     }
 
     /**
      * @author CyborgCabbage
      * Thanks! :D
      */
-    public boolean renderSide(Tessellator tessellator, WorldSource worldSource, BlockModelStandard<?> blockModel, AABB bounds, int x, int y, int z, float r, float g, float b, @NotNull Side side, int meta,
+    public boolean renderSide(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModelStandard<?> blockModel, @NotNull AABBdc bounds,
+                              @NotNull TilePosc tilePos, float r, float g, float b, @NotNull Side side, int meta,
                               int dirX, int dirY, int dirZ, float depth,
                               int topX, int topY, int topZ, float topP, float botP,
                               int lefX, int lefY, int lefZ, float lefP, float rigP
-    ){
+    ) {
         IconCoordinate tex;
         if (this.overbright) {
-            tex = blockModel.getBlockOverbrightTexture(worldSource, x, y, z, side);
+            tex = blockModel.getBlockOverbrightTexture(worldSource, tilePos, side);
         } else {
-            tex = blockModel.getBlockTexture(worldSource, x, y, z, side);
+            tex = blockModel.getBlockTexture(worldSource, tilePos, side);
         }
-        if (tex == null || ((renderBitMask >> side.getId()) & 1) != 0) return false;
+        if (tex == null || ((this.renderBitMask >> side.getId()) & 1) != 0) return false;
 
         boolean rendered = false;
-        if (this.renderAllFaces || blockModel.shouldSideBeRendered(worldSource, bounds, x+dirX, y+dirY, z+dirZ, side, meta)) {
-        	
-            setupLighting(blockModel.block, worldSource, x, y, z, r, g, b, side,
+        if (this.renderAllFaces || blockModel.shouldSideBeRendered(worldSource, bounds, tilePos.add(dirX, dirY, dirZ, new TilePos()), side, meta)) {
+
+            setupLighting(worldSource, blockModel.block, tilePos, r, g, b, side,
                 dirX, dirY, dirZ, depth,
-                    topX, topY, topZ, topP, botP,
-                    lefX, lefY, lefZ, lefP, rigP);
+                topX, topY, topZ, topP, botP,
+                lefX, lefY, lefZ, lefP, rigP);
 
             switch (side) {
                 case BOTTOM:
-                    this.renderBottomFace(tessellator, bounds, x, y, z, tex);
+                    this.renderBottomFace(tessellator, bounds, tilePos, tex);
                     break;
                 case TOP:
-                    this.renderTopFace(tessellator, bounds, x, y, z, tex);
+                    this.renderTopFace(tessellator, bounds, tilePos, tex);
                     break;
                 case NORTH:
-                    this.renderNorthFace(tessellator, bounds, x, y, z, tex);
+                    this.renderNorthFace(tessellator, bounds, tilePos, tex);
                     break;
                 case SOUTH:
-                    this.renderSouthFace(tessellator, bounds, x, y, z, tex);
+                    this.renderSouthFace(tessellator, bounds, tilePos, tex);
                     break;
                 case WEST:
-                    this.renderWestFace(tessellator, bounds, x, y, z, tex);
+                    this.renderWestFace(tessellator, bounds, tilePos, tex);
                     break;
                 case EAST:
-                    this.renderEastFace(tessellator, bounds, x, y, z, tex);
+                    this.renderEastFace(tessellator, bounds, tilePos, tex);
                     break;
             }
             rendered = true;
         }
         return rendered;
     }
-    public void setupLighting(Block<?> block, WorldSource worldSource, int x, int y, int z, float r, float g, float b, @NotNull Side side,
+
+    public void setupLighting(@NotNull WorldSource worldSource, @NotNull Block<?> block, @NotNull TilePosc tilePos, float r, float g, float b, @NotNull Side side,
                               int dirX, int dirY, int dirZ, float depth,
                               int topX, int topY, int topZ, float topP, float botP,
-                              int lefX, int lefY, int lefZ, float lefP, float rigP){
-    	boolean ao = mc.isAmbientOcclusionEnabled() && block.emission == 0;
+                              int lefX, int lefY, int lefZ, float lefP, float rigP) {
+        boolean ao = this.mc.isAmbientOcclusionEnabled() && block.emission == 0;
         boolean isFullCube = depth <= FULL_CUBE_THRESHOLD;
 
-    	if(LightmapHelper.isLightmapEnabled()) {
-    		if(overbright) {
-    			int dirX2 = dirX;
-    			int dirY2 = dirY;
-    			int dirZ2 = dirZ;
-    			
-    			if(!isFullCube) {
-    				dirX2 = 0;
-    				dirY2 = 0;
-    				dirZ2 = 0;
-    			}
-    			
-    			int lmc = LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, dirX2, dirY2, dirZ2));
-    			
-        		lightmapCoordTopLeft = lightmapCoordBottomLeft = lightmapCoordBottomRight = lightmapCoordTopRight = lmc;
-    		}else {
-        		if(ao) {
-        			int dirX2 = dirX;
-        			int dirY2 = dirY;
-        			int dirZ2 = dirZ;
-        			
-        			if(!isFullCube) {
-        				dirX2 = 0;
-        				dirY2 = 0;
-        				dirZ2 = 0;
-        			}
-        			
-        			boolean topT = cache.getOpacity(dirX2 + topX, dirY2 + topY, dirZ2 + topZ);
-        			boolean botT = cache.getOpacity(dirX2 - topX, dirY2 - topY, dirZ2 - topZ);
-        			boolean lefT = cache.getOpacity(dirX2 + lefX, dirY2 + lefY, dirZ2 + lefZ);
-        			boolean rigT = cache.getOpacity(dirX2 - lefX, dirY2 - lefY, dirZ2 - lefZ);
-        			
-        			boolean topLefT = cache.getOpacity(dirX2 + topX + lefX, dirY2 + topY + lefY, dirZ2 + topZ + lefZ);
-        			boolean topRigT = cache.getOpacity(dirX2 + topX - lefX, dirY2 + topY - lefY, dirZ2 + topZ - lefZ);
-        			boolean botLefT = cache.getOpacity(dirX2 - topX + lefX, dirY2 - topY + lefY, dirZ2 - topZ + lefZ);
-        			boolean botRigT = cache.getOpacity(dirX2 - topX - lefX, dirY2 - topY - lefY, dirZ2 - topZ - lefZ);
-        			
-        			int lmcCen = cache.getLightmapCoord(dirX2, dirY2, dirZ2);
-        			
-        			int lmcTop = topT ? lmcCen : cache.getLightmapCoord(dirX2 + topX, dirY2 + topY, dirZ2 + topZ);
-        			int lmcBot = botT ? lmcCen : cache.getLightmapCoord(dirX2 - topX, dirY2 - topY, dirZ2 - topZ);
-        			int lmcLef = lefT ? lmcCen : cache.getLightmapCoord(dirX2 + lefX, dirY2 + lefY, dirZ2 + lefZ);
-        			int lmcRig = rigT ? lmcCen : cache.getLightmapCoord(dirX2 - lefX, dirY2 - lefY, dirZ2 - lefZ);
-
-        			int lmcTopLef = topT && lefT ? lmcLef : (topLefT ? lmcCen : cache.getLightmapCoord(dirX2 + topX + lefX, dirY2 + topY + lefY, dirZ2 + topZ + lefZ));
-        			int lmcBotLef = botT && lefT ? lmcLef : (botLefT ? lmcCen : cache.getLightmapCoord(dirX2 - topX + lefX, dirY2 - topY + lefY, dirZ2 - topZ + lefZ));
-        			int lmcTopRig = topT && rigT ? lmcRig : (topRigT ? lmcCen : cache.getLightmapCoord(dirX2 + topX - lefX, dirY2 + topY - lefY, dirZ2 + topZ - lefZ));
-        			int lmcBotRig = botT && rigT ? lmcRig : (botRigT ? lmcCen : cache.getLightmapCoord(dirX2 - topX - lefX, dirY2 - topY - lefY, dirZ2 - topZ - lefZ));
-
-        			lightmapCoordTopLeft     = LightmapHelper.avg(lmcCen, lmcLef, lmcTop, lmcTopLef);
-        			lightmapCoordTopRight    = LightmapHelper.avg(lmcCen, lmcRig, lmcTop, lmcTopRig);
-        			lightmapCoordBottomLeft  = LightmapHelper.avg(lmcCen, lmcLef, lmcBot, lmcBotLef);
-        			lightmapCoordBottomRight = LightmapHelper.avg(lmcCen, lmcRig, lmcBot, lmcBotRig);
-        		}else {
-        			int lmc;
-                	if(!isFullCube) {
-                		lmc = block.getLightmapCoord(worldSource, x, y, z);
-                	}else {
-                		lmc = block.getLightmapCoord(worldSource, x + dirX, y + dirY, z + dirZ);
-                	}
-            		lightmapCoordTopLeft = lightmapCoordBottomLeft = lightmapCoordBottomRight = lightmapCoordTopRight = lmc;
-        		}
-    		}
-    	}
-    	
+        if (LightmapHelper.isLightmapEnabled()) {
+            if (this.overbright) {
+                int dirX2 = dirX;
+                int dirY2 = dirY;
+                int dirZ2 = dirZ;
+
+                if (!isFullCube) {
+                    dirX2 = 0;
+                    dirY2 = 0;
+                    dirZ2 = 0;
+                }
+
+                int lmc = LightmapHelper.getOverbrightLightmapCoord(worldSource.getSavedLightValue(LightLayer.Sky, dirX2, dirY2, dirZ2));
+
+                this.lightmapCoordTopLeft = this.lightmapCoordBottomLeft = this.lightmapCoordBottomRight = this.lightmapCoordTopRight = lmc;
+            } else {
+                if (ao) {
+                    int dirX2 = dirX;
+                    int dirY2 = dirY;
+                    int dirZ2 = dirZ;
+
+                    if (!isFullCube) {
+                        dirX2 = 0;
+                        dirY2 = 0;
+                        dirZ2 = 0;
+                    }
+
+                    boolean topT = this.cache.getOpacity(dirX2 + topX, dirY2 + topY, dirZ2 + topZ);
+                    boolean botT = this.cache.getOpacity(dirX2 - topX, dirY2 - topY, dirZ2 - topZ);
+                    boolean lefT = this.cache.getOpacity(dirX2 + lefX, dirY2 + lefY, dirZ2 + lefZ);
+                    boolean rigT = this.cache.getOpacity(dirX2 - lefX, dirY2 - lefY, dirZ2 - lefZ);
+
+                    boolean topLefT = this.cache.getOpacity(dirX2 + topX + lefX, dirY2 + topY + lefY, dirZ2 + topZ + lefZ);
+                    boolean topRigT = this.cache.getOpacity(dirX2 + topX - lefX, dirY2 + topY - lefY, dirZ2 + topZ - lefZ);
+                    boolean botLefT = this.cache.getOpacity(dirX2 - topX + lefX, dirY2 - topY + lefY, dirZ2 - topZ + lefZ);
+                    boolean botRigT = this.cache.getOpacity(dirX2 - topX - lefX, dirY2 - topY - lefY, dirZ2 - topZ - lefZ);
+
+                    int lmcCen = this.cache.getLightmapCoord(dirX2, dirY2, dirZ2);
+
+                    int lmcTop = topT ? lmcCen : this.cache.getLightmapCoord(dirX2 + topX, dirY2 + topY, dirZ2 + topZ);
+                    int lmcBot = botT ? lmcCen : this.cache.getLightmapCoord(dirX2 - topX, dirY2 - topY, dirZ2 - topZ);
+                    int lmcLef = lefT ? lmcCen : this.cache.getLightmapCoord(dirX2 + lefX, dirY2 + lefY, dirZ2 + lefZ);
+                    int lmcRig = rigT ? lmcCen : this.cache.getLightmapCoord(dirX2 - lefX, dirY2 - lefY, dirZ2 - lefZ);
+
+                    int lmcTopLef = topT && lefT ? lmcLef : (topLefT ? lmcCen : this.cache.getLightmapCoord(dirX2 + topX + lefX, dirY2 + topY + lefY, dirZ2 + topZ + lefZ));
+                    int lmcBotLef = botT && lefT ? lmcLef : (botLefT ? lmcCen : this.cache.getLightmapCoord(dirX2 - topX + lefX, dirY2 - topY + lefY, dirZ2 - topZ + lefZ));
+                    int lmcTopRig = topT && rigT ? lmcRig : (topRigT ? lmcCen : this.cache.getLightmapCoord(dirX2 + topX - lefX, dirY2 + topY - lefY, dirZ2 + topZ - lefZ));
+                    int lmcBotRig = botT && rigT ? lmcRig : (botRigT ? lmcCen : this.cache.getLightmapCoord(dirX2 - topX - lefX, dirY2 - topY - lefY, dirZ2 - topZ - lefZ));
+
+                    this.lightmapCoordTopLeft = LightmapHelper.avg(lmcCen, lmcLef, lmcTop, lmcTopLef);
+                    this.lightmapCoordTopRight = LightmapHelper.avg(lmcCen, lmcRig, lmcTop, lmcTopRig);
+                    this.lightmapCoordBottomLeft = LightmapHelper.avg(lmcCen, lmcLef, lmcBot, lmcBotLef);
+                    this.lightmapCoordBottomRight = LightmapHelper.avg(lmcCen, lmcRig, lmcBot, lmcBotRig);
+                } else {
+                    int lmc;
+                    if (!isFullCube) {
+                        lmc = block.getLightmapCoord(worldSource, tilePos);
+                    } else {
+                        lmc = block.getLightmapCoord(worldSource, tilePos.add(dirX, dirY, dirZ, new TilePos()));
+                    }
+                    this.lightmapCoordTopLeft = this.lightmapCoordBottomLeft = this.lightmapCoordBottomRight = this.lightmapCoordTopRight = lmc;
+                }
+            }
+        }
+
         float lightTR;
         float lightBR;
         float lightBL;
         float lightTL;
-    	
+
         if (this.overbright) {
             lightTR = 1.0F;
             lightBR = 1.0F;
@@ -316,67 +340,64 @@ public final class RenderBlocks
         } else {
             if (ao) {
                 {
-                    float dirB = cache.getBrightness(dirX, dirY, dirZ);
-                    boolean lefT = cache.getOpacity(dirX + lefX, dirY + lefY, dirZ + lefZ);
-                    boolean botT = cache.getOpacity(dirX - topX, dirY - topY, dirZ - topZ);
-                    boolean topT = cache.getOpacity(dirX + topX, dirY + topY, dirZ + topZ);
-                    boolean rigT = cache.getOpacity(dirX - lefX, dirY - lefY, dirZ - lefZ);
-                    float lB = cache.getBrightness(dirX + lefX, dirY + lefY, dirZ + lefZ);
-                    float bB = cache.getBrightness(dirX - topX, dirY - topY, dirZ - topZ);
-                    float tB = cache.getBrightness(dirX + topX, dirY + topY, dirZ + topZ);
-                    float rB = cache.getBrightness(dirX - lefX, dirY - lefY, dirZ - lefZ);
-                    float blB = botT && lefT ? lB : cache.getBrightness(dirX + lefX - topX, dirY + lefY - topY, dirZ + lefZ - topZ);
-                    float tlB = topT && lefT ? lB : cache.getBrightness(dirX + lefX + topX, dirY + lefY + topY, dirZ + lefZ + topZ);
-                    float brB = botT && rigT ? rB : cache.getBrightness(dirX - lefX - topX, dirY - lefY - topY, dirZ - lefZ - topZ);
-                    float trB = topT && rigT ? rB : cache.getBrightness(dirX - lefX + topX, dirY - lefY + topY, dirZ - lefZ + topZ);
+                    float dirB = this.cache.getBrightness(dirX, dirY, dirZ);
+                    boolean lefT = this.cache.getOpacity(dirX + lefX, dirY + lefY, dirZ + lefZ);
+                    boolean botT = this.cache.getOpacity(dirX - topX, dirY - topY, dirZ - topZ);
+                    boolean topT = this.cache.getOpacity(dirX + topX, dirY + topY, dirZ + topZ);
+                    boolean rigT = this.cache.getOpacity(dirX - lefX, dirY - lefY, dirZ - lefZ);
+                    float lB = this.cache.getBrightness(dirX + lefX, dirY + lefY, dirZ + lefZ);
+                    float bB = this.cache.getBrightness(dirX - topX, dirY - topY, dirZ - topZ);
+                    float tB = this.cache.getBrightness(dirX + topX, dirY + topY, dirZ + topZ);
+                    float rB = this.cache.getBrightness(dirX - lefX, dirY - lefY, dirZ - lefZ);
+                    float blB = botT && lefT ? lB : this.cache.getBrightness(dirX + lefX - topX, dirY + lefY - topY, dirZ + lefZ - topZ);
+                    float tlB = topT && lefT ? lB : this.cache.getBrightness(dirX + lefX + topX, dirY + lefY + topY, dirZ + lefZ + topZ);
+                    float brB = botT && rigT ? rB : this.cache.getBrightness(dirX - lefX - topX, dirY - lefY - topY, dirZ - lefZ - topZ);
+                    float trB = topT && rigT ? rB : this.cache.getBrightness(dirX - lefX + topX, dirY - lefY + topY, dirZ - lefZ + topZ);
                     lightTL = (tlB + lB + tB + dirB) / 4.0F;
                     lightTR = (tB + dirB + trB + rB) / 4.0F;
                     lightBR = (dirB + bB + rB + brB) / 4.0F;
                     lightBL = (lB + blB + dirB + bB) / 4.0F;
                 }
-                if(!isFullCube){
-                    float dirB = cache.getBrightness(0, 0, 0);
-                    boolean lefT = cache.getOpacity(lefX, lefY, lefZ);
-                    boolean botT = cache.getOpacity(-topX, -topY, -topZ);
-                    boolean topT = cache.getOpacity(topX, topY, topZ);
-                    boolean rigT = cache.getOpacity(-lefX, -lefY, -lefZ);
-                    float lB = cache.getBrightness(lefX, lefY, lefZ);
-                    float bB = cache.getBrightness(-topX, -topY, -topZ);
-                    float tB = cache.getBrightness(topX, topY, topZ);
-                    float rB = cache.getBrightness(-lefX, -lefY, -lefZ);
-                    float blB = botT && lefT ? lB : cache.getBrightness(lefX - topX, lefY - topY, lefZ - topZ);
-                    float tlB = topT && lefT ? lB : cache.getBrightness(lefX + topX, lefY + topY, lefZ + topZ);
-                    float brB = botT && rigT ? rB : cache.getBrightness(-lefX - topX, -lefY - topY, -lefZ - topZ);
-                    float trB = topT && rigT ? rB : cache.getBrightness(-lefX + topX, -lefY + topY, -lefZ + topZ);
-                    lightTL = (tlB + lB + tB + dirB) / 4.0F * depth + lightTL*(1-depth);
-                    lightTR = (tB + dirB + trB + rB) / 4.0F * depth + lightTR*(1-depth);
-                    lightBR = (dirB + bB + rB + brB) / 4.0F * depth + lightBR*(1-depth);
-                    lightBL = (lB + blB + dirB + bB) / 4.0F * depth + lightBL*(1-depth);
+                if (!isFullCube) {
+                    float dirB = this.cache.getBrightness(0, 0, 0);
+                    boolean lefT = this.cache.getOpacity(lefX, lefY, lefZ);
+                    boolean botT = this.cache.getOpacity(-topX, -topY, -topZ);
+                    boolean topT = this.cache.getOpacity(topX, topY, topZ);
+                    boolean rigT = this.cache.getOpacity(-lefX, -lefY, -lefZ);
+                    float lB = this.cache.getBrightness(lefX, lefY, lefZ);
+                    float bB = this.cache.getBrightness(-topX, -topY, -topZ);
+                    float tB = this.cache.getBrightness(topX, topY, topZ);
+                    float rB = this.cache.getBrightness(-lefX, -lefY, -lefZ);
+                    float blB = botT && lefT ? lB : this.cache.getBrightness(lefX - topX, lefY - topY, lefZ - topZ);
+                    float tlB = topT && lefT ? lB : this.cache.getBrightness(lefX + topX, lefY + topY, lefZ + topZ);
+                    float brB = botT && rigT ? rB : this.cache.getBrightness(-lefX - topX, -lefY - topY, -lefZ - topZ);
+                    float trB = topT && rigT ? rB : this.cache.getBrightness(-lefX + topX, -lefY + topY, -lefZ + topZ);
+                    lightTL = (tlB + lB + tB + dirB) / 4.0F * depth + lightTL * (1 - depth);
+                    lightTR = (tB + dirB + trB + rB) / 4.0F * depth + lightTR * (1 - depth);
+                    lightBR = (dirB + bB + rB + brB) / 4.0F * depth + lightBR * (1 - depth);
+                    lightBL = (lB + blB + dirB + bB) / 4.0F * depth + lightBL * (1 - depth);
                 }
             } else {
                 int dirX2 = dirX;
                 int dirY2 = dirY;
                 int dirZ2 = dirZ;
 
-                if(!isFullCube) {
+                if (!isFullCube) {
                     dirX2 = 0;
                     dirY2 = 0;
                     dirZ2 = 0;
                 }
 
-                float brightness = cache.getBrightness(dirX2, dirY2, dirZ2);
+                float brightness = this.cache.getBrightness(dirX2, dirY2, dirZ2);
                 lightTL = lightBL = lightBR = lightTR = brightness;
             }
         }
 
-        if (overbright || !BlockModel.ENABLE_DIRECTIONAL_LIGHTING)
-        {
+        if (this.overbright || !BlockModel.ENABLE_DIRECTIONAL_LIGHTING) {
             this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = r;
             this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = g;
             this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = b;
-        }
-        else
-        {
+        } else {
             this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = r * SIDE_LIGHT_MULTIPLIER[side.getId()];
             this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = g * SIDE_LIGHT_MULTIPLIER[side.getId()];
             this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = b * SIDE_LIGHT_MULTIPLIER[side.getId()];
@@ -406,21 +427,22 @@ public final class RenderBlocks
         this.colorBlueTopRight *= ltr;
     }
 
-    public void renderBottomFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderBottomFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderBottomFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderBottomFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double d3 = tex.getSubIconU(bounds.minX);
-        double d4 = tex.getSubIconU(bounds.maxX);
-        double d5 = tex.getSubIconV(bounds.minZ);
-        double d6 = tex.getSubIconV(bounds.maxZ);
-        if(bounds.minX < 0.0D || bounds.maxX > 1.0D)
-        {
+        double d3 = tex.getSubIconU(bounds.minX());
+        double d4 = tex.getSubIconU(bounds.maxX());
+        double d5 = tex.getSubIconV(bounds.minZ());
+        double d6 = tex.getSubIconV(bounds.maxZ());
+        if (bounds.minX() < 0.0D || bounds.maxX() > 1.0D) {
             d3 = tex.getIconUMin();
             d4 = tex.getIconUMax();
         }
-        if(bounds.minZ < 0.0D || bounds.maxZ > 1.0D)
-        {
+        if (bounds.minZ() < 0.0D || bounds.maxZ() > 1.0D) {
             d5 = tex.getIconVMin();
             d6 = tex.getIconVMax();
         }
@@ -428,64 +450,57 @@ public final class RenderBlocks
         double d8 = d3;
         double d9 = d5;
         double d10 = d6;
-        if(uvRotateBottom == 2)
-        {
-            d3 = tex.getSubIconU(bounds.minZ);
-            d5 = tex.getSubIconV(1 - bounds.maxX);
-            d4 = tex.getSubIconU(bounds.maxZ);
-            d6 = tex.getSubIconV(1 - bounds.minX);
+        if (this.uvRotateBottom == 2) {
+            d3 = tex.getSubIconU(bounds.minZ());
+            d5 = tex.getSubIconV(1 - bounds.maxX());
+            d4 = tex.getSubIconU(bounds.maxZ());
+            d6 = tex.getSubIconV(1 - bounds.minX());
             d9 = d5;
             d10 = d6;
             d7 = d3;
             d8 = d4;
             d5 = d6;
             d6 = d9;
-        } else
-        if(uvRotateBottom == 1)
-        {
-            d3 = tex.getSubIconU(1 - bounds.maxZ);
-            d5 = tex.getSubIconV(bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.minZ);
-            d6 = tex.getSubIconV(bounds.maxX);
+        } else if (this.uvRotateBottom == 1) {
+            d3 = tex.getSubIconU(1 - bounds.maxZ());
+            d5 = tex.getSubIconV(bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.minZ());
+            d6 = tex.getSubIconV(bounds.maxX());
             d7 = d4;
             d8 = d3;
             d3 = d7;
             d4 = d8;
             d9 = d6;
             d10 = d5;
-        } else
-        if(uvRotateBottom == 3)
-        {
-            d3 = tex.getSubIconU(1 - bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.maxX);
-            d5 = tex.getSubIconV(1 - bounds.minZ);
-            d6 = tex.getSubIconV(1 - bounds.maxZ);
+        } else if (this.uvRotateBottom == 3) {
+            d3 = tex.getSubIconU(1 - bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.maxX());
+            d5 = tex.getSubIconV(1 - bounds.minZ());
+            d6 = tex.getSubIconV(1 - bounds.maxZ());
             d7 = d4;
             d8 = d3;
             d9 = d5;
             d10 = d6;
         }
-        double d11 = x + bounds.minX;
-        double d12 = x + bounds.maxX;
-        double d13 = y + bounds.minY;
-        double d14 = z + bounds.minZ;
-        double d15 = z + bounds.maxZ;
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        double d11 = x + bounds.minX();
+        double d12 = x + bounds.maxX();
+        double d13 = y + bounds.minY();
+        double d14 = z + bounds.minZ();
+        double d15 = z + bounds.maxZ();
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(d11, d13, d15, d8, d10);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(d11, d13, d14, d3, d5);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(d12, d13, d14, d7, d9);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(d12, d13, d15, d4, d6);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(d11, d13, d15, d8, d10);
             tessellator.addVertexWithUV(d11, d13, d14, d3, d5);
             tessellator.addVertexWithUV(d12, d13, d14, d7, d9);
@@ -493,21 +508,22 @@ public final class RenderBlocks
         }
     }
 
-    public void renderTopFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderTopFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderTopFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderTopFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double d3 = tex.getSubIconU(bounds.minX);
-        double d4 = tex.getSubIconU(bounds.maxX);
-        double d5 = tex.getSubIconV(bounds.minZ);
-        double d6 = tex.getSubIconV(bounds.maxZ);
-        if(bounds.minX < 0.0D || bounds.maxX > 1.0D)
-        {
+        double d3 = tex.getSubIconU(bounds.minX());
+        double d4 = tex.getSubIconU(bounds.maxX());
+        double d5 = tex.getSubIconV(bounds.minZ());
+        double d6 = tex.getSubIconV(bounds.maxZ());
+        if (bounds.minX() < 0.0D || bounds.maxX() > 1.0D) {
             d3 = tex.getIconUMin();
             d4 = tex.getIconUMax();
         }
-        if(bounds.minZ < 0.0D || bounds.maxZ > 1.0D)
-        {
+        if (bounds.minZ() < 0.0D || bounds.maxZ() > 1.0D) {
             d5 = tex.getIconVMin();
             d6 = tex.getIconVMax();
         }
@@ -515,64 +531,57 @@ public final class RenderBlocks
         double d8 = d3;
         double d9 = d5;
         double d10 = d6;
-        if(uvRotateTop == 1)
-        {
-            d3 = tex.getSubIconU(bounds.minZ);
-            d5 = tex.getSubIconV(1 - bounds.maxX);
-            d4 = tex.getSubIconU(bounds.maxZ);
-            d6 = tex.getSubIconV(1 - bounds.minX);
+        if (this.uvRotateTop == 1) {
+            d3 = tex.getSubIconU(bounds.minZ());
+            d5 = tex.getSubIconV(1 - bounds.maxX());
+            d4 = tex.getSubIconU(bounds.maxZ());
+            d6 = tex.getSubIconV(1 - bounds.minX());
             d9 = d5;
             d10 = d6;
             d7 = d3;
             d8 = d4;
             d5 = d6;
             d6 = d9;
-        } else
-        if(uvRotateTop == 2)
-        {
-            d3 = tex.getSubIconU(1 - bounds.maxZ);
-            d5 = tex.getSubIconV(bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.minZ);
-            d6 = tex.getSubIconV(bounds.maxX);
+        } else if (this.uvRotateTop == 2) {
+            d3 = tex.getSubIconU(1 - bounds.maxZ());
+            d5 = tex.getSubIconV(bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.minZ());
+            d6 = tex.getSubIconV(bounds.maxX());
             d7 = d4;
             d8 = d3;
             d3 = d7;
             d4 = d8;
             d9 = d6;
             d10 = d5;
-        } else
-        if(uvRotateTop == 3)
-        {
-            d3 = tex.getSubIconU(1 - bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.maxX);
-            d5 = tex.getSubIconV(1 - bounds.minZ);
-            d6 = tex.getSubIconV(1 - bounds.maxZ);
+        } else if (this.uvRotateTop == 3) {
+            d3 = tex.getSubIconU(1 - bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.maxX());
+            d5 = tex.getSubIconV(1 - bounds.minZ());
+            d6 = tex.getSubIconV(1 - bounds.maxZ());
             d7 = d4;
             d8 = d3;
             d9 = d5;
             d10 = d6;
         }
-        double d11 = x + bounds.minX;
-        double d12 = x + bounds.maxX;
-        double d13 = y + bounds.maxY;
-        double d14 = z + bounds.minZ;
-        double d15 = z + bounds.maxZ;
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        double d11 = x + bounds.minX();
+        double d12 = x + bounds.maxX();
+        double d13 = y + bounds.maxY();
+        double d14 = z + bounds.minZ();
+        double d15 = z + bounds.maxZ();
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(d12, d13, d15, d4, d6);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(d12, d13, d14, d7, d9);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(d11, d13, d14, d3, d5);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(d11, d13, d15, d8, d10);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(d12, d13, d15, d4, d6);
             tessellator.addVertexWithUV(d12, d13, d14, d7, d9);
             tessellator.addVertexWithUV(d11, d13, d14, d3, d5);
@@ -580,27 +589,27 @@ public final class RenderBlocks
         }
     }
 
-    public void renderNorthFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderNorthFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderNorthFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderNorthFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double d3 = tex.getSubIconU(bounds.minX);
-        double d4 = tex.getSubIconU(bounds.maxX);
-        double d5 = tex.getSubIconV(1 - bounds.maxY);
-        double d6 = tex.getSubIconV(1 - bounds.minY);
-        if(flipTexture)
-        {
+        double d3 = tex.getSubIconU(bounds.minX());
+        double d4 = tex.getSubIconU(bounds.maxX());
+        double d5 = tex.getSubIconV(1 - bounds.maxY());
+        double d6 = tex.getSubIconV(1 - bounds.minY());
+        if (this.flipTexture) {
             double d7 = d3;
             d3 = d4;
             d4 = d7;
         }
-        if(bounds.minX < 0.0D || bounds.maxX > 1.0D)
-        {
+        if (bounds.minX() < 0.0D || bounds.maxX() > 1.0D) {
             d3 = tex.getIconUMin();
             d4 = tex.getIconUMax();
         }
-        if(bounds.minY < 0.0D || bounds.maxY > 1.0D)
-        {
+        if (bounds.minY() < 0.0D || bounds.maxY() > 1.0D) {
             d5 = tex.getIconVMin();
             d6 = tex.getIconVMax();
         }
@@ -608,64 +617,57 @@ public final class RenderBlocks
         double d9 = d3;
         double d10 = d5;
         double d11 = d6;
-        if(uvRotateEast == 2)
-        {
-            d3 = tex.getSubIconU(bounds.minY);
-            d5 = tex.getSubIconV(1 - bounds.minX);
-            d4 = tex.getSubIconU(bounds.maxY);
-            d6 = tex.getSubIconV(1 - bounds.maxX);
+        if (this.uvRotateEast == 2) {
+            d3 = tex.getSubIconU(bounds.minY());
+            d5 = tex.getSubIconV(1 - bounds.minX());
+            d4 = tex.getSubIconU(bounds.maxY());
+            d6 = tex.getSubIconV(1 - bounds.maxX());
             d10 = d5;
             d11 = d6;
             d8 = d3;
             d9 = d4;
             d5 = d6;
             d6 = d10;
-        } else
-        if(uvRotateEast == 1)
-        {
-            d3 = tex.getSubIconU(1 - bounds.maxY);
-            d5 = tex.getSubIconV(bounds.maxX);
-            d4 = tex.getSubIconU(1 - bounds.minY);
-            d6 = tex.getSubIconV(bounds.minX);
+        } else if (this.uvRotateEast == 1) {
+            d3 = tex.getSubIconU(1 - bounds.maxY());
+            d5 = tex.getSubIconV(bounds.maxX());
+            d4 = tex.getSubIconU(1 - bounds.minY());
+            d6 = tex.getSubIconV(bounds.minX());
             d8 = d4;
             d9 = d3;
             d3 = d8;
             d4 = d9;
             d10 = d6;
             d11 = d5;
-        } else
-        if(uvRotateEast == 3)
-        {
-            d3 = tex.getSubIconU(1 - bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.maxX);
-            d5 = tex.getSubIconV(bounds.maxY);
-            d6 = tex.getSubIconV(bounds.minY);
+        } else if (this.uvRotateEast == 3) {
+            d3 = tex.getSubIconU(1 - bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.maxX());
+            d5 = tex.getSubIconV(bounds.maxY());
+            d6 = tex.getSubIconV(bounds.minY());
             d8 = d4;
             d9 = d3;
             d10 = d5;
             d11 = d6;
         }
-        double d12 = x + bounds.minX;
-        double d13 = x + bounds.maxX;
-        double d14 = y + bounds.minY;
-        double d15 = y + bounds.maxY;
-        double d16 = z + bounds.minZ;
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        double d12 = x + bounds.minX();
+        double d13 = x + bounds.maxX();
+        double d14 = y + bounds.minY();
+        double d15 = y + bounds.maxY();
+        double d16 = z + bounds.minZ();
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(d12, d15, d16, d8, d10);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(d13, d15, d16, d3, d5);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(d13, d14, d16, d9, d11);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(d12, d14, d16, d4, d6);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(d12, d15, d16, d8, d10);
             tessellator.addVertexWithUV(d13, d15, d16, d3, d5);
             tessellator.addVertexWithUV(d13, d14, d16, d9, d11);
@@ -673,27 +675,27 @@ public final class RenderBlocks
         }
     }
 
-    public void renderSouthFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderSouthFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderSouthFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderSouthFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double d3 = tex.getSubIconU(bounds.minX);
-        double d4 = tex.getSubIconU(bounds.maxX);
-        double d5 = tex.getSubIconV(1 - bounds.maxY);
-        double d6 = tex.getSubIconV(1 - bounds.minY);
-        if(flipTexture)
-        {
+        double d3 = tex.getSubIconU(bounds.minX());
+        double d4 = tex.getSubIconU(bounds.maxX());
+        double d5 = tex.getSubIconV(1 - bounds.maxY());
+        double d6 = tex.getSubIconV(1 - bounds.minY());
+        if (this.flipTexture) {
             double d7 = d3;
             d3 = d4;
             d4 = d7;
         }
-        if(bounds.minX < 0.0D || bounds.maxX > 1.0D)
-        {
+        if (bounds.minX() < 0.0D || bounds.maxX() > 1.0D) {
             d3 = tex.getIconUMin();
             d4 = tex.getIconUMax();
         }
-        if(bounds.minY < 0.0D || bounds.maxY > 1.0D)
-        {
+        if (bounds.minY() < 0.0D || bounds.maxY() > 1.0D) {
             d5 = tex.getIconVMin();
             d6 = tex.getIconVMax();
         }
@@ -701,64 +703,57 @@ public final class RenderBlocks
         double d9 = d3;
         double d10 = d5;
         double d11 = d6;
-        if(uvRotateWest == 1)
-        {
-            d3 = tex.getSubIconU(bounds.minY);
-            d6 = tex.getSubIconV(1 - bounds.minX);
-            d4 = tex.getSubIconU(bounds.maxY);
-            d5 = tex.getSubIconV(1 - bounds.maxX);
+        if (this.uvRotateWest == 1) {
+            d3 = tex.getSubIconU(bounds.minY());
+            d6 = tex.getSubIconV(1 - bounds.minX());
+            d4 = tex.getSubIconU(bounds.maxY());
+            d5 = tex.getSubIconV(1 - bounds.maxX());
             d10 = d5;
             d11 = d6;
             d8 = d3;
             d9 = d4;
             d5 = d6;
             d6 = d10;
-        } else
-        if(uvRotateWest == 2)
-        {
-            d3 = tex.getSubIconU(1 - bounds.maxY);
-            d5 = tex.getSubIconV(bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.minY);
-            d6 = tex.getSubIconV(bounds.maxX);
+        } else if (this.uvRotateWest == 2) {
+            d3 = tex.getSubIconU(1 - bounds.maxY());
+            d5 = tex.getSubIconV(bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.minY());
+            d6 = tex.getSubIconV(bounds.maxX());
             d8 = d4;
             d9 = d3;
             d3 = d8;
             d4 = d9;
             d10 = d6;
             d11 = d5;
-        } else
-        if(uvRotateWest == 3)
-        {
-            d3 = tex.getSubIconU(1 - bounds.minX);
-            d4 = tex.getSubIconU(1 - bounds.maxX);
-            d5 = tex.getSubIconV(bounds.maxY);
-            d6 = tex.getSubIconV(bounds.minY);
+        } else if (this.uvRotateWest == 3) {
+            d3 = tex.getSubIconU(1 - bounds.minX());
+            d4 = tex.getSubIconU(1 - bounds.maxX());
+            d5 = tex.getSubIconV(bounds.maxY());
+            d6 = tex.getSubIconV(bounds.minY());
             d8 = d4;
             d9 = d3;
             d10 = d5;
             d11 = d6;
         }
-        double x0 = x + bounds.minX;
-        double x1 = x + bounds.maxX;
-        double y0 = y + bounds.minY;
-        double y1 = y + bounds.maxY;
-        double z0 = z + bounds.maxZ;
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        double x0 = x + bounds.minX();
+        double x1 = x + bounds.maxX();
+        double y0 = y + bounds.minY();
+        double y1 = y + bounds.maxY();
+        double z0 = z + bounds.maxZ();
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(x0, y1, z0, d3, d5);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(x0, y0, z0, d9, d11);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(x1, y0, z0, d4, d6);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(x1, y1, z0, d8, d10);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(x0, y1, z0, d3, d5);
             tessellator.addVertexWithUV(x0, y0, z0, d9, d11);
             tessellator.addVertexWithUV(x1, y0, z0, d4, d6);
@@ -766,27 +761,27 @@ public final class RenderBlocks
         }
     }
 
-    public void renderWestFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderWestFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderWestFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderWestFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double d3 = tex.getSubIconU(bounds.minZ);
-        double d4 = tex.getSubIconU(bounds.maxZ);
-        double d5 = tex.getSubIconV(1 - bounds.maxY);
-        double d6 = tex.getSubIconV(1 - bounds.minY);
-        if(flipTexture)
-        {
+        double d3 = tex.getSubIconU(bounds.minZ());
+        double d4 = tex.getSubIconU(bounds.maxZ());
+        double d5 = tex.getSubIconV(1 - bounds.maxY());
+        double d6 = tex.getSubIconV(1 - bounds.minY());
+        if (this.flipTexture) {
             double d7 = d3;
             d3 = d4;
             d4 = d7;
         }
-        if(bounds.minZ < 0.0D || bounds.maxZ > 1.0D)
-        {
+        if (bounds.minZ() < 0.0D || bounds.maxZ() > 1.0D) {
             d3 = tex.getIconUMin();
             d4 = tex.getIconUMax();
         }
-        if(bounds.minY < 0.0D || bounds.maxY > 1.0D)
-        {
+        if (bounds.minY() < 0.0D || bounds.maxY() > 1.0D) {
             d5 = tex.getIconVMin();
             d6 = tex.getIconVMax();
         }
@@ -794,64 +789,57 @@ public final class RenderBlocks
         double d9 = d3;
         double d10 = d5;
         double d11 = d6;
-        if(uvRotateNorth == 1)
-        {
-            d3 = tex.getSubIconU(bounds.minY);
-            d5 = tex.getSubIconV(1 - bounds.maxZ);
-            d4 = tex.getSubIconU(bounds.maxY);
-            d6 = tex.getSubIconV(1 - bounds.minZ);
+        if (this.uvRotateNorth == 1) {
+            d3 = tex.getSubIconU(bounds.minY());
+            d5 = tex.getSubIconV(1 - bounds.maxZ());
+            d4 = tex.getSubIconU(bounds.maxY());
+            d6 = tex.getSubIconV(1 - bounds.minZ());
             d10 = d5;
             d11 = d6;
             d8 = d3;
             d9 = d4;
             d5 = d6;
             d6 = d10;
-        } else
-        if(uvRotateNorth == 2)
-        {
-            d3 = tex.getSubIconU(1 - bounds.maxY);
-            d5 = tex.getSubIconV(bounds.minZ);
-            d4 = tex.getSubIconU(1 - bounds.minY);
-            d6 = tex.getSubIconV(bounds.maxZ);
+        } else if (this.uvRotateNorth == 2) {
+            d3 = tex.getSubIconU(1 - bounds.maxY());
+            d5 = tex.getSubIconV(bounds.minZ());
+            d4 = tex.getSubIconU(1 - bounds.minY());
+            d6 = tex.getSubIconV(bounds.maxZ());
             d8 = d4;
             d9 = d3;
             d3 = d8;
             d4 = d9;
             d10 = d6;
             d11 = d5;
-        } else
-        if(uvRotateNorth == 3)
-        {
-            d3 = tex.getSubIconU(1 - bounds.minZ);
-            d4 = tex.getSubIconU(1 - bounds.maxZ);
-            d5 = tex.getSubIconV(bounds.maxY);
-            d6 = tex.getSubIconV(bounds.minY);
+        } else if (this.uvRotateNorth == 3) {
+            d3 = tex.getSubIconU(1 - bounds.minZ());
+            d4 = tex.getSubIconU(1 - bounds.maxZ());
+            d5 = tex.getSubIconV(bounds.maxY());
+            d6 = tex.getSubIconV(bounds.minY());
             d8 = d4;
             d9 = d3;
             d10 = d5;
             d11 = d6;
         }
-        double d12 = x + bounds.minX;
-        double d13 = y + bounds.minY;
-        double d14 = y + bounds.maxY;
-        double d15 = z + bounds.minZ;
-        double d16 = z + bounds.maxZ;
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        double d12 = x + bounds.minX();
+        double d13 = y + bounds.minY();
+        double d14 = y + bounds.maxY();
+        double d15 = z + bounds.minZ();
+        double d16 = z + bounds.maxZ();
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(d12, d14, d16, d8, d10);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(d12, d14, d15, d3, d5);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(d12, d13, d15, d9, d11);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(d12, d13, d16, d4, d6);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(d12, d14, d16, d8, d10);
             tessellator.addVertexWithUV(d12, d14, d15, d3, d5);
             tessellator.addVertexWithUV(d12, d13, d15, d9, d11);
@@ -859,27 +847,27 @@ public final class RenderBlocks
         }
     }
 
-    public void renderEastFace(Tessellator tessellator, AABB bounds, double x, double y, double z, IconCoordinate tex)
-    {
-        if(overrideBlockTexture != null) tex = overrideBlockTexture;
+    public void renderEastFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, @NotNull TilePosc tilePos, @Nullable IconCoordinate tex) {
+        renderEastFace(tessellator, bounds, tilePos.x(), tilePos.y(), tilePos.z(), tex);
+    }
+
+    public void renderEastFace(@NotNull Tessellator tessellator, @NotNull AABBdc bounds, double x, double y, double z, @Nullable IconCoordinate tex) {
+        if (this.overrideBlockTexture != null) tex = this.overrideBlockTexture;
         if (tex == null) return;
-        double uMin = tex.getSubIconU(bounds.minZ);
-        double uMax = tex.getSubIconU(bounds.maxZ);
-        double vMin = tex.getSubIconV(1 - bounds.maxY);
-        double vMax = tex.getSubIconV(1 - bounds.minY);
-        if(flipTexture)
-        {
+        double uMin = tex.getSubIconU(bounds.minZ());
+        double uMax = tex.getSubIconU(bounds.maxZ());
+        double vMin = tex.getSubIconV(1 - bounds.maxY());
+        double vMax = tex.getSubIconV(1 - bounds.minY());
+        if (this.flipTexture) {
             double _uMin = uMin;
             uMin = uMax;
             uMax = _uMin;
         }
-        if(bounds.minZ < 0.0D || bounds.maxZ > 1.0D)
-        {
+        if (bounds.minZ() < 0.0D || bounds.maxZ() > 1.0D) {
             uMin = tex.getIconUMin();
             uMax = tex.getIconUMax();
         }
-        if(bounds.minY < 0.0D || bounds.maxY > 1.0D)
-        {
+        if (bounds.minY() < 0.0D || bounds.maxY() > 1.0D) {
             vMin = tex.getIconVMin();
             vMax = tex.getIconVMax();
         }
@@ -887,65 +875,58 @@ public final class RenderBlocks
         double uMin2 = uMin;
         double vMin2 = vMin;
         double vMax2 = vMax;
-        if(uvRotateSouth == 2)
-        {
-            uMin = tex.getSubIconU(bounds.minY);
-            vMin = tex.getSubIconV(1 - bounds.minZ);
-            uMax = tex.getSubIconU(bounds.maxY);
-            vMax = tex.getSubIconV(1 - bounds.maxZ);
+        if (this.uvRotateSouth == 2) {
+            uMin = tex.getSubIconU(bounds.minY());
+            vMin = tex.getSubIconV(1 - bounds.minZ());
+            uMax = tex.getSubIconU(bounds.maxY());
+            vMax = tex.getSubIconV(1 - bounds.maxZ());
             vMin2 = vMin;
             vMax2 = vMax;
             uMax2 = uMin;
             uMin2 = uMax;
             vMin = vMax;
             vMax = vMin2;
-        } else
-        if(uvRotateSouth == 1)
-        {
-            uMin = tex.getSubIconU(1 - bounds.maxY);
-            vMin = tex.getSubIconV(bounds.maxZ);
-            uMax = tex.getSubIconU(1 - bounds.minY);
-            vMax = tex.getSubIconV(bounds.minZ);
+        } else if (this.uvRotateSouth == 1) {
+            uMin = tex.getSubIconU(1 - bounds.maxY());
+            vMin = tex.getSubIconV(bounds.maxZ());
+            uMax = tex.getSubIconU(1 - bounds.minY());
+            vMax = tex.getSubIconV(bounds.minZ());
             uMax2 = uMax;
             uMin2 = uMin;
             uMin = uMax2;
             uMax = uMin2;
             vMin2 = vMax;
             vMax2 = vMin;
-        } else
-        if(uvRotateSouth == 3)
-        {
-            uMin = tex.getSubIconU(1 - bounds.minZ);
-            uMax = tex.getSubIconU(1 - bounds.maxZ);
-            vMin = tex.getSubIconV(bounds.maxY);
-            vMax = tex.getSubIconV(bounds.minY);
+        } else if (this.uvRotateSouth == 3) {
+            uMin = tex.getSubIconU(1 - bounds.minZ());
+            uMax = tex.getSubIconU(1 - bounds.maxZ());
+            vMin = tex.getSubIconV(bounds.maxY());
+            vMax = tex.getSubIconV(bounds.minY());
             uMax2 = uMax;
             uMin2 = uMin;
             vMin2 = vMin;
             vMax2 = vMax;
         }
-        double xMax = x + bounds.maxX;
-        double yMin = y + bounds.minY;
-        double yMax = y + bounds.maxY;
-        double zMin = z + bounds.minZ;
-        double zMax = z + bounds.maxZ;
+        double xMax = x + bounds.maxX();
+        double yMin = y + bounds.minY();
+        double yMax = y + bounds.maxY();
+        double zMin = z + bounds.minZ();
+        double zMax = z + bounds.maxZ();
 
-        if(enableAO)
-        {
-        	if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
-            tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
+        if (this.enableAO) {
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopLeft);
+            tessellator.setColorOpaque_F(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft);
             tessellator.addVertexWithUV(xMax, yMin, zMax, uMin2, vMax2);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
-            tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomLeft);
+            tessellator.setColorOpaque_F(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft);
             tessellator.addVertexWithUV(xMax, yMin, zMin, uMax, vMax);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomRight);
-            tessellator.setColorOpaque_F(colorRedBottomRight, colorGreenBottomRight, colorBlueBottomRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordBottomRight);
+            tessellator.setColorOpaque_F(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight);
             tessellator.addVertexWithUV(xMax, yMax, zMin, uMax2, vMin2);
-            if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopRight);
-            tessellator.setColorOpaque_F(colorRedTopRight, colorGreenTopRight, colorBlueTopRight);
+            if (LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(this.lightmapCoordTopRight);
+            tessellator.setColorOpaque_F(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight);
             tessellator.addVertexWithUV(xMax, yMax, zMax, uMin, vMin);
-        } else
-        {
+        } else {
             tessellator.addVertexWithUV(xMax, yMin, zMax, uMin2, vMax2);
             tessellator.addVertexWithUV(xMax, yMin, zMin, uMax, vMax);
             tessellator.addVertexWithUV(xMax, yMax, zMin, uMax2, vMin2);
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/CameraUtil.java b/game/client/src/main/java/net/minecraft/client/render/camera/CameraUtil.java
index e3861e663..983ff11c6 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/CameraUtil.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/CameraUtil.java
@@ -4,35 +4,30 @@ import net.minecraft.core.block.BlockLogicFluid;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
-public abstract class CameraUtil
-{
-    public static HitResult traceRay(ICamera camera, World world, double distance, float partialTick)
-    {
-        Vec3 pos = camera.getPosition(partialTick);
-        Vec3 rot = camera.getRotationVector(partialTick);
-        Vec3 endPos = pos.add(rot.x * distance, rot.y * distance, rot.z * distance);
+public abstract class CameraUtil {
+    public static @Nullable HitResult traceRay(@NotNull ICamera camera, @NotNull World world, double distance, float partialTick) {
+        Vector3dc pos = camera.getPosition(partialTick);
+        Vector3dc viewDir = camera.getViewVector(partialTick);
+        Vector3dc endPos = pos.add(viewDir.x() * distance, viewDir.y() * distance, viewDir.z() * distance, new Vector3d());
         return world.checkBlockCollisionBetweenPoints(pos, endPos);
     }
 
-    public static boolean isUnderLiquid(ICamera camera, World world, Material material, float partialTick)
-    {
+    public static boolean isUnderLiquid(@NotNull ICamera camera, @NotNull World world, @NotNull Material material, float partialTick) {
         double cameraY = camera.getY(partialTick);
-        int x = MathHelper.floor(camera.getX(partialTick));
-        int y = MathHelper.floor_float(MathHelper.floor(cameraY));
-        int z = MathHelper.floor(camera.getZ(partialTick));
-        int id = world.getBlockId(x, y, z);
-        if(id != 0 && Blocks.blocksList[id].getMaterial() == material)
-        {
-            float f = BlockLogicFluid.getHeight(world.getBlockMetadata(x, y, z)) - 0.2F;
-            float f1 = (float)(y + 1) - f;
-            return cameraY < (double)f1;
-        }
-        else
-        {
+        TilePos tilePos = camera.getTilePos(partialTick);
+        int id = world.getBlockId(tilePos);
+        if (id != 0 && Blocks.blocksList[id].getMaterial() == material) {
+            float fluidHeight = BlockLogicFluid.getHeight(world.getBlockData(tilePos)) - 0.2F;
+            float waterSurface = (float) (tilePos.y + 1) - fluidHeight;
+            return cameraY < (double) waterSurface;
+        } else {
             return false;
         }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCamera.java b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCamera.java
index c9c99fe9a..4978440b2 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCamera.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCamera.java
@@ -4,28 +4,26 @@ import net.minecraft.client.Minecraft;
 import net.minecraft.client.render.culling.CameraFrustum;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.MathHelper;
+import org.jetbrains.annotations.NotNull;
 
 public abstract class EntityCamera
-    implements ICamera
-{
-    protected final Minecraft mc;
+    implements ICamera {
+    protected final @NotNull Minecraft mc;
 
-    private final CameraFrustum frustum;
+    private final @NotNull CameraFrustum frustum;
 
-    public final Mob mob;
+    public final @NotNull Mob mob;
 
     private double hhO = Double.NaN;
 
-    public EntityCamera(Minecraft mc, Mob mob)
-    {
+    public EntityCamera(@NotNull Minecraft mc, @NotNull Mob mob) {
         this.mc = mc;
         this.mob = mob;
         this.frustum = new CameraFrustum(this);
     }
 
     @Override
-    public boolean showPlayer()
-    {
+    public boolean showPlayer() {
         return false;
     }
 
@@ -35,85 +33,64 @@ public abstract class EntityCamera
     }
 
     @Override
-    public void applyGlTransformations() { }
+    public void applyGlTransformations() {
+    }
 
     @Override
-    public double getX(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return mob.x;
-        }
-        else
-        {
-            return mob.xo + (mob.x - mob.xo) * partialTick;
+    public double getX(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.mob.x;
+        } else {
+            return this.mob.xo + (this.mob.x - this.mob.xo) * partialTick;
         }
     }
 
     @Override
-    public double getY(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return mob.y + mob.getHeadHeight();
-        }
-        else
-        {
+    public double getY(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.mob.y + this.mob.getHeadHeight();
+        } else {
             if (Double.isNaN(this.hhO)) this.hhO = this.mob.getHeadHeight();
             return (this.mob.yo + (this.mob.y - this.mob.yo) * partialTick) + MathHelper.lerp(this.hhO, this.mob.getHeadHeight(), partialTick);
         }
     }
 
     @Override
-    public double getZ(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return mob.z;
-        }
-        else
-        {
-            return mob.zo + (mob.z - mob.zo) * partialTick;
+    public double getZ(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.mob.z;
+        } else {
+            return this.mob.zo + (this.mob.z - this.mob.zo) * partialTick;
         }
 
     }
 
     @Override
-    public double getXRot(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return mob.xRot;
-        }
-        else
-        {
-            return mob.xRotO + (mob.xRot - mob.xRotO) * partialTick;
+    public double getXRot(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.mob.xRot;
+        } else {
+            return this.mob.xRotO + (this.mob.xRot - this.mob.xRotO) * partialTick;
         }
 
     }
 
     @Override
-    public double getYRot(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return mob.yRot;
-        }
-        else
-        {
-            return mob.yRotO + (mob.yRot - mob.yRotO) * partialTick;
+    public double getYRot(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.mob.yRot;
+        } else {
+            return this.mob.yRotO + (this.mob.yRot - this.mob.yRotO) * partialTick;
         }
     }
 
     @Override
-    public double getFov()
-    {
-        return mc.gameSettings.FoV.value;
+    public double getFov() {
+        return this.mc.gameSettings.FoV.value;
     }
 
     @Override
-    public CameraFrustum getFrustum()
-    {
-        return frustum;
+    public @NotNull CameraFrustum getFrustum() {
+        return this.frustum;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraIsometric.java b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraIsometric.java
index b20bea47d..db1657d70 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraIsometric.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraIsometric.java
@@ -3,21 +3,19 @@ package net.minecraft.client.render.camera;
 import net.minecraft.client.Minecraft;
 import net.minecraft.client.gui.ScreenPhotoMode;
 import net.minecraft.core.entity.Mob;
+import org.jetbrains.annotations.NotNull;
 
 public class EntityCameraIsometric
-    extends EntityCamera
-{
-    public EntityCameraIsometric(Minecraft mc, Mob entity) {
+    extends EntityCamera {
+    public EntityCameraIsometric(@NotNull Minecraft mc, @NotNull Mob entity) {
         super(mc, entity);
     }
 
     @Override
     public boolean showPlayer() {
-        if (mc.currentScreen instanceof ScreenPhotoMode)
-        {
-            return ((ScreenPhotoMode)mc.currentScreen).showPlayer;
+        if (this.mc.currentScreen instanceof ScreenPhotoMode screenPhotoMode) {
+            return screenPhotoMode.showPlayer;
         }
-
         return true;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraSleeping.java b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraSleeping.java
index ebea638d5..db3e1271e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraSleeping.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraSleeping.java
@@ -2,10 +2,11 @@ package net.minecraft.client.render.camera;
 
 import net.minecraft.client.Minecraft;
 import net.minecraft.core.entity.Mob;
+import net.minecraft.core.world.pos.TilePos;
+import org.jetbrains.annotations.NotNull;
 
 public class EntityCameraSleeping
-    extends EntityCamera
-{
+    extends EntityCamera {
     private static final int ANIM_TICKS = 5;
     private int ticks = 0;
 
@@ -30,25 +31,20 @@ public class EntityCameraSleeping
     private final double xRotS;
     private final double xRotT;
 
-    public EntityCameraSleeping(Minecraft mc, Mob entity, int xb, int yb, int zb, double xs, double ys, double zs, double yRotS, double xRotS)
-    {
+    public EntityCameraSleeping(@NotNull Minecraft mc, @NotNull Mob entity, int xb, int yb, int zb, double xs, double ys, double zs, double yRotS, double xRotS) {
         super(mc, entity);
-        int metadata = mc.currentWorld.getBlockMetadata(xb, yb, zb) & 3;
+        int metadata = mc.currentWorld.getBlockData(new TilePos(xb, yb, zb)) & 3;
 
-        while (yRotS < 0)
-        {
+        while (yRotS < 0) {
             yRotS += 360;
         }
-        while (yRotS > 360)
-        {
+        while (yRotS > 360) {
             yRotS -= 360;
         }
-        while (xRotS < 0)
-        {
+        while (xRotS < 0) {
             xRotS += 360;
         }
-        while (xRotS > 360)
-        {
+        while (xRotS > 360) {
             xRotS -= 360;
         }
 
@@ -65,17 +61,15 @@ public class EntityCameraSleeping
     }
 
     @Override
-    public void tick()
-    {
+    public void tick() {
         this.xo = this.x;
         this.yo = this.y;
         this.zo = this.z;
         this.yRotO = this.yRot;
         this.xRotO = this.xRot;
-        if (ticks < ANIM_TICKS)
-        {
-            ticks++;
-            double progress = (double)ticks / ANIM_TICKS;
+        if (this.ticks < ANIM_TICKS) {
+            this.ticks++;
+            double progress = (double) this.ticks / ANIM_TICKS;
             double dx = this.xt - this.xs;
             double dy = this.yt - this.ys;
             double dz = this.zt - this.zs;
@@ -92,67 +86,47 @@ public class EntityCameraSleeping
     }
 
     @Override
-    public double getX(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return x;
-        }
-        else
-        {
-            return xo + (x - xo) * partialTick;
+    public double getX(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.x;
+        } else {
+            return this.xo + (this.x - this.xo) * partialTick;
         }
     }
 
     @Override
-    public double getY(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return y;
-        }
-        else
-        {
-            return yo + (y - yo) * partialTick;
+    public double getY(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.y;
+        } else {
+            return this.yo + (this.y - this.yo) * partialTick;
         }
     }
 
     @Override
-    public double getZ(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return z;
-        }
-        else
-        {
-            return zo + (z - zo) * partialTick;
+    public double getZ(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.z;
+        } else {
+            return this.zo + (this.z - this.zo) * partialTick;
         }
     }
 
     @Override
-    public double getXRot(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return xRot;
-        }
-        else
-        {
-            return xRotO + (xRot - xRotO) * partialTick;
+    public double getXRot(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.xRot;
+        } else {
+            return this.xRotO + (this.xRot - this.xRotO) * partialTick;
         }
     }
 
     @Override
-    public double getYRot(float partialTick)
-    {
-        if (partialTick == 1f || mob.isRemoved())
-        {
-            return yRot;
-        }
-        else
-        {
-            return yRotO + (yRot - yRotO) * partialTick;
+    public double getYRot(float partialTick) {
+        if (partialTick == 1f || this.mob.isRemoved()) {
+            return this.yRot;
+        } else {
+            return this.yRotO + (this.yRot - this.yRotO) * partialTick;
         }
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonFront.java b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonFront.java
index 7b239fa47..4298b0783 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonFront.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonFront.java
@@ -2,24 +2,21 @@ package net.minecraft.client.render.camera;
 
 import net.minecraft.client.Minecraft;
 import net.minecraft.core.entity.Mob;
+import org.jetbrains.annotations.NotNull;
 
 public class EntityCameraThirdPersonFront
-        extends EntityCameraThirdPersonRear
-{
-    public EntityCameraThirdPersonFront(Minecraft mc, Mob entity)
-    {
+    extends EntityCameraThirdPersonRear {
+    public EntityCameraThirdPersonFront(@NotNull Minecraft mc, @NotNull Mob entity) {
         super(mc, entity);
     }
 
     @Override
-    public double getYRot(float partialTick)
-    {
+    public double getYRot(float partialTick) {
         return super.getYRot(partialTick) + 180;
     }
 
     @Override
-    public double getXRot(float partialTick)
-    {
+    public double getXRot(float partialTick) {
         return -super.getXRot(partialTick);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonRear.java b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonRear.java
index 4aa1ecb6e..ae0757a95 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonRear.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/EntityCameraThirdPersonRear.java
@@ -4,30 +4,27 @@ import net.minecraft.client.Minecraft;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 public class EntityCameraThirdPersonRear
-    extends EntityCamera
-{
+    extends EntityCamera {
     protected float lastpartialTick = 0f;
     protected double lastCameraDistance = 0d;
 
-    public EntityCameraThirdPersonRear(Minecraft mc, Mob entity)
-    {
+    public EntityCameraThirdPersonRear(@NotNull Minecraft mc, @NotNull Mob entity) {
         super(mc, entity);
     }
 
     @Override
-    public boolean showPlayer()
-    {
+    public boolean showPlayer() {
         return true;
     }
 
-    private double getCameraDistance(float partialTick)
-    {
-        if (partialTick == lastpartialTick)
-        {
-            return lastCameraDistance;
+    private double getCameraDistance(float partialTick) {
+        if (partialTick == this.lastpartialTick) {
+            return this.lastCameraDistance;
         }
 
         int numSteps = 5;
@@ -44,71 +41,65 @@ public class EntityCameraThirdPersonRear
         double dz = (MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI));
         double dy = (-MathHelper.sin((xRot / 180F) * MathHelper.PI));
 
-        double cameraDistance = Vec3.fromPool(x, y, z).distanceTo(Vec3.fromPool(x - numSteps * dx, y - numSteps * dy, z - numSteps * dz)) - offset;
+        Vector3dc start = new Vector3d(x, y, z);
+        double cameraDistance = start.distance(x - numSteps * dx, y - numSteps * dy, z - numSteps * dz) - offset;
 
-        for(int i = 0; i <= numSteps; i++)
-        {
-            HitResult hitResult = mc.currentWorld.checkBlockCollisionBetweenPoints(
-                    Vec3.fromPool(x, y, z),
-                    Vec3.fromPool(x - i * dx, y - i * dy, z - i * dz),
-                    false,
-                    true,
+        for (int i = 0; i <= numSteps; i++) {
+            HitResult hitResult = this.mc.currentWorld.checkBlockCollisionBetweenPoints(
+                start,
+                new Vector3d(x - i * dx, y - i * dy, z - i * dz),
+                false,
+                true,
                 false);
-            if(hitResult != null)
-            {
-                double distance = hitResult.location.distanceTo(Vec3.fromPool(x, y, z)) - offset;
+            if (hitResult != null) {
+                double distance = hitResult.location.distance(x, y, z) - offset;
                 if (distance < 0) distance = 0;
                 cameraDistance = distance;
                 break;
             }
         }
 
-        lastpartialTick = partialTick;
-        lastCameraDistance = cameraDistance;
+        this.lastpartialTick = partialTick;
+        this.lastCameraDistance = cameraDistance;
         return cameraDistance;
     }
 
     @Override
-    public double getX(float partialTick)
-    {
+    public double getX(float partialTick) {
         float yRot = (float) (getYRot(partialTick));
         float xRot = (float) (getXRot(partialTick));
         double cameraDistance = getCameraDistance(partialTick);
-        double dx = (double)(-MathHelper.sin((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI)) * cameraDistance;
+        double dx = (double) (-MathHelper.sin((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI)) * cameraDistance;
 
         return super.getX(partialTick) - dx;
     }
 
     @Override
-    public double getY(float partialTick)
-    {
+    public double getY(float partialTick) {
         float xRot = (float) (getXRot(partialTick));
         double cameraDistance = getCameraDistance(partialTick);
-        double dy = (double)(-MathHelper.sin((xRot / 180F) * MathHelper.PI)) * cameraDistance;
+        double dy = (double) (-MathHelper.sin((xRot / 180F) * MathHelper.PI)) * cameraDistance;
 
         return super.getY(partialTick) - dy;
     }
 
     @Override
-    public double getZ(float partialTick)
-    {
+    public double getZ(float partialTick) {
         float yRot = (float) (getYRot(partialTick));
         float xRot = (float) (getXRot(partialTick));
         double cameraDistance = getCameraDistance(partialTick);
-        double dz = (double)(MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI)) * cameraDistance;
+        double dz = (double) (MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI)) * cameraDistance;
 
         return super.getZ(partialTick) - dz;
     }
 
     @Override
-    public double getYRot(float partialTick)
-    {
+    public double getYRot(float partialTick) {
         return super.getYRot(partialTick);
     }
 
     @Override
-    public double getXRot(float partialTick)
-    {
+    public double getXRot(float partialTick) {
         return super.getXRot(partialTick);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/camera/ICamera.java b/game/client/src/main/java/net/minecraft/client/render/camera/ICamera.java
index 97717663d..c0a2d0f45 100644
--- a/game/client/src/main/java/net/minecraft/client/render/camera/ICamera.java
+++ b/game/client/src/main/java/net/minecraft/client/render/camera/ICamera.java
@@ -3,10 +3,13 @@ package net.minecraft.client.render.camera;
 import net.minecraft.client.render.culling.CameraFrustum;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
+import net.minecraft.core.world.pos.TilePos;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Math;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
-public interface ICamera
-{
+public interface ICamera {
     void tick();
 
     void applyGlTransformations();
@@ -15,113 +18,93 @@ public interface ICamera
 
     double getX(float partialTick);
 
-    default double getX()
-    {
+    default double getX() {
         return getX(1f);
     }
 
     double getY(float partialTick);
 
-    default double getY()
-    {
+    default double getY() {
         return getY(1f);
     }
 
     double getZ(float partialTick);
 
-    default double getZ()
-    {
+    default double getZ() {
         return getZ(1f);
     }
 
-    default Vec3 getPosition(float partialTick)
-    {
-        return Vec3.fromPool(getX(partialTick), getY(partialTick), getZ(partialTick));
+    default @NotNull TilePos getTilePos(float partialTick) {
+        return new TilePos(getX(partialTick), getY(partialTick), getZ(partialTick));
     }
 
-    default Vec3 getPosition()
-    {
+    default @NotNull TilePos getTilePos() {
+        return getTilePos(1f);
+    }
+
+    default @NotNull Vector3dc getPosition(float partialTick) {
+        return new Vector3d(getX(partialTick), getY(partialTick), getZ(partialTick));
+    }
+
+    default @NotNull Vector3dc getPosition() {
         return getPosition(1f);
     }
 
     double getXRot(float partialTick);
 
-    default double getXRot()
-    {
+    default double getXRot() {
         return getXRot(1f);
     }
 
     double getYRot(float partialTick);
 
-    default double getYRot()
-    {
+    default double getYRot() {
         return getYRot(1f);
     }
 
-    default Vec3 getViewVector(float partialTick)
-    {
-        float xRot = (float) getXRot(partialTick);
-        float yRot = (float) getYRot(partialTick);
-        float xzLen = -MathHelper.cos(-xRot * (MathHelper.PI / 180f));
-        float x = MathHelper.sin(-yRot * (MathHelper.PI / 180f) - MathHelper.PI);
-        float y = MathHelper.sin(-xRot * (MathHelper.PI / 180f));
-        float z = MathHelper.cos(-yRot * (MathHelper.PI / 180f) - MathHelper.PI);
-        return Vec3.fromPool(x * xzLen, y, z * xzLen);
-    }
-
-    default Vec3 getRotationVector(float partialTick)
-    {
-        double pitch = getXRot(partialTick);
-        double yaw = getYRot(partialTick);
-
-        double toRads = Math.PI / 180.0;
+    default @NotNull Vector3dc getViewVector(float partialTick) {
+        double pitch = Math.toRadians(getXRot(partialTick));
+        double yaw = Math.toRadians(getYRot(partialTick));
 
-        float xzLen = -MathHelper.cos((float) (-pitch * toRads));
-        float x = MathHelper.sin((float) (-yaw * toRads - Math.PI));
-        float y = MathHelper.sin((float) (-pitch * toRads));
-        float z = MathHelper.cos((float) (-yaw * toRads - Math.PI));
-        return Vec3.fromPool(x * xzLen, y, z * xzLen);
+        float xzLen = -MathHelper.cos((float) -pitch);
+        float x = MathHelper.sin((float) (-yaw - Math.PI));
+        float y = MathHelper.sin((float) -pitch);
+        float z = MathHelper.cos((float) (-yaw - Math.PI));
+        return new Vector3d(x * xzLen, y, z * xzLen);
     }
 
-    default Vec3 getRotationVector()
-    {
-        return getRotationVector(1f);
+    default @NotNull Vector3dc getViewVector() {
+        return getViewVector(1f);
     }
 
     double getFov();
 
-    CameraFrustum getFrustum();
+    @NotNull CameraFrustum getFrustum();
 
-    default double distanceToSqr(double x, double y, double z, float partialTick)
-    {
-        float dx = (float)(getX(partialTick) - x);
-        float dy = (float)(getY(partialTick) - y);
-        float dz = (float)(getZ(partialTick) - z);
+    default double distanceToSqr(double x, double y, double z, float partialTick) {
+        float dx = (float) (getX(partialTick) - x);
+        float dy = (float) (getY(partialTick) - y);
+        float dz = (float) (getZ(partialTick) - z);
         return dx * dx + dy * dy + dz * dz;
     }
 
-    default double distanceToSqr(double x, double y, double z)
-    {
+    default double distanceToSqr(double x, double y, double z) {
         return distanceToSqr(x, y, z, 1f);
     }
 
-    default double distanceTo(Entity entity, float partialTick)
-    {
+    default double distanceTo(@NotNull Entity entity, float partialTick) {
         return distanceTo(entity.x, entity.y, entity.z, partialTick);
     }
 
-    default double distanceTo(Entity entity)
-    {
+    default double distanceTo(@NotNull Entity entity) {
         return distanceTo(entity, 1f);
     }
 
-    default double distanceTo(double x, double y, double z, float partialTick)
-    {
+    default double distanceTo(double x, double y, double z, float partialTick) {
         return MathHelper.sqrt(distanceToSqr(x, y, z, partialTick));
     }
 
-    default double distanceTo(double x, double y, double z)
-    {
+    default double distanceTo(double x, double y, double z) {
         return distanceTo(x, y, z, 1f);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/colorizer/Colorizer.java b/game/client/src/main/java/net/minecraft/client/render/colorizer/Colorizer.java
index 7af3e56d2..0ec6906a1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/colorizer/Colorizer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/colorizer/Colorizer.java
@@ -7,169 +7,168 @@ import net.minecraft.client.render.texturepack.TexturePack;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.Season;
 import net.minecraft.core.world.season.Seasons;
 import net.minecraft.core.world.type.WorldType;
 import net.minecraft.core.world.type.WorldTypes;
+import org.jetbrains.annotations.NotNull;
 
 public class Colorizer {
-	
-	public final String name;
-	
-	private final ColorMap currentColor = new ColorMap();
-	private ColorMap defaultColor;
-	private TexturePack texturePack;
-	
-	public Colorizer(String name) {
-		this.name = name;
-	}
-	
-	public void setup(Minecraft minecraft, List<Season> seasons) {
-		texturePack = null;
-		if(minecraft.currentWorld == null) {
-			return;
-		}
-		
-		String path = null;
-
-		// First, check for worldtype overrides
-		WorldType worldType = minecraft.currentWorld.worldType;
-		if(worldType == WorldTypes.OVERWORLD_HELL) {
-			path = "/assets/minecraft/textures/colormap/" + this.name + "/hell.png";
-			texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
-		}
-		if(worldType == WorldTypes.OVERWORLD_WINTER) {
-			path = "/assets/minecraft/textures/colormap/" + this.name + "/winter.png";
-			texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
-		}
-		
-		if(texturePack == null) {
-			// Check if there is a colormap for the current dimension
-			Dimension dimension = minecraft.currentWorld.dimension;
-			String dimensionName = dimension.languageKey.replace('.', '_').toLowerCase();
-			path = "/assets/minecraft/textures/colormap/" + this.name + "/" + dimensionName + ".png";
-			texturePack = Colorizers.findTexturePackWithFile(minecraft, path);	
-		}
-		
-		
-		if(texturePack == null) {
-			// If there is no colormap for the currrent dimension, check if there is a default colormap, to be used for all dimensions
-			path = "/assets/minecraft/textures/colormap/" + this.name + "/default.png";
-			texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
-		}
-		
-		// If there is no default colormap, disable the colorizer
-		if(path == null || texturePack == null) {
-			texturePack = null;
-			return;
-		}
-		
-		// Actually load the colormap
-		this.defaultColor = Colorizers.loadColorData(texturePack, path);
-		if(defaultColor == null) {
-			// If a colormap is found by the first code, but it can't get loaded, throw an Exception
-			throw new NullPointerException("Could not load colormap '" + path + "' from asset pack '" + texturePack.fileName + "'!");
-		}
-	}
-	
-	public ColorMap loadColormap(Dimension dimension, Season season) {
-		if(season == null || season == Seasons.NULL) {
-			return defaultColor;
-		}
-		
-		String seasonName = season.getId().replace('.', '_').toLowerCase();
-		String seasonPath = "/assets/minecraft/textures/colormap/" + this.name + "/" + seasonName + ".png";
-		
-		ColorMap seasonColor = Colorizers.loadColorData(texturePack, seasonPath);
-		if(seasonColor != null) {
-			return seasonColor;
-		}
-		
-		return defaultColor;
-	}
-	
-	public void update(Dimension dimension, Season season1, Season season2, float blendFactor) {
-		if(!isEnabled()) {
-			return;
-		}
-		
-		ColorMap colorMap1 = loadColormap(dimension, season1);
-		ColorMap colorMap2 = loadColormap(dimension, season2);
-		
-		if(colorMap1 == colorMap2) {
-			update(colorMap1);
-		}else {
-			update(colorMap1, colorMap2, blendFactor);	
-		}
-	}
-	
-	public void update(ColorMap colorMap) {
-		for(int i=0; i < currentColor.buffer.length; i++) {
-			currentColor.buffer[i] = colorMap.buffer[i];
-		}
-	}
-	
-	public void update(ColorMap colorMap1, ColorMap colorMap2, float blendFactor) {
-		for(int i=0; i < currentColor.buffer.length; i++) {
-			currentColor.buffer[i] = blendColor(colorMap1.buffer[i], colorMap2.buffer[i], blendFactor);
-		}
-	}
-	
-	public int getDefaultColor(double temperature, double humidity) {
-		if(!isEnabled()) {
-			return 0xFFFFFFFF;
-		}
-		
-		return defaultColor.getColor(temperature, humidity);
-	}
-	
-	public int getColor(WorldSource world, int x, int y, int z) {
-		if(!isEnabled()) {
-			return 0xFFFFFFFF;
-		}
-		
-		double temperature = world.getBlockTemperature(x, z);
-		double humidity = world.getBlockHumidity(x, z);
-		
-		return getColor(temperature, humidity);
-	}
-	
-	public int getColor(double temperature, double humidity) {
-		if(!isEnabled()) {
-			return 0xFFFFFFFF;
-		}
-		
-		return currentColor.getColor(temperature, humidity);
-	}
-	
-	public boolean isEnabled() {
-		return texturePack != null;
-	}
-	
-	public TexturePack getTexturePack() {
-		return texturePack;
-	}
-	
-	public static int blendColor(int color1, int color2, float blend) {
-		float blend1 = 1.0f - blend;
-		
-		int r1 = (color1 >> 16) & 0xFF;
-		int g1 = (color1 >>  8) & 0xFF;
-		int b1 = (color1 >>  0) & 0xFF;
-		
-		int r2 = (color2 >> 16) & 0xFF;
-		int g2 = (color2 >>  8) & 0xFF;
-		int b2 = (color2 >>  0) & 0xFF;
-		
-		int r = (int)(r1 * blend1 + r2 * blend);
-		int g = (int)(g1 * blend1 + g2 * blend);
-		int b = (int)(b1 * blend1 + b2 * blend);
-		
-		r = MathHelper.clamp(r, 0, 255);
-		g = MathHelper.clamp(g, 0, 255);
-		b = MathHelper.clamp(b, 0, 255);
-		
-		return r << 16 | g << 8 | b; 
-	}
+
+    public final String name;
+
+    private final ColorMap currentColor = new ColorMap();
+    private ColorMap defaultColor;
+    private TexturePack texturePack;
+
+    public Colorizer(String name) {
+        this.name = name;
+    }
+
+    public void setup(@NotNull Minecraft minecraft, List<Season> seasons) {
+        this.texturePack = null;
+        if (minecraft.currentWorld == null) {
+            return;
+        }
+
+        String path = null;
+
+        // First, check for worldtype overrides
+        WorldType worldType = minecraft.currentWorld.worldType;
+        if (worldType == WorldTypes.OVERWORLD_HELL) {
+            path = "/assets/minecraft/textures/colormap/" + this.name + "/hell.png";
+            this.texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
+        }
+        if (worldType == WorldTypes.OVERWORLD_WINTER) {
+            path = "/assets/minecraft/textures/colormap/" + this.name + "/winter.png";
+            this.texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
+        }
+
+        if (this.texturePack == null) {
+            // Check if there is a colormap for the current dimension
+            Dimension dimension = minecraft.currentWorld.dimension;
+            String dimensionName = dimension.languageKey.replace('.', '_').toLowerCase();
+            path = "/assets/minecraft/textures/colormap/" + this.name + "/" + dimensionName + ".png";
+            this.texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
+        }
+
+
+        if (this.texturePack == null) {
+            // If there is no colormap for the currrent dimension, check if there is a default colormap, to be used for all dimensions
+            path = "/assets/minecraft/textures/colormap/" + this.name + "/default.png";
+            this.texturePack = Colorizers.findTexturePackWithFile(minecraft, path);
+        }
+
+        // If there is no default colormap, disable the colorizer
+        if (this.texturePack == null) {
+            return;
+        }
+
+        // Actually load the colormap
+        this.defaultColor = Colorizers.loadColorData(this.texturePack, path);
+        if (this.defaultColor == null) {
+            // If a colormap is found by the first code, but it can't get loaded, throw an Exception
+            throw new NullPointerException("Could not load colormap '" + path + "' from asset pack '" + this.texturePack.fileName + "'!");
+        }
+    }
+
+    public ColorMap loadColormap(Dimension dimension, Season season) {
+        if (season == null || season == Seasons.NULL) {
+            return this.defaultColor;
+        }
+
+        String seasonName = season.getId().replace('.', '_').toLowerCase();
+        String seasonPath = "/assets/minecraft/textures/colormap/" + this.name + "/" + seasonName + ".png";
+
+        ColorMap seasonColor = Colorizers.loadColorData(this.texturePack, seasonPath);
+        if (seasonColor != null) {
+            return seasonColor;
+        }
+
+        return this.defaultColor;
+    }
+
+    public void update(Dimension dimension, Season season1, Season season2, float blendFactor) {
+        if (!isEnabled()) {
+            return;
+        }
+
+        ColorMap colorMap1 = loadColormap(dimension, season1);
+        ColorMap colorMap2 = loadColormap(dimension, season2);
+
+        if (colorMap1 == colorMap2) {
+            update(colorMap1);
+        } else {
+            update(colorMap1, colorMap2, blendFactor);
+        }
+    }
+
+    public void update(ColorMap colorMap) {
+        System.arraycopy(colorMap.buffer, 0, this.currentColor.buffer, 0, this.currentColor.buffer.length);
+    }
+
+    public void update(ColorMap colorMap1, ColorMap colorMap2, float blendFactor) {
+        for (int i = 0; i < this.currentColor.buffer.length; i++) {
+            this.currentColor.buffer[i] = blendColor(colorMap1.buffer[i], colorMap2.buffer[i], blendFactor);
+        }
+    }
+
+    public int getDefaultColor(double temperature, double humidity) {
+        if (!isEnabled()) {
+            return 0xFFFFFFFF;
+        }
+
+        return this.defaultColor.getColor(temperature, humidity);
+    }
+
+    public int getColor(WorldSource world, @NotNull TilePosc tilePos) {
+        if (!isEnabled()) {
+            return 0xFFFFFFFF;
+        }
+
+        double temperature = world.getBlockTemperature(tilePos);
+        double humidity = world.getBlockHumidity(tilePos);
+
+        return getColor(temperature, humidity);
+    }
+
+    public int getColor(double temperature, double humidity) {
+        if (!isEnabled()) {
+            return 0xFFFFFFFF;
+        }
+
+        return this.currentColor.getColor(temperature, humidity);
+    }
+
+    public boolean isEnabled() {
+        return this.texturePack != null;
+    }
+
+    public TexturePack getTexturePack() {
+        return this.texturePack;
+    }
+
+    public static int blendColor(int color1, int color2, float blend) {
+        float blend1 = 1.0f - blend;
+
+        int r1 = (color1 >> 16) & 0xFF;
+        int g1 = (color1 >> 8) & 0xFF;
+        int b1 = (color1 >> 0) & 0xFF;
+
+        int r2 = (color2 >> 16) & 0xFF;
+        int g2 = (color2 >> 8) & 0xFF;
+        int b2 = (color2 >> 0) & 0xFF;
+
+        int r = (int) (r1 * blend1 + r2 * blend);
+        int g = (int) (g1 * blend1 + g2 * blend);
+        int b = (int) (b1 * blend1 + b2 * blend);
+
+        r = MathHelper.clamp(r, 0, 255);
+        g = MathHelper.clamp(g, 0, 255);
+        b = MathHelper.clamp(b, 0, 255);
+
+        return r << 16 | g << 8 | b;
+    }
 
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/culling/CameraFrustum.java b/game/client/src/main/java/net/minecraft/client/render/culling/CameraFrustum.java
index d27fc773e..e580aa5d3 100644
--- a/game/client/src/main/java/net/minecraft/client/render/culling/CameraFrustum.java
+++ b/game/client/src/main/java/net/minecraft/client/render/culling/CameraFrustum.java
@@ -1,34 +1,29 @@
 package net.minecraft.client.render.culling;
 
 import net.minecraft.client.render.camera.ICamera;
-import net.minecraft.client.render.culling.FrustumData;
-import net.minecraft.client.render.culling.Frustum;
-import net.minecraft.core.util.phys.AABB;
+import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
-public class CameraFrustum
-{
-    private final ICamera camera;
-    private final FrustumData frustum;
+public class CameraFrustum {
+    private final @NotNull ICamera camera;
+    private final @NotNull FrustumData frustum;
 
-    public CameraFrustum(ICamera camera)
-    {
+    public CameraFrustum(@NotNull ICamera camera) {
         this.camera = camera;
         this.frustum = Frustum.getFrustum();
     }
 
-    public boolean cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1, float partialTick)
-    {
-        return this.frustum.cubeInFrustum(x0 - camera.getX(partialTick),
-                                                  y0 - camera.getY(partialTick),
-                                                  z0 - camera.getZ(partialTick),
-                                                  x1 - camera.getX(partialTick),
-                                                  y1 - camera.getY(partialTick),
-                                                  z1 - camera.getZ(partialTick)
+    public boolean cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1, float partialTick) {
+        return this.frustum.cubeInFrustum(x0 - this.camera.getX(partialTick),
+            y0 - this.camera.getY(partialTick),
+            z0 - this.camera.getZ(partialTick),
+            x1 - this.camera.getX(partialTick),
+            y1 - this.camera.getY(partialTick),
+            z1 - this.camera.getZ(partialTick)
         );
     }
 
-    public boolean isVisible(AABB aabb, float partialTick)
-    {
-        return cubeInFrustum(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ, partialTick);
+    public boolean isVisible(@NotNull AABBdc aabb, float partialTick) {
+        return cubeInFrustum(aabb.minX(), aabb.minY(), aabb.minZ(), aabb.maxX(), aabb.maxY(), aabb.maxZ(), partialTick);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/culling/FrustumCuller.java b/game/client/src/main/java/net/minecraft/client/render/culling/FrustumCuller.java
index 7a3e78128..4f40349be 100644
--- a/game/client/src/main/java/net/minecraft/client/render/culling/FrustumCuller.java
+++ b/game/client/src/main/java/net/minecraft/client/render/culling/FrustumCuller.java
@@ -1,33 +1,30 @@
 package net.minecraft.client.render.culling;
 
-import net.minecraft.core.util.phys.AABB;
 
-public class FrustumCuller
-{
+import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
+
+public class FrustumCuller {
     private final FrustumData frustum;
     private double xOff;
     private double yOff;
     private double zOff;
 
-    public FrustumCuller()
-    {
-        frustum = Frustum.getFrustum();
+    public FrustumCuller() {
+        this.frustum = Frustum.getFrustum();
     }
 
-    public void prepare(double xOff, double yOff, double zOff)
-    {
+    public void prepare(double xOff, double yOff, double zOff) {
         this.xOff = xOff;
         this.yOff = yOff;
         this.zOff = zOff;
     }
 
-    public boolean cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1)
-    {
-        return frustum.cubeInFrustum(x0 - xOff, y0 - yOff, z0 - zOff, x1 - xOff, y1 - yOff, z1 - zOff);
+    public boolean cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1) {
+        return this.frustum.cubeInFrustum(x0 - this.xOff, y0 - this.yOff, z0 - this.zOff, x1 - this.xOff, y1 - this.yOff, z1 - this.zOff);
     }
 
-    public boolean isVisible(AABB aabb)
-    {
-        return cubeInFrustum(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ);
+    public boolean isVisible(@NotNull AABBdc aabb) {
+        return cubeInFrustum(aabb.minX(), aabb.minY(), aabb.minZ(), aabb.maxX(), aabb.maxY(), aabb.maxZ());
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/culling/IsometricCameraFrustum.java b/game/client/src/main/java/net/minecraft/client/render/culling/IsometricCameraFrustum.java
index 607df088b..e554ab3b3 100644
--- a/game/client/src/main/java/net/minecraft/client/render/culling/IsometricCameraFrustum.java
+++ b/game/client/src/main/java/net/minecraft/client/render/culling/IsometricCameraFrustum.java
@@ -1,7 +1,8 @@
 package net.minecraft.client.render.culling;
 
 import net.minecraft.client.render.camera.ICamera;
-import net.minecraft.core.util.phys.AABB;
+import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public class IsometricCameraFrustum
         extends CameraFrustum
@@ -18,7 +19,7 @@ public class IsometricCameraFrustum
     }
 
     @Override
-    public boolean isVisible(AABB aabb, float partialTick)
+    public boolean isVisible(@NotNull AABBdc aabb, float partialTick)
     {
         return true;
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRenderer.java b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRenderer.java
index f29a9cdc3..0d39a788f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRenderer.java
@@ -5,6 +5,7 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.util.collection.NamespaceID;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 
 import net.minecraft.client.render.EntityRenderDispatcher;
@@ -18,7 +19,6 @@ import net.minecraft.core.Global;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.useless.dragonfly.data.entity.mojang.EntityGeometryMojangData;
 import org.useless.dragonfly.models.entity.StaticEntityModel;
@@ -26,8 +26,7 @@ import org.useless.dragonfly.models.entity.StaticEntityModel;
 import java.util.HashMap;
 import java.util.Map;
 
-public abstract class EntityRenderer<T extends Entity>
-{
+public abstract class EntityRenderer<T extends Entity> {
     public static boolean renderShadows = true;
     private final @NotNull Map<@NotNull String, @NotNull StaticEntityModel> modelMap = new HashMap<>();
     protected EntityRenderDispatcher renderDispatcher = null;
@@ -36,19 +35,16 @@ public abstract class EntityRenderer<T extends Entity>
     private float shadowSize;
     protected float shadowOpacity;
 
-    public EntityRenderer(final float shadowSize)
-    {
+    public EntityRenderer(final float shadowSize) {
         this.shadowSize = shadowSize;
         this.shadowOpacity = 1.0F;
     }
 
-    public EntityRenderer()
-    {
+    public EntityRenderer() {
         this(0.0f);
     }
 
-    public float getShadowSize(final @NotNull T entity)
-    {
+    public float getShadowSize(final @NotNull T entity) {
         return this.shadowSize;
     }
 
@@ -59,11 +55,11 @@ public abstract class EntityRenderer<T extends Entity>
         render(tessellator, entity, x, y, z, yaw, partialTick);
     }
 
-    protected void bindTexture(final @NotNull String texturePath)
-    {
+    protected void bindTexture(final @NotNull String texturePath) {
         final TextureManager textureManager = this.renderDispatcher.textureManager;
         textureManager.bindTexture(textureManager.loadTexture(texturePath));
     }
+
     public boolean bindDownloadableTexture(final String urlTexture, final String backupTexture, final ImageParser imageParser) {
         return this.renderDispatcher.textureManager.bindDownloadableTexture(urlTexture, backupTexture, imageParser);
     }
@@ -89,42 +85,38 @@ public abstract class EntityRenderer<T extends Entity>
         return this;
     }
 
-    public void onWorldChanged(final @NotNull World world)
-    {
+    public void onWorldChanged(final @NotNull World world) {
     }
-    
-    private void renderFire(final @NotNull Tessellator tessellator, final @NotNull T entity, final double x, final double y, final double z, final float partialTick)
-    {
+
+    private void renderFire(final @NotNull Tessellator tessellator, final @NotNull T entity, final double x, final double y, final double z, final float partialTick) {
         GL11.glDisable(GL11.GL_LIGHTING);
         final IconCoordinate texture = TextureRegistry.getTexture("minecraft:block/fire");
         texture.parentAtlas.bind();
         GL11.glPushMatrix();
-        GL11.glTranslatef((float)x, (float)y, (float)z);
+        GL11.glTranslatef((float) x, (float) y, (float) z);
         final float f9 = entity.bbWidth * 1.4F;
         GL11.glScalef(f9, f9, f9);
         float f10 = 0.5F;
         final float f11 = 0.0F;
         float f12 = entity.bbHeight;
-        float f13 = (float)(entity.y - entity.bb.minY);
+        float f13 = (float) (entity.y - entity.bb.minY);
         GL11.glRotatef(-this.renderDispatcher.viewLerpYaw, 0.0F, 1.0F, 0.0F);
-        GL11.glTranslatef(0.0F, 0.0F, -0.3F + (float)(int)f12 * 0.02F);
+        GL11.glTranslatef(0.0F, 0.0F, -0.3F + (float) (int) f12 * 0.02F);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-        if(LightmapHelper.isLightmapEnabled()) {
-        	int lightmapCoord = entity.getLightmap(partialTick);
-        	lightmapCoord = LightmapHelper.setBlocklightValue(lightmapCoord, 15);
-        	LightmapHelper.setLightmapCoord(lightmapCoord);
+        if (LightmapHelper.isLightmapEnabled()) {
+            int lightmapCoord = entity.getLightmap(partialTick);
+            lightmapCoord = LightmapHelper.setBlocklightValue(lightmapCoord, 15);
+            LightmapHelper.setLightmapCoord(lightmapCoord);
         }
         float f14 = 0.0F;
         int l = 0;
         tessellator.startDrawingQuads();
-        while(f12 > 0.0F)
-        {
+        while (f12 > 0.0F) {
             double f2 = texture.getIconUMin();
             double f4 = texture.getIconUMax();
             final double f6 = texture.getIconVMin();
             final double f8 = texture.getIconVMax();
-            if((l / 2) % 2 == 0)
-            {
+            if ((l / 2) % 2 == 0) {
                 final double f15 = f4;
                 f4 = f2;
                 f2 = f15;
@@ -145,17 +137,16 @@ public abstract class EntityRenderer<T extends Entity>
     }
 
     private void renderShadow(final @NotNull Tessellator tessellator, @NotNull final T entity, final double posX, final double posY, final double posZ,
-                              final float opacity, final float partialTick)
-    {
+                              final float opacity, final float partialTick) {
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         final TextureManager textureManager = this.renderDispatcher.textureManager;
         textureManager.bindTexture(textureManager.loadTexture("/assets/minecraft/textures/misc/shadow.png"));
         final World world = entity.world;
         GL11.glDepthMask(false);
-        final double lerpX = entity.xo + (entity.x - entity.xo) * (double)partialTick;
-        final double lerpY = entity.yo + (entity.y - entity.yo) * (double)partialTick + (double)entity.getShadowHeightOffs();
-        final double lerpZ = entity.zo + (entity.z - entity.zo) * (double)partialTick;
+        final double lerpX = entity.xo + (entity.x - entity.xo) * (double) partialTick;
+        final double lerpY = entity.yo + (entity.y - entity.yo) * (double) partialTick + (double) entity.getShadowHeightOffs();
+        final double lerpZ = entity.zo + (entity.z - entity.zo) * (double) partialTick;
 
         final float shadowSize = getShadowSize(entity);
 
@@ -170,16 +161,12 @@ public abstract class EntityRenderer<T extends Entity>
         final double dzLerp = posZ - lerpZ;
         tessellator.startDrawingQuads();
 
-        for(int blockX = minX; blockX <= maxX; blockX++)
-        {
-            for(int blockY = minY; blockY <= maxY; blockY++)
-            {
-                for(int blockZ = minZ; blockZ <= maxZ; blockZ++)
-                {
+        for (int blockX = minX; blockX <= maxX; blockX++) {
+            for (int blockY = minY; blockY <= maxY; blockY++) {
+                for (int blockZ = minZ; blockZ <= maxZ; blockZ++) {
                     final int blockId = world.getBlockId(blockX, blockY - 1, blockZ);
-                    if(blockId > 0 && world.getBlockLightValue(blockX, blockY, blockZ) > 3)
-                    {
-                        renderShadowOnBlock(tessellator, entity, Blocks.blocksList[blockId], posX, posY + (double)entity.getShadowHeightOffs(), posZ, blockX, blockY, blockZ, opacity, shadowSize, dxLerp, dyLerp + (double)entity.getShadowHeightOffs(), dzLerp);
+                    if (blockId > 0 && world.getBlockLightValue(blockX, blockY, blockZ) > 3) {
+                        renderShadowOnBlock(tessellator, entity, Blocks.blocksList[blockId], posX, posY + (double) entity.getShadowHeightOffs(), posZ, blockX, blockY, blockZ, opacity, shadowSize, dxLerp, dyLerp + (double) entity.getShadowHeightOffs(), dzLerp);
                     }
                 }
 
@@ -194,144 +181,137 @@ public abstract class EntityRenderer<T extends Entity>
 
     private void renderShadowOnBlock(final @NotNull Tessellator tessellator, final @NotNull T entity, final @NotNull Block<?> block, final double d, final double d1, final double d2,
                                      final int x, final int y, final int z, final float opacity, final float size, final double xo,
-                                     final double yo, final double zo)
-    {
-        if(!block.isCubeShaped())
-        {
+                                     final double yo, final double zo) {
+        if (!block.isCubeShaped()) {
             return;
         }
         double brightness = entity.world.getLightBrightness(x, y, z);
         if (Global.accessor.isFullbrightEnabled()) brightness = 1.0f;
-        double alpha = ((double)opacity - (d1 - ((double)(y + 1) + yo)) / 2D) * 0.5D * brightness;
-        if(alpha < 0.0D)
-        {
+        double alpha = ((double) opacity - (d1 - ((double) (y + 1) + yo)) / 2D) * 0.5D * brightness;
+        if (alpha < 0.0D) {
             return;
         }
-        if(alpha > 1.0D)
-        {
+        if (alpha > 1.0D) {
             alpha = 1.0D;
         }
-        tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, (float)alpha);
-        final AABB aabb = block.getCollisionBoundingBoxFromPool(entity.world, x, y, z);
-        if(aabb == null) {
-        	return;
+        tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, (float) alpha);
+        final AABBdc aabb = block.getCollisionBoundingBoxFromPool(entity.world, x, y, z);
+        if (aabb == null) {
+            return;
         }
-        final double xMin = aabb.minX + xo;
-        final double xMax = aabb.maxX + xo;
-        final double yMin = aabb.maxY + yo + 0.015625D - 1;
-        final double zMin = aabb.minZ + zo;
-        final double zMax = aabb.maxZ + zo;
-        final float f2 = (float)((d - xMin) / 2D / (double)size + 0.5D);
-        final float f3 = (float)((d - xMax) / 2D / (double)size + 0.5D);
-        final float f4 = (float)((d2 - zMin) / 2D / (double)size + 0.5D);
-        final float f5 = (float)((d2 - zMax) / 2D / (double)size + 0.5D);
+        final double xMin = aabb.minX() + xo;
+        final double xMax = aabb.maxX() + xo;
+        final double yMin = aabb.maxY() + yo + 0.015625D - 1;
+        final double zMin = aabb.minZ() + zo;
+        final double zMax = aabb.maxZ() + zo;
+        final float f2 = (float) ((d - xMin) / 2D / (double) size + 0.5D);
+        final float f3 = (float) ((d - xMax) / 2D / (double) size + 0.5D);
+        final float f4 = (float) ((d2 - zMin) / 2D / (double) size + 0.5D);
+        final float f5 = (float) ((d2 - zMax) / 2D / (double) size + 0.5D);
         tessellator.addVertexWithUV(xMin, yMin, zMin, f2, f4);
         tessellator.addVertexWithUV(xMin, yMin, zMax, f2, f5);
         tessellator.addVertexWithUV(xMax, yMin, zMax, f3, f5);
         tessellator.addVertexWithUV(xMax, yMin, zMin, f3, f4);
     }
 
-    public static void renderOffsetAABB(final @NotNull Tessellator tessellator, final @NotNull AABB aabb, final double x, final double y, final double z)
-    {
+    public static void renderOffsetAABB(final @NotNull Tessellator tessellator, final @NotNull AABBdc aabb, final double x, final double y, final double z) {
         GL11.glDisable(GL11.GL_TEXTURE_2D);
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
         tessellator.startDrawingQuads();
         tessellator.setTranslation(x, y, z);
         tessellator.setNormal(0.0F, 0.0F, -1F);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
         tessellator.setNormal(0.0F, 0.0F, 1.0F);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
         tessellator.setNormal(0.0F, -1F, 0.0F);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
         tessellator.setNormal(0.0F, 1.0F, 0.0F);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
         tessellator.setNormal(-1F, 0.0F, 0.0F);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
         tessellator.setNormal(1.0F, 0.0F, 0.0F);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
         tessellator.setTranslation(0.0D, 0.0D, 0.0D);
         tessellator.draw();
         GL11.glEnable(GL11.GL_TEXTURE_2D);
     }
 
-    public static void renderFlatAABB(final @NotNull AABB aabb)
-    {
+    public static void renderFlatAABB(final @NotNull AABBdc aabb) {
         final Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.minX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.minX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.minZ);
-        tessellator.addVertex(aabb.maxX, aabb.maxY, aabb.maxZ);
-        tessellator.addVertex(aabb.maxX, aabb.minY, aabb.maxZ);
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.minX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.minX(), aabb.minY(), aabb.minZ());
+
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.minZ());
+        tessellator.addVertex(aabb.maxX(), aabb.maxY(), aabb.maxZ());
+        tessellator.addVertex(aabb.maxX(), aabb.minY(), aabb.maxZ());
         tessellator.draw();
     }
 
-    public void init(@NotNull final Class<? extends T> appliedClass, final @NotNull EntityRenderDispatcher dispatcher)
-    {
+    public void init(@NotNull final Class<? extends T> appliedClass, final @NotNull EntityRenderDispatcher dispatcher) {
         this.renderDispatcher = dispatcher;
         this.appliedClass = appliedClass;
     }
 
-    public void postRender(final @NotNull Tessellator tessellator, final @NotNull T entity, final double x, final double y, final double z, final float yaw, final float partialTick)
-    {
-        if(renderShadows && this.renderDispatcher.settings.fancyGraphics.value == 1 && getShadowSize(entity) > 0.0F)
-        {
+    public void postRender(final @NotNull Tessellator tessellator, final @NotNull T entity, final double x, final double y, final double z, final float yaw, final float partialTick) {
+        if (renderShadows && this.renderDispatcher.settings.fancyGraphics.value == 1 && getShadowSize(entity) > 0.0F) {
             final double distance = this.renderDispatcher.distanceToLerpSquared(entity.x, entity.y, entity.z);
-            final float opacity = (float)((1.0D - distance / 256D) * (double) this.shadowOpacity);
-            if(opacity > 0.0F)
-            {
+            final float opacity = (float) ((1.0D - distance / 256D) * (double) this.shadowOpacity);
+            if (opacity > 0.0F) {
                 renderShadow(tessellator, entity, x, y, z, opacity, partialTick);
             }
         }
-        if(entity.isOnFire())
-        {
+        if (entity.isOnFire()) {
             renderFire(tessellator, entity, x, y, z, partialTick);
         }
     }
 
-    public @NotNull FontRenderer getFont()
-    {
+    public @NotNull FontRenderer getFont() {
         return this.renderDispatcher.font;
     }
 
-    public @NotNull AABB entityViewBox(@NotNull final T entity) {
+    public @NotNull AABBdc entityViewBox(@NotNull final T entity) {
         return entity.bb;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererDefault.java b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererDefault.java
index 68f357952..41592bc9b 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererDefault.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererDefault.java
@@ -5,12 +5,10 @@ import net.minecraft.core.entity.Entity;
 import org.jetbrains.annotations.NotNull;
 import org.lwjgl.opengl.GL11;
 
-public class EntityRendererDefault extends EntityRenderer<Entity>
-{
+public class EntityRendererDefault extends EntityRenderer<Entity> {
     @Override
     public void render(@NotNull final Tessellator tessellator, @NotNull final Entity entity, final double x, final double y, final double z,
-                       final float yaw, final float partialTick)
-    {
+                       final float yaw, final float partialTick) {
         GL11.glPushMatrix();
         renderOffsetAABB(tessellator, entity.bb, x - entity.xo, y - entity.yo, z - entity.zo);
         GL11.glPopMatrix();
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFallingBlock.java b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFallingBlock.java
index 06df18f9e..5a3948fa2 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFallingBlock.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFallingBlock.java
@@ -11,7 +11,7 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.EntityFallingBlock;
 import net.minecraft.core.world.BlocksContainer;
-import net.minecraft.core.util.helper.MathHelper;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.lwjgl.opengl.GL11;
 
@@ -24,13 +24,13 @@ public class EntityRendererFallingBlock extends EntityRenderer<EntityFallingBloc
     public EntityRendererFallingBlock()
     {
         super(0.5f);
-        mc = Minecraft.getMinecraft();
+        this.mc = Minecraft.getMinecraft();
     }
 
     @Override
     public void render(@NotNull Tessellator tessellator, @NotNull EntityFallingBlock fallingBlock, double x, double y, double z, float yaw, float partialTick) {
-        if (container == null || container.world != fallingBlock.world) {
-            container = new BlocksContainer(fallingBlock.world);
+        if (this.container == null || this.container.world != fallingBlock.world) {
+            this.container = new BlocksContainer(fallingBlock.world);
         }
         GL11.glPushMatrix();
         GL11.glTranslated(x, y, z);
@@ -39,7 +39,7 @@ public class EntityRendererFallingBlock extends EntityRenderer<EntityFallingBloc
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glDisable(GL11.GL_CULL_FACE);
-        if(mc.isAmbientOcclusionEnabled())
+        if(this.mc.isAmbientOcclusionEnabled())
         {
             GL11.glShadeModel(GL11.GL_SMOOTH);
         } else
@@ -47,18 +47,16 @@ public class EntityRendererFallingBlock extends EntityRenderer<EntityFallingBloc
             GL11.glShadeModel(GL11.GL_FLAT);
         }
 
-        int blockX = MathHelper.floor(fallingBlock.x);
-        int blockY = MathHelper.floor(fallingBlock.y);
-        int blockZ = MathHelper.floor(fallingBlock.z);
+        TilePos blockPos = new TilePos(fallingBlock);
 
         tessellator.startDrawingQuads();
-        tessellator.setTranslation(-blockX - 0.5, -blockY - 0.5, -blockZ - 0.5);
+        tessellator.setTranslation(-blockPos.x - 0.5, -blockPos.y - 0.5, -blockPos.z - 0.5);
 
-        container.setLightReferenceEntity(fallingBlock);
-        container.setBlock(blockX, blockY, blockZ, fallingBlock.carriedBlock.blockId, fallingBlock.carriedBlock.metadata, fallingBlock.carriedBlock.entity);
-        BlockModelDispatcher.getInstance().getDispatch(Blocks.getBlock(fallingBlock.carriedBlock.blockId)).renderNoCulling(Tessellator.instance, container, blockX, blockY, blockZ);
-        container.setLightReferenceEntity(null);
-        container.clear();
+        this.container.setLightReferenceEntity(fallingBlock);
+        this.container.setBlock(blockPos.x, blockPos.y, blockPos.z, fallingBlock.carriedBlock.blockId, fallingBlock.carriedBlock.metadata, fallingBlock.carriedBlock.entity);
+        BlockModelDispatcher.getInstance().getDispatch(Blocks.getBlock(fallingBlock.carriedBlock.blockId)).renderNoCulling(Tessellator.instance, this.container, blockPos);
+        this.container.setLightReferenceEntity(null);
+        this.container.clear();
 
         tessellator.setTranslation(0.0D, 0.0D, 0.0D);
         tessellator.draw();
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFishingBobber.java b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFishingBobber.java
index 1d53b34c9..58317c50e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFishingBobber.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererFishingBobber.java
@@ -4,11 +4,11 @@ import net.minecraft.client.render.texture.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.entity.EntityFishingBobber;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
 import org.lwjgl.opengl.GL11;
-public class EntityRendererFishingBobber extends EntityRendererSprite<EntityFishingBobber>
-{
+
+public class EntityRendererFishingBobber extends EntityRendererSprite<EntityFishingBobber> {
 
     public EntityRendererFishingBobber() {
         super(TextureRegistry.getTexture("minecraft:particle/bobber"));
@@ -17,21 +17,19 @@ public class EntityRendererFishingBobber extends EntityRendererSprite<EntityFish
     @Override
     public void render(@NotNull Tessellator tessellator, @NotNull EntityFishingBobber entity, double x, double y, double z, float yaw, float partialTick) {
         super.render(tessellator, entity, x, y, z, yaw, partialTick);
-        if(entity.owner != null)
-        {
+        if (entity.owner != null) {
             int handedNess = entity.owner.isLeftHanded() ? -1 : 1;
             float f11 = entity.owner.getSwingProgress(partialTick);
             float f12 = MathHelper.sin(MathHelper.sqrt_float(f11) * MathHelper.PI);
-            Vec3 vec3 = Vec3.fromPool(-0.75D * handedNess, -0.05D, 0.8D);
-            vec3.rotateAroundX((-(entity.owner.xRotO + (entity.owner.xRot - entity.owner.xRotO) * partialTick) * MathHelper.PI) / 180F);
-            vec3.rotateAroundY((-(entity.owner.yRotO + (entity.owner.yRot - entity.owner.yRotO) * partialTick) * MathHelper.PI) / 180F);
-            vec3.rotateAroundY(f12 * 0.5F);
-            vec3.rotateAroundX(-f12 * 0.7F);
+            Vector3d vec3 = new Vector3d(-0.75D * handedNess, -0.05D, 0.8D);
+            vec3.rotateX((-(entity.owner.xRotO + (entity.owner.xRot - entity.owner.xRotO) * partialTick) * MathHelper.PI) / 180F);
+            vec3.rotateY((-(entity.owner.yRotO + (entity.owner.yRot - entity.owner.yRotO) * partialTick) * MathHelper.PI) / 180F);
+            vec3.rotateY(f12 * 0.5F);
+            vec3.rotateX(-f12 * 0.7F);
             double xp = MathHelper.lerp(entity.owner.xo, entity.owner.x, partialTick) + vec3.x;
             double yp = MathHelper.lerp(entity.owner.yo, entity.owner.y, partialTick) + entity.owner.getHeadHeight() + vec3.y;
             double zp = MathHelper.lerp(entity.owner.zo, entity.owner.z, partialTick) + vec3.z;
-            if(renderDispatcher.settings.thirdPersonView.value > 0)
-            {
+            if (this.renderDispatcher.settings.thirdPersonView.value > 0) {
                 float rr = ((entity.owner.yBodyRotO + (entity.owner.yBodyRot - entity.owner.yBodyRotO) * partialTick) * MathHelper.PI) / 180F;
                 double ss = MathHelper.sin(rr);
                 double cc = MathHelper.cos(rr);
@@ -39,20 +37,19 @@ public class EntityRendererFishingBobber extends EntityRendererSprite<EntityFish
                 yp = MathHelper.lerp(entity.owner.yo, entity.owner.y, partialTick) + entity.owner.getHeadHeight() - 0.45D;
                 zp = (MathHelper.lerp(entity.owner.zo, entity.owner.z, partialTick) - (ss * 0.35D * handedNess)) + (cc * 0.85D);
             }
-            double xh = entity.xo + (entity.x - entity.xo) * (double)partialTick;
-            double yh = entity.yo + (entity.y - entity.yo) * (double)partialTick + 0.25D;
-            double zh = entity.zo + (entity.z - entity.zo) * (double)partialTick;
-            double xa = (float)(xp - xh);
-            double ya = (float)(yp - yh);
-            double za = (float)(zp - zh);
+            double xh = entity.xo + (entity.x - entity.xo) * (double) partialTick;
+            double yh = entity.yo + (entity.y - entity.yo) * (double) partialTick + 0.25D;
+            double zh = entity.zo + (entity.z - entity.zo) * (double) partialTick;
+            double xa = (float) (xp - xh);
+            double ya = (float) (yp - yh);
+            double za = (float) (zp - zh);
             GL11.glDisable(GL11.GL_TEXTURE_2D);
             GL11.glDisable(GL11.GL_LIGHTING);
             tessellator.startDrawing(3);
             tessellator.setColorOpaque_I(0);
-            for(int i = 0, steps = 16; i <= steps; i++)
-            {
-                final float aa = (float)i / (float)steps;
-                tessellator.addVertex(x + xa * (double)aa, y + ya * (double)(aa * aa + aa) * 0.5D + 0.25D, z + za * (double)aa);
+            for (int i = 0, steps = 16; i <= steps; i++) {
+                final float aa = (float) i / (float) steps;
+                tessellator.addVertex(x + xa * (double) aa, y + ya * (double) (aa * aa + aa) * 0.5D + 0.25D, z + za * (double) aa);
             }
 
             tessellator.draw();
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererMinecart.java b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererMinecart.java
index ff442e8b1..639b54edf 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererMinecart.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/EntityRendererMinecart.java
@@ -9,8 +9,9 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.Global;
 import net.minecraft.core.entity.vehicle.EntityMinecart;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 
@@ -27,7 +28,7 @@ public class EntityRendererMinecart extends EntityRenderer<EntityMinecart> {
         final double lerpX = MathHelper.lerp(minecart.xo, minecart.x, partialTick);
         final double lerpY = MathHelper.lerp(minecart.yo, minecart.y, partialTick);
         final double lerpZ = MathHelper.lerp(minecart.zo, minecart.z, partialTick);
-        final Vec3 vec3 = minecart.getPos(lerpX, lerpY, lerpZ); // Opposite of velocity vector?
+        final Vector3dc pos = minecart.getPos(lerpX, lerpY, lerpZ); // Opposite of velocity vector?
         double lerpXRot = MathHelper.lerp(minecart.xRotO, minecart.xRot, partialTick);
 
         double renderX = x;
@@ -35,34 +36,34 @@ public class EntityRendererMinecart extends EntityRenderer<EntityMinecart> {
         double renderZ = z;
         double renderYaw = yaw;
         boolean doAFlip = false;
-        if(vec3 != null) {
+        if (pos != null) {
 //            drawDebugVec(tessellator, Vec3.fromPool(x, y + 1.5, z), Vec3.fromPool(-(vec3.x - lerpX), -(vec3.y - lerpY), -(vec3.z - lerpZ)), 1.5, 1, 0, 0, 1);
             final double scalar = 0.3D;
-            Vec3 forVec = minecart.getPosOffs(lerpX, lerpY, lerpZ, scalar);
-            Vec3 backVec = minecart.getPosOffs(lerpX, lerpY, lerpZ, -scalar);
-            if(forVec == null) {
-                forVec = vec3;
+            Vector3dc forVec = minecart.getPosOffs(lerpX, lerpY, lerpZ, scalar);
+            Vector3dc backVec = minecart.getPosOffs(lerpX, lerpY, lerpZ, -scalar);
+            if (forVec == null) {
+                forVec = pos;
             }
-            if(backVec == null) {
-                backVec = vec3;
+            if (backVec == null) {
+                backVec = pos;
             }
 
 //            drawDebugVec(tessellator, Vec3.fromPool(x, y + 1.6, z), Vec3.fromPool(forVec.x - lerpX, forVec.y - lerpY, forVec.z - lerpZ), 1.5, 0, 1, 0, 1);
 //            drawDebugVec(tessellator, Vec3.fromPool(x, y + 1.7, z), Vec3.fromPool(backVec.x - lerpX, backVec.y - lerpY, backVec.z - lerpZ), 1.5, 0, 0, 1, 1);
 
-            renderX += vec3.x - lerpX;
-            renderY += (forVec.y + backVec.y) / 2D - lerpY;
-            renderZ += vec3.z - lerpZ;
-            Vec3 velVec = backVec.add(-forVec.x, -forVec.y, -forVec.z);
-            if(velVec.length() != 0.0D) {
-                velVec = velVec.normalize();
+            renderX += pos.x() - lerpX;
+            renderY += (forVec.y() + backVec.y()) / 2D - lerpY;
+            renderZ += pos.z() - lerpZ;
+            Vector3d velVec = backVec.add(-forVec.x(), -forVec.y(), -forVec.z(), new Vector3d());
+            if (velVec.length() != 0.0D) {
+                velVec.normalize();
                 renderYaw = Math.toDegrees(Math.atan2(velVec.z, velVec.x));
                 lerpXRot = Math.atan(velVec.y) * 73D;
             }
 
-            final Vec3 realVecVec = Vec3.fromPool(minecart.xd, minecart.yd, minecart.zd);
+            final Vector3dc realVecVec = new Vector3d(minecart.xd, minecart.yd, minecart.zd);
 
-            doAFlip = velVec.dotProduct(realVecVec) < 0;
+            doAFlip = velVec.dot(realVecVec) < 0;
 
 //            drawDebugVec(tessellator, Vec3.fromPool(x, y + 1.8, z), Vec3.fromPool(velVec.x, velVec.y, velVec.z), 1.5, 0, 1, 1, 1);
         }
@@ -71,31 +72,31 @@ public class EntityRendererMinecart extends EntityRenderer<EntityMinecart> {
         GL11.glRotated(-lerpXRot, 0.0F, 0.0F, 1.0F);
         final double hurtAngle = minecart.timeSinceHit - partialTick;
         double currentDamage = minecart.currentDamage - partialTick;
-        if(currentDamage < 0.0F) {
+        if (currentDamage < 0.0F) {
             currentDamage = 0.0F;
         }
-        if(hurtAngle > 0.0F) {
-            GL11.glRotated(((Math.sin(hurtAngle) * hurtAngle * currentDamage) / 10F) * (float)minecart.hurtDirection, 1.0F, 0.0F, 0.0F);
+        if (hurtAngle > 0.0F) {
+            GL11.glRotated(((Math.sin(hurtAngle) * hurtAngle * currentDamage) / 10F) * (float) minecart.hurtDirection, 1.0F, 0.0F, 0.0F);
         }
         // Render block in cart
-        if(minecart.getType() != EntityMinecart.PASSENGER_CART) {
+        if (minecart.getType() != EntityMinecart.PASSENGER_CART) {
             TextureRegistry.blockAtlas.bind();
             final float scale = 0.75F;
             GL11.glScalef(scale, scale, scale);
             GL11.glTranslatef(0.0F, 0.3125F, 0.0F);
             GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
             float brightness = 1.0f;
-            if(LightmapHelper.isLightmapEnabled()) {
+            if (LightmapHelper.isLightmapEnabled()) {
                 LightmapHelper.setLightmapCoord(minecart.getLightmap(partialTick));
-            } else if(!Global.accessor.isFullbrightEnabled()) {
+            } else if (!Global.accessor.isFullbrightEnabled()) {
                 brightness = minecart.getBrightness(partialTick);
             }
 
             GL11.glPushMatrix();
-            if (doAFlip){
+            if (doAFlip) {
                 GL11.glRotatef(180, 0, 1, 0);
             }
-            switch (minecart.getType()){
+            switch (minecart.getType()) {
                 case EntityMinecart.CHEST_CART:
                     final Block<?> block;
                     if ((minecart.getMeta() & 0b0000_0001) != 0) {
@@ -119,23 +120,23 @@ public class EntityRendererMinecart extends EntityRenderer<EntityMinecart> {
             GL11.glScalef(1.0F / scale, 1.0F / scale, 1.0F / scale);
         }
         bindTexture("/assets/minecraft/textures/entity/cart.png");
-        GL11.glScalef(1/16f, 1/16f, -1/16f);
+        GL11.glScalef(1 / 16f, 1 / 16f, -1 / 16f);
         getModel("main").render(tessellator);
         GL11.glPopMatrix();
         GL11.glDisable(GL12.GL_RESCALE_NORMAL);
     }
-    private static void drawDebugVec(final Tessellator tessellator, final Vec3 pos, final Vec3 vec, final double scale, final float r, final float g, final float b, final float a){
-        if (pos == null || vec == null) return;
+
+    private static void drawDebugVec(final @NotNull Tessellator tessellator, final @NotNull Vector3dc start, final @NotNull Vector3dc end, final double scale, final float r, final float g, final float b, final float a) {
         GL11.glLineWidth(10);
         GL11.glDisable(GL11.GL_LIGHTING);
         GL11.glDisable(GL11.GL_TEXTURE_2D);
         tessellator.startDrawing(GL11.GL_LINES);
         tessellator.setColorRGBA_F(r, g, b, a);
-        tessellator.addVertex(pos.x, pos.y, pos.z);
+        tessellator.addVertex(start.x(), start.y(), start.z());
         tessellator.addVertex(
-            pos.x + vec.x * scale,
-            pos.y + vec.y * scale,
-            pos.z + vec.z * scale);
+            start.x() + end.x() * scale,
+            start.y() + end.y() * scale,
+            start.z() + end.z() * scale);
         tessellator.draw();
         GL11.glEnable(GL11.GL_TEXTURE_2D);
         GL11.glEnable(GL11.GL_LIGHTING);
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/MobRenderer.java b/game/client/src/main/java/net/minecraft/client/render/entity/MobRenderer.java
index 92294f5df..7b1d79f9c 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/MobRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/MobRenderer.java
@@ -10,9 +10,9 @@ import net.minecraft.core.entity.AgedMob;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.Color;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 import org.slf4j.Logger;
@@ -247,7 +247,7 @@ public abstract class MobRenderer<T extends Mob> extends EntityRenderer<T>{
     }
 
     @Override
-    public @NotNull AABB entityViewBox(@NotNull final T entity) {
+    public @NotNull AABBdc entityViewBox(@NotNull final T entity) {
 //        return this.entityModel.visibleBounds().cloneMove(entity.x, entity.y, entity.z);
         return super.entityViewBox(entity);
     }
diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererPlayer.java b/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererPlayer.java
index bb8fe099c..d8640e467 100644
--- a/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererPlayer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererPlayer.java
@@ -19,6 +19,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.gamemode.Gamemode;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.BlocksContainer;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.lwjgl.opengl.GL11;
@@ -72,8 +73,7 @@ public class MobRendererPlayer extends MobRendererBipedArmored<Player>
     }
 
     public void drawHeldObject(final Player player, final float partialTick) {
-        if (player.getHeldObject() instanceof CarriedBlock) {
-            final CarriedBlock carriedBlock = (CarriedBlock)player.getHeldObject();
+        if (player.getHeldObject() instanceof CarriedBlock carriedBlock) {
             if (this.container == null || this.container.world != player.world) {
                 this.container = new BlocksContainer(player.world);
             }
@@ -95,16 +95,14 @@ public class MobRendererPlayer extends MobRendererBipedArmored<Player>
             GL11.glScalef(0.55f, -0.55f, 0.55f);
             GL11.glTranslatef(0, -0.75f, -0.75f);
 
-            final int blockX = MathHelper.floor(player.x);
-            final int blockY = MathHelper.floor(player.y) + 1;
-            final int blockZ = MathHelper.floor(player.z);
+            final TilePos blockPos = new TilePos(player.x, player.y + 1, player.z);
 
             tessellator.startDrawingQuads();
-            tessellator.setTranslation(-blockX -0.5, -blockY -0.5, -blockZ -0.5);
+            tessellator.setTranslation(-blockPos.x -0.5, -blockPos.y -0.5, -blockPos.z -0.5);
 
             this.container.setLightReferenceEntity(player);
-            this.container.setBlock(blockX, blockY, blockZ, carriedBlock.blockId, carriedBlock.metadata, carriedBlock.entity);
-            BlockModelDispatcher.getInstance().getDispatch(carriedBlock.block()).renderNoCulling(Tessellator.instance, this.container, blockX, blockY, blockZ);
+            this.container.setBlock(blockPos.x, blockPos.y, blockPos.z, carriedBlock.blockId, carriedBlock.metadata, carriedBlock.entity);
+            BlockModelDispatcher.getInstance().getDispatch(carriedBlock.block()).renderNoCulling(Tessellator.instance, this.container, blockPos);
             tessellator.draw();
             tessellator.setTranslation(0, 0, 0);
             this.container.setLightReferenceEntity(null);
diff --git a/game/client/src/main/java/net/minecraft/client/render/particle/Particle.java b/game/client/src/main/java/net/minecraft/client/render/particle/Particle.java
index d83c56ca8..f8fb8869f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/particle/Particle.java
+++ b/game/client/src/main/java/net/minecraft/client/render/particle/Particle.java
@@ -11,16 +11,16 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.joml.Random;
 import org.joml.Vector2d;
+import org.joml.Vector3d;
 import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.joml.primitives.Rayd;
 
 import java.util.List;
@@ -153,7 +153,7 @@ public class Particle {
             switch (hitTile.side) {
                 case EAST:
                 case WEST: {
-                    this.x = hitTile.location.x += hitTile.side.getOffsetX() * 0.01d * this.size;
+                    this.x = hitTile.location.x() + hitTile.side.getOffsetX() * 0.01d * this.size;
                     this.y += yd;
                     this.z += zd;
                     this.xd = 0;
@@ -163,7 +163,7 @@ public class Particle {
                     this.onGround = true;
                 case BOTTOM: {
                     this.x += xd;
-                    this.y = hitTile.location.y += hitTile.side.getOffsetY() * 0.01d * this.size;
+                    this.y = hitTile.location.y() + hitTile.side.getOffsetY() * 0.01d * this.size;
                     this.z += zd;
                     this.yd = 0;
                     break;
@@ -172,7 +172,7 @@ public class Particle {
                 case NORTH: {
                     this.x += xd;
                     this.y += yd;
-                    this.z = hitTile.location.z += hitTile.side.getOffsetZ() * 0.01d * this.size;
+                    this.z = hitTile.location.z() + hitTile.side.getOffsetZ() * 0.01d * this.size;
                     this.zd = 0;
                     break;
                 }
@@ -184,11 +184,11 @@ public class Particle {
         }
     }
 
-    private final AABBd __singleAABB = new AABBd();
     private final Vector2d __r = new Vector2d();
     private final Rayd __ray = new Rayd();
-    private final List<AABB> aabbs = new ObjectArrayList<>();
-    private final AABB refAABB = AABB.fromPool(0, 0, 0, 0, 0, 0);
+    private final List<AABBdc> aabbs = new ObjectArrayList<>();
+    private final AABBd refAABB = new AABBd();
+
     public @Nullable HitResult raycastBlocks(final double ox, final double oy, final double oz, final double xd, final double yd, final double zd) {
         this.__ray.oX = ox;
         this.__ray.oY = oy;
@@ -211,9 +211,9 @@ public class Particle {
 
         TilePos tilePos = new TilePos(ray.oX, ray.oY, ray.oZ);
 
-        double sideDistX = -(ray.oX - (tilePos.x + 0.5)) * (1/ray.dX) + 0.5 * dDistX;
-        double sideDistY = -(ray.oY - (tilePos.y + 0.5)) * (1/ray.dY) + 0.5 * dDistY;
-        double sideDistZ = -(ray.oZ - (tilePos.z + 0.5)) * (1/ray.dZ) + 0.5 * dDistZ;
+        double sideDistX = -(ray.oX - (tilePos.x + 0.5)) * (1 / ray.dX) + 0.5 * dDistX;
+        double sideDistY = -(ray.oY - (tilePos.y + 0.5)) * (1 / ray.dY) + 0.5 * dDistY;
+        double sideDistZ = -(ray.oZ - (tilePos.z + 0.5)) * (1 / ray.dZ) + 0.5 * dDistZ;
 
         double dx = 0.0;
         double dy = 0.0;
@@ -224,13 +224,10 @@ public class Particle {
             Block<?> block = this.world.getBlock(tilePos);
             if (block != null && collidesWithBlock(block, this.world.getBlockData(tilePos))) {
                 this.aabbs.clear();
-                block.getCollisionAABBs(this.world, tilePos, this.refAABB.set(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1, tilePos.y + 1, tilePos.z + 1), this.aabbs);
+                block.getCollisionAABBs(this.world, tilePos, this.refAABB.setMin(tilePos.x, tilePos.y, tilePos.z).setMax(tilePos.x + 1, tilePos.y + 1, tilePos.z + 1), this.aabbs);
                 double tMin = Double.MAX_VALUE;
                 for (int i = 0, aabbsSize = this.aabbs.size(); i < aabbsSize; i++) {
-                    AABB aabb = this.aabbs.get(i);
-                    this.__singleAABB.setMin(aabb.minX, aabb.minY, aabb.minZ);
-                    this.__singleAABB.setMax(aabb.maxX, aabb.maxY, aabb.maxZ);
-                    if (this.__singleAABB.intersectsRay(ray, this.__r)) {
+                    if (this.aabbs.get(i).intersectsRay(ray, this.__r)) {
                         tMin = org.joml.Math.min(this.__r.x, tMin);
                     }
                 }
@@ -238,7 +235,7 @@ public class Particle {
                     return new HitResult.Tile(
                         tilePos,
                         direction.getSide(),
-                        Vec3.fromPool(ray.oX + tMin * ray.dX, ray.oY + tMin * ray.dY, ray.oZ + tMin * ray.dZ));
+                        new Vector3d(ray.oX + tMin * ray.dX, ray.oY + tMin * ray.dY, ray.oZ + tMin * ray.dZ));
                 }
                 return null;
             }
@@ -247,7 +244,7 @@ public class Particle {
                 tilePos.x += signX;
                 dx = tilePos.x - ray.oX;
                 sideDistX += dDistX;
-                direction =  signX > 0 ? Direction.WEST : Direction.EAST;
+                direction = signX > 0 ? Direction.WEST : Direction.EAST;
             } else if (Double.isFinite(sideDistY) && sideDistY < sideDistZ) {
                 tilePos.y += signY;
                 dy = tilePos.y - ray.oY;
@@ -329,17 +326,13 @@ public class Particle {
         final int skylight;
         final int blocklight;
         if (this.world.getBlockLitInteriorSurface(blockPos)) {
-            TilePos tu = blockPos.up();
-            TilePos tw = blockPos.west();
-            TilePos te = blockPos.east();
-            TilePos ts = blockPos.south();
-            TilePos tn = blockPos.north();
-
-            int bU = this.world.getSavedLightValue(LightLayer.Block, tu);
-            final int bW = this.world.getSavedLightValue(LightLayer.Block, tw);
-            final int bE = this.world.getSavedLightValue(LightLayer.Block, te);
-            final int bS = this.world.getSavedLightValue(LightLayer.Block, ts);
-            final int bN = this.world.getSavedLightValue(LightLayer.Block, tn);
+            TilePos queryPos = new TilePos();
+
+            int bU = this.world.getSavedLightValue(LightLayer.Block, blockPos.up(queryPos));
+            final int bW = this.world.getSavedLightValue(LightLayer.Block, blockPos.west(queryPos));
+            final int bE = this.world.getSavedLightValue(LightLayer.Block, blockPos.east(queryPos));
+            final int bS = this.world.getSavedLightValue(LightLayer.Block, blockPos.south(queryPos));
+            final int bN = this.world.getSavedLightValue(LightLayer.Block, blockPos.north(queryPos));
             if (bW > bU) {
                 bU = bW;
             }
@@ -354,11 +347,11 @@ public class Particle {
             }
             blocklight = bU;
 
-            int sU = this.world.getSavedLightValue(LightLayer.Sky, tu);
-            final int sW = this.world.getSavedLightValue(LightLayer.Sky, tw);
-            final int sE = this.world.getSavedLightValue(LightLayer.Sky, te);
-            final int sS = this.world.getSavedLightValue(LightLayer.Sky, ts);
-            final int sN = this.world.getSavedLightValue(LightLayer.Sky, tn);
+            int sU = this.world.getSavedLightValue(LightLayer.Sky, blockPos.up(queryPos));
+            final int sW = this.world.getSavedLightValue(LightLayer.Sky, blockPos.west(queryPos));
+            final int sE = this.world.getSavedLightValue(LightLayer.Sky, blockPos.east(queryPos));
+            final int sS = this.world.getSavedLightValue(LightLayer.Sky, blockPos.south(queryPos));
+            final int sN = this.world.getSavedLightValue(LightLayer.Sky, blockPos.north(queryPos));
             if (sW > sU) {
                 sU = sW;
             }
diff --git a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBlockBreaking.java b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBlockBreaking.java
index 9a3ea1042..889106529 100644
--- a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBlockBreaking.java
+++ b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBlockBreaking.java
@@ -11,6 +11,7 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 
 public class ParticleBlockBreaking extends Particle {
@@ -27,12 +28,12 @@ public class ParticleBlockBreaking extends Particle {
         this.size /= 2.0F;
     }
 
-    public ParticleBlockBreaking init(int x, int y, int z) {
-        int meta = this.world.getBlockMetadata(x, y, z);
+    public ParticleBlockBreaking init(@NotNull TilePos tilePos) {
+        int meta = this.world.getBlockData(tilePos);
         BlockModel<?> model = BlockModelDispatcher.getInstance().getDispatch(this.block);
-        int index = model.particleColorIndex(this.world, x, y, z, this.side, meta);
+        int index = model.particleColorIndex(this.world, tilePos, this.side, meta);
         if (index >= 0) {
-            int col = BlockColorDispatcher.getInstance().getDispatch(this.block).getWorldColor(this.world, x, y, z, index);
+            int col = BlockColorDispatcher.getInstance().getDispatch(this.block).getWorldColor(this.world, tilePos, index);
             this.rCol *= (col >> 16 & 0xff) / 255F;
             this.gCol *= (col >> 8 & 0xff) / 255F;
             this.bCol *= (col & 0xff) / 255F;
diff --git a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBubble.java b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBubble.java
index 625ab1be2..705badb1e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBubble.java
+++ b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleBubble.java
@@ -2,7 +2,7 @@ package net.minecraft.client.render.particle;
 
 import net.minecraft.client.render.LightmapHelper;
 import net.minecraft.client.render.texture.stitcher.TextureRegistry;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
 
@@ -36,7 +36,7 @@ public class ParticleBubble extends Particle {
         this.xd *= 0.85D;
         this.yd *= 0.85D;
         this.zd *= 0.85D;
-        if (this.needsWater && this.world.getBlockMaterial(new TilePos(this.x, this.y, this.z)) != Material.water) {
+        if (this.needsWater && this.world.getBlockMaterial(new TilePos(this.x, this.y, this.z)) != Materials.WATER) {
             remove();
         }
         if (this.lifetime-- <= 0) {
diff --git a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java
index 60d84995a..beb82d684 100644
--- a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java
+++ b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java
@@ -50,7 +50,7 @@ public final class ParticleDispatcher extends Dispatcher<String, ParticleLambda>
         addDispatch("puffrgb", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticlePuffRGB(world, x, y, z, (float) motionX, (float) motionY, (float) motionZ, data));
         addDispatch("reddust", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleRedstoneDust(world, x, y, z, data));
         addDispatch("item", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleItemBreaking(world, x, y, z, Item.itemsList[MathHelper.clamp(data, 0, Item.itemsList.length - 1)]));
-        addDispatch("block", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleBlockBreaking(world, x, y, z, motionX, motionY, motionZ, Blocks.blocksList[BlockParticleHelper.decodeBlockID(data)], BlockParticleHelper.decodeBlockSide(data), BlockParticleHelper.decodeBlockMeta(data)).init((int) x, (int) y, (int) z));
+        addDispatch("block", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleBlockBreaking(world, x, y, z, motionX, motionY, motionZ, Blocks.blocksList[BlockParticleHelper.decodeBlockID(data)], BlockParticleHelper.decodeBlockSide(data), BlockParticleHelper.decodeBlockMeta(data)).init(new TilePos(x, y, z)));
         addDispatch("snowshovel", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleSnowShovel(world, x, y, z, motionX, motionY, motionZ));
         addDispatch("heart", (world, x, y, z, motionX, motionY, motionZ, data) -> new ParticleHeart(world, x, y, z, motionX, motionY, motionZ));
         addDispatch("slimechunk", (world, x, y, z, motionX, motionY, motionZ, data) -> {
diff --git a/game/client/src/main/java/net/minecraft/client/render/shader/Shader.java b/game/client/src/main/java/net/minecraft/client/render/shader/Shader.java
index 749493bd0..e259f194f 100644
--- a/game/client/src/main/java/net/minecraft/client/render/shader/Shader.java
+++ b/game/client/src/main/java/net/minecraft/client/render/shader/Shader.java
@@ -19,11 +19,13 @@ public class Shader {
     protected int vertexShader;
     protected int fragmentShader;
 
+    public boolean supported = true;
     protected boolean enabled = false;
 
     protected final Object2IntMap<String> uniformLocations = new Object2IntArrayMap<>();
 
     public @NotNull Shader compile(@NotNull ShaderProvider folder, @NotNull String name) {
+        if (!supported) return this;
         OpenGLHelper.checkError("pre compile shader " + name);
 
         delete();
diff --git a/game/client/src/main/java/net/minecraft/client/render/shader/ShaderGeometry.java b/game/client/src/main/java/net/minecraft/client/render/shader/ShaderGeometry.java
index bbe76d47a..78f642142 100644
--- a/game/client/src/main/java/net/minecraft/client/render/shader/ShaderGeometry.java
+++ b/game/client/src/main/java/net/minecraft/client/render/shader/ShaderGeometry.java
@@ -28,6 +28,7 @@ public class ShaderGeometry extends Shader{
 
     @Override
     public @NotNull Shader compile(@NotNull ShaderProvider folder, @NotNull String name) {
+        if (!supported) return this;
         OpenGLHelper.checkError("pre compile shader " + name);
 
         delete();
diff --git a/game/client/src/main/java/net/minecraft/client/render/shader/Shaders.java b/game/client/src/main/java/net/minecraft/client/render/shader/Shaders.java
index 097189cc0..7d1f69138 100644
--- a/game/client/src/main/java/net/minecraft/client/render/shader/Shaders.java
+++ b/game/client/src/main/java/net/minecraft/client/render/shader/Shaders.java
@@ -7,9 +7,8 @@ import net.minecraft.client.Minecraft;
 import net.minecraft.client.gui.ScreenPhotoMode;
 import net.minecraft.client.render.camera.CameraUtil;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.HumanArmorShape;
-import net.minecraft.core.item.IArmorItem;
 import net.minecraft.core.item.ItemStack;
 
 public abstract class Shaders {
@@ -83,9 +82,9 @@ public abstract class Shaders {
 		int isEyeInLiquid = 0;
 		float celestialAngle = 0.0f;
 		if(minecraft.thePlayer != null && minecraft.currentWorld != null && minecraft.activeCamera != null) {
-			if(CameraUtil.isUnderLiquid(minecraft.activeCamera, minecraft.currentWorld, Material.lava, partialTicks)) {
+			if(CameraUtil.isUnderLiquid(minecraft.activeCamera, minecraft.currentWorld, Materials.LAVA, partialTicks)) {
 				isEyeInLiquid = 2;
-			}else if(CameraUtil.isUnderLiquid(minecraft.activeCamera, minecraft.currentWorld, Material.water, partialTicks)) {
+			}else if(CameraUtil.isUnderLiquid(minecraft.activeCamera, minecraft.currentWorld, Materials.WATER, partialTicks)) {
 				isEyeInLiquid = 1;
 			}
 			celestialAngle = minecraft.currentWorld.getCelestialAngle(partialTicks);
diff --git a/game/client/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java b/game/client/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
index 86e261f49..0bb681523 100644
--- a/game/client/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/shader/ShadersRenderer.java
@@ -14,6 +14,7 @@ import net.minecraft.client.render.LightmapHelper;
 import net.minecraft.client.render.tessellator.ParticleTessellator;
 import net.minecraft.client.render.tessellator.ShaderParticleTessellator;
 import net.minecraft.client.render.tessellator.Tessellator;
+import net.minecraft.core.block.material.Materials;
 import org.jetbrains.annotations.NotNull;
 import org.joml.Matrix4f;
 import org.lwjgl.opengl.GL30;
@@ -24,7 +25,6 @@ import net.minecraft.client.render.OpenGLHelper;
 import net.minecraft.client.render.Renderer;
 import net.minecraft.client.render.texture.Texture;
 import net.minecraft.client.render.camera.CameraUtil;
-import net.minecraft.core.block.material.Material;
 import org.lwjgl.system.MemoryUtil;
 import org.slf4j.Logger;
 
@@ -65,9 +65,12 @@ public class ShadersRenderer implements Renderer {
         if (!Shaders.enableShaders) throw new RuntimeException("Shaders disabled!");
         if (OpenGLHelper.gl32) {
             this.vao = GL30.glGenVertexArrays();
-            this.particleShader.enabled = true;
+            this.particleShader.supported = true;
+            LOGGER.info("GL32 supported, enabling particle geometry shaders");
         } else {
             this.vao = 0;
+            this.particleShader.supported = false;
+            LOGGER.info("GL32 not supported, disabling particle geometry shaders");
         }
     }
 
@@ -152,9 +155,9 @@ public class ShadersRenderer implements Renderer {
             glUniformMatrix4fv(this.cloudsShader.getUniform("gbufferProjectionInverse"), false, this.matrixBuffer);
 
             int isEyeInLiquid;
-            if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Material.lava, partialTicks)) {
+            if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Materials.LAVA, partialTicks)) {
                 isEyeInLiquid = 2;
-            } else if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Material.water, partialTicks)) {
+            } else if (CameraUtil.isUnderLiquid(this.mc.activeCamera, this.mc.currentWorld, Materials.WATER, partialTicks)) {
                 isEyeInLiquid = 1;
             } else {
                 isEyeInLiquid = 0;
@@ -213,8 +216,10 @@ public class ShadersRenderer implements Renderer {
 
     @Override
     public void endRenderParticles(float partialTicks) {
-        glUseProgram(0);
-        GL30.glBindVertexArray(0);
+        if (this.particleShader.isEnabled()) {
+            glUseProgram(0);
+            GL30.glBindVertexArray(0);
+        }
     }
 
     @Override
diff --git a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRenderer.java b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRenderer.java
index 17cc19e67..1741688fe 100644
--- a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRenderer.java
+++ b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRenderer.java
@@ -5,6 +5,10 @@ import java.util.List;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.world.pos.TilePos;
+import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBf;
 import org.lwjgl.opengl.GL11;
 
 import net.minecraft.client.render.block.model.BlockModel;
@@ -14,14 +18,12 @@ import net.minecraft.client.render.entity.EntityRendererItem;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 
-public abstract class ChunkRenderer
-{
+public abstract class ChunkRenderer {
     public static final int MAX_RENDER_PASSES = 2;
     public static int updates = 0;
-    
+
     public World world;
     protected final int lists;
     public int posX;
@@ -43,147 +45,127 @@ public abstract class ChunkRenderer
     public int zm;
     public float radius;
     public boolean dirty;
-    public AABB bb;
+    public AABBf bb;
     public int id;
     public boolean occlusionVisible;
     public boolean occlusionQuerying;
     public int occlusionId;
     public boolean skyLit;
     protected boolean compiled;
-    public List<TileEntity> renderableBlockEntities;
-    protected final List<TileEntity> globalRenderableBlockEntities;
-
-    public ChunkRenderer(World world, List<TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists)
-    {
-        visible = false;
-        empty = new boolean[MAX_RENDER_PASSES];
-        occlusionVisible = true;
-        compiled = false;
-        renderableBlockEntities = new ArrayList<>();
+    public @NotNull List<@NotNull TileEntity> renderableBlockEntities;
+    protected final @NotNull List<@NotNull TileEntity> globalRenderableBlockEntities;
+
+    public ChunkRenderer(@NotNull World world, @NotNull List<@NotNull TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists) {
+        this.visible = false;
+        this.empty = new boolean[MAX_RENDER_PASSES];
+        this.occlusionVisible = true;
+        this.compiled = false;
+        this.renderableBlockEntities = new ArrayList<>();
         this.world = world;
-        globalRenderableBlockEntities = globalRenderableTileEntities;
-        sizeX = sizeY = sizeZ = size;
-        radius = MathHelper.sqrt_float(sizeX * sizeX + sizeY * sizeY + sizeZ * sizeZ) / 2.0F;
+        this.globalRenderableBlockEntities = globalRenderableTileEntities;
+        this.sizeX = this.sizeY = this.sizeZ = size;
+        this.radius = MathHelper.sqrt_float(this.sizeX * this.sizeX + this.sizeY * this.sizeY + this.sizeZ * this.sizeZ) / 2.0F;
         this.lists = lists;
         this.posX = -999;
         setPos(x, y, z);
-        dirty = false;
+        this.dirty = false;
     }
 
-    public void setPos(int x, int y, int z)
-    {
-        if (x != this.posX || y != this.posY || z != this.posZ)
-        {
+    public void setPos(int x, int y, int z) {
+        if (x != this.posX || y != this.posY || z != this.posZ) {
             reset();
             this.posX = x;
             this.posY = y;
             this.posZ = z;
-            xm = x + sizeX / 2;
-            ym = y + sizeY / 2;
-            zm = z + sizeZ / 2;
-            xRenderOffs = x & 0x3ff;
-            yRenderOffs = y;
-            zRenderOffs = z & 0x3ff;
-            xRender = x - xRenderOffs;
-            yRender = y - yRenderOffs;
-            zRender = z - zRenderOffs;
+            this.xm = x + this.sizeX / 2;
+            this.ym = y + this.sizeY / 2;
+            this.zm = z + this.sizeZ / 2;
+            this.xRenderOffs = x & 0x3ff;
+            this.yRenderOffs = y;
+            this.zRenderOffs = z & 0x3ff;
+            this.xRender = x - this.xRenderOffs;
+            this.yRender = y - this.yRenderOffs;
+            this.zRender = z - this.zRenderOffs;
             float f = 6F;
-            bb = AABB.fromPool((float)x - f, (float)y - f, (float)z - f, (float)(x + sizeX) + f, (float)(y + sizeY) + f, (float)(z + sizeZ) + f).copyUnpooled();
-            GL11.glNewList(lists + MAX_RENDER_PASSES, GL11.GL_COMPILE);
-            EntityRendererItem.renderFlatAABB(AABB.fromPool((float) xRenderOffs - f, (float) yRenderOffs - f, (float) zRenderOffs - f, (float)(xRenderOffs + sizeX) + f, (float)(yRenderOffs + sizeY) + f, (float)(zRenderOffs + sizeZ) + f));
+            this.bb = new AABBf(x - f, y - f,  z - f, (x + this.sizeX) + f, (y + this.sizeY) + f, (z + this.sizeZ) + f);
+            GL11.glNewList(this.lists + MAX_RENDER_PASSES, GL11.GL_COMPILE);
+            EntityRendererItem.renderFlatAABB(new AABBd( this.xRenderOffs - f, this.yRenderOffs - f, this.zRenderOffs - f, (this.xRenderOffs + this.sizeX) + f, (this.yRenderOffs + this.sizeY) + f, (this.zRenderOffs + this.sizeZ) + f));
             GL11.glEndList();
             setDirty();
         }
     }
-    
+
     public abstract boolean rebuild(boolean priority);
-    
-    public boolean renderBlock(Tessellator tessellator, WorldSource worldSource, BlockModel<?> model, int x, int y, int z) {
-    	boolean rendered = false;
-		rendered |= model.render(tessellator, worldSource, x, y, z);
-		if(model.hasOverbright()) {
-			rendered |= model.renderOverbright(tessellator, worldSource, x, y, z);
-		}
-		return rendered;
+
+    public boolean renderBlock(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, @NotNull BlockModel<?> model, @NotNull TilePos tilePos) {
+        boolean rendered = false;
+        rendered |= model.render(tessellator, worldSource, tilePos);
+        if (model.hasOverbright()) {
+            rendered |= model.renderOverbright(tessellator, worldSource, tilePos);
+        }
+        return rendered;
     }
 
-    protected void translateToPos()
-    {
-        GL11.glTranslatef(xRenderOffs, yRenderOffs, zRenderOffs);
+    protected void translateToPos() {
+        GL11.glTranslatef(this.xRenderOffs, this.yRenderOffs, this.zRenderOffs);
     }
 
-    public float distanceToEntitySquared(Entity entity)
-    {
-        float dx = (float)(entity.x - (double) xm);
-        float dy = (float)(entity.y - (double) ym);
-        float dz = (float)(entity.z - (double) zm);
+    public float distanceToEntitySquared(Entity entity) {
+        float dx = (float) (entity.x - (double) this.xm);
+        float dy = (float) (entity.y - (double) this.ym);
+        float dz = (float) (entity.z - (double) this.zm);
         return dx * dx + dy * dy + dz * dz;
     }
 
-    public float distanceToCameraSquared(ICamera camera)
-    {
-        float dx = (float)(camera.getX(1f) - xm);
-        float dy = (float)(camera.getY(1f) - ym);
-        float dz = (float)(camera.getZ(1f) - zm);
+    public float distanceToCameraSquared(ICamera camera) {
+        float dx = (float) (camera.getX(1f) - this.xm);
+        float dy = (float) (camera.getY(1f) - this.ym);
+        float dz = (float) (camera.getZ(1f) - this.zm);
         return dx * dx + dy * dy + dz * dz;
     }
 
-    public void reset()
-    {
-        for(int i = 0; i < MAX_RENDER_PASSES; i++)
-        {
-            empty[i] = true;
+    public void reset() {
+        for (int i = 0; i < MAX_RENDER_PASSES; i++) {
+            this.empty[i] = true;
         }
 
-        visible = false;
-        compiled = false;
+        this.visible = false;
+        this.compiled = false;
     }
 
-    public void delete()
-    {
+    public void delete() {
         reset();
-        world = null;
+        this.world = null;
     }
 
-    public int getList(int layer)
-    {
-        if(!visible)
-        {
+    public int getList(int layer) {
+        if (!this.visible) {
             return -1;
         }
-        if(!empty[layer])
-        {
-            return lists + layer;
-        } 
-        else
-        {
+        if (!this.empty[layer]) {
+            return this.lists + layer;
+        } else {
             return -1;
         }
     }
 
-    public void cull(CameraFrustum frustum, float partialTick)
-    {
-        visible = true/*frustum.isVisible(bb, partialTick)*/;
+    public void cull(CameraFrustum frustum, float partialTick) {
+        this.visible = true/*frustum.isVisible(bb, partialTick)*/;
     }
 
-    public void renderBB()
-    {
-        GL11.glCallList(lists + MAX_RENDER_PASSES);
+    public void renderBB() {
+        GL11.glCallList(this.lists + MAX_RENDER_PASSES);
     }
 
-    public boolean isEmpty()
-    {
-        if(!compiled)
-        {
+    public boolean isEmpty() {
+        if (!this.compiled) {
             return false;
-        } else
-        {
-            return empty[0] && empty[1];
+        } else {
+            return this.empty[0] && this.empty[1];
         }
     }
 
-    public void setDirty()
-    {
-        dirty = true;
+    public void setDirty() {
+        this.dirty = true;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererLegacy.java b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererLegacy.java
index 0d40a5209..dbd698ea8 100644
--- a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererLegacy.java
+++ b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererLegacy.java
@@ -20,92 +20,93 @@ import net.minecraft.core.world.chunk.ChunkCache;
 
 public class ChunkRendererLegacy extends ChunkRenderer {
 
-	public ChunkRendererLegacy(World world, List<TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists) {
-		super(world, globalRenderableTileEntities, x, y, z, size, lists);
-	}
-
-	@Override
-    public boolean rebuild(boolean priority)
-    {
-        if(!dirty) { return false; }
-        final int minX = posX;
-        final int minY = posY;
-        final int minZ = posZ;
-        final int maxX = posX + sizeX;
-        final int maxY = posY + sizeY;
-        final int maxZ = posZ + sizeZ;
+    public ChunkRendererLegacy(World world, List<TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists) {
+        super(world, globalRenderableTileEntities, x, y, z, size, lists);
+    }
+
+    @Override
+    public boolean rebuild(boolean priority) {
+        if (!this.dirty) {
+            return false;
+        }
+        final int minX = this.posX;
+        final int minY = this.posY;
+        final int minZ = this.posZ;
+        final int maxX = this.posX + this.sizeX;
+        final int maxY = this.posY + this.sizeY;
+        final int maxZ = this.posZ + this.sizeZ;
 
         final int cacheRadius = 1;
-        final ChunkCache chunkcache = new ChunkCache(world, new TilePos(minX - cacheRadius, minY - cacheRadius, minZ - cacheRadius), new TilePos(maxX + cacheRadius, maxY + cacheRadius, maxZ + cacheRadius), priority);
+        final ChunkCache chunkcache = new ChunkCache(this.world, new TilePos(minX - cacheRadius, minY - cacheRadius, minZ - cacheRadius), new TilePos(maxX + cacheRadius, maxY + cacheRadius, maxZ + cacheRadius), priority);
         if (!chunkcache.allLoaded()) return false;
 
-        for(int i = 0; i < MAX_RENDER_PASSES; i++) { empty[i] = true; }
+        for (int i = 0; i < MAX_RENDER_PASSES; i++) {
+            this.empty[i] = true;
+        }
 
         Chunk.isLit = false;
-        final Set<TileEntity> lastSpecialTileEntities = new HashSet<>(renderableBlockEntities);
-        renderableBlockEntities.clear();
+        final Set<TileEntity> lastSpecialTileEntities = new HashSet<>(this.renderableBlockEntities);
+        this.renderableBlockEntities.clear();
         updates++;
 
         int renderPass = 0;
         Tessellator tessellator = Tessellator.instance;
-        do
-        {
-            if(renderPass >= MAX_RENDER_PASSES) { break; }
+        do {
+            if (renderPass >= MAX_RENDER_PASSES) {
+                break;
+            }
 
             boolean needsMoreRenderPasses = false;
             boolean hasRenderedBlock = false;
             boolean hasStartedDrawing = false;
 
-            for(int y = minY; y < maxY; y++)
-            {
-                for(int z = minZ; z < maxZ; z++)
-                {
-                    for(int x = minX; x < maxX; x++)
-                    {
-                        final int blockId = chunkcache.getBlockId(x, y, z);
-                        if(blockId <= 0) {
+            TilePos pos = new TilePos(0, 0, 0);
+            for (pos.y = minY; pos.y < maxY; pos.y++) {
+                for (pos.z = minZ; pos.z < maxZ; pos.z++) {
+                    for (pos.x = minX; pos.x < maxX; pos.x++) {
+                        final int blockId = chunkcache.getBlockId(pos);
+                        if (blockId <= 0) {
                             continue;
                         }
-                        if(!hasStartedDrawing) {
+                        if (!hasStartedDrawing) {
                             hasStartedDrawing = true;
-                            GL11.glNewList(lists + renderPass, GL11.GL_COMPILE);
+                            GL11.glNewList(this.lists + renderPass, GL11.GL_COMPILE);
                             GL11.glPushMatrix();
                             translateToPos();
                             final float scale = 1.000001F;
-                            GL11.glTranslatef((float)(-sizeZ) / 2.0F, (float)(-sizeY) / 2.0F, (float)(-sizeZ) / 2.0F);
+                            GL11.glTranslatef((float) (-this.sizeZ) / 2.0F, (float) (-this.sizeY) / 2.0F, (float) (-this.sizeZ) / 2.0F);
                             GL11.glScalef(scale, scale, scale);
-                            GL11.glTranslatef((float) sizeZ / 2.0F, (float) sizeY / 2.0F, (float) sizeZ / 2.0F);
+                            GL11.glTranslatef((float) this.sizeZ / 2.0F, (float) this.sizeY / 2.0F, (float) this.sizeZ / 2.0F);
                             tessellator.startDrawingQuads();
                             tessellator.setTranslation(-this.posX, -this.posY, -this.posZ);
-                            
-                            if(LightmapHelper.isLightmapEnabled()) {
-                            	// Make sure it's active
-                            	tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
+
+                            if (LightmapHelper.isLightmapEnabled()) {
+                                // Make sure it's active
+                                tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
                             }
                         }
-                        if(renderPass == 0 && Blocks.isEntityTile[blockId]) {
-                            final TileEntity tileentity = chunkcache.getTileEntity(x, y, z);
-                            if(TileEntityRenderDispatcher.instance.hasRenderer(tileentity)) {
-                                renderableBlockEntities.add(tileentity);
+                        if (renderPass == 0 && Blocks.isEntityTile[blockId]) {
+                            final TileEntity tileentity = chunkcache.getTileEntity(pos);
+                            if (tileentity != null && TileEntityRenderDispatcher.instance.hasRenderer(tileentity)) {
+                                this.renderableBlockEntities.add(tileentity);
                             }
                         }
                         final BlockModel<?> model = BlockModelDispatcher.getInstance().getDispatch(Blocks.blocksList[blockId]);
                         final int blockRenderPass = model.renderLayer();
-                        if(blockRenderPass != renderPass) {
+                        if (blockRenderPass != renderPass) {
                             needsMoreRenderPasses = true;
-                        }
-                        else {
-                        	if(LightmapHelper.isLightmapEnabled()) {
-                        		// Can probably be removed once all block models support the lightmap
-                        		tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 0));
-                        	}
+                        } else {
+                            if (LightmapHelper.isLightmapEnabled()) {
+                                // Can probably be removed once all block models support the lightmap
+                                tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 0));
+                            }
 
-    						hasRenderedBlock |= renderBlock(tessellator, world, model, x, y, z);
+                            hasRenderedBlock |= renderBlock(tessellator, this.world, model, pos);
                         }
                     }
                 }
             }
-            if(hasStartedDrawing) {
+            if (hasStartedDrawing) {
                 tessellator.draw();
                 GL11.glPopMatrix();
                 GL11.glEndList();
@@ -113,23 +114,23 @@ public class ChunkRendererLegacy extends ChunkRenderer {
             } else {
                 hasRenderedBlock = false;
             }
-            
-            if(hasRenderedBlock) {
-                empty[renderPass] = false;
-            }            
-            if(!needsMoreRenderPasses) {
+
+            if (hasRenderedBlock) {
+                this.empty[renderPass] = false;
+            }
+            if (!needsMoreRenderPasses) {
                 break;
             }
-            
+
             renderPass++;
-        } while(true);
-        HashSet<TileEntity> newSpecialTileEntities = new HashSet<>(renderableBlockEntities);
+        } while (true);
+        HashSet<TileEntity> newSpecialTileEntities = new HashSet<>(this.renderableBlockEntities);
         newSpecialTileEntities.removeAll(lastSpecialTileEntities);
-        globalRenderableBlockEntities.addAll(newSpecialTileEntities);
-        renderableBlockEntities.forEach(lastSpecialTileEntities::remove);
-        globalRenderableBlockEntities.removeAll(lastSpecialTileEntities);
-        skyLit = Chunk.isLit;
-        compiled = true;
+        this.globalRenderableBlockEntities.addAll(newSpecialTileEntities);
+        this.renderableBlockEntities.forEach(lastSpecialTileEntities::remove);
+        this.globalRenderableBlockEntities.removeAll(lastSpecialTileEntities);
+        this.skyLit = Chunk.isLit;
+        this.compiled = true;
         return true;
     }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererMultiDraw.java b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererMultiDraw.java
index bd8c5a664..583e9b488 100644
--- a/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererMultiDraw.java
+++ b/game/client/src/main/java/net/minecraft/client/render/terrain/ChunkRendererMultiDraw.java
@@ -21,138 +21,139 @@ import net.minecraft.core.world.pos.TilePos;
 
 public class ChunkRendererMultiDraw extends ChunkRenderer {
 
-	public final TerrainRendererMultiDraw terrainRenderer;
-	public final Entry[] renderListEntries;
-	
-	public ChunkRendererMultiDraw(TerrainRendererMultiDraw terrainRenderer, World world, List<TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists) {
-		super(world, globalRenderableTileEntities, x, y, z, size, lists);
-		
-		if(terrainRenderer == null) {
-			throw new NullPointerException("TerrainRenderer is null!");
-		}
-		
-		this.terrainRenderer = terrainRenderer;
-		this.renderListEntries = new Entry[terrainRenderer.MAX_RENDER_PASSES];
-	}
-	
-	@Override
-	public boolean rebuild(boolean priority) {
-		if(!dirty) {
-			return false;
-		}
-		
-		final int minX = posX;
-		final int minY = posY;
-		final int minZ = posZ;
-		
-		final int maxX = posX + sizeX;
-		final int maxY = posY + sizeY;
-		final int maxZ = posZ + sizeZ;
-		
-		final int renderPassCount = terrainRenderer.MAX_RENDER_PASSES;
-
-		final int cacheRadius = 1;
-		final ChunkCache chunkCache = new ChunkCache(world, new TilePos(minX - cacheRadius, minY - cacheRadius, minZ - cacheRadius), new TilePos(maxX + cacheRadius, maxY + cacheRadius, maxZ + cacheRadius), priority);
-		if (!chunkCache.allLoaded()) return false;
-
-		terrainRenderer.chunkDeleted(this);
-		Chunk.isLit = false;
-		final Set<TileEntity> lastSpecialTileEntities = new HashSet<>(renderableBlockEntities);
-		renderableBlockEntities.clear();
-
-		updates++;
-
-		TessellatorStandard tessellator = (TessellatorStandard) Tessellator.instance;
-		for(int renderPass = 0; renderPass < renderPassCount; renderPass++) {
-			boolean needsMoreRenderPasses = false;
-			boolean hasRenderedBlock = false;
-			boolean hasStartedDrawing = false;
-
-			for(int y = minY; y < maxY; y++) {
-				for(int z = minZ; z < maxZ; z++) {
-					for(int x = minX; x < maxX; x++) {
-						final int blockId = chunkCache.getBlockId(x, y, z);
-						if(blockId <= 0) {
-							continue;
-						}
-						if(!hasStartedDrawing) {
-							hasStartedDrawing = true;
-							tessellator.startDrawingQuads();
+    public final TerrainRendererMultiDraw terrainRenderer;
+    public final Entry[] renderListEntries;
+
+    public ChunkRendererMultiDraw(TerrainRendererMultiDraw terrainRenderer, World world, List<TileEntity> globalRenderableTileEntities, int x, int y, int z, int size, int lists) {
+        super(world, globalRenderableTileEntities, x, y, z, size, lists);
+
+        if (terrainRenderer == null) {
+            throw new NullPointerException("TerrainRenderer is null!");
+        }
+
+        this.terrainRenderer = terrainRenderer;
+        this.renderListEntries = new Entry[terrainRenderer.MAX_RENDER_PASSES];
+    }
+
+    @Override
+    public boolean rebuild(boolean priority) {
+        if (!this.dirty) {
+            return false;
+        }
+
+        final int minX = this.posX;
+        final int minY = this.posY;
+        final int minZ = this.posZ;
+
+        final int maxX = this.posX + this.sizeX;
+        final int maxY = this.posY + this.sizeY;
+        final int maxZ = this.posZ + this.sizeZ;
+
+        final int renderPassCount = this.terrainRenderer.MAX_RENDER_PASSES;
+
+        final int cacheRadius = 1;
+        final ChunkCache chunkCache = new ChunkCache(this.world, new TilePos(minX - cacheRadius, minY - cacheRadius, minZ - cacheRadius), new TilePos(maxX + cacheRadius, maxY + cacheRadius, maxZ + cacheRadius), priority);
+        if (!chunkCache.allLoaded()) return false;
+
+        this.terrainRenderer.chunkDeleted(this);
+        Chunk.isLit = false;
+        final Set<TileEntity> lastSpecialTileEntities = new HashSet<>(this.renderableBlockEntities);
+        this.renderableBlockEntities.clear();
+
+        updates++;
+
+        TessellatorStandard tessellator = Tessellator.instance;
+        for (int renderPass = 0; renderPass < renderPassCount; renderPass++) {
+            boolean needsMoreRenderPasses = false;
+            boolean hasRenderedBlock = false;
+            boolean hasStartedDrawing = false;
+
+            TilePos pos = new TilePos(0, 0, 0);
+            for (pos.y = minY; pos.y < maxY; pos.y++) {
+                for (pos.z = minZ; pos.z < maxZ; pos.z++) {
+                    for (pos.x = minX; pos.x < maxX; pos.x++) {
+                        final int blockId = chunkCache.getBlockId(pos);
+                        if (blockId <= 0) {
+                            continue;
+                        }
+                        if (!hasStartedDrawing) {
+                            hasStartedDrawing = true;
+                            tessellator.startDrawingQuads();
 //							tessellator.setTranslation(-this.posX, -this.posY, -this.posZ);
-							
-							RenderRegion region = terrainRenderer.getRenderRegionAtBlockPos(posX, posZ);
-							tessellator.setTranslation(-(region.posX << terrainRenderer.REGION_SIZE), 0.0, -(region.posZ << terrainRenderer.REGION_SIZE));
-							
-							if(LightmapHelper.isLightmapEnabled()) {
-								// Make sure it's active
-								tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
-							}
-							tessellator.setColorRGBA(255, 255, 255, 255);
-							tessellator.setTextureUV(0.0, 0.0);
-						}
-						if(renderPass == 0 && Blocks.isEntityTile[blockId]) {
-							final TileEntity tileentity = chunkCache.getTileEntity(x, y, z);
-							if(TileEntityRenderDispatcher.instance.hasRenderer(tileentity)) {
-								renderableBlockEntities.add(tileentity);
-							}
-						}
-						final BlockModel<?> model = BlockModelDispatcher.getInstance().getDispatch(Blocks.blocksList[blockId]);
-						final int blockRenderPass = model.renderLayer();
-						
-						if(blockRenderPass != renderPass) {
-							needsMoreRenderPasses = true;
-							continue;
-						}
-						
-						hasRenderedBlock |= renderBlock(tessellator, world, model, x, y, z);
-					}
-				}
-			}
-			if(hasStartedDrawing) {
-				terrainRenderer.chunkRendered(this, tessellator, renderPass);
-				tessellator.setTranslation(0.0, 0.0, 0.0);
-			}else {
-				hasRenderedBlock = false;
-			}
-
-			if(hasRenderedBlock) {
-				empty[renderPass] = false;
-			}
-			if(!needsMoreRenderPasses) {
-				break;
-			}
-		}
-		
-		HashSet<TileEntity> newSpecialTileEntities = new HashSet<>(renderableBlockEntities);
-		newSpecialTileEntities.removeAll(lastSpecialTileEntities);
-		globalRenderableBlockEntities.addAll(newSpecialTileEntities);
-		renderableBlockEntities.forEach(lastSpecialTileEntities::remove);
-		globalRenderableBlockEntities.removeAll(lastSpecialTileEntities);
-		skyLit = Chunk.isLit;
-		compiled = true;
-		return true;
-	}
-	
-	@Override
-	public void cull(CameraFrustum frustum, float partialTick) {
-		boolean wasVisible = this.visible;
-		super.cull(frustum, partialTick);
-		if(wasVisible != visible) {
-			terrainRenderer.chunkVisibilityChanged(this);
-		}
-	}
-	
-	@Override
-	public void reset() {
-		// TerrainRenderer is null during initialization
-		if(terrainRenderer != null) {
-			terrainRenderer.chunkDeleted(this);	
-		}
-		super.reset();
-	}
-	
-	@Override
-	public String toString() {
-		return "[" + posX + "," + posY + "," + posZ + "]";
-	}
+
+                            RenderRegion region = this.terrainRenderer.getRenderRegionAtBlockPos(this.posX, this.posZ);
+                            tessellator.setTranslation(-(region.posX << this.terrainRenderer.REGION_SIZE), 0.0, -(region.posZ << this.terrainRenderer.REGION_SIZE));
+
+                            if (LightmapHelper.isLightmapEnabled()) {
+                                // Make sure it's active
+                                tessellator.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
+                            }
+                            tessellator.setColorRGBA(255, 255, 255, 255);
+                            tessellator.setTextureUV(0.0, 0.0);
+                        }
+                        if (renderPass == 0 && Blocks.isEntityTile[blockId]) {
+                            final TileEntity tileentity = chunkCache.getTileEntity(pos);
+                            if (tileentity != null && TileEntityRenderDispatcher.instance.hasRenderer(tileentity)) {
+                                this.renderableBlockEntities.add(tileentity);
+                            }
+                        }
+                        final BlockModel<?> model = BlockModelDispatcher.getInstance().getDispatch(Blocks.blocksList[blockId]);
+                        final int blockRenderPass = model.renderLayer();
+
+                        if (blockRenderPass != renderPass) {
+                            needsMoreRenderPasses = true;
+                            continue;
+                        }
+
+                        hasRenderedBlock |= renderBlock(tessellator, this.world, model, pos);
+                    }
+                }
+            }
+            if (hasStartedDrawing) {
+                this.terrainRenderer.chunkRendered(this, tessellator, renderPass);
+                tessellator.setTranslation(0.0, 0.0, 0.0);
+            } else {
+                hasRenderedBlock = false;
+            }
+
+            if (hasRenderedBlock) {
+                this.empty[renderPass] = false;
+            }
+            if (!needsMoreRenderPasses) {
+                break;
+            }
+        }
+
+        HashSet<TileEntity> newSpecialTileEntities = new HashSet<>(this.renderableBlockEntities);
+        newSpecialTileEntities.removeAll(lastSpecialTileEntities);
+        this.globalRenderableBlockEntities.addAll(newSpecialTileEntities);
+        this.renderableBlockEntities.forEach(lastSpecialTileEntities::remove);
+        this.globalRenderableBlockEntities.removeAll(lastSpecialTileEntities);
+        this.skyLit = Chunk.isLit;
+        this.compiled = true;
+        return true;
+    }
+
+    @Override
+    public void cull(CameraFrustum frustum, float partialTick) {
+        boolean wasVisible = this.visible;
+        super.cull(frustum, partialTick);
+        if (wasVisible != this.visible) {
+            this.terrainRenderer.chunkVisibilityChanged(this);
+        }
+    }
+
+    @Override
+    public void reset() {
+        // TerrainRenderer is null during initialization
+        if (this.terrainRenderer != null) {
+            this.terrainRenderer.chunkDeleted(this);
+        }
+        super.reset();
+    }
+
+    @Override
+    public String toString() {
+        return "[" + this.posX + "," + this.posY + "," + this.posZ + "]";
+    }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererMovingPiston.java b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererMovingPiston.java
index 5f981884b..b319d7bf8 100644
--- a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererMovingPiston.java
+++ b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererMovingPiston.java
@@ -15,69 +15,61 @@ import net.minecraft.core.block.piston.BlockLogicPistonBaseSteel;
 import net.minecraft.core.block.piston.BlockLogicPistonHead;
 import net.minecraft.core.block.piston.TileEntityMovingPistonBlock;
 import net.minecraft.core.world.BlocksContainer;
+import net.minecraft.core.world.pos.TilePos;
 import org.lwjgl.opengl.GL11;
 
-public class TileEntityRendererMovingPiston extends TileEntityRenderer<TileEntityMovingPistonBlock>
-{
+public class TileEntityRendererMovingPiston extends TileEntityRenderer<TileEntityMovingPistonBlock> {
     private final Minecraft mc;
 
     private BlocksContainer container = null;
 
-    public TileEntityRendererMovingPiston()
-    {
-        mc = Minecraft.getMinecraft();
+    public TileEntityRendererMovingPiston() {
+        this.mc = Minecraft.getMinecraft();
     }
 
     @Override
-	public void doRender(Tessellator tessellator, TileEntityMovingPistonBlock tileEntity, double x, double y, double z,
-                         float partialTick)
-    {
+    public void doRender(Tessellator tessellator, TileEntityMovingPistonBlock tileEntity, double x, double y, double z,
+                         float partialTick) {
         Block<?> block = Blocks.getBlock(tileEntity.getMovedId());
-        if(block != null && tileEntity.getProgress(partialTick) < 1.0F)
-        {
-            if (container == null || container.world != tileEntity.worldObj) {
-                container = new BlocksContainer(tileEntity.worldObj);
+        if (block != null && tileEntity.getProgress(partialTick) < 1.0F) {
+            if (this.container == null || this.container.world != tileEntity.worldObj) {
+                this.container = new BlocksContainer(tileEntity.worldObj);
             }
+            TilePos tileEntPos = new TilePos(tileEntity.x, tileEntity.y, tileEntity.z);
             TextureRegistry.blockAtlas.bind();
             Lighting.disable();
             GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
             GL11.glEnable(GL11.GL_BLEND);
             GL11.glDisable(GL11.GL_CULL_FACE);
-            if(mc.isAmbientOcclusionEnabled())
-            {
+            if (this.mc.isAmbientOcclusionEnabled()) {
                 GL11.glShadeModel(GL11.GL_SMOOTH);
-            } else
-            {
+            } else {
                 GL11.glShadeModel(GL11.GL_FLAT);
             }
             tessellator.startDrawingQuads();
-            tessellator.setTranslation(((float)x - (float)tileEntity.x) + tileEntity.getXOff(partialTick), ((float)y - (float)tileEntity.y) + tileEntity.getYOff(partialTick), ((float)z - (float)tileEntity.z) + tileEntity.getZOff(partialTick));
-            if(Block.hasLogicClass(block, BlockLogicPistonHead.class) && tileEntity.getProgress(partialTick) < 0.5F)
-            {
-                ((BlockModelPistonHead)BlockModelDispatcher.getInstance().getDispatch(block)).renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, (Block<BlockLogicPistonHead>) block, tileEntity.x, tileEntity.y, tileEntity.z, false);
-            } else
-            if(tileEntity.isSourcePiston() && !tileEntity.isExtending())
-            {
+            tessellator.setTranslation(((float) x - (float) tileEntity.x) + tileEntity.getXOff(partialTick), ((float) y - (float) tileEntity.y) + tileEntity.getYOff(partialTick), ((float) z - (float) tileEntity.z) + tileEntity.getZOff(partialTick));
+            if (Block.hasLogicClass(block, BlockLogicPistonHead.class) && tileEntity.getProgress(partialTick) < 0.5F) {
+                ((BlockModelPistonHead) BlockModelDispatcher.getInstance().getDispatch(block)).renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, (Block<BlockLogicPistonHead>) block, tileEntPos, false);
+            } else if (tileEntity.isSourcePiston() && !tileEntity.isExtending()) {
                 BlockModelPiston<?> pistonBase = (BlockModelPiston<?>) BlockModelDispatcher.getInstance().getDispatch(block);
                 if (Block.hasLogicClass(block, BlockLogicPistonBaseSteel.class)) { // Todo remove this terrible hardcoded render code
                     BlockModelPistonHead blockModelPistonHead = ((BlockModelPistonHead) BlockModelDispatcher.getInstance().getDispatch(Blocks.PISTON_HEAD_STEEL));
                     blockModelPistonHead.setFaceTextureOverride(pistonBase.getFaceTexture());
-                    blockModelPistonHead.renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, Blocks.PISTON_HEAD_STEEL, tileEntity.x, tileEntity.y, tileEntity.z, tileEntity.getProgress(partialTick) < 0.5F);
+                    blockModelPistonHead.renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, Blocks.PISTON_HEAD_STEEL, tileEntPos, tileEntity.getProgress(partialTick) < 0.5F);
                     blockModelPistonHead.setFaceTextureOverride(null);
                 } else {
                     BlockModelPistonHead blockModelPistonHead = ((BlockModelPistonHead) BlockModelDispatcher.getInstance().getDispatch(Blocks.PISTON_HEAD));
                     blockModelPistonHead.setFaceTextureOverride(pistonBase.getFaceTexture());
-                    blockModelPistonHead.renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, Blocks.PISTON_HEAD, tileEntity.x, tileEntity.y, tileEntity.z, tileEntity.getProgress(partialTick) < 0.5F);
+                    blockModelPistonHead.renderPistonHeadNoCulling(tessellator, tileEntity.worldObj, Blocks.PISTON_HEAD, tileEntPos, tileEntity.getProgress(partialTick) < 0.5F);
                     blockModelPistonHead.setFaceTextureOverride(null);
                 }
-                tessellator.setTranslation((float)x - (float)tileEntity.x, (float)y - (float)tileEntity.y, (float)z - (float)tileEntity.z);
-                pistonBase.renderHeadless(tessellator, tileEntity.worldObj, tileEntity.x, tileEntity.y, tileEntity.z);
-            } else
-            {
-                container.setBlock(tileEntity.x, tileEntity.y, tileEntity.z, block.id(), tileEntity.getMovedData(), tileEntity.getMovedEntity());
-                BlockModelDispatcher.getInstance().getDispatch(block).renderNoCulling(tessellator, container, tileEntity.x, tileEntity.y, tileEntity.z);
-                container.setLightReferenceEntity(null);
-                container.clear();
+                tessellator.setTranslation((float) x - (float) tileEntity.x, (float) y - (float) tileEntity.y, (float) z - (float) tileEntity.z);
+                pistonBase.renderHeadless(tessellator, tileEntity.worldObj, tileEntPos);
+            } else {
+                this.container.setBlock(tileEntity.x, tileEntity.y, tileEntity.z, block.id(), tileEntity.getMovedData(), tileEntity.getMovedEntity());
+                BlockModelDispatcher.getInstance().getDispatch(block).renderNoCulling(tessellator, this.container, tileEntPos);
+                this.container.setLightReferenceEntity(null);
+                this.container.clear();
             }
             tessellator.setTranslation(0.0D, 0.0D, 0.0D);
             tessellator.draw();
diff --git a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererSign.java b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererSign.java
index 1ef003815..2f6bcfcc5 100644
--- a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererSign.java
+++ b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererSign.java
@@ -21,9 +21,9 @@ import net.minecraft.core.enums.EnumSignPicture;
 import net.minecraft.core.util.helper.Color;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 import org.useless.dragonfly.models.entity.StaticEntityModel;
@@ -32,8 +32,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
-{
+public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign> {
 
     private final Minecraft mc = Minecraft.getMinecraft();
     private final @NotNull StringBuilder builder = new StringBuilder();
@@ -47,22 +46,23 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
         }
     }
 
-     @Override
-	public void doRender(final @NotNull Tessellator t, final @NotNull TileEntitySign tileEntity, final double x, final double y, final double z, final float partialTick) {
+    @Override
+    public void doRender(final @NotNull Tessellator t, final @NotNull TileEntitySign tileEntity, final double x, final double y, final double z, final float partialTick) {
         final Block<?> block = tileEntity.getBlock();
-        if (block == null || !(block.getLogic() instanceof BlockLogicSign)) return; // Check to make sure the block for the entity is present before rendering, some edge cases have the tile entity loaded before the block data and can cause a crash
+        if (block == null || !(block.getLogic() instanceof BlockLogicSign sign))
+            return; // Check to make sure the block for the entity is present before rendering, some edge cases have the tile entity loaded before the block data and can cause a crash
 
         GL11.glEnable(GL12.GL_RESCALE_NORMAL);
         GL11.glPushMatrix();
 
         final StaticEntityModel model;
 
-        final float scale = 2/3f * 1/16f;
+        final float scale = 2 / 3f * 1 / 16f;
         final float height;
-        GL11.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
+        GL11.glTranslatef((float) x + 0.5F, (float) y, (float) z + 0.5F);
         final int meta = tileEntity.getBlockMeta();
-        if (((BlockLogicSign) block.getLogic()).isFreeStanding) {
-            final float angle = (float)((meta & BlockLogicSign.MASK_SIDE) * 360) / 16F;
+        if (sign.isFreeStanding) {
+            final float angle = (float) ((meta & BlockLogicSign.MASK_SIDE) * 360) / 16F;
             GL11.glRotatef(-angle, 0.0F, 1.0F, 0.0F);
             model = getModel("post");
             height = 20;
@@ -114,7 +114,8 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
         GL11.glDepthMask(false);
         GL11.glColor4f(1, 1, 1, 1);
         final EnumSignPicture picture = tileEntity.getPicture();
-        if (picture != EnumSignPicture.NONE) drawTexturedModalRect(1, 0.5, colorSign,TextureRegistry.getTexture(picture.getTextureKey()));
+        if (picture != EnumSignPicture.NONE)
+            drawTexturedModalRect(1, 0.5, colorSign, TextureRegistry.getTexture(picture.getTextureKey()));
         GL11.glDisable(GL11.GL_BLEND);
         GL11.glPopMatrix();
 
@@ -125,7 +126,7 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
         if (tileEntity.isGlowing()) {
             lightLevel = 1f;
             lightOffset = 96f;
-            if(LightmapHelper.isLightmapEnabled()) {
+            if (LightmapHelper.isLightmapEnabled()) {
                 LightmapHelper.setLightmapCoord(LightmapHelper.getLightmapCoord(15, 15));
             }
         }
@@ -137,8 +138,8 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
         GL11.glDepthMask(false);
         int color = Colors.allSignColors[tileEntity.getColor().id].getARGB();
         final int r = (int) MathHelper.clamp((Color.redFromInt(color) * lightLevel + lightOffset), 0, 255);
-        final int g = (int)MathHelper.clamp((Color.greenFromInt(color) * lightLevel + lightOffset), 0, 255);
-        final int b = (int)MathHelper.clamp((Color.blueFromInt(color) * lightLevel + lightOffset), 0, 255);
+        final int g = (int) MathHelper.clamp((Color.greenFromInt(color) * lightLevel + lightOffset), 0, 255);
+        final int b = (int) MathHelper.clamp((Color.blueFromInt(color) * lightLevel + lightOffset), 0, 255);
         color = Color.intToIntARGB(0, r, g, b);
 
         CharSequence line1 = tileEntity.signText[0];
@@ -165,11 +166,11 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
                 break;
         }
         final int _x = 0;
-        final int _y = - tileEntity.signText.length * 5;
+        final int _y = -tileEntity.signText.length * 5;
         if (tileEntity.isGlowing() && this.mc.gameSettings.fancyGraphics.value >= 1) {
             this.textMeshRenderer.render(sr, t, line1, line2, line3, line4, _x, _y, SF.setOutlined(SF.setColor(0, color)));
         } else {
-            this.textMeshRenderer.render(sr,t, line1, line2, line3, line4, _x, _y, SF.setColor(0, color));
+            this.textMeshRenderer.render(sr, t, line1, line2, line3, line4, _x, _y, SF.setColor(0, color));
         }
         GL11.glPopMatrix();
 
@@ -179,17 +180,15 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
         GL11.glDisable(GL12.GL_RESCALE_NORMAL);
     }
 
-    private static void drawTexturedModalRect(final double width, final double height, final int color, final @NotNull IconCoordinate coordinate)
-    {
-        if (coordinate == null) return;
+    private static void drawTexturedModalRect(final double width, final double height, final int color, final @NotNull IconCoordinate coordinate) {
         coordinate.parentAtlas.bind();
         final Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
         tessellator.setColorRGBA_I(color, 128);
-        tessellator.addVertexWithUV(-width/2,  height/2, 0, coordinate.getIconUMin(),coordinate.getIconVMin());
-        tessellator.addVertexWithUV(-width/2, -height/2, 0, coordinate.getIconUMin(),coordinate.getIconVMax());
-        tessellator.addVertexWithUV( width/2, -height/2, 0, coordinate.getIconUMax(),coordinate.getIconVMax());
-        tessellator.addVertexWithUV( width/2,  height/2, 0, coordinate.getIconUMax(),coordinate.getIconVMin());
+        tessellator.addVertexWithUV(-width / 2, height / 2, 0, coordinate.getIconUMin(), coordinate.getIconVMin());
+        tessellator.addVertexWithUV(-width / 2, -height / 2, 0, coordinate.getIconUMin(), coordinate.getIconVMax());
+        tessellator.addVertexWithUV(width / 2, -height / 2, 0, coordinate.getIconUMax(), coordinate.getIconVMax());
+        tessellator.addVertexWithUV(width / 2, height / 2, 0, coordinate.getIconUMax(), coordinate.getIconVMin());
         tessellator.draw();
     }
 
@@ -205,7 +204,7 @@ public class TileEntityRendererSign extends TileEntityRenderer<TileEntitySign>
 
     @Override
     public boolean isVisible(@NotNull final TileEntitySign tileEntity, final @NotNull ICamera camera, final float partialTick) {
-        return camera.getFrustum().isVisible(AABB.fromPool(tileEntity.x, tileEntity.y, tileEntity.z, tileEntity.x + 1, tileEntity.y + 1, tileEntity.z + 1), partialTick);
+        return camera.getFrustum().isVisible(new AABBd(tileEntity.x, tileEntity.y, tileEntity.z, tileEntity.x + 1, tileEntity.y + 1, tileEntity.z + 1), partialTick);
     }
 
     public static class BufferedTextMeshRenderer {
diff --git a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererStatue.java b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererStatue.java
index b95e9e87b..2c115e831 100644
--- a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererStatue.java
+++ b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererStatue.java
@@ -11,10 +11,10 @@ import net.minecraft.core.block.entity.TileEntityStatue;
 import net.minecraft.core.entity.IArmorWearing;
 import net.minecraft.core.enums.HumanArmorShape;
 import net.minecraft.core.item.*;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 import org.useless.dragonfly.DisplayPos;
@@ -27,6 +27,7 @@ import static net.minecraft.client.render.entity.MobRenderer.ENTITY_RENDER_SCALE
 
 public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatue> {
     public static final @NotNull Map<@NotNull Block<?>, @NotNull String> BLOCK_SKIN_MAP = new HashMap<>();
+
     static {
         final @NotNull String basePath = "/assets/minecraft/textures/entity/statue/";
         BLOCK_SKIN_MAP.put(Blocks.STATUE_STONE_LOWER, basePath + "stone.png");
@@ -59,21 +60,21 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
         bindTexture(BLOCK_SKIN_MAP.getOrDefault(lowerBlock, BLOCK_SKIN_MAP.get(Blocks.STATUE_STONE_LOWER)));
         GL11.glPushMatrix();
         GL11.glTranslated(x + 0.5, y, z + 0.5);
-        final float rotation = (float)(meta * 360) / 16F;
+        final float rotation = (float) (meta * 360) / 16F;
         GL11.glRotatef(-rotation, 0.0F, 1.0F, 0.0F);
         GL11.glDisable(GL11.GL_CULL_FACE);
 
-            GL11.glPushMatrix();
-            GL11.glScalef(1 / ENTITY_RENDER_SCALE, 1 / ENTITY_RENDER_SCALE, -1 / ENTITY_RENDER_SCALE);
-            model.resetBones();
-            renderModel(tessellator, model, pose);
-            if (armorWearer != null) {
-                for (int i = 0; i < 4; i++) {
-                    renderArmor(tessellator, armorWearer, i, pose);
-                }
+        GL11.glPushMatrix();
+        GL11.glScalef(1 / ENTITY_RENDER_SCALE, 1 / ENTITY_RENDER_SCALE, -1 / ENTITY_RENDER_SCALE);
+        model.resetBones();
+        renderModel(tessellator, model, pose);
+        if (armorWearer != null) {
+            for (int i = 0; i < 4; i++) {
+                renderArmor(tessellator, armorWearer, i, pose);
             }
-            renderHeldItem(heldStack, isPigman);
-            GL11.glPopMatrix();
+        }
+        renderHeldItem(heldStack, isPigman);
+        GL11.glPopMatrix();
 
         GL11.glEnable(GL11.GL_CULL_FACE);
         GL11.glPopMatrix();
@@ -81,7 +82,7 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
     }
 
     private void renderHeldItem(final @Nullable ItemStack itemStack, final boolean isPigman) {
-        if(itemStack != null) {
+        if (itemStack != null) {
             GL12.glEnable(GL12.GL_RESCALE_NORMAL);
             GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
             model(isPigman).translateToBone("rightItem");
@@ -110,7 +111,7 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
         renderShadow(Minecraft.getMinecraft().currentWorld, tessellator, tileEntity.x, tileEntity.y, tileEntity.z, x, y, z, 2.0f, partialTick);
     }
 
-    private boolean renderArmor(final @NotNull Tessellator tessellator, final @NotNull IArmorWearing<? super HumanArmorShape> armorWearer, final int layer, final TileEntityStatue.Pose pose) {
+    private boolean renderArmor(final @NotNull Tessellator tessellator, final @NotNull IArmorWearing<? super HumanArmorShape> armorWearer, final int layer, final TileEntityStatue.@NotNull Pose pose) {
         final ItemStack itemstack = armorWearer.getItemInArmorSlot(HumanArmorShape.values()[(armorWearer.getNumArmorSlots() - 1) - layer]);
         if (itemstack != null) {
             final Item item = itemstack.getItem();
@@ -120,8 +121,7 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
                 bindTexture("/assets/minecraft/textures/armor/quiver_golden.png");
             } else if (item == Items.ARMOR_BOOTS_ICESKATES) {
                 bindTexture("/assets/minecraft/textures/armor/skates.png");
-            } else if (item instanceof IArmorItem) {
-                final IArmorItem armorItem = (IArmorItem) item;
+            } else if (item instanceof IArmorItem<?> armorItem) {
                 if (armorItem.getArmorMaterial() == null) return false;
                 bindTexture(String.format("/assets/%s/textures/armor/%s_%d.png", armorItem.getArmorMaterial().identifier.namespace(), armorItem.getArmorMaterial().identifier.value(), (layer != 2 ? 1 : 2)));
             } else {
@@ -170,8 +170,7 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
         return false;
     }
 
-    private void renderShadow(final @NotNull World world, final @NotNull Tessellator tessellator, final int bx, final int by, final int bz, final double rx, final double ry, final double rz, final float opacity, final float partialTick)
-    {
+    private void renderShadow(final @NotNull World world, final @NotNull Tessellator tessellator, final int bx, final int by, final int bz, final double rx, final double ry, final double rz, final float opacity, final float partialTick) {
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
         final TextureManager textureManager = this.renderDispatcher.textureManager;
@@ -182,9 +181,8 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
         tessellator.startDrawingQuads();
 
         final int blockId = world.getBlockId(bx, by - 1, bz);
-        if(blockId > 0 && world.getBlockLightValue(bx, by, bz) > 3)
-        {
-            renderShadowOnBlock(world, tessellator, Blocks.blocksList[blockId], bx, by, bz, rx, ry + (double)shadowOffs, rz, opacity, shadowSize);
+        if (blockId > 0 && world.getBlockLightValue(bx, by, bz) > 3) {
+            renderShadowOnBlock(world, tessellator, Blocks.blocksList[blockId], bx, by, bz, rx, ry + (double) shadowOffs, rz, opacity, shadowSize);
         }
 
         tessellator.draw();
@@ -193,38 +191,34 @@ public class TileEntityRendererStatue extends TileEntityRenderer<TileEntityStatu
         GL11.glDepthMask(true);
     }
 
-    private void renderShadowOnBlock(final @NotNull World world, final @NotNull Tessellator tessellator, final Block<?> block, final int bx, final int by, final int bz, final double rx, final double ry, final double rz,
-                                     final float opacity, final float size)
-    {
-        if(!block.isCubeShaped())
-        {
+    private void renderShadowOnBlock(final @NotNull World world, final @NotNull Tessellator tessellator, final @NotNull Block<?> block, final int bx, final int by, final int bz, final double rx, final double ry, final double rz,
+                                     final float opacity, final float size) {
+        if (!block.isCubeShaped()) {
             return;
         }
         double brightness = world.getLightBrightness(bx, by, bz);
         if (Global.accessor.isFullbrightEnabled()) brightness = 1.0f;
-        double alpha = ((double)opacity / 2D) * 0.5D * brightness;
-        if(alpha < 0.0D)
-        {
+        double alpha = ((double) opacity / 2D) * 0.5D * brightness;
+        if (alpha < 0.0D) {
             return;
         }
-        if(alpha > 1.0D)
-        {
+        if (alpha > 1.0D) {
             alpha = 1.0D;
         }
-        tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, (float)alpha);
-        final AABB aabb = block.getCollisionBoundingBoxFromPool(world, bx, by - 1, bz);
-        if(aabb == null) {
+        tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, (float) alpha);
+        final AABBdc aabb = block.getCollisionBoundingBoxFromPool(world, bx, by - 1, bz);
+        if (aabb == null) {
             return;
         }
         final double xMin = rx - 0.5f;
-        final double xMax = rx + (aabb.maxX - aabb.minX) - 0.5f;
-        final double yMin = (ry + (aabb.maxY - aabb.minY)) - 1.39;
+        final double xMax = rx + (aabb.maxX() - aabb.minX()) - 0.5f;
+        final double yMin = (ry + (aabb.maxY() - aabb.minY())) - 1.39;
         final double zMin = rz - 0.5f;
-        final double zMax = rz + (aabb.maxZ - aabb.minZ) - 0.5f;
-        final float f2 = (float)((rx - xMin) / 2D / (double)size + 0.5D);
-        final float f3 = (float)((rx - xMax) / 2D / (double)size + 0.5D);
-        final float f4 = (float)((rz - zMin) / 2D / (double)size + 0.5D);
-        final float f5 = (float)((rz - zMax) / 2D / (double)size + 0.5D);
+        final double zMax = rz + (aabb.maxZ() - aabb.minZ()) - 0.5f;
+        final float f2 = (float) ((rx - xMin) / 2D / (double) size + 0.5D);
+        final float f3 = (float) ((rx - xMax) / 2D / (double) size + 0.5D);
+        final float f4 = (float) ((rz - zMin) / 2D / (double) size + 0.5D);
+        final float f5 = (float) ((rz - zMax) / 2D / (double) size + 0.5D);
         tessellator.addVertexWithUV(xMin + 0.5f, yMin, zMin + 0.5f, f2, f4);
         tessellator.addVertexWithUV(xMin + 0.5f, yMin, zMax + 0.5f, f2, f5);
         tessellator.addVertexWithUV(xMax + 0.5f, yMin, zMax + 0.5f, f3, f5);
diff --git a/game/client/src/main/java/net/minecraft/client/render/window/GameWindowGLFW.java b/game/client/src/main/java/net/minecraft/client/render/window/GameWindowGLFW.java
index f1d29d593..9b7cac3e1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/window/GameWindowGLFW.java
+++ b/game/client/src/main/java/net/minecraft/client/render/window/GameWindowGLFW.java
@@ -87,13 +87,13 @@ public class GameWindowGLFW implements GameWindow {
 
     @Override
     public void init(Minecraft minecraft, int width, int height) {
-        mc = minecraft;
+        this.mc = minecraft;
 
-        boolean debug = (mc.gameSettings.developerMode.value || Version.BUILD_CHANNEL == BuildChannel.DEVELOPMENT || Global.DEBUG_MODE);
+        boolean debug = (this.mc.gameSettings.developerMode.value || Version.BUILD_CHANNEL == BuildChannel.DEVELOPMENT || Global.DEBUG_MODE);
 
         LOGGER.info("Initializing GLFW...");
         if (debug) {
-            glfwErrorCallback = GLFWErrorCallback.create(new GLFWLoggerCallback()).set();
+            this.glfwErrorCallback = GLFWErrorCallback.create(new GLFWLoggerCallback()).set();
         }
         if (!glfwInit()) {
             throw new RuntimeException("GLFW initialization failed!");
@@ -106,8 +106,8 @@ public class GameWindowGLFW implements GameWindow {
         glfwWindowHint(GLFW_DECORATED, 1);
 
         // Create window
-        window = glfwCreateWindow(width, height, "Better than Adventure! " + Global.VERSION, 0, 0);
-        if (window == NULL) {
+        this.window = glfwCreateWindow(width, height, "Better than Adventure! " + Global.VERSION, 0, 0);
+        if (this.window == NULL) {
             try (MemoryStack stack = MemoryStack.stackPush()) {
                 PointerBuffer b = stack.callocPointer(1);
                 glfwGetError(b);
@@ -120,33 +120,33 @@ public class GameWindowGLFW implements GameWindow {
             var w = stack.callocInt(1);
             var h = stack.callocInt(1);
 
-            glfwGetWindowSize(window, w, h);
+            glfwGetWindowSize(this.window, w, h);
             this.widthScreenCoords = w.get(0);
             this.heightScreenCoords = h.get(0);
 
-            glfwGetFramebufferSize(window, w, h);
+            glfwGetFramebufferSize(this.window, w, h);
             this.widthPixels = w.get(0);
             this.heightPixels = h.get(0);
         }
 
         // Center window
         MonitorInfo monitor = new MonitorInfo(glfwGetPrimaryMonitor());
-        glfwSetWindowPos(window, (monitor.widthScreenCoords - widthScreenCoords) / 2, (monitor.heightScreenCoords - heightScreenCoords) / 2);
+        glfwSetWindowPos(this.window, (monitor.widthScreenCoords - this.widthScreenCoords) / 2, (monitor.heightScreenCoords - this.heightScreenCoords) / 2);
 
         // Setup callbacks
-        glfwSetWindowSizeCallback(window, (window, ww, hh) -> {
+        glfwSetWindowSizeCallback(this.window, (window, ww, hh) -> {
             this.widthScreenCoords = Math.max(1, ww);
             this.heightScreenCoords = Math.max(1, hh);
-            wasResized = true;
+            this.wasResized = true;
         });
 
-        glfwSetFramebufferSizeCallback(window, (window, ww, hh) -> {
+        glfwSetFramebufferSizeCallback(this.window, (window, ww, hh) -> {
             this.widthPixels = Math.max(1, ww);
             this.heightPixels = Math.max(1, hh);
-            wasResized = true;
+            this.wasResized = true;
         });
 
-        glfwSetWindowFocusCallback(window, (window, focused) -> {
+        glfwSetWindowFocusCallback(this.window, (window, focused) -> {
             this.hasFocus = focused;
             if (Mouse.isGrabbed() && !focused) {
                 Mouse.setGrabbed(false);
@@ -167,21 +167,21 @@ public class GameWindowGLFW implements GameWindow {
                 }
                 GLFWImage iconGI = GLFWImage.create().set(res, res, icon);
                 gb.put(iconGI);
-                stbiIconImages.add(icon);
+                this.stbiIconImages.add(icon);
             }
-            glfwSetWindowIcon(window, gb.flip());
+            glfwSetWindowIcon(this.window, gb.flip());
         }
 
         // Show window
-        glfwShowWindow(window);
+        glfwShowWindow(this.window);
 
         // OpenGL setup
-        glfwMakeContextCurrent(window);
+        glfwMakeContextCurrent(this.window);
         GLCapabilities capabilities = GL.createCapabilities();
         if (capabilities.OpenGL43 && debug) {
             GL11.glEnable(GL43.GL_DEBUG_OUTPUT);
-            glDebugMessageCallback = new OpenGLLoggerCallback();
-            GL43.glDebugMessageCallback(glDebugMessageCallback, NULL);
+            this.glDebugMessageCallback = new OpenGLLoggerCallback();
+            GL43.glDebugMessageCallback(this.glDebugMessageCallback, NULL);
             LOGGER.info("GL4.3 supported, enabling GL Error logging");
         } else {
             LOGGER.info("GL4.3 not supported, cannot enable GL Error logging");
@@ -215,7 +215,7 @@ public class GameWindowGLFW implements GameWindow {
         }
 
         // Set Vsync
-        setVsync(mc.gameSettings.enableVsync.value);
+        setVsync(this.mc.gameSettings.enableVsync.value);
     }
 
     @Override
@@ -255,7 +255,7 @@ public class GameWindowGLFW implements GameWindow {
 
     @Override
     public void setWindowSize(int width, int height) {
-        glfwSetWindowSize(window, width, height);
+        glfwSetWindowSize(this.window, width, height);
     }
 
     @Override
@@ -265,22 +265,22 @@ public class GameWindowGLFW implements GameWindow {
 
     @Override
     public void toggleFullscreen() {
-        mc.gameSettings.fullscreen.value = !mc.gameSettings.fullscreen.value;
+        this.mc.gameSettings.fullscreen.value = !this.mc.gameSettings.fullscreen.value;
 
         updateWindowState();
     }
 
     @Override
     public void updateWindowState() {
-        if (!isFullscreen) {
+        if (!this.isFullscreen) {
             try (var stack = MemoryStack.stackPush()) {
                 var x = stack.callocInt(1);
                 var y = stack.callocInt(1);
-                glfwGetWindowPos(window, x, y);
+                glfwGetWindowPos(this.window, x, y);
 
                 var w = stack.callocInt(1);
                 var h = stack.callocInt(1);
-                glfwGetWindowSize(window, w, h);
+                glfwGetWindowSize(this.window, w, h);
 
                 this.windowPosX = x.get(0);
                 this.windowPosY = y.get(0);
@@ -289,42 +289,42 @@ public class GameWindowGLFW implements GameWindow {
             }
         }
 
-        boolean fullscreen = mc.gameSettings.fullscreen.value;
-        boolean borderless = mc.gameSettings.borderlessFullscreen.value;
+        boolean fullscreen = this.mc.gameSettings.fullscreen.value;
+        boolean borderless = this.mc.gameSettings.borderlessFullscreen.value;
 
-        glfwHideWindow(window);
+        glfwHideWindow(this.window);
 
         if (fullscreen && !borderless) {
             LOGGER.info("Setting window to FULLSCREEN...");
-            int x = windowPosX + windowWidth / 2;
-            int y = windowPosY + windowHeight / 2;
+            int x = this.windowPosX + this.windowWidth / 2;
+            int y = this.windowPosY + this.windowHeight / 2;
             MonitorInfo monitor = getMonitorAt(x, y);
 
             // Enable GLFW Fullscreen
-            glfwSetWindowMonitor(window, monitor.handle, monitor.posX, monitor.posY, monitor.widthScreenCoords, monitor.heightScreenCoords, monitor.refreshRate);
-            isFullscreen = true;
+            glfwSetWindowMonitor(this.window, monitor.handle, monitor.posX, monitor.posY, monitor.widthScreenCoords, monitor.heightScreenCoords, monitor.refreshRate);
+            this.isFullscreen = true;
         } else {
             // Disable GLFW Fullscreen
-            glfwSetWindowMonitor(window, 0, windowPosX, windowPosY, windowWidth, windowHeight, 0);
+            glfwSetWindowMonitor(this.window, 0, this.windowPosX, this.windowPosY, this.windowWidth, this.windowHeight, 0);
 
             if (fullscreen && borderless) {
                 LOGGER.info("Setting window to BORDERLESS FULLSCREEN...");
-                int x = windowPosX + windowWidth / 2;
-                int y = windowPosY + windowHeight / 2;
+                int x = this.windowPosX + this.windowWidth / 2;
+                int y = this.windowPosY + this.windowHeight / 2;
                 MonitorInfo monitor = getMonitorAt(x, y);
 
-                glfwSetWindowAttrib(window, GLFW_DECORATED, 0);
-                glfwSetWindowPos(window, monitor.posX, monitor.posY);
-                glfwSetWindowSize(window, monitor.widthScreenCoords, monitor.heightScreenCoords);
-                isFullscreen = true;
+                glfwSetWindowAttrib(this.window, GLFW_DECORATED, 0);
+                glfwSetWindowPos(this.window, monitor.posX, monitor.posY);
+                glfwSetWindowSize(this.window, monitor.widthScreenCoords, monitor.heightScreenCoords);
+                this.isFullscreen = true;
             } else {
                 LOGGER.info("Setting window to WINDOWED...");
-                glfwSetWindowAttrib(window, GLFW_DECORATED, 1);
-                isFullscreen = false;
+                glfwSetWindowAttrib(this.window, GLFW_DECORATED, 1);
+                this.isFullscreen = false;
             }
         }
 
-        glfwShowWindow(window);
+        glfwShowWindow(this.window);
     }
 
     public MonitorInfo getMonitorAt(int x, int y) {
@@ -347,7 +347,7 @@ public class GameWindowGLFW implements GameWindow {
     @Override
     public void displayCrashReport(UnexpectedThrowable unexpectedThrowable, int cause) {
         JFrame frame = new JFrame();
-        Panel panel = new PanelCrashReport(mc, unexpectedThrowable, cause);
+        Panel panel = new PanelCrashReport(this.mc, unexpectedThrowable, cause);
 
         panel.setPreferredSize(new java.awt.Dimension(1280, 720));
 
@@ -360,15 +360,15 @@ public class GameWindowGLFW implements GameWindow {
 
     @Override
     public int getFrequency() {
-        final long monitor = glfwGetWindowMonitor(window);
+        final long monitor = glfwGetWindowMonitor(this.window);
         if (monitor != NULL) {
             final GLFWVidMode vidMode = glfwGetVideoMode(monitor);
             if (vidMode != null) {
                 return vidMode.refreshRate();
             }
         }
-        int x = windowPosX + windowWidth / 2;
-        int y = windowPosY + windowHeight / 2;
+        int x = this.windowPosX + this.windowWidth / 2;
+        int y = this.windowPosY + this.windowHeight / 2;
         final MonitorInfo info = getMonitorAt(x, y);
         return info.refreshRate;
     }
@@ -382,43 +382,43 @@ public class GameWindowGLFW implements GameWindow {
         }
         Mouse.poll();
 
-        glfwSwapBuffers(window);
+        glfwSwapBuffers(this.window);
     }
 
     @Override
     public boolean shouldClose() {
-        return glfwWindowShouldClose(window);
+        return glfwWindowShouldClose(this.window);
     }
 
     @Override
     public int getWidthScreenCoords() {
-        return widthScreenCoords;
+        return this.widthScreenCoords;
     }
 
     @Override
     public int getHeightScreenCoords() {
-        return heightScreenCoords;
+        return this.heightScreenCoords;
     }
 
     @Override
     public int getWidthPixels() {
-        return widthPixels;
+        return this.widthPixels;
     }
 
     @Override
     public int getHeightPixels() {
-        return heightPixels;
+        return this.heightPixels;
     }
 
     @Override
     public boolean isFocused() {
-        return hasFocus;
+        return this.hasFocus;
     }
 
     @Override
     public boolean wasResized() {
-        if (wasResized) {
-            wasResized = false;
+        if (this.wasResized) {
+            this.wasResized = false;
             return true;
         }
         return false;
@@ -441,9 +441,9 @@ public class GameWindowGLFW implements GameWindow {
     @Override
     public void free() {
         Callbacks.glfwFreeCallbacks(this.window);
-        if (glfwErrorCallback != null) glfwErrorCallback.free();
-        if (glDebugMessageCallback != null) glDebugMessageCallback.free();
-        stbiIconImages.forEach(STBImage::stbi_image_free);
+        if (this.glfwErrorCallback != null) this.glfwErrorCallback.free();
+        if (this.glDebugMessageCallback != null) this.glDebugMessageCallback.free();
+        this.stbiIconImages.forEach(STBImage::stbi_image_free);
     }
 
     public static class MonitorInfo {
@@ -464,13 +464,13 @@ public class GameWindowGLFW implements GameWindow {
                 var x = stack.callocInt(1);
                 var y = stack.callocInt(1);
                 glfwGetMonitorPos(monitor, x, y);
-                posX = x.get(0);
-                posY = y.get(0);
+                this.posX = x.get(0);
+                this.posY = y.get(0);
             }
 
-            widthScreenCoords = vidmode.width();
-            heightScreenCoords = vidmode.height();
-            refreshRate = vidmode.refreshRate();
+            this.widthScreenCoords = vidmode.width();
+            this.heightScreenCoords = vidmode.height();
+            this.refreshRate = vidmode.refreshRate();
         }
     }
 
diff --git a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFX.java b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFX.java
index be3214445..29df947b4 100644
--- a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFX.java
+++ b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFX.java
@@ -1,78 +1,82 @@
 package net.minecraft.client.render.worldtype;
 
 import net.minecraft.core.entity.player.Player;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.type.WorldType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
 public class WorldTypeFX {
-    public final WorldType worldType;
+    public final @NotNull WorldType worldType;
 
     private boolean hasClouds = true;
     private boolean hasSky = true;
     private boolean hasGround = true;
     private boolean hasAurora = false;
-    private Float cloudHeight = null;
+    private @Nullable Float cloudHeight = null;
 
-    public WorldTypeFX(WorldType worldType) {
+    public WorldTypeFX(@NotNull WorldType worldType) {
         this.worldType = worldType;
     }
 
-    public WorldTypeFX setHasClouds(boolean flag) {
+    public @NotNull WorldTypeFX setHasClouds(boolean flag) {
         this.hasClouds = flag;
         return this;
     }
 
-    public WorldTypeFX setHasSky(boolean flag) {
+    public @NotNull WorldTypeFX setHasSky(boolean flag) {
         this.hasSky = flag;
         return this;
     }
 
-    public WorldTypeFX setHasGround(boolean flag) {
+    public @NotNull WorldTypeFX setHasGround(boolean flag) {
         this.hasGround = flag;
         return this;
     }
 
-    public WorldTypeFX setHasAurora(boolean flag) {
+    public @NotNull WorldTypeFX setHasAurora(boolean flag) {
         this.hasAurora = flag;
         return this;
     }
 
-    public WorldTypeFX setCloudHeight(float cloudHeight) {
+    public @NotNull WorldTypeFX setCloudHeight(float cloudHeight) {
         this.cloudHeight = cloudHeight;
         return this;
     }
 
     public boolean hasClouds() {
-        return hasClouds;
+        return this.hasClouds;
     }
 
     public boolean hasSky() {
-        return hasSky;
+        return this.hasSky;
     }
 
     public float getCloudHeight() {
-        if (cloudHeight == null) {
-            return (worldType.getMaxY() + 1) - 20;
+        if (this.cloudHeight == null) {
+            return (this.worldType.getMaxY() + 1) - 20;
         }
-        return cloudHeight;
+        return this.cloudHeight;
     }
 
     public boolean hasGround() {
-        return hasGround;
+        return this.hasGround;
     }
 
     public boolean hasAurora() {
-        return hasAurora;
+        return this.hasAurora;
     }
 
-    public Vec3 getFogColor(World world, double x, double y, double z, float celestialAngle, float partialTick) {
-        return Vec3.fromPool(1.0, 1.0, 1.0);
+    public @NotNull Vector3fc getFogColor(@NotNull World world, double x, double y, double z, float celestialAngle, float partialTick) {
+        return new Vector3f(1.0f, 1.0f, 1.0f);
     }
 
-    public float[] getSunriseColor(float timeOfDay, float partialTick) {
+    public float @Nullable [] getSunriseColor(float timeOfDay, float partialTick) {
         return new float[4];
     }
 
-    public void playerAnimationTick(World world, Player player) { }
+    public void playerAnimationTick(@NotNull World world, @NotNull Player player) {
+    }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXDrift.java b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXDrift.java
index cd90bba49..785fb2aa1 100644
--- a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXDrift.java
+++ b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXDrift.java
@@ -2,9 +2,13 @@ package net.minecraft.client.render.worldtype;
 
 import net.minecraft.client.render.colorizer.Colorizers;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.type.WorldType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
 public class WorldTypeFXDrift extends WorldTypeFX{
     public WorldTypeFXDrift(WorldType worldType) {
@@ -12,7 +16,7 @@ public class WorldTypeFXDrift extends WorldTypeFX{
     }
 
     @Override
-    public float[] getSunriseColor(float timeOfDay, float partialTick) {
+    public float @Nullable [] getSunriseColor(float timeOfDay, float partialTick) {
         float[] sunriseCol = new float[4];
         float f2 = 0.4F;
         float f3 = MathHelper.cos(timeOfDay * MathHelper.PI * 2.0F) - 0.0F;
@@ -32,17 +36,13 @@ public class WorldTypeFXDrift extends WorldTypeFX{
     }
 
     @Override
-    public Vec3 getFogColor(World world, double x, double y, double z, float celestialAngle, float partialTick) {
+    public @NotNull Vector3fc getFogColor(@NotNull World world, double x, double y, double z, float celestialAngle, float partialTick) {
         float f2 = MathHelper.cos(celestialAngle * MathHelper.PI * 2.0F) * 2.0F + 0.5F;
         f2 = MathHelper.clamp(f2, 0.0f, 1.0f);
         float r, g, b;
 
         if (Colorizers.fog.isEnabled()) {
-            int x1 = MathHelper.floor(x);
-            int y1 = MathHelper.floor(y);
-            int z1 = MathHelper.floor(z);
-
-            int color = Colorizers.fog.getColor(world, x1, y1, z1);
+            int color = Colorizers.fog.getColor(world, new TilePos(x, y, z));
 
             r = ((color >> 16) & 0xFF) / 255.0f;
             g = ((color >> 8) & 0xFF) / 255.0f;
@@ -56,6 +56,6 @@ public class WorldTypeFXDrift extends WorldTypeFX{
         r *= f2 * 0.94F + 0.06F;
         g *= f2 * 0.94F + 0.06F;
         b *= f2 * 0.91F + 0.09F;
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXEmpty.java b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXEmpty.java
index 5ecd801fd..3223ccb6c 100644
--- a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXEmpty.java
+++ b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXEmpty.java
@@ -1,9 +1,12 @@
 package net.minecraft.client.render.worldtype;
 
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.type.WorldType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
 public class WorldTypeFXEmpty extends WorldTypeFX{
     public WorldTypeFXEmpty(WorldType worldType) {
@@ -11,7 +14,7 @@ public class WorldTypeFXEmpty extends WorldTypeFX{
     }
 
     @Override
-    public Vec3 getFogColor(World world, double x, double y, double z, float celestialAngle, float partialTick) {
+    public @NotNull Vector3fc getFogColor(@NotNull World world, double x, double y, double z, float celestialAngle, float partialTick) {
         float f2 = MathHelper.cos(celestialAngle * MathHelper.PI * 2.0F) * 2.0F + 0.5F;
         if (f2 < 0.0F) {
             f2 = 0.0F;
@@ -25,12 +28,11 @@ public class WorldTypeFXEmpty extends WorldTypeFX{
         r *= f2 * 0.94F + 0.06F;
         g *= f2 * 0.94F + 0.06F;
         b *= f2 * 0.91F + 0.09F;
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 
     @Override
-    public float[] getSunriseColor(float timeOfDay, float partialTick) {
-        float[] sunriseCol = new float[4];
+    public float @Nullable [] getSunriseColor(float timeOfDay, float partialTick) {
         float f2 = 0.4F;
         float f3 = MathHelper.cos(timeOfDay * MathHelper.PI * 2.0F) - 0.0F;
         float f4 = -0F;
@@ -38,13 +40,13 @@ public class WorldTypeFXEmpty extends WorldTypeFX{
             float c = ((f3 - f4) / f2) * 0.5F + 0.5F;
             float a = 1.0F - (1.0F - MathHelper.sin(c * MathHelper.PI)) * 0.99F;
             a *= a;
+            float[] sunriseCol = new float[4];
             sunriseCol[0] = c * 0.3F + 0.7F;
             sunriseCol[1] = c * c * 0.7F + 0.2F;
             sunriseCol[2] = c * c * 0.0F + 0.2F;
             sunriseCol[3] = a;
             return sunriseCol;
-        } else {
-            return null;
         }
+        return null;
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXNether.java b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXNether.java
index daa9e0208..f96c1404e 100644
--- a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXNether.java
+++ b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXNether.java
@@ -3,36 +3,30 @@ package net.minecraft.client.render.worldtype;
 import net.minecraft.client.render.colorizer.Colorizers;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.biome.provider.BiomeProviderNether;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.type.WorldType;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
-public class WorldTypeFXNether extends WorldTypeFX{
+public class WorldTypeFXNether extends WorldTypeFX {
     public WorldTypeFXNether(WorldType worldType) {
         super(worldType);
     }
 
     @Override
-    public float[] getSunriseColor(float timeOfDay, float partialTick) {
-        return new float[4];
-    }
-
-    @Override
-    public Vec3 getFogColor(World world, double x, double y, double z, float celestialAngle, float partialTick) {
+    public @NotNull Vector3fc getFogColor(@NotNull World world, double x, double y, double z, float celestialAngle, float partialTick) {
         if (Colorizers.fog.isEnabled()) {
-            int x1 = MathHelper.floor(x);
-            int y1 = MathHelper.floor(y);
-            int z1 = MathHelper.floor(z);
-
-            int color = Colorizers.fog.getColor(world, x1, y1, z1);
+            int color = Colorizers.fog.getColor(world, new TilePos(x, y, z));
 
             float r = ((color >> 16) & 0xFF) / 255.0f;
             float g = ((color >> 8) & 0xFF) / 255.0f;
             float b = (color & 0xFF) / 255.0f;
-            return Vec3.fromPool(r, g, b);
+            return new Vector3f(r, g, b);
         }
 
         float r = 60 / 255.0f;
@@ -53,25 +47,22 @@ public class WorldTypeFXNether extends WorldTypeFX{
             b = MathHelper.lerp(0, b, (float) toLerp);
         }
 
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 
     @Override
-    public void playerAnimationTick(World world, Player player) {
+    public void playerAnimationTick(@NotNull World world, @NotNull Player player) {
         final int radius = 12;
 
-        double x = player.x;
-        double y = player.y;
-        double z = player.z;
-
-        Biome localBiome = world.getBlockBiome((int) x, (int) y, (int) z);
+        TilePos tilePos = new TilePos(player);
+        Biome localBiome = world.getBlockBiome(tilePos);
         if (localBiome == Biomes.NETHER_ASH_PLAINS || localBiome == Biomes.NETHER_BONEYARD) {
             for (int i = 0; i < 5; i++) {
-                double rx = (x - radius) + (world.rand.nextDouble() * radius * 2);
-                double ry = (y - radius) + (world.rand.nextDouble() * radius * 2);
-                double rz = (z - radius) + (world.rand.nextDouble() * radius * 2);
+                double rx = (player.x - radius) + (world.rand.nextDouble() * radius * 2);
+                double ry = (player.y - radius) + (world.rand.nextDouble() * radius * 2);
+                double rz = (player.z - radius) + (world.rand.nextDouble() * radius * 2);
 
-                if (world.getBlockId((int) rx, (int) ry, (int) rz) == 0) {
+                if (world.getBlockId(new TilePos(rx, ry, rz)) == 0) {
                     world.spawnParticle("ashmote", rx, ry, rz, 0, 0, 0, 0);
                 }
             }
diff --git a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXOverworld.java b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXOverworld.java
index b4e34c648..fff8f251a 100644
--- a/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXOverworld.java
+++ b/game/client/src/main/java/net/minecraft/client/render/worldtype/WorldTypeFXOverworld.java
@@ -2,17 +2,21 @@ package net.minecraft.client.render.worldtype;
 
 import net.minecraft.client.render.colorizer.Colorizers;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.type.WorldType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
-public class WorldTypeFXOverworld extends WorldTypeFX{
-    public WorldTypeFXOverworld(WorldType worldType) {
+public class WorldTypeFXOverworld extends WorldTypeFX {
+    public WorldTypeFXOverworld(@NotNull WorldType worldType) {
         super(worldType);
     }
 
     @Override
-    public float[] getSunriseColor(float timeOfDay, float partialTick) {
+    public float @Nullable [] getSunriseColor(float timeOfDay, float partialTick) {
         float[] sunriseCol = new float[4];
         float sunriseMinimum = 0.4F;
 
@@ -34,17 +38,13 @@ public class WorldTypeFXOverworld extends WorldTypeFX{
     }
 
     @Override
-    public Vec3 getFogColor(World world, double x, double y, double z, float celestialAngle, float partialTick) {
+    public @NotNull Vector3fc getFogColor(@NotNull World world, double x, double y, double z, float celestialAngle, float partialTick) {
         float dayProgress = MathHelper.cos(celestialAngle * MathHelper.PI * 2.0F) * 2.0F + 0.5F;
         dayProgress = MathHelper.clamp(dayProgress, 0.0f, 1.0f);
         float r, g, b;
 
         if (Colorizers.fog.isEnabled()) {
-            int x1 = MathHelper.floor(x);
-            int y1 = MathHelper.floor(y);
-            int z1 = MathHelper.floor(z);
-
-            int color = Colorizers.fog.getColor(world, x1, y1, z1);
+            int color = Colorizers.fog.getColor(world, new TilePos(x, y, z));
 
             r = ((color >> 16) & 0xFF) / 255.0f;
             g = ((color >> 8) & 0xFF) / 255.0f;
@@ -57,6 +57,6 @@ public class WorldTypeFXOverworld extends WorldTypeFX{
         r *= dayProgress * 0.94f + 0.06f;
         g *= dayProgress * 0.94f + 0.06f;
         b *= dayProgress * 0.91f + 0.09f;
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 }
diff --git a/game/client/src/main/java/net/minecraft/client/util/linalg/MatrixStack.java b/game/client/src/main/java/net/minecraft/client/util/linalg/MatrixStack.java
deleted file mode 100644
index 36af6cd3e..000000000
--- a/game/client/src/main/java/net/minecraft/client/util/linalg/MatrixStack.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package net.minecraft.client.util.linalg;
-
-import net.minecraft.core.util.linalg.Matrix4;
-import org.jetbrains.annotations.NotNull;
-import org.lwjgl.opengl.GL11;
-
-import java.util.Stack;
-
-/**
- * Provides an abstraction over OpenGL's matrix functions, to aid in porting to OpenGL 3 later on.
- */
-public class MatrixStack {
-    /**
-     * The model-view matrix stack, corresponding to GL_MODELVIEW.
-     */
-    public static final @NotNull MatrixStack MODEL_VIEW = new MatrixStack(GL11.GL_MODELVIEW);
-    /**
-     * The projection matrix stack, corresponding to GL_PROJECTION.
-     */
-    public static final @NotNull MatrixStack PROJECTION = new MatrixStack(GL11.GL_PROJECTION);
-    /**
-     * The texture matrix stack, corresponding to GL_TEXTURE.
-     */
-    public static final @NotNull MatrixStack TEXTURE = new MatrixStack(GL11.GL_TEXTURE);
-
-    private final int matrixMode;
-
-    private final @NotNull Stack<Matrix4> stack = new Stack<>();
-
-    private MatrixStack(final int matrixMode) {
-        this.matrixMode = matrixMode;
-
-        this.stack.push(Matrix4.identity());
-    }
-
-    /**
-     * Returns the top of the matrix stack.
-     */
-    public @NotNull Matrix4 peek() {
-        return this.stack.peek();
-    }
-
-    /**
-     * Pushes a duplicate of the current matrix onto the matrix stack.
-     */
-    public @NotNull MatrixStack push() {
-        this.stack.push(this.peek().copyUnpooled());
-
-        return this;
-    }
-
-    /**
-     * Pops the current matrix from the matrix stack. If the stack becomes empty, an identity matrix will be inserted.
-     */
-    public @NotNull MatrixStack pop() {
-        this.stack.pop();
-
-        if (this.stack.isEmpty()) {
-            this.stack.push(Matrix4.identity());
-        }
-
-        return this;
-    }
-
-    /**
-     * Replaces the current matrix with the identity matrix.
-     */
-    public @NotNull MatrixStack loadIdentity() {
-        this.pop();
-        this.stack.push(Matrix4.identity());
-
-        return this;
-    }
-
-    /**
-     * Replaces the current matrix with the given matrix.
-     */
-    public @NotNull MatrixStack load(final @NotNull Matrix4 matrix) {
-        this.pop();
-        this.stack.push(matrix.copyUnpooled());
-
-        return this;
-    }
-
-    /**
-     * Writes the active matrix to the GPU.
-     */
-    public @NotNull MatrixStack writeToGpu() {
-        GL11.glMatrixMode(this.matrixMode);
-        GL11.glLoadMatrixd(this.peek().asArray());
-
-        return this;
-    }
-}
diff --git a/game/client/src/main/java/net/minecraft/client/world/WorldClient.java b/game/client/src/main/java/net/minecraft/client/world/WorldClient.java
index 05b920551..d87ce142e 100644
--- a/game/client/src/main/java/net/minecraft/client/world/WorldClient.java
+++ b/game/client/src/main/java/net/minecraft/client/world/WorldClient.java
@@ -8,10 +8,10 @@ import net.minecraft.client.render.worldtype.WorldTypeFXDispatcher;
 import net.minecraft.client.world.chunk.provider.ChunkProviderViewer;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.AuroraProvider;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.save.LevelData;
 import net.minecraft.core.world.save.LevelStorage;
 import net.minecraft.core.world.season.SeasonManager;
@@ -21,6 +21,9 @@ import net.minecraft.core.world.type.WorldTypes;
 import net.minecraft.core.world.weather.IPrecipitation;
 import net.minecraft.core.world.weather.WeatherManager;
 import net.minecraft.core.world.weather.Weathers;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3f;
+import org.joml.Vector3fc;
 
 public class WorldClient extends World {
     public static final WorldClient EMPTY_WORLD = new WorldClient();
@@ -40,17 +43,17 @@ public class WorldClient extends World {
     public WorldClient() {
         this.dimension = Dimension.OVERWORLD;
         this.saveHandler = null;
-        levelData = new LevelData(0, "modelviewer");
+        this.levelData = new LevelData(0, "modelviewer");
         this.worldType = WorldTypes.DEBUG;
-        chunkProvider = new ChunkProviderViewer(this);
-        seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
+        this.chunkProvider = new ChunkProviderViewer(this);
+        this.seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
         updateSkyBrightness();
 
         this.weatherManager = new WeatherManager(this);
 
-        auroraProvider = new AuroraProvider(this, 0);
+        this.auroraProvider = new AuroraProvider(this, 0);
 
-        biomeProvider = this.worldType.createBiomeProvider(this);
+        this.biomeProvider = this.worldType.createBiomeProvider(this);
     }
 
     @Override
@@ -59,25 +62,21 @@ public class WorldClient extends World {
         getLevelData().setLastPlayerUUID(player.uuid);
     }
 
-    public Vec3 getDimensionColor(ICamera camera, float partialTick)
-    {
+    public @NotNull Vector3fc getDimensionColor(@NotNull ICamera camera, float partialTick) {
         float f1 = getCelestialAngle(partialTick);
         float f2 = MathHelper.cos(f1 * MathHelper.PI * 2.0F) * 2.0F + 0.5F;
-        if(f2 < 0.0F)
-        {
+        if (f2 < 0.0F) {
             f2 = 0.0F;
         }
-        if(f2 > 1.0F)
-        {
+        if (f2 > 1.0F) {
             f2 = 1.0F;
         }
         int color = 0xffffff;
-        float r = (float)(color >> 16 & 255) / 255F;
-        float g = (float)(color >> 8 & 255) / 255F;
-        float b = (float)(color & 255) / 255F;
-        float f6 = getCurrentWeather() != null && getCurrentWeather() instanceof IPrecipitation ? weatherManager.getWeatherIntensity() * weatherManager.getWeatherPower() : 0.0f;
-        if(f6 > 0.0F)
-        {
+        float r = (float) (color >> 16 & 255) / 255F;
+        float g = (float) (color >> 8 & 255) / 255F;
+        float b = (float) (color & 255) / 255F;
+        float f6 = getCurrentWeather() != null && getCurrentWeather() instanceof IPrecipitation ? this.weatherManager.getWeatherIntensity() * this.weatherManager.getWeatherPower() : 0.0f;
+        if (f6 > 0.0F) {
             float f7 = (r * 0.3F + g * 0.59F + b * 0.11F) * 0.6F;
             float f9 = 1.0F - f6 * 0.95F;
             r = r * f9 + f7 * (1.0F - f9);
@@ -87,54 +86,46 @@ public class WorldClient extends World {
         r *= f2 * 0.9F + 0.1F;
         g *= f2 * 0.9F + 0.1F;
         b *= f2 * 0.85F + 0.15F;
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 
-    public Vec3 getFogColor(ICamera camera, float partialTick)
-    {
+    public @NotNull Vector3fc getFogColor(@NotNull ICamera camera, float partialTick) {
         double x = camera.getX(partialTick);
         double y = camera.getY(partialTick);
         double z = camera.getZ(partialTick);
         float celestialAngle = getCelestialAngle(partialTick);
-        return WorldTypeFXDispatcher.getInstance().getDispatch(worldType).getFogColor(this, x, y, z, celestialAngle, partialTick);
+        return WorldTypeFXDispatcher.getInstance().getDispatch(this.worldType).getFogColor(this, x, y, z, celestialAngle, partialTick);
     }
 
-    public Vec3 getSkyColor(ICamera camera, float partialTick)
-    {
+    public @NotNull Vector3fc getSkyColor(@NotNull ICamera camera, float partialTick) {
         float f1 = getCelestialAngle(partialTick);
         float f2 = MathHelper.cos(f1 * MathHelper.PI * 2.0F) * 2.0F + 0.5F;
-        if(f2 < 0.0F)
-        {
+        if (f2 < 0.0F) {
             f2 = 0.0F;
         }
-        if(f2 > 1.0F)
-        {
+        if (f2 > 1.0F) {
             f2 = 1.0F;
         }
-        int x = MathHelper.floor(camera.getX(partialTick));
-        int y = MathHelper.floor(camera.getY(partialTick));
-        int z = MathHelper.floor(camera.getZ(partialTick));
-        float blockTemperature = (float) getBlockTemperature(x, z);
+        TilePos blockPos = camera.getTilePos(partialTick);
+        float blockTemperature = (float) getBlockTemperature(blockPos);
 
-        if (seasonManager.getCurrentSeason() != null && (seasonManager.getCurrentSeason() == Seasons.OVERWORLD_WINTER || seasonManager.getCurrentSeason() == Seasons.OVERWORLD_FALL))
-        {
+        if (this.seasonManager.getCurrentSeason() != null && (this.seasonManager.getCurrentSeason() == Seasons.OVERWORLD_WINTER || this.seasonManager.getCurrentSeason() == Seasons.OVERWORLD_FALL)) {
             blockTemperature = blockTemperature - (1.25f);
         }
         int skyColor;
-        if(Colorizers.sky.isEnabled()) {
-            skyColor = Colorizers.sky.getColor(this, x, y, z);
-        }else {
-            skyColor = getBiomeProvider().getBiome(x, y, z).getSkyColor(blockTemperature);
+        if (Colorizers.sky.isEnabled()) {
+            skyColor = Colorizers.sky.getColor(this, blockPos);
+        } else {
+            skyColor = getBiomeProvider().getBiome(blockPos.x, blockPos.y, blockPos.z).getSkyColor(blockTemperature);
         }
-        float r = (float)(skyColor >> 16 & 0xff) / 255F;
-        float g = (float)(skyColor >> 8 & 0xff) / 255F;
-        float b = (float)(skyColor & 0xff) / 255F;
+        float r = (float) (skyColor >> 16 & 0xff) / 255F;
+        float g = (float) (skyColor >> 8 & 0xff) / 255F;
+        float b = (float) (skyColor & 0xff) / 255F;
         r *= f2;
         g *= f2;
         b *= f2;
-        float f7 = getCurrentWeather() != null && getCurrentWeather() instanceof IPrecipitation ? weatherManager.getWeatherIntensity() * weatherManager.getWeatherPower() : 0.0f;
-        if(f7 > 0.0F)
-        {
+        float f7 = getCurrentWeather() != null && getCurrentWeather() instanceof IPrecipitation ? this.weatherManager.getWeatherIntensity() * this.weatherManager.getWeatherPower() : 0.0f;
+        if (f7 > 0.0F) {
             float f8 = (r * 0.3F + g * 0.59F + b * 0.11F) * 0.6F;
             float f10 = 1.0F - f7 * 0.75F;
             r = r * f10 + f8 * (1.0F - f10);
@@ -142,20 +133,17 @@ public class WorldClient extends World {
             b = b * f10 + f8 * (1.0F - f10);
         }
 
-        float fogIntensity = getCurrentWeather() != null && getCurrentWeather() == Weathers.OVERWORLD_FOG ? weatherManager.getWeatherIntensity() * weatherManager.getWeatherPower() : 0.0f;
-        if(fogIntensity > 0.0F)
-        {
+        float fogIntensity = getCurrentWeather() != null && getCurrentWeather() == Weathers.OVERWORLD_FOG ? this.weatherManager.getWeatherIntensity() * this.weatherManager.getWeatherPower() : 0.0f;
+        if (fogIntensity > 0.0F) {
             float f8 = (r * 0.5F + g * 0.5F + b * 0.5F) * 0.6F;
             float f10 = 1.0F - fogIntensity * 0.75F;
             r = r * f10 + f8 * (1.0F - f10);
             g = g * f10 + f8 * (1.0F - f10);
             b = b * f10 + f8 * (1.0F - f10);
         }
-        if(lightningFlicker > 0)
-        {
-            float f12 = (float)lightningFlicker - partialTick;
-            if(f12 > 1.0F)
-            {
+        if (this.lightningFlicker > 0) {
+            float f12 = (float) this.lightningFlicker - partialTick;
+            if (f12 > 1.0F) {
                 f12 = 1.0F;
             }
             f12 *= 0.45F;
@@ -163,7 +151,7 @@ public class WorldClient extends World {
             g = g * (1.0F - f12) + 0.8F * f12;
             b = b * (1.0F - f12) + f12;
         }
-        return Vec3.fromPool(r, g, b);
+        return new Vector3f(r, g, b);
     }
 
     @Override
diff --git a/game/client/src/main/java/net/minecraft/client/world/WorldClientMP.java b/game/client/src/main/java/net/minecraft/client/world/WorldClientMP.java
index 275f284d6..357f31b68 100644
--- a/game/client/src/main/java/net/minecraft/client/world/WorldClientMP.java
+++ b/game/client/src/main/java/net/minecraft/client/world/WorldClientMP.java
@@ -13,7 +13,7 @@ import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.core.world.chunk.provider.IChunkProvider;
 import net.minecraft.client.world.save.SaveHandlerClientMP;
 import net.minecraft.core.world.pos.ChunkPos;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.HashSet;
@@ -28,187 +28,157 @@ public class WorldClientMP extends WorldClient {
     private final Set<Entity> forced;
     private final Set<Entity> reEntries;
 
-    public WorldClientMP(PacketHandlerClient packetHandlerClient, long seed, int dimensionId, int worldTypeId)
-    {
+    public WorldClientMP(PacketHandlerClient packetHandlerClient, long seed, int dimensionId, int worldTypeId) {
         super(new SaveHandlerClientMP(), "MpServer", Dimension.getDimensionList().get(dimensionId), Registries.WORLD_TYPES.getItemByNumericId(worldTypeId), seed);
-        positionTypesList = new LinkedList<>();
-        entitiesById = new Int2ObjectOpenHashMap<>();
-        forced = new HashSet<>();
-        reEntries = new HashSet<>();
-        sendQueue = packetHandlerClient;
+        this.positionTypesList = new LinkedList<>();
+        this.entitiesById = new Int2ObjectOpenHashMap<>();
+        this.forced = new HashSet<>();
+        this.reEntries = new HashSet<>();
+        this.sendQueue = packetHandlerClient;
         setSpawnPoint(new ChunkCoordinates(8, 64, 8));
-        savedDataStorage = packetHandlerClient.savedDataStorage;
+        this.savedDataStorage = packetHandlerClient.savedDataStorage;
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         if (getGameRuleValue(GameRules.DO_DAY_CYCLE)) {
-            levelData.setWorldTime(levelData.getWorldTime() + 1L);
+            this.levelData.setWorldTime(this.levelData.getWorldTime() + 1L);
         }
-        for(int k = 0; k < 10 && !reEntries.isEmpty(); k++)
-        {
-            Entity entity = reEntries.iterator().next();
-            if(!entities.contains(entity))
-            {
+        for (int k = 0; k < 10 && !this.reEntries.isEmpty(); k++) {
+            Entity entity = this.reEntries.iterator().next();
+            if (!this.entities.contains(entity)) {
                 entityJoinedWorld(entity);
             }
         }
 
         processPackets();
-        for(int l = 0; l < positionTypesList.size(); l++)
-        {
-            WorldBlockPositionType worldblockpositiontype = positionTypesList.get(l);
-            if(--worldblockpositiontype.delayTicks == 0)
-            {
+        for (int l = 0; l < this.positionTypesList.size(); l++) {
+            WorldBlockPositionType worldblockpositiontype = this.positionTypesList.get(l);
+            if (--worldblockpositiontype.delayTicks == 0) {
                 super.setBlockAndMetadata(worldblockpositiontype.x, worldblockpositiontype.y, worldblockpositiontype.z, worldblockpositiontype.blockId, worldblockpositiontype.metadata);
                 super.markBlockNeedsUpdate(worldblockpositiontype.x, worldblockpositiontype.y, worldblockpositiontype.z);
-                positionTypesList.remove(l--);
+                this.positionTypesList.remove(l--);
             }
         }
-		updateSeasonAndLight();
-        if(rainbowTicks > 0)
-        {
-            rainbowTicks--;
+        updateSeasonAndLight();
+        if (this.rainbowTicks > 0) {
+            this.rainbowTicks--;
         }
     }
 
     public void processPackets() {
-        sendQueue.tick();
+        this.sendQueue.tick();
     }
 
-    public void removePositionTypesInBounds(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
-    {
-        for(int i = 0; i < positionTypesList.size(); i++)
-        {
-            WorldBlockPositionType worldblockpositiontype = positionTypesList.get(i);
-            if(worldblockpositiontype.x >= minX && worldblockpositiontype.y >= minY && worldblockpositiontype.z >= minZ && worldblockpositiontype.x <= maxX && worldblockpositiontype.y <= maxY && worldblockpositiontype.z <= maxZ)
-            {
-                positionTypesList.remove(i--);
+    public void removePositionTypesInBounds(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
+        for (int i = 0; i < this.positionTypesList.size(); i++) {
+            WorldBlockPositionType worldblockpositiontype = this.positionTypesList.get(i);
+            if (worldblockpositiontype.x >= minX && worldblockpositiontype.y >= minY && worldblockpositiontype.z >= minZ && worldblockpositiontype.x <= maxX && worldblockpositiontype.y <= maxY && worldblockpositiontype.z <= maxZ) {
+                this.positionTypesList.remove(i--);
             }
         }
 
     }
 
     @Override
-	protected IChunkProvider createChunkProvider()
-    {
-        chunkCache = new ChunkProviderClient(this);
-        return chunkCache;
+    protected IChunkProvider createChunkProvider() {
+        this.chunkCache = new ChunkProviderClient(this);
+        return this.chunkCache;
     }
 
     @Override
-	public void getRespawnLocation()
-    {
+    public void getRespawnLocation() {
         setSpawnPoint(new ChunkCoordinates(8, 64, 8));
     }
 
     @Override
-	protected void updateBlocksAndPlayCaveSounds()
-    {
+    protected void updateBlocksAndPlayCaveSounds() {
     }
 
     @Override
-    public void scheduleBlockUpdate(final @NotNull TilePos tilePos, final int id, final long delay, final boolean loaded) {
+    public void scheduleBlockUpdate(final @NotNull TilePosc tilePos, final int id, final long delay) {
         // Do nothing
     }
 
     @Override
-	public boolean tickPendingTicks(boolean all)
-    {
+    public boolean tickPendingTicks(boolean all) {
         return false;
     }
 
-    public void doPreChunk(int chunkX, int chunkZ, boolean playerAdded)
-    {
-        if(playerAdded)
-        {
-            chunkCache.prepareChunk(chunkX, chunkZ);
-        } else
-        {
-            chunkCache.dropChunk(new ChunkPos(chunkX, chunkZ));
+    public void doPreChunk(int chunkX, int chunkZ, boolean playerAdded) {
+        if (playerAdded) {
+            this.chunkCache.prepareChunk(chunkX, chunkZ);
+        } else {
+            this.chunkCache.dropChunk(new ChunkPos(chunkX, chunkZ));
         }
-        if(!playerAdded)
-        {
+        if (!playerAdded) {
             markBlocksDirty(chunkX * 16, 0, chunkZ * 16, chunkX * 16 + 15, getHeightBlocks(), chunkZ * 16 + 15);
         }
     }
 
     @Override
-	public boolean entityJoinedWorld(Entity entity)
-    {
+    public boolean entityJoinedWorld(Entity entity) {
         boolean flag = super.entityJoinedWorld(entity);
-        forced.add(entity);
-        if(!flag)
-        {
-            reEntries.add(entity);
+        this.forced.add(entity);
+        if (!flag) {
+            this.reEntries.add(entity);
         }
         return flag;
     }
 
     @Override
-	public void setEntityDead(Entity entity)
-    {
+    public void setEntityDead(Entity entity) {
         super.setEntityDead(entity);
-        forced.remove(entity);
-        reEntries.remove(entity);
+        this.forced.remove(entity);
+        this.reEntries.remove(entity);
     }
 
     @Override
-	protected void obtainEntitySkin(Entity entity)
-    {
+    protected void obtainEntitySkin(Entity entity) {
         super.obtainEntitySkin(entity);
-        reEntries.remove(entity);
+        this.reEntries.remove(entity);
     }
 
     @Override
-	protected void releaseEntitySkin(Entity entity)
-    {
+    protected void releaseEntitySkin(Entity entity) {
         super.releaseEntitySkin(entity);
-        if(forced.contains(entity))
-        {
-            reEntries.add(entity);
+        if (this.forced.contains(entity)) {
+            this.reEntries.add(entity);
         }
     }
 
-    public void addEntityToWorld(int i, Entity entity)
-    {
+    public void addEntityToWorld(int i, Entity entity) {
         Entity entity1 = getEntityFromId(i);
-        if(entity1 != null)
-        {
+        if (entity1 != null) {
             setEntityDead(entity1);
         }
-        forced.add(entity);
+        this.forced.add(entity);
         entity.id = i;
-        if(!entityJoinedWorld(entity))
-        {
-            reEntries.add(entity);
+        if (!entityJoinedWorld(entity)) {
+            this.reEntries.add(entity);
         }
-        entitiesById.put(i, entity);
+        this.entitiesById.put(i, entity);
     }
 
-    public Entity getEntityFromId(int i)
-    {
-        return entitiesById.get(i);
+    public Entity getEntityFromId(int i) {
+        return this.entitiesById.get(i);
     }
 
-    public Entity removeEntityFromWorld(int i)
-    {
-        Entity entity = entitiesById.remove(i);
-        if(entity != null)
-        {
-            forced.remove(entity);
+    public Entity removeEntityFromWorld(int i) {
+        Entity entity = this.entitiesById.remove(i);
+        if (entity != null) {
+            this.forced.remove(entity);
             setEntityDead(entity);
         }
         return entity;
     }
 
     @Override
-    public boolean setBlockData(final @NotNull TilePos tilePos, final int data) {
+    public boolean setBlockData(final @NotNull TilePosc tilePos, final int data) {
         final int id = this.getBlockId(tilePos);
         final int currentData = this.getBlockData(tilePos);
         if (super.setBlockData(tilePos, data)) {
-            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x, tilePos.y, tilePos.z, id, currentData));
+            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x(), tilePos.y(), tilePos.z(), id, currentData));
             return true;
         } else {
             return false;
@@ -216,11 +186,11 @@ public class WorldClientMP extends WorldClient {
     }
 
     @Override
-    public boolean setBlockIdData(final @NotNull TilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdData(final @NotNull TilePosc tilePos, final int id, final int data) {
         final int currentId = this.getBlockId(tilePos);
         final int currentData = this.getBlockData(tilePos);
         if (super.setBlockIdData(tilePos, id, data)) {
-            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x, tilePos.y, tilePos.z, currentId, currentData));
+            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x(), tilePos.y(), tilePos.z(), currentId, currentData));
             return true;
         } else {
             return false;
@@ -228,43 +198,38 @@ public class WorldClientMP extends WorldClient {
     }
 
     @Override
-    public boolean setBlockId(final @NotNull TilePos tilePos, final int id) {
+    public boolean setBlockId(final @NotNull TilePosc tilePos, final int id) {
         final int currentId = this.getBlockId(tilePos);
         final int data = this.getBlockData(tilePos);
         if (super.setBlockId(tilePos, id)) {
-            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x, tilePos.y, tilePos.z, currentId, data));
+            this.positionTypesList.add(new WorldBlockPositionType(tilePos.x(), tilePos.y(), tilePos.z(), currentId, data));
             return true;
         } else {
             return false;
         }
     }
 
-    public boolean blockChange(int x, int y, int z, int id, int meta)
-    {
+    public boolean blockChange(int x, int y, int z, int id, int meta) {
         removePositionTypesInBounds(x, y, z, x, y, z);
-        if(super.setBlockAndMetadata(x, y, z, id, meta))
-        {
+        if (super.setBlockAndMetadata(x, y, z, id, meta)) {
             notifyBlockChange(x, y, z, id);
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
 
     @Override
-	public void sendQuittingDisconnectingPacket()
-    {
-        sendQueue.sendFinalPacket(new PacketDisconnect("Quitting"));
+    public void sendQuittingDisconnectingPacket() {
+        this.sendQueue.sendFinalPacket(new PacketDisconnect("Quitting"));
     }
 
     @Override
-    public void sendGlobalMessage(String message){
+    public void sendGlobalMessage(String message) {
 
     }
 
-    static class WorldBlockPositionType
-    {
+    static class WorldBlockPositionType {
         int x;
         int y;
         int z;
diff --git a/game/client/src/main/java/org/useless/dragonfly/models/block/mojang/StaticBlockModelMojang.java b/game/client/src/main/java/org/useless/dragonfly/models/block/mojang/StaticBlockModelMojang.java
index f01219ef5..8e9cd0013 100644
--- a/game/client/src/main/java/org/useless/dragonfly/models/block/mojang/StaticBlockModelMojang.java
+++ b/game/client/src/main/java/org/useless/dragonfly/models/block/mojang/StaticBlockModelMojang.java
@@ -62,11 +62,11 @@ public class StaticBlockModelMojang implements StaticBlockModel {
 
     @Override
     public boolean renderStandalone(@NotNull BlockModel<? extends BlockLogic> sourceModel, @NotNull Tessellator tessellator, double x, double y, double z, int metadata, @NotNull BlockColor color, float brightness, float alpha) {
-        if (compiled.elements.length == 0) return false;
+        if (this.compiled.elements.length == 0) return false;
 
         GL11.glPushMatrix();
-        for (int i = 0; i < compiled.elements.length; i++) {
-            C_Element element = compiled.elements[i];
+        for (int i = 0; i < this.compiled.elements.length; i++) {
+            C_Element element = this.compiled.elements[i];
 
             if (element.shade) {
                 GL11.glEnable(GL11.GL_LIGHTING);
@@ -76,7 +76,7 @@ public class StaticBlockModelMojang implements StaticBlockModel {
 
             tessellator.startDrawingQuads();
             for (int face = 0; face < element.faces; face++) {
-                IconCoordinate coordinate = compiled.textures.getOrDefault(element.textures[face], BlockModelStandard.BLOCK_TEXTURE_UNASSIGNED);
+                IconCoordinate coordinate = this.compiled.textures.getOrDefault(element.textures[face], BlockModelStandard.BLOCK_TEXTURE_UNASSIGNED);
 
                 // Todo fix this needing to be hardcoded to get overbright looking right
                 if (LightmapHelper.isLightmapEnabled() && element.lightEmission == 15) {
@@ -116,16 +116,16 @@ public class StaticBlockModelMojang implements StaticBlockModel {
 
     @Override
     public boolean renderAttached(@NotNull BlockModel<? extends BlockLogic> sourceModel, @NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z, double xOff, double yOff, double zOff, boolean cullFaces, @Nullable IconCoordinate overrideTexture) {
-        if (compiled.elements.length == 0) return false;
+        if (this.compiled.elements.length == 0) return false;
         boolean didRender = false;
         LIGHTING_CACHE.setupCache(sourceModel.block, worldSource, x, y, z);
 
         BlockColor color = BlockColorDispatcher.getInstance().getDispatch(sourceModel.block);
-        for (int i = 0; i < compiled.elements.length; i++) {
-            final C_Element element = compiled.elements[i];
+        for (int i = 0; i < this.compiled.elements.length; i++) {
+            final C_Element element = this.compiled.elements[i];
             for (int face = 0; face < element.faces; face++) {
                 if (cullFaces && cullSide(worldSource, x, y, z, element.cullfaces[face])) continue;
-                final IconCoordinate coordinate = overrideTexture == null ? compiled.textures.getOrDefault(element.textures[face], BlockModelStandard.BLOCK_TEXTURE_UNASSIGNED) : overrideTexture;
+                final IconCoordinate coordinate = overrideTexture == null ? this.compiled.textures.getOrDefault(element.textures[face], BlockModelStandard.BLOCK_TEXTURE_UNASSIGNED) : overrideTexture;
                 final Direction direction = element.directions[face];
 
                 final float minBrightness = element.lightEmission/15f;
@@ -175,7 +175,7 @@ public class StaticBlockModelMojang implements StaticBlockModel {
                         break;
                 }
 
-                final boolean useAO = compiled.data.ambientOcclusion && MC.isAmbientOcclusionEnabled() && element.shade;
+                final boolean useAO = this.compiled.data.ambientOcclusion && MC.isAmbientOcclusionEnabled() && element.shade;
                 final boolean isFullCube = depth <= FULL_CUBE_THRESHOLD && element.shade;
 
                 final float r;
@@ -364,11 +364,11 @@ public class StaticBlockModelMojang implements StaticBlockModel {
                 tessellator.setColorOpaque_F(colorRedTopLeft, colorGreenTopLeft, colorBlueTopLeft);
                 if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordTopLeft);
                 tessellator.addVertexWithUV(
-                    element.vertexData[offset + VERTEX_TOP_LEFT * FLOATS_PER_VERTEX + VERTEX_FLOAT_X] + x + xOff,
-                    element.vertexData[offset + VERTEX_TOP_LEFT * FLOATS_PER_VERTEX + VERTEX_FLOAT_Y] + y + yOff,
-                    element.vertexData[offset + VERTEX_TOP_LEFT * FLOATS_PER_VERTEX + VERTEX_FLOAT_Z] + z + zOff,
-                    coordinate.getSubIconU(element.vertexData[offset + VERTEX_TOP_LEFT * FLOATS_PER_VERTEX + VERTEX_FLOAT_U]),
-                    coordinate.getSubIconV(element.vertexData[offset + VERTEX_TOP_LEFT * FLOATS_PER_VERTEX + VERTEX_FLOAT_V]));
+                    element.vertexData[offset + VERTEX_FLOAT_X] + x + xOff,
+                    element.vertexData[offset + VERTEX_FLOAT_Y] + y + yOff,
+                    element.vertexData[offset + VERTEX_FLOAT_Z] + z + zOff,
+                    coordinate.getSubIconU(element.vertexData[offset + VERTEX_FLOAT_U]),
+                    coordinate.getSubIconV(element.vertexData[offset + VERTEX_FLOAT_V]));
 
                 tessellator.setColorOpaque_F(colorRedBottomLeft, colorGreenBottomLeft, colorBlueBottomLeft);
                 if(LightmapHelper.isLightmapEnabled()) tessellator.setLightmapCoord(lightmapCoordBottomLeft);
@@ -406,27 +406,27 @@ public class StaticBlockModelMojang implements StaticBlockModel {
     @Override
     public @Nullable IconCoordinate getOverlay() {
         // This breaks the modern mc format of using the "#particle" symbol for the overlay, but due to our changes to the spec this is the best way of going about it
-        return compiled.textures.get("#overlay");
+        return this.compiled.textures.get("#overlay");
     }
 
     @Override
     public @Nullable IconCoordinate getParticle(@NotNull Side side) {
-        return compiled.textures.get("#particle_" + side.getDirection().name().toLowerCase(Locale.ROOT));
+        return this.compiled.textures.get("#particle_" + side.getDirection().name().toLowerCase(Locale.ROOT));
     }
 
     @Override
     public int particleColorIndex(@NotNull Side side) {
-        return compiled.particleIndices[side.getId()];
+        return this.compiled.particleIndices[side.getId()];
     }
 
     @Override
     public int renderLayer() {
-        return compiled.renderLayer;
+        return this.compiled.renderLayer;
     }
 
     @Override
     public @NotNull DisplayPos getItemDisplayPos(@NotNull String id) {
-        return compiled.displayPosMap.getOrDefault(id, DisplayPos.DEFAULT_DISPLAY_POS);
+        return this.compiled.displayPosMap.getOrDefault(id, DisplayPos.DEFAULT_DISPLAY_POS);
     }
 
     protected boolean cullSide(WorldSource worldSource, int x, int y, int z, @Nullable Direction direction) {
diff --git a/game/client/src/main/java/org/useless/dragonfly/models/entity/StaticEntityModel.java b/game/client/src/main/java/org/useless/dragonfly/models/entity/StaticEntityModel.java
index 737efb9db..4587b933d 100644
--- a/game/client/src/main/java/org/useless/dragonfly/models/entity/StaticEntityModel.java
+++ b/game/client/src/main/java/org/useless/dragonfly/models/entity/StaticEntityModel.java
@@ -1,13 +1,13 @@
 package org.useless.dragonfly.models.entity;
 
 import net.minecraft.client.render.tessellator.Tessellator;
-import net.minecraft.core.util.phys.AABB;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBdc;
 
 public interface StaticEntityModel {
     void resetBones();
     @NotNull BoneTransform getTransform(@NotNull String boneId);
-    @NotNull AABB visibleBounds();
+    @NotNull AABBdc visibleBounds();
     void translateToBone(@NotNull String boneId);
     void render(@NotNull Tessellator tessellator);
 }
diff --git a/game/client/src/main/java/org/useless/dragonfly/models/entity/mojang/StaticEntityModelMojang.java b/game/client/src/main/java/org/useless/dragonfly/models/entity/mojang/StaticEntityModelMojang.java
index b19d17b24..b0e4368c8 100644
--- a/game/client/src/main/java/org/useless/dragonfly/models/entity/mojang/StaticEntityModelMojang.java
+++ b/game/client/src/main/java/org/useless/dragonfly/models/entity/mojang/StaticEntityModelMojang.java
@@ -3,8 +3,9 @@ package org.useless.dragonfly.models.entity.mojang;
 import net.minecraft.client.render.tessellator.Tessellator;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.lwjgl.opengl.GL11;
 import org.useless.dragonfly.data.entity.mojang.Bone;
 import org.useless.dragonfly.data.entity.mojang.Cube;
@@ -23,7 +24,8 @@ public class StaticEntityModelMojang implements StaticEntityModel {
     public final @NotNull Bone @NotNull [] bones;
     public final EntityGeometryMojangData data;
     public final double inflation;
-    protected final AABB visBounds;
+    protected final @NotNull AABBd visBounds;
+
     public StaticEntityModelMojang(final @NotNull EntityGeometryMojangData data, final double inflation) {
         this.data = data;
         this.transforms = new BoneTransform[this.data.bones.size()];
@@ -39,14 +41,14 @@ public class StaticEntityModelMojang implements StaticEntityModel {
             i++;
         }
 
-        this.visBounds = AABB.fromPool(
-            (this.data.vBoundsOffset[0] - this.data.vBoundsWidth /2),
-            (this.data.vBoundsOffset[1] - this.data.vBoundsHeight/2),
-            (this.data.vBoundsOffset[2] - this.data.vBoundsWidth /2),
-            (this.data.vBoundsOffset[0] + this.data.vBoundsWidth /2),
-            (this.data.vBoundsOffset[1] + this.data.vBoundsHeight/2),
-            (this.data.vBoundsOffset[2] + this.data.vBoundsWidth /2)
-        ).copyUnpooled();
+        this.visBounds = new AABBd(
+            (this.data.vBoundsOffset[0] - this.data.vBoundsWidth / 2),
+            (this.data.vBoundsOffset[1] - this.data.vBoundsHeight / 2),
+            (this.data.vBoundsOffset[2] - this.data.vBoundsWidth / 2),
+            (this.data.vBoundsOffset[0] + this.data.vBoundsWidth / 2),
+            (this.data.vBoundsOffset[1] + this.data.vBoundsHeight / 2),
+            (this.data.vBoundsOffset[2] + this.data.vBoundsWidth / 2)
+        );
     }
 
     @Override
@@ -62,7 +64,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
     }
 
     @Override
-    public @NotNull AABB visibleBounds() {
+    public @NotNull AABBdc visibleBounds() {
         return this.visBounds;
     }
 
@@ -105,6 +107,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
     }
 
     private final double[] uvsBuffer = new double[8];
+
     protected void renderBone(@NotNull final Tessellator tessellator, @NotNull final Bone bone) {
         tessellator.startDrawingQuads();
         for (final Cube cube : bone.cubes) {
@@ -115,7 +118,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
             final double maxX = minX + cube.size[0] + (cube.inflate + bone.inflate + this.inflation) * 2;
             final double maxY = minY + cube.size[1] + (cube.inflate + bone.inflate + this.inflation) * 2;
             final double maxZ = minZ + cube.size[2] + (cube.inflate + bone.inflate + this.inflation) * 2;
-            
+
             if (cube.rotation == null) {
                 // Top
                 Face face = cube.faces[Direction.UP.getId()];
@@ -123,7 +126,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMin;
@@ -148,7 +151,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
@@ -173,7 +176,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
@@ -198,7 +201,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMax;
                     this.uvsBuffer[2] = uMax;
@@ -223,7 +226,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMax;
                     this.uvsBuffer[2] = uMax;
@@ -248,7 +251,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
@@ -266,15 +269,14 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     tessellator.addVertexWithUV(minX, maxY, minZ, this.uvsBuffer[(4 + face.uv_rotation * 2) % 8], this.uvsBuffer[(5 + face.uv_rotation * 2) % 8]);
                     tessellator.addVertexWithUV(minX, maxY, maxZ, this.uvsBuffer[(6 + face.uv_rotation * 2) % 8], this.uvsBuffer[(7 + face.uv_rotation * 2) % 8]);
                 }
-            }
-            else {
+            } else {
                 // Top
                 Face face = cube.faces[Direction.UP.getId()];
                 if (face != null) {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMin;
@@ -300,7 +302,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
@@ -325,7 +327,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
@@ -350,7 +352,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMax;
                     this.uvsBuffer[2] = uMax;
@@ -375,7 +377,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMax;
                     this.uvsBuffer[2] = uMax;
@@ -400,7 +402,7 @@ public class StaticEntityModelMojang implements StaticEntityModel {
                     final double uMin = (face.uv[0]) / this.data.textureWidth;
                     final double uMax = (face.uv[0] + face.uv_size[0]) / this.data.textureWidth;
                     final double vMin = (face.uv[1]) / this.data.textureHeight;
-                    final double vMax = (face.uv[1] + face.uv_size[1])  / this.data.textureHeight;
+                    final double vMax = (face.uv[1] + face.uv_size[1]) / this.data.textureHeight;
 
                     this.uvsBuffer[0] = uMin;
                     this.uvsBuffer[2] = uMax;
diff --git a/game/core/src/main/java/net/minecraft/core/NextTickListEntry.java b/game/core/src/main/java/net/minecraft/core/NextTickListEntry.java
index 8ff26b7d8..9725c8391 100644
--- a/game/core/src/main/java/net/minecraft/core/NextTickListEntry.java
+++ b/game/core/src/main/java/net/minecraft/core/NextTickListEntry.java
@@ -3,92 +3,31 @@ package net.minecraft.core;
 
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.chunk.Chunk;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class NextTickListEntry
     implements Comparable<NextTickListEntry> {
 
-    public static @NotNull CompoundTag serialize(final @NotNull NextTickListEntry entry) {
-        final @NotNull CompoundTag tag = new CompoundTag();
-
-        tag.putInt("pos", compressChunkCoord((short) entry.x, (short) entry.y, (short) entry.z));
-        tag.putShort("blockId", (short) entry.blockId);
-        tag.putLong("creationTime", entry.creationTime);
-        if (entry.delay != 0) {
-            tag.putLong("delay", entry.delay);
-        }
-
-        return tag;
-    }
-
-    public static @Nullable NextTickListEntry deserialize(final @NotNull CompoundTag tag) {
-        if (!tag.containsKey("pos")) {
-            return null;
-        }
-        final int pos = tag.getInteger("pos");
-
-        final short @NotNull [] xyz = new short[3];
-        decompressChunkCoord(pos, xyz);
-
-        if (!tag.containsKey("blockId")) {
-            return null;
-        }
-        final short blockId = tag.getShort("blockId");
-
-        if (!tag.containsKey("creationTime")) {
-            return null;
-        }
-        final long creationTime = tag.getLong("creationTime");
-
-        final @NotNull NextTickListEntry entry = new NextTickListEntry(xyz[0], xyz[1], xyz[2], blockId, creationTime);
-
-        if (tag.containsKey("delay")) {
-            entry.setDelay(tag.getLong("delay"));
-        }
-
-        return entry;
-    }
-
-    public static int compressChunkCoord(final short x, final short y, final short z) {
-        return ((y & 0xFFFF) << 16) | ((z & 0xFF) << 8) | ((x & 0xFF) << 0);
-    }
-
-    public static void decompressChunkCoord(final int compressed, final short @NotNull [] xyz) {
-        final int y = (compressed & 0xFFFF0000) >> 16;
-        final int z = (compressed & 0x0000FF00) >> 8;
-        final int x = (compressed & 0x000000FF) >> 0;
-
-        xyz[0] = (short) x;
-        xyz[1] = (short) y;
-        xyz[2] = (short) z;
-    }
-
     private static long counter = 0L;
 
-    public int x;
-    public int y;
-    public int z;
+    public @NotNull TilePos tilePos;
     public int blockId;
-    public long creationTime;
     public long delay;
-    public boolean loaded;
     private final long entryId;
 
-    public NextTickListEntry(final int x, final int y, final int z, final int blockId, final long creationTime) {
+    public NextTickListEntry(final @NotNull TilePosc tilePos, final int blockId) {
         this.entryId = counter++;
-        this.x = x;
-        this.y = y;
-        this.z = z;
+        this.tilePos = new TilePos(tilePos);
         this.blockId = blockId;
-        this.creationTime = creationTime;
     }
 
     @Override
     public boolean equals(final @Nullable Object obj) {
-        if (obj instanceof NextTickListEntry) {
-            final @NotNull NextTickListEntry entry = (NextTickListEntry) obj;
-            return this.x == entry.x && this.y == entry.y && this.z == entry.z && this.blockId == entry.blockId;
+        if (obj instanceof final @NotNull NextTickListEntry entry) {
+            return this.tilePos.equals(entry.tilePos) && this.blockId == entry.blockId;
         } else {
             return false;
         }
@@ -96,7 +35,7 @@ public class NextTickListEntry
 
     @Override
     public int hashCode() {
-        return (this.x * 128 * 1024 + this.z * 128 + this.y) * 256 + this.blockId;
+        return (this.tilePos.x() * 128 * 1024 + this.tilePos.z() * 128 + this.tilePos.y()) * 256 + this.blockId;
     }
 
     public @NotNull NextTickListEntry setDelay(final long delay) {
@@ -104,16 +43,12 @@ public class NextTickListEntry
         return this;
     }
 
-    public long getEndTime() {
-        return this.creationTime + this.delay;
-    }
-
     @Override
     public int compareTo(final @NotNull NextTickListEntry other) {
-        if (this.getEndTime() < other.getEndTime()) {
+        if (this.delay < other.delay) {
             return -1;
         }
-        if (this.getEndTime() > other.getEndTime()) {
+        if (this.delay > other.delay) {
             return 1;
         }
         if (this.entryId < other.entryId) {
@@ -121,11 +56,4 @@ public class NextTickListEntry
         }
         return this.entryId <= other.entryId ? 0 : 1;
     }
-
-    public @NotNull NextTickListEntry clone() {
-        final @NotNull NextTickListEntry cloned = new NextTickListEntry(this.x, this.y, this.z, this.blockId, this.creationTime);
-        cloned.delay = this.delay;
-
-        return cloned;
-    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/Block.java b/game/core/src/main/java/net/minecraft/core/block/Block.java
index 836ffd6e9..ffcd2c3d3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/Block.java
+++ b/game/core/src/main/java/net/minecraft/core/block/Block.java
@@ -22,15 +22,18 @@ import net.minecraft.core.util.HardIllegalArgumentException;
 import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.BoundingVolume;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Objects;
@@ -266,7 +269,7 @@ public final class Block<T extends BlockLogic>
         return new ItemStack(this);
     }
 
-    public static boolean getIsLitInteriorSurface(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public static boolean getIsLitInteriorSurface(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = source.getBlock(tilePos);
         return block != null && block.isLitInteriorSurface;
     }
@@ -300,22 +303,22 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.canPlaceOnSurfaceOnCondition(world, tilePos);
     }
 
     @Override
-    public boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.renderAsNormalBlockOnCondition(source, tilePos);
     }
 
     @Override
-    public boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.canPlaceOnSurface(world, tilePos);
     }
 
     @Override
-    public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity) {
+    public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity) {
         return this.logic.getBreakResult(world, dropCause, tilePos, data, tileEntity);
     }
 
@@ -325,52 +328,52 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public @NotNull AABB getBounds() {
+    public @NotNull AABBdc getBounds() {
         return this.logic.getBounds();
     }
 
     @Override
-    public @NotNull AABB getBoundsRaw() {
+    public @NotNull AABBd getBoundsRaw() {
         return this.logic.getBoundsRaw();
     }
 
     @Override
-    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getBrightness(source, tilePos);
     }
 
     @Override
-    public int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getLightmapCoord(source, tilePos);
     }
 
     @Override
-    public float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getAmbientOcclusionStrength(source, tilePos);
     }
 
     @Override
-    public @NotNull AABB getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getSelectionAABB(source, tilePos);
     }
 
     @Override
-    public @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.getBoundingVolume(world, tilePos);
     }
 
     @Override
-    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull AABBdc aabb, final @NotNull List<@NotNull AABBdc> aabbList) {
         this.logic.getCollisionAABBs(world, tilePos, aabb, aabbList);
     }
 
     @Override
-    public boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.collidesWithEntity(entity, world, tilePos);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getCollisionAABB(source, tilePos);
     }
 
@@ -395,17 +398,17 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         this.logic.updateTick(world, tilePos, rand, false);
     }
 
     @Override
-    public void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         this.logic.animationTick(world, tilePos, rand);
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         this.logic.onNeighborChanged(world, tilePos, id);
     }
 
@@ -415,7 +418,7 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (this.isEntityTile && !disableNormalEntityLogic && this.entitySupplier != null) {
             world.setTileEntity(tilePos, this.entitySupplier.get());
         }
@@ -423,13 +426,13 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         this.logic.onRemoved(world, tilePos, data);
         if (this.isEntityTile && !disableNormalEntityLogic) {
             if (!world.isClientSide) {
                 final @Nullable TileEntity tileEntity = world.getTileEntity(tilePos);
                 if (tileEntity != null) {
-                    tileEntity.dropContents(world, tilePos.x, tilePos.y, tilePos.z);
+                    tileEntity.dropContents(world, tilePos.x(), tilePos.y(), tilePos.z());
                 }
             }
             world.removeTileEntity(tilePos);
@@ -437,12 +440,12 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) {
+    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) {
         this.logic.onDestroyedByPlayer(world, tilePos, side, data, player, item);
     }
 
     @Override
-    public float getStrength(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Player player) {
+    public float getStrength(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Player player) {
         return this.logic.getStrength(world, tilePos, side, player);
     }
 
@@ -457,57 +460,57 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Vec3 start, final @NotNull Vec3 end, final boolean useSelectionAABB) {
+    public @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Vector3dc start, final @NotNull Vector3dc end, final boolean useSelectionAABB) {
         return this.logic.collisionRayTrace(world, tilePos, start, end, useSelectionAABB);
     }
 
     @Override
-    public void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePosc tilePos) {
         this.logic.onDestroyedByExplosion(world, tilePos);
     }
 
     @Override
-    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.logic.canPlaceOnSide(world, tilePos, side);
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.canPlaceAt(world, tilePos);
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         return this.logic.onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         this.logic.onActivatorInteracted(world, tilePos, activator, direction);
     }
 
     @Override
-    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity walker) {
+    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity walker) {
         this.logic.onEntityWalkedOn(world, tilePos, walker);
     }
 
     @Override
-    public void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
         this.logic.onAttacked(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public void onEntityInside(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity, final @NotNull Vec3 velocity) {
-        this.logic.onEntityInside(world, tilePos, entity, velocity);
+    public void onEntityInside(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity, final @NotNull Vector3d velocityDirection) {
+        this.logic.onEntityInside(world, tilePos, entity, velocityDirection);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getBoundsFromState(source, tilePos);
     }
 
     @Override
-    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.logic.isEmittingSignal(source, tilePos, side);
     }
 
@@ -517,42 +520,42 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity) {
+    public void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity) {
         this.logic.onEntityCollision(world, tilePos, entity);
     }
 
     @Override
-    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.logic.isEmittingDirectSignal(world, tilePos, side);
     }
 
     @Override
-    public void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity) {
+    public void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity) {
         this.logic.onHarvest(world, player, tilePos, data, tileEntity);
     }
 
     @Override
-    public void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player) {
+    public void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player) {
         this.logic.dropWithCause(world, dropCause, tilePos, data, tileEntity, player);
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.logic.getSupport(world, tilePos, side);
     }
 
     @Override
-    public boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.canStay(world, tilePos);
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         this.logic.onPlacedByMob(world, tilePos, side, mob, xHit, yHit);
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         this.logic.onPlacedOnSide(world, tilePos, side, xHit, yHit);
     }
 
@@ -562,32 +565,32 @@ public final class Block<T extends BlockLogic>
     }
 
     @Override
-    public void triggerEvent(final @NotNull World world, final @NotNull TilePos tilePos, final int index, final int data) {
+    public void triggerEvent(final @NotNull World world, final @NotNull TilePosc tilePos, final int index, final int data) {
         this.logic.triggerEvent(world, tilePos, index, data);
     }
 
     @Override
-    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.getPistonPushReaction(world, tilePos);
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return this.logic.getPlacedData(player, itemStack, world, tilePos, side, xHit, yHit);
     }
 
     @Override
-    public boolean isClimbable(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean isClimbable(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.logic.isClimbable(world, tilePos);
     }
 
     @Override
-    public boolean isEquivalent(final @NotNull World world, final @NotNull TilePos thisPos, final @NotNull TilePos thatPos) {
+    public boolean isEquivalent(final @NotNull World world, final @NotNull TilePosc thisPos, final @NotNull TilePosc thatPos) {
         return this.logic.isEquivalent(world, thisPos, thatPos);
     }
 
     @Override
-    public @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.logic.getAttachedSide(source, tilePos);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockInterface.java b/game/core/src/main/java/net/minecraft/core/block/BlockInterface.java
index d28b49aa0..28afea31c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockInterface.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockInterface.java
@@ -13,15 +13,18 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.BoundingVolume;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
@@ -39,14 +42,14 @@ interface BlockInterface {
     boolean canPlaceOnSurface();
 
     @Deprecated
-    boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final int x, final int y, final int z) {
         return this.canPlaceOnSurfaceOnCondition(world, new TilePos(x, y, z));
     }
 
-    boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource world, final int x, final int y, final int z) {
@@ -54,7 +57,7 @@ interface BlockInterface {
     }
 
     @Deprecated
-    boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean canPlaceOnSurfaceOfBlock(final @NotNull World world, final int x, final int y, final int z) {
@@ -64,7 +67,7 @@ interface BlockInterface {
     /**
      * Make sure if this gets overridden in a block that {@link net.minecraft.core.block.Block#getBreakResult(World, EnumDropCause, int, TileEntity)} also has a valid method since {@link EntityFallingBlock EntityFallingBlock} uses it!
      */
-    @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity);
+    @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity);
 
     /**
      * Make sure if this gets overridden in a block that {@link net.minecraft.core.block.Block#getBreakResult(World, EnumDropCause, int, TileEntity)} also has a valid method since {@link EntityFallingBlock EntityFallingBlock} uses it!
@@ -76,18 +79,18 @@ interface BlockInterface {
 
     @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final int data, final @Nullable TileEntity tileEntity);
 
-    @NotNull AABB getBounds();
+    @NotNull AABBdc getBounds();
 
-    @NotNull AABB getBoundsRaw();
+    @NotNull AABBd getBoundsRaw();
 
-    float getBrightness(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    float getBrightness(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default float getBlockBrightness(final @NotNull WorldSource source, final int x, final int y, final int z) {
         return this.getBrightness(source, new TilePos(x, y, z));
     }
 
-    int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default int getLightmapCoord(final @NotNull WorldSource source, final int x, final int y, final int z) {
@@ -97,7 +100,7 @@ interface BlockInterface {
     /**
      * Used when fullbright or lightmap is active
      */
-    float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     /**
      * Used when fullbright or lightmap is active
@@ -107,38 +110,38 @@ interface BlockInterface {
         return this.getAmbientOcclusionStrength(source, new TilePos(x, y, z));
     }
 
-    @NotNull AABB getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    @NotNull AABBdc getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
-    default @NotNull AABB getSelectedBoundingBoxFromPool(final @NotNull WorldSource world, final int x, final int y, final int z) {
+    default @NotNull AABBdc getSelectedBoundingBoxFromPool(final @NotNull WorldSource world, final int x, final int y, final int z) {
         return this.getSelectionAABB(world, new TilePos(x, y, z));
     }
 
-    @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePos tilePos);
+    @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final int x, final int y, final int z) {
         return this.getBoundingVolume(world, new TilePos(x, y, z));
     }
 
-    void getCollisionAABBs(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList);
+    void getCollisionAABBs(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull AABBdc aabb, final @NotNull List<@NotNull AABBdc> aabbList);
 
     @Deprecated
-    default void getCollidingBoundingBoxes(final @NotNull World world, final int x, final int y, final int z, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList) {
+    default void getCollidingBoundingBoxes(final @NotNull World world, final int x, final int y, final int z, final @NotNull AABBdc aabb, final @NotNull List<@NotNull AABBdc> aabbList) {
         this.getCollisionAABBs(world, new TilePos(x, y, z), aabb, aabbList);
     }
 
-    boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final int x, final int y, final int z) {
         return this.collidesWithEntity(entity, world, new TilePos(x, y, z));
     }
 
-    @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
-    default @Nullable AABB getCollisionBoundingBoxFromPool(final @NotNull WorldSource source, final int x, final int y, final int z) {
+    default @Nullable AABBdc getCollisionBoundingBoxFromPool(final @NotNull WorldSource source, final int x, final int y, final int z) {
         return this.getCollisionAABB(source, new TilePos(x, y, z));
     }
 
@@ -150,21 +153,21 @@ interface BlockInterface {
 
     boolean isCollidable();
 
-    void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick);
+    void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick);
 
     @Deprecated
     default void updateTick(final @NotNull World world, final int x, final int y, final int z, final @NotNull Random rand, final boolean isRandomTick) {
         this.updateTick(world, new TilePos(x, y, z), rand, isRandomTick);
     }
 
-    void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand);
+    void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand);
 
     @Deprecated
     default void animationTick(final @NotNull World world, final int x, final int y, final int z, final @NotNull Random rand) {
         this.animationTick(world, new TilePos(x, y, z), rand);
     }
 
-    void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id);
+    void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id);
 
     @Deprecated
     default void onNeighborBlockChange(final @NotNull World world, final int x, final int y, final int z, final int id) {
@@ -173,14 +176,14 @@ interface BlockInterface {
 
     int tickDelay();
 
-    void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos);
+    void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default void onBlockPlacedByWorld(final @NotNull World world, final int x, final int y, final int z) {
         this.onPlacedByWorld(world, new TilePos(x, y, z));
     }
 
-    void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data);
+    void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data);
 
     /**
      * Always called when a block is removed by setBlock
@@ -193,7 +196,7 @@ interface BlockInterface {
     /**
      * Called when a block has been broken by a player, after {@link net.minecraft.core.block.Block#onBlockRemoved(World, int, int, int, int)}
      */
-    void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item);
+    void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item);
 
     /**
      * Called when a block has been broken by a player, after {@link net.minecraft.core.block.Block#onBlockRemoved(World, int, int, int, int)}
@@ -203,7 +206,7 @@ interface BlockInterface {
         this.onDestroyedByPlayer(world, new TilePos(x, y, z), side, data, player, item);
     }
 
-    float getStrength(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Player player);
+    float getStrength(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Player player);
 
     @Deprecated
     default float blockStrength(final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side, final @NotNull Player player) {
@@ -214,80 +217,80 @@ interface BlockInterface {
 
     float getBlastResistance(final @Nullable Entity entity);
 
-    @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Vec3 start, final @NotNull Vec3 end, final boolean useSelectionAABB);
+    @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Vector3dc start, final @NotNull Vector3dc end, final boolean useSelectionAABB);
 
     @Deprecated
-    default @Nullable HitResult collisionRayTrace(final @NotNull World world, final int x, final int y, final int z, final @NotNull Vec3 start, final @NotNull Vec3 end, final boolean useSelectionAABB) {
+    default @Nullable HitResult collisionRayTrace(final @NotNull World world, final int x, final int y, final int z, final @NotNull Vector3dc start, final @NotNull Vector3dc end, final boolean useSelectionAABB) {
         return this.collisionRayTrace(world, new TilePos(x, y, z), start, end, useSelectionAABB);
     }
 
-    void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePos tilePos);
+    void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default void onBlockDestroyedByExplosion(final @NotNull World world, final int x, final int y, final int z) {
         this.onDestroyedByExplosion(world, new TilePos(x, y, z));
     }
 
-    boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side);
+    boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
     @Deprecated
     default boolean canPlaceBlockOnSide(final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side) {
         return this.canPlaceOnSide(world, new TilePos(x, y, z), side);
     }
 
-    boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean canPlaceBlockAt(final @NotNull World world, final int x, final int y, final int z) {
         return this.canPlaceAt(world, new TilePos(x, y, z));
     }
 
-    boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit);
+    boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit);
 
     @Deprecated
     default boolean onBlockRightClicked(final @NotNull World world, final int x, final int y, final int z, final @Nullable Player player, final @Nullable Side side, final double xHit, final double yHit) {
         return this.onInteracted(world, new TilePos(x, y, z), player, side, xHit, yHit);
     }
 
-    void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction);
+    void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction);
 
     @Deprecated
     default void onActivatorInteract(final @NotNull World world, final int x, final int y, final int z, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         this.onActivatorInteracted(world, new TilePos(x, y, z), activator, direction);
     }
 
-    void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity walker);
+    void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity walker);
 
     @Deprecated
     default void onEntityWalking(final @NotNull World world, final int x, final int y, final int z, final @NotNull Entity entity) {
         this.onEntityWalkedOn(world, new TilePos(x, y, z), entity);
     }
 
-    void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit);
+    void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit);
 
     @Deprecated
     default void onBlockLeftClicked(final @NotNull World world, final int x, final int y, final int z, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
         this.onAttacked(world, new TilePos(x, y, z), player, side, xHit, yHit);
     }
 
-    void onEntityInside(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity, final @NotNull Vec3 velocity);
+    void onEntityInside(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity, final @NotNull Vector3d velocityDirection);
 
     @Deprecated
-    default void handleEntityInside(final @NotNull World world, final int x, final int y, final int z, final @NotNull Entity entity, final @NotNull Vec3 velocity) {
-        this.onEntityInside(world, new TilePos(x, y, z), entity, velocity);
+    default void handleEntityInside(final @NotNull World world, final int x, final int y, final int z, final @NotNull Entity entity, final @NotNull Vector3d velocityDirection) {
+        this.onEntityInside(world, new TilePos(x, y, z), entity, velocityDirection);
     }
 
-    @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
-    default @NotNull AABB getBlockBoundsFromState(final @NotNull WorldSource world, final int x, final int y, final int z) {
+    default @NotNull AABBdc getBlockBoundsFromState(final @NotNull WorldSource world, final int x, final int y, final int z) {
         return this.getBoundsFromState(world, new TilePos(x, y, z));
     }
 
     /**
      * Gets the redstone signal output by the block itself, i.e. the power it will provide to any immediately adjacent redstone components.
      */
-    boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side);
+    boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
     /**
      * Gets the redstone signal output by the block itself, i.e. the power it will provide to any immediately adjacent redstone components.
@@ -299,14 +302,14 @@ interface BlockInterface {
 
     boolean isSignalSource();
 
-    void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity);
+    void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity);
 
     @Deprecated
     default void onEntityCollidedWithBlock(final @NotNull World world, final int x, final int y, final int z, final @NotNull Entity entity) {
         this.onEntityCollision(world, new TilePos(x, y, z), entity);
     }
 
-    boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side);
+    boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
     /**
      * Gets the redstone signal pushed into adjacent solid blocks. Any block experiencing *direct* signal will power itself and all adjacent blocks.
@@ -316,42 +319,42 @@ interface BlockInterface {
         return this.isEmittingDirectSignal(world, new TilePos(x, y, z), side);
     }
 
-    void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity);
+    void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity);
 
     @Deprecated
     default void harvestBlock(final @NotNull World world, final @NotNull Player player, final int x, final int y, final int z, final int data, final @Nullable TileEntity tileEntity) {
         this.onHarvest(world, player, new TilePos(x, y, z), data, tileEntity);
     }
 
-    void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player);
+    void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player);
 
     @Deprecated
     default void dropBlockWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final int x, final int y, final int z, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player) {
         this.dropWithCause(world, dropCause, new TilePos(x, y, z), data, tileEntity, player);
     }
 
-    @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side);
+    @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
     @Deprecated
     default @NotNull ISupport getSupport(final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side) {
         return this.getSupport(world, new TilePos(x, y, z), side);
     }
 
-    boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean canBlockStay(final @NotNull World world, final int x, final int y, final int z) {
         return this.canStay(world, new TilePos(x, y, z));
     }
 
-    void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit);
+    void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit);
 
     @Deprecated
     default void onBlockPlacedByMob(final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         this.onPlacedByMob(world, new TilePos(x, y, z), side, mob, xHit, yHit);
     }
 
-    void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit);
+    void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit);
 
     @Deprecated
     default void onBlockPlacedOnSide(final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side, final double xHit, final double yHit) {
@@ -360,42 +363,42 @@ interface BlockInterface {
 
     @NotNull String getLanguageKey(final int data);
 
-    void triggerEvent(final @NotNull World world, final @NotNull TilePos tilePos, final int index, final int data);
+    void triggerEvent(final @NotNull World world, final @NotNull TilePosc tilePos, final int index, final int data);
 
     @Deprecated
     default void triggerEvent(final @NotNull World world, final int x, final int y, final int z, final int index, final int data) {
         this.triggerEvent(world, new TilePos(x, y, z), index, data);
     }
 
-    int getPistonPushReaction(final @NotNull World world, final @NotNull TilePos tilePos);
+    int getPistonPushReaction(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default int getPistonPushReaction(final @NotNull World world, final int x, final int y, final int z) {
         return this.getPistonPushReaction(world, new TilePos(x, y, z));
     }
 
-    int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit);
+    int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit);
 
     @Deprecated
     default int getPlacedBlockMetadata(final @Nullable Player player, final @NotNull ItemStack stack, final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side, final double xHit, final double yHit) {
         return this.getPlacedData(player, stack, world, new TilePos(x, y, z), side, xHit, yHit);
     }
 
-    boolean isClimbable(final @NotNull World world, final @NotNull TilePos tilePos);
+    boolean isClimbable(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean isClimbable(final @NotNull World world, final int x, final int y, final int z) {
         return this.isClimbable(world, new TilePos(x, y, z));
     }
 
-    boolean isEquivalent(final @NotNull World world, final @NotNull TilePos thisPos, final @NotNull TilePos thatPos);
+    boolean isEquivalent(final @NotNull World world, final @NotNull TilePosc thisPos, final @NotNull TilePosc thatPos);
 
     @Deprecated
     default boolean isEquivalent(final @NotNull World world, final int thisX, final int thisY, final int thisZ, final int thatX, final int thatY, final int thatZ) {
         return this.isEquivalent(world, new TilePos(thisX, thisY, thisZ), new TilePos(thatX, thatY, thatZ));
     }
 
-    @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePos tilePos);
+    @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @NotNull Side getAttachedSide(final @NotNull WorldSource source, final int x, final int y, final int z) {
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogic.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogic.java
index 01fc5d2b5..0fc4f0620 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogic.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogic.java
@@ -19,23 +19,26 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.tool.ItemToolShears;
 import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.util.helper.Direction;
+import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.BoundingVolume;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Objects;
 import java.util.Random;
 
 public class BlockLogic implements BlockInterface, IItemConvertible {
-    protected final @NotNull AABB bounds = AABB.fromPool(0, 0, 0, 1, 1, 1).copyUnpooled();
+    protected final @NotNull AABBd bounds = new AABBd(0, 0, 0, 1, 1, 1);
     public final @NotNull Block<?> block;
 
     protected @NotNull Material material;
@@ -82,22 +85,22 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceOnSurfaceOnCondition(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.canPlaceOnSurface();
     }
 
     @Override
-    public boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public boolean renderAsNormalBlockOnCondition(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.isCubeShaped();
     }
 
     @Override
-    public boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceOnSurface(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.canPlaceOnSurface();
     }
 
     @Override
-    public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity) {
+    public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity) {
         return this.getBreakResult(world, dropCause, data, tileEntity);
     }
 
@@ -110,63 +113,63 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     public final void setBlockBounds(final double minX, final double minY, final double minZ, final double maxX, final double maxY, final double maxZ) {
-        this.bounds.set(minX, minY, minZ, maxX, maxY, maxZ);
+        this.bounds.setMin(minX, minY, minZ).setMax(maxX, maxY, maxZ);
     }
 
     @Override
-    public @NotNull AABB getBounds() {
-        return this.bounds.copy();
+    public @NotNull AABBdc getBounds() {
+        return this.bounds/*.AABB_copy()*/;
     }
 
     @Override
-    public @NotNull AABB getBoundsRaw() {
+    public @NotNull AABBd getBoundsRaw() {
         return this.bounds;
     }
 
     @Override
-    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return source.getBrightness(tilePos, this.block.emission);
     }
 
     @Override
-    public int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public int getLightmapCoord(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return source.getLightmapCoord(tilePos, this.block.emission);
     }
 
     @Override
-    public float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public float getAmbientOcclusionStrength(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.isSolidRender() ? 1.0f : 0.0f;
     }
 
     @Override
-    public @NotNull AABB getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        return this.getBoundsFromState(source, tilePos).move(tilePos.x, tilePos.y, tilePos.z);
+    public @NotNull AABBdc getSelectionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        return this.getBoundsFromState(source, tilePos).translate(tilePos.x(), tilePos.y(), tilePos.z(), new AABBd());
     }
 
     @Override
-    public @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public @Nullable BoundingVolume getBoundingVolume(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull AABBdc aabb, final @NotNull List<@NotNull AABBdc> aabbList) {
         this.addIntersectingBoundingBox(aabb, this.getCollisionAABB(world, tilePos), aabbList);
     }
 
-    protected void addIntersectingBoundingBox(final @NotNull AABB sourceAABB, final @Nullable AABB aabbToAdd, final @NotNull List<@NotNull AABB> aabbList) {
-        if (aabbToAdd != null && sourceAABB.intersects(aabbToAdd)) {
+    protected void addIntersectingBoundingBox(final @NotNull AABBdc sourceAABB, final @Nullable AABBdc aabbToAdd, final @NotNull List<@NotNull AABBdc> aabbList) {
+        if (aabbToAdd != null && sourceAABB.intersectsAABB((AABBd) aabbToAdd)) { // TODO idk why JOML takes an AABBd instead of an AABBdc here, note for something in a potential fork
             aabbList.add(aabbToAdd);
         }
     }
 
     @Override
-    public boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(final @NotNull Entity entity, final @NotNull World world, final @NotNull TilePosc tilePos) {
         return true;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        return this.getBoundsFromState(source, tilePos).move(tilePos.x, tilePos.y, tilePos.z);
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        return this.getBoundsFromState(source, tilePos).translate(tilePos.x(), tilePos.y(), tilePos.z(), new AABBd());
     }
 
     @Override
@@ -190,13 +193,13 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) { }
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) { }
 
     @Override
-    public void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) { }
+    public void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) { }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) { }
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) { }
 
     @Override
     public int tickDelay() {
@@ -204,16 +207,16 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) { }
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) { }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) { }
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) { }
 
     @Override
-    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) { }
+    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) { }
 
     @Override
-    public float getStrength(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Player player) {
+    public float getStrength(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Player player) {
         if (this.block.blockHardness < 0.0F) {
             return 0.0F;
         }
@@ -236,23 +239,23 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePos tilePos, @NotNull Vec3 start, @NotNull Vec3 end, final boolean useSelectionAABB) {
-        final @NotNull AABB bounds;
+    public @Nullable HitResult collisionRayTrace(final @NotNull World world, final @NotNull TilePosc tilePos, @NotNull Vector3dc start, @NotNull Vector3dc end, final boolean useSelectionAABB) {
+        final @NotNull AABBdc bounds;
         if (useSelectionAABB) {
-            bounds = this.getSelectionAABB(world, tilePos).move(-tilePos.x, -tilePos.y, -tilePos.z);
+            bounds = this.getSelectionAABB(world, tilePos).translate(-tilePos.x(), -tilePos.y(), -tilePos.z(), new AABBd());
         } else {
             bounds = this.getBoundsFromState(world, tilePos);
         }
 
-        start = start.add(-tilePos.x, -tilePos.y, -tilePos.z);
-        end = end.add(-tilePos.x, -tilePos.y, -tilePos.z);
+        Vector3d startInBlock = start.add(-tilePos.x(), -tilePos.y(), -tilePos.z(), new Vector3d());
+        Vector3d endInBlock = end.add(-tilePos.x(), -tilePos.y(), -tilePos.z(), new Vector3d());
 
-        @Nullable Vec3 minVX = start.clipX(end, bounds.minX);
-        @Nullable Vec3 maxVX = start.clipX(end, bounds.maxX);
-        @Nullable Vec3 minVY = start.clipY(end, bounds.minY);
-        @Nullable Vec3 maxVY = start.clipY(end, bounds.maxY);
-        @Nullable Vec3 minVZ = start.clipZ(end, bounds.minZ);
-        @Nullable Vec3 maxVZ = start.clipZ(end, bounds.maxZ);
+        @Nullable Vector3d minVX = MathHelper.vecClipX(startInBlock, endInBlock, bounds.minX(), new Vector3d());
+        @Nullable Vector3d maxVX = MathHelper.vecClipX(startInBlock, endInBlock, bounds.maxX(), new Vector3d());
+        @Nullable Vector3d minVY = MathHelper.vecClipY(startInBlock, endInBlock, bounds.minY(), new Vector3d());
+        @Nullable Vector3d maxVY = MathHelper.vecClipY(startInBlock, endInBlock, bounds.maxY(), new Vector3d());
+        @Nullable Vector3d minVZ = MathHelper.vecClipZ(startInBlock, endInBlock, bounds.minZ(), new Vector3d());
+        @Nullable Vector3d maxVZ = MathHelper.vecClipZ(startInBlock, endInBlock, bounds.maxZ(), new Vector3d());
 
         if (!this.isVecInsideYZBounds(bounds, minVX)) minVX = null;
         if (!this.isVecInsideYZBounds(bounds, maxVX)) maxVX = null;
@@ -261,23 +264,26 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
         if (!this.isVecInsideXYBounds(bounds, minVZ)) minVZ = null;
         if (!this.isVecInsideXYBounds(bounds, maxVZ)) maxVZ = null;
 
-        @Nullable Vec3 clip = null;
-        if (minVX != null && (clip == null || start.distanceToSquared(minVX) < start.distanceToSquared(clip))) {
+        @Nullable Vector3d clip = null;
+//        if (minVX != null && (clip == null || startInBlock.distanceSquared(minVX) < startInBlock.distanceSquared(clip))) {
+//            clip = minVX;
+//        }
+        if (minVX != null) {
             clip = minVX;
         }
-        if (maxVX != null && (clip == null || start.distanceToSquared(maxVX) < start.distanceToSquared(clip))) {
+        if (maxVX != null && (clip == null || startInBlock.distanceSquared(maxVX) < startInBlock.distanceSquared(clip))) {
             clip = maxVX;
         }
-        if (minVY != null && (clip == null || start.distanceToSquared(minVY) < start.distanceToSquared(clip))) {
+        if (minVY != null && (clip == null || startInBlock.distanceSquared(minVY) < startInBlock.distanceSquared(clip))) {
             clip = minVY;
         }
-        if (maxVY != null && (clip == null || start.distanceToSquared(maxVY) < start.distanceToSquared(clip))) {
+        if (maxVY != null && (clip == null || startInBlock.distanceSquared(maxVY) < startInBlock.distanceSquared(clip))) {
             clip = maxVY;
         }
-        if (minVZ != null && (clip == null || start.distanceToSquared(minVZ) < start.distanceToSquared(clip))) {
+        if (minVZ != null && (clip == null || startInBlock.distanceSquared(minVZ) < startInBlock.distanceSquared(clip))) {
             clip = minVZ;
         }
-        if (maxVZ != null && (clip == null || start.distanceToSquared(maxVZ) < start.distanceToSquared(clip))) {
+        if (maxVZ != null && (clip == null || startInBlock.distanceSquared(maxVZ) < startInBlock.distanceSquared(clip))) {
             clip = maxVZ;
         }
 
@@ -298,67 +304,67 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
             side = Side.SOUTH;
         }
 
-        return new HitResult.Tile(tilePos, side, clip.add(tilePos.x, tilePos.y, tilePos.z));
+        return new HitResult.Tile(tilePos, side, clip.add(tilePos.x(), tilePos.y(), tilePos.z()));
     }
 
-    private boolean isVecInsideYZBounds(final @NotNull AABB bounds, final @Nullable Vec3 v) {
+    private boolean isVecInsideYZBounds(final @NotNull AABBdc bounds, final @Nullable Vector3dc v) {
         if (v == null) {
             return false;
         }
-        return v.y >= bounds.minY && v.y <= bounds.maxY && v.z >= bounds.minZ && v.z <= bounds.maxZ;
+        return v.y() >= bounds.minY() && v.y() <= bounds.maxY() && v.z() >= bounds.minZ() && v.z() <= bounds.maxZ();
     }
 
-    private boolean isVecInsideXZBounds(final @NotNull AABB bounds, final @Nullable Vec3 v) {
+    private boolean isVecInsideXZBounds(final @NotNull AABBdc bounds, final @Nullable Vector3dc v) {
         if (v == null) {
             return false;
         }
-        return v.x >= bounds.minX && v.x <= bounds.maxX && v.z >= bounds.minZ && v.z <= bounds.maxZ;
+        return v.x() >= bounds.minX() && v.x() <= bounds.maxX() && v.z() >= bounds.minZ() && v.z() <= bounds.maxZ();
     }
 
-    private boolean isVecInsideXYBounds(final @NotNull AABB bounds, final @Nullable Vec3 v) {
+    private boolean isVecInsideXYBounds(final @NotNull AABBdc bounds, final @Nullable Vector3dc v) {
         if (v == null) {
             return false;
         }
-        return v.x >= bounds.minX && v.x <= bounds.maxX && v.y >= bounds.minY && v.y <= bounds.maxY;
+        return v.x() >= bounds.minX() && v.x() <= bounds.maxX() && v.y() >= bounds.minY() && v.y() <= bounds.maxY();
     }
 
     @Override
-    public void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePos tilePos) { }
+    public void onDestroyedByExplosion(final @NotNull World world, final @NotNull TilePosc tilePos) { }
 
     @Override
-    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.canPlaceAt(world, tilePos);
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return world.canPlaceInsideBlock(tilePos);
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         return false;
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) { }
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) { }
 
     @Override
-    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity walker) { }
+    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity walker) { }
 
     @Override
-    public void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) { }
+    public void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) { }
 
     @Override
-    public void onEntityInside(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity, final @NotNull Vec3 velocity) { }
+    public void onEntityInside(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity, final @NotNull Vector3d velocityDirection) { }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.getBounds();
     }
 
     @Override
-    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return false;
     }
 
@@ -368,15 +374,15 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity) { }
+    public void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity) { }
 
     @Override
-    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return false;
     }
 
     @Override
-    public void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity) {
+    public void onHarvest(final @NotNull World world, final @NotNull Player player, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity) {
         player.addStat(Objects.requireNonNull(this.block.getStat(StatList.STAT_MINED)), 1);
 
         final @Nullable ItemStack heldItemStack = player.inventory.getCurrentItem();
@@ -406,7 +412,7 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePos tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player) {
+    public void dropWithCause(final @NotNull World world, final @NotNull EnumDropCause dropCause, final @NotNull TilePosc tilePos, final int data, final @Nullable TileEntity tileEntity, final @Nullable Player player) {
         if (world.isClientSide)
             return;
 
@@ -435,22 +441,22 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return FullSupport.INSTANCE;
     }
 
     @Override
-    public boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return true;
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         this.onPlacedOnSide(world, tilePos, side, xHit, yHit);
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) { }
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) { }
 
     @Override
     public @NotNull String getLanguageKey(final int data) {
@@ -458,25 +464,25 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public void triggerEvent(final @NotNull World world, final @NotNull TilePos tilePos, final int index, final int data) { }
+    public void triggerEvent(final @NotNull World world, final @NotNull TilePosc tilePos, final int index, final int data) { }
 
     @Override
-    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.material.getPushReaction();
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return 0;
     }
 
     @Override
-    public boolean isClimbable(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean isClimbable(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return false;
     }
 
     @Override
-    public boolean isEquivalent(final @NotNull World world, final @NotNull TilePos thisPos, final @NotNull TilePos thatPos) {
+    public boolean isEquivalent(final @NotNull World world, final @NotNull TilePosc thisPos, final @NotNull TilePosc thatPos) {
         final @Nullable Block<?> bBlock = world.getBlock(thatPos);
 
         final int thisMeta = world.getBlockData(thisPos);
@@ -486,7 +492,7 @@ public class BlockLogic implements BlockInterface, IItemConvertible {
     }
 
     @Override
-    public @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull Side getAttachedSide(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return Side.NONE;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicActivator.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicActivator.java
index 225082aa5..3d92fcdec 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicActivator.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicActivator.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
@@ -11,6 +11,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -22,7 +23,7 @@ public class BlockLogicActivator
     public static final int MASK_POWERED = 0b0000_1000;
 
     public BlockLogicActivator(final @NotNull Block<?> block) {
-        super(block, Material.netherrack);
+        super(block, Materials.NETHERRACK);
         block.withEntity(TileEntityActivator::new);
     }
 
@@ -32,7 +33,7 @@ public class BlockLogicActivator
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (!world.isClientSide) {
             final @NotNull TileEntityActivator tileEntityActivator = (TileEntityActivator) Objects.requireNonNull(world.getTileEntity(tilePos));
             player.displayActivatorScreen(tileEntityActivator);
@@ -40,7 +41,7 @@ public class BlockLogicActivator
         return true;
     }
 
-    private void useItem(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random random) {
+    private void useItem(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random random) {
         final @NotNull Direction direction = BlockLogicRotatable.getDirectionFromMeta(world.getBlockData(tilePos));
 
         final @NotNull TileEntityActivator activator = (TileEntityActivator) Objects.requireNonNull(world.getTileEntity(tilePos));
@@ -52,18 +53,18 @@ public class BlockLogicActivator
             final double pz = direction.getOffsetZ() * 0.6D + 0.5D;
 
             if (itemStack == null) {
-                final @Nullable Block<?> block = world.getBlock(tilePos.add(direction));
+                final @Nullable Block<?> block = world.getBlock(tilePos.add(direction, new TilePos()));
 
                 if (block != null) {
-                    block.onActivatorInteracted(world, tilePos.add(direction), activator, direction);
+                    block.onActivatorInteracted(world, tilePos.add(direction, new TilePos()), activator, direction);
                 } else {
-                    world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x, tilePos.y, tilePos.z, "tile.activator.click", 1, 1);
+                    world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x(), tilePos.y(), tilePos.z(), "tile.activator.click", 1, 1);
                 }
             } else {
                 final @NotNull Item item = itemStack.getItem();
                 item.onUseByActivator(itemStack, world, activator, random, tilePos, direction, px, py, pz);
                 activator.nullDeadItems();
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x, tilePos.y, tilePos.z, "tile.activator.use", 1, 1);
+                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x(), tilePos.y(), tilePos.z(), "tile.activator.use", 1, 1);
                 world.playBlockEvent(tilePos, LevelListener.EVENT_DISPENSER_PARTICLES, direction.getId());
             }
         } else {
@@ -72,7 +73,7 @@ public class BlockLogicActivator
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         final int meta = world.getBlockData(tilePos);
         final boolean hasSignal = this.getNeighborSignal(world, tilePos, BlockLogicRotatable.getDirectionFromMeta(meta));
         final boolean isPowered = (meta & MASK_POWERED) != 0;
@@ -86,27 +87,28 @@ public class BlockLogicActivator
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         this.useItem(world, tilePos, rand);
     }
 
-    private boolean getNeighborSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Direction direction) {
-        if (direction != Direction.DOWN && world.hasSignal(tilePos.down(), Side.BOTTOM)) {
+    private boolean getNeighborSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Direction direction) {
+        TilePos queryPos = new TilePos();
+        if (direction != Direction.DOWN && world.hasSignal(tilePos.add(Direction.DOWN, queryPos), Side.BOTTOM)) {
             return true;
         }
-        if (direction != Direction.UP && world.hasSignal(tilePos.up(), Side.TOP)) {
+        if (direction != Direction.UP && world.hasSignal(tilePos.add(Direction.UP, queryPos), Side.TOP)) {
             return true;
         }
-        if (direction != Direction.NORTH && world.hasSignal(tilePos.north(), Side.NORTH)) {
+        if (direction != Direction.NORTH && world.hasSignal(tilePos.add(Direction.NORTH, queryPos), Side.NORTH)) {
             return true;
         }
-        if (direction != Direction.SOUTH && world.hasSignal(tilePos.south(), Side.SOUTH)) {
+        if (direction != Direction.SOUTH && world.hasSignal(tilePos.add(Direction.SOUTH, queryPos), Side.SOUTH)) {
             return true;
         }
-        if (direction != Direction.EAST && world.hasSignal(tilePos.east(), Side.EAST)) {
+        if (direction != Direction.EAST && world.hasSignal(tilePos.add(Direction.EAST, queryPos), Side.EAST)) {
             return true;
         }
-        if (direction != Direction.WEST && world.hasSignal(tilePos.west(), Side.WEST)) {
+        if (direction != Direction.WEST && world.hasSignal(tilePos.add(Direction.WEST, queryPos), Side.WEST)) {
             return true;
         }
         return world.hasSignal(tilePos, Side.BOTTOM);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAlgae.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAlgae.java
index 4f02470ae..f486b5089 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAlgae.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAlgae.java
@@ -10,15 +10,17 @@ import net.minecraft.core.entity.vehicle.EntityBoat;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IBonemealable;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -32,7 +34,7 @@ public class BlockLogicAlgae
     }
 
     @Override
-    public void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity) {
+    public void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity) {
         if (entity instanceof EntityBoat) {
             world.playBlockEvent(null, tilePos, LevelListener.EVENT_BLOCK_BREAK, this.block.id());
             world.setBlockIdNotify(tilePos, 0);
@@ -40,20 +42,20 @@ public class BlockLogicAlgae
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int blockId = world.getBlockId(tilePos);
-        return blockId == 0 && Blocks.hasTag(world.getBlockId(tilePos.down()), BlockTags.IS_WATER) && world.getBlockData(tilePos.down()) == 0;
+        return blockId == 0 && Blocks.hasTag(world.getBlockId(tilePos.add(Direction.DOWN, new TilePos())), BlockTags.IS_WATER) && world.getBlockData(tilePos.add(Direction.DOWN, new TilePos())) == 0;
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
-        if (!Blocks.hasTag(world.getBlockId(tilePos.down()), BlockTags.IS_WATER) || world.getBlockData(tilePos.down()) != 0) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
+        if (!Blocks.hasTag(world.getBlockId(tilePos.add(Direction.DOWN, new TilePos())), BlockTags.IS_WATER) || world.getBlockData(tilePos.add(Direction.DOWN, new TilePos())) != 0) {
             world.setBlockId(tilePos, 0);
         }
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -68,47 +70,50 @@ public class BlockLogicAlgae
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
     public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final int data, final @Nullable TileEntity tileEntity) {
         return switch (dropCause) {
-            case SILK_TOUCH, PICK_BLOCK -> new ItemStack[] { new ItemStack(this.block) };
+            case SILK_TOUCH, PICK_BLOCK -> new ItemStack[]{new ItemStack(this.block)};
             default -> null;
         };
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final @NotNull Random rand = world.rand;
 
         if (!world.isClientSide) {
             if (player == null || player.getGamemode().consumeBlocks()) {
                 itemStack.stackSize--;
             }
-            label0:
+            TilePos queryPos = new TilePos();
+            outer:
             for (int i = 0; i < 128; i++) {
-                final @NotNull TilePos localPos = new TilePos(tilePos);
+                int checkX = tilePos.x();
+                int checkY = tilePos.y();
+                int checkZ = tilePos.z();
                 for (int j = 0; j < i / 16; j++) {
-                    localPos.x += rand.nextInt(3) - 1;
-                    localPos.z += rand.nextInt(3) - 1;
-                    final int bId = world.getBlockId(localPos.down());
-                    final int bMeta = world.getBlockData(localPos.down());
+                    checkX += rand.nextInt(3) - 1;
+                    checkZ += rand.nextInt(3) - 1;
+                    final int bId = world.getBlockId(queryPos.set(checkX, checkY - 1, checkZ));
+                    final int bMeta = world.getBlockData(queryPos.set(checkX, checkY - 1, checkZ));
                     if (bId != Blocks.FLUID_WATER_FLOWING.id() && bId != Blocks.FLUID_WATER_STILL.id()) {
-                        continue label0;
+                        continue outer;
                     }
                     if (bMeta != 0) {
-                        continue label0;
+                        continue outer;
                     }
                 }
 
-                if (world.getBlockId(localPos) != 0) {
+                if (world.getBlockId(queryPos.set(checkX, checkY, checkZ)) != 0) {
                     continue;
                 }
                 if (rand.nextFloat() > 0.75) {
-                    world.setBlockIdNotify(localPos, this.block.id());
+                    world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
                 }
             }
             return true;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAsh.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAsh.java
index c60741c04..8db54e008 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAsh.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAsh.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
@@ -12,7 +12,7 @@ public class BlockLogicAsh
     extends BlockLogic {
 
     public BlockLogicAsh(final @NotNull Block<?> block) {
-        super(block, Material.ash);
+        super(block, Materials.ASH);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAxisAligned.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAxisAligned.java
index e557431c6..5305375e2 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicAxisAligned.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicAxisAligned.java
@@ -6,7 +6,7 @@ import net.minecraft.core.enums.PlacementMode;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicAxisAligned
@@ -18,14 +18,14 @@ public class BlockLogicAxisAligned
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         final @NotNull Axis axis = mob.getPlacementDirection(side, PlacementMode.SIDE).getAxis();
 
         world.setBlockDataNotify(tilePos, axisToMeta(axis));
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final @NotNull Axis axis = side.getAxis();
 
         world.setBlockDataNotify(tilePos, axisToMeta(axis));
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBasket.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBasket.java
index 701d1cfb7..62c083fdc 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBasket.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBasket.java
@@ -17,6 +17,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -29,7 +30,7 @@ public class BlockLogicBasket extends BlockLogic {
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         final @NotNull TileEntityBasket tileEntity = (TileEntityBasket) Objects.requireNonNull(world.getTileEntity(tilePos));
 
         if (tileEntity.getNumUnitsInside() > 0) {
@@ -42,11 +43,11 @@ public class BlockLogicBasket extends BlockLogic {
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         final @NotNull TileEntityBasket tileEntity = (TileEntityBasket) Objects.requireNonNull(world.getTileEntity(tilePos));
 
         if (tileEntity.getNumUnitsInside() > 0) {
-            tileEntity.dropContents(world, tilePos.x, tilePos.y, tilePos.z);
+            tileEntity.dropContents(world, tilePos.x(), tilePos.y(), tilePos.z());
         }
     }
 
@@ -56,7 +57,7 @@ public class BlockLogicBasket extends BlockLogic {
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side == Side.TOP) {
             return PartialSupport.INSTANCE;
         } else {
@@ -64,7 +65,7 @@ public class BlockLogicBasket extends BlockLogic {
         }
     }
 
-    public int getFillLevel(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public int getFillLevel(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final @NotNull TileEntityBasket tileEntity = (TileEntityBasket) Objects.requireNonNull(source.getTileEntity(tilePos));
 
         final float fill = MathHelper.clamp(tileEntity.getNumUnitsInside() / (float) tileEntity.getMaxUnits(), 0, 1); // Clamps the visual effect even if the basket gets overstuffed
@@ -89,27 +90,29 @@ public class BlockLogicBasket extends BlockLogic {
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
-        for (final @NotNull Side s : Side.sides) {
-            world.notifyBlocksOfNeighborChange(tilePos.add(s.getDirection()), this.id());
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        for (final @NotNull Direction d : Direction.directions) {
+            world.notifyBlocksOfNeighborChange(tilePos.add(d, queryPos), this.id());
         }
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
-        for (final @NotNull Side s : Side.sides) {
-            world.notifyBlocksOfNeighborChange(tilePos.add(s.getDirection()), this.id());
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
+        TilePos queryPos = new TilePos();
+        for (final @NotNull Direction d : Direction.directions) {
+            world.notifyBlocksOfNeighborChange(tilePos.add(d, queryPos), this.id());
         }
     }
 
     @Override
-    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         final @NotNull TileEntityBasket tileEntity = (TileEntityBasket) Objects.requireNonNull(source.getTileEntity(tilePos));
         return tileEntity.getNumUnitsInside() >= tileEntity.getMaxUnits();
     }
 
     @Override
-    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return this.isEmittingSignal(world, tilePos, side);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBed.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBed.java
index 26810fb9b..9fd2d1fb9 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBed.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBed.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.achievement.Achievements;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
@@ -12,8 +13,8 @@ import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -23,26 +24,26 @@ public class BlockLogicBed
     extends BlockLogic {
 
     public BlockLogicBed(final @NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
         this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5625F, 1.0F);
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (world.isClientSide) {
             return true;
         }
 
         int data = world.getBlockData(tilePos);
-        final @NotNull TilePos headPos;
-        final @NotNull TilePos footPos;
+        final @NotNull TilePosc headPos;
+        final @NotNull TilePosc footPos;
         if (!isBlockFootOfBed(data)) {
             final int dir = getDirection(data);
             headPos = tilePos;
-            footPos = tilePos.add(headBlockToFootBlockMap[dir].getDirection());
+            footPos = tilePos.add(headBlockToFootBlockMap[dir].getDirection(), new TilePos());
         } else {
             final int dir = getDirection(data);
-            headPos = tilePos.sub(headBlockToFootBlockMap[dir].getDirection());
+            headPos = tilePos.sub(headBlockToFootBlockMap[dir].getDirection(), new TilePos());
             footPos = tilePos;
         }
 
@@ -61,7 +62,7 @@ public class BlockLogicBed
                 world.setBlockIdNotify(footPos, 0);
             }
             player.addStat(Achievements.SLEEP_NETHER, 1);
-            world.createExplosion(null, tilePos.x + 0.5F, tilePos.y + 0.5F, tilePos.z + 0.5F, 5F, true, false);
+            world.createExplosion(null, tilePos.x() + 0.5F, tilePos.y() + 0.5F, tilePos.z() + 0.5F, 5F, true, false);
             return true;
         }
 
@@ -85,7 +86,7 @@ public class BlockLogicBed
         }
 
         // Sleep
-        if (player.sleepInBedAt(footPos.x, footPos.y, footPos.z) == EnumSleepStatus.OK) {
+        if (player.sleepInBedAt(footPos.x(), footPos.y(), footPos.z()) == EnumSleepStatus.OK) {
             setBedOccupied(world, footPos, true);
             return true;
         }
@@ -104,39 +105,39 @@ public class BlockLogicBed
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         this.removeOtherHalf(world, tilePos);
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         this.removeOtherHalf(world, tilePos);
     }
 
-    protected void removeOtherHalf(final @NotNull World world, final @NotNull TilePos tilePos) {
+    protected void removeOtherHalf(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int data = world.getBlockData(tilePos);
         final int direction = getDirection(data);
         if (isBlockFootOfBed(data)) {
-            if (world.getBlockId(tilePos.sub(headBlockToFootBlockMap[direction].getDirection())) != this.block.id()) {
+            if (world.getBlockId(tilePos.sub(headBlockToFootBlockMap[direction].getDirection(), new TilePos())) != this.block.id()) {
                 world.setBlockIdNotify(tilePos, 0);
             }
-        } else if (world.getBlockId(tilePos.add(headBlockToFootBlockMap[direction].getDirection())) != this.block.id()) {
+        } else if (world.getBlockId(tilePos.add(headBlockToFootBlockMap[direction].getDirection(), new TilePos())) != this.block.id()) {
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
     @Override
     public ItemStack[] getBreakResult(@NotNull final World world, @NotNull final EnumDropCause dropCause, final int data, final @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Items.BED) };
+        return new ItemStack[]{new ItemStack(Items.BED)};
     }
 
     @Override
-    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
@@ -156,7 +157,7 @@ public class BlockLogicBed
         return meta & MASK_DIRECTION;
     }
 
-    public static void setBedOccupied(final @NotNull World world, final @NotNull TilePos tilePos, final boolean flag) {
+    public static void setBedOccupied(final @NotNull World world, final @NotNull TilePosc tilePos, final boolean flag) {
         int l = world.getBlockData(tilePos);
         if (flag) {
             l |= MASK_IS_OCCUPIED;
@@ -176,18 +177,21 @@ public class BlockLogicBed
                 tilePos.y,
                 tilePos.z - headBlockToFootBlockMap[direction].getOffsetZ() * d - 1
             );
-            final @NotNull TilePos maxPos = minPos.add(2, 0, 2);
-            final @NotNull TilePos pos = new TilePos(minPos);
-            for (pos.x = minPos.x; pos.x <= maxPos.x; pos.x++) {
-                for (pos.z = minPos.z; pos.z <= maxPos.z; pos.z++) {
-                    if (!world.isBlockNormalCube(pos.down()) || !world.isAirBlock(pos) || !world.isAirBlock(pos.up())) {
+            final @NotNull TilePos maxPos = minPos.add(2, 0, 2, new TilePos());
+
+            final @NotNull TilePos queryPos = new TilePos();
+            for (int x = minPos.x; x <= maxPos.x; x++) {
+                for (int z = minPos.z; z <= maxPos.z; z++) {
+                    if (!world.isBlockNormalCube(queryPos.set(x, minPos.y - 1, z)) ||
+                        !world.isAirBlock(queryPos.set(x, minPos.y, z)) ||
+                        !world.isAirBlock(queryPos.set(x, minPos.y + 1, z))) {
                         continue;
                     }
 
                     if (attempts > 0) {
                         attempts--;
                     } else {
-                        return pos;
+                        return queryPos.set(x, minPos.y, z);
                     }
                 }
 
@@ -217,10 +221,10 @@ public class BlockLogicBed
     };
 
     public static final @NotNull Side @NotNull [] headBlockToFootBlockMap =
-    {
-        Side.SOUTH,
-        Side.WEST,
-        Side.NORTH,
-        Side.EAST
-    };
+        {
+            Side.SOUTH,
+            Side.WEST,
+            Side.NORTH,
+            Side.EAST
+        };
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBedrock.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBedrock.java
index a084d321f..b45fac098 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBedrock.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBedrock.java
@@ -1,9 +1,11 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicBedrock
@@ -13,8 +15,8 @@ public class BlockLogicBedrock
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
-        if (world.getBlock(tilePos.down()) == Blocks.GLOWSTONE) {
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        if (world.getBlock(tilePos.add(Direction.DOWN, new TilePos())) == Blocks.GLOWSTONE) {
             Blocks.PORTAL_DRIFT.getLogic().tryToCreatePortal(world, tilePos, DyeColor.SILVER);
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBoneShale.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBoneShale.java
index ceb0f8504..761c1bcd3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBoneShale.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBoneShale.java
@@ -5,7 +5,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicBoneShale
@@ -15,7 +15,7 @@ public class BlockLogicBoneShale
     }
 
     @Override
-    public float getStrength(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Player player) {
+    public float getStrength(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Player player) {
         final int data = world.getBlockData(tilePos);
         final @NotNull Direction direction = BlockLogicFullyRotatable.metaToDirection(data);
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBrazier.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBrazier.java
index d71aa9d1b..277f90080 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicBrazier.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicBrazier.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -15,6 +15,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -25,7 +26,7 @@ public class BlockLogicBrazier
     private final boolean burning;
 
     public BlockLogicBrazier(final @NotNull Block<?> block, final boolean burning) {
-        super(block, Material.metal);
+        super(block, Materials.METAL);
         this.burning = burning;
     }
 
@@ -44,7 +45,7 @@ public class BlockLogicBrazier
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side == Side.BOTTOM) {
             return FullSupport.INSTANCE;
         } else {
@@ -58,19 +59,20 @@ public class BlockLogicBrazier
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         final @Nullable ItemStack heldItem = player.getHeldItem();
         if (heldItem != null && heldItem.getItem() instanceof ItemFireStriker && !this.burning) {
+            TilePos queryPos = new TilePos();
             Block<?> b;
-            if ((b = world.getBlock(tilePos.east())) != null && b.getLogic() instanceof BlockLogicFluid ||
-                (b = world.getBlock(tilePos.west())) != null && b.getLogic() instanceof BlockLogicFluid ||
-                (b = world.getBlock(tilePos.south())) != null && b.getLogic() instanceof BlockLogicFluid ||
-                (b = world.getBlock(tilePos.north())) != null && b.getLogic() instanceof BlockLogicFluid) {
+            if ((b = world.getBlock(tilePos.add(Direction.EAST, queryPos))) != null && b.getLogic() instanceof BlockLogicFluid ||
+                (b = world.getBlock(tilePos.add(Direction.WEST, queryPos))) != null && b.getLogic() instanceof BlockLogicFluid ||
+                (b = world.getBlock(tilePos.add(Direction.SOUTH, queryPos))) != null && b.getLogic() instanceof BlockLogicFluid ||
+                (b = world.getBlock(tilePos.add(Direction.NORTH, queryPos))) != null && b.getLogic() instanceof BlockLogicFluid) {
                 return false;
             }
             world.setBlockIdDataNotify(tilePos, Blocks.BRAZIER_ACTIVE.id(), 0);
             heldItem.damageItem(1, player);
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
             return true;
         }
         if (heldItem == null && this.burning) {
@@ -82,21 +84,21 @@ public class BlockLogicBrazier
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         if (this.burning) {
             world.setBlockIdDataNotify(tilePos, Blocks.BRAZIER_INACTIVE.id(), 0);
         }
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         if (this.burning) {
             Blocks.FIRE.onRemoved(world, tilePos, data);
         }
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         if (!this.burning) return;
         final @Nullable Block<?> block = Blocks.blocksList[id];
         if (block != null && block.getLogic() instanceof BlockLogicFluid) {
@@ -105,7 +107,7 @@ public class BlockLogicBrazier
     }
 
     @Override
-    public void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         if (this.burning) {
             Blocks.FIRE.animationTick(world, tilePos, rand);
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButton.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButton.java
index 96fa28c72..6fbd9ad9e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButton.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButton.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -14,12 +14,14 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -36,12 +38,12 @@ public class BlockLogicButton
     public static final int SIDE_BOTTOM = 6;
 
     public BlockLogicButton(final @NotNull Block<?> block) {
-        super(block, Material.decoration);
+        super(block, Materials.DECORATION);
         block.setTicking(true);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -61,18 +63,18 @@ public class BlockLogicButton
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean canPlaceOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         final @NotNull Side checkSide = side.getOpposite();
         return this.isSupported(world, tilePos, checkSide);
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.isSupported(world, tilePos, Side.BOTTOM)
             || this.isSupported(world, tilePos, Side.TOP)
             || this.isSupported(world, tilePos, Side.NORTH)
@@ -82,7 +84,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         int orientation = -1;
         switch (side) {
             case BOTTOM:
@@ -126,7 +128,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, @NotNull Side side, final double xHit, final double yHit) {
         int orientation = -1;
         if (side.isHorizontal()) {
             side = side.getOpposite();
@@ -172,7 +174,7 @@ public class BlockLogicButton
         }
     }
 
-    private int getOrientation(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private int getOrientation(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (this.isSupported(world, tilePos, Side.WEST)) {
             return SIDE_WEST;
         }
@@ -195,7 +197,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         final boolean invalid;
         final int meta = world.getBlockData(tilePos);
         final int side = meta & MASK_DIRECTION;
@@ -215,32 +217,32 @@ public class BlockLogicButton
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final int meta = source.getBlockData(tilePos);
         final int direction = meta & MASK_DIRECTION;
         final boolean powered = (meta & MASK_POWERED) != 0;
-        final float bottom = 0.375F;
-        final float top = 0.625F;
-        final float halfWidth = 0.1875F;
-        final float depth;
+        final double bottom = 0.375;
+        final double top = 0.625;
+        final double halfWidth = 0.1875;
+        final double depth;
         if (powered) {
-            depth = 0.0625F;
+            depth = 0.0625;
         } else {
-            depth = 0.125F;
+            depth = 0.125;
         }
         return switch (direction) {
-            case SIDE_WEST -> AABB.fromPool(0.0F, bottom, 0.5F - halfWidth, depth, top, 0.5F + halfWidth);
-            case SIDE_EAST -> AABB.fromPool(1.0F - depth, bottom, 0.5F - halfWidth, 1.0F, top, 0.5F + halfWidth);
-            case SIDE_NORTH -> AABB.fromPool(0.5F - halfWidth, bottom, 0.0F, 0.5F + halfWidth, top, depth);
-            case SIDE_SOUTH -> AABB.fromPool(0.5F - halfWidth, bottom, 1.0F - depth, 0.5F + halfWidth, top, 1.0F);
-            case SIDE_TOP -> AABB.fromPool(0.5f - halfWidth, 1 - depth, bottom, 0.5f + halfWidth, 1.0, top);
-            case SIDE_BOTTOM -> AABB.fromPool(0.5f - halfWidth, 0, bottom, 0.5f + halfWidth, depth, top);
+            case SIDE_WEST -> new AABBd(0.0, bottom, 0.5 - halfWidth, depth, top, 0.5 + halfWidth);
+            case SIDE_EAST -> new AABBd(1.0 - depth, bottom, 0.5 - halfWidth, 1.0, top, 0.5F + halfWidth);
+            case SIDE_NORTH -> new AABBd(0.5 - halfWidth, bottom, 0.0, 0.5F + halfWidth, top, depth);
+            case SIDE_SOUTH -> new AABBd(0.5 - halfWidth, bottom, 1.0 - depth, 0.5 + halfWidth, top, 1.0);
+            case SIDE_TOP -> new AABBd(0.5 - halfWidth, 1 - depth, bottom, 0.5 + halfWidth, 1.0, top);
+            case SIDE_BOTTOM -> new AABBd(0.5 - halfWidth, 0, bottom, 0.5 + halfWidth, depth, top);
             default -> super.getBoundsFromState(source, tilePos);
         };
     }
 
     @Override
-    public void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
         if (!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
             this.onInteracted(world, tilePos, player, null, 0.0, 0.0);
         }
@@ -248,11 +250,11 @@ public class BlockLogicButton
 
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         return this.press(world, tilePos, player);
     }
 
-    private boolean press(final @NotNull World world, final @NotNull TilePos tilePos, final @Nullable Player player) {
+    private boolean press(final @NotNull World world, final @NotNull TilePosc tilePos, final @Nullable Player player) {
         final int meta = world.getBlockData(tilePos);
         final int direction = meta & MASK_DIRECTION;
         final boolean isPowered = (meta & MASK_POWERED) != 0;
@@ -261,27 +263,27 @@ public class BlockLogicButton
         }
         world.setBlockDataNotify(tilePos, (meta & ~MASK_DIRECTION) | direction | MASK_POWERED);
         world.markBlockDirty(tilePos);
-        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "random.click", 0.3F, 0.6F);
+        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "random.click", 0.3F, 0.6F);
         world.notifyBlocksOfNeighborChange(tilePos, this.block.id());
 
         switch (direction) {
             case SIDE_WEST:
-                world.notifyBlocksOfNeighborChange(tilePos.west(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.WEST, new TilePos()), this.block.id());
                 break;
             case SIDE_EAST:
-                world.notifyBlocksOfNeighborChange(tilePos.east(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.EAST, new TilePos()), this.block.id());
                 break;
             case SIDE_NORTH:
-                world.notifyBlocksOfNeighborChange(tilePos.north(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.NORTH, new TilePos()), this.block.id());
                 break;
             case SIDE_SOUTH:
-                world.notifyBlocksOfNeighborChange(tilePos.south(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.SOUTH, new TilePos()), this.block.id());
                 break;
             case SIDE_TOP:
-                world.notifyBlocksOfNeighborChange(tilePos.up(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.UP, new TilePos()), this.block.id());
                 break;
             case SIDE_BOTTOM:
-                world.notifyBlocksOfNeighborChange(tilePos.down(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.DOWN, new TilePos()), this.block.id());
                 break;
         }
         world.scheduleBlockUpdate(tilePos, this.block.id(), this.tickDelay());
@@ -289,33 +291,33 @@ public class BlockLogicButton
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         this.press(world, tilePos, null);
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         if ((data & MASK_POWERED) != 0) {
             world.notifyBlocksOfNeighborChange(tilePos, this.block.id());
             final int direction = data & MASK_DIRECTION;
             switch (direction) {
                 case SIDE_WEST:
-                    world.notifyBlocksOfNeighborChange(tilePos.west(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.WEST, new TilePos()), this.block.id());
                     break;
                 case SIDE_EAST:
-                    world.notifyBlocksOfNeighborChange(tilePos.east(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.EAST, new TilePos()), this.block.id());
                     break;
                 case SIDE_NORTH:
-                    world.notifyBlocksOfNeighborChange(tilePos.north(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.NORTH, new TilePos()), this.block.id());
                     break;
                 case SIDE_SOUTH:
-                    world.notifyBlocksOfNeighborChange(tilePos.south(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.SOUTH, new TilePos()), this.block.id());
                     break;
                 case SIDE_TOP:
-                    world.notifyBlocksOfNeighborChange(tilePos.up(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.UP, new TilePos()), this.block.id());
                     break;
                 case SIDE_BOTTOM:
-                    world.notifyBlocksOfNeighborChange(tilePos.down(), this.block.id());
+                    world.notifyBlocksOfNeighborChange(tilePos.add(Direction.DOWN, new TilePos()), this.block.id());
                     break;
             }
         }
@@ -323,12 +325,12 @@ public class BlockLogicButton
     }
 
     @Override
-    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingSignal(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return (source.getBlockData(tilePos) & MASK_POWERED) != 0;
     }
 
     @Override
-    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean isEmittingDirectSignal(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         final int meta = world.getBlockData(tilePos);
         if ((meta & MASK_POWERED) == 0) {
             return false;
@@ -351,7 +353,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         if (world.isClientSide) {
             return;
         }
@@ -364,26 +366,26 @@ public class BlockLogicButton
         final int direction = meta & MASK_DIRECTION;
         switch (direction) {
             case SIDE_WEST:
-                world.notifyBlocksOfNeighborChange(tilePos.west(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.WEST, new TilePos()), this.block.id());
                 break;
             case SIDE_EAST:
-                world.notifyBlocksOfNeighborChange(tilePos.east(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.EAST, new TilePos()), this.block.id());
                 break;
             case SIDE_NORTH:
-                world.notifyBlocksOfNeighborChange(tilePos.north(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.NORTH, new TilePos()), this.block.id());
                 break;
             case SIDE_SOUTH:
-                world.notifyBlocksOfNeighborChange(tilePos.south(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.SOUTH, new TilePos()), this.block.id());
                 break;
             case SIDE_TOP:
-                world.notifyBlocksOfNeighborChange(tilePos.up(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.UP, new TilePos()), this.block.id());
                 break;
             case SIDE_BOTTOM:
-                world.notifyBlocksOfNeighborChange(tilePos.down(), this.block.id());
+                world.notifyBlocksOfNeighborChange(tilePos.add(Direction.DOWN, new TilePos()), this.block.id());
                 break;
         }
 
-        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "random.click", 0.3F, 0.5F);
+        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "random.click", 0.3F, 0.5F);
         world.markBlockDirty(tilePos);
     }
 
@@ -393,7 +395,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataRaw(tilePos, Blocks.BUTTON_PLANKS_PAINTED.id(), meta);
         world.setBlockData(tilePos, meta);
@@ -404,7 +406,7 @@ public class BlockLogicButton
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE.center();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
index 34307f3b3..333592202 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -46,12 +46,12 @@ public class BlockLogicButtonPainted
     }
 
     @Override
-    public void removeDye(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos) {
         world.setBlockIdNotify(tilePos, Blocks.BUTTON_PLANKS.id());
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return itemStack.getMetadata() & MASK_COLOR;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPlanks.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPlanks.java
index e2dee7856..b9cc614dd 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPlanks.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPlanks.java
@@ -13,7 +13,6 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import org.jetbrains.annotations.NotNull;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCactus.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCactus.java
index 615c54ad1..76c0777c7 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCactus.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCactus.java
@@ -1,6 +1,6 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.support.FullSupport;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.block.tag.BlockTags;
@@ -12,11 +12,12 @@ import net.minecraft.core.entity.vehicle.EntityMinecart;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IBonemealable;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -27,7 +28,7 @@ public class BlockLogicCactus
     implements IBonemealable {
 
     public BlockLogicCactus(final @NotNull Block<?> block) {
-        super(block, Material.cactus);
+        super(block, Materials.CACTUS);
         block.setTicking(true);
 
         final float indent = 0.0625F;
@@ -35,22 +36,23 @@ public class BlockLogicCactus
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
         this.onNeighborChanged(world, tilePos, 0);
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
-        if (world.isAirBlock(tilePos.up())) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+        TilePos queryPos = new TilePos();
+        if (world.isAirBlock(tilePos.add(Direction.UP, queryPos))) {
             int cactusHeight;
             cactusHeight = 1;
-            while (world.getBlockId(tilePos.sub(0, cactusHeight, 0)) == this.block.id()) {
+            while (world.getBlockId(tilePos.sub(0, cactusHeight, 0, queryPos)) == this.block.id()) {
                 cactusHeight++;
             }
             if (cactusHeight < 3) {
                 final int data = world.getBlockData(tilePos);
                 if (data == 15) {
-                    world.setBlockIdNotify(tilePos.up(), this.block.id());
+                    world.setBlockIdNotify(tilePos.add(Direction.UP, queryPos), this.block.id());
                     world.setBlockDataNotify(tilePos, 0);
                 } else {
                     world.setBlockDataNotify(tilePos, data + 1);
@@ -59,10 +61,11 @@ public class BlockLogicCactus
         }
     }
 
-    private void growCactusOnTop(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private void growCactusOnTop(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final @NotNull TilePos offsetPos = new TilePos(tilePos);
 
-        for (offsetPos.y = tilePos.y + 1; world.getBlockId(offsetPos) == this.block.id(); offsetPos.y++) { }
+        for (offsetPos.y = tilePos.y() + 1; world.getBlockId(offsetPos) == this.block.id(); offsetPos.y++) {
+        }
 
         if (world.isAirBlock(offsetPos)) {
             world.setBlockIdNotify(offsetPos, this.block.id());
@@ -80,7 +83,7 @@ public class BlockLogicCactus
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side.isVertical()) {
             return PartialSupport.INSTANCE.center();
         } else {
@@ -89,7 +92,7 @@ public class BlockLogicCactus
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (!super.canPlaceAt(world, tilePos)) {
             return false;
         } else {
@@ -98,7 +101,7 @@ public class BlockLogicCactus
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         if (!this.canStay(world, tilePos)) {
             this.dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
@@ -106,33 +109,34 @@ public class BlockLogicCactus
     }
 
     @Override
-    public boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos) {
-        if (world.getBlockMaterial(tilePos.west()).isSolid()) {
+    public boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        if (world.getBlockMaterial(tilePos.add(Direction.WEST, queryPos)).isSolid()) {
             return false;
         }
-        if (world.getBlockMaterial(tilePos.east()).isSolid()) {
+        if (world.getBlockMaterial(tilePos.add(Direction.EAST, queryPos)).isSolid()) {
             return false;
         }
-        if (world.getBlockMaterial(tilePos.north()).isSolid()) {
+        if (world.getBlockMaterial(tilePos.add(Direction.NORTH, queryPos)).isSolid()) {
             return false;
         }
-        if (world.getBlockMaterial(tilePos.south()).isSolid()) {
+        if (world.getBlockMaterial(tilePos.add(Direction.SOUTH, queryPos)).isSolid()) {
             return false;
         } else {
-            final int idDown = world.getBlockId(tilePos.down());
+            final int idDown = world.getBlockId(tilePos.add(Direction.DOWN, queryPos));
             return Blocks.hasTag(idDown, BlockTags.GROWS_CACTI);
         }
     }
 
     @Override
-    public void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity) {
+    public void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity) {
         if (entity instanceof Mob || entity instanceof EntityMinecart || entity instanceof EntityBoat) {
             entity.hurt(null, 1, DamageType.COMBAT);
         }
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         if (!world.isClientSide) {
             this.growCactusOnTop(world, tilePos);
             if (player == null || player.getGamemode().consumeBlocks()) {
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCake.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCake.java
index 32c7b2f2e..ea78bc289 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCake.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCake.java
@@ -1,11 +1,12 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.item.Items;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicCake extends BlockLogicEdible {
 
@@ -14,17 +15,17 @@ public class BlockLogicCake extends BlockLogicEdible {
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final int data = source.getBlockData(tilePos);
         final float gap = 0.0625f;
         final float width = (1 + data * 2) / 16.0f;
         final float height = 0.5f;
 
-        return AABB.fromPool(width, 0.0f, gap, 1.0f - gap, height, 1.0f - gap);
+        return new AABBd(width, 0.0f, gap, 1.0f - gap, height, 1.0f - gap);
     }
 
     @Override
-    public int getHealAmount(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public int getHealAmount(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return 3;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChest.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChest.java
index 5ea348fb8..3f8cca862 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChest.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChest.java
@@ -1,7 +1,5 @@
 package net.minecraft.core.block;
 
-import com.mojang.logging.LogUtils;
-import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityChest;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.Mob;
@@ -13,9 +11,9 @@ import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-import org.slf4j.Logger;
 
 import java.util.Objects;
 
@@ -28,12 +26,13 @@ public class BlockLogicChest
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         @NotNull Direction direction = mob.getHorizontalPlacementDirection(side).getOpposite();
         @NotNull Type type = Type.SINGLE;
 
+        TilePos queryPos = new TilePos();
         if (mob.isSneaking() && side.isHorizontal() && (mob.rotationLockHorizontal == null || mob.rotationLockHorizontal == Direction.NONE)) {
-            final @NotNull TilePos placedOn = tilePos.sub(side.getDirection());
+            final @NotNull TilePos placedOn = tilePos.sub(side.getDirection(), new TilePos());
 
             if (isSingleChest(world, placedOn)) {
                 final @NotNull Direction direction2 = getDirectionFromMeta(world.getBlockData(placedOn));
@@ -88,43 +87,43 @@ public class BlockLogicChest
             }
         } else if (!mob.isSneaking()) {
             if (direction == Direction.NORTH) {
-                if (isSingleChestWithDirection(world, tilePos.west(), direction) && !isSingleChestWithDirection(world, tilePos.east(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.west(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.east(queryPos), direction)) {
                     type = Type.LEFT;
-                    setType(world, tilePos.west(), Type.RIGHT);
+                    setType(world, tilePos.west(queryPos), Type.RIGHT);
                 }
-                if (isSingleChestWithDirection(world, tilePos.east(), direction) && !isSingleChestWithDirection(world, tilePos.west(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.east(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.west(queryPos), direction)) {
                     type = Type.RIGHT;
-                    setType(world, tilePos.east(), Type.LEFT);
+                    setType(world, tilePos.east(queryPos), Type.LEFT);
                 }
             }
             if (direction == Direction.EAST) {
-                if (isSingleChestWithDirection(world, tilePos.north(), direction) && !isSingleChestWithDirection(world, tilePos.south(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.north(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.south(queryPos), direction)) {
                     type = Type.LEFT;
-                    setType(world, tilePos.north(), Type.RIGHT);
+                    setType(world, tilePos.north(queryPos), Type.RIGHT);
                 }
-                if (isSingleChestWithDirection(world, tilePos.south(), direction) && !isSingleChestWithDirection(world, tilePos.north(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.south(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.north(queryPos), direction)) {
                     type = Type.RIGHT;
-                    setType(world, tilePos.south(), Type.LEFT);
+                    setType(world, tilePos.south(queryPos), Type.LEFT);
                 }
             }
             if (direction == Direction.SOUTH) {
-                if (isSingleChestWithDirection(world, tilePos.west(), direction) && !isSingleChestWithDirection(world, tilePos.east(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.west(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.east(queryPos), direction)) {
                     type = Type.RIGHT;
-                    setType(world, tilePos.west(), Type.LEFT);
+                    setType(world, tilePos.west(queryPos), Type.LEFT);
                 }
-                if (isSingleChestWithDirection(world, tilePos.east(), direction) && !isSingleChestWithDirection(world, tilePos.west(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.east(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.west(queryPos), direction)) {
                     type = Type.LEFT;
-                    setType(world, tilePos.east(), Type.RIGHT);
+                    setType(world, tilePos.east(queryPos), Type.RIGHT);
                 }
             }
             if (direction == Direction.WEST) {
-                if (isSingleChestWithDirection(world, tilePos.north(), direction) && !isSingleChestWithDirection(world, tilePos.south(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.north(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.south(queryPos), direction)) {
                     type = Type.RIGHT;
-                    setType(world, tilePos.north(), Type.LEFT);
+                    setType(world, tilePos.north(queryPos), Type.LEFT);
                 }
-                if (isSingleChestWithDirection(world, tilePos.south(), direction) && !isSingleChestWithDirection(world, tilePos.north(), direction)) {
+                if (isSingleChestWithDirection(world, tilePos.south(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.north(queryPos), direction)) {
                     type = Type.LEFT;
-                    setType(world, tilePos.south(), Type.RIGHT);
+                    setType(world, tilePos.south(queryPos), Type.RIGHT);
                 }
             }
         }
@@ -137,48 +136,48 @@ public class BlockLogicChest
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final Direction direction = side.getDirection();
         Type type = Type.SINGLE;
-
+        TilePos queryPos = new TilePos();
         if (direction == Direction.NORTH) {
-            if (isSingleChestWithDirection(world, tilePos.west(), direction) && !isSingleChestWithDirection(world, tilePos.east(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.west(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.east(queryPos), direction)) {
                 type = Type.LEFT;
-                setType(world, tilePos.west(), Type.RIGHT);
+                setType(world, tilePos.west(queryPos), Type.RIGHT);
             }
-            if (isSingleChestWithDirection(world, tilePos.east(), direction) && !isSingleChestWithDirection(world, tilePos.west(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.east(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.west(queryPos), direction)) {
                 type = Type.RIGHT;
-                setType(world, tilePos.east(), Type.LEFT);
+                setType(world, tilePos.east(queryPos), Type.LEFT);
             }
         }
         if (direction == Direction.EAST) {
-            if (isSingleChestWithDirection(world, tilePos.north(), direction) && !isSingleChestWithDirection(world, tilePos.south(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.north(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.south(queryPos), direction)) {
                 type = Type.LEFT;
-                setType(world, tilePos.north(), Type.RIGHT);
+                setType(world, tilePos.north(queryPos), Type.RIGHT);
             }
-            if (isSingleChestWithDirection(world, tilePos.south(), direction) && !isSingleChestWithDirection(world, tilePos.north(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.south(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.north(queryPos), direction)) {
                 type = Type.RIGHT;
-                setType(world, tilePos.south(), Type.LEFT);
+                setType(world, tilePos.south(queryPos), Type.LEFT);
             }
         }
         if (direction == Direction.SOUTH) {
-            if (isSingleChestWithDirection(world, tilePos.west(), direction) && !isSingleChestWithDirection(world, tilePos.east(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.west(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.east(queryPos), direction)) {
                 type = Type.RIGHT;
-                setType(world, tilePos.west(), Type.LEFT);
+                setType(world, tilePos.west(queryPos), Type.LEFT);
             }
-            if (isSingleChestWithDirection(world, tilePos.east(), direction) && !isSingleChestWithDirection(world, tilePos.west(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.east(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.west(queryPos), direction)) {
                 type = Type.LEFT;
-                setType(world, tilePos.east(), Type.RIGHT);
+                setType(world, tilePos.east(queryPos), Type.RIGHT);
             }
         }
         if (direction == Direction.WEST) {
-            if (isSingleChestWithDirection(world, tilePos.north(), direction) && !isSingleChestWithDirection(world, tilePos.south(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.north(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.south(queryPos), direction)) {
                 type = Type.RIGHT;
-                setType(world, tilePos.north(), Type.LEFT);
+                setType(world, tilePos.north(queryPos), Type.LEFT);
             }
-            if (isSingleChestWithDirection(world, tilePos.south(), direction) && !isSingleChestWithDirection(world, tilePos.north(), direction)) {
+            if (isSingleChestWithDirection(world, tilePos.south(queryPos), direction) && !isSingleChestWithDirection(world, tilePos.north(queryPos), direction)) {
                 type = Type.LEFT;
-                setType(world, tilePos.south(), Type.RIGHT);
+                setType(world, tilePos.south(queryPos), Type.RIGHT);
             }
         }
 
@@ -189,7 +188,7 @@ public class BlockLogicChest
         world.setBlockData(tilePos, meta);
     }
 
-    public void checkIfOtherHalfExists(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void checkIfOtherHalfExists(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int meta = world.getBlockData(tilePos);
         final @NotNull Type type = getTypeFromMeta(meta);
 
@@ -236,10 +235,11 @@ public class BlockLogicChest
         if (world.isClientSide) {
             return;
         }
-        final int bN = world.getBlockId(tilePos.north());
-        final int bS = world.getBlockId(tilePos.south());
-        final int bW = world.getBlockId(tilePos.west());
-        final int bE = world.getBlockId(tilePos.east());
+        TilePos queryPos = new TilePos();
+        final int bN = world.getBlockId(tilePos.north(queryPos));
+        final int bS = world.getBlockId(tilePos.south(queryPos));
+        final int bW = world.getBlockId(tilePos.west(queryPos));
+        final int bE = world.getBlockId(tilePos.east(queryPos));
         @NotNull Direction direction = Direction.NORTH;
         if (Blocks.solid[bN] && !Blocks.solid[bS]) {
             direction = Direction.SOUTH;
@@ -258,12 +258,12 @@ public class BlockLogicChest
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         super.onNeighborChanged(world, tilePos, id);
         this.checkIfOtherHalfExists(world, tilePos);
     }
 
-    public static boolean isChest(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public static boolean isChest(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> b = world.getBlock(tilePos);
         return b != null && b.getLogic() instanceof BlockLogicChest;
     }
@@ -283,7 +283,7 @@ public class BlockLogicChest
         }
     }
 
-    public static void setType(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Type type) {
+    public static void setType(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Type type) {
         if (isChest(world, tilePos)) {
             world.setBlockDataNotify(tilePos, getMetaWithType(world.getBlockData(tilePos), type));
         }
@@ -297,16 +297,16 @@ public class BlockLogicChest
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (world.isClientSide) return true;
 
         this.checkIfOtherHalfExists(world, tilePos);
-        player.displayChestScreen(getInventory(world, tilePos), tilePos.x, tilePos.y, tilePos.z);
+        player.displayChestScreen(getInventory(world, tilePos), tilePos.x(), tilePos.y(), tilePos.z());
 
         return true;
     }
 
-    public static @NotNull Container getInventory(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public static @NotNull Container getInventory(final @NotNull World world, final @NotNull TilePosc tilePos) {
         @NotNull Container inventory = (Container) Objects.requireNonNull(world.getTileEntity(tilePos));
 
         final int meta = world.getBlockData(tilePos);
@@ -399,7 +399,7 @@ public class BlockLogicChest
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataRaw(tilePos, Blocks.CHEST_PLANKS_OAK_PAINTED.id(), meta);
         world.setBlockData(tilePos, meta);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestLegacy.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestLegacy.java
index 8e63303c9..8f4b5120e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestLegacy.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestLegacy.java
@@ -4,7 +4,7 @@ import net.minecraft.core.Global;
 import net.minecraft.core.block.BlockLogicChest.Type;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityChest;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
@@ -12,6 +12,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -22,7 +23,7 @@ public class BlockLogicChestLegacy
     extends BlockLogic {
 
     public BlockLogicChestLegacy(final @NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
         block.withEntity(TileEntityChest::new);
     }
 
@@ -33,22 +34,22 @@ public class BlockLogicChestLegacy
         } else return null;
     }
 
-    public static boolean isLegacyChest(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public static boolean isLegacyChest(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = world.getBlock(tilePos);
         return block == Blocks.CHEST_LEGACY || block == Blocks.CHEST_LEGACY_PAINTED;
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         final @Nullable TileEntity entity = world.getTileEntity(tilePos);
         if (entity != null) {
-            entity.dropContents(world, tilePos.x, tilePos.y, tilePos.z);
+            entity.dropContents(world, tilePos.x(), tilePos.y(), tilePos.z());
         }
         super.onRemoved(world, tilePos, data);
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (world.isClientSide) {
             return true;
         }
@@ -60,20 +61,21 @@ public class BlockLogicChestLegacy
         return Objects.requireNonNull(world.getBlock(tilePos)).onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
-    private void updateLegacyChest(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private void updateLegacyChest(final @NotNull World world, final @NotNull TilePosc tilePos) {
         @NotNull Direction facingDirection = Direction.SOUTH;
         @Nullable Direction otherChestDirection = null;
 
-        if (isLegacyChest(world, tilePos.east())) {
+        TilePos queryPos = new TilePos();
+        if (isLegacyChest(world, tilePos.east(queryPos))) {
             otherChestDirection = Direction.EAST;
         }
-        if (isLegacyChest(world, tilePos.west())) {
+        if (isLegacyChest(world, tilePos.west(queryPos))) {
             otherChestDirection = Direction.WEST;
         }
-        if (isLegacyChest(world, tilePos.south())) {
+        if (isLegacyChest(world, tilePos.south(queryPos))) {
             otherChestDirection = Direction.SOUTH;
         }
-        if (isLegacyChest(world, tilePos.north())) {
+        if (isLegacyChest(world, tilePos.north(queryPos))) {
             otherChestDirection = Direction.NORTH;
         }
 
@@ -81,16 +83,16 @@ public class BlockLogicChestLegacy
             //Single Chest
 
             int meta = world.getBlockData(tilePos);
-            if (world.isBlockOpaqueCube(tilePos.east()) && !world.isBlockOpaqueCube(tilePos.west())) {
+            if (world.isBlockOpaqueCube(tilePos.east(queryPos)) && !world.isBlockOpaqueCube(tilePos.west(queryPos))) {
                 facingDirection = Direction.WEST;
             }
-            if (world.isBlockOpaqueCube(tilePos.west()) && !world.isBlockOpaqueCube(tilePos.east())) {
+            if (world.isBlockOpaqueCube(tilePos.west(queryPos)) && !world.isBlockOpaqueCube(tilePos.east(queryPos))) {
                 facingDirection = Direction.EAST;
             }
-            if (world.isBlockOpaqueCube(tilePos.south()) && !world.isBlockOpaqueCube(tilePos.north())) {
+            if (world.isBlockOpaqueCube(tilePos.south(queryPos)) && !world.isBlockOpaqueCube(tilePos.north(queryPos))) {
                 facingDirection = Direction.NORTH;
             }
-            if (world.isBlockOpaqueCube(tilePos.north()) && !world.isBlockOpaqueCube(tilePos.south())) {
+            if (world.isBlockOpaqueCube(tilePos.north(queryPos)) && !world.isBlockOpaqueCube(tilePos.south(queryPos))) {
                 facingDirection = Direction.SOUTH;
             }
 
@@ -117,25 +119,25 @@ public class BlockLogicChestLegacy
 
             if (otherChestDirection == Direction.NORTH) {
                 facingDirection = Direction.EAST;
-                if (world.isBlockOpaqueCube(tilePos.east()) || world.isBlockOpaqueCube(tilePos.east().north())) {
+                if (world.isBlockOpaqueCube(tilePos.east(queryPos)) || world.isBlockOpaqueCube(tilePos.east(queryPos).north(queryPos))) {
                     facingDirection = Direction.WEST;
                 }
             }
             if (otherChestDirection == Direction.SOUTH) {
                 facingDirection = Direction.EAST;
-                if (world.isBlockOpaqueCube(tilePos.east()) || world.isBlockOpaqueCube(tilePos.east().south())) {
+                if (world.isBlockOpaqueCube(tilePos.east(queryPos)) || world.isBlockOpaqueCube(tilePos.east(queryPos).south(queryPos))) {
                     facingDirection = Direction.WEST;
                 }
             }
             if (otherChestDirection == Direction.EAST) {
                 facingDirection = Direction.SOUTH;
-                if (world.isBlockOpaqueCube(tilePos.south()) || world.isBlockOpaqueCube(tilePos.east().south())) {
+                if (world.isBlockOpaqueCube(tilePos.south(queryPos)) || world.isBlockOpaqueCube(tilePos.east(queryPos).south(queryPos))) {
                     facingDirection = Direction.NORTH;
                 }
             }
             if (otherChestDirection == Direction.WEST) {
                 facingDirection = Direction.SOUTH;
-                if (world.isBlockOpaqueCube(tilePos.south()) || world.isBlockOpaqueCube(tilePos.west().south())) {
+                if (world.isBlockOpaqueCube(tilePos.south(queryPos)) || world.isBlockOpaqueCube(tilePos.west(queryPos).south(queryPos))) {
                     facingDirection = Direction.NORTH;
                 }
             }
@@ -178,7 +180,7 @@ public class BlockLogicChestLegacy
         }
     }
 
-    private @NotNull ItemStack @NotNull [] getAndClearChestInventory(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private @NotNull ItemStack @NotNull [] getAndClearChestInventory(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final @NotNull TileEntityChest tileEntityChest = (TileEntityChest) Objects.requireNonNull(world.getTileEntity(tilePos));
 
         final ItemStack[] items = new ItemStack[tileEntityChest.getContainerSize()];
@@ -191,7 +193,7 @@ public class BlockLogicChestLegacy
         return items;
     }
 
-    private void setChestInventory(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull ItemStack @NotNull [] items) {
+    private void setChestInventory(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull ItemStack @NotNull [] items) {
         final @NotNull TileEntityChest tileEntityChest = (TileEntityChest) Objects.requireNonNull(world.getTileEntity(tilePos));
 
         for (int i = 0; i < items.length; i++) {
@@ -199,10 +201,10 @@ public class BlockLogicChestLegacy
         }
     }
 
-    private void updateChestBlock(final @NotNull World world, final @NotNull TilePos tilePos, int newMeta) {
+    private void updateChestBlock(final @NotNull World world, final @NotNull TilePosc tilePos, int newMeta) {
         if (!isLegacyChest(world, tilePos)) {
             if (Global.BUILD_CHANNEL.isUnstableBuild())
-                throw new RuntimeException("Not a Legacy Chest: X: " + tilePos.x + " Y: " + tilePos.y + " Z: " + tilePos.z);
+                throw new RuntimeException("Not a Legacy Chest: X: " + tilePos.x() + " Y: " + tilePos.y() + " Z: " + tilePos.z());
 
             return;
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestPainted.java
index d23a6e43b..f36307806 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicChestPainted.java
@@ -8,7 +8,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -21,7 +21,7 @@ public class BlockLogicChestPainted
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return itemStack.getMetadata();
     }
 
@@ -49,13 +49,13 @@ public class BlockLogicChestPainted
     }
 
     @Override
-    public void removeDye(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int meta = this.stripColorFromMetadata(world.getBlockData(tilePos));
         world.setBlockIdDataNotify(tilePos, Blocks.CHEST_PLANKS_OAK.id(), meta);
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicClay.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicClay.java
index 1e2c4ee7a..f26163343 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicClay.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicClay.java
@@ -1,17 +1,17 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicClay extends BlockLogic {
     public BlockLogicClay(final @NotNull Block<?> block) {
-        super(block, Material.clay);
+        super(block, Materials.CLAY);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobble.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobble.java
index e01c787da..6a5a5416c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobble.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobble.java
@@ -5,7 +5,6 @@ import net.minecraft.core.block.material.Material;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IItemConvertible;
 import net.minecraft.core.item.ItemStack;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobweb.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobweb.java
index 5354a5dc7..d00e4f1d5 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobweb.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCobweb.java
@@ -10,11 +10,11 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicCobweb extends BlockLogic {
     public BlockLogicCobweb(final @NotNull Block<?> block, final @NotNull Material material) {
@@ -22,7 +22,7 @@ public class BlockLogicCobweb extends BlockLogic {
     }
 
     @Override
-    public void onEntityCollision(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity entity) {
+    public void onEntityCollision(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity entity) {
         entity.fallDistance = 0;
         entity.stuckInCobweb = true;
     }
@@ -42,7 +42,7 @@ public class BlockLogicCobweb extends BlockLogic {
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -52,7 +52,7 @@ public class BlockLogicCobweb extends BlockLogic {
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsPumpkin.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsPumpkin.java
index 2e9e08292..ae4a7f074 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsPumpkin.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsPumpkin.java
@@ -4,15 +4,17 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IBonemealable;
-import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -24,7 +26,7 @@ public class BlockLogicCropsPumpkin
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final int meta = source.getBlockData(tilePos);
         final float onePix = 1.0F / 16.0F;
         float size = 0.0f;
@@ -40,7 +42,7 @@ public class BlockLogicCropsPumpkin
             size = 14 * onePix;
         }
 
-        return AABB.fromPool(0.5F - size / 2, 0, 0.5F - size / 2, 0.5F + size / 2, size, 0.5F + size / 2);
+        return new AABBd(0.5F - size / 2, 0, 0.5F - size / 2, 0.5F + size / 2, size, 0.5F + size / 2);
     }
 
     @Override
@@ -49,9 +51,9 @@ public class BlockLogicCropsPumpkin
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
-        if (world.getBlockLightValue(tilePos.up()) >= 9) {
+        if (world.getBlockLightValue(tilePos.up(new TilePos())) >= 9) {
             int meta = world.getBlockData(tilePos);
             if (meta < 6) {
                 final float f = this.getGrowthRate(world, tilePos);
@@ -67,16 +69,17 @@ public class BlockLogicCropsPumpkin
         }
     }
 
-    private float getGrowthRate(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private float getGrowthRate(final @NotNull World world, final @NotNull TilePosc tilePos) {
         float growthRate = 1.0F;
         final @NotNull TilePos localPos = new TilePos(tilePos);
-        for (localPos.x = tilePos.x - 1; localPos.x <= tilePos.x + 1; localPos.x++) {
-            for (localPos.z = tilePos.z - 1; localPos.z <= tilePos.z + 1; localPos.z++) {
-                final int id = world.getBlockId(localPos.down());
+        final @NotNull TilePos queryPos = new TilePos();
+        for (localPos.x = tilePos.x() - 1; localPos.x <= tilePos.x() + 1; localPos.x++) {
+            for (localPos.z = tilePos.z() - 1; localPos.z <= tilePos.z() + 1; localPos.z++) {
+                final int id = world.getBlockId(localPos.down(queryPos));
                 float growthRateMod = 0.0F;
                 if (id == Blocks.FARMLAND_DIRT.id()) {
                     growthRateMod = 1.0F;
-                    if (world.getBlockData(localPos.down()) > 0) {
+                    if (world.getBlockData(localPos.down(queryPos)) > 0) {
                         growthRateMod = 3F;
                     }
                 }
@@ -88,7 +91,7 @@ public class BlockLogicCropsPumpkin
 
         }
 
-        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down()));
+        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down(queryPos)));
         if (!isFertilized) {
             if (world.getSeasonManager().getCurrentSeason() != null) {
                 growthRate *= world.getSeasonManager().getCurrentSeason().cropGrowthFactor;
@@ -105,16 +108,16 @@ public class BlockLogicCropsPumpkin
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final int meta = source.getBlockData(tilePos);
         if (meta == 0) {
             return null;
         }
-        return this.getBoundsFromState(source, tilePos).move(tilePos);
+        return this.getBoundsFromState(source, tilePos).translate(tilePos.x(), tilePos.y(), tilePos.z(), new AABBd());
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         if (world.getBlockData(tilePos) < 5) {
             if (!world.isClientSide) {
                 world.setBlockIdNotify(tilePos, Blocks.PUMPKIN.id());
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsWheat.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsWheat.java
index 3ab4117a8..67ae856f1 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsWheat.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCropsWheat.java
@@ -12,6 +12,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -32,9 +33,9 @@ public class BlockLogicCropsWheat extends BlockLogicFlower implements IBonemeala
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
-        if (world.getBlockLightValue(tilePos.up()) >= 9) {
+        if (world.getBlockLightValue(tilePos.up(new TilePos())) >= 9) {
             final int data = world.getBlockData(tilePos);
             if (data < MAX_GROWTH_STATE) {
                 final float growthRate = this.getGrowthRate(world, tilePos);
@@ -45,28 +46,29 @@ public class BlockLogicCropsWheat extends BlockLogicFlower implements IBonemeala
         }
     }
 
-    private float getGrowthRate(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private float getGrowthRate(final @NotNull World world, final @NotNull TilePosc tilePos) {
         float growthRate = 1.0F;
-        final int idNegZ = world.getBlockId(tilePos.north());
-        final int idPosZ = world.getBlockId(tilePos.south());
-        final int idNegX = world.getBlockId(tilePos.west());
-        final int idPosX = world.getBlockId(tilePos.east());
-        final int idNegXNegZ = world.getBlockId(tilePos.west().north());
-        final int idPosXNegZ = world.getBlockId(tilePos.east().north());
-        final int idPosXPosZ = world.getBlockId(tilePos.east().south());
-        final int idNegXPosZ = world.getBlockId(tilePos.west().south());
+        TilePos queryPos = new TilePos();
+        final int idNegZ = world.getBlockId(tilePos.north(queryPos));
+        final int idPosZ = world.getBlockId(tilePos.south(queryPos));
+        final int idNegX = world.getBlockId(tilePos.west(queryPos));
+        final int idPosX = world.getBlockId(tilePos.east(queryPos));
+        final int idNegXNegZ = world.getBlockId(tilePos.west(queryPos).north(queryPos));
+        final int idPosXNegZ = world.getBlockId(tilePos.east(queryPos).north(queryPos));
+        final int idPosXPosZ = world.getBlockId(tilePos.east(queryPos).south(queryPos));
+        final int idNegXPosZ = world.getBlockId(tilePos.west(queryPos).south(queryPos));
         final boolean xNeighbor = idNegX == this.block.id() || idPosX == this.block.id();
         final boolean zNeighbor = idNegZ == this.block.id() || idPosZ == this.block.id();
         final boolean diagNeighbor = idNegXNegZ == this.block.id() || idPosXNegZ == this.block.id() || idPosXPosZ == this.block.id() || idNegXPosZ == this.block.id();
 
         final @NotNull TilePos localPos = new TilePos(tilePos);
-        for (localPos.x = tilePos.x - 1; localPos.x <= tilePos.x + 1; localPos.x++) {
-            for (localPos.z = tilePos.z - 1; localPos.z <= tilePos.z + 1; localPos.z++) {
-                final int id = world.getBlockId(tilePos.down());
+        for (localPos.x = tilePos.x() - 1; localPos.x <= tilePos.x() + 1; localPos.x++) {
+            for (localPos.z = tilePos.z() - 1; localPos.z <= tilePos.z() + 1; localPos.z++) {
+                final int id = world.getBlockId(tilePos.down(queryPos));
                 float growthRateMod = 0.0F;
                 if (id == Blocks.FARMLAND_DIRT.id()) {
                     growthRateMod = 1.0F;
-                    if (world.getBlockData(tilePos.down()) > 0) {
+                    if (world.getBlockData(tilePos.down(queryPos)) > 0) {
                         growthRateMod = 3F;
                     }
                 }
@@ -81,7 +83,7 @@ public class BlockLogicCropsWheat extends BlockLogicFlower implements IBonemeala
             growthRate /= 2.0F;
         }
 
-        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down()));
+        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down(queryPos)));
         if (!isFertilized) {
             if (world.getSeasonManager().getCurrentSeason() != null) {
                 growthRate *= world.getSeasonManager().getCurrentSeason().cropGrowthFactor;
@@ -93,12 +95,13 @@ public class BlockLogicCropsWheat extends BlockLogicFlower implements IBonemeala
     }
 
     @Override
-    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) {
-        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down()));
+    public void onDestroyedByPlayer(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final int data, final @NotNull Player player, final @Nullable Item item) {
+        TilePos queryPos = new TilePos();
+        final boolean isFertilized = BlockLogicFarmland.isFertilized(world.getBlockData(tilePos.down(queryPos)));
         if (isFertilized && !world.isClientSide) {
             final boolean shouldDefertilize = world.rand.nextInt(3) == 2;
             if (shouldDefertilize) {
-                world.setBlockData(tilePos.down(), BlockLogicFarmland.setFertilized(world.getBlockData(tilePos.down()), false));
+                world.setBlockData(tilePos.down(queryPos), BlockLogicFarmland.setFertilized(world.getBlockData(tilePos.down(queryPos)), false));
             }
         }
     }
@@ -113,7 +116,7 @@ public class BlockLogicCropsWheat extends BlockLogicFlower implements IBonemeala
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         if (world.getBlockData(tilePos) < MAX_GROWTH_STATE) {
             if (!world.isClientSide) {
                 world.setBlockDataNotify(tilePos, MAX_GROWTH_STATE);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCrystal.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCrystal.java
index eccdd7670..d9d4c4e65 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicCrystal.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicCrystal.java
@@ -1,12 +1,11 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.WorldSource;
+import net.minecraft.core.block.material.Materials;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicCrystal extends BlockLogic {
     public BlockLogicCrystal(final @NotNull Block<?> block) {
-        super(block, Material.stone);
+        super(block, Materials.STONE);
     }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDispenser.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDispenser.java
index 662880ba0..0f35de874 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDispenser.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDispenser.java
@@ -4,6 +4,7 @@ import java.util.Objects;
 import java.util.Random;
 
 import net.minecraft.core.block.entity.TileEntityDispenser;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.*;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.entity.projectile.*;
@@ -12,19 +13,19 @@ import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 public class BlockLogicDispenser extends BlockLogicVeryRotatable {
     public static final int MASK_POWERED = 0b0000_1000;
 
     public BlockLogicDispenser(final @NotNull Block<?> block) {
-        super(block, Material.stone);
+        super(block, Materials.STONE);
         block.withEntity(TileEntityDispenser::new);
     }
 
@@ -34,7 +35,7 @@ public class BlockLogicDispenser extends BlockLogicVeryRotatable {
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (world.isClientSide) {
             return true;
         } else {
@@ -44,7 +45,7 @@ public class BlockLogicDispenser extends BlockLogicVeryRotatable {
         }
     }
 
-    private void dispenseItem(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random random) {
+    private void dispenseItem(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random random) {
         final @NotNull Direction direction = BlockLogicVeryRotatable.metaToDirection(world.getBlockData(tilePos));
         final int xOffset = direction.getOffsetX();
         final int yOffset = direction.getOffsetY();
@@ -52,31 +53,31 @@ public class BlockLogicDispenser extends BlockLogicVeryRotatable {
 
         final @NotNull TileEntityDispenser tileEntity = (TileEntityDispenser) Objects.requireNonNull(world.getTileEntity(tilePos));
         final @Nullable ItemStack itemStack = tileEntity.getRandomStackFromInventory();
-        final @NotNull Vec3 pos = tilePos.into().add(xOffset * 0.6 + 0.5, yOffset * 0.6 + 0.5, zOffset * 0.6 + 0.5);
+        final @NotNull Vector3dc pos = new Vector3d(tilePos.x(), tilePos.y(), tilePos.z()).add(xOffset * 0.6 + 0.5, yOffset * 0.6 + 0.5, zOffset * 0.6 + 0.5);
         if (itemStack == null) {
             world.playBlockEvent(tilePos, LevelListener.EVENT_DISPENSER_EMPTY, 0);
         } else {
             if (itemStack.getItem() instanceof final @NotNull IDispensable dispensable) {
-                dispensable.onDispensed(itemStack, world, random, direction, pos.x, pos.y, pos.z);
+                dispensable.onDispensed(itemStack, world, random, direction, pos.x(), pos.y(), pos.z());
                 world.playBlockEvent(tilePos, LevelListener.EVENT_DISPENSER_PROJECTILE, 0);
             } else if (itemStack.itemID == Items.AMMO_ARROW.id || itemStack.itemID == Items.AMMO_ARROW_GOLD.id) {
                 final @NotNull ProjectileArrow arrow;
                 if (itemStack.itemID == Items.AMMO_ARROW.id) {
-                    arrow = new ProjectileArrow(world, pos.x, pos.y, pos.z, 0);
+                    arrow = new ProjectileArrow(world, pos.x(), pos.y(), pos.z(), 0);
                 } else {
-                    arrow = new ProjectileArrowGolden(world, pos.x, pos.y, pos.z);
+                    arrow = new ProjectileArrowGolden(world, pos.x(), pos.y(), pos.z());
                 }
                 arrow.setHeading(xOffset, yOffset + 0.1D, zOffset, 1.1F, 6F);
                 arrow.setDoesArrowBelongToPlayer(true);
                 world.entityJoinedWorld(arrow);
                 world.playBlockEvent(tilePos, LevelListener.EVENT_DISPENSER_PROJECTILE, 0);
             } else if (itemStack.itemID == Items.AMMO_CHARGE_EXPLOSIVE.id) {
-                final @NotNull ProjectileCannonball projectileCannonball = new ProjectileCannonball(world, pos.x, pos.y, pos.z);
+                final @NotNull ProjectileCannonball projectileCannonball = new ProjectileCannonball(world, pos.x(), pos.y(), pos.z());
                 projectileCannonball.setHeading(xOffset, yOffset + 0.1D, zOffset, 1.1F, 6F);
                 world.entityJoinedWorld(projectileCannonball);
                 world.playBlockEvent(tilePos, LevelListener.EVENT_DISPENSER_PROJECTILE, 0);
             } else {
-                final @NotNull EntityItem item = new EntityItem(world, pos.x, pos.y - 0.3D, pos.z, itemStack);
+                final @NotNull EntityItem item = new EntityItem(world, pos.x(), pos.y() - 0.3D, pos.z(), itemStack);
                 final double randOffset = random.nextDouble() * 0.1D + 0.2D;
                 item.xd = (double) xOffset * randOffset;
                 item.yd = (double) yOffset + 0.2D;
@@ -92,7 +93,7 @@ public class BlockLogicDispenser extends BlockLogicVeryRotatable {
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         final boolean hasNeighborSignal = world.hasNeighborSignal(tilePos);
         final int data = world.getBlockData(tilePos);
         if (hasNeighborSignal && (data & MASK_POWERED) == 0) {
@@ -104,7 +105,7 @@ public class BlockLogicDispenser extends BlockLogicVeryRotatable {
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         this.dispenseItem(world, tilePos, rand);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoor.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoor.java
index 5729e835e..41db209ef 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoor.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoor.java
@@ -1,30 +1,31 @@
 package net.minecraft.core.block;
 
-import java.util.Objects;
-import java.util.Random;
-import java.util.function.Supplier;
-
-import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.entity.TileEntityActivator;
+import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
-import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.helper.DyeColor;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.tag.ItemTags;
+import net.minecraft.core.util.helper.Direction;
+import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
+
+import java.util.function.Supplier;
 
 public class BlockLogicDoor
     extends BlockLogic
@@ -51,14 +52,14 @@ public class BlockLogicDoor
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final int meta = world.getBlockData(tilePos);
         if (world.hasNeighborSignal(tilePos)) {
             world.setBlockDataNotify(tilePos, meta | MASK_OPENED);
             if (this.isTop) {
-                world.setBlockDataNotify(tilePos.down(), meta | MASK_OPENED);
+                world.setBlockDataNotify(tilePos.down(new TilePos()), meta | MASK_OPENED);
             } else {
-                world.setBlockDataNotify(tilePos.up(), meta | MASK_OPENED);
+                world.setBlockDataNotify(tilePos.up(new TilePos()), meta | MASK_OPENED);
             }
             world.playBlockEvent(tilePos, LevelListener.EVENT_DOOR_SOUND, 0);
         }
@@ -75,7 +76,7 @@ public class BlockLogicDoor
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side.isVertical()) return PartialSupport.INSTANCE;
 
         final int data = world.getBlockData(tilePos);
@@ -90,11 +91,11 @@ public class BlockLogicDoor
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.getBoundsForRotation(this.getRotation(source.getBlockData(tilePos)), false);
     }
 
-    public @NotNull AABB getBoundsForRotation(final int rotation, final boolean drawingSelection) {
+    public @NotNull AABBdc getBoundsForRotation(final int rotation, final boolean drawingSelection) {
         final float top, bottom;
         if (this.isTop && drawingSelection) {
             top = 1.0f;
@@ -109,71 +110,73 @@ public class BlockLogicDoor
         final float f = 0.1875F;
         return switch (rotation) {
             case 0 -> // North
-                AABB.fromPool(0.0F, bottom, 0.0F, 1.0F, top, f);
+                new AABBd(0.0F, bottom, 0.0F, 1.0F, top, f);
             case 1 -> // East
-                AABB.fromPool(1.0F - f, bottom, 0.0F, 1.0F, top, 1.0F);
+                new AABBd(1.0F - f, bottom, 0.0F, 1.0F, top, 1.0F);
             case 2 -> // South
-                AABB.fromPool(0.0F, bottom, 1.0F - f, 1.0F, top, 1.0F);
+                new AABBd(0.0F, bottom, 1.0F - f, 1.0F, top, 1.0F);
             case 3 -> // West
-                AABB.fromPool(0.0F, bottom, 0.0F, f, top, 1.0F);
-            default -> AABB.fromPool(0.0F, bottom, 0.0F, 1.0F, top, 1.0F);
+                new AABBd(0.0F, bottom, 0.0F, f, top, 1.0F);
+            default -> new AABBd(0.0F, bottom, 0.0F, 1.0F, top, 1.0F);
         };
     }
 
     @Override
-    public void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
         if (!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
             this.onInteracted(world, tilePos, player, side, xHit, yHit);
         }
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @Nullable Player player, final @Nullable Side side, final double xHit, final double yHit) {
-        if (this.material == Material.metal || this.material == Material.steel) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @Nullable Player player, final @Nullable Side side, final double xHit, final double yHit) {
+        if (this.material == Materials.METAL || this.material == Materials.STEEL) {
             return false;
         }
+        TilePos queryPos = new TilePos();
         final int data = world.getBlockData(tilePos);
         if (this.isTop) {
-            final Block<?> b = world.getBlock(tilePos.down());
-            if (b != null && b.getLogic() instanceof BlockLogicDoor) {
-                b.onInteracted(world, tilePos.down(), player, side, xHit, yHit);
+            final Block<?> b = world.getBlock(tilePos.down(queryPos));
+            if (b != null && b.getLogic() instanceof BlockLogicDoor blockLogicDoor) {
+                blockLogicDoor.onInteracted(world, tilePos.down(queryPos), player, side, xHit, yHit);
             }
             return true;
         }
-        final @Nullable Block<?> b = world.getBlock(tilePos.up());
+        final @Nullable Block<?> b = world.getBlock(tilePos.up(queryPos));
         if (b != null && b.getLogic() instanceof BlockLogicDoor) {
-            world.setBlockDataNotify(tilePos.up(), data ^ MASK_OPENED);
+            world.setBlockDataNotify(tilePos.up(queryPos), data ^ MASK_OPENED);
         }
         final int openedData = data ^ MASK_OPENED;
         world.setBlockDataNotify(tilePos, openedData);
         if (!this.isSupported(world, tilePos, openedData)) {
             this.dropWithCause(world, EnumDropCause.WORLD, tilePos, openedData, null, null);
             world.setBlockIdNotify(tilePos, 0);
-            if (world.getBlockLogic(tilePos.up(), BlockLogicDoor.class) != null) {
-                world.setBlockIdNotify(tilePos.up(), 0);
+            if (world.getBlockLogic(tilePos.up(queryPos), BlockLogicDoor.class) != null) {
+                world.setBlockIdNotify(tilePos.up(queryPos), 0);
             }
         }
-        world.markBlocksDirty(tilePos.down(), tilePos);
+        world.markBlocksDirty(tilePos.down(queryPos), tilePos);
         world.playBlockEvent(player, tilePos, LevelListener.EVENT_DOOR_SOUND, 0);
         return true;
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         this.onInteracted(world, tilePos, null, direction.getSide(), 0.5, 0.5);
     }
 
-    public void onPoweredBlockChange(final @NotNull World world, final @NotNull TilePos tilePos, boolean isPowered) {
+    public void onPoweredBlockChange(final @NotNull World world, final @NotNull TilePosc tilePos, boolean isPowered) {
         final int data = world.getBlockData(tilePos);
 
         if ((data & MASK_HINGE) > 0) {
             isPowered = !isPowered;
         }
 
+        TilePos queryPos = new TilePos();
         if (this.isTop) {
-            final @Nullable Block<?> b = world.getBlock(tilePos.down());
+            final @Nullable Block<?> b = world.getBlock(tilePos.down(queryPos));
             if (b != null && b.getLogic() instanceof BlockLogicDoor) {
-                ((BlockLogicDoor) b.getLogic()).onPoweredBlockChange(world, tilePos.down(), isPowered);
+                ((BlockLogicDoor) b.getLogic()).onPoweredBlockChange(world, tilePos.down(queryPos), isPowered);
             }
             return;
         }
@@ -181,31 +184,32 @@ public class BlockLogicDoor
         if (isOpen == isPowered) {
             return;
         }
-        final @Nullable Block<?> b = world.getBlock(tilePos.up());
+        final @Nullable Block<?> b = world.getBlock(tilePos.up(queryPos));
         if (b != null && b.getLogic() instanceof BlockLogicDoor) {
-            world.setBlockDataNotify(tilePos.up(), data ^ MASK_OPENED);
+            world.setBlockDataNotify(tilePos.up(queryPos), data ^ MASK_OPENED);
         }
         world.setBlockDataNotify(tilePos, data ^ MASK_OPENED);
-        world.markBlocksDirty(tilePos.down(), tilePos);
+        world.markBlocksDirty(tilePos.down(queryPos), tilePos);
         world.playBlockEvent(tilePos, LevelListener.EVENT_DOOR_SOUND, 0);
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         final int data = world.getBlockData(tilePos);
         final @Nullable Block<?> neighbor = Blocks.getBlock(id);
 
+        TilePos queryPos = new TilePos();
         if (this.isTop) {
-            final @Nullable Block<?> b = world.getBlock(tilePos.down());
+            final @Nullable Block<?> b = world.getBlock(tilePos.down(queryPos));
             if (!(b != null && b.getLogic() instanceof BlockLogicDoor)) {
                 world.setBlockIdNotify(tilePos, 0);
             }
             if (b != null && neighbor != null && neighbor.isSignalSource()) {
-                b.onNeighborChanged(world, tilePos.down(), id);
+                b.onNeighborChanged(world, tilePos.down(queryPos), id);
             }
         } else {
             boolean hasCommittedSuicide = false;
-            final @Nullable Block<?> otherBlock = world.getBlock(tilePos.up());
+            final @Nullable Block<?> otherBlock = world.getBlock(tilePos.up(queryPos));
             if (!(otherBlock != null && otherBlock.getLogic() instanceof BlockLogicDoor)) {
                 world.setBlockIdNotify(tilePos, 0);
                 hasCommittedSuicide = true;
@@ -215,25 +219,26 @@ public class BlockLogicDoor
                 world.setBlockIdNotify(tilePos, 0);
                 hasCommittedSuicide = true;
                 if (otherBlock != null && otherBlock.getLogic() instanceof BlockLogicDoor) {
-                    world.setBlockIdNotify(tilePos.up(), 0);
+                    world.setBlockIdNotify(tilePos.up(queryPos), 0);
                 }
             }
             if (!hasCommittedSuicide && neighbor != null && neighbor.isSignalSource()) {
-                final boolean hasSignal = world.hasNeighborSignal(tilePos) || world.hasNeighborSignal(tilePos.up());
+                final boolean hasSignal = world.hasNeighborSignal(tilePos) || world.hasNeighborSignal(tilePos.up(queryPos));
                 this.onPoweredBlockChange(world, tilePos, hasSignal);
             }
         }
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
+        TilePos queryPos = new TilePos();
         if (this.isTop) {
-            if (world.getBlockLogic(tilePos.down(), BlockLogicDoor.class) != null) {
-                world.setBlockIdNotify(tilePos.down(), 0);
+            if (world.getBlockLogic(tilePos.down(queryPos), BlockLogicDoor.class) != null) {
+                world.setBlockIdNotify(tilePos.down(queryPos), 0);
             }
         } else {
-            if (world.getBlockLogic(tilePos.up(), BlockLogicDoor.class) != null) {
-                world.setBlockIdNotify(tilePos.up(), 0);
+            if (world.getBlockLogic(tilePos.up(queryPos), BlockLogicDoor.class) != null) {
+                world.setBlockIdNotify(tilePos.up(queryPos), 0);
             }
         }
     }
@@ -242,9 +247,9 @@ public class BlockLogicDoor
     public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final int data, final @Nullable TileEntity tileEntity) {
         if (this.droppedItem == null) return null;
         if (this.requireTool && dropCause != EnumDropCause.IMPROPER_TOOL) {
-            return new ItemStack[] { new ItemStack(this.droppedItem.get()) };
+            return new ItemStack[]{new ItemStack(this.droppedItem.get())};
         } else if (!this.requireTool) {
-            return new ItemStack[] { new ItemStack(this.droppedItem.get()) };
+            return new ItemStack[]{new ItemStack(this.droppedItem.get())};
         }
 
         return null;
@@ -266,25 +271,26 @@ public class BlockLogicDoor
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
-        if (tilePos.y >= world.getHeightBlocks() - 1) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        if (tilePos.y() >= world.getHeightBlocks() - 1) {
             return false;
         } else {
-            return this.isSupported(world, tilePos, world.getBlockData(tilePos)) && super.canPlaceAt(world, tilePos.up());
+            return this.isSupported(world, tilePos, world.getBlockData(tilePos)) && super.canPlaceAt(world, tilePos.up(new TilePos()));
         }
     }
 
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
-        if (tilePos.y >= world.getHeightBlocks() - 1) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
+        if (tilePos.y() >= world.getHeightBlocks() - 1) {
             return false;
         } else {
-            return this.isSupported(world, tilePos, data) && super.canPlaceAt(world, tilePos.up());
+            return this.isSupported(world, tilePos, data) && super.canPlaceAt(world, tilePos.up(new TilePos()));
         }
     }
 
-    public boolean isSupported(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public boolean isSupported(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         if (this.isTop) return true;
-        final @NotNull ISupport sBelow = world.getSupport(tilePos.down(), Side.TOP);
+        TilePos queryPos = new TilePos();
+        final @NotNull ISupport sBelow = world.getSupport(tilePos.down(queryPos), Side.TOP);
         final boolean opened = (data & MASK_OPENED) != 0;
         final boolean hinge = (data & MASK_HINGE) != 0;
         final @NotNull Side side;
@@ -294,22 +300,22 @@ public class BlockLogicDoor
                 switch (this.getRotation(data)) {
                     case 0: {
                         side = Side.WEST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 1: {
                         side = Side.NORTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 2: {
                         side = Side.EAST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 3: {
                         side = Side.SOUTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
 
@@ -318,22 +324,22 @@ public class BlockLogicDoor
                 switch (this.getRotation(data)) {
                     case 0: {
                         side = Side.NORTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 1: {
                         side = Side.EAST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 2: {
                         side = Side.SOUTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 3: {
                         side = Side.WEST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                 }
@@ -343,22 +349,22 @@ public class BlockLogicDoor
                 switch (this.getRotation(data)) {
                     case 0: {
                         side = Side.NORTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 1: {
                         side = Side.EAST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 2: {
                         side = Side.SOUTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
                     case 3: {
                         side = Side.WEST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.right(), side);
                     }
 
@@ -367,22 +373,22 @@ public class BlockLogicDoor
                 switch (this.getRotation(data)) {
                     case 0: {
                         side = Side.EAST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 1: {
                         side = Side.SOUTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.up(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 2: {
                         side = Side.WEST;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.right(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                     case 3: {
                         side = Side.NORTH;
-                        hingeSupport = world.getSupport(tilePos.add(side.getDirection()), side.getOpposite());
+                        hingeSupport = world.getSupport(tilePos.add(side.getDirection(), queryPos), side.getOpposite());
                         return sBelow.canSupport(PartialSupport.INSTANCE.left(), Side.BOTTOM) || sBelow.canSupport(PartialSupport.INSTANCE.down(), Side.BOTTOM) || hingeSupport.canSupport(PartialSupport.INSTANCE.left(), side);
                     }
                 }
@@ -392,28 +398,29 @@ public class BlockLogicDoor
     }
 
     @Override
-    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
     @Override
     public boolean canBePainted() {
-        return this.material == Material.wood;
+        return this.material == Materials.WOOD;
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
+        TilePos queryPos = new TilePos();
         final int data = world.getBlockData(tilePos);
         if (this.isTop) {
             world.setBlockIdDataRaw(tilePos, Blocks.DOOR_PLANKS_PAINTED_TOP.id(), data);
             Blocks.DOOR_PLANKS_PAINTED_TOP.getLogic().setColor(world, tilePos, color);
-            world.setBlockIdDataRaw(tilePos.down(), Blocks.DOOR_PLANKS_PAINTED_BOTTOM.id(), data);
-            Blocks.DOOR_PLANKS_PAINTED_BOTTOM.getLogic().setColor(world, tilePos.down(), color);
+            world.setBlockIdDataRaw(tilePos.down(queryPos), Blocks.DOOR_PLANKS_PAINTED_BOTTOM.id(), data);
+            Blocks.DOOR_PLANKS_PAINTED_BOTTOM.getLogic().setColor(world, tilePos.down(queryPos), color);
         } else {
             world.setBlockIdDataRaw(tilePos, Blocks.DOOR_PLANKS_PAINTED_BOTTOM.id(), data);
             Blocks.DOOR_PLANKS_PAINTED_BOTTOM.getLogic().setColor(world, tilePos, color);
-            world.setBlockIdDataRaw(tilePos.up(), Blocks.DOOR_PLANKS_PAINTED_TOP.id(), data);
-            Blocks.DOOR_PLANKS_PAINTED_TOP.getLogic().setColor(world, tilePos.up(), color);
+            world.setBlockIdDataRaw(tilePos.up(queryPos), Blocks.DOOR_PLANKS_PAINTED_TOP.id(), data);
+            Blocks.DOOR_PLANKS_PAINTED_TOP.getLogic().setColor(world, tilePos.up(queryPos), color);
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoorPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoorPainted.java
index 4b5aadc65..46654d5ca 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoorPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicDoorPainted.java
@@ -8,6 +8,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -20,7 +21,7 @@ public class BlockLogicDoorPainted
 
     @Override
     public @NotNull ItemStack @Nullable [] getBreakResult(final @NotNull World world, final @NotNull EnumDropCause dropCause, final int data, final @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Items.DOOR_OAK_PAINTED, 1, 15 - (data >> 4 & 0xF)) };
+        return new ItemStack[]{new ItemStack(Items.DOOR_OAK_PAINTED, 1, 15 - (data >> 4 & 0xF))};
     }
 
     @Override
@@ -39,24 +40,24 @@ public class BlockLogicDoorPainted
     }
 
     @Override
-    public void removeDye(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int data = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, this.isTop ? Blocks.DOOR_PLANKS_OAK_TOP.id() : Blocks.DOOR_PLANKS_OAK_BOTTOM.id(), data & 0xF);
         if (this.isTop) {
-            world.setBlockIdDataNotify(tilePos.down(), Blocks.DOOR_PLANKS_OAK_BOTTOM.id(), data & 0xF);
+            world.setBlockIdDataNotify(tilePos.down(new TilePos()), Blocks.DOOR_PLANKS_OAK_BOTTOM.id(), data & 0xF);
         } else {
-            world.setBlockIdDataNotify(tilePos.up(), Blocks.DOOR_PLANKS_OAK_TOP.id(), data & 0xF);
+            world.setBlockIdDataNotify(tilePos.up(new TilePos()), Blocks.DOOR_PLANKS_OAK_TOP.id(), data & 0xF);
         }
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         final int data = world.getBlockData(tilePos);
         world.setBlockDataNotify(tilePos, data & 0xF | this.toMetadata(color));
         if (this.isTop) {
-            world.setBlockDataNotify(tilePos.down(), data & 0xF | this.toMetadata(color));
+            world.setBlockDataNotify(tilePos.down(new TilePos()), data & 0xF | this.toMetadata(color));
         } else {
-            world.setBlockDataNotify(tilePos.up(), data & 0xF | this.toMetadata(color));
+            world.setBlockDataNotify(tilePos.up(new TilePos()), data & 0xF | this.toMetadata(color));
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicEdible.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicEdible.java
index 5d0405b4f..54e75a7ac 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicEdible.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicEdible.java
@@ -1,16 +1,18 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -22,7 +24,7 @@ public abstract class BlockLogicEdible
     public int maxBites;
 
     public BlockLogicEdible(final @NotNull Block<?> block, final int maxBites, final @NotNull Supplier<@NotNull Item> dropItemSupplier) {
-        super(block, Material.cake);
+        super(block, Materials.CAKE);
         this.maxBites = maxBites;
         this.itemSupplier = dropItemSupplier;
     }
@@ -47,11 +49,11 @@ public abstract class BlockLogicEdible
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
-    private void eatSlice(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player) {
+    private void eatSlice(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player) {
         if (player.getHealth() < player.getMaxHealth()) {
             player.heal(this.getHealAmount(world, tilePos));
             final int data = world.getBlockData(tilePos) + 1;
@@ -64,7 +66,7 @@ public abstract class BlockLogicEdible
         }
     }
 
-    public abstract int getHealAmount(final @NotNull World world, final @NotNull TilePos tilePos);
+    public abstract int getHealAmount(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     public final int getHealAmount(final @NotNull World world, final int x, final int y, final int z) {
@@ -72,7 +74,7 @@ public abstract class BlockLogicEdible
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @Nullable Side side, final double xHit, final double yHit) {
         if (player.getHealth() == player.getMaxHealth()) {
             return false;
         }
@@ -82,7 +84,7 @@ public abstract class BlockLogicEdible
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (!super.canPlaceAt(world, tilePos)) {
             return false;
         } else {
@@ -91,14 +93,14 @@ public abstract class BlockLogicEdible
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         if (!this.canStay(world, tilePos)) {
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
     @Override
-    public boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos) {
-        return world.getBlockMaterial(tilePos.down()).isSolid();
+    public boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        return world.getBlockMaterial(tilePos.add(Direction.DOWN, new TilePos())).isSolid();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFarmland.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFarmland.java
index 38967af71..522ed5823 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFarmland.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFarmland.java
@@ -2,6 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -11,16 +12,17 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.enums.HumanArmorShape;
 import net.minecraft.core.item.IBonemealable;
-import net.minecraft.core.item.Item;
-import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -31,7 +33,7 @@ public class BlockLogicFarmland
     public static final int MASK_WET = 0b0000_1111;
 
     public BlockLogicFarmland(final @NotNull Block<?> block) {
-        super(block, Material.dirt);
+        super(block, Materials.DIRT);
 
         this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
         block.withLightBlock(255);
@@ -68,17 +70,17 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        return AABB.fromPool(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1, tilePos.y + 1, tilePos.z + 1);
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        return new AABBd(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x() + 1, tilePos.y() + 1, tilePos.z() + 1);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        final @NotNull Material material = source.getBlockMaterial(tilePos.up());
-        if (material == Material.vegetable) {
-            return AABB.fromPool(0, 0, 0, 1, 1, 1);
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        final @NotNull Material material = source.getBlockMaterial(tilePos.up(new TilePos()));
+        if (material == Materials.VEGETABLE) {
+            return new AABBd(0, 0, 0, 1, 1, 1);
         } else {
-            return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
+            return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
         }
     }
 
@@ -98,12 +100,12 @@ public class BlockLogicFarmland
 
     }
 
-    private boolean isCropsNearby(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private boolean isCropsNearby(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int radius = 0;
         final @NotNull TilePos localPos = new TilePos(tilePos);
-        for (localPos.x = tilePos.x - radius; localPos.x <= tilePos.x + radius; localPos.x++) {
-            for (localPos.z = tilePos.z - radius; localPos.z <= tilePos.z + radius; localPos.z++) {
-                if (world.getBlockId(localPos.up()) == Blocks.CROPS_WHEAT.id()) {
+        for (localPos.x = tilePos.x() - radius; localPos.x <= tilePos.x() + radius; localPos.x++) {
+            for (localPos.z = tilePos.z() - radius; localPos.z <= tilePos.z() + radius; localPos.z++) {
+                if (world.getBlockId(localPos.set(localPos.x, tilePos.y() + 1, localPos.z)) == Blocks.CROPS_WHEAT.id()) {
                     return true;
                 }
             }
@@ -119,15 +121,15 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return side == Side.TOP ? PartialSupport.INSTANCE : FullSupport.INSTANCE;
     }
 
-    private boolean isWaterNearby(final @NotNull World world, final @NotNull TilePos tilePos, final int range) {
+    private boolean isWaterNearby(final @NotNull World world, final @NotNull TilePosc tilePos, final int range) {
         final @NotNull TilePos localPos = new TilePos(tilePos);
-        for (localPos.x = tilePos.x - range; localPos.x <= tilePos.x + range; localPos.x++) {
-            for (localPos.y = tilePos.y - range; localPos.y <= tilePos.y + range; localPos.y++) {
-                for (localPos.z = tilePos.z - range; localPos.z <= tilePos.z + range; localPos.z++) {
+        for (localPos.x = tilePos.x() - range; localPos.x <= tilePos.x() + range; localPos.x++) {
+            for (localPos.y = tilePos.y() - range; localPos.y <= tilePos.y() + range; localPos.y++) {
+                for (localPos.z = tilePos.z() - range; localPos.z <= tilePos.z() + range; localPos.z++) {
                     if (Blocks.hasTag(world.getBlockId(localPos), BlockTags.IS_WATER)) {
                         return true;
                     }
@@ -139,7 +141,7 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Entity walker) {
+    public void onEntityWalkedOn(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Entity walker) {
         if (world.rand.nextInt(4) == 0) {
             if (walker instanceof final @NotNull Player player) {
                 final @Nullable ItemStack bootsSlotStack = player.getItemInArmorSlot(HumanArmorShape.BOOTS);
@@ -156,14 +158,14 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
         world.scheduleBlockUpdate(tilePos, this.block.id(), this.tickDelay() - world.rand.nextInt(10) + world.rand.nextInt(10));
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
-        final @NotNull Material material = world.getBlockMaterial(tilePos.up());
-        if (material.isSolid() && material != Material.vegetable) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
+        final @NotNull Material material = world.getBlockMaterial(tilePos.up(new TilePos()));
+        if (material.isSolid() && material != Materials.VEGETABLE) {
             if (isWet(world.getBlockData(tilePos))) {
                 world.setBlockIdNotify(tilePos, Blocks.MUD.id());
             } else {
@@ -174,7 +176,7 @@ public class BlockLogicFarmland
         }
     }
 
-    private boolean canBecomeWet(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private boolean canBecomeWet(final @NotNull World world, final @NotNull TilePosc tilePos) {
         // If there's water within 1 block, it can become wet
         if (this.isWaterNearby(world, tilePos, 1))
             return true;
@@ -182,9 +184,9 @@ public class BlockLogicFarmland
         // If there's water 3 blocks...
         if (this.isWaterNearby(world, tilePos, 4)) {
             final @NotNull TilePos localPos = new TilePos(tilePos);
-            for (localPos.x = tilePos.x - 1; localPos.x <= tilePos.x + 1; localPos.x++) {
-                for (localPos.y = tilePos.y - 1; localPos.y <= tilePos.y + 1; localPos.y++) {
-                    for (localPos.z = tilePos.z - 1; localPos.z <= tilePos.z + 1; localPos.z++) {
+            for (localPos.x = tilePos.x() - 1; localPos.x <= tilePos.x() + 1; localPos.x++) {
+                for (localPos.y = tilePos.y() - 1; localPos.y <= tilePos.y() + 1; localPos.y++) {
+                    for (localPos.z = tilePos.z() - 1; localPos.z <= tilePos.z() + 1; localPos.z++) {
                         //...And the block is next to another wet mud block, it can become wet
                         final int bID = world.getBlockId(localPos);
                         if (bID == Blocks.MUD.id() || (bID == Blocks.FARMLAND_DIRT.id() && BlockLogicFarmland.isWet(world.getBlockData(localPos)))) {
@@ -205,14 +207,14 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         if (rand.nextInt(2) != 0) {
             world.scheduleBlockUpdate(tilePos, this.block.id(), this.tickDelay() - rand.nextInt(10) + rand.nextInt(10));
             return;
         }
         final int data = world.getBlockData(tilePos);
         final int hydration = getWet(data);
-        if (this.isWaterNearby(world, tilePos, 4) || world.isBlockBeingRainedOn(tilePos.up())) {
+        if (this.isWaterNearby(world, tilePos, 4) || world.isBlockBeingRainedOn(tilePos.up(new TilePos()))) {
             if (hydration < 15 && this.canBecomeWet(world, tilePos)) {
                 world.setBlockDataNotify(tilePos, setWet(data, hydration + 1));
                 world.scheduleBlockUpdate(tilePos, this.block.id(), this.tickDelay() - rand.nextInt(10) + rand.nextInt(10));
@@ -228,7 +230,7 @@ public class BlockLogicFarmland
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final int data = world.getBlockData(tilePos);
         if (!isFertilized(data) && itemStack.consumeItem(player)) {
             world.setBlockDataNotify(tilePos, setFertilized(data, true));
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFence.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFence.java
index eb4c4f497..7fba10c2d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFence.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFence.java
@@ -1,26 +1,28 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
+import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.util.helper.DyeColor;
+import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
-import java.util.Objects;
 
 public class BlockLogicFence
     extends BlockLogic
     implements IPaintable {
     public BlockLogicFence(final @NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
     }
 
     @Override
@@ -29,7 +31,7 @@ public class BlockLogicFence
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side.isVertical()) {
             return PartialSupport.INSTANCE.center();
         } else {
@@ -38,41 +40,41 @@ public class BlockLogicFence
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        return Objects.requireNonNull(super.getCollisionAABB(source, tilePos)).expand(0, 0.5, 0);
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        return MathHelper.aabbExpand(super.getBoundsFromState(source, tilePos), 0, 0.5, 0, new AABBd());
     }
 
     @Override
-    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull AABBdc aabb, final @NotNull List<@NotNull AABBdc> aabbList) {
         final boolean connectEast = this.canConnectTo(world, tilePos, Side.EAST);
         final boolean connectWest = this.canConnectTo(world, tilePos, Side.WEST);
         final boolean connectSouth = this.canConnectTo(world, tilePos, Side.SOUTH);
         final boolean connectNorth = this.canConnectTo(world, tilePos, Side.NORTH);
         final double thickness = 0.5 - 0.375;
         if (connectEast) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 1, 1.5, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 1, 1.5, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectWest) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectSouth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 1).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 1).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectNorth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0, 0.5 + thickness, 1.5, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0, 0.5 + thickness, 1.5, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (!connectEast && !connectWest && !connectSouth && !connectNorth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1.5, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final boolean connectXPos = this.canConnectTo(source, tilePos, Side.EAST);
         final boolean connectXNeg = this.canConnectTo(source, tilePos, Side.WEST);
         final boolean connectZPos = this.canConnectTo(source, tilePos, Side.SOUTH);
         final boolean connectZNeg = this.canConnectTo(source, tilePos, Side.NORTH);
-        return AABB.fromPool((connectXNeg ? 0.0f : 0.375f), 0, (connectZNeg ? 0.0f : 0.375f), 1 - (connectXPos ? 0.0f : 0.375f), 1, 1 - (connectZPos ? 0.0f : 0.375f));
+        return new AABBd((connectXNeg ? 0.0f : 0.375f), 0, (connectZNeg ? 0.0f : 0.375f), 1 - (connectXPos ? 0.0f : 0.375f), 1, 1 - (connectZPos ? 0.0f : 0.375f));
     }
 
     @Override
@@ -85,9 +87,10 @@ public class BlockLogicFence
         return false;
     }
 
-    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final Block<?> b = source.getBlock(tilePos.add(side.getDirection()));
-        return Blocks.hasTag(b, BlockTags.FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection())) == side.getOpposite());
+    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
+        TilePos queryPos = new TilePos();
+        final Block<?> b = source.getBlock(tilePos.add(side.getDirection(), queryPos));
+        return Blocks.hasTag(b, BlockTags.FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection(), queryPos)) == side.getOpposite());
     }
 
     @Deprecated
@@ -96,7 +99,7 @@ public class BlockLogicFence
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         world.setBlockId(tilePos, Blocks.FENCE_PLANKS_OAK_PAINTED.id());
         Blocks.FENCE_PLANKS_OAK_PAINTED.getLogic().setColor(world, tilePos, color);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceChainlink.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceChainlink.java
index 089064678..8d43bf7ea 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceChainlink.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceChainlink.java
@@ -6,6 +6,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -15,13 +16,14 @@ public class BlockLogicFenceChainlink extends BlockLogicFenceThin {
     }
 
     @Override
-    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection()));
-        return Blocks.hasTag(b, BlockTags.CHAINLINK_FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection())) == side.getOpposite());
+    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
+        TilePos queryPos = new TilePos();
+        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection(), queryPos));
+        return Blocks.hasTag(b, BlockTags.CHAINLINK_FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection(), queryPos)) == side.getOpposite());
     }
 
     @Override
-    public boolean isClimbable(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean isClimbable(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return true;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
index 15a57940b..4072c74cd 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
@@ -1,25 +1,25 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.tag.ItemTags;
-import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicFenceGate
     extends BlockLogic
@@ -29,30 +29,31 @@ public class BlockLogicFenceGate
     public static final int MASK_POWERED = 0b0000_1000;
 
     public BlockLogicFenceGate(final @NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final int metadata = source.getBlockData(tilePos);
         if (isOpen(metadata)) {
             return null;
         } else {
-            return this.getAABBFromMeta(metadata).grow(0, 0.25f, 0).move(tilePos.x, tilePos.y + 0.25f, tilePos.z);
+            AABBd collisionBB = (AABBd) this.getAABBFromMeta(metadata);
+            return MathHelper.aabbGrow(collisionBB, 0, 0.25f, 0, collisionBB).translate(tilePos.x(), tilePos.y() + 0.25f, tilePos.z());
         }
     }
 
-    private @NotNull AABB getAABBFromMeta(final int meta) {
+    private @NotNull AABBdc getAABBFromMeta(final int meta) {
         if (getDirection(meta) == 3 || getDirection(meta) == 1) {
-            return AABB.fromPool(0.375f, 0, 0, 1 - 0.375f, 1.0F, 1f);
+            return new AABBd(0.375f, 0, 0, 1 - 0.375f, 1.0F, 1f);
         } else {
-            return AABB.fromPool(0, 0, 0.375f, 1, 1.0f, 1 - 0.375f);
+            return new AABBd(0, 0, 0.375f, 1, 1.0f, 1 - 0.375f);
         }
 
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return this.getAABBFromMeta(source.getBlockData(tilePos));
     }
 
@@ -67,19 +68,19 @@ public class BlockLogicFenceGate
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         final int direction = mob.getHorizontalPlacementDirection(side).getHorizontalIndex();
         final int meta = world.getBlockData(tilePos);
         world.setBlockDataNotify(tilePos, direction | (meta & ~MASK_DIRECTION));
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, @NotNull Side side, final double xHit, final double yHit) {
         if (!side.isHorizontal()) {
             side = Side.NORTH;
         }
@@ -89,14 +90,14 @@ public class BlockLogicFenceGate
     }
 
     @Override
-    public void onAttacked(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onAttacked(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Player player, final @NotNull Side side, final double xHit, final double yHit) {
         if (!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
             this.onInteracted(world, tilePos, player, null, 0.0, 0.0);
         }
     }
 
     @Override
-    public boolean onInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @Nullable Player player, final @Nullable Side side, final double xHit, final double yHit) {
+    public boolean onInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @Nullable Player player, final @Nullable Side side, final double xHit, final double yHit) {
         int data = world.getBlockData(tilePos);
         if (isOpen(data)) {
             world.setBlockDataNotify(tilePos, data & ~MASK_OPEN);
@@ -118,7 +119,7 @@ public class BlockLogicFenceGate
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         final int data = world.getBlockData(tilePos);
         final boolean wasPowered = isPowered(data);
         final boolean hasPower = world.hasNeighborSignal(tilePos) || world.hasDirectSignal(tilePos);
@@ -132,7 +133,7 @@ public class BlockLogicFenceGate
     }
 
     @Override
-    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
+    public void onActivatorInteracted(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull TileEntityActivator activator, final @NotNull Direction direction) {
         this.onInteracted(world, tilePos, null, direction.getSide(), 0.5, 0.5);
     }
 
@@ -149,7 +150,7 @@ public class BlockLogicFenceGate
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         world.setBlockIdDataNotify(tilePos, Blocks.FENCE_GATE_PLANKS_OAK_PAINTED.id(), world.getBlockData(tilePos));
         Blocks.FENCE_GATE_PLANKS_OAK_PAINTED.getLogic().setColor(world, tilePos, color);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGatePainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGatePainted.java
index 333f0809b..f280a126d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGatePainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGatePainted.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,7 +19,7 @@ public class BlockLogicFenceGatePainted extends BlockLogicFenceGate implements I
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return itemStack.getMetadata();
     }
 
@@ -44,13 +44,13 @@ public class BlockLogicFenceGatePainted extends BlockLogicFenceGate implements I
     }
 
     @Override
-    public void removeDye(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.FENCE_GATE_PLANKS_OAK.id(), meta & ~MASK_COLOR);
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFencePainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFencePainted.java
index 7d8a7de7f..9b3700013 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFencePainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFencePainted.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -17,7 +17,7 @@ public class BlockLogicFencePainted extends BlockLogicFence implements IPainted
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return itemStack.getMetadata();
     }
 
@@ -42,12 +42,12 @@ public class BlockLogicFencePainted extends BlockLogicFence implements IPainted
     }
 
     @Override
-    public void removeDye(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos) {
         world.setBlockIdNotify(tilePos, Blocks.FENCE_PLANKS_OAK.id());
     }
 
     @Override
-    public void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    public void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceSteel.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceSteel.java
index d134922f6..30c787238 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceSteel.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceSteel.java
@@ -5,6 +5,7 @@ import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -15,8 +16,9 @@ public class BlockLogicFenceSteel
     }
 
     @Override
-    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection()));
-        return Blocks.hasTag(b, BlockTags.CHAINLINK_FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection())) == side.getOpposite());
+    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
+        TilePos queryPos = new TilePos();
+        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection(), queryPos));
+        return Blocks.hasTag(b, BlockTags.CHAINLINK_FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection(), queryPos)) == side.getOpposite());
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceThin.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceThin.java
index 643aaa660..4629a5fb3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceThin.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceThin.java
@@ -4,12 +4,14 @@ import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 
@@ -25,7 +27,7 @@ public abstract class BlockLogicFenceThin
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         if (side.isVertical()) {
             return PartialSupport.INSTANCE.center();
         } else {
@@ -34,44 +36,44 @@ public abstract class BlockLogicFenceThin
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final boolean connectEast = this.canConnectTo(source, tilePos, Side.EAST);
         final boolean connectWest = this.canConnectTo(source, tilePos, Side.WEST);
         final boolean connectSouth = this.canConnectTo(source, tilePos, Side.SOUTH);
         final boolean connectNorth = this.canConnectTo(source, tilePos, Side.NORTH);
-        return AABB.fromPool((connectWest ? 0.0f : 0.375f), 0, (connectNorth ? 0.0f : 0.375f), 1 - (connectEast ? 0.0f : 0.375f), 1, 1 - (connectSouth ? 0.0f : 0.375f));
+        return new AABBd((connectWest ? 0.0f : 0.375f), 0, (connectNorth ? 0.0f : 0.375f), 1 - (connectEast ? 0.0f : 0.375f), 1, 1 - (connectSouth ? 0.0f : 0.375f));
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         final boolean connectEast = this.canConnectTo(source, tilePos, Side.EAST);
         final boolean connectWest = this.canConnectTo(source, tilePos, Side.WEST);
         final boolean connectSouth = this.canConnectTo(source, tilePos, Side.SOUTH);
         final boolean connectNorth = this.canConnectTo(source, tilePos, Side.NORTH);
-        return AABB.fromPool((connectWest ? 0.0f : 0.375f), 0, (connectNorth ? 0.0f : 0.375f), 1 - (connectEast ? 0.0f : 0.375f), 1, 1 - (connectSouth ? 0.0f : 0.375f));
+        return new AABBd((connectWest ? 0.0f : 0.375f), 0, (connectNorth ? 0.0f : 0.375f), 1 - (connectEast ? 0.0f : 0.375f), 1, 1 - (connectSouth ? 0.0f : 0.375f));
     }
 
     @Override
-    public void getCollisionAABBs(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull AABB aabb, final @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(@NotNull World world, @NotNull TilePosc tilePos, @NotNull AABBdc aabb, @NotNull List<@NotNull AABBdc> aabbList) {
         final boolean connectEast = this.canConnectTo(world, tilePos, Side.EAST);
         final boolean connectWest = this.canConnectTo(world, tilePos, Side.WEST);
         final boolean connectSouth = this.canConnectTo(world, tilePos, Side.SOUTH);
         final boolean connectNorth = this.canConnectTo(world, tilePos, Side.NORTH);
         final double thickness = 0.5 - 0.375;
         if (connectEast) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 1, 1, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 1, 1, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectWest) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0, 0, 0.5 - thickness, 0.5 + thickness, 1, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0, 0, 0.5 - thickness, 0.5 + thickness, 1, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectSouth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1, 1).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1, 1).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (connectNorth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0, 0.5 + thickness, 1, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0, 0.5 + thickness, 1, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
         if (!connectEast && !connectWest && !connectSouth && !connectNorth) {
-            this.addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1, 0.5 + thickness).move(tilePos), aabbList);
+            this.addIntersectingBoundingBox(aabb, new AABBd(0.5 - thickness, 0, 0.5 - thickness, 0.5 + thickness, 1, 0.5 + thickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
         }
     }
 
@@ -85,26 +87,27 @@ public abstract class BlockLogicFenceThin
         return false;
     }
 
-    public abstract boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side);
+    public abstract boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
     @Deprecated
     public final boolean canConnectTo(final @NotNull WorldSource world, final int x, final int y, final int z, final @NotNull Side side) {
         return this.canConnectTo(world, new TilePos(x, y, z), side);
     }
 
-    public boolean shouldDrawColumn(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public boolean shouldDrawColumn(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final boolean drawColumn = this.shouldDrawColumn_do(source, tilePos);
         if (drawColumn) return true;
 
+        TilePos queryPos = new TilePos();
         int oy = 1;
-        while (source.getBlockId(tilePos.add(0, oy, 0)) == this.block.id()) {
+        while (source.getBlockId(tilePos.add(0, oy, 0, queryPos)) == this.block.id()) {
             oy++;
         }
         oy--;
 
         boolean drawColumnFromOther = false;
-        while (source.getBlockId(tilePos.add(0, oy, 0)) == this.block.id()) {
-            if (this.shouldDrawColumn_do(source, tilePos.add(0, oy, 0))) {
+        while (source.getBlockId(tilePos.add(0, oy, 0, queryPos)) == this.block.id()) {
+            if (this.shouldDrawColumn_do(source, tilePos.add(0, oy, 0, queryPos))) {
                 drawColumnFromOther = true;
                 break;
             }
@@ -114,7 +117,7 @@ public abstract class BlockLogicFenceThin
         return drawColumnFromOther;
     }
 
-    private boolean shouldDrawColumn_do(final @NotNull WorldSource world, final @NotNull TilePos tilePos) {
+    private boolean shouldDrawColumn_do(final @NotNull WorldSource world, final @NotNull TilePosc tilePos) {
         final boolean connectNorth = this.canConnectTo(world, tilePos, Side.NORTH);
         final boolean connectSouth = this.canConnectTo(world, tilePos, Side.SOUTH);
         final boolean connectEast = this.canConnectTo(world, tilePos, Side.EAST);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceWallPaper.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceWallPaper.java
index c8417f3d7..83afe05c4 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceWallPaper.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceWallPaper.java
@@ -5,6 +5,7 @@ import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -15,8 +16,9 @@ public class BlockLogicFenceWallPaper
     }
 
     @Override
-    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection()));
-        return Blocks.hasTag(b, BlockTags.FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection())) == side.getOpposite());
+    public boolean canConnectTo(final @NotNull WorldSource source, final @NotNull TilePosc tilePos, final @NotNull Side side) {
+        TilePos queryPos = new TilePos();
+        final @Nullable Block<?> b = source.getBlock(tilePos.add(side.getDirection(), queryPos));
+        return Blocks.hasTag(b, BlockTags.FENCES_CONNECT) || (b != null && b.getAttachedSide(source, tilePos.add(side.getDirection(), queryPos)) == side.getOpposite());
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFire.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFire.java
index a3b0c5c11..949369358 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFire.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFire.java
@@ -1,22 +1,23 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.data.gamerule.GameRules;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.weather.IPrecipitation;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -35,7 +36,7 @@ public class BlockLogicFire
     private static final int @NotNull [] burnChance = new int[Blocks.blocksList.length];
 
     public BlockLogicFire(final @NotNull Block<?> block) {
-        super(block, Material.fire);
+        super(block, Materials.FIRE);
         block.setTicking(true);
         this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
     }
@@ -88,7 +89,7 @@ public class BlockLogicFire
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -103,14 +104,14 @@ public class BlockLogicFire
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public void onRemoved(final @NotNull World world, final @NotNull TilePos tilePos, final int data) {
+    public void onRemoved(final @NotNull World world, final @NotNull TilePosc tilePos, final int data) {
         for (int i = 0; i < 8; i++) {
-            world.spawnParticle("largesmoke", tilePos.x + Math.random(), tilePos.y + 0.5D, tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 0);
+            world.spawnParticle("largesmoke", tilePos.x() + Math.random(), tilePos.y() + 0.5D, tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 0);
         }
     }
 
@@ -119,27 +120,28 @@ public class BlockLogicFire
         return 40;
     }
 
-    public void setBurnResult(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void setBurnResult(final @NotNull World world, final @NotNull TilePosc tilePos) {
         world.setBlockIdNotify(tilePos, this.getBurnResultId(world, tilePos));
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
-        final @Nullable Block<?> blockUnder = world.getBlock(tilePos.down());
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+        TilePos queryPos = new TilePos();
+
+        final @Nullable Block<?> blockUnder = world.getBlock(tilePos.down(queryPos));
         final boolean infiniBurn = blockUnder != null && blockUnder.hasTag(BlockTags.INFINITE_BURN);
 
         // Extinguish fire
         if (!this.isValidFireLocation(world, tilePos)) {
             this.setBurnResult(world, tilePos);
         }
-
         // Extinguish fire (Rain / Snow)
         if (!infiniBurn && world.getCurrentWeather() != null && world.getCurrentWeather() instanceof IPrecipitation && (
             world.isBlockBeingRainedOn(tilePos)
-                || world.isBlockBeingRainedOn(tilePos.west())
-                || world.isBlockBeingRainedOn(tilePos.east())
-                || world.isBlockBeingRainedOn(tilePos.north())
-                || world.isBlockBeingRainedOn(tilePos.south()))) {
+                || world.isBlockBeingRainedOn(tilePos.west(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.east(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.north(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.south(queryPos)))) {
             this.setBurnResult(world, tilePos);
             return;
         }
@@ -152,35 +154,35 @@ public class BlockLogicFire
 
 
         if (!infiniBurn && !this.canNeighborCatchFire(world, tilePos)) {
-            if (!world.isBlockNormalCube(tilePos.down()) || meta > 3) {
+            if (!world.isBlockNormalCube(tilePos.down(queryPos)) || meta > 3) {
                 this.setBurnResult(world, tilePos);
             }
             return;
         }
 
-        if (!infiniBurn && !canBurn(world, tilePos.down()) && meta == 15 && rand.nextInt(4) == 0) {
+        if (!infiniBurn && !canBurn(world, tilePos.down(queryPos)) && meta == 15 && rand.nextInt(4) == 0) {
             this.setBurnResult(world, tilePos);
             return;
         }
 
-        this.checkBurn(world, tilePos.east(), 300, rand, meta);
-        this.checkBurn(world, tilePos.west(), 300, rand, meta);
-        this.checkBurn(world, tilePos.down(), 250, rand, meta);
-        this.checkBurn(world, tilePos.up(), 250, rand, meta);
-        this.checkBurn(world, tilePos.north(), 300, rand, meta);
-        this.checkBurn(world, tilePos.south(), 300, rand, meta);
+        this.checkBurn(world, tilePos.east(queryPos), 300, rand, meta);
+        this.checkBurn(world, tilePos.west(queryPos), 300, rand, meta);
+        this.checkBurn(world, tilePos.down(queryPos), 250, rand, meta);
+        this.checkBurn(world, tilePos.up(queryPos), 250, rand, meta);
+        this.checkBurn(world, tilePos.north(queryPos), 300, rand, meta);
+        this.checkBurn(world, tilePos.south(queryPos), 300, rand, meta);
 
         final @NotNull TilePos localPos = new TilePos(tilePos);
-        for (localPos.x = tilePos.x - 1; localPos.x <= tilePos.x + 1; localPos.x++) {
-            for (localPos.z = tilePos.z - 1; localPos.z <= tilePos.z + 1; localPos.z++) {
-                for (localPos.y = tilePos.y - 1; localPos.y <= tilePos.y + 4; localPos.y++) {
+        for (localPos.x = tilePos.x() - 1; localPos.x <= tilePos.x() + 1; localPos.x++) {
+            for (localPos.z = tilePos.z() - 1; localPos.z <= tilePos.z() + 1; localPos.z++) {
+                for (localPos.y = tilePos.y() - 1; localPos.y <= tilePos.y() + 4; localPos.y++) {
                     if (localPos.equals(tilePos)) {
                         continue;
                     }
 
                     int a = 100;
-                    if (localPos.y > tilePos.y + 1) {
-                        a += (localPos.y - (tilePos.y + 1)) * 100;
+                    if (localPos.y > tilePos.y() + 1) {
+                        a += (localPos.y - (tilePos.y() + 1)) * 100;
                     }
                     final int b = this.getFireChance(world, localPos);
                     if (b <= 0) {
@@ -190,10 +192,10 @@ public class BlockLogicFire
                     final int c = (b + 40) / (meta + 30);
                     if (c <= 0 || rand.nextInt(a) > c || (world.getCurrentWeather() != null && world.getCurrentWeather() instanceof IPrecipitation) &&
                         world.isBlockBeingRainedOn(localPos)
-                        || world.isBlockBeingRainedOn(localPos.west())
-                        || world.isBlockBeingRainedOn(localPos.east())
-                        || world.isBlockBeingRainedOn(localPos.north())
-                        || world.isBlockBeingRainedOn(localPos.south())
+                        || world.isBlockBeingRainedOn(localPos.west(queryPos))
+                        || world.isBlockBeingRainedOn(localPos.east(queryPos))
+                        || world.isBlockBeingRainedOn(localPos.north(queryPos))
+                        || world.isBlockBeingRainedOn(localPos.south(queryPos))
                     ) {
                         continue;
                     }
@@ -227,31 +229,33 @@ public class BlockLogicFire
         }
     }
 
-    protected boolean canNeighborCatchFire(final @NotNull World world, final @NotNull TilePos tilePos) {
-        if (canBurn(world, tilePos.east())) return true;
-        if (canBurn(world, tilePos.west())) return true;
-        if (canBurn(world, tilePos.down())) return true;
-        if (canBurn(world, tilePos.up())) return true;
-        if (canBurn(world, tilePos.north())) return true;
-        return canBurn(world, tilePos.south());
+    protected boolean canNeighborCatchFire(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        if (canBurn(world, tilePos.east(queryPos))) return true;
+        if (canBurn(world, tilePos.west(queryPos))) return true;
+        if (canBurn(world, tilePos.down(queryPos))) return true;
+        if (canBurn(world, tilePos.up(queryPos))) return true;
+        if (canBurn(world, tilePos.north(queryPos))) return true;
+        return canBurn(world, tilePos.south(queryPos));
     }
 
-    private int getFireChance(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private int getFireChance(final @NotNull World world, final @NotNull TilePosc tilePos) {
         int flammability = 0;
         if (!world.isAirBlock(tilePos)) {
             return 0;
         } else {
-            flammability = getFlammability(world, tilePos.east(), flammability);
-            flammability = getFlammability(world, tilePos.west(), flammability);
-            flammability = getFlammability(world, tilePos.down(), flammability);
-            flammability = getFlammability(world, tilePos.up(), flammability);
-            flammability = getFlammability(world, tilePos.north(), flammability);
-            flammability = getFlammability(world, tilePos.south(), flammability);
+            TilePos queryPos = new TilePos();
+            flammability = getFlammability(world, tilePos.east(queryPos), flammability);
+            flammability = getFlammability(world, tilePos.west(queryPos), flammability);
+            flammability = getFlammability(world, tilePos.down(queryPos), flammability);
+            flammability = getFlammability(world, tilePos.up(queryPos), flammability);
+            flammability = getFlammability(world, tilePos.north(queryPos), flammability);
+            flammability = getFlammability(world, tilePos.south(queryPos), flammability);
             return flammability;
         }
     }
 
-    public static boolean canBurn(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public static boolean canBurn(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return flameChance[source.getBlockId(tilePos)] > 0;
     }
 
@@ -259,29 +263,29 @@ public class BlockLogicFire
         return flameChance[blockId] > 0;
     }
 
-    public static int getFlammability(final @NotNull World world, final @NotNull TilePos tilePos, final int currentFlameChance) {
+    public static int getFlammability(final @NotNull World world, final @NotNull TilePosc tilePos, final int currentFlameChance) {
         final int blockFlameChance = flameChance[world.getBlockId(tilePos)];
         return Math.max(blockFlameChance, currentFlameChance);
     }
 
-    public boolean isValidFireLocation(final @NotNull World world, final @NotNull TilePos tilePos) {
-        return world.isBlockNormalCube(tilePos.down()) || this.canNeighborCatchFire(world, tilePos);
+    public boolean isValidFireLocation(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        return world.isBlockNormalCube(tilePos.down(new TilePos())) || this.canNeighborCatchFire(world, tilePos);
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.isValidFireLocation(world, tilePos);
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
-        if (!world.isBlockNormalCube(tilePos.down()) && !this.canNeighborCatchFire(world, tilePos)) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
+        if (!world.isBlockNormalCube(tilePos.down(new TilePos())) && !this.canNeighborCatchFire(world, tilePos)) {
 
             world.setBlockIdNotify(tilePos, this.getBurnResultId(world, tilePos));
         }
     }
 
-    protected int getBurnResultId(final @NotNull World world, final @NotNull TilePos tilePos) {
+    protected int getBurnResultId(final @NotNull World world, final @NotNull TilePosc tilePos) {
         final int id = world.getBlockId(tilePos);
         final @Nullable Block<?> stoneBlock = BlockLogicMoss.getStoneBlock(id);
         if (stoneBlock != null) {
@@ -291,11 +295,12 @@ public class BlockLogicFire
     }
 
     @Override
-    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePos tilePos) {
-        if (world.getBlockId(tilePos.down()) == Blocks.OBSIDIAN.id() && Blocks.PORTAL_NETHER.getLogic().tryToCreatePortal(world, tilePos, null)) {
+    public void onPlacedByWorld(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        if (world.getBlockId(tilePos.down(queryPos)) == Blocks.OBSIDIAN.id() && Blocks.PORTAL_NETHER.getLogic().tryToCreatePortal(world, tilePos, null)) {
             return;
         }
-        if (!world.isBlockNormalCube(tilePos.down()) && !this.canNeighborCatchFire(world, tilePos)) {
+        if (!world.isBlockNormalCube(tilePos.down(queryPos)) && !this.canNeighborCatchFire(world, tilePos)) {
             world.setBlockIdNotify(tilePos, this.getBurnResultId(world, tilePos));
         } else {
             world.scheduleBlockUpdate(tilePos, this.block.id(), this.tickDelay());
@@ -303,58 +308,59 @@ public class BlockLogicFire
     }
 
     @Override
-    public void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         if (rand.nextInt(24) == 0) {
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5F, tilePos.y + 0.5F, tilePos.z + 0.5F, "fire.fire",
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5F, tilePos.y() + 0.5F, tilePos.z() + 0.5F, "fire.fire",
                 1.0F + rand.nextFloat(), rand.nextFloat() * 0.7F + 0.3F);
         }
-        if (world.isBlockNormalCube(tilePos.down()) || canBurn(world, tilePos.down())) {
+        TilePos queryPos = new TilePos();
+        if (world.isBlockNormalCube(tilePos.down(queryPos)) || canBurn(world, tilePos.down(queryPos))) {
             for (int l = 0; l < 3; l++) {
-                final double x = tilePos.x + rand.nextFloat();
-                final double y = tilePos.y + rand.nextFloat() * 0.5F + 0.5F;
-                final double z = tilePos.z + rand.nextFloat();
+                final double x = tilePos.x() + rand.nextFloat();
+                final double y = tilePos.y() + rand.nextFloat() * 0.5F + 0.5F;
+                final double z = tilePos.z() + rand.nextFloat();
                 world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
             }
 
         } else {
-            if (canBurn(world, tilePos.west())) {
+            if (canBurn(world, tilePos.west(queryPos))) {
                 for (int i = 0; i < 2; i++) {
-                    final double x = tilePos.x + rand.nextFloat() * 0.1F;
-                    final double y = tilePos.y + rand.nextFloat();
-                    final double z = tilePos.z + rand.nextFloat();
+                    final double x = tilePos.x() + rand.nextFloat() * 0.1F;
+                    final double y = tilePos.y() + rand.nextFloat();
+                    final double z = tilePos.z() + rand.nextFloat();
                     world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
                 }
             }
-            if (canBurn(world, tilePos.east())) {
+            if (canBurn(world, tilePos.east(queryPos))) {
                 for (int i = 0; i < 2; i++) {
-                    final double x = (tilePos.x + 1) - rand.nextFloat() * 0.1F;
-                    final double y = tilePos.y + rand.nextFloat();
-                    final double z = tilePos.z + rand.nextFloat();
+                    final double x = (tilePos.x() + 1) - rand.nextFloat() * 0.1F;
+                    final double y = tilePos.y() + rand.nextFloat();
+                    final double z = tilePos.z() + rand.nextFloat();
                     world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
                 }
             }
-            if (canBurn(world, tilePos.north())) {
+            if (canBurn(world, tilePos.north(queryPos))) {
                 for (int i = 0; i < 2; i++) {
-                    final double x = tilePos.x + rand.nextFloat();
-                    final double y = tilePos.y + rand.nextFloat();
-                    final double z = tilePos.z + rand.nextFloat() * 0.1F;
+                    final double x = tilePos.x() + rand.nextFloat();
+                    final double y = tilePos.y() + rand.nextFloat();
+                    final double z = tilePos.z() + rand.nextFloat() * 0.1F;
                     world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
                 }
             }
-            if (canBurn(world, tilePos.south())) {
+            if (canBurn(world, tilePos.south(queryPos))) {
                 for (int i = 0; i < 2; i++) {
-                    final double x = tilePos.x + rand.nextFloat();
-                    final double y = tilePos.y + rand.nextFloat();
-                    final double z = (tilePos.z + 1) - rand.nextFloat() * 0.1F;
+                    final double x = tilePos.x() + rand.nextFloat();
+                    final double y = tilePos.y() + rand.nextFloat();
+                    final double z = (tilePos.z() + 1) - rand.nextFloat() * 0.1F;
                     world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
                 }
 
             }
-            if (canBurn(world, tilePos.up())) {
+            if (canBurn(world, tilePos.up(queryPos))) {
                 for (int i = 0; i < 2; i++) {
-                    final double x = tilePos.x + rand.nextFloat();
-                    final double y = (tilePos.y + 1) - rand.nextFloat() * 0.1F;
-                    final double z = tilePos.z + rand.nextFloat();
+                    final double x = tilePos.x() + rand.nextFloat();
+                    final double y = (tilePos.y() + 1) - rand.nextFloat() * 0.1F;
+                    final double z = tilePos.z() + rand.nextFloat();
                     world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
                 }
             }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFireCold.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFireCold.java
index 58c894cc4..8e98677c2 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFireCold.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFireCold.java
@@ -1,9 +1,9 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.tag.BlockTags;
-import net.minecraft.core.data.gamerule.GameRules;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.weather.IPrecipitation;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -17,8 +17,9 @@ public class BlockLogicFireCold
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
-        final @Nullable Block<?> blockUnder = world.getBlock(tilePos.down());
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+        TilePos queryPos = new TilePos();
+        final @Nullable Block<?> blockUnder = world.getBlock(tilePos.down(queryPos));
         final boolean infiniBurn = blockUnder != null && blockUnder.hasTag(BlockTags.INFINITE_BURN_COLD);
 
         // Extinguish fire
@@ -29,10 +30,10 @@ public class BlockLogicFireCold
         // Extinguish fire (Rain / Snow)
         if (!infiniBurn && world.getCurrentWeather() != null && world.getCurrentWeather() instanceof IPrecipitation && (
             world.isBlockBeingRainedOn(tilePos)
-                || world.isBlockBeingRainedOn(tilePos.west())
-                || world.isBlockBeingRainedOn(tilePos.east())
-                || world.isBlockBeingRainedOn(tilePos.north())
-                || world.isBlockBeingRainedOn(tilePos.south()))) {
+                || world.isBlockBeingRainedOn(tilePos.west(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.east(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.north(queryPos))
+                || world.isBlockBeingRainedOn(tilePos.south(queryPos)))) {
             this.setBurnResult(world, tilePos);
             return;
         }
@@ -45,13 +46,13 @@ public class BlockLogicFireCold
 
 
         if (!infiniBurn && !this.canNeighborCatchFire(world, tilePos)) {
-            if (!world.isBlockNormalCube(tilePos.down()) || meta > 3) {
+            if (!world.isBlockNormalCube(tilePos.down(queryPos)) || meta > 3) {
                 this.setBurnResult(world, tilePos);
             }
             return;
         }
 
-        if (!infiniBurn && !canBurn(world, tilePos.down()) && meta == 15 && rand.nextInt(4) == 0) {
+        if (!infiniBurn && !canBurn(world, tilePos.down(queryPos)) && meta == 15 && rand.nextInt(4) == 0) {
             this.setBurnResult(world, tilePos);
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlag.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlag.java
index d9341a250..f6372241c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlag.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlag.java
@@ -12,12 +12,12 @@ import net.minecraft.core.item.ItemStack;
 import com.mojang.nbt.tags.CompoundTag;
 
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicFlag extends BlockLogic {
 
@@ -30,7 +30,7 @@ public class BlockLogicFlag extends BlockLogic {
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -47,7 +47,7 @@ public class BlockLogicFlag extends BlockLogic {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
@@ -65,7 +65,7 @@ public class BlockLogicFlag extends BlockLogic {
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!world.isClientSide && world.getTileEntity(tilePos) instanceof TileEntityFlag flag) {
             if (flag.owner != null && !player.uuid.equals(flag.owner)) {
                 return false;
@@ -81,7 +81,7 @@ public class BlockLogicFlag extends BlockLogic {
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlower.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlower.java
index 0f4921048..75f5ac56c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlower.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlower.java
@@ -1,6 +1,6 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.block.tag.BlockTags;
@@ -10,12 +10,13 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IBonemealable;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -28,7 +29,7 @@ public class BlockLogicFlower
     public boolean canBeBonemealed = false;
 
     public BlockLogicFlower(final @NotNull Block<?> block) {
-        super(block, Material.plant);
+        super(block, Materials.PLANT);
         block.setTicking(true);
         final float f = 0.2F;
         this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3F, 0.5F + f);
@@ -45,17 +46,17 @@ public class BlockLogicFlower
     }
 
     @Override
-    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public int getPlacedData(final @Nullable Player player, final @NotNull ItemStack itemStack, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         return MASK_PERMANENT;
     }
 
     @Override
-    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePos tilePos) {
-        return super.canPlaceAt(world, tilePos) && this.mayPlaceOn(world.getBlockId(tilePos.down()));
+    public boolean canPlaceAt(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        return super.canPlaceAt(world, tilePos) && this.mayPlaceOn(world.getBlockId(tilePos.down(new TilePos())));
     }
 
     @Override
-    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public @NotNull ISupport getSupport(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
@@ -65,13 +66,13 @@ public class BlockLogicFlower
     }
 
     @Override
-    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePos tilePos, final int id) {
+    public void onNeighborChanged(final @NotNull World world, final @NotNull TilePosc tilePos, final int id) {
         super.onNeighborChanged(world, tilePos, id);
         this.checkAlive(world, tilePos);
     }
 
     @Override
-    public void updateTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand, final boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, final boolean isRandomTick) {
         this.checkAlive(world, tilePos);
 
         if (world.getGameRuleValue(GameRules.DO_SEASONAL_GROWTH) && world.getSeasonManager().getCurrentSeason() != null && (!isPermanent(world.getBlockData(tilePos))) && world.getSeasonManager().getCurrentSeason().killFlowers && this.killedByWeather && rand.nextInt(256) == 0) {
@@ -79,7 +80,7 @@ public class BlockLogicFlower
         }
     }
 
-    protected final void checkAlive(final @NotNull World world, final @NotNull TilePos tilePos) {
+    protected final void checkAlive(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (!this.canStay(world, tilePos)) {
             this.dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
@@ -87,8 +88,8 @@ public class BlockLogicFlower
     }
 
     @Override
-    public boolean canStay(final @NotNull World world, final @NotNull TilePos tilePos) {
-        return (world.getFullBlockLightValue(tilePos) >= 8 || world.canBlockSeeSky(tilePos)) && this.mayPlaceOn(world.getBlockId(tilePos.down()));
+    public boolean canStay(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        return (world.getFullBlockLightValue(tilePos) >= 8 || world.canBlockSeeSky(tilePos)) && this.mayPlaceOn(world.getBlockId(tilePos.down(new TilePos())));
     }
 
     public static boolean isPermanent(final int metadata) {
@@ -100,7 +101,7 @@ public class BlockLogicFlower
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -115,7 +116,7 @@ public class BlockLogicFlower
     }
 
     @Override
-    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         final Random rand = world.rand;
         if (!world.isClientSide && this.canBeBonemealed && itemStack.consumeItem(player)) {
             {
@@ -127,30 +128,31 @@ public class BlockLogicFlower
                 }
             }
 
-            label0:
+            TilePos queryPos = new TilePos();
+            outer:
             for (int i = 0; i < 128; i++) {
-                final @NotNull TilePos localPos = new TilePos(tilePos);
+                int checkX = tilePos.x();
+                int checkY = tilePos.y();
+                int checkZ = tilePos.z();
                 for (int j = 0; j < i / 16; j++) {
-                    localPos.x += rand.nextInt(3) - 1;
-                    localPos.y += ((rand.nextInt(3) - 1) * rand.nextInt(3)) / 2;
-                    localPos.z += rand.nextInt(3) - 1;
-                    final int blockId = world.getBlockId(localPos.down());
+                    checkX += rand.nextInt(3) - 1;
+                    checkY += ((rand.nextInt(3) - 1) * rand.nextInt(3)) / 2;
+                    checkZ += rand.nextInt(3) - 1;
+                    final int blockId = world.getBlockId(queryPos.set(checkX, checkY - 1, checkZ));
                     if (!this.mayPlaceOn(blockId)) {
-                        continue label0;
+                        continue outer;
                     }
                 }
 
-                final @Nullable Block<?> b = world.getBlock(localPos);
+                final @Nullable Block<?> b = world.getBlock(queryPos.set(checkX, checkY, checkZ));
                 if (Block.hasLogicClass(b, BlockLogicFlowerStackable.class)) {
-                    final int meta = world.getBlockData(localPos);
+                    final int meta = world.getBlockData(queryPos.set(checkX, checkY, checkZ));
                     if (BlockLogicFlowerStackable.getStackCount(meta) < BlockLogicFlowerStackable.MAX_STACK_COUNT) {
-                        world.setBlockDataNotify(localPos, BlockLogicFlowerStackable.setStackCount(meta, BlockLogicFlowerStackable.getStackCount(meta) + 1));
+                        world.setBlockDataNotify(queryPos.set(checkX, checkY, checkZ), BlockLogicFlowerStackable.setStackCount(meta, BlockLogicFlowerStackable.getStackCount(meta) + 1));
                     }
-                } else if (b != null) {
-                    continue;
-                } else {
+                } else if (b == null) {
                     if (rand.nextFloat() > 0.75) {
-                        world.setBlockIdNotify(localPos, this.block.id());
+                        world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
                     }
                 }
             }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlowerStackable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlowerStackable.java
index a72c5d039..a75ae2dd4 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlowerStackable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFlowerStackable.java
@@ -7,7 +7,7 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -24,7 +24,7 @@ public class BlockLogicFlowerStackable extends BlockLogicFlower {
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         final int metadata = itemStack.getMetadata();
         return setPermanent(metadata, true);
     }
@@ -43,7 +43,7 @@ public class BlockLogicFlowerStackable extends BlockLogicFlower {
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         final int metadata = world.getBlockData(tilePos);
         final int currentStackCount = getStackCount(metadata);
         if (currentStackCount >= MAX_STACK_COUNT) {
@@ -57,7 +57,7 @@ public class BlockLogicFlowerStackable extends BlockLogicFlower {
 
         final int newMetadata = setPermanent(setStackCount(metadata, currentStackCount + 1), true);
         world.setBlockDataNotify(tilePos, newMetadata);
-        world.playBlockSoundEffect(player, tilePos.x + 0.5f, tilePos.y + 0.5f, tilePos.z + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
+        world.playBlockSoundEffect(player, tilePos.x() + 0.5f, tilePos.y() + 0.5f, tilePos.z() + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
         heldItem.consumeItem(player);
         return true;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluid.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluid.java
index 7ec54d766..757768063 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluid.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluid.java
@@ -9,13 +9,16 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -36,7 +39,7 @@ public abstract class BlockLogicFluid extends BlockLogic {
         return (float) (data + 1) / 8F;
     }
 
-    protected int getDepth(final WorldSource worldSource, final @NotNull TilePos tilePos) {
+    protected int getDepth(final WorldSource worldSource, final @NotNull TilePosc tilePos) {
         if (worldSource.getBlockMaterial(tilePos) != this.material) {
             return -1;
         } else {
@@ -44,7 +47,7 @@ public abstract class BlockLogicFluid extends BlockLogic {
         }
     }
 
-    protected int getRenderedDepth(final @NotNull WorldSource worldSource, final @NotNull TilePos tilePos) {
+    protected int getRenderedDepth(final @NotNull WorldSource worldSource, final @NotNull TilePosc tilePos) {
         if (worldSource.getBlockMaterial(tilePos) != this.material) {
             return -1;
         }
@@ -66,7 +69,7 @@ public abstract class BlockLogicFluid extends BlockLogic {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
@@ -76,50 +79,47 @@ public abstract class BlockLogicFluid extends BlockLogic {
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
-    private Vec3 getFlow(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        Vec3 result = Vec3.fromPool(0.0D, 0.0D, 0.0D);
-        final int depthLocal = getRenderedDepth(source, tilePos);
-        TilePos p = new TilePos(tilePos);
+    private @NotNull Vector3dc getFlow(@NotNull WorldSource world, @NotNull TilePosc tilePos) {
+        Vector3d result = new Vector3d();
+        TilePos queryPos = new TilePos();
+        int depthLocal = getRenderedDepth(world, tilePos);
         for (int i = 0; i < 4; i++) {
-            p.set(tilePos.x, tilePos.y, tilePos.z);
+            int checkX = tilePos.x();
+            int checkY = tilePos.y();
+            int checkZ = tilePos.z();
             switch (i) {
-                case 0 -> tilePos.x--;
-                case 1 -> tilePos.z--;
-                case 2 -> tilePos.x++;
-                case 3 -> tilePos.z++;
+                case 0 -> checkX--;
+                case 1 -> checkZ--;
+                case 2 -> checkX++;
+                case 3 -> checkZ++;
             }
-
-            int depthCheck = getRenderedDepth(source, p);
+            int depthCheck = getRenderedDepth(world, queryPos.set(checkX, checkY, checkZ));
             if (depthCheck < 0) {
-                if (source.getBlockMaterial(p).blocksMotion()) {
+                if (world.getBlockMaterial(queryPos.set(checkX, checkY, checkZ)).blocksMotion()) {
                     continue;
                 }
-                depthCheck = getRenderedDepth(source, p.down());
+                depthCheck = getRenderedDepth(world, queryPos.set(checkX, checkY - 1, checkZ));
                 if (depthCheck >= 0) {
-                    final int mult = depthCheck - (depthLocal - 8);
-                    result = result.add((p.x - tilePos.x) * mult, 0, (p.z - tilePos.z) * mult);
+                    int mult = depthCheck - (depthLocal - 8);
+                    result = result.add((checkX - tilePos.x()) * mult, (checkY - tilePos.y()) * mult, (checkZ - tilePos.z()) * mult);
                 }
+                continue;
             } else {
-                final int mult = depthCheck - depthLocal;
-                result = result.add((p.x - tilePos.x) * mult, 0, (p.z - tilePos.z) * mult);
+                int mult = depthCheck - depthLocal;
+                result = result.add((checkX - tilePos.x()) * mult, (checkY - tilePos.y()) * mult, (checkZ - tilePos.z()) * mult);
             }
         }
-        result = result.normalize();
-        return result;
+        return result.normalize();
     }
 
     @Override
-    public void onEntityInside(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity, @NotNull Vec3 velocity) {
+    public void onEntityInside(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity, @NotNull Vector3d velocityDirection) {
         if (entity.noPhysics) return;
-        final Vec3 flowVector = getFlow(world, tilePos);
-
-        velocity.x += flowVector.x;
-        velocity.y += flowVector.y;
-        velocity.z += flowVector.z;
+        velocityDirection.add(getFlow(world, tilePos));
     }
 
     @Override
@@ -128,46 +128,46 @@ public abstract class BlockLogicFluid extends BlockLogic {
     }
 
     @Override
-    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
+    public float getBrightness(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
         final float br = source.getLightBrightness(tilePos);
-        final float brAbove = source.getLightBrightness(tilePos.up());
+        final float brAbove = source.getLightBrightness(tilePos.up(new TilePos()));
         return Math.max(br, brAbove);
     }
 
     @Override
-    public void animationTick(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void animationTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         this.fluid.animationTick(this, world, tilePos, rand);
     }
 
-    public double getSlopeAngle(final @NotNull WorldSource source, final @NotNull TilePos tilePos) {
-        final Vec3 vec = getFlow(source, tilePos);
-        if (vec == null || (vec.x == 0.0D && vec.z == 0.0D)) {
+    public double getSlopeAngle(final @NotNull WorldSource source, final @NotNull TilePosc tilePos) {
+        final Vector3dc vec = getFlow(source, tilePos);
+        if (vec.x() == 0.0D && vec.z() == 0.0D) {
             return -1000D;
         } else {
-            return Math.atan2(vec.z, vec.x) - Math.PI / 2;
+            return Math.atan2(vec.z(), vec.x()) - Math.PI / 2;
         }
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         checkForHarden(world, tilePos);
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         checkForHarden(world, tilePos);
     }
 
-    private void checkForHarden(final World world, final @NotNull TilePos tilePos) {
+    private void checkForHarden(final World world, final @NotNull TilePosc tilePos) {
         if (world.getBlockId(tilePos) != this.block.id()) {
             return;
         }
-
-        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.north()));
-        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.south()));
-        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.west()));
-        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.east()));
-        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.up()));
+        TilePos queryPos = new TilePos();
+        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.north(queryPos)));
+        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.south(queryPos)));
+        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.west(queryPos)));
+        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.east(queryPos)));
+        this.fluid.checkForHarden(this, world, tilePos, world.getBlockMaterial(tilePos.up(queryPos)));
     }
 
     @Override
@@ -175,38 +175,41 @@ public abstract class BlockLogicFluid extends BlockLogic {
         return null;
     }
 
-    protected static void fizz(final @NotNull World world, @NotNull TilePos tilePos) {
-        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) tilePos.x + 0.5F, (float) tilePos.y + 0.5F, (float) tilePos.z + 0.5F, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
+    protected static void fizz(final @NotNull World world, @NotNull TilePosc tilePos) {
+        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) tilePos.x() + 0.5F, (float) tilePos.y() + 0.5F, (float) tilePos.z() + 0.5F, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
         for (int i = 0; i < 8; i++) {
-            world.spawnParticle("largesmoke", (double) tilePos.x + Math.random(), (double) tilePos.y + 1.2D, (double) tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 0);
+            world.spawnParticle("largesmoke", (double) tilePos.x() + Math.random(), (double) tilePos.y() + 1.2D, (double) tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 0);
         }
     }
 
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         final float myHeight = getFluidHeight(source, tilePos);
-        final float heightPosZ = getFluidHeight(source, tilePos.add(0, 0, 1));
-        final float heightPosXPosZ = getFluidHeight(source, tilePos.add(1, 0, 1));
-        final float heightPosX = getFluidHeight(source, tilePos.add(1, 0, 0));
+        final float heightPosZ = getFluidHeight(source, tilePos.add(0, 0, 1, queryPos));
+        final float heightPosXPosZ = getFluidHeight(source, tilePos.add(1, 0, 1, queryPos));
+        final float heightPosX = getFluidHeight(source, tilePos.add(1, 0, 0, queryPos));
 
-        return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, Math.max((myHeight + heightPosZ + heightPosXPosZ + heightPosX) / 4f, 0.2), 1.0F);
+        return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, Math.max((myHeight + heightPosZ + heightPosXPosZ + heightPosX) / 4f, 0.2), 1.0F);
     }
 
-    public float getFluidHeight(final @NotNull WorldSource worldSource, final @NotNull TilePos tilePos) {
+    public float getFluidHeight(final @NotNull WorldSource worldSource, final @NotNull TilePosc tilePos) {
         int count = 0;
         float height = 0.0F;
 
-        TilePos p = new TilePos(tilePos);
+        TilePos queryPos = new TilePos(tilePos);
         for (int i = 0; i < 4; i++) {
-            p.set(tilePos.x - (i & 1), tilePos.y, tilePos.z - (i >> 1 & 1));
-            if (worldSource.getBlockMaterial(p.up()) == this.material) {
+            int checkX = tilePos.x() - (i & 1);
+            int checkY = tilePos.y();
+            int checkZ = tilePos.z() - (i >> 1 & 1);
+            if (worldSource.getBlockMaterial(queryPos.set(checkX, checkY + 1, checkZ)) == this.material) {
                 return 1.0F;
             }
 
-            final Material adjMaterial = worldSource.getBlockMaterial(p);
+            final Material adjMaterial = worldSource.getBlockMaterial(queryPos.set(checkX, checkY, checkZ));
             if (adjMaterial == this.material) {
-                final int data = worldSource.getBlockData(p) & 0x0F;
+                final int data = worldSource.getBlockData(queryPos.set(checkX, checkY, checkZ)) & 0x0F;
                 if (data >= 8 || data == 0) {
                     height += BlockLogicFluid.getHeight(data) * 10F;
                     count += 10;
@@ -225,7 +228,7 @@ public abstract class BlockLogicFluid extends BlockLogic {
     }
 
     @Override
-    public boolean isEquivalent(@NotNull World world, @NotNull TilePos thisPos, @NotNull TilePos thatPos) {
+    public boolean isEquivalent(@NotNull World world, @NotNull TilePosc thisPos, @NotNull TilePosc thatPos) {
         final Block<?> bBlock = world.getBlock(thatPos);
 
         final int thisMeta = world.getBlockData(thisPos);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidFlowing.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidFlowing.java
index de5580cf7..f522a14d3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidFlowing.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidFlowing.java
@@ -5,6 +5,7 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
@@ -15,7 +16,7 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
     int @NotNull [] distance;
     public final @NotNull Block<?> blockStill;
 
-	public BlockLogicFluidFlowing(@NotNull Block<?> block, @NotNull Material material, final @NotNull Fluid fluid, @NotNull Block<?> blockStill) {
+    public BlockLogicFluidFlowing(@NotNull Block<?> block, @NotNull Material material, final @NotNull Fluid fluid, @NotNull Block<?> blockStill) {
         super(block, material, fluid);
         this.maxCount = 0;
         this.result = new boolean[4];
@@ -23,58 +24,49 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
         this.blockStill = blockStill;
     }
 
-    private void setFluidStill(@NotNull World world, @NotNull TilePos tilePos) {
+    private void setFluidStill(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockIdData(tilePos, this.blockStill.id(), world.getBlockData(tilePos));
         world.markBlocksDirty(tilePos, tilePos);
         world.markBlockNeedsUpdate(tilePos);
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         int localFlowDecay = getDepth(world, tilePos);
         final byte flowDecayMod = this.fluid.getFlowDecayMod(this, world, tilePos);
 
-        TilePos down = tilePos.down();
-        TilePos up = tilePos.up();
-        TilePos north = tilePos.north();
-        TilePos south = tilePos.south();
-        TilePos west = tilePos.west();
-        TilePos east = tilePos.east();
+        TilePos queryPos = new TilePos();
 
-        if(localFlowDecay > 0) {
+        if (localFlowDecay > 0) {
             int surroundingFlowDecay = -100;
             this.maxCount = 0;
-            surroundingFlowDecay = getHighest(world, west, surroundingFlowDecay);
-            surroundingFlowDecay = getHighest(world, east, surroundingFlowDecay);
-            surroundingFlowDecay = getHighest(world, north, surroundingFlowDecay);
-            surroundingFlowDecay = getHighest(world, south, surroundingFlowDecay);
+            surroundingFlowDecay = getHighest(world, tilePos.west(queryPos), surroundingFlowDecay);
+            surroundingFlowDecay = getHighest(world, tilePos.east(queryPos), surroundingFlowDecay);
+            surroundingFlowDecay = getHighest(world, tilePos.north(queryPos), surroundingFlowDecay);
+            surroundingFlowDecay = getHighest(world, tilePos.south(queryPos), surroundingFlowDecay);
             int newFlowDecay = surroundingFlowDecay + flowDecayMod;
-            if(newFlowDecay >= 8 || surroundingFlowDecay < 0) {
+            if (newFlowDecay >= 8 || surroundingFlowDecay < 0) {
                 newFlowDecay = -1;
             }
-            if(getDepth(world, up) >= 0) {
-                int flowDecayAbove = getDepth(world, up);
-                if(flowDecayAbove >= 8)
-                {
+            if (getDepth(world, tilePos.up(queryPos)) >= 0) {
+                int flowDecayAbove = getDepth(world, tilePos.up(queryPos));
+                if (flowDecayAbove >= 8) {
                     newFlowDecay = flowDecayAbove;
-                } else
-                {
+                } else {
                     newFlowDecay = flowDecayAbove + 8;
                 }
             }
             // Become source block
-            if(this.maxCount >= 2 && this.fluid.canBecomeSource(this, world, tilePos, rand)) {
-                if(world.getBlockMaterial(down).isSolid()) {
+            if (this.maxCount >= 2 && this.fluid.canBecomeSource(this, world, tilePos, rand)) {
+                if (world.getBlockMaterial(tilePos.down(queryPos)).isSolid()) {
                     newFlowDecay = 0;
-                }
-                else if(world.getBlockMaterial(down) == this.material && world.getBlockData(down) == 0) {
+                } else if (world.getBlockMaterial(tilePos.down(queryPos)) == this.material && world.getBlockData(tilePos.down(queryPos)) == 0) {
                     newFlowDecay = 0;
                 }
             }
-            if(newFlowDecay != localFlowDecay) {
+            if (newFlowDecay != localFlowDecay) {
                 localFlowDecay = newFlowDecay;
-                if(localFlowDecay < 0) {
+                if (localFlowDecay < 0) {
                     world.setBlockIdNotify(tilePos, 0);
                 } else {
                     world.setBlockDataNotify(tilePos, localFlowDecay);
@@ -87,80 +79,78 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
         } else {
             setFluidStill(world, tilePos);
         }
-        if(canSpreadTo(world, down)) {
-        	Block<?> b = world.getBlock(down);
-        	if(b != null) {
-                b.dropWithCause(world, EnumDropCause.WORLD, down, world.getBlockData(down), null, null);
-        	}
-            if(localFlowDecay >= 8) {
-                world.setBlockIdDataNotify(down, this.block.id(), localFlowDecay);
+        if (canSpreadTo(world, tilePos.down(queryPos))) {
+            Block<?> b = world.getBlock(tilePos.down(queryPos));
+            if (b != null) {
+                b.dropWithCause(world, EnumDropCause.WORLD, tilePos.down(queryPos), world.getBlockData(tilePos.down(queryPos)), null, null);
+            }
+            if (localFlowDecay >= 8) {
+                world.setBlockIdDataNotify(tilePos.down(queryPos), this.block.id(), localFlowDecay);
             } else {
-                world.setBlockIdDataNotify(down, this.block.id(), localFlowDecay + 8);
+                world.setBlockIdDataNotify(tilePos.down(queryPos), this.block.id(), localFlowDecay + 8);
             }
-        } else if(localFlowDecay >= 0 && (localFlowDecay == 0 || isFluidBlocking(world, down))) {
+        } else if (localFlowDecay >= 0 && (localFlowDecay == 0 || isFluidBlocking(world, tilePos.down(queryPos)))) {
             boolean[] spreadFlags = getSpread(world, tilePos);
             int k1 = localFlowDecay + flowDecayMod;
-            if(localFlowDecay >= 8) {
+            if (localFlowDecay >= 8) {
                 k1 = 1;
             }
-            if(k1 >= 8) {
+            if (k1 >= 8) {
                 return;
             }
-            if(spreadFlags[0]) {
-                flowIntoBlock(world, west, k1);
+            if (spreadFlags[0]) {
+                flowIntoBlock(world, tilePos.west(queryPos), k1);
             }
-            if(spreadFlags[1]) {
-                flowIntoBlock(world, east, k1);
+            if (spreadFlags[1]) {
+                flowIntoBlock(world, tilePos.east(queryPos), k1);
             }
-            if(spreadFlags[2]) {
-                flowIntoBlock(world, north, k1);
+            if (spreadFlags[2]) {
+                flowIntoBlock(world, tilePos.north(queryPos), k1);
             }
-            if(spreadFlags[3]) {
-                flowIntoBlock(world, south, k1);
+            if (spreadFlags[3]) {
+                flowIntoBlock(world, tilePos.south(queryPos), k1);
             }
         }
     }
 
     private void flowIntoBlock(@NotNull World world, @NotNull TilePos tilePos, int meta) {
-        if(canSpreadTo(world, tilePos)) {
+        if (canSpreadTo(world, tilePos)) {
             int id = world.getBlockId(tilePos);
-            if(id > 0) {
+            if (id > 0) {
                 this.fluid.onFlowIntoBlock(this, world, tilePos, meta);
             }
             world.setBlockIdDataNotify(tilePos, this.block.id(), meta);
         }
     }
 
-    private int getSlopeDistance(@NotNull World world, @NotNull TilePos tilePos, int l, int i1) {
+    private int getSlopeDistance(@NotNull World world, @NotNull TilePosc tilePos, int l, int i1) {
         int j1 = 1000;
-        TilePos p = new TilePos(tilePos);
-        for(int d = 0; d < 4; d++) {
-            if(d == 0 && i1 == 1 || d == 1 && i1 == 0 || d == 2 && i1 == 3 || d == 3 && i1 == 2)
-            {
+        TilePos queryPos = new TilePos(tilePos);
+        for (int d = 0; d < 4; d++) {
+            if (d == 0 && i1 == 1 || d == 1 && i1 == 0 || d == 2 && i1 == 3 || d == 3 && i1 == 2) {
                 continue;
             }
-            p.set(tilePos.x, tilePos.y, tilePos.z);
+            int checkX = tilePos.x();
+            int checkY = tilePos.y();
+            int checkZ = tilePos.z();
             switch (d) {
-                case 0 -> p.x--;
-                case 1 -> p.x++;
-                case 2 -> p.z--;
-                case 3 -> p.z++;
+                case 0 -> checkX--;
+                case 1 -> checkX++;
+                case 2 -> checkZ--;
+                case 3 -> checkZ++;
             }
-            if(isFluidBlocking(world, p) || world.getBlockMaterial(p) == this.material && world.getBlockData(p) == 0)
-            {
+            queryPos.set(checkX, checkY, checkZ);
+            if (isFluidBlocking(world, queryPos) || world.getBlockMaterial(queryPos) == this.material && world.getBlockData(queryPos) == 0) {
                 continue;
             }
-            if(!isFluidBlocking(world, p.down()))
-            {
+            if (!isFluidBlocking(world, queryPos.set(checkX, checkY - 1, checkZ))) {
                 return l;
             }
-            if(l >= 4)
-            {
+            if (l >= 4) {
                 continue;
             }
-            int k2 = getSlopeDistance(world, p, l + 1, d);
-            if(k2 < j1)
-            {
+            int k2 = getSlopeDistance(world, queryPos.set(checkX, checkY, checkZ), l + 1, d);
+            if (k2 < j1) {
                 j1 = k2;
             }
         }
@@ -168,35 +158,38 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
         return j1;
     }
 
-    private boolean[] getSpread(@NotNull World world, @NotNull TilePos tilePos) {
-        TilePos p = new TilePos(tilePos);
-        for(int d = 0; d < 4; d++) {
+    private boolean[] getSpread(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos(tilePos);
+        for (int d = 0; d < 4; d++) {
             this.distance[d] = 1000;
-            p.set(tilePos.x, tilePos.y, tilePos.z);
+            int checkX = tilePos.x();
+            int checkY = tilePos.y();
+            int checkZ = tilePos.z();
             switch (d) {
-                case 0 -> p.x--;
-                case 1 -> p.x++;
-                case 2 -> p.z--;
-                case 3 -> p.z++;
+                case 0 -> checkX--;
+                case 1 -> checkX++;
+                case 2 -> checkZ--;
+                case 3 -> checkZ++;
             }
-            if(isFluidBlocking(world, p) || world.getBlockMaterial(p) == this.material && world.getBlockData(p) == 0) {
+            queryPos.set(checkX, checkY, checkZ);
+            if (isFluidBlocking(world, queryPos) || world.getBlockMaterial(queryPos) == this.material && world.getBlockData(queryPos) == 0) {
                 continue;
             }
-            if(!isFluidBlocking(world, p.down())) {
+            if (!isFluidBlocking(world, queryPos.set(checkX, checkY - 1, checkZ))) {
                 this.distance[d] = 0;
             } else {
-                this.distance[d] = getSlopeDistance(world, p, 1, d);
+                this.distance[d] = getSlopeDistance(world, queryPos.set(checkX, checkY, checkZ), 1, d);
             }
         }
 
         int i1 = this.distance[0];
-        for(int k1 = 1; k1 < 4; k1++) {
-            if(this.distance[k1] < i1) {
+        for (int k1 = 1; k1 < 4; k1++) {
+            if (this.distance[k1] < i1) {
                 i1 = this.distance[k1];
             }
         }
 
-        for(int l1 = 0; l1 < 4; l1++) {
+        for (int l1 = 0; l1 < 4; l1++) {
             this.result[l1] = this.distance[l1] == i1;
         }
 
@@ -210,13 +203,13 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
 
     protected int getHighest(@NotNull World world, @NotNull TilePos tilePos, int currentFlowDecay) {
         int flowDecay = getDepth(world, tilePos);
-        if(flowDecay < 0) {
+        if (flowDecay < 0) {
             return currentFlowDecay;
         }
-        if(flowDecay == 0) {
+        if (flowDecay == 0) {
             this.maxCount++;
         }
-        if(flowDecay >= 8) {
+        if (flowDecay >= 8) {
             flowDecay = 0;
         }
         return currentFlowDecay >= 0 && flowDecay >= currentFlowDecay ? currentFlowDecay : flowDecay;
@@ -224,10 +217,10 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
 
     private boolean canSpreadTo(@NotNull World world, @NotNull TilePos tilePos) {
         Material material = world.getBlockMaterial(tilePos);
-        if(material == this.material) {
+        if (material == this.material) {
             return false;
         }
-        if(!this.fluid.canSpreadTo(this, world, tilePos, material)) {
+        if (!this.fluid.canSpreadTo(this, world, tilePos, material)) {
             return false;
         } else {
             return !isFluidBlocking(world, tilePos);
@@ -235,9 +228,9 @@ public class BlockLogicFluidFlowing extends BlockLogicFluid {
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         super.onPlacedByWorld(world, tilePos);
-        if(world.getBlockId(tilePos) == this.block.id()) {
+        if (world.getBlockId(tilePos) == this.block.id()) {
             world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay());
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidStill.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidStill.java
index 4c62b0f3d..558e50a88 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidStill.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFluidStill.java
@@ -5,31 +5,28 @@ import java.util.Random;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class BlockLogicFluidStill extends BlockLogicFluid
-{
+public class BlockLogicFluidStill extends BlockLogicFluid {
     public final @NotNull Block<?> blockFlowing;
 
-	public BlockLogicFluidStill(@NotNull Block<?> block, @NotNull Material material, final @NotNull Fluid fluid, @NotNull Block<?> blockFlowing)
-    {
+    public BlockLogicFluidStill(@NotNull Block<?> block, @NotNull Material material, final @NotNull Fluid fluid, @NotNull Block<?> blockFlowing) {
         super(block, material, fluid);
         block.setTicking(this.fluid.shouldTick());
         this.blockFlowing = blockFlowing;
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         super.onNeighborChanged(world, tilePos, id);
         if (id == Side.TOP.getId()) return;
-        if(world.getBlockId(tilePos) == this.block.id()) {
+        if (world.getBlockId(tilePos) == this.block.id()) {
             setFlowing(world, tilePos);
         }
     }
 
-    private void setFlowing(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    private void setFlowing(@NotNull World world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
         world.noNeighborUpdate = true;
         world.setBlockIdData(tilePos, this.blockFlowing.id(), meta);
@@ -39,8 +36,7 @@ public class BlockLogicFluidStill extends BlockLogicFluid
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         this.fluid.updateTickStill(this, world, tilePos, rand);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFullyRotatable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFullyRotatable.java
index eea79f2a8..3d67c7024 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFullyRotatable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFullyRotatable.java
@@ -5,7 +5,7 @@ import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicFullyRotatable extends BlockLogic {
@@ -15,13 +15,13 @@ public class BlockLogicFullyRotatable extends BlockLogic {
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         final Direction direction = mob.getPlacementDirection(side).getOpposite();
         world.setBlockDataNotify(tilePos, directionToMeta(direction));
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         world.setBlockDataNotify(tilePos, directionToMeta(side.getDirection()));
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnace.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnace.java
index b82b5c2f0..3de77f003 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnace.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnace.java
@@ -4,29 +4,28 @@ import com.mojang.logging.LogUtils;
 import net.minecraft.core.Global;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityFurnace;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
 import java.util.Random;
 
-public class BlockLogicFurnace extends BlockLogicRotatable
-{
+public class BlockLogicFurnace extends BlockLogicRotatable {
     private static final Logger LOGGER = LogUtils.getLogger();
     public static boolean keepFurnaceInventory = false;
 
     protected final boolean isActive;
 
-	public BlockLogicFurnace(Block<?> block, boolean active)
-    {
-        super(block, Material.stone);
+    public BlockLogicFurnace(Block<?> block, boolean active) {
+        super(block, Materials.STONE);
         this.isActive = active;
         block.withEntity(TileEntityFurnace::new);
     }
@@ -34,20 +33,20 @@ public class BlockLogicFurnace extends BlockLogicRotatable
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         return switch (dropCause) {
-            case PICK_BLOCK, EXPLOSION, PROPER_TOOL, SILK_TOUCH, PISTON_CRUSH -> new ItemStack[]{new ItemStack(Blocks.FURNACE_STONE_IDLE)};
+            case PICK_BLOCK, EXPLOSION, PROPER_TOOL, SILK_TOUCH, PISTON_CRUSH ->
+                new ItemStack[]{new ItemStack(Blocks.FURNACE_STONE_IDLE)};
             default -> null;
         };
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-        if(!this.isActive)
-        {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (!this.isActive) {
             return;
         }
-        double poxX = (double) tilePos.x + 0.5F;
-        double posY = (double) tilePos.y + 0.0F + (rand.nextFloat() * 6F) / 16F;
-        double posZ = (double) tilePos.z + 0.5F;
+        double poxX = (double) tilePos.x() + 0.5F;
+        double posY = (double) tilePos.y() + 0.0F + (rand.nextFloat() * 6F) / 16F;
+        double posZ = (double) tilePos.z() + 0.5F;
         double f3 = 0.52F;
         double f4 = rand.nextFloat() * 0.6F - 0.3F;
         switch (BlockLogicRotatable.getDirectionFromMeta(world.getBlockData(tilePos))) {
@@ -71,7 +70,7 @@ public class BlockLogicFurnace extends BlockLogicRotatable
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!world.isClientSide && world.getTileEntity(tilePos) instanceof TileEntityFurnace furnace) {
             player.displayFurnaceScreen(furnace);
         }
@@ -79,27 +78,27 @@ public class BlockLogicFurnace extends BlockLogicRotatable
     }
 
     public static void updateFurnaceBlockState(@NotNull World world, @NotNull TilePos tilePos, boolean lit) {
-		int meta = world.getBlockData(tilePos);
-		TileEntity tileEntity = world.getTileEntity(tilePos);
-		if(tileEntity == null) {
-			String msg = "Furnace is missing Tile Entity at " + tilePos + ", block will be removed!";
-			if(Global.BUILD_CHANNEL.isUnstableBuild()) {
-				throw new RuntimeException(msg);
-			}
-			world.setBlockIdNotify(tilePos, 0);
+        int meta = world.getBlockData(tilePos);
+        TileEntity tileEntity = world.getTileEntity(tilePos);
+        if (tileEntity == null) {
+            String msg = "Furnace is missing Tile Entity at " + tilePos + ", block will be removed!";
+            if (Global.BUILD_CHANNEL.isUnstableBuild()) {
+                throw new RuntimeException(msg);
+            }
+            world.setBlockIdNotify(tilePos, 0);
             LOGGER.warn(msg);
-			return;
-		}
-		keepFurnaceInventory = true;
-		if(lit) {
-			world.setBlockIdNotify(tilePos, Blocks.FURNACE_STONE_ACTIVE.id());
-		} else {
-			world.setBlockIdNotify(tilePos, Blocks.FURNACE_STONE_IDLE.id());
-		}
-		keepFurnaceInventory = false;
-		world.setBlockDataNotify(tilePos, meta);
-		tileEntity.validate();
-		world.setTileEntity(tilePos, tileEntity);
-	}
+            return;
+        }
+        keepFurnaceInventory = true;
+        if (lit) {
+            world.setBlockIdNotify(tilePos, Blocks.FURNACE_STONE_ACTIVE.id());
+        } else {
+            world.setBlockIdNotify(tilePos, Blocks.FURNACE_STONE_IDLE.id());
+        }
+        keepFurnaceInventory = false;
+        world.setBlockDataNotify(tilePos, meta);
+        tileEntity.validate();
+        world.setTileEntity(tilePos, tileEntity);
+    }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnaceBlast.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnaceBlast.java
index 79c33ef1a..692b05482 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnaceBlast.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFurnaceBlast.java
@@ -4,13 +4,14 @@ import com.mojang.logging.LogUtils;
 import net.minecraft.core.Global;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityFurnaceBlast;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
@@ -26,7 +27,7 @@ public class BlockLogicFurnaceBlast extends BlockLogicRotatable
 
     public BlockLogicFurnaceBlast(Block<?> block, boolean active)
     {
-        super(block, Material.metal);
+        super(block, Materials.METAL);
         this.isActive = active;
         block.withEntity(TileEntityFurnaceBlast::new);
     }
@@ -41,14 +42,14 @@ public class BlockLogicFurnaceBlast extends BlockLogicRotatable
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
+	public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand)
     {
         if(!this.isActive) {
             return;
         }
-        double posX = (double) tilePos.x + 0.5D;
-        double posY = (double) tilePos.y + (rand.nextFloat() * 6F) / 16D;
-        double posZ = (double) tilePos.z + 0.5D;
+        double posX = (double) tilePos.x() + 0.5D;
+        double posY = (double) tilePos.y() + (rand.nextFloat() * 6F) / 16D;
+        double posZ = (double) tilePos.z() + 0.5D;
         double f3 = 0.52D;
         float f4 = rand.nextFloat() * 0.6F - 0.3F;
         switch (BlockLogicRotatable.getDirectionFromMeta(world.getBlockData(tilePos))) {
@@ -72,7 +73,7 @@ public class BlockLogicFurnaceBlast extends BlockLogicRotatable
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!world.isClientSide && world.getTileEntity(tilePos) instanceof TileEntityFurnaceBlast furnaceBlast) {
             player.displayBlastFurnaceScreen(furnaceBlast);
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlassTinted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlassTinted.java
index 1f0fc186e..b75b54631 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlassTinted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlassTinted.java
@@ -1,9 +1,9 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -13,7 +13,7 @@ public class BlockLogicGlassTinted extends BlockLogicGlass
 
     public BlockLogicGlassTinted(@NotNull Block<?> block)
     {
-        super(block, Material.glass);
+        super(block, Materials.GLASS);
     }
 
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlowStone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlowStone.java
index 59764b22b..c03ba5fbf 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlowStone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGlowStone.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -28,7 +28,7 @@ public class BlockLogicGlowStone extends BlockLogic
     }
     
     @Override
-    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
     	return 0.0f;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGrass.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGrass.java
index 000e24353..9abaa9006 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicGrass.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicGrass.java
@@ -1,8 +1,9 @@
 package net.minecraft.core.block;
 
 import java.util.Random;
+
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.data.gamerule.GameRules;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
@@ -10,38 +11,39 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockLogicGrass extends BlockLogic
-{
+public class BlockLogicGrass extends BlockLogic {
     public final @NotNull Block<?> dirt;
-    public BlockLogicGrass(@NotNull Block<?> block, @NotNull Block<?> dirt)
-    {
-        super(block, Material.grass);
+
+    public BlockLogicGrass(@NotNull Block<?> block, @NotNull Block<?> dirt) {
+        super(block, Materials.GRASS);
         block.setTicking(true);
         this.dirt = dirt;
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
-        if(world.isClientSide) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
-        TilePos up = tilePos.up();
-        if(world.getBlockLightValue(up) < 4 && Blocks.lightBlock[world.getBlockId(up)] > 2) {
+        TilePos queryPos = new TilePos();
+        if (world.getBlockLightValue(tilePos.up(queryPos)) < 4 && Blocks.lightBlock[world.getBlockId(tilePos.up(queryPos))] > 2) {
             world.setBlockIdNotify(tilePos, this.dirt.id());
-        } else if(world.getBlockLightValue(up) >= 9) {
-            TilePos p = new TilePos(tilePos);
-            for(int i = 0; i < 4; i++) {
-                p.set((tilePos.x + rand.nextInt(3)) - 1, (tilePos.y + rand.nextInt(5)) - 3, (tilePos.x + rand.nextInt(3)) - 1);
-                TilePos pUp = p.up();
-                if (world.getBlockId(p) == this.dirt.id() && world.getBlockLightValue(pUp) >= 4 && Blocks.lightBlock[world.getBlockId(pUp)] <= 2) {
-                    world.setBlockIdNotify(p, this.block.id());
+        } else if (world.getBlockLightValue(tilePos.up(queryPos)) >= 9) {
+            for (int i = 0; i < 4; i++) {
+                int checkX = (tilePos.x() + rand.nextInt(3)) - 1;
+                int checkY = (tilePos.y() + rand.nextInt(5)) - 3;
+                int checkZ = (tilePos.x() + rand.nextInt(3)) - 1;
+                if (world.getBlockId(queryPos.set(checkX, checkY, checkZ)) == this.dirt.id() &&
+                    world.getBlockLightValue(queryPos.set(checkX, checkY + 1, checkZ)) >= 4 &&
+                    Blocks.lightBlock[world.getBlockId(queryPos.set(checkX, checkY + 1, checkZ))] <= 2) {
+                    world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
                 }
             }
-            if (world.getGameRuleValue(GameRules.DO_SEASONAL_GROWTH) && world.getBlockId(up) == 0 && world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().growFlowers && rand.nextInt(256) == 0) {
+            if (world.getGameRuleValue(GameRules.DO_SEASONAL_GROWTH) && world.getBlockId(tilePos.up(queryPos)) == 0 && world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().growFlowers && rand.nextInt(256) == 0) {
                 int idToSpawn = 0;
                 int r = rand.nextInt(400);
 
@@ -50,8 +52,8 @@ public class BlockLogicGrass extends BlockLogic
                 } else if (r < 41) {
                     idToSpawn = Blocks.FLOWER_YELLOW.id();
                 } else if (r < 60) {
-                    Biome biome = world.getBlockBiome(up);
-                    if (biome == Biomes.OVERWORLD_BIRCH_FOREST || biome == Biomes.OVERWORLD_SEASONAL_FOREST){
+                    Biome biome = world.getBlockBiome(tilePos.up(queryPos));
+                    if (biome == Biomes.OVERWORLD_BIRCH_FOREST || biome == Biomes.OVERWORLD_SEASONAL_FOREST) {
                         idToSpawn = Blocks.FLOWER_PINK.id();
                     } else if (biome == Biomes.OVERWORLD_MEADOW || biome == Biomes.OVERWORLD_BOREAL_FOREST || biome == Biomes.OVERWORLD_SHRUBLAND) {
                         idToSpawn = Blocks.FLOWER_PURPLE.id();
@@ -59,14 +61,14 @@ public class BlockLogicGrass extends BlockLogic
                         idToSpawn = Blocks.FLOWER_LIGHT_BLUE.id();
                     }
                 } else {
-                    if(rand.nextInt(8) == 0) {
+                    if (rand.nextInt(8) == 0) {
                         idToSpawn = Blocks.TALLGRASS_FERN.id();
-                    }else {
+                    } else {
                         idToSpawn = Blocks.TALLGRASS.id();
                     }
                 }
 
-                world.setBlockIdNotify(up, idToSpawn);
+                world.setBlockIdNotify(tilePos.up(queryPos), idToSpawn);
             }
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicIce.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicIce.java
index 4a1548ace..cf6f6c31c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicIce.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicIce.java
@@ -2,12 +2,14 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -16,7 +18,7 @@ import java.util.Random;
 public class BlockLogicIce extends BlockLogicTransparent {
 
     public BlockLogicIce(@NotNull Block<?> block) {
-        super(block, Material.ice);
+        super(block, Materials.ICE);
         block.friction = 0.98F;
         block.setTicking(true);
     }
@@ -30,16 +32,16 @@ public class BlockLogicIce extends BlockLogicTransparent {
     }
 
     @Override
-    public void onHarvest(@NotNull World world, @NotNull Player player, @NotNull TilePos tilePos, int data, @Nullable TileEntity tileEntity) {
+    public void onHarvest(@NotNull World world, @NotNull Player player, @NotNull TilePosc tilePos, int data, @Nullable TileEntity tileEntity) {
         super.onHarvest(world, player, tilePos, data, tileEntity);
-        Material material = world.getBlockMaterial(tilePos.down());
+        Material material = world.getBlockMaterial(tilePos.down(new TilePos()));
         if(material.blocksMotion() || material.isLiquid()) {
             world.setBlockIdNotify(tilePos, Blocks.FLUID_WATER_FLOWING.id());
         }
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
+	public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick)
     {
         if(world.getSavedLightValue(LightLayer.Block, tilePos) > 11 - Blocks.lightBlock[id()])
         {
@@ -48,7 +50,7 @@ public class BlockLogicIce extends BlockLogicTransparent {
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos)
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos)
     {
         return Material.PISTON_PUSHABLE;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJar.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJar.java
index 5a7db4c3c..0614ba8e4 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJar.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJar.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityFlowerJar;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -14,50 +15,50 @@ import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.block.ItemBlock;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.function.Supplier;
 
 public class BlockLogicJar extends BlockLogic implements ISupportable {
 
     private final @NotNull Supplier<@NotNull Item> itemSupplier;
+
     public BlockLogicJar(@NotNull Block<?> block, @NotNull Supplier<@NotNull Item> itemSupplier) {
-        super(block, Material.glass);
+        super(block, Materials.GLASS);
         block.withEntity(TileEntityFlowerJar::new);
         setBlockBounds(0.3125f, 0, 0.3125f, 1 - 0.3125f, 0.375f, 1 - 0.3125f);
         this.itemSupplier = itemSupplier;
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM) && super.canPlaceAt(world, tilePos);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        return AABB.fromPool(0.3125f, 0, 0.3125f, 1 - 0.3125f, 0.375f, 1 - 0.3125f);
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        return new AABBd(0.3125f, 0, 0.3125f, 1 - 0.3125f, 0.375f, 1 - 0.3125f);
     }
 
     @Override
-    public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side == Side.BOTTOM ? PartialSupport.INSTANCE.center() : PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        if(player.getHeldItem() == null) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        if (player.getHeldItem() == null) {
             if (world.getBlockData(tilePos) == 0) {
                 world.setBlockIdNotify(tilePos, 0);
                 world.playSoundAtEntity(player, player, "item.pickup", 1f, 1f);
@@ -85,12 +86,12 @@ public class BlockLogicJar extends BlockLogic implements ISupportable {
         } else if (player.getHeldItem().getItem() instanceof ItemBlock) {
             Block<?> blockInHand = ((ItemBlock<?>) player.getHeldItem().getItem()).getBlock();
             if (Blocks.hasTag(blockInHand.id(), BlockTags.PLANTABLE_IN_JAR) && world.getTileEntity(tilePos) instanceof TileEntityFlowerJar flowerJar) {
-                if(world.getBlockData(tilePos) == 0) {
+                if (world.getBlockData(tilePos) == 0) {
                     player.getHeldItem().consumeItem(player);
                     world.setBlockDataNotify(tilePos, 1);
                     flowerJar.flowerInPot = blockInHand.id();
                     flowerJar.flowerData = player.getHeldItem().getMetadata();
-                    world.playBlockSoundEffect(player, tilePos.x + 0.5f, tilePos.y + 0.5f, tilePos.z + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
+                    world.playBlockSoundEffect(player, tilePos.x() + 0.5f, tilePos.y() + 0.5f, tilePos.z() + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
                     return true;
                 } else if (blockInHand.getLogic() instanceof BlockLogicFlowerStackable && blockInHand == Blocks.getBlock(flowerJar.flowerInPot)) {
                     final int metadata = flowerJar.flowerData;
@@ -100,7 +101,7 @@ public class BlockLogicJar extends BlockLogic implements ISupportable {
                     }
 
                     flowerJar.flowerData = BlockLogicFlowerStackable.setPermanent(BlockLogicFlowerStackable.setStackCount(metadata, currentStackCount + 1), true);
-                    world.playBlockSoundEffect(player, tilePos.x + 0.5f, tilePos.y + 0.5f, tilePos.z + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
+                    world.playBlockSoundEffect(player, tilePos.x() + 0.5f, tilePos.y() + 0.5f, tilePos.z() + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
                     player.getHeldItem().consumeItem(player);
                     return true;
                 }
@@ -110,7 +111,7 @@ public class BlockLogicJar extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
@@ -123,13 +124,12 @@ public class BlockLogicJar extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE.center();
     }
 }
\ No newline at end of file
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJarButterfly.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJarButterfly.java
index 0f35506cf..05eee30f7 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJarButterfly.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJarButterfly.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityJarButterfly;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -13,12 +14,14 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.function.Supplier;
 
@@ -29,7 +32,7 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     private final @NotNull MobButterfly.ButterflyEntry color;
 
     public BlockLogicJarButterfly(@NotNull Block<?> block, @NotNull MobButterfly.ButterflyEntry color, @NotNull Supplier<@NotNull Item> itemSupplier) {
-        super(block, Material.glass);
+        super(block, Materials.GLASS);
         this.color = color;
         this.itemSupplier = itemSupplier;
         setBlockBounds(0.3125f, 0, 0.3125f, 1 - 0.3125f, 0.5f, 1 - 0.3125f);
@@ -37,12 +40,12 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int metadata = source.getBlockData(tilePos);
         float offset = 0.0F;
         if ((metadata & MASK_HANGING) != 0)
             offset = 0.3875F;
-        return AABB.fromPool(0.3125f, offset,  0.3125f, 1 - 0.3125f, 0.5F + offset, 1 - 0.3125f);
+        return new AABBd(0.3125f, offset, 0.3125f, 1 - 0.3125f, 0.5F + offset, 1 - 0.3125f);
     }
 
     @Override
@@ -56,12 +59,12 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         world.setBlockIdRaw(tilePos, 0);
         world.playSoundAtEntity(player, player, "item.pickup", 1f, 1f);
         if (!world.isClientSide) {
@@ -73,8 +76,9 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
-        if ((side == Side.BOTTOM || (side != Side.TOP && yHit >= 0.5d)) && (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF))) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
+        TilePos queryPos = new TilePos();
+        if ((side == Side.BOTTOM || (side != Side.TOP && yHit >= 0.5d)) && (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(queryPos)), BlockTags.CAN_HANG_OFF))) {
             world.setBlockDataNotify(tilePos, MASK_HANGING);
             return;
         }
@@ -82,7 +86,7 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
             world.setBlockDataNotify(tilePos, 0);
             return;
         }
-        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF)) {
+        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(queryPos)), BlockTags.CAN_HANG_OFF)) {
             world.setBlockDataNotify(tilePos, MASK_HANGING);
         } else {
             world.setBlockDataNotify(tilePos, 0);
@@ -90,8 +94,8 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF)) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF)) {
             return true;
         }
 
@@ -99,7 +103,7 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         if (!canStay(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
@@ -115,35 +119,35 @@ public class BlockLogicJarButterfly extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
         if ((meta & MASK_HANGING) != 0) {
-            return isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF);
+            return isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF);
         }
 
         return isSupported(world, tilePos, Side.BOTTOM);
     }
 
     @Override
-    public void onDestroyedByPlayer(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, int data, @NotNull Player player, @Nullable Item item) {
+    public void onDestroyedByPlayer(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, int data, @NotNull Player player, @Nullable Item item) {
         if (item != null && item.isSilkTouch()) {
             return;
         }
         if (!world.isClientSide) {
             MobButterfly entity = new MobButterfly(world);
             entity.setColor(this.color.id);
-            entity.setPos(tilePos.x + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f, tilePos.y + world.rand.nextFloat() * 0.5f, tilePos.z + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f);
+            entity.setPos(tilePos.x() + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f, tilePos.y() + world.rand.nextFloat() * 0.5f, tilePos.z() + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f);
             world.entityJoinedWorld(entity);
         }
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side.isVertical() ? PartialSupport.INSTANCE.center() : PartialSupport.INSTANCE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJukebox.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJukebox.java
index 3f41dbd2b..a546093c9 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicJukebox.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicJukebox.java
@@ -3,23 +3,24 @@ package net.minecraft.core.block;
 import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityJukebox;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicJukebox extends BlockLogic {
 	public BlockLogicJukebox(@NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
         block.withEntity(TileEntityJukebox::new);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if(world.getBlockData(tilePos) == 0) {
             return false;
         } else {
@@ -29,7 +30,7 @@ public class BlockLogicJukebox extends BlockLogic {
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         if (world.getBlockData(tilePos) != 0) {
             ejectRecord(world, tilePos);
         }
@@ -43,13 +44,13 @@ public class BlockLogicJukebox extends BlockLogic {
         }
     }
 
-    public void ejectRecord(@NotNull World world, @NotNull TilePos tilePos)
+    public void ejectRecord(@NotNull World world, @NotNull TilePosc tilePos)
     {
         if(world.isClientSide)
         {
             return;
         }
         TileEntity tileEntity = world.getTileEntity(tilePos);
-        if (tileEntity != null) tileEntity.dropContents(world, tilePos.x, tilePos.y, tilePos.z);
+        if (tileEntity != null) tileEntity.dropContents(world, tilePos.x(), tilePos.y(), tilePos.z());
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLadder.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLadder.java
index f31fb2020..60da91151 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLadder.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLadder.java
@@ -1,118 +1,120 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicLadder extends BlockLogic implements ISupportable {
 
-	public BlockLogicLadder(@NotNull Block<?> block) {
-		super(block, Material.wood);
-	}
-	
-	@Override
-	public boolean isSolidRender() {
-		return false;
-	}
-	
-	@Override
-	public boolean isCubeShaped() {
-		return false;
-	}
-
-	@Override
-	public boolean isClimbable(@NotNull World world, @NotNull TilePos tilePos) {
-		return true;
-	}
-
-	@Override
-	public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
-		return PartialSupport.INSTANCE;
-	}
-
-	@Override
-	public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-		Side side = getSideFromMeta(source.getBlockData(tilePos));
-
-		float width = 3.0f / 16.0f;
+    public BlockLogicLadder(@NotNull Block<?> block) {
+        super(block, Materials.WOOD);
+    }
+
+    @Override
+    public boolean isSolidRender() {
+        return false;
+    }
+
+    @Override
+    public boolean isCubeShaped() {
+        return false;
+    }
+
+    @Override
+    public boolean isClimbable(@NotNull World world, @NotNull TilePosc tilePos) {
+        return true;
+    }
+
+    @Override
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return PartialSupport.INSTANCE;
+    }
+
+    @Override
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        Side side = getSideFromMeta(source.getBlockData(tilePos));
+
+        float width = 3.0f / 16.0f;
         return switch (side) {
-            case SOUTH -> AABB.fromPool(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, width);
-            case WEST -> AABB.fromPool(1.0f - width, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
-            case EAST -> AABB.fromPool(0.0f, 0.0f, 0.0f, width, 1.0f, 1.0f);
-            default -> AABB.fromPool(0.0f, 0.0f, 1.0f - width, 1.0f, 1.0f, 1.0f);
+            case SOUTH -> new AABBd(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, width);
+            case WEST -> new AABBd(1.0f - width, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
+            case EAST -> new AABBd(0.0f, 0.0f, 0.0f, width, 1.0f, 1.0f);
+            default -> new AABBd(0.0f, 0.0f, 1.0f - width, 1.0f, 1.0f, 1.0f);
         };
-	}
-
-	@Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-		if(!canExistAt(world, tilePos, world.getBlockData(tilePos))) {
-			dropWithCause(world, EnumDropCause.WORLD, tilePos, id, null, null);
-			world.setBlockIdNotify(tilePos, 0);
-		}
-	}
-
-	@Override
-	public final boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-		// Unused, check ItemBlockLadder
-		return true;
-	}
-
-	@Override
-	public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
-		// Unused, check ItemBlockLadder
-		return true;
-	}
-
-	public Side getSideForPlacement(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side clickedSide) {
-		TilePos p = tilePos;
-		if(!world.canPlaceInsideBlock(tilePos)) {
-			p = p.add(clickedSide.getDirection());
-		}
-
-		if(canExistAt(world, p, getMetaForSide(clickedSide))) return clickedSide;
-		if(canExistAt(world, p, getMetaForSide(Side.NORTH))) return Side.NORTH;
-		if(canExistAt(world, p, getMetaForSide(Side.SOUTH))) return Side.SOUTH;
-		if(canExistAt(world, p, getMetaForSide(Side.WEST))) return Side.WEST;
-		if(canExistAt(world, p, getMetaForSide(Side.EAST))) return Side.EAST;
-		
-		return null;
-	}
-	
-	public boolean canExistAt(@NotNull World world, @NotNull TilePos tilePos, int meta) {
-		Side side = getSideFromMeta(meta).getOpposite();
-		return isSupported(world, tilePos, side);
-	}
-
-	/**
-	 * Returns the side of the block the ladder is attached to
-	 */
-	public Side getSideFromMeta(int meta) {
-		if(meta == 2) return Side.NORTH;
-		if(meta == 3) return Side.SOUTH;
-		if(meta == 4) return Side.WEST;
-		if(meta == 5) return Side.EAST;
-		return Side.NONE;
-	}
-	
-	public int getMetaForSide(@NotNull Side side) {
-		if(side == Side.NORTH) return 2;
-		if(side == Side.SOUTH) return 3;
-		if(side == Side.WEST) return 4;
-		if(side == Side.EAST) return 5;
-		return 0;
-	}
-
-	@Override
-	public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
-		return FullSupport.INSTANCE;
-	}
+    }
+
+    @Override
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (!canExistAt(world, tilePos, world.getBlockData(tilePos))) {
+            dropWithCause(world, EnumDropCause.WORLD, tilePos, id, null, null);
+            world.setBlockIdNotify(tilePos, 0);
+        }
+    }
+
+    @Override
+    public final boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        // Unused, check ItemBlockLadder
+        return true;
+    }
+
+    @Override
+    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
+        // Unused, check ItemBlockLadder
+        return true;
+    }
+
+    public Side getSideForPlacement(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side clickedSide) {
+        TilePosc p = tilePos;
+        if (!world.canPlaceInsideBlock(tilePos)) {
+            p = p.add(clickedSide.getDirection(), new TilePos());
+        }
+
+        if (canExistAt(world, p, getMetaForSide(clickedSide))) return clickedSide;
+        if (canExistAt(world, p, getMetaForSide(Side.NORTH))) return Side.NORTH;
+        if (canExistAt(world, p, getMetaForSide(Side.SOUTH))) return Side.SOUTH;
+        if (canExistAt(world, p, getMetaForSide(Side.WEST))) return Side.WEST;
+        if (canExistAt(world, p, getMetaForSide(Side.EAST))) return Side.EAST;
+
+        return null;
+    }
+
+    public boolean canExistAt(@NotNull World world, @NotNull TilePosc tilePos, int meta) {
+        Side side = getSideFromMeta(meta).getOpposite();
+        return isSupported(world, tilePos, side);
+    }
+
+    /**
+     * Returns the side of the block the ladder is attached to
+     */
+    public Side getSideFromMeta(int meta) {
+        if (meta == 2) return Side.NORTH;
+        if (meta == 3) return Side.SOUTH;
+        if (meta == 4) return Side.WEST;
+        if (meta == 5) return Side.EAST;
+        return Side.NONE;
+    }
+
+    public int getMetaForSide(@NotNull Side side) {
+        if (side == Side.NORTH) return 2;
+        if (side == Side.SOUTH) return 3;
+        if (side == Side.WEST) return 4;
+        if (side == Side.EAST) return 5;
+        return 0;
+    }
+
+    @Override
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
+        return FullSupport.INSTANCE;
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLamp.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLamp.java
index 3cc5a6d51..f4ff9f0f6 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLamp.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLamp.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntityActivator;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
@@ -10,7 +10,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,13 +19,13 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     public boolean isInverted;
 
     public BlockLogicLamp(Block<?> block, boolean isActive, boolean isInverted) {
-        super(block, Material.stone);
+        super(block, Materials.STONE);
         this.isActive = isActive;
         this.isInverted = isInverted;
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         if (this.isInverted) {
             if (this.isActive && (world.hasDirectSignal(tilePos) || world.hasNeighborSignal(tilePos))) {
                 world.setBlockIdDataNotify(tilePos, Blocks.LAMP_INVERTED_IDLE.id(), world.getBlockData(tilePos));
@@ -38,7 +38,7 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if (world.isClientSide) {
             return;
         }
@@ -61,7 +61,7 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         final boolean hasSignal = world.hasDirectSignal(tilePos) || world.hasNeighborSignal(tilePos);
 
         if (this.isInverted) {
@@ -80,7 +80,7 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (player.getHeldItem() == null) {
             invertLamp(world, tilePos);
             return true;
@@ -89,11 +89,11 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         invertLamp(world, tilePos);
     }
 
-    public void invertLamp(final @NotNull World world, final @NotNull TilePos tilePos) {
+    public void invertLamp(final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (this.isInverted) {
             if (this.isActive) {
                 world.setBlockIdDataNotify(tilePos, Blocks.LAMP_IDLE.id(), world.getBlockData(tilePos));
@@ -111,7 +111,7 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Blocks.LAMP_IDLE, 1, data) };
+        return new ItemStack[]{new ItemStack(Blocks.LAMP_IDLE, 1, data)};
     }
 
     @Override
@@ -130,7 +130,7 @@ public class BlockLogicLamp extends BlockLogic implements IPainted {
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockDataNotify(tilePos, 0);
     }
 }
\ No newline at end of file
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLanternFirefly.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLanternFirefly.java
index db1cb0498..f049d9d2f 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLanternFirefly.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLanternFirefly.java
@@ -2,6 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -12,12 +13,14 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 import java.util.function.Supplier;
@@ -29,51 +32,48 @@ public class BlockLogicLanternFirefly extends BlockLogic implements ISupportable
     private final MobFireflyCluster.FireflyColor color;
 
     public BlockLogicLanternFirefly(@NotNull Block<?> block, @NotNull MobFireflyCluster.FireflyColor colour, @NotNull Supplier<Item> itemSupplier) {
-        super(block, Material.glass);
+        super(block, Materials.GLASS);
         this.color = colour;
         this.itemSupplier = itemSupplier;
         setBlockBounds(0.3125f, 0, 0.3125f, 1 - 0.3125f, 0.5f, 1 - 0.3125f);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int metadata = source.getBlockData(tilePos);
         float offset = 0.0F;
         if ((metadata & MASK_HANGING) != 0)
             offset = 0.3875F;
-        return AABB.fromPool(0.3125f, offset,  0.3125f, 1 - 0.3125f, 0.5F + offset, 1 - 0.3125f);
+        return new AABBd(0.3125f, offset, 0.3125f, 1 - 0.3125f, 0.5F + offset, 1 - 0.3125f);
     }
 
     @Override
-    public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-        if(rand.nextInt(3)==0) {
-            world.spawnParticle(this.color.getParticleName(), (double)tilePos.x + rand.nextFloat(), (double)tilePos.y + rand.nextFloat(), (double) tilePos.z + rand.nextFloat(), 0.0D, 0.0D, 0.0D, 0);
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (rand.nextInt(3) == 0) {
+            world.spawnParticle(this.color.getParticleName(), (double) tilePos.x() + rand.nextFloat(), (double) tilePos.y() + rand.nextFloat(), (double) tilePos.z() + rand.nextFloat(), 0.0D, 0.0D, 0.0D, 0);
         }
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         world.setBlockIdRaw(tilePos, 0);
         world.playSoundAtEntity(player, player, "item.pickup", 1f, 1f);
-        if (!world.isClientSide)
-        {
+        if (!world.isClientSide) {
             world.dropItem(tilePos, new ItemStack(this.itemSupplier.get(), 1, 0));
         }
         world.markBlockDirty(tilePos);
@@ -82,16 +82,16 @@ public class BlockLogicLanternFirefly extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
-        if ((side == Side.BOTTOM || (side != Side.TOP && yHit >= 0.5d)) && (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF))){
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
+        if ((side == Side.BOTTOM || (side != Side.TOP && yHit >= 0.5d)) && (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF))) {
             world.setBlockDataNotify(tilePos, MASK_HANGING);
             return;
         }
-        if ((side == Side.TOP || (side != Side.BOTTOM && yHit < 0.5d)) && isSupported(world, tilePos, Side.BOTTOM)){
+        if ((side == Side.TOP || (side != Side.BOTTOM && yHit < 0.5d)) && isSupported(world, tilePos, Side.BOTTOM)) {
             world.setBlockDataNotify(tilePos, 0);
             return;
         }
-        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF)) {
+        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF)) {
             world.setBlockDataNotify(tilePos, MASK_HANGING);
         } else {
             world.setBlockDataNotify(tilePos, 0);
@@ -99,8 +99,8 @@ public class BlockLogicLanternFirefly extends BlockLogic implements ISupportable
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        if(isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF)) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF)) {
             return true;
         }
 
@@ -108,9 +108,8 @@ public class BlockLogicLanternFirefly extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-        if(!canStay(world, tilePos))
-        {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (!canStay(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
@@ -125,38 +124,38 @@ public class BlockLogicLanternFirefly extends BlockLogic implements ISupportable
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
-        if((meta & MASK_HANGING) != 0) {
-            return isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.CAN_HANG_OFF);
+        if ((meta & MASK_HANGING) != 0) {
+            return isSupported(world, tilePos, Side.TOP) || Blocks.hasTag(world.getBlockId(tilePos.up(new TilePos())), BlockTags.CAN_HANG_OFF);
         }
 
         return isSupported(world, tilePos, Side.BOTTOM);
     }
 
     @Override
-    public void onDestroyedByPlayer(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, int data, @NotNull Player player, @Nullable Item item) {
-        if(item != null && item.isSilkTouch()) {
+    public void onDestroyedByPlayer(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, int data, @NotNull Player player, @Nullable Item item) {
+        if (item != null && item.isSilkTouch()) {
             return;
         }
-        if(!world.isClientSide) {
+        if (!world.isClientSide) {
             MobFireflyCluster entity = new MobFireflyCluster(world);
             entity.setColor(this.color);
             entity.setFireflyCount(1);
             entity.setClusterSize(0);
             entity.setSizeBasedOnClusterSize(entity.getClusterSize());
-            entity.setPos(tilePos.x + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f, tilePos.y + world.rand.nextFloat() * 0.5f, tilePos.z + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f);
+            entity.setPos(tilePos.x() + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f, tilePos.y() + world.rand.nextFloat() * 0.5f, tilePos.z() + 0.5f + (world.rand.nextFloat() - 0.5f) * 0.5f);
             world.entityJoinedWorld(entity);
         }
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side.isVertical() ? PartialSupport.INSTANCE.center() : PartialSupport.INSTANCE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerAsh.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerAsh.java
index 46bcde131..aa6cc9852 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerAsh.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerAsh.java
@@ -7,6 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -20,13 +21,13 @@ public class BlockLogicLayerAsh extends BlockLogicLayerBase
         block.setTicking(true);
     }
 
-    public void accumulate(@NotNull World world, @NotNull TilePos tilePos) {
+    public void accumulate(@NotNull World world, @NotNull TilePosc tilePos) {
         int myMetadata = world.getBlockData(tilePos);
         if (myMetadata == 0x7) return;
 
         for (int i = 0; i < Direction.horizontalDirections.length; i++) {
             Direction dir = Direction.horizontalDirections[i];
-            TilePos dirPos = tilePos.add(dir);
+            TilePos dirPos = tilePos.add(dir, new TilePos());
             if (!((world.isBlockOpaqueCube(dirPos)) || (world.getBlockId(dirPos) == this.block.id() && world.getBlockData(dirPos) >= myMetadata))) return;
         }
 
@@ -35,8 +36,8 @@ public class BlockLogicLayerAsh extends BlockLogicLayerBase
     }
 
     @Override
-	public boolean canPlaceAt(World world, @NotNull TilePos tilePos) {
-        TilePos down = tilePos.down();
+	public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos down = tilePos.down(new TilePos());
         Block<?> b = world.getBlock(down);
         if(b == null || !b.isSolidRender()) {
         	return false;
@@ -47,7 +48,7 @@ public class BlockLogicLayerAsh extends BlockLogicLayerBase
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         // Remove if no longer valid
         if (!canPlaceAt(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerBase.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerBase.java
index a7d9d5022..a0d8de9dc 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerBase.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerBase.java
@@ -6,12 +6,13 @@ import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.item.block.ItemBlockLayer;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public abstract class BlockLogicLayerBase extends BlockLogic
 {
@@ -39,7 +40,7 @@ public abstract class BlockLogicLayerBase extends BlockLogic
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int height = world.getBlockData(tilePos) & MASK_HEIGHT;
         return switch (side) {
             case TOP -> PartialSupport.INSTANCE;
@@ -57,9 +58,9 @@ public abstract class BlockLogicLayerBase extends BlockLogic
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int data = source.getBlockData(tilePos) & MASK_HEIGHT;
         float f = (float)(2 * (1 + data)) / 16F;
-        return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
+        return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerLeaves.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerLeaves.java
index b0d51b7e2..33956bcfd 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerLeaves.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerLeaves.java
@@ -7,19 +7,19 @@ import net.minecraft.core.item.block.ItemBlockLayerLeaves;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
-public class BlockLogicLayerLeaves extends BlockLogicLayerBase
-{
+public class BlockLogicLayerLeaves extends BlockLogicLayerBase {
     public static final int MASK_PERMANENT = 0b1000_0000;
 
-	public BlockLogicLayerLeaves(Block<? extends BlockLogicLayerLeaves> block, Block<?> fullBlock, Material material) {
+    public BlockLogicLayerLeaves(Block<? extends BlockLogicLayerLeaves> block, Block<?> fullBlock, Material material) {
         super(block, fullBlock, material);
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
         block.setTicking(true);
@@ -27,41 +27,40 @@ public class BlockLogicLayerLeaves extends BlockLogicLayerBase
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
-    public void accumulate(@NotNull World world, @NotNull TilePos tilePos)
-    {
-    	int myMetadata = world.getBlockData(tilePos);
-    	if (myMetadata == 0x7) return;
+    public void accumulate(@NotNull World world, @NotNull TilePosc tilePos) {
+        int myMetadata = world.getBlockData(tilePos);
+        if (myMetadata == 0x7) return;
 
         for (int i = 0; i < Direction.horizontalDirections.length; i++) {
-            TilePos p = tilePos.add(Direction.horizontalDirections[i]);
+            TilePos p = tilePos.add(Direction.horizontalDirections[i], new TilePos());
 
             if (!((world.isBlockOpaqueCube(p)) || (world.getBlockId(p) == this.block.id() && world.getBlockData(p) >= myMetadata))) {
                 return;
             }
         }
 
-    	world.setBlockData(tilePos, myMetadata + 1);
-    	world.markBlockNeedsUpdate(tilePos);
+        world.setBlockData(tilePos, myMetadata + 1);
+        world.markBlockNeedsUpdate(tilePos);
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        TilePos down = tilePos.down();
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos down = tilePos.down(new TilePos());
         Block<?> b = world.getBlock(down);
-        if(b == null || (!b.isSolidRender() && !(b.getLogic() instanceof BlockLogicLeavesBase))) {
-        	return false;
+        if (b == null || (!b.isSolidRender() && !(b.getLogic() instanceof BlockLogicLeavesBase))) {
+            return false;
         } else {
-        	Material material = world.getBlockMaterial(down);
+            Material material = world.getBlockMaterial(down);
             return material.blocksMotion();
         }
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         // Remove if no longer valid
         if (!canPlaceAt(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
@@ -72,16 +71,17 @@ public class BlockLogicLayerLeaves extends BlockLogicLayerBase
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         return switch (dropCause) {
-            case SILK_TOUCH -> new ItemStack[]{new ItemStack(this, (data & ~MASK_PERMANENT) + 1)}; // Drop amount equal to number of layers
+            case SILK_TOUCH ->
+                new ItemStack[]{new ItemStack(this, (data & ~MASK_PERMANENT) + 1)}; // Drop amount equal to number of layers
             case PICK_BLOCK -> new ItemStack[]{new ItemStack(this)};
             default -> null;
         };
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-    	if (world.getSeasonManager().getCurrentSeason() != null && !world.getSeasonManager().getCurrentSeason().hasFallingLeaves) {
-    		int metadata = world.getBlockData(tilePos);
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.getSeasonManager().getCurrentSeason() != null && !world.getSeasonManager().getCurrentSeason().hasFallingLeaves) {
+            int metadata = world.getBlockData(tilePos);
             if (!isPermanent(metadata)) {
                 if (rand.nextInt(2) == 0) {
                     if (metadata > 0) {
@@ -91,14 +91,15 @@ public class BlockLogicLayerLeaves extends BlockLogicLayerBase
                     }
                 }
             }
-    	}
+        }
     }
 
-    public static boolean isPermanent(int meta){
+    public static boolean isPermanent(int meta) {
         return (meta & MASK_PERMANENT) != 0;
     }
+
     public static int setPermanent(int meta, boolean flag) {
-        if (flag){
+        if (flag) {
             return meta | MASK_PERMANENT;
         } else {
             return meta & ~MASK_PERMANENT;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerSnow.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerSnow.java
index b67f3335b..68834459e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerSnow.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLayerSnow.java
@@ -1,65 +1,67 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
-import net.minecraft.core.item.Items;
-import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.enums.LightLayer;
+import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
-public class BlockLogicLayerSnow extends BlockLogicLayerBase
-{
+public class BlockLogicLayerSnow extends BlockLogicLayerBase {
 
-	public BlockLogicLayerSnow(@NotNull Block<? extends BlockLogicLayerBase> block, @Nullable Block<?> fullBlock, @NotNull Material material) {
+    public BlockLogicLayerSnow(@NotNull Block<? extends BlockLogicLayerBase> block, @Nullable Block<?> fullBlock, @NotNull Material material) {
         super(block, fullBlock, material);
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
         block.setTicking(true);
     }
 
-    public void accumulate(@NotNull World world, @NotNull TilePos tilePos) {
-    	int myMetadata = world.getBlockData(tilePos);
-    	if (myMetadata == 0x7) return;
+    public void accumulate(@NotNull World world, @NotNull TilePosc tilePos) {
+        int myMetadata = world.getBlockData(tilePos);
+        if (myMetadata == 0x7) return;
 
         for (int i = 0; i < Direction.horizontalDirections.length; i++) {
             Direction dir = Direction.horizontalDirections[i];
-            TilePos dirPos = tilePos.add(dir);
-            if (!((world.isBlockOpaqueCube(dirPos)) || (world.getBlockId(dirPos) == this.block.id() && world.getBlockData(dirPos) >= myMetadata))) return;
+            TilePos dirPos = tilePos.add(dir, new TilePos());
+            if (!((world.isBlockOpaqueCube(dirPos)) || (world.getBlockId(dirPos) == this.block.id() && world.getBlockData(dirPos) >= myMetadata)))
+                return;
         }
 
-    	world.setBlockData(tilePos, myMetadata + 1);
-    	world.markBlockNeedsUpdate(tilePos);
+        world.setBlockData(tilePos, myMetadata + 1);
+        world.markBlockNeedsUpdate(tilePos);
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        TilePos down = tilePos.down();
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos down = tilePos.down(new TilePos());
         Block<?> b = world.getBlock(down);
-        if(b == null || (!b.isSolidRender() && !(b.getLogic() instanceof BlockLogicLeavesBase))) {
-        	return false;
+        if (b == null || (!b.isSolidRender() && !(b.getLogic() instanceof BlockLogicLeavesBase))) {
+            return false;
         } else {
-        	Material material = world.getBlockMaterial(down);
-            return material == Material.leaves || material.blocksMotion();
+            Material material = world.getBlockMaterial(down);
+            return material == Materials.LEAVES || material.blocksMotion();
         }
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        final AABB aabb = getBounds();
-        aabb.maxY = Math.max(aabb.maxY - 2/16f, tilePos.y);
-        return aabb;
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        final AABBdc aabb = getBounds();
+        return new AABBd(aabb).setMax(aabb.maxX(), Math.max(aabb.maxY() - 2 / 16f, tilePos.y()), aabb.maxZ());
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         // Remove if no longer valid
         if (!canPlaceAt(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
@@ -78,12 +80,12 @@ public class BlockLogicLayerSnow extends BlockLogicLayerBase
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-		if(world.getSavedLightValue(LightLayer.Block, tilePos) > 11) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.getSavedLightValue(LightLayer.Block, tilePos) > 11) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
-			world.setBlockIdNotify(tilePos, 0);
-		}
-        if(!world.getBlockBiome(tilePos).hasSurfaceSnow() && world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().letWeatherCleanUpSnow) {
+            world.setBlockIdNotify(tilePos, 0);
+        }
+        if (!world.getBlockBiome(tilePos).hasSurfaceSnow() && world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().letWeatherCleanUpSnow) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesBase.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesBase.java
index 7aed0e370..184376156 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesBase.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesBase.java
@@ -12,11 +12,11 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockLogicLeavesBase extends BlockLogic
-{
+public class BlockLogicLeavesBase extends BlockLogic {
     public static final int MASK_DECAY_DATA = 0b0000_1111;
     public static final int NUM_DECAY_BITS = 4;
     public static final int DECAY_FLAG_BIT = 3;
@@ -29,51 +29,49 @@ public class BlockLogicLeavesBase extends BlockLogic
     protected Block<?> sapling;
 
 
-	public BlockLogicLeavesBase(@NotNull Block<?> block, @NotNull Material material, @NotNull Block<?> sapling)
-    {
+    public BlockLogicLeavesBase(@NotNull Block<?> block, @NotNull Material material, @NotNull Block<?> sapling) {
         super(block, material);
         block.setTicking(true);
         this.sapling = sapling;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-    {
+    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         float dropRate = 20;
-        if (dropCause == EnumDropCause.PICK_BLOCK || dropCause == EnumDropCause.SILK_TOUCH) return new ItemStack[] { new ItemStack(this.block) };
+        if (dropCause == EnumDropCause.PICK_BLOCK || dropCause == EnumDropCause.SILK_TOUCH)
+            return new ItemStack[]{new ItemStack(this.block)};
 
         int numDropped = 1;
 
         if (world.rand.nextInt(MathHelper.floor(dropRate)) != 0) return null;
 
-        return new ItemStack[] { new ItemStack(getSapling(), numDropped) };
+        return new ItemStack[]{new ItemStack(getSapling(), numDropped)};
     }
 
     protected Block<?> getSapling() {
         return this.sapling;
     }
+
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data)
-    {
-    	if(!enableDecay) {
-    		return;
-    	}
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (!enableDecay) {
+            return;
+        }
         int radius = 1;
         int chunkRadius = radius + 1;
-        if(world.areBlocksLoaded(tilePos.add(-chunkRadius, -chunkRadius, -chunkRadius), tilePos.add(chunkRadius, chunkRadius, chunkRadius))) {
+        if (world.areBlocksLoaded(tilePos.add(-chunkRadius, -chunkRadius, -chunkRadius, new TilePos()), tilePos.add(chunkRadius, chunkRadius, chunkRadius, new TilePos()))) {
             TilePos p = new TilePos(tilePos);
-            for(int dx = -radius; dx <= radius; dx++) {
-                for(int dy = -radius; dy <= radius; dy++) {
-                    for(int dz = -radius; dz <= radius; dz++) {
-                        p.set(tilePos.x + dx, tilePos.y + dy, tilePos.z + dz);
+            for (int dx = -radius; dx <= radius; dx++) {
+                for (int dy = -radius; dy <= radius; dy++) {
+                    for (int dz = -radius; dz <= radius; dz++) {
+                        p.set(tilePos.x() + dx, tilePos.y() + dy, tilePos.z() + dz);
                         Block<?> block = world.getBlock(p);
-                        if(block != null && block.getLogic() instanceof BlockLogicLeavesBase) {
+                        if (block != null && block.getLogic() instanceof BlockLogicLeavesBase) {
                             int meta = world.getBlockData(p);
                             if (!isPermanent(meta)) {
                                 world.setBlockData(p, setDecaying(meta, true));
@@ -86,37 +84,33 @@ public class BlockLogicLeavesBase extends BlockLogic
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
-        if(world.isClientSide)
-        {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
         int meta = world.getBlockData(tilePos);
-        if(isDecaying(meta) && !isPermanent(meta))
-        {
+        if (isDecaying(meta) && !isPermanent(meta)) {
             byte radius = 4;
             int offset = radius + 1;
             byte ySpan = 32;
             int xSpan = ySpan * ySpan;
             int halfLength = ySpan / 2;
-            if(this.adjacentTreeBlocks == null)
-            {
+            if (this.adjacentTreeBlocks == null) {
                 this.adjacentTreeBlocks = new int[ySpan * ySpan * ySpan];
             }
-            if(world.areBlocksLoaded(tilePos.add(-offset, -offset, -offset), tilePos.add(offset, offset, offset))) {
+            if (world.areBlocksLoaded(tilePos.add(-offset, -offset, -offset, new TilePos()), tilePos.add(offset, offset, offset, new TilePos()))) {
                 TilePos p = new TilePos(tilePos);
-                for(int xOffset = -radius; xOffset <= radius; xOffset++) {
-                    for(int yOffset = -radius; yOffset <= radius; yOffset++) {
-                        for(int zOffset = -radius; zOffset <= radius; zOffset++) {
-                            Block<?> block = world.getBlock(p.set(tilePos.x + xOffset, tilePos.y + yOffset, tilePos.z + zOffset));
+                for (int xOffset = -radius; xOffset <= radius; xOffset++) {
+                    for (int yOffset = -radius; yOffset <= radius; yOffset++) {
+                        for (int zOffset = -radius; zOffset <= radius; zOffset++) {
+                            Block<?> block = world.getBlock(p.set(tilePos.x() + xOffset, tilePos.y() + yOffset, tilePos.z() + zOffset));
 
                             int i = (xOffset + halfLength) * xSpan + (yOffset + halfLength) * ySpan + (zOffset + halfLength);
-                            if(block != null && block.getLogic() instanceof BlockLogicLog) {
+                            if (block != null && block.getLogic() instanceof BlockLogicLog) {
                                 this.adjacentTreeBlocks[i] = 0;
                                 continue;
                             }
-                            if(block != null && block.getLogic() instanceof BlockLogicLeavesBase) {
+                            if (block != null && block.getLogic() instanceof BlockLogicLeavesBase) {
                                 this.adjacentTreeBlocks[i] = -2;
                             } else {
                                 this.adjacentTreeBlocks[i] = -1;
@@ -125,35 +119,35 @@ public class BlockLogicLeavesBase extends BlockLogic
                     }
                 }
 
-                for(int j = 1; j <= 4; j++) {
-                    for(int dx = -radius; dx <= radius; dx++) {
-                        for(int dy = -radius; dy <= radius; dy++) {
-                            for(int dz = -radius; dz <= radius; dz++) {
-                                if(this.adjacentTreeBlocks[(dx + halfLength) * xSpan + (dy + halfLength) * ySpan + (dz + halfLength)] != j - 1) {
+                for (int j = 1; j <= 4; j++) {
+                    for (int dx = -radius; dx <= radius; dx++) {
+                        for (int dy = -radius; dy <= radius; dy++) {
+                            for (int dz = -radius; dz <= radius; dz++) {
+                                if (this.adjacentTreeBlocks[(dx + halfLength) * xSpan + (dy + halfLength) * ySpan + (dz + halfLength)] != j - 1) {
                                     continue;
                                 }
                                 int iWest = ((dx + halfLength) - 1) * xSpan + (dy + halfLength) * ySpan + (dz + halfLength);
-                                if(this.adjacentTreeBlocks[iWest] == -2) {
+                                if (this.adjacentTreeBlocks[iWest] == -2) {
                                     this.adjacentTreeBlocks[iWest] = j;
                                 }
                                 int iEast = (dx + halfLength + 1) * xSpan + (dy + halfLength) * ySpan + (dz + halfLength);
-                                if(this.adjacentTreeBlocks[iEast] == -2) {
+                                if (this.adjacentTreeBlocks[iEast] == -2) {
                                     this.adjacentTreeBlocks[iEast] = j;
                                 }
                                 int iDown = (dx + halfLength) * xSpan + ((dy + halfLength) - 1) * ySpan + (dz + halfLength);
-                                if(this.adjacentTreeBlocks[iDown] == -2) {
+                                if (this.adjacentTreeBlocks[iDown] == -2) {
                                     this.adjacentTreeBlocks[iDown] = j;
                                 }
                                 int iUp = (dx + halfLength) * xSpan + (dy + halfLength + 1) * ySpan + (dz + halfLength);
-                                if(this.adjacentTreeBlocks[iUp] == -2) {
+                                if (this.adjacentTreeBlocks[iUp] == -2) {
                                     this.adjacentTreeBlocks[iUp] = j;
                                 }
                                 int iNorth = (dx + halfLength) * xSpan + (dy + halfLength) * ySpan + ((dz + halfLength) - 1);
-                                if(this.adjacentTreeBlocks[iNorth] == -2) {
+                                if (this.adjacentTreeBlocks[iNorth] == -2) {
                                     this.adjacentTreeBlocks[iNorth] = j;
                                 }
                                 int iSouth = (dx + halfLength) * xSpan + (dy + halfLength) * ySpan + (dz + halfLength + 1);
-                                if(this.adjacentTreeBlocks[iSouth] == -2) {
+                                if (this.adjacentTreeBlocks[iSouth] == -2) {
                                     this.adjacentTreeBlocks[iSouth] = j;
                                 }
                             }
@@ -161,7 +155,7 @@ public class BlockLogicLeavesBase extends BlockLogic
                     }
                 }
             }
-            if(this.adjacentTreeBlocks[halfLength * xSpan + halfLength * ySpan + halfLength] >= 0) {
+            if (this.adjacentTreeBlocks[halfLength * xSpan + halfLength * ySpan + halfLength] >= 0) {
                 world.setBlockData(tilePos, setDecaying(meta, false));
             } else {
                 removeLeaves(world, tilePos);
@@ -169,45 +163,47 @@ public class BlockLogicLeavesBase extends BlockLogic
         }
     }
 
-    private void removeLeaves(@NotNull World world, @NotNull TilePos tilePos) {
+    private void removeLeaves(@NotNull World world, @NotNull TilePosc tilePos) {
         dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
         world.setBlockIdNotify(tilePos, 0);
     }
+
     public static boolean isPermanent(int meta) {
-    	return (meta & (0b1 << PERMANENT_FLAG_BIT)) != 0;
+        return (meta & (0b1 << PERMANENT_FLAG_BIT)) != 0;
     }
+
     public static int setPermanent(int meta, boolean permanent) {
-        if(permanent) {
+        if (permanent) {
             return meta | (0b1 << PERMANENT_FLAG_BIT);
-        }else {
+        } else {
             return meta & ~(0b1 << PERMANENT_FLAG_BIT);
         }
     }
 
     public static boolean isDecaying(int meta) {
-    	return (meta & (0b1 << DECAY_FLAG_BIT)) != 0;
+        return (meta & (0b1 << DECAY_FLAG_BIT)) != 0;
     }
 
     public static int setDecaying(int meta, boolean decaying) {
-    	if(decaying) {
-    		return meta | (0b1 << DECAY_FLAG_BIT);
-    	}else {
-    		return meta & ~(0b1 << DECAY_FLAG_BIT);
-    	}
+        if (decaying) {
+            return meta | (0b1 << DECAY_FLAG_BIT);
+        } else {
+            return meta & ~(0b1 << DECAY_FLAG_BIT);
+        }
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return 0b1 << PERMANENT_FLAG_BIT;
     }
 
     @Override
-    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-    	return enableTreeShadowing ? 0.8f : 0.0f;
+    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        return enableTreeShadowing ? 0.8f : 0.0f;
     }
 
     @Override
-    public boolean isEquivalent(@NotNull World world, @NotNull TilePos thisPos, @NotNull TilePos thatPos) {
+    public boolean isEquivalent(@NotNull World world, @NotNull TilePosc thisPos, @NotNull TilePosc thatPos) {
         Block<?> bBlock = world.getBlock(thatPos);
 
         int thisMeta = world.getBlockData(thisPos) & ~MASK_DECAY_DATA;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCacao.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCacao.java
index 1c856ba54..15d652fce 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCacao.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCacao.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.IBonemealable;
@@ -14,6 +14,7 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.Seasons;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -25,16 +26,17 @@ public class BlockLogicLeavesCacao extends BlockLogicLeavesBase implements IBone
     public static final int MASK_GROWTH_DATA = 0b1111_0000;
     public static final int MAX_GROWTH_STATE = 4;
     static final int BEAN_GROWTH_RATE = 50;
+
     public BlockLogicLeavesCacao(@NotNull Block<?> block) {
-        super(block, Material.leaves, Blocks.SAPLING_CACAO);
+        super(block, Materials.LEAVES, Blocks.SAPLING_CACAO);
         block.setTicking(true);
     }
 
-    public boolean canBeansGrow(@NotNull World world, @NotNull TilePos tilePos){
-        TilePos p = new TilePos(tilePos);
-        for(int x = tilePos.x - 1; x < tilePos.x + 1; x++){
-            for(int z = tilePos.z - 1; z < tilePos.z + 1; z++){
-                if (world.getBlock(p.set(x, tilePos.y, z)) == null) {
+    public boolean canBeansGrow(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos(tilePos);
+        for (int x = tilePos.x() - 1; x < tilePos.x() + 1; x++) {
+            for (int z = tilePos.z() - 1; z < tilePos.z() + 1; z++) {
+                if (world.getBlock(queryPos.set(x, tilePos.y(), z)) == null) {
                     return true;
                 }
             }
@@ -44,40 +46,40 @@ public class BlockLogicLeavesCacao extends BlockLogicLeavesBase implements IBone
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        if (dropCause == EnumDropCause.PICK_BLOCK || dropCause == EnumDropCause.SILK_TOUCH) return new ItemStack[] { new ItemStack(this) };
+        if (dropCause == EnumDropCause.PICK_BLOCK || dropCause == EnumDropCause.SILK_TOUCH)
+            return new ItemStack[]{new ItemStack(this)};
 
         int growthRate = getGrowthRate(data);
-        if (growthRate > 1)
-        {
-            return new ItemStack[] { new ItemStack(Items.DYE, MathHelper.ceil((double) growthRate / 2), DyeColor.BROWN.itemMeta)};
+        if (growthRate > 1) {
+            return new ItemStack[]{new ItemStack(Items.DYE, MathHelper.ceil((double) growthRate / 2), DyeColor.BROWN.itemMeta)};
         }
 
         return super.getBreakResult(world, dropCause, data, tileEntity);
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         return harvest(world, tilePos, player);
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         harvest(world, tilePos, null);
     }
 
-    public boolean harvest(@NotNull World world, @NotNull TilePos tilePos, @Nullable Player player) {
+    public boolean harvest(@NotNull World world, @NotNull TilePosc tilePos, @Nullable Player player) {
         int meta = world.getBlockData(tilePos);
         int growthRate = getGrowthRate(meta);
-        if(growthRate > 0) {
+        if (growthRate > 0) {
             if (player != null) {
                 world.playSoundAtEntity(player, player, "item.pickup", 1, 1);
             }
-            if(!world.isClientSide) {
+            if (!world.isClientSide) {
                 dropWithCause(world, EnumDropCause.WORLD, tilePos, meta, null, null);
             }
             world.setBlockDataNotify(tilePos, setGrowthRate(meta, 0));
@@ -88,7 +90,7 @@ public class BlockLogicLeavesCacao extends BlockLogicLeavesBase implements IBone
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
         int meta = world.getBlockData(tilePos);
         int growthRate = getGrowthRate(meta);
@@ -100,8 +102,7 @@ public class BlockLogicLeavesCacao extends BlockLogicLeavesBase implements IBone
                         world.scheduleBlockUpdate(tilePos, Blocks.LEAVES_CACAO.id(), tickDelay());
                     }
                 }
-            }
-            else if(growthRate > 0){
+            } else if (growthRate > 0) {
                 world.setBlockDataNotify(tilePos, setGrowthRate(meta, 0));
                 world.scheduleBlockUpdate(tilePos, Blocks.LEAVES_CACAO.id(), tickDelay());
             }
@@ -109,17 +110,14 @@ public class BlockLogicLeavesCacao extends BlockLogicLeavesBase implements IBone
     }
 
     @Override
-    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
-        if(getGrowthRate(meta) < MAX_GROWTH_STATE)
-        {
-            if(!world.isClientSide)
-            {
-                if(world.getSeasonManager().getCurrentSeason() != Seasons.OVERWORLD_SUMMER)
+        if (getGrowthRate(meta) < MAX_GROWTH_STATE) {
+            if (!world.isClientSide) {
+                if (world.getSeasonManager().getCurrentSeason() != Seasons.OVERWORLD_SUMMER)
                     return true;
                 world.setBlockDataNotify(tilePos, setGrowthRate(meta, MAX_GROWTH_STATE));
-                if (player == null || player.getGamemode().consumeBlocks())
-                {
+                if (player == null || player.getGamemode().consumeBlocks()) {
                     itemStack.stackSize--;
                 }
             }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherry.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherry.java
index 69f9d0674..21bb9bb7b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherry.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherry.java
@@ -1,25 +1,23 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.Seasons;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicLeavesCherry extends BlockLogicLeavesBase
-{
+public class BlockLogicLeavesCherry extends BlockLogicLeavesBase {
 
-	public BlockLogicLeavesCherry(@NotNull Block<?> block)
-    {
-        super(block, Material.leaves, Blocks.SAPLING_CHERRY);
+    public BlockLogicLeavesCherry(@NotNull Block<?> block) {
+        super(block, Materials.LEAVES, Blocks.SAPLING_CHERRY);
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_SPRING && rand.nextInt(40) == 0) {
-            world.spawnParticle("fallingleaf", tilePos.x, (double) tilePos.y - 0.1f, tilePos.z, 0, 0, 0, 0);
+            world.spawnParticle("fallingleaf", tilePos.x(), (double) tilePos.y() - 0.1f, tilePos.z(), 0, 0, 0, 0);
         }
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherryFlowering.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherryFlowering.java
index b50d51a5c..3f4badadd 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherryFlowering.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesCherryFlowering.java
@@ -10,7 +10,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.Seasons;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -38,16 +38,16 @@ public class BlockLogicLeavesCherryFlowering extends BlockLogicLeavesCherry impl
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         return harvest(world, tilePos, player);
     }
 
-    public boolean harvest(@NotNull World world, @NotNull TilePos tilePos, @Nullable Player player) {
+    public boolean harvest(@NotNull World world, @NotNull TilePosc tilePos, @Nullable Player player) {
         int meta = world.getBlockData(tilePos);
         int growthRate = getGrowthRate(meta);
         if(growthRate > 0) {
@@ -65,12 +65,12 @@ public class BlockLogicLeavesCherryFlowering extends BlockLogicLeavesCherry impl
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         harvest(world, tilePos, null);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+	public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
         int meta = world.getBlockData(tilePos);
         int growthRate = getGrowthRate(meta);
@@ -89,7 +89,7 @@ public class BlockLogicLeavesCherryFlowering extends BlockLogicLeavesCherry impl
     }
 
     @Override
-    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
         if(getGrowthRate(meta) == 0) {
             if(!world.isClientSide) {
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesEucalyptus.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesEucalyptus.java
index 0e9686b3e..ded4141a8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesEucalyptus.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesEucalyptus.java
@@ -1,21 +1,21 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
 public class BlockLogicLeavesEucalyptus extends BlockLogicLeavesBase {
-	public BlockLogicLeavesEucalyptus(@NotNull Block<?> block) {
-        super(block, Material.leaves, Blocks.SAPLING_EUCALYPTUS);
+    public BlockLogicLeavesEucalyptus(@NotNull Block<?> block) {
+        super(block, Materials.LEAVES, Blocks.SAPLING_EUCALYPTUS);
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-    	if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves && rand.nextInt(40) == 0) {
-    		world.spawnParticle("fallingleaf", tilePos.x, (double) tilePos.y - 0.1f, tilePos.z, 0, 0, 0, 0);
-    	}
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves && rand.nextInt(40) == 0) {
+            world.spawnParticle("fallingleaf", tilePos.x(), (double) tilePos.y() - 0.1f, tilePos.z(), 0, 0, 0, 0);
+        }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesOak.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesOak.java
index 532b16294..bb2701a04 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesOak.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesOak.java
@@ -1,35 +1,34 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.wind.WindProvider;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicLeavesOak extends BlockLogicLeavesBase
-{
-	public BlockLogicLeavesOak(@NotNull Block<?> block)
-    {
-        super(block, Material.leaves, Blocks.SAPLING_OAK);
+public class BlockLogicLeavesOak extends BlockLogicLeavesBase {
+    public BlockLogicLeavesOak(@NotNull Block<?> block) {
+        super(block, Materials.LEAVES, Blocks.SAPLING_OAK);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
         if (rand.nextInt(128) == 0 && world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves) {
-            TilePos p = new TilePos(tilePos);
+            TilePos queryPos = new TilePos();
             for (int q = -1; q > -16; q--) {
-                p.y = tilePos.y + q;
-                int id = world.getBlockId(p);
+                int id = world.getBlockId(tilePos.add(0, q, 0, queryPos));
                 if (id != 0) break;
-                if (Blocks.LAYER_LEAVES_OAK.canPlaceAt(world, p) && Blocks.blocksList[world.getBlockId(p.down())].getMaterial().blocksMotion()) {
-                    world.setBlockIdNotify(p, Blocks.LAYER_LEAVES_OAK.id());
+                if (Blocks.LAYER_LEAVES_OAK.canPlaceAt(world, tilePos.add(0, q, 0, queryPos)) &&
+                    Blocks.blocksList[world.getBlockId(tilePos.add(0, q - 1, 0, queryPos))].getMaterial().blocksMotion()) {
+
+                    world.setBlockIdNotify(tilePos.add(0, q, 0, queryPos), Blocks.LAYER_LEAVES_OAK.id());
                     break;
-                } else if (world.getBlockId(p) == Blocks.LAYER_LEAVES_OAK.id()) {
-                    Blocks.LAYER_LEAVES_OAK.getLogic().accumulate(world, p);
+                } else if (world.getBlockId(tilePos.add(0, q, 0, queryPos)) == Blocks.LAYER_LEAVES_OAK.id()) {
+                    Blocks.LAYER_LEAVES_OAK.getLogic().accumulate(world, queryPos);
                     break;
                 }
             }
@@ -37,14 +36,13 @@ public class BlockLogicLeavesOak extends BlockLogicLeavesBase
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-    	if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves) {
             WindProvider wind = world.getWorldType().getWindManager();
-            float windIntensity = wind.getWindIntensity(world, tilePos.x, tilePos.y, tilePos.z);
-            if (rand.nextInt((int)(40 + 200 * (1 - windIntensity))) == 0)
-            {
-                world.spawnParticle("fallingleaf", tilePos.x, (double) tilePos.y - 0.1f, tilePos.z, 0, 0, 0, 0);
+            float windIntensity = wind.getWindIntensity(world, tilePos.x(), tilePos.y(), tilePos.z());
+            if (rand.nextInt((int) (40 + 200 * (1 - windIntensity))) == 0) {
+                world.spawnParticle("fallingleaf", tilePos.x(), (double) tilePos.y() - 0.1f, tilePos.z(), 0, 0, 0, 0);
             }
-    	}
+        }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesPine.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesPine.java
index 911e95f98..7b52f582d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesPine.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesPine.java
@@ -1,10 +1,10 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -13,7 +13,7 @@ public class BlockLogicLeavesPine extends BlockLogicLeavesBase
 
 	public BlockLogicLeavesPine(@NotNull Block<?> block)
     {
-        super(block, Material.leaves, Blocks.SAPLING_PINE);
+        super(block, Materials.LEAVES, Blocks.SAPLING_PINE);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesShrub.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesShrub.java
index 781cbe926..a5da68337 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesShrub.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLeavesShrub.java
@@ -1,8 +1,8 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
@@ -12,13 +12,13 @@ public class BlockLogicLeavesShrub extends BlockLogicLeavesBase
 
 	public BlockLogicLeavesShrub(@NotNull Block<?> block)
     {
-        super(block, Material.leaves, Blocks.SAPLING_SHRUB);
+        super(block, Materials.LEAVES, Blocks.SAPLING_SHRUB);
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+	public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         if (world.getSeasonManager().getCurrentSeason() != null && world.getSeasonManager().getCurrentSeason().hasFallingLeaves && rand.nextInt(40) == 0) {
-            world.spawnParticle("fallingleaf", tilePos.x, (double) tilePos.y - 0.1f, tilePos.z, 0, 0, 0, 0);
+            world.spawnParticle("fallingleaf", tilePos.x(), (double) tilePos.y() - 0.1f, tilePos.z(), 0, 0, 0, 0);
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLever.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLever.java
index f2df220d8..4b89587b4 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLever.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLever.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -14,15 +14,16 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicLever extends BlockLogic implements ISupportable
-{
+public class BlockLogicLever extends BlockLogic implements ISupportable {
     public static final int MASK_POWERED = 0b0001_0000;
     public static final int MASK_ROTATION = 0b0000_1111;
     public static final int ROTATION_EAST = 1;
@@ -34,43 +35,39 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
     public static final int ROTATION_BOTTOM_NS = 7;
     public static final int ROTATION_BOTTOM_WE = 8;
 
-	public BlockLogicLever(@NotNull Block<?> block)
-    {
-        super(block, Material.decoration);
+    public BlockLogicLever(@NotNull Block<?> block) {
+        super(block, Materials.DECORATION);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         Side checkSide = side.getOpposite();
         return isSupported(world, tilePos, checkSide);
     }
 
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM)
             || isSupported(world, tilePos, Side.TOP)
             || isSupported(world, tilePos, Side.NORTH)
@@ -78,47 +75,46 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
             || isSupported(world, tilePos, Side.WEST)
             || isSupported(world, tilePos, Side.EAST);
     }
-    
+
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
         boolean isPowered = isPowered(meta);
         int rotation = -1;
-        switch (side){
+        switch (side) {
             case BOTTOM:
-                if (isSupported(world, tilePos, Side.TOP)){
+                if (isSupported(world, tilePos, Side.TOP)) {
                     rotation = ROTATION_BOTTOM_NS + (mob.getHorizontalPlacementDirection(side).getAxis() == Axis.Z ? 1 : 0);
                 }
                 break;
             case TOP:
-                if (isSupported(world, tilePos, Side.BOTTOM))
-                {
+                if (isSupported(world, tilePos, Side.BOTTOM)) {
                     rotation = ROTATION_TOP_NS + (mob.getHorizontalPlacementDirection(side).getAxis() == Axis.Z ? 1 : 0);
                 }
                 break;
             case NORTH:
-                if (isSupported(world, tilePos, Side.SOUTH)){
+                if (isSupported(world, tilePos, Side.SOUTH)) {
                     rotation = ROTATION_NORTH;
                 }
                 break;
             case SOUTH:
-                if (isSupported(world, tilePos, Side.NORTH)){
+                if (isSupported(world, tilePos, Side.NORTH)) {
                     rotation = ROTATION_SOUTH;
                 }
                 break;
             case WEST:
-                if (isSupported(world, tilePos, Side.EAST)){
+                if (isSupported(world, tilePos, Side.EAST)) {
                     rotation = ROTATION_WEST;
                 }
                 break;
             case EAST:
-                if (isSupported(world, tilePos, Side.WEST)){
+                if (isSupported(world, tilePos, Side.WEST)) {
                     rotation = ROTATION_EAST;
                 }
                 break;
         }
 
-        if(rotation == -1) {
+        if (rotation == -1) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         } else {
@@ -127,7 +123,7 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
         boolean isPowered = isPowered(meta);
         int rotation = -1;
@@ -164,7 +160,7 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
             }
         }
 
-        if(rotation == -1) {
+        if (rotation == -1) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         } else {
@@ -173,8 +169,8 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-        if(checkIfAttachedToBlock(world, tilePos)) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (checkIfAttachedToBlock(world, tilePos)) {
             int rotation = getRotation(world.getBlockData(tilePos));
             boolean shouldBreak = switch (rotation) {
                 case ROTATION_EAST -> !isSupported(world, tilePos, Side.WEST);
@@ -185,15 +181,14 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
                 case ROTATION_BOTTOM_NS, ROTATION_BOTTOM_WE -> !isSupported(world, tilePos, Side.TOP);
                 default -> false;
             };
-            if(shouldBreak) {
+            if (shouldBreak) {
                 dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
                 world.setBlockIdNotify(tilePos, 0);
             }
         }
     }
 
-    private boolean checkIfAttachedToBlock(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    private boolean checkIfAttachedToBlock(@NotNull World world, @NotNull TilePosc tilePos) {
         if (canPlaceAt(world, tilePos)) {
             return true;
         } else {
@@ -204,129 +199,133 @@ public class BlockLogicLever extends BlockLogic implements ISupportable
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int rotation = getRotation(source.getBlockData(tilePos));
         final float f = 0.1875F;
         final float f1 = 0.25f;
         return switch (rotation) {
-            case ROTATION_EAST -> AABB.fromPool(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
-            case ROTATION_WEST -> AABB.fromPool(1.0F - f * 2.0F, 0.2F, 0.5F - f, 1.0F, 0.8F, 0.5F + f);
-            case ROTATION_SOUTH -> AABB.fromPool(0.5F - f, 0.2F, 0.0F, 0.5F + f, 0.8F, f * 2.0F);
-            case ROTATION_NORTH -> AABB.fromPool(0.5F - f, 0.2F, 1.0F - f * 2.0F, 0.5F + f, 0.8F, 1.0F);
-            case ROTATION_TOP_NS, ROTATION_TOP_WE -> AABB.fromPool(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, 0.6F, 0.5F + f1);
-            default -> AABB.fromPool(0.5F - f1, 0.4, 0.5F - f1, 0.5F + f1, 1F, 0.5F + f1);
+            case ROTATION_EAST -> new AABBd(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
+            case ROTATION_WEST -> new AABBd(1.0F - f * 2.0F, 0.2F, 0.5F - f, 1.0F, 0.8F, 0.5F + f);
+            case ROTATION_SOUTH -> new AABBd(0.5F - f, 0.2F, 0.0F, 0.5F + f, 0.8F, f * 2.0F);
+            case ROTATION_NORTH -> new AABBd(0.5F - f, 0.2F, 1.0F - f * 2.0F, 0.5F + f, 0.8F, 1.0F);
+            case ROTATION_TOP_NS, ROTATION_TOP_WE -> new AABBd(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, 0.6F, 0.5F + f1);
+            default -> new AABBd(0.5F - f1, 0.4, 0.5F - f1, 0.5F + f1, 1F, 0.5F + f1);
         };
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
-        if(!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+        if (!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
             onInteracted(world, tilePos, player, null, 0.0, 0.0);
         }
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         flip(world, tilePos, player);
         return true;
     }
 
-    public void flip(@NotNull World world, @NotNull TilePos tilePos, @Nullable Player player) {
+    public void flip(@NotNull World world, @NotNull TilePosc tilePos, @Nullable Player player) {
         int meta = world.getBlockData(tilePos);
         int rotation = getRotation(meta);
-        if (isPowered(meta)){
+        if (isPowered(meta)) {
             world.setBlockDataNotify(tilePos, meta & ~MASK_POWERED);
         } else {
             world.setBlockDataNotify(tilePos, meta | MASK_POWERED);
         }
 
         world.markBlocksDirty(tilePos, tilePos);
-        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D, "random.click", 0.3F, isPowered(meta) ? 0.5F : 0.6F);
+        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "random.click", 0.3F, isPowered(meta) ? 0.5F : 0.6F);
         world.notifyBlocksOfNeighborChange(tilePos, this.block.id());
+
+        TilePos queryPos = new TilePos();
         switch (rotation) {
-            case ROTATION_EAST -> world.notifyBlocksOfNeighborChange(tilePos.west(), this.block.id());
-            case ROTATION_WEST -> world.notifyBlocksOfNeighborChange(tilePos.east(), this.block.id());
-            case ROTATION_SOUTH -> world.notifyBlocksOfNeighborChange(tilePos.north(), this.block.id());
-            case ROTATION_NORTH -> world.notifyBlocksOfNeighborChange(tilePos.south(), this.block.id());
-            case ROTATION_TOP_NS, ROTATION_TOP_WE -> world.notifyBlocksOfNeighborChange(tilePos.down(), this.block.id());
-            default -> world.notifyBlocksOfNeighborChange(tilePos.up(), this.block.id());
+            case ROTATION_EAST -> world.notifyBlocksOfNeighborChange(tilePos.west(queryPos), this.block.id());
+            case ROTATION_WEST -> world.notifyBlocksOfNeighborChange(tilePos.east(queryPos), this.block.id());
+            case ROTATION_SOUTH -> world.notifyBlocksOfNeighborChange(tilePos.north(queryPos), this.block.id());
+            case ROTATION_NORTH -> world.notifyBlocksOfNeighborChange(tilePos.south(queryPos), this.block.id());
+            case ROTATION_TOP_NS, ROTATION_TOP_WE ->
+                world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), this.block.id());
+            default -> world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), this.block.id());
         }
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         flip(world, tilePos, null);
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
-        if(isPowered(data)) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (isPowered(data)) {
             world.notifyBlocksOfNeighborChange(tilePos, this.block.id());
+            TilePos queryPos = new TilePos();
             int rotation = getRotation(data);
             switch (rotation) {
-                case ROTATION_EAST -> world.notifyBlocksOfNeighborChange(tilePos.west(), this.block.id());
-                case ROTATION_WEST -> world.notifyBlocksOfNeighborChange(tilePos.east(), this.block.id());
-                case ROTATION_SOUTH -> world.notifyBlocksOfNeighborChange(tilePos.north(), this.block.id());
-                case ROTATION_NORTH -> world.notifyBlocksOfNeighborChange(tilePos.south(), this.block.id());
-                case ROTATION_TOP_NS, ROTATION_TOP_WE -> world.notifyBlocksOfNeighborChange(tilePos.down(), this.block.id());
-                default -> world.notifyBlocksOfNeighborChange(tilePos.up(), this.block.id());
+                case ROTATION_EAST -> world.notifyBlocksOfNeighborChange(tilePos.west(queryPos), this.block.id());
+                case ROTATION_WEST -> world.notifyBlocksOfNeighborChange(tilePos.east(queryPos), this.block.id());
+                case ROTATION_SOUTH -> world.notifyBlocksOfNeighborChange(tilePos.north(queryPos), this.block.id());
+                case ROTATION_NORTH -> world.notifyBlocksOfNeighborChange(tilePos.south(queryPos), this.block.id());
+                case ROTATION_TOP_NS, ROTATION_TOP_WE ->
+                    world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), this.block.id());
+                default -> world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), this.block.id());
             }
         }
         super.onRemoved(world, tilePos, data);
     }
 
-    public static int getRotation(int meta){
+    public static int getRotation(int meta) {
         return meta & MASK_ROTATION;
     }
 
-    public static boolean isPowered(int meta){
+    public static boolean isPowered(int meta) {
         return (meta & MASK_POWERED) != 0;
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return isPowered(source.getBlockData(tilePos));
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
-        if(!isPowered(meta)) {
+        if (!isPowered(meta)) {
             return false;
         }
         int rotation = getRotation(meta);
-        if(rotation == ROTATION_BOTTOM_WE && side == Side.BOTTOM) {
+        if (rotation == ROTATION_BOTTOM_WE && side == Side.BOTTOM) {
             return true;
         }
-        if(rotation == ROTATION_BOTTOM_NS && side == Side.BOTTOM) {
+        if (rotation == ROTATION_BOTTOM_NS && side == Side.BOTTOM) {
             return true;
         }
-        if(rotation == ROTATION_TOP_WE && side == Side.TOP) {
+        if (rotation == ROTATION_TOP_WE && side == Side.TOP) {
             return true;
         }
-        if(rotation == ROTATION_TOP_NS && side == Side.TOP) {
+        if (rotation == ROTATION_TOP_NS && side == Side.TOP) {
             return true;
         }
-        if(rotation == ROTATION_NORTH && side == Side.NORTH) {
+        if (rotation == ROTATION_NORTH && side == Side.NORTH) {
             return true;
         }
-        if(rotation == ROTATION_SOUTH && side == Side.SOUTH) {
+        if (rotation == ROTATION_SOUTH && side == Side.SOUTH) {
             return true;
         }
-        if(rotation == ROTATION_WEST && side == Side.WEST) {
+        if (rotation == ROTATION_WEST && side == Side.WEST) {
             return true;
         }
         return rotation == ROTATION_EAST && side == Side.EAST;
     }
 
     @Override
-    public boolean isSignalSource()
-    {
+    public boolean isSignalSource() {
         return true;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE.center();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLog.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLog.java
index 4fd1941a3..601e58431 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicLog.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicLog.java
@@ -1,37 +1,33 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class BlockLogicLog extends BlockLogicAxisAligned
-{
+public class BlockLogicLog extends BlockLogicAxisAligned {
 
-	public BlockLogicLog(@NotNull Block<?> block) {
-        super(block, Material.wood);
+    public BlockLogicLog(@NotNull Block<?> block) {
+        super(block, Materials.WOOD);
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         byte r = 4;
         int r2 = r + 1;
-        if(world.areBlocksLoaded(tilePos.add(-r2, -r2, -r2), tilePos.add(r2, r2, r2))) {
-            TilePos p = new TilePos(tilePos);
-            for(int xOff = -r; xOff <= r; xOff++) {
-                for(int yOff = -r; yOff <= r; yOff++) {
-                    for(int zOff = -r; zOff <= r; zOff++) {
-                        p.set(tilePos.x + xOff, tilePos.y + yOff, tilePos.z + zOff);
-
-                        Block<?> block = world.getBlock(p);
-                        if(!(block != null && block.getLogic() instanceof BlockLogicLeavesBase))
-                        {
+        if (world.areBlocksLoaded(tilePos.add(-r2, -r2, -r2, new TilePos()), tilePos.add(r2, r2, r2, new TilePos()))) {
+            TilePos queryPos = new TilePos();
+            for (queryPos.x = tilePos.x() - r; queryPos.x <= tilePos.x() + r; queryPos.x++) {
+                for (queryPos.y = tilePos.x() - r; queryPos.y <= tilePos.y() + r; queryPos.y++) {
+                    for (queryPos.z = -tilePos.x() - r; queryPos.z <= tilePos.z() + r; queryPos.z++) {
+                        Block<?> block = world.getBlock(queryPos);
+                        if (!(block != null && block.getLogic() instanceof BlockLogicLeavesBase)) {
                             continue;
                         }
-                        int leavesMeta = world.getBlockData(p);
-                        if(!BlockLogicLeavesBase.isPermanent(leavesMeta))
-                        {
-                            world.setBlockData(p, BlockLogicLeavesBase.setDecaying(leavesMeta, true));
+                        int leavesMeta = world.getBlockData(queryPos);
+                        if (!BlockLogicLeavesBase.isPermanent(leavesMeta)) {
+                            world.setBlockData(queryPos, BlockLogicLeavesBase.setDecaying(leavesMeta, true));
                         }
                     }
                 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMatcher.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMatcher.java
index bd7ebad4f..091c26f98 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMatcher.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMatcher.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.enums.PlacementMode;
@@ -12,6 +12,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,8 +20,9 @@ import java.util.Random;
 
 public class BlockLogicMatcher extends BlockLogicAxisAligned {
     public final boolean isActive;
+
     public BlockLogicMatcher(@NotNull Block<?> block, boolean isActive) {
-        super(block, Material.stone);
+        super(block, Materials.STONE);
         this.isActive = isActive;
     }
 
@@ -30,12 +32,12 @@ public class BlockLogicMatcher extends BlockLogicAxisAligned {
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         updateState(world, tilePos);
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         Axis axis = mob.getPlacementDirection(side, PlacementMode.FACING).getAxis();
 
         world.setBlockDataNotify(tilePos, axisToMeta(axis));
@@ -43,23 +45,23 @@ public class BlockLogicMatcher extends BlockLogicAxisAligned {
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         super.onPlacedByWorld(world, tilePos);
         world.scheduleBlockUpdate(tilePos, id(), tickDelay());
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         super.onPlacedOnSide(world, tilePos, side, xHit, yHit);
         world.scheduleBlockUpdate(tilePos, id(), tickDelay());
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         world.scheduleBlockUpdate(tilePos, id(), tickDelay());
     }
 
-    public void updateState(@NotNull World world, @NotNull TilePos tilePos) {
+    public void updateState(@NotNull World world, @NotNull TilePosc tilePos) {
         Axis a = BlockLogicAxisAligned.metaToAxis(world.getBlockData(tilePos) & BlockLogicAxisAligned.MASK_DIRECTION);
 
         TilePos front = new TilePos(tilePos);
@@ -97,9 +99,8 @@ public class BlockLogicMatcher extends BlockLogicAxisAligned {
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
-    {
-        if(!this.isActive) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (!this.isActive) {
             return;
         }
 
@@ -107,22 +108,22 @@ public class BlockLogicMatcher extends BlockLogicAxisAligned {
         double d = 0.0625;
         for (int i = 0; i < Direction.directions.length; i++) {
             Direction dir = Direction.directions[i];
-            double px = (double) tilePos.x + rand.nextFloat();
-            double py = (double) tilePos.y + rand.nextFloat();
-            double pz = (double) tilePos.z + rand.nextFloat();
+            double px = (double) tilePos.x() + rand.nextFloat();
+            double py = (double) tilePos.y() + rand.nextFloat();
+            double pz = (double) tilePos.z() + rand.nextFloat();
 
-            if (!world.isBlockOpaqueCube(tilePos.add(dir))) {
+            if (!world.isBlockOpaqueCube(tilePos.add(dir, new TilePos()))) {
                 switch (dir) {
-                    case UP -> py = (tilePos.y + 1) + d;
-                    case DOWN -> py = (tilePos.y) - d;
-                    case SOUTH -> pz = (tilePos.z + 1) + d;
-                    case NORTH -> pz = (tilePos.z) - d;
-                    case EAST -> px = (tilePos.x + 1) + d;
-                    case WEST -> px = (tilePos.x) - d;
+                    case UP -> py = (tilePos.y() + 1) + d;
+                    case DOWN -> py = (tilePos.y()) - d;
+                    case SOUTH -> pz = (tilePos.z() + 1) + d;
+                    case NORTH -> pz = (tilePos.z()) - d;
+                    case EAST -> px = (tilePos.x() + 1) + d;
+                    case WEST -> px = (tilePos.x()) - d;
                 }
             }
 
-            if (px < tilePos.x || px > (tilePos.x + 1) || py < 0.0D || py > (tilePos.y + 1) || pz < tilePos.z || pz > (tilePos.z + 1)) {
+            if (px < tilePos.x() || px > (tilePos.x() + 1) || py < 0.0D || py > (tilePos.y() + 1) || pz < tilePos.z() || pz > (tilePos.z() + 1)) {
                 world.spawnParticle("reddust", px, py, pz, 0, 0, 0, brightness);
             }
         }
@@ -134,7 +135,7 @@ public class BlockLogicMatcher extends BlockLogicAxisAligned {
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return this.isActive && (BlockLogicAxisAligned.metaToAxis(source.getBlockData(tilePos)) != side.getAxis());
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMesh.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMesh.java
index 0da44a74f..fe5ad1884 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMesh.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMesh.java
@@ -1,10 +1,10 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityItem;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicMesh extends BlockLogicTransparent
@@ -12,7 +12,7 @@ public class BlockLogicMesh extends BlockLogicTransparent
 
     public BlockLogicMesh(@NotNull Block<?> block)
     {
-        super(block, Material.metal);
+        super(block, Materials.METAL);
     }
     
     @Override
@@ -28,7 +28,7 @@ public class BlockLogicMesh extends BlockLogicTransparent
     }
 
     @Override
-    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePosc tilePos) {
         return !(entity instanceof EntityItem);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMeshGold.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMeshGold.java
index 537004ec9..f741b9fad 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMeshGold.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMeshGold.java
@@ -8,7 +8,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,7 +19,7 @@ public class BlockLogicMeshGold extends BlockLogicMesh {
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (world.getTileEntity(tilePos) instanceof TileEntityMeshGold meshGold) {
             ItemStack heldItem = player.getHeldItem();
             boolean flag = meshGold.setFilterItem(player, heldItem);
@@ -33,7 +33,7 @@ public class BlockLogicMeshGold extends BlockLogicMesh {
     }
 
     @Override
-    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePosc tilePos) {
         if (entity instanceof EntityItem entityItem && world.getTileEntity(tilePos) instanceof TileEntityMeshGold meshGold){
             if (meshGold.filterItem == null) return true;
 
@@ -44,7 +44,7 @@ public class BlockLogicMeshGold extends BlockLogicMesh {
     }
 
     @Override
-    public boolean isEquivalent(@NotNull World world, @NotNull TilePos thisPos, @NotNull TilePos thatPos) {
+    public boolean isEquivalent(@NotNull World world, @NotNull TilePosc thisPos, @NotNull TilePosc thatPos) {
         if (super.isEquivalent(world, thisPos, thatPos)) {
             TileEntity thisEntity = world.getTileEntity(thisPos);
             TileEntity otherEntity = world.getTileEntity(thatPos);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawner.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawner.java
index 4a1bf452a..106c46fd3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawner.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawner.java
@@ -10,20 +10,19 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.player.gamemode.Gamemode;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated
-{
+public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated {
 
-	public BlockLogicMobSpawner(@NotNull Block<?> block) {
+    public BlockLogicMobSpawner(@NotNull Block<?> block) {
         super(block);
         block.withEntity(TileEntityMobSpawner::new);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (player.getGamemode() != Gamemode.creative) {
             return false;
         }
@@ -33,14 +32,14 @@ public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if (world.getTileEntity(tilePos) instanceof TileEntityMobSpawner spawner) {
             spawner.setMobId("none");
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         if (!world.isClientSide) {
             TileEntityMobSpawner tileEntityMobSpawner = (TileEntityMobSpawner) world.getTileEntity(tilePos);
             if (tileEntityMobSpawner == null) return;
@@ -48,16 +47,17 @@ public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated
             label0:
             for (int l = 0; l < amountToDrop; l++) {
                 String mobInSpawner = tileEntityMobSpawner.getMobId();
-                if(mobInSpawner != null) {
+                if (mobInSpawner != null) {
                     ItemStack itemstack =
-                    switch (mobInSpawner) {
-                        case "minecraft:zombie" -> new ItemStack(Items.CLOTH);
-                        case "minecraft:skeleton" -> world.rand.nextInt(2) == 0 ? new ItemStack(Items.BONE) : new ItemStack(Items.AMMO_ARROW);
-                        case "minecraft:zombie_armored" -> new ItemStack(Items.CHAINLINK);
-                        case "minecraft:spider" -> new ItemStack(Items.STRING);
-                        case "minecraft:snowman" -> new ItemStack(Items.AMMO_SNOWBALL);
-                        default -> null;
-                    };
+                        switch (mobInSpawner) {
+                            case "minecraft:zombie" -> new ItemStack(Items.CLOTH);
+                            case "minecraft:skeleton" ->
+                                world.rand.nextInt(2) == 0 ? new ItemStack(Items.BONE) : new ItemStack(Items.AMMO_ARROW);
+                            case "minecraft:zombie_armored" -> new ItemStack(Items.CHAINLINK);
+                            case "minecraft:spider" -> new ItemStack(Items.STRING);
+                            case "minecraft:snowman" -> new ItemStack(Items.AMMO_SNOWBALL);
+                            default -> null;
+                        };
                     if (itemstack == null) {
                         continue;
                     }
@@ -69,12 +69,12 @@ public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated
                         if (itemstack.stackSize <= 0) {
                             continue label0;
                         }
-                        int i1 = world.rand.nextInt(21) + 10;
-                        if (i1 > itemstack.stackSize) {
-                            i1 = itemstack.stackSize;
+                        int qty = world.rand.nextInt(21) + 10;
+                        if (qty > itemstack.stackSize) {
+                            qty = itemstack.stackSize;
                         }
-                        itemstack.stackSize -= i1;
-                        EntityItem entityitem = new EntityItem(world, (float) tilePos.x + rx, (float) tilePos.y + ry, (float) tilePos.z + rz, new ItemStack(itemstack.itemID, i1, itemstack.getMetadata()));
+                        itemstack.stackSize -= qty;
+                        EntityItem entityitem = new EntityItem(world, (float) tilePos.x() + rx, (float) tilePos.y() + ry, (float) tilePos.z() + rz, new ItemStack(itemstack.itemID, qty, itemstack.getMetadata()));
                         float f3 = 0.05F;
                         entityitem.xd = (float) world.rand.nextGaussian() * f3;
                         entityitem.yd = (float) world.rand.nextGaussian() * f3 + 0.2F;
@@ -90,7 +90,7 @@ public class BlockLogicMobSpawner extends BlockLogicMobSpawnerDeactivated
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         if (dropCause == EnumDropCause.SILK_TOUCH) {
-            return new ItemStack[] { new ItemStack(Blocks.MOBSPAWNER_DEACTIVATED) };
+            return new ItemStack[]{new ItemStack(Blocks.MOBSPAWNER_DEACTIVATED)};
         }
         return null;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawnerDeactivated.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawnerDeactivated.java
index 33cf2e9da..e2058485e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawnerDeactivated.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMobSpawnerDeactivated.java
@@ -1,20 +1,20 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityItem;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicMobSpawnerDeactivated extends BlockLogicTransparent {
     public BlockLogicMobSpawnerDeactivated(@NotNull Block<?> block)
     {
-        super(block, Material.stone);
+        super(block, Materials.STONE);
     }
 
     @Override
@@ -30,7 +30,7 @@ public class BlockLogicMobSpawnerDeactivated extends BlockLogicTransparent {
     }
 
     @Override
-    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePosc tilePos) {
         return !(entity instanceof EntityItem);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMoss.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMoss.java
index 833505298..a78775613 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMoss.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMoss.java
@@ -1,6 +1,7 @@
 package net.minecraft.core.block;
 
 import it.unimi.dsi.fastutil.ints.Int2IntArrayMap;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.item.IBonemealable;
@@ -8,8 +9,8 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,125 +20,132 @@ import java.util.Map.Entry;
 import java.util.Random;
 
 public class BlockLogicMoss extends BlockLogic implements IBonemealable {
-	public static Int2IntArrayMap variantMap = new Int2IntArrayMap();
-	public BlockLogicMoss(@NotNull Block<?> block, @NotNull Block<?> parentBlock) {
-		super(block, Material.moss);
-		block.setTicking(true);
-		variantMap.put(parentBlock.id(), block.id());
-	}
-
-	@Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-		if (world.isClientSide) {
-			return;
-		}
-		
-		if (world.areBlocksLoaded(tilePos, 16)) {
-			if (rand.nextInt(20) == 0 && airExposed(world, tilePos)) {
-				Direction rDir = Direction.getDirectionById(rand.nextInt(6));
-				TilePos randomPos = tilePos.add(rDir);
-				if (canMossSpread(world, randomPos)) {
-					Block<?> mossStone = getMossBlock(world.getBlockId(randomPos));
-					if (mossStone != null) {
-						world.setBlockIdNotify(randomPos, mossStone.id());
-					}
-				}
-			}
-		}
-	}
-
-	
-	public boolean canMossSpread(@NotNull World world, @NotNull TilePos tilePos) {
-		if (!world.isBlockLoaded(tilePos)) return false;
-		int maxBlockLight = 0;
-		int maxSkyLight = 0;
-		for (int i = 0; i < Direction.directions.length; i++) {
-			Direction dir = Direction.directions[i];
-			TilePos offsetPos = tilePos.add(dir);
-			int blockLight = world.getBlockLightValue(offsetPos);
-			int skyLight = world.getSavedLightValue(LightLayer.Sky, offsetPos);
-			if (blockLight > maxBlockLight) { maxBlockLight = blockLight; }
-			if (skyLight > maxSkyLight) { maxSkyLight = skyLight; }
-		}
-		return maxBlockLight == 0 && maxSkyLight == 0;
-	}
-
-	public static @Nullable Block<?> getMossBlock(int blockId) {
-		return getMossBlock(Blocks.getBlock(blockId));
-	}
-
-	public static @Nullable Block<?> getMossBlock(@Nullable Block<?> stoneBlock) {
-		return stoneToMossMap.get(stoneBlock);
-	}
-	
-	public static @Nullable Block<?> getStoneBlock(final int blockId) {
-		return getStoneBlock(Blocks.getBlock(blockId));
-	}
-	
-	public static @Nullable Block<?> getStoneBlock(@Nullable Block<?> mossBlock) {
-		return mossToStoneMap.get(mossBlock);
-	}
-
-	public static final @NotNull Map<@NotNull Block<?>, @NotNull Block<?>> stoneToMossMap = new HashMap<>();
-	public static final @NotNull Map<@NotNull Block<?>, @NotNull Block<?>> mossToStoneMap = new HashMap<>();
-
-	public static void initMossMap() {
-		stoneToMossMap.clear();
-		mossToStoneMap.clear();
-
-		stoneToMossMap.put(Blocks.STONE, Blocks.MOSS_STONE);
-		stoneToMossMap.put(Blocks.GRANITE, Blocks.MOSS_GRANITE);
-		stoneToMossMap.put(Blocks.LIMESTONE, Blocks.MOSS_LIMESTONE);
-		stoneToMossMap.put(Blocks.BASALT, Blocks.MOSS_BASALT);
-		stoneToMossMap.put(Blocks.COBBLE_STONE, Blocks.COBBLE_STONE_MOSSY);
-		stoneToMossMap.put(Blocks.COBBLE_BASALT, Blocks.COBBLE_BASALT_MOSSY);
-		stoneToMossMap.put(Blocks.COBBLE_LIMESTONE, Blocks.COBBLE_LIMESTONE_MOSSY);
-		stoneToMossMap.put(Blocks.COBBLE_GRANITE, Blocks.COBBLE_GRANITE_MOSSY);
-		stoneToMossMap.put(Blocks.BRICK_STONE_POLISHED, Blocks.BRICK_STONE_POLISHED_MOSSY);
-		stoneToMossMap.put(Blocks.LOG_OAK, Blocks.LOG_OAK_MOSSY);
-		
-		for(Entry<Block<?>, Block<?>> entry : stoneToMossMap.entrySet()) {
-			mossToStoneMap.put(entry.getValue(), entry.getKey());
-		}
-	}
-
-	@Override
-	public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
-		if(!world.isClientSide) {
-			if (!canMossSpread(world, tilePos) || !airExposed(world, tilePos)) return false;
-			if (player == null || player.getGamemode().consumeBlocks()) {
-				itemStack.stackSize--;
-			}
-			for(int i = 0; i < 32; i++) {
-				TilePos randomPos = new TilePos(tilePos);
-				for(int j = 0; j < i / 16; j++) {
-					randomPos.x += world.rand.nextInt(3) - 1;
-					randomPos.y += ((world.rand.nextInt(3) - 1) * world.rand.nextInt(3)) / 2;
-					randomPos.z += world.rand.nextInt(3) - 1;
-				}
-
-				if(!airExposed(world, randomPos)) {
-					continue;
-				}
-
-				if(!canMossSpread(world,randomPos)) {
-					continue;
-				}
-
-				Block<?> block = getMossBlock(world.getBlockId(randomPos));
-				if (block != null) {
-					world.setBlockIdNotify(randomPos, block.id());
-				}
-			}
-		}
-		return true;
-	}
-
-	public boolean airExposed(@NotNull World world, @NotNull TilePos tilePos) {
-		for (int i = 0; i < Direction.directions.length; i++) {
-			Direction dir = Direction.directions[i];
-			if (world.isAirBlock(tilePos.add(dir))) return true;
-		}
-		return false;
-	}
+    public static Int2IntArrayMap variantMap = new Int2IntArrayMap();
+
+    public BlockLogicMoss(@NotNull Block<?> block, @NotNull Block<?> parentBlock) {
+        super(block, Materials.MOSS);
+        block.setTicking(true);
+        variantMap.put(parentBlock.id(), block.id());
+    }
+
+    @Override
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
+            return;
+        }
+
+        if (world.areBlocksLoaded(tilePos, 16)) {
+            if (rand.nextInt(20) == 0 && airExposed(world, tilePos)) {
+                Direction rDir = Direction.getDirectionById(rand.nextInt(6));
+                TilePos randomPos = tilePos.add(rDir, new TilePos());
+                if (canMossSpread(world, randomPos)) {
+                    Block<?> mossStone = getMossBlock(world.getBlockId(randomPos));
+                    if (mossStone != null) {
+                        world.setBlockIdNotify(randomPos, mossStone.id());
+                    }
+                }
+            }
+        }
+    }
+
+
+    public boolean canMossSpread(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (!world.isBlockLoaded(tilePos)) return false;
+        int maxBlockLight = 0;
+        int maxSkyLight = 0;
+        TilePos queryPos = new TilePos();
+        for (int i = 0; i < Direction.directions.length; i++) {
+            Direction dir = Direction.directions[i];
+            TilePos offsetPos = tilePos.add(dir, queryPos);
+            int blockLight = world.getBlockLightValue(offsetPos);
+            int skyLight = world.getSavedLightValue(LightLayer.Sky, offsetPos);
+            if (blockLight > maxBlockLight) {
+                maxBlockLight = blockLight;
+            }
+            if (skyLight > maxSkyLight) {
+                maxSkyLight = skyLight;
+            }
+        }
+        return maxBlockLight == 0 && maxSkyLight == 0;
+    }
+
+    public static @Nullable Block<?> getMossBlock(int blockId) {
+        return getMossBlock(Blocks.getBlock(blockId));
+    }
+
+    public static @Nullable Block<?> getMossBlock(@Nullable Block<?> stoneBlock) {
+        return stoneToMossMap.get(stoneBlock);
+    }
+
+    public static @Nullable Block<?> getStoneBlock(final int blockId) {
+        return getStoneBlock(Blocks.getBlock(blockId));
+    }
+
+    public static @Nullable Block<?> getStoneBlock(@Nullable Block<?> mossBlock) {
+        return mossToStoneMap.get(mossBlock);
+    }
+
+    public static final @NotNull Map<@NotNull Block<?>, @NotNull Block<?>> stoneToMossMap = new HashMap<>();
+    public static final @NotNull Map<@NotNull Block<?>, @NotNull Block<?>> mossToStoneMap = new HashMap<>();
+
+    public static void initMossMap() {
+        stoneToMossMap.clear();
+        mossToStoneMap.clear();
+
+        stoneToMossMap.put(Blocks.STONE, Blocks.MOSS_STONE);
+        stoneToMossMap.put(Blocks.GRANITE, Blocks.MOSS_GRANITE);
+        stoneToMossMap.put(Blocks.LIMESTONE, Blocks.MOSS_LIMESTONE);
+        stoneToMossMap.put(Blocks.BASALT, Blocks.MOSS_BASALT);
+        stoneToMossMap.put(Blocks.COBBLE_STONE, Blocks.COBBLE_STONE_MOSSY);
+        stoneToMossMap.put(Blocks.COBBLE_BASALT, Blocks.COBBLE_BASALT_MOSSY);
+        stoneToMossMap.put(Blocks.COBBLE_LIMESTONE, Blocks.COBBLE_LIMESTONE_MOSSY);
+        stoneToMossMap.put(Blocks.COBBLE_GRANITE, Blocks.COBBLE_GRANITE_MOSSY);
+        stoneToMossMap.put(Blocks.BRICK_STONE_POLISHED, Blocks.BRICK_STONE_POLISHED_MOSSY);
+        stoneToMossMap.put(Blocks.LOG_OAK, Blocks.LOG_OAK_MOSSY);
+
+        for (Entry<Block<?>, Block<?>> entry : stoneToMossMap.entrySet()) {
+            mossToStoneMap.put(entry.getValue(), entry.getKey());
+        }
+    }
+
+    @Override
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
+        if (!world.isClientSide) {
+            if (!canMossSpread(world, tilePos) || !airExposed(world, tilePos)) return false;
+            if (player == null || player.getGamemode().consumeBlocks()) {
+                itemStack.stackSize--;
+            }
+            for (int i = 0; i < 32; i++) {
+                TilePos randomPos = new TilePos(tilePos);
+                for (int j = 0; j < i / 16; j++) {
+                    randomPos.x += world.rand.nextInt(3) - 1;
+                    randomPos.y += ((world.rand.nextInt(3) - 1) * world.rand.nextInt(3)) / 2;
+                    randomPos.z += world.rand.nextInt(3) - 1;
+                }
+
+                if (!airExposed(world, randomPos)) {
+                    continue;
+                }
+
+                if (!canMossSpread(world, randomPos)) {
+                    continue;
+                }
+
+                Block<?> block = getMossBlock(world.getBlockId(randomPos));
+                if (block != null) {
+                    world.setBlockIdNotify(randomPos, block.id());
+                }
+            }
+        }
+        return true;
+    }
+
+    public boolean airExposed(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        for (int i = 0; i < Direction.directions.length; i++) {
+            Direction dir = Direction.directions[i];
+            if (world.isAirBlock(tilePos.add(dir, queryPos))) return true;
+        }
+        return false;
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMotionSensor.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMotionSensor.java
index 1c0ff74fc..baa904d8a 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMotionSensor.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMotionSensor.java
@@ -5,7 +5,7 @@ import java.util.Random;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntitySensor;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
@@ -13,65 +13,63 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockLogicMotionSensor extends BlockLogicVeryRotatable
-{
+public class BlockLogicMotionSensor extends BlockLogicVeryRotatable {
     public final boolean isActive;
 
-    public BlockLogicMotionSensor(@NotNull Block<?> block, boolean isActive)
-    {
-        super(block, Material.glass);
+    public BlockLogicMotionSensor(@NotNull Block<?> block, boolean isActive) {
+        super(block, Materials.GLASS);
         this.isActive = isActive;
         block.withEntity(TileEntitySensor::new);
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
-    {
-        if(!this.isActive) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (!this.isActive) {
             return;
         }
 
+        TilePos queryPos = new TilePos();
         final int brightness = 10;
         double d = 0.0625;
         for (int i = 0; i < Direction.directions.length; i++) {
             Direction dir = Direction.directions[i];
-            double px = (double) tilePos.x + rand.nextFloat();
-            double py = (double) tilePos.y + rand.nextFloat();
-            double pz = (double) tilePos.z + rand.nextFloat();
+            double px = (double) tilePos.x() + rand.nextFloat();
+            double py = (double) tilePos.y() + rand.nextFloat();
+            double pz = (double) tilePos.z() + rand.nextFloat();
 
-            if (!world.isBlockOpaqueCube(tilePos.add(dir))) {
+            if (!world.isBlockOpaqueCube(tilePos.add(dir, queryPos))) {
                 switch (dir) {
-                    case UP -> py = (tilePos.y + 1) + d;
-                    case DOWN -> py = (tilePos.y) - d;
-                    case SOUTH -> pz = (tilePos.z + 1) + d;
-                    case NORTH -> pz = (tilePos.z) - d;
-                    case EAST -> px = (tilePos.x + 1) + d;
-                    case WEST -> px = (tilePos.x) - d;
+                    case UP -> py = (tilePos.y() + 1) + d;
+                    case DOWN -> py = (tilePos.y()) - d;
+                    case SOUTH -> pz = (tilePos.z() + 1) + d;
+                    case NORTH -> pz = (tilePos.z()) - d;
+                    case EAST -> px = (tilePos.x() + 1) + d;
+                    case WEST -> px = (tilePos.x()) - d;
                 }
             }
 
-            if (px < tilePos.x || px > (tilePos.x + 1) || py < 0.0D || py > (tilePos.y + 1) || pz < tilePos.z || pz > (tilePos.z + 1)) {
+            if (px < tilePos.x() || px > (tilePos.x() + 1) || py < 0.0D || py > (tilePos.y() + 1) || pz < tilePos.z() || pz > (tilePos.z() + 1)) {
                 world.spawnParticle("reddust", px, py, pz, 0, 0, 0, brightness);
             }
         }
     }
 
     @Override
-    public boolean isSignalSource()
-    {
+    public boolean isSignalSource() {
         return true;
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return isEmittingSignal(world, tilePos, side);
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return this.isActive;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMud.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMud.java
index 000c2a404..f207de2c9 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMud.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMud.java
@@ -10,6 +10,7 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -24,22 +25,21 @@ public class BlockLogicMud extends BlockLogic {
     }
 
     @Override
-    public int tickDelay()
-    {
+    public int tickDelay() {
         return 5;
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay());
     }
 
-    private boolean isWaterNearby(final @NotNull World world, final @NotNull TilePos tilePos, int range) {
-        TilePos p = new TilePos(tilePos);
-        for (int x = tilePos.x - range; x <= tilePos.x + range; x++) {
-            for (int y = tilePos.y - range; y <= tilePos.y + range; y++) {
-                for (int z = tilePos.z - range; z <= tilePos.z + range; z++) {
-                    if (Blocks.hasTag(world.getBlockId(p.set(x, y, z)), BlockTags.IS_WATER)) {
+    private boolean isWaterNearby(final @NotNull World world, final @NotNull TilePosc tilePos, int range) {
+        TilePos queryPos = new TilePos(tilePos);
+        for (queryPos.x = tilePos.x() - range; queryPos.x <= tilePos.x() + range; queryPos.x++) {
+            for (queryPos.y = tilePos.y() - range; queryPos.y <= tilePos.y() + range; queryPos.y++) {
+                for (queryPos.z = tilePos.z() - range; queryPos.z <= tilePos.z() + range; queryPos.z++) {
+                    if (Blocks.hasTag(world.getBlockId(queryPos), BlockTags.IS_WATER)) {
                         return true;
                     }
                 }
@@ -49,12 +49,12 @@ public class BlockLogicMud extends BlockLogic {
         return false;
     }
 
-    private boolean isLavaNearby(final @NotNull World world, final @NotNull TilePos tilePos) {
-        TilePos p = new TilePos(tilePos);
-        for (int x = tilePos.x - 1; x <= tilePos.x + 1; x++) {
-            for (int y = tilePos.y - 1; y <= tilePos.y + 1; y++) {
-                for (int z = tilePos.z - 1; z <= tilePos.z + 1; z++) {
-                    if (Blocks.hasTag(world.getBlockId(p.set(x, y, z)), BlockTags.IS_LAVA)) {
+    private boolean isLavaNearby(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos(tilePos);
+        for (queryPos.x = tilePos.x() - 1; queryPos.x <= tilePos.x() + 1; queryPos.x++) {
+            for (queryPos.y = tilePos.y() - 1; queryPos.y <= tilePos.y() + 1; queryPos.y++) {
+                for (queryPos.z = tilePos.z() - 1; queryPos.z <= tilePos.z() + 1; queryPos.z++) {
+                    if (Blocks.hasTag(world.getBlockId(queryPos), BlockTags.IS_LAVA)) {
                         return true;
                     }
                 }
@@ -64,20 +64,20 @@ public class BlockLogicMud extends BlockLogic {
         return false;
     }
 
-    private boolean canBecomeWet(final @NotNull World world, final @NotNull TilePos tilePos) {
+    private boolean canBecomeWet(final @NotNull World world, final @NotNull TilePosc tilePos) {
         // If there's water within 1 block, it can become wet
-        if(isWaterNearby(world, tilePos, 1))
+        if (isWaterNearby(world, tilePos, 1))
             return true;
 
         // If there's water 3 blocks...
-        if(isWaterNearby(world, tilePos, 3)){
-            TilePos p = new TilePos(tilePos);
-            for (int x = tilePos.x - 1; x <= tilePos.x + 1; x++) {
-                for (int y = tilePos.y - 1; y <= tilePos.y + 1; y++) {
-                    for (int z = tilePos.z - 1; z <= tilePos.z + 1; z++) {
+        if (isWaterNearby(world, tilePos, 3)) {
+            TilePos queryPos = new TilePos(tilePos);
+            for (queryPos.x = tilePos.x() - 1; queryPos.x <= tilePos.x() + 1; queryPos.x++) {
+                for (queryPos.y = tilePos.y() - 1; queryPos.y <= tilePos.y() + 1; queryPos.y++) {
+                    for (queryPos.z = tilePos.z() - 1; queryPos.z <= tilePos.z() + 1; queryPos.z++) {
                         //...And the block is next to another wet mud block, it can become wet
-                        int bID = world.getBlockId(p.set(x, y, z));
-                        if (bID == Blocks.MUD.id() || (bID == Blocks.FARMLAND_DIRT.id() && BlockLogicFarmland.isWet(world.getBlockData(p)))) {
+                        int bID = world.getBlockId(queryPos);
+                        if (bID == Blocks.MUD.id() || (bID == Blocks.FARMLAND_DIRT.id() && BlockLogicFarmland.isWet(world.getBlockData(queryPos)))) {
                             return true;
                         }
                     }
@@ -88,34 +88,38 @@ public class BlockLogicMud extends BlockLogic {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay());
     }
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(this, 1, data) };
+        return new ItemStack[]{new ItemStack(this, 1, data)};
     }
 
-    private void tryToFall(@NotNull World world, @NotNull TilePos tilePos) {
-        if(world.getBlockId(tilePos) == Blocks.MUD_BAKED.id()){
+    private void tryToFall(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (world.getBlockId(tilePos) == Blocks.MUD_BAKED.id()) {
             return;
         }
 
-        if(canFallBelow(world, tilePos.down()) && tilePos.y >= 0) {
+        TilePos queryPos = new TilePos();
+        if (canFallBelow(world, tilePos.down(queryPos)) && tilePos.y() >= 0) {
             byte radius = 32;
-            if(!world.areBlocksLoaded(tilePos.add(-radius, -radius, -radius), tilePos.add(radius, radius, radius))) {
+            if (!world.areBlocksLoaded(tilePos.add(-radius, -radius, -radius, new TilePos()), tilePos.add(radius, radius, radius, new TilePos()))) {
                 world.setBlockIdNotify(tilePos, 0);
-                TilePos p = tilePos.down();
-                while (canFallBelow(world, p) && p.y >= 0) {
-                    p.y--;
+
+                int checkX = tilePos.x();
+                int checkY = tilePos.y() - 1;
+                int checkZ = tilePos.z();
+                while (canFallBelow(world, queryPos.set(checkX, checkY, checkZ)) && checkY >= 0) {
+                    checkY--;
                 }
-                if(p.y > 0) {
-                    world.setBlockIdNotify(p, this.block.id());
+                if (checkY > 0) {
+                    world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
 
                 }
             } else {
-                EntityFallingBlock entityFallingBlock = new EntityFallingBlock(world, tilePos.x + 0.5, tilePos.y + 0.5, tilePos.z + 0.5, this.block.id(), 0, null);
+                EntityFallingBlock entityFallingBlock = new EntityFallingBlock(world, tilePos.x() + 0.5, tilePos.y() + 0.5, tilePos.z() + 0.5, this.block.id(), 0, null);
                 world.entityJoinedWorld(entityFallingBlock);
             }
         }
@@ -128,10 +132,10 @@ public class BlockLogicMud extends BlockLogic {
 
 
     @Override
-    public void updateTick(final @NotNull World world, @NotNull final TilePos tilePos, final @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand, boolean isRandomTick) {
         // hydrate mud
-        if(this.isHardened) {
-            if(!isLavaNearby(world, tilePos)) {
+        if (this.isHardened) {
+            if (!isLavaNearby(world, tilePos)) {
                 if (canBecomeWet(world, tilePos)) {
                     world.setBlockId(tilePos, Blocks.MUD.id());
                     world.notifyBlockChange(tilePos, Blocks.MUD.id());
@@ -141,12 +145,11 @@ public class BlockLogicMud extends BlockLogic {
         }
 
         // dry out mud
-        if(!this.isHardened){
-            if(isLavaNearby(world, tilePos) || world.dimension == Dimension.NETHER) {
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
-                for(int l = 0; l < 8; l++)
-                {
-                    world.spawnParticle("largesmoke", (double)tilePos.x + Math.random(), (double)tilePos.y + Math.random(), (double)tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 0);
+        if (!this.isHardened) {
+            if (isLavaNearby(world, tilePos) || world.dimension == Dimension.NETHER) {
+                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
+                for (int l = 0; l < 8; l++) {
+                    world.spawnParticle("largesmoke", (double) tilePos.x() + Math.random(), (double) tilePos.y() + Math.random(), (double) tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 0);
                 }
                 world.setBlockId(tilePos, Blocks.MUD_BAKED.id());
                 world.notifyBlockChange(tilePos, Blocks.MUD_BAKED.id());
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMushroom.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMushroom.java
index 467d96420..261b8d879 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicMushroom.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicMushroom.java
@@ -5,16 +5,15 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class BlockLogicMushroom extends BlockLogicFlower
-{
+public class BlockLogicMushroom extends BlockLogicFlower {
 
-	public BlockLogicMushroom(@NotNull Block<?> block)
-    {
+    public BlockLogicMushroom(@NotNull Block<?> block) {
         super(block);
         float f = 0.2F;
         setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
@@ -22,16 +21,12 @@ public class BlockLogicMushroom extends BlockLogicFlower
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
-        if(rand.nextInt(25) == 0)
-        {
-            TilePos checkPos = tilePos.add(rand.nextInt(3) - 1,rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1);
-            if(world.isAirBlock(checkPos) && canStay(world, checkPos))
-            {
-                checkPos.set(tilePos.x + rand.nextInt(3) - 1, checkPos.y, tilePos.z + rand.nextInt(3) - 1);
-                if(world.isAirBlock(checkPos) && canStay(world, checkPos))
-                {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (rand.nextInt(25) == 0) {
+            TilePos checkPos = tilePos.add(rand.nextInt(3) - 1, rand.nextInt(2) - rand.nextInt(2), rand.nextInt(3) - 1, new TilePos());
+            if (world.isAirBlock(checkPos) && canStay(world, checkPos)) {
+                checkPos.set(tilePos.x() + rand.nextInt(3) - 1, checkPos.y, tilePos.z() + rand.nextInt(3) - 1);
+                if (world.isAirBlock(checkPos) && canStay(world, checkPos)) {
                     world.setBlockIdNotify(checkPos, this.block.id());
                 }
             }
@@ -39,46 +34,47 @@ public class BlockLogicMushroom extends BlockLogicFlower
     }
 
     @Override
-	protected boolean mayPlaceOn(int blockId)
-    {
+    protected boolean mayPlaceOn(int blockId) {
         return Blocks.solid[blockId];
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        if(tilePos.y < 0 || tilePos.y >= world.getHeightBlocks()) {
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (tilePos.y() < 0 || tilePos.y() >= world.getHeightBlocks()) {
             return false;
         } else {
-            return world.getFullBlockLightValue(tilePos) < 13 && mayPlaceOn(world.getBlockId(tilePos.down()));
+            return world.getFullBlockLightValue(tilePos) < 13 && mayPlaceOn(world.getBlockId(tilePos.down(new TilePos())));
         }
     }
 
     @Override
-    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         Random rand = world.rand;
         if (!world.isClientSide && this.canBeBonemealed) {
             if (player == null || player.getGamemode().consumeBlocks()) {
                 itemStack.stackSize--;
             }
-            TilePos p = new TilePos(tilePos);
-            label0:
+
+            TilePos queryPos = new TilePos();
+            outer:
             for (int j1 = 0; j1 < 32; j1++) {
-                p.set(tilePos.x, tilePos.y, tilePos.z);
+                int checkX = tilePos.x();
+                int checkY = tilePos.y();
+                int checkZ = tilePos.z();
                 for (int j2 = 0; j2 < j1 / 16; j2++) {
-                    p.x += rand.nextInt(3) - 1;
-                    p.y += ((rand.nextInt(3) - 1) * rand.nextInt(3)) / 2;
-                    p.z += rand.nextInt(3) - 1;
-                    if (world.getFullBlockLightValue(p) >= 13 || !mayPlaceOn(world.getBlockId(p.down()))) {
-                        continue label0;
+                    checkX += rand.nextInt(3) - 1;
+                    checkY += ((rand.nextInt(3) - 1) * rand.nextInt(3)) / 2;
+                    checkZ += rand.nextInt(3) - 1;
+                    if (world.getFullBlockLightValue(queryPos.set(checkX, checkY, checkZ)) >= 13 || !mayPlaceOn(world.getBlockId(queryPos.set(checkX, checkY - 1, checkZ)))) {
+                        continue outer;
                     }
                 }
 
-                if (world.getBlockId(p) != 0) {
+                if (world.getBlockId(queryPos.set(checkX, checkY, checkZ)) != 0) {
                     continue;
                 }
                 if (rand.nextFloat() > 0.85) {
-                    world.setBlockIdNotify(p, this.block.id());
+                    world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
                 }
             }
             return true;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicNetherrackIgneous.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicNetherrackIgneous.java
index b374300e2..eb01c7bd0 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicNetherrackIgneous.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicNetherrackIgneous.java
@@ -1,32 +1,35 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityItem;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
 public class BlockLogicNetherrackIgneous extends BlockLogic {
     public BlockLogicNetherrackIgneous(@NotNull Block<?> block) {
-        super(block, Material.netherrack);
+        super(block, Materials.NETHERRACK);
         block.setTicking(true);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         float f = 0.125F;
-        return AABB.fromPool(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1, tilePos.y + 1 - f, tilePos.z + 1);
+        return new AABBd(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x() + 1, tilePos.y() + 1 - f, tilePos.z() + 1);
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
         if (entity instanceof EntityItem) return; // Don't burn items for this block
         entity.fireHurt();
     }
@@ -37,30 +40,31 @@ public class BlockLogicNetherrackIgneous extends BlockLogic {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay() + world.rand.nextInt(5) - world.rand.nextInt(5));
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay() + world.rand.nextInt(5) - world.rand.nextInt(5));
     }
 
-    public boolean canMelt(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canMelt(@NotNull World world, @NotNull TilePosc tilePos) {
         boolean canMelt = false;
+        TilePos queryPos = new TilePos();
         for (Direction dir : Direction.directions) {
-            Block<?> block = world.getBlock(tilePos.add(dir));
-            Material adjacentMaterial = block == null ? Material.air : block.getMaterial();
-            if (adjacentMaterial == Material.water) {
+            Block<?> block = world.getBlock(tilePos.add(dir, queryPos));
+            Material adjacentMaterial = block == null ? Materials.AIR : block.getMaterial();
+            if (adjacentMaterial == Materials.WATER) {
                 return false;
             }
-            canMelt |= adjacentMaterial == Material.lava;
+            canMelt |= adjacentMaterial == Materials.LAVA;
         }
         return canMelt;
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         if (canMelt(world, tilePos)) {
             world.setBlockIdNotify(tilePos, Blocks.FLUID_LAVA_FLOWING.id());
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicNote.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicNote.java
index fd501ac4c..c5d2d7fcd 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicNote.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicNote.java
@@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils;
 import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import net.minecraft.core.block.entity.TileEntityActivator;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
@@ -11,12 +12,12 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
-public class BlockLogicNote extends BlockLogic
-{
+public class BlockLogicNote extends BlockLogic {
     private static final Logger LOGGER = LogUtils.getLogger();
     public static final int MASK_NOTE = 0b0011_1111;
     public static final int MASK_POWERED = 0b1000_0000;
@@ -24,17 +25,16 @@ public class BlockLogicNote extends BlockLogic
     public static final byte MAX_NOTE = 24;
 
     public BlockLogicNote(@NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
         block.withEntity(null);
     }
 
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         boolean powered = world.hasNeighborSignal(tilePos);
         int data = world.getBlockData(tilePos);
-        if(isPowered(data) && !powered)
-        {
+        if (isPowered(data) && !powered) {
             world.setBlockData(tilePos, setPowered(data, false));
         } else if (!isPowered(data) && powered) {
             triggerNote(world, tilePos);
@@ -43,7 +43,7 @@ public class BlockLogicNote extends BlockLogic
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!world.isClientSide) {
             changePitch(world, tilePos, player.isSneaking() ? -1 : 1);
             triggerNote(world, tilePos);
@@ -52,28 +52,28 @@ public class BlockLogicNote extends BlockLogic
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         changePitch(world, tilePos, 1);
         triggerNote(world, tilePos);
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         if (!world.isClientSide) {
             triggerNote(world, tilePos);
         }
     }
 
-    public void changePitch(@NotNull World world, @NotNull TilePos tilePos, int delta) {
+    public void changePitch(@NotNull World world, @NotNull TilePosc tilePos, int delta) {
         int meta = world.getBlockData(tilePos);
         world.setBlockData(tilePos, setNote(meta, (getNote(meta) + (MAX_NOTE + 1) + delta) % (MAX_NOTE + 1)));
     }
 
-    public void triggerNote(@NotNull World world, @NotNull TilePos tilePos) {
-        if(world.isBlockOpaqueCube(tilePos.up())) {
+    public void triggerNote(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (world.isBlockOpaqueCube(tilePos.up(new TilePos()))) {
             return;
         }
-        world.triggerEvent(tilePos, Instrument.getInstrumentFromBlock(world.getBlock(tilePos.down())).index, getNote(world.getBlockData(tilePos)));
+        world.triggerEvent(tilePos, Instrument.getInstrumentFromBlock(world.getBlock(tilePos.down(new TilePos()))).index, getNote(world.getBlockData(tilePos)));
     }
 
     public static int setNote(int data, int note) {
@@ -97,96 +97,96 @@ public class BlockLogicNote extends BlockLogic
     }
 
     @Override
-    public void triggerEvent(@NotNull World world, @NotNull TilePos tilePos, int index, int data) {
-        float f = (float)Math.pow(2D, (double)(data - 12) / 12D);
+    public void triggerEvent(@NotNull World world, @NotNull TilePosc tilePos, int index, int data) {
+        float f = (float) Math.pow(2D, (double) (data - 12) / 12D);
         String s = Instrument.getInstrumentFromIndex(index).soundKey;
-        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D, "note." + s, 3F, f);
-        world.spawnParticle("note", (double) tilePos.x + 0.5D, (double) tilePos.y + 1.2D, (double) tilePos.z + 0.5D, 0.0, 0.0D, 0.0D, data);
+        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "note." + s, 3F, f);
+        world.spawnParticle("note", (double) tilePos.x() + 0.5D, (double) tilePos.y() + 1.2D, (double) tilePos.z() + 0.5D, 0.0, 0.0D, 0.0D, data);
     }
 
     public record Instrument(int index, String soundKey) {
-            public static final Int2ObjectMap<Instrument> instrumentMap = new Int2ObjectArrayMap<>();
+        public static final Int2ObjectMap<Instrument> instrumentMap = new Int2ObjectArrayMap<>();
 
         public Instrument(int index, String soundKey) {
-                this.index = index;
-                this.soundKey = soundKey;
+            this.index = index;
+            this.soundKey = soundKey;
 
-                assert !instrumentMap.containsKey(index) : "Only 1 instrument can be assigned per index!";
-                instrumentMap.put(index, this);
-            }
+            assert !instrumentMap.containsKey(index) : "Only 1 instrument can be assigned per index!";
+            instrumentMap.put(index, this);
+        }
 
-            public static @NotNull Instrument getInstrumentFromIndex(int index) {
-                if (instrumentMap.containsKey(index)) return instrumentMap.get(index);
-                LOGGER.warn("No instrument assign to index '{}'!", index);
-                return instrumentMap.getOrDefault(index, DEFAULT);
-            }
+        public static @NotNull Instrument getInstrumentFromIndex(int index) {
+            if (instrumentMap.containsKey(index)) return instrumentMap.get(index);
+            LOGGER.warn("No instrument assign to index '{}'!", index);
+            return instrumentMap.getOrDefault(index, DEFAULT);
+        }
+
+        public static @NotNull Instrument getInstrumentFromBlock(@Nullable Block<?> block) {
+            if (block == null) return DEFAULT;
 
-            public static @NotNull Instrument getInstrumentFromBlock(@Nullable Block<?> block) {
-                if (block == null) return DEFAULT;
-
-                if (block == Blocks.BLOCK_OLIVINE) {
-                    return CHIP_TRIANGLE;
-                }
-                if (block == Blocks.BLOCK_REDSTONE || block == Blocks.PUMPKIN_REDSTONE || block.getLogic() instanceof BlockLogicOreRedstone) { // Should be any block thats basically just redstone
-                    return GUITAR_ELECTRIC;
-                }
-                if (block == Blocks.CHEST_PLANKS_OAK || block == Blocks.CHEST_PLANKS_OAK_PAINTED) {
-                    return WOOD_BLOCK;
-                }
-
-                Material material = block.getMaterial();
-                if (material == Material.permafrost || material == Material.ice) {
-                    return CELESTA;
-                }
-                if (material.isStone()) {
-                    return BD;
-                }
-                if (material == Material.sand) {
-                    return SNARE;
-                }
-                if (material == Material.glass) {
-                    return HAT;
-                }
-                if (material == Material.wood) {
-                    return BASS_ATTACK;
-                }
-                if (material == Material.soulsand) {
-                    return CHANT;
-                }
-                if (material == Material.steel) {
-                    return DRUM_STEEL;
-                }
-
-                return DEFAULT;
+            if (block == Blocks.BLOCK_OLIVINE) {
+                return CHIP_TRIANGLE;
+            }
+            if (block == Blocks.BLOCK_REDSTONE || block == Blocks.PUMPKIN_REDSTONE || block.getLogic() instanceof BlockLogicOreRedstone) { // Should be any block thats basically just redstone
+                return GUITAR_ELECTRIC;
+            }
+            if (block == Blocks.CHEST_PLANKS_OAK || block == Blocks.CHEST_PLANKS_OAK_PAINTED) {
+                return WOOD_BLOCK;
             }
 
-            public static Instrument DEFAULT;
-            public static final Instrument BD;
-            public static final Instrument SNARE;
-            public static final Instrument HAT;
-            public static final Instrument BASS_ATTACK;
-            public static final Instrument HARP;
-            public static final Instrument CHANT;
-            public static final Instrument DRUM_STEEL;
-            public static final Instrument CHIP_TRIANGLE;
-            public static final Instrument GUITAR_ELECTRIC;
-            public static final Instrument CELESTA;
-            public static final Instrument WOOD_BLOCK;
-
-            static {
-                HARP = new Instrument(0, "harp");
-                BD = new Instrument(1, "bd");
-                SNARE = new Instrument(2, "snare");
-                HAT = new Instrument(3, "hat");
-                BASS_ATTACK = new Instrument(4, "bassattack");
-                CHANT = new Instrument(5, "chant");
-                DRUM_STEEL = new Instrument(6, "drum_steel");
-                CHIP_TRIANGLE = new Instrument(7, "chip_triangle");
-                GUITAR_ELECTRIC = new Instrument(8, "guitar_electric");
-                CELESTA = new Instrument(9, "celesta");
-                WOOD_BLOCK = new Instrument(10, "wood_block");
-
-                DEFAULT = HARP;
+            Material material = block.getMaterial();
+            if (material == Materials.PERMAFROST || material == Materials.ICE) {
+                return CELESTA;
+            }
+            if (material.isStone()) {
+                return BD;
+            }
+            if (material == Materials.SAND) {
+                return SNARE;
             }
+            if (material == Materials.GLASS) {
+                return HAT;
+            }
+            if (material == Materials.WOOD) {
+                return BASS_ATTACK;
+            }
+            if (material == Materials.SOUL_SAND) {
+                return CHANT;
+            }
+            if (material == Materials.STEEL) {
+                return DRUM_STEEL;
+            }
+
+            return DEFAULT;
+        }
+
+        public static Instrument DEFAULT;
+        public static final Instrument BD;
+        public static final Instrument SNARE;
+        public static final Instrument HAT;
+        public static final Instrument BASS_ATTACK;
+        public static final Instrument HARP;
+        public static final Instrument CHANT;
+        public static final Instrument DRUM_STEEL;
+        public static final Instrument CHIP_TRIANGLE;
+        public static final Instrument GUITAR_ELECTRIC;
+        public static final Instrument CELESTA;
+        public static final Instrument WOOD_BLOCK;
+
+        static {
+            HARP = new Instrument(0, "harp");
+            BD = new Instrument(1, "bd");
+            SNARE = new Instrument(2, "snare");
+            HAT = new Instrument(3, "hat");
+            BASS_ATTACK = new Instrument(4, "bassattack");
+            CHANT = new Instrument(5, "chant");
+            DRUM_STEEL = new Instrument(6, "drum_steel");
+            CHIP_TRIANGLE = new Instrument(7, "chip_triangle");
+            GUITAR_ELECTRIC = new Instrument(8, "guitar_electric");
+            CELESTA = new Instrument(9, "celesta");
+            WOOD_BLOCK = new Instrument(10, "wood_block");
+
+            DEFAULT = HARP;
         }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreNetherCoal.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreNetherCoal.java
index 151771260..59693eb10 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreNetherCoal.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreNetherCoal.java
@@ -1,10 +1,10 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -14,7 +14,7 @@ public class BlockLogicOreNetherCoal extends BlockLogic
 
     public BlockLogicOreNetherCoal(@NotNull Block<?> block)
     {
-        super(block, Material.netherrack);
+        super(block, Materials.NETHERRACK);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreRedstone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreRedstone.java
index 946ec7253..606dda590 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreRedstone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOreRedstone.java
@@ -14,57 +14,55 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class BlockLogicOreRedstone extends BlockLogic
-{
+public class BlockLogicOreRedstone extends BlockLogic {
     public static Int2IntArrayMap variantMap = new Int2IntArrayMap();
     private final boolean illuminated;
     private final @NotNull Block<?> normalBlock;
     private final @NotNull Block<?> illuminatedBlock;
-    public BlockLogicOreRedstone(@NotNull Block<?> block, @Nullable Block<?> parentBlock, @NotNull Material material, boolean illuminated, @NotNull Block<?> normalBlock, @NotNull Block<?> illuminatedBlock)
-    {
+
+    public BlockLogicOreRedstone(@NotNull Block<?> block, @Nullable Block<?> parentBlock, @NotNull Material material, boolean illuminated, @NotNull Block<?> normalBlock, @NotNull Block<?> illuminatedBlock) {
         super(block, material);
         this.illuminated = illuminated;
         this.normalBlock = normalBlock;
         this.illuminatedBlock = illuminatedBlock;
-        if (parentBlock != null){
+        if (parentBlock != null) {
             variantMap.put(parentBlock.id(), block.id());
         }
     }
 
     @Override
-    public int tickDelay()
-    {
+    public int tickDelay() {
         return 30;
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         lightRedstone(world, tilePos);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         lightRedstone(world, tilePos);
         return false;
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         lightRedstone(world, tilePos);
     }
 
     @Override
-    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity walker) {
+    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity walker) {
         lightRedstone(world, tilePos);
     }
 
-    private void lightRedstone(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    private void lightRedstone(@NotNull World world, @NotNull TilePosc tilePos) {
         spawnParticles(world, tilePos);
         if (!this.illuminated) {
             world.scheduleBlockUpdate(tilePos, this.illuminatedBlock.id(), 20 + world.rand.nextInt(9 * 20));
@@ -73,14 +71,14 @@ public class BlockLogicOreRedstone extends BlockLogic
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-        if(this.illuminated) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (this.illuminated) {
             world.setBlockIdNotify(tilePos, this.normalBlock.id());
         }
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return this.illuminated;
     }
 
@@ -100,38 +98,39 @@ public class BlockLogicOreRedstone extends BlockLogic
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-        if(this.illuminated) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (this.illuminated) {
             spawnParticles(world, tilePos);
         }
     }
 
-    private void spawnParticles(@NotNull World world, @NotNull TilePos tilePos) {
-		Random random = world.rand;
+    private void spawnParticles(@NotNull World world, @NotNull TilePosc tilePos) {
+        Random random = world.rand;
 
         final int brightness = 10;
-		
-		double d = 0.0625;
-		for (int i = 0; i < Direction.directions.length; i++) {
+
+        final double d = 0.0625;
+        TilePos queryPos = new TilePos();
+        for (int i = 0; i < Direction.directions.length; i++) {
             Direction dir = Direction.directions[i];
-			double px = (double) tilePos.x + random.nextFloat();
-			double py = (double) tilePos.y + random.nextFloat();
-			double pz = (double) tilePos.z + random.nextFloat();
+            double px = (double) tilePos.x() + random.nextFloat();
+            double py = (double) tilePos.y() + random.nextFloat();
+            double pz = (double) tilePos.z() + random.nextFloat();
 
-            if (!world.isBlockOpaqueCube(tilePos.add(dir))) {
+            if (!world.isBlockOpaqueCube(tilePos.add(dir, queryPos))) {
                 switch (dir) {
-                    case UP -> py = (tilePos.y + 1) + d;
-                    case DOWN -> py = (tilePos.y) - d;
-                    case SOUTH -> pz = (tilePos.z + 1) + d;
-                    case NORTH -> pz = (tilePos.z) - d;
-                    case EAST -> px = (tilePos.x + 1) + d;
-                    case WEST -> px = (tilePos.x) - d;
+                    case UP -> py = (tilePos.y() + 1) + d;
+                    case DOWN -> py = (tilePos.y()) - d;
+                    case SOUTH -> pz = (tilePos.z() + 1) + d;
+                    case NORTH -> pz = (tilePos.z()) - d;
+                    case EAST -> px = (tilePos.x() + 1) + d;
+                    case WEST -> px = (tilePos.x()) - d;
                 }
             }
 
-			if (px < tilePos.x || px > (tilePos.x + 1) || py < 0.0D || py > (tilePos.y + 1) || pz < tilePos.z || pz > (tilePos.z + 1)) {
-				world.spawnParticle("reddust", px, py, pz, 0, 0, 0, brightness);
-			}
-		}
+            if (px < tilePos.x() || px > (tilePos.x() + 1) || py < 0.0D || py > (tilePos.y() + 1) || pz < tilePos.z() || pz > (tilePos.z() + 1)) {
+                world.spawnParticle("reddust", px, py, pz, 0, 0, 0, brightness);
+            }
+        }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOverlayPebbles.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOverlayPebbles.java
index fe3b3bb40..64a0ff38c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicOverlayPebbles.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicOverlayPebbles.java
@@ -8,17 +8,16 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicOverlayPebbles extends BlockLogic
-{
-    public BlockLogicOverlayPebbles(@NotNull Block<?> block, @NotNull Material material)
-    {
+public class BlockLogicOverlayPebbles extends BlockLogic {
+    public BlockLogicOverlayPebbles(@NotNull Block<?> block, @NotNull Material material) {
         super(block, material);
         setBlockBounds(0, 0, 0, 1, 0.0625F, 1);
     }
@@ -35,57 +34,49 @@ public class BlockLogicOverlayPebbles extends BlockLogic
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        Block<?> block = world.getBlock(tilePos.down());
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        Block<?> block = world.getBlock(tilePos.down(new TilePos()));
         return block != null && block.getMaterial().isSolid();
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
         return canPlaceAt(world, tilePos);
     }
 
     @Override
-    public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id)
-    {
-        if (!canStay(world, tilePos))
-        {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (!canStay(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
     @Override
-    public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-    {
-        if (dropCause == EnumDropCause.PICK_BLOCK)
-        {
-            return new ItemStack[] { new ItemStack(Items.AMMO_PEBBLE, 1) };
+    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
+        if (dropCause == EnumDropCause.PICK_BLOCK) {
+            return new ItemStack[]{new ItemStack(Items.AMMO_PEBBLE, 1)};
         }
-        return new ItemStack[] { new ItemStack(Items.AMMO_PEBBLE, data + 1) };
+        return new ItemStack[]{new ItemStack(Items.AMMO_PEBBLE, data + 1)};
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPathDirt.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPathDirt.java
index ade499de8..3077d4b15 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPathDirt.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPathDirt.java
@@ -1,56 +1,55 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.util.phys.AABB;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicPathDirt extends BlockLogic
-{
-	public BlockLogicPathDirt(@NotNull Block<?> block) {
-        super(block, Material.dirt);
+public class BlockLogicPathDirt extends BlockLogic {
+    public BlockLogicPathDirt(@NotNull Block<?> block) {
+        super(block, Materials.DIRT);
         block.setTicking(true);
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
         block.withLightBlock(255);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        return AABB.fromPool(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1, tilePos.y + 1, tilePos.z + 1);
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        return new AABBd(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x() + 1, tilePos.y() + 1, tilePos.z() + 1);
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         super.onNeighborChanged(world, tilePos, id);
-        TilePos up = tilePos.up();
+        TilePos up = tilePos.up(new TilePos());
         Material material = world.getBlockMaterial(up);
         Block<?> b = world.getBlock(up);
-        if(material.isSolid() && b != Blocks.FENCE_GATE_PLANKS_OAK && b != Blocks.FENCE_GATE_PLANKS_OAK_PAINTED && b != Blocks.SIGN_WALL_PLANKS_OAK) {
+        if (material.isSolid() && b != Blocks.FENCE_GATE_PLANKS_OAK && b != Blocks.FENCE_GATE_PLANKS_OAK_PAINTED && b != Blocks.SIGN_WALL_PLANKS_OAK) {
             world.setBlockIdNotify(tilePos, Blocks.DIRT.id());
         }
     }
 
     @Override
-    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-    {
+    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         return switch (dropCause) {
             case SILK_TOUCH, PICK_BLOCK -> new ItemStack[]{new ItemStack(this)};
             default -> new ItemStack[]{new ItemStack(Blocks.DIRT)};
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPiePumpkin.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPiePumpkin.java
index c2440798c..28b237c3c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPiePumpkin.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPiePumpkin.java
@@ -1,11 +1,12 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.item.Items;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicPiePumpkin extends BlockLogicEdible
 {
@@ -16,17 +17,17 @@ public class BlockLogicPiePumpkin extends BlockLogicEdible
     }
 
     @Override
-    public int getHealAmount(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getHealAmount(@NotNull World world, @NotNull TilePosc tilePos) {
         return 5;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int data = source.getBlockData(tilePos);
         float f = 0.0625F;
         float xMin = data >= 2 ? 0.5f : f;
         float zMin = data >= 3 ? 0.5f : f;
         float f2 = 0.375F;
-        return AABB.fromPool(xMin, 0.0F, zMin, 1.0F - f, f2, 1.0F - f);
+        return new AABBd(xMin, 0.0F, zMin, 1.0F - f, f2, 1.0F - f);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanks.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanks.java
index 1b91ab39f..51223d2ea 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanks.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanks.java
@@ -1,18 +1,18 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicPlanks extends BlockLogic implements IPaintable {
     public BlockLogicPlanks(@NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         world.setBlockId(tilePos, Blocks.PLANKS_OAK_PAINTED.id());
         Blocks.PLANKS_OAK_PAINTED.getLogic().setColor(world, tilePos, color);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanksPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanksPainted.java
index 76914f1ad..2dfba223b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanksPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPlanksPainted.java
@@ -1,14 +1,14 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -16,11 +16,11 @@ public class BlockLogicPlanksPainted extends BlockLogic implements IPainted
 {
     public BlockLogicPlanksPainted(@NotNull Block<?> block)
     {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return itemStack.getMetadata();
     }
 
@@ -46,12 +46,12 @@ public class BlockLogicPlanksPainted extends BlockLogic implements IPainted
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockIdNotify(tilePos, Blocks.PLANKS_OAK.id());
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPortal.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPortal.java
index 741dd7bac..7e529741b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPortal.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPortal.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.Entity;
@@ -11,20 +11,22 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Axis;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
-public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
-{
+public class BlockLogicPortal extends BlockLogicTransparent implements IPainted {
     public static final int MAX_PORTAL_SIZE = 32;
     public static final int MASK_COLOR = 0b1111_0000;
     public static final int MASK_ROTATION = 0b0000_0011;
@@ -33,57 +35,51 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
     public static final int ORIENTATION_X = 0;
     public static final int ORIENTATION_Z = 1;
     public static final int ORIENTATION_Y = 2;
-	public final @NotNull Dimension targetDimension;
-	public final @NotNull Block<?> portalFrame;
-	public final @NotNull Block<?> portalTrigger;
-		
-    public BlockLogicPortal(@NotNull Block<?> block, @NotNull Dimension targetDimension, @NotNull Block<?> portalMaterial, @NotNull Block<?> portalTrigger)
-    {
-        super(block, Material.portal);
+    public final @NotNull Dimension targetDimension;
+    public final @NotNull Block<?> portalFrame;
+    public final @NotNull Block<?> portalTrigger;
+
+    public BlockLogicPortal(@NotNull Block<?> block, @NotNull Dimension targetDimension, @NotNull Block<?> portalMaterial, @NotNull Block<?> portalTrigger) {
+        super(block, Materials.PORTAL);
         this.targetDimension = targetDimension;
         this.portalFrame = portalMaterial;
         this.portalTrigger = portalTrigger;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int meta = source.getBlockData(tilePos);
-        if((meta & 0x1) > 0)
-        {
+        if ((meta & 0x1) > 0) {
             float f1 = 0.125F;
             float f3 = 0.5F;
-            return AABB.fromPool(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
-        } else
-        {
+            return new AABBd(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
+        } else {
             float f = 0.5F;
             float f2 = 0.125F;
-            return AABB.fromPool(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
+            return new AABBd(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
         }
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
-    public @Nullable Bounds getPortalDims(@NotNull World world, @NotNull TilePos tilePos, boolean expectMiddle)
-    {
-    	return getPortalDims(world, tilePos, false, expectMiddle);
+    public @Nullable Bounds getPortalDims(@NotNull World world, @NotNull TilePosc tilePos, boolean expectMiddle) {
+        return getPortalDims(world, tilePos, false, expectMiddle);
     }
-    
-    public @Nullable Bounds getPortalDims(@NotNull World world, @NotNull TilePos tilePos, boolean swapOrientation, boolean expectMiddle)
-    {
+
+    public @Nullable Bounds getPortalDims(@NotNull World world, @NotNull TilePosc tilePos, boolean swapOrientation, boolean expectMiddle) {
         final int maxDims = MAX_PORTAL_SIZE;
 
 
@@ -96,14 +92,13 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         boolean foundBottom = false;
 
         Axis axis = Axis.NONE;
-        
+
         // Check if valid dimension
         if (world.dimension.portalBlock != null && world.dimension.portalBlock != this.block) return null;
 
         // Sink to minimum Y
         for (int ry = 0; ry > -maxDims; ry--) {
-            if (world.getBlockId(tempPos.set(p.x, p.y + ry, p.z)) == this.portalFrame.id())
-            {
+            if (world.getBlockId(tempPos.set(p.x, p.y + ry, p.z)) == this.portalFrame.id()) {
                 foundBottom = true;
                 p.y += ry;
                 break;
@@ -115,44 +110,43 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         p.y++;
 
         if (!swapOrientation) {
-        	// Find orientation and minimum bound
-        	for (int rx = 0; rx > -maxDims; rx--) {
-        		if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id()) {
+            // Find orientation and minimum bound
+            for (int rx = 0; rx > -maxDims; rx--) {
+                if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id()) {
                     axis = Axis.X;
                     p.x += rx;
-        			break;
-        		}
-        	}
-        	
-        	if (axis == Axis.NONE) {
-        		for (int rz = 0; rz > -maxDims; rz--) {
-        			if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id()) {
-        				axis = Axis.Z;
+                    break;
+                }
+            }
+
+            if (axis == Axis.NONE) {
+                for (int rz = 0; rz > -maxDims; rz--) {
+                    if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id()) {
+                        axis = Axis.Z;
                         p.z += rz;
-        				break;
-        			}
-        		}
-        	}
-        }
-        else {
-        	// Find orientation and minimum bound
-        	for (int rz = 0; rz > -maxDims; rz--) {
-        		if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id()) {
+                        break;
+                    }
+                }
+            }
+        } else {
+            // Find orientation and minimum bound
+            for (int rz = 0; rz > -maxDims; rz--) {
+                if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id()) {
                     axis = Axis.Z;
                     p.z += rz;
-        			break;
-        		}
-        	}
-        	
-        	if (axis == Axis.NONE) {
-        		for (int rx = 0; rx > -maxDims; rx--) {
-        			if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id()) {
-        				axis = Axis.X;
+                    break;
+                }
+            }
+
+            if (axis == Axis.NONE) {
+                for (int rx = 0; rx > -maxDims; rx--) {
+                    if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id()) {
+                        axis = Axis.X;
                         p.x += rx;
-        				break;
-        			}
-        		}
-        	}
+                        break;
+                    }
+                }
+            }
         }
 
         if (axis == Axis.NONE) return null;
@@ -161,10 +155,8 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         switch (axis) {
             case X: {
                 // Find in X direction
-                for (int rx = 1; rx < maxDims; rx++)
-                {
-                    if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id())
-                    {
+                for (int rx = 1; rx < maxDims; rx++) {
+                    if (world.getBlockId(tempPos.set(p.x + rx, p.y, p.z)) == this.portalFrame.id()) {
                         maxBoundA = rx;
                         break;
                     }
@@ -174,10 +166,8 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
             case Z:
             default: {
                 // Find in Z direction
-                for (int rz = 1; rz < maxDims; rz++)
-                {
-                    if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id())
-                    {
+                for (int rz = 1; rz < maxDims; rz++) {
+                    if (world.getBlockId(tempPos.set(p.x, p.y, p.z + rz)) == this.portalFrame.id()) {
                         maxBoundA = rz;
                         break;
                     }
@@ -192,12 +182,11 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         p.y--;
 
         // Find maximum bound in Y direction
-        for (int ry = 1; ry < maxDims; ry++)
-        {
-            if (p.y + ry >= world.getHeightBlocks()) return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
+        for (int ry = 1; ry < maxDims; ry++) {
+            if (p.y + ry >= world.getHeightBlocks())
+                return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
 
-            if (world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? 1 : 0), p.y + ry, p.z + (axis == Axis.Z ? 1 : 0))) == this.portalFrame.id())
-            {
+            if (world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? 1 : 0), p.y + ry, p.z + (axis == Axis.Z ? 1 : 0))) == this.portalFrame.id()) {
                 maxBoundY = ry;
                 break;
             }
@@ -207,52 +196,41 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         if (maxBoundY == 0) return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
 
         // Check portal structure
-        for (int ra = 0; ra <= maxBoundA; ra++)
-        {
-            for (int ry = 0; ry <= maxBoundY; ry++)
-            {
+        for (int ra = 0; ra <= maxBoundA; ra++) {
+            for (int ry = 0; ry <= maxBoundY; ry++) {
                 // Check edges are correct
-                if (ra == 0 || ra == maxBoundA || ry == 0 || ry == maxBoundY)
-                {
-                    if (world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? ra : 0), p.y + ry, p.z + (axis == Axis.Z ? ra : 0))) != this.portalFrame.id())
-                    {
-                    	return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
+                if (ra == 0 || ra == maxBoundA || ry == 0 || ry == maxBoundY) {
+                    if (world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? ra : 0), p.y + ry, p.z + (axis == Axis.Z ? ra : 0))) != this.portalFrame.id()) {
+                        return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
                     }
-                }
-                else // Check interior is empty/fire
+                } else // Check interior is empty/fire
                 {
                     int id = world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? ra : 0), p.y + ry, p.z + (axis == Axis.Z ? ra : 0)));
 
-                    if (id != 0 && id != this.portalTrigger.id() && id != this.block.id())
-                    {
-                    	return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
+                    if (id != 0 && id != this.portalTrigger.id() && id != this.block.id()) {
+                        return swapOrientation ? null : getPortalDims(world, tilePos, true, expectMiddle);
                     }
                 }
             }
         }
 
         // Check middle (if applicable)
-        if (expectMiddle)
-        {
-            for (int ra = 1; ra < maxBoundA; ra++)
-            {
-                for (int ry = 1; ry < maxBoundY; ry++)
-                {
+        if (expectMiddle) {
+            for (int ra = 1; ra < maxBoundA; ra++) {
+                for (int ry = 1; ry < maxBoundY; ry++) {
                     int id = world.getBlockId(tempPos.set(p.x + (axis == Axis.X ? ra : 0), p.y + ry, p.z + (axis == Axis.Z ? ra : 0)));
 
-                    if (id != this.block.id())
-                    {
-                    	return swapOrientation ? null : getPortalDims(world, tilePos, true, true);
+                    if (id != this.block.id()) {
+                        return swapOrientation ? null : getPortalDims(world, tilePos, true, true);
                     }
                 }
             }
         }
 
-        return new Bounds(axis, tilePos, maxBoundA, maxBoundY);
+        return new Bounds(axis, new TilePos(tilePos), maxBoundA, maxBoundY);
     }
 
-    public boolean tryToCreatePortal(@NotNull World world, @NotNull TilePos tilePos, @Nullable DyeColor color)
-    {
+    public boolean tryToCreatePortal(@NotNull World world, @NotNull TilePosc tilePos, @Nullable DyeColor color) {
         if (color == null) {
             color = DyeColor.PURPLE;
         }
@@ -263,8 +241,8 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         switch (bounds.axis) {
             case X: {
                 TilePos p = new TilePos(0, 0, 0);
-                for(int ra = 1; ra < bounds.maxBoundA; ra++) {
-                    for(int ry = 1; ry < bounds.maxBoundB; ry++) {
+                for (int ra = 1; ra < bounds.maxBoundA; ra++) {
+                    for (int ry = 1; ry < bounds.maxBoundB; ry++) {
                         p.x = bounds.pos.x + ra;
                         p.y = bounds.pos.y + ry;
                         p.z = bounds.pos.z;
@@ -278,13 +256,13 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
                 world.setBlockData(p, (ORIENTATION_X & 0xF) | 0x2);
                 setColor(world, p, color);
 
-                world.markBlocksDirty(p, p.add(bounds.maxBoundA, bounds.maxBoundB, 0));
+                world.markBlocksDirty(p, p.add(bounds.maxBoundA, bounds.maxBoundB, 0, new TilePos()));
                 break;
             }
             case Z: {
                 TilePos p = new TilePos(0, 0, 0);
-                for(int ra = 1; ra < bounds.maxBoundA; ra++) {
-                    for(int ry = 1; ry < bounds.maxBoundB; ry++) {
+                for (int ra = 1; ra < bounds.maxBoundA; ra++) {
+                    for (int ry = 1; ry < bounds.maxBoundB; ry++) {
                         p.x = bounds.pos.x;
                         p.y = bounds.pos.y + ry;
                         p.z = bounds.pos.z + ra;
@@ -299,7 +277,7 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
                 world.setBlockData(p, (ORIENTATION_Z & 0xF) | 0x2);
                 setColor(world, p, color);
 
-                world.markBlocksDirty(p, p.add(0, bounds.maxBoundB, bounds.maxBoundA));
+                world.markBlocksDirty(p, p.add(0, bounds.maxBoundB, bounds.maxBoundA, new TilePos()));
                 break;
             }
         }
@@ -309,7 +287,7 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         Bounds bounds = getPortalDims(world, tilePos, true);
 
         if (bounds == null) {
@@ -323,7 +301,7 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
         if (entity instanceof EntityItem entityItem && entityItem.item != null && entityItem.item.itemID == Items.DYE.id) {
             DyeColor color = DyeColor.colorFromItemMeta(entityItem.item.getMetadata());
             if (getColor(world, tilePos) != color) {
@@ -335,39 +313,33 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
                 }
             }
         }
-        if(entity.vehicle == null && entity.passenger == null) {
+        if (entity.vehicle == null && entity.passenger == null) {
             entity.handlePortal(this.block.id(), getColor(world, tilePos));
         }
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
-    {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         int meta = world.getBlockData(tilePos);
-        if((meta & 0x2) > 0 && rand.nextInt(20) == 0)
-        {
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D, "portal.portal", 0.5F, rand.nextFloat() * 0.4F + 0.8F);
+        if ((meta & 0x2) > 0 && rand.nextInt(20) == 0) {
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "portal.portal", 0.5F, rand.nextFloat() * 0.4F + 0.8F);
         }
 
-        TilePos west = tilePos.west();
-        TilePos east = tilePos.east();
-        for(int l = 0; l < 4; l++)
-        {
-            double px = (double) tilePos.x + rand.nextFloat();
-            double py = (double) tilePos.y + rand.nextFloat();
-            double pz = (double) tilePos.z + rand.nextFloat();
+        TilePos queryPos = new TilePos();
+        for (int l = 0; l < 4; l++) {
+            double px = (double) tilePos.x() + rand.nextFloat();
+            double py = (double) tilePos.y() + rand.nextFloat();
+            double pz = (double) tilePos.z() + rand.nextFloat();
             int i1 = rand.nextInt(2) * 2 - 1;
             double xd = (rand.nextDouble() - 0.5D) * 0.5D;
             double yd = (rand.nextDouble() - 0.5D) * 0.5D;
             double zd = (rand.nextDouble() - 0.5D) * 0.5D;
-            if(world.getBlockId(west) == this.block.id() || world.getBlockId(east) == this.block.id())
-            {
-                pz = (double) tilePos.z + 0.5D + 0.25D * (double)i1;
-                zd = rand.nextFloat() * 2.0D * (double)i1;
-            } else
-            {
-                px = (double) tilePos.x + 0.5D + 0.25D * (double)i1;
-                xd = rand.nextFloat() * 2.0D * (double)i1;
+            if (world.getBlockId(tilePos.add(Direction.WEST, queryPos)) == this.block.id() || world.getBlockId(tilePos.add(Direction.EAST, queryPos)) == this.block.id()) {
+                pz = (double) tilePos.z() + 0.5D + 0.25D * (double) i1;
+                zd = rand.nextFloat() * 2.0D * (double) i1;
+            } else {
+                px = (double) tilePos.x() + 0.5D + 0.25D * (double) i1;
+                xd = rand.nextFloat() * 2.0D * (double) i1;
             }
             world.spawnParticle("portal", px, py, pz, xd, yd, zd, fromMetadata(meta).blockMeta);
         }
@@ -391,19 +363,19 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.STAIRS_PLANKS_OAK.id(), stripColorFromMetadata(meta));
     }
 
     @Override
-    public @NotNull DyeColor getColor(@NotNull World world, @NotNull TilePos tilePos) {
+    public @NotNull DyeColor getColor(@NotNull World world, @NotNull TilePosc tilePos) {
         return IPainted.super.getColor(world, tilePos);
     }
 
     // TODO implement block updates without causing lag spikes
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         Bounds bounds = getPortalDims(world, tilePos, true);
         if (bounds == null) {
             world.setBlockIdNotify(tilePos, 0);
@@ -415,8 +387,8 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         TilePos p = new TilePos(tilePos);
         switch (bounds.axis) {
             case X: {
-                for(int ra = 1; ra < bounds.maxBoundA; ra++) {
-                    for(int ry = 1; ry < bounds.maxBoundB; ry++) {
+                for (int ra = 1; ra < bounds.maxBoundA; ra++) {
+                    for (int ry = 1; ry < bounds.maxBoundB; ry++) {
                         p.x = portalPos.x + ra;
                         p.y = portalPos.y + ry;
                         p.z = portalPos.z;
@@ -426,8 +398,8 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
                 break;
             }
             case Z: {
-                for(int ra = 1; ra < bounds.maxBoundA; ra++) {
-                    for(int ry = 1; ry < bounds.maxBoundB; ry++) {
+                for (int ra = 1; ra < bounds.maxBoundA; ra++) {
+                    for (int ry = 1; ry < bounds.maxBoundB; ry++) {
                         p.x = portalPos.x;
                         p.y = portalPos.y + ry;
                         p.z = portalPos.z + ra;
@@ -439,7 +411,6 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         }
 
 
-
 //        if (bounds[0] == ORIENTATION_X) {
 //            world.markBlocksDirty(px + 1, py + 1, pz, px + bounds[4], py + bounds[5], pz);
 //        } else {
@@ -453,5 +424,6 @@ public class BlockLogicPortal extends BlockLogicTransparent implements IPainted
         world.setBlockDataNotify(tilePos, stripColorFromMetadata(meta) | toMetadata(color) | MASK_COLOR_SET);
     }
 
-    public record Bounds(@NotNull Axis axis, @NotNull TilePos pos, int maxBoundA, int maxBoundB) { }
+    public record Bounds(@NotNull Axis axis, @NotNull TilePos pos, int maxBoundA, int maxBoundB) {
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlate.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlate.java
index 6218947b9..a246074d2 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlate.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlate.java
@@ -10,24 +10,24 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.sound.SoundCategory;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
 
-public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implements IPaintable, ISupportable
-{
+public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implements IPaintable, ISupportable {
     public static final int MASK_POWERED = 0b0000_0001;
     public static final int MASK_SIDE = 0b0000_1110;
     private final @NotNull Class<T> triggerMobClass;
 
-	public BlockLogicPressurePlate(@NotNull Block<?> block, @NotNull Class<T> mobType, @NotNull Material material)
-    {
+    public BlockLogicPressurePlate(@NotNull Block<?> block, @NotNull Class<T> mobType, @NotNull Material material) {
         super(block, material);
         this.triggerMobClass = mobType;
         block.setTicking(true);
@@ -36,35 +36,32 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-    public int tickDelay()
-    {
+    public int tickDelay() {
         return 20;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM)
             || isSupported(world, tilePos, Side.TOP)
             || isSupported(world, tilePos, Side.NORTH)
@@ -74,14 +71,14 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-        if(!isSupported(world, tilePos, sideFromMeta(world.getBlockData(tilePos)))) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (!isSupported(world, tilePos, sideFromMeta(world.getBlockData(tilePos)))) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
-    private @NotNull Side getDefaultSide(@NotNull World world, @NotNull TilePos tilePos) {
+    private @NotNull Side getDefaultSide(@NotNull World world, @NotNull TilePosc tilePos) {
         for (int i = 0; i < Side.sides.length; i++) {
             Side side = Side.sides[i];
             if (isSupported(world, tilePos, side)) return side;
@@ -90,9 +87,8 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
-        if(world.isClientSide) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
         if (isPressed(world.getBlockData(tilePos))) {
@@ -101,8 +97,8 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
-        if(world.isClientSide) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
+        if (world.isClientSide) {
             return;
         }
         if (!isPressed(world.getBlockData(tilePos))) {
@@ -110,20 +106,25 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
         }
     }
 
-    private void updateState(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    private void updateState(@NotNull World world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
         boolean isPressed = isPressed(meta);
         Direction dir = sideFromMeta(meta).getDirection();
         boolean isSteppedOn = false;
         float pixel = 0.125F;
         List<T> list = switch (sideFromMeta(meta)) {
-            case BOTTOM -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(pixel, 0.0F, pixel, 1.0F - pixel, (isPressed ? pixel / 2f : pixel), 1.0F - pixel).move(tilePos));
-            case TOP -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(pixel, 1f - (isPressed ? pixel / 2f : pixel), pixel, 1.0F - pixel, 1f, 1.0F - pixel).move(tilePos));
-            case NORTH -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(pixel, pixel, 0, 1 - pixel, 1 - pixel, (isPressed ? pixel / 2f : pixel)).move(tilePos));
-            case SOUTH -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(pixel, pixel, 1f - (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel, 1).move(tilePos));
-            case WEST -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(0, pixel, pixel, (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel).move(tilePos));
-            default -> world.getEntitiesWithinAABB(this.triggerMobClass, AABB.fromPool(1 - (isPressed ? pixel / 2f : pixel), pixel, pixel, 1, 1 - pixel, 1 - pixel).move(tilePos));
+            case BOTTOM ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(pixel, 0.0F, pixel, 1.0F - pixel, (isPressed ? pixel / 2f : pixel), 1.0F - pixel).translate(tilePos.x(), tilePos.y(), tilePos.z()));
+            case TOP ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(pixel, 1f - (isPressed ? pixel / 2f : pixel), pixel, 1.0F - pixel, 1f, 1.0F - pixel).translate(tilePos.x(), tilePos.y(), tilePos.z()));
+            case NORTH ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(pixel, pixel, 0, 1 - pixel, 1 - pixel, (isPressed ? pixel / 2f : pixel)).translate(tilePos.x(), tilePos.y(), tilePos.z()));
+            case SOUTH ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(pixel, pixel, 1f - (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel, 1).translate(tilePos.x(), tilePos.y(), tilePos.z()));
+            case WEST ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(0, pixel, pixel, (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel).translate(tilePos.x(), tilePos.y(), tilePos.z()));
+            default ->
+                world.getEntitiesWithinAABB(this.triggerMobClass, new AABBd(1 - (isPressed ? pixel / 2f : pixel), pixel, pixel, 1, 1 - pixel, 1 - pixel).translate(tilePos.x(), tilePos.y(), tilePos.z()));
         };
 
         for (T t : list) {
@@ -132,67 +133,65 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
                 break;
             }
         }
-        if(isSteppedOn && !isPressed) {
+        if (isSteppedOn && !isPressed) {
             world.setBlockDataNotify(tilePos, meta | MASK_POWERED);
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, new TilePos()), id());
             world.markBlocksDirty(tilePos, tilePos);
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double)tilePos.x + 0.5D, (double)tilePos.y + 0.1D, (double)tilePos.z + 0.5D, "random.click", 0.3F, 0.6F);
-        } else if(!isSteppedOn && isPressed) {
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.1D, (double) tilePos.z() + 0.5D, "random.click", 0.3F, 0.6F);
+        } else if (!isSteppedOn && isPressed) {
             world.setBlockDataNotify(tilePos, meta & ~MASK_POWERED);
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, new TilePos()), id());
             world.markBlocksDirty(tilePos, tilePos);
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double)tilePos.x + 0.5D, (double)tilePos.y + 0.1D, (double)tilePos.z + 0.5D, "random.click", 0.3F, 0.5F);
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.1D, (double) tilePos.z() + 0.5D, "random.click", 0.3F, 0.5F);
         }
-        if(isSteppedOn)
-        {
+        if (isSteppedOn) {
             world.scheduleBlockUpdate(tilePos, id(), tickDelay());
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data)
-    {
-        if(isPressed(data)) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (isPressed(data)) {
             Side side = sideFromMeta(world.getBlockData(tilePos));
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.add(side.getDirection()), id());
+            world.notifyBlocksOfNeighborChange(tilePos.add(side.getDirection(), new TilePos()), id());
         }
         super.onRemoved(world, tilePos, data);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int meta = source.getBlockData(tilePos);
         boolean isPressed = isPressed(meta);
         final float pixel = 1.0f / 16f;
         return switch (sideFromMeta(meta)) {
-            case BOTTOM -> AABB.fromPool(pixel, 0.0F, pixel, 1.0F - pixel, (isPressed ? pixel / 2f : pixel), 1.0F - pixel);
-            case TOP -> AABB.fromPool(pixel, 1f - (isPressed ? pixel / 2f : pixel), pixel, 1.0F - pixel, 1f, 1.0F - pixel);
-            case NORTH -> AABB.fromPool(pixel, pixel, 0, 1 - pixel, 1 - pixel, (isPressed ? pixel / 2f : pixel));
-            case SOUTH -> AABB.fromPool(pixel, pixel, 1f - (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel, 1);
-            case WEST -> AABB.fromPool(0, pixel, pixel, (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel);
-            default -> AABB.fromPool(1 - (isPressed ? pixel / 2f : pixel), pixel, pixel, 1, 1 - pixel, 1 - pixel);
+            case BOTTOM -> new AABBd(pixel, 0.0F, pixel, 1.0F - pixel, (isPressed ? pixel / 2f : pixel), 1.0F - pixel);
+            case TOP -> new AABBd(pixel, 1f - (isPressed ? pixel / 2f : pixel), pixel, 1.0F - pixel, 1f, 1.0F - pixel);
+            case NORTH -> new AABBd(pixel, pixel, 0, 1 - pixel, 1 - pixel, (isPressed ? pixel / 2f : pixel));
+            case SOUTH -> new AABBd(pixel, pixel, 1f - (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel, 1);
+            case WEST -> new AABBd(0, pixel, pixel, (isPressed ? pixel / 2f : pixel), 1 - pixel, 1 - pixel);
+            default -> new AABBd(1 - (isPressed ? pixel / 2f : pixel), pixel, pixel, 1, 1 - pixel, 1 - pixel);
         };
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return isPressed(source.getBlockData(tilePos));
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
-        if(isPressed(meta)) {
+        if (isPressed(meta)) {
             return side == sideFromMeta(meta).getOpposite();
         } else {
             return false;
         }
     }
 
-    public static boolean isPressed(int meta){
+    public static boolean isPressed(int meta) {
         return (meta & MASK_POWERED) != 0;
     }
 
@@ -205,17 +204,17 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-    public boolean isSignalSource()
-    {
+    public boolean isSignalSource() {
         return true;
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
+
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
         side = side.getOpposite();
         if (!isSupported(world, tilePos, side)) {
@@ -236,7 +235,7 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataRaw(tilePos, Blocks.PRESSURE_PLATE_PLANKS_OAK_PAINTED.id(), meta);
         world.setBlockData(tilePos, meta);
@@ -247,7 +246,7 @@ public class BlockLogicPressurePlate<T extends Entity> extends BlockLogic implem
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE.center();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
index 0e674a745..be23d76c8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
@@ -9,7 +9,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -45,17 +45,17 @@ public class BlockLogicPressurePlatePainted<T extends Entity> extends BlockLogic
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockIdNotify(tilePos, Blocks.PRESSURE_PLATE_PLANKS_OAK.id());
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return itemStack.getMetadata() & MASK_COLOR;
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockDataNotify(tilePos, stripColorFromMetadata(meta) | toMetadata(color));
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumice.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumice.java
index 6ea2356c6..4469a97e8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumice.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumice.java
@@ -1,47 +1,43 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
 public class BlockLogicPumice extends BlockLogic {
     final boolean isWet;
-    public BlockLogicPumice(@NotNull Block<?> block, boolean isWet)
-    {
-        super(block, Material.stone);
+
+    public BlockLogicPumice(@NotNull Block<?> block, boolean isWet) {
+        super(block, Materials.STONE);
         this.isWet = isWet;
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         super.onPlacedByWorld(world, tilePos);
         byte radius = 2;
-        if(this.isWet && (inWater(world, tilePos) || world.dimension.id == Dimension.DRIFT.id)){
+        if (this.isWet && (inWater(world, tilePos) || world.dimension.id == Dimension.DRIFT.id)) {
             world.setBlockIdNotify(tilePos, Blocks.PUMICE_DRY.id());
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
-            for(int l = 0; l < 8; l++)
-            {
-                world.spawnParticle("largesmoke", (double)tilePos.x + Math.random(), (double)tilePos.y + Math.random(), (double)tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 0);
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
+            for (int l = 0; l < 8; l++) {
+                world.spawnParticle("largesmoke", (double) tilePos.x() + Math.random(), (double) tilePos.y() + Math.random(), (double) tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 0);
             }
         }
-        if(!this.isWet && inLava(world, tilePos)) {
-            TilePos p = new TilePos(tilePos);
-            for (int x = tilePos.x - radius; x <= tilePos.x + radius; x++) {
-                for (int y = tilePos.y - radius; y <= tilePos.y + radius; y++) {
-                    for (int z = tilePos.z - radius; z <= tilePos.z + radius; z++) {
-                        p.x = x;
-                        p.y = y;
-                        p.z = z;
-                        if (Blocks.hasTag(world.getBlockId(p), BlockTags.IS_LAVA)) {
-                            world.setBlockIdNotify(p, 0);
+        if (!this.isWet && inLava(world, tilePos)) {
+            TilePos queryPos = new TilePos(tilePos);
+            for (queryPos.x = tilePos.x() - radius; queryPos.x <= tilePos.x() + radius; queryPos.x++) {
+                for (queryPos.y = tilePos.y() - radius; queryPos.y <= tilePos.y() + radius; queryPos.y++) {
+                    for (queryPos.z = tilePos.z() - radius; queryPos.z <= tilePos.z() + radius; queryPos.z++) {
+                        if (Blocks.hasTag(world.getBlockId(queryPos), BlockTags.IS_LAVA)) {
+                            world.setBlockIdNotify(queryPos, 0);
                         }
                     }
                 }
@@ -51,38 +47,37 @@ public class BlockLogicPumice extends BlockLogic {
     }
 
 
-    public boolean inLava(@NotNull World world, @NotNull TilePos tilePos){
+    public boolean inLava(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         return
-            Blocks.hasTag(world.getBlockId(tilePos.east()), BlockTags.IS_LAVA) ||
-            Blocks.hasTag(world.getBlockId(tilePos.west()), BlockTags.IS_LAVA) ||
-            Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.IS_LAVA) ||
-            Blocks.hasTag(world.getBlockId(tilePos.down()), BlockTags.IS_LAVA) ||
-            Blocks.hasTag(world.getBlockId(tilePos.south()), BlockTags.IS_LAVA) ||
-            Blocks.hasTag(world.getBlockId(tilePos.north()), BlockTags.IS_LAVA);
+            Blocks.hasTag(world.getBlockId(tilePos.east(queryPos)), BlockTags.IS_LAVA) ||
+                Blocks.hasTag(world.getBlockId(tilePos.west(queryPos)), BlockTags.IS_LAVA) ||
+                Blocks.hasTag(world.getBlockId(tilePos.up(queryPos)), BlockTags.IS_LAVA) ||
+                Blocks.hasTag(world.getBlockId(tilePos.down(queryPos)), BlockTags.IS_LAVA) ||
+                Blocks.hasTag(world.getBlockId(tilePos.south(queryPos)), BlockTags.IS_LAVA) ||
+                Blocks.hasTag(world.getBlockId(tilePos.north(queryPos)), BlockTags.IS_LAVA);
     }
 
-    public boolean inWater(@NotNull World world, @NotNull TilePos tilePos){
+    public boolean inWater(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         return
-            Blocks.hasTag(world.getBlockId(tilePos.east()), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(tilePos.west()), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(tilePos.up()), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(tilePos.down()), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(tilePos.south()), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(tilePos.north()), BlockTags.IS_WATER);
+            Blocks.hasTag(world.getBlockId(tilePos.east(queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.west(queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.up(queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.down(queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.south(queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.north(queryPos)), BlockTags.IS_WATER);
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
-        if(!this.isWet) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (!this.isWet) {
             byte radius = 2;
-            TilePos p = new TilePos(tilePos);
-            for (int x = tilePos.x - radius; x <= tilePos.x + radius; x++) {
-                for (int y = tilePos.y - radius; y <= tilePos.y + radius; y++) {
-                    for (int z = tilePos.z - radius; z <= tilePos.z + radius; z++) {
-                        p.x = x;
-                        p.y = y;
-                        p.z = z;
-                        world.notifyBlocksOfNeighborChange(p, world.getBlockId(p));
+            TilePos queryPos = new TilePos(tilePos);
+            for (queryPos.x = tilePos.x() - radius; queryPos.x <= tilePos.x() + radius; queryPos.x++) {
+                for (queryPos.y = tilePos.y() - radius; queryPos.y <= tilePos.y() + radius; queryPos.y++) {
+                    for (queryPos.z = tilePos.z() - radius; queryPos.z <= tilePos.z() + radius; queryPos.z++) {
+                        world.notifyBlocksOfNeighborChange(queryPos, world.getBlockId(queryPos));
                     }
 
                 }
@@ -92,27 +87,27 @@ public class BlockLogicPumice extends BlockLogic {
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         if (this.isWet) {
             Direction direction = Direction.directions[rand.nextInt(6)]; // Get random side
-            if (direction == Direction.UP || world.isBlockOpaqueCube(tilePos.add(direction))) return;
+            if (direction == Direction.UP || world.isBlockOpaqueCube(tilePos.add(direction, new TilePos()))) return;
             float off1 = rand.nextFloat() * 0.9f + 0.05f;
             float off2 = rand.nextFloat() * 0.9f + 0.05f;
             switch (direction) {
                 case DOWN:
-                    world.spawnParticle("dripLava", tilePos.x + off1, tilePos.y, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripLava", tilePos.x() + off1, tilePos.y(), tilePos.z() + off2, 0, 0, 0, 0);
                     break;
                 case NORTH:
-                    world.spawnParticle("dripLava", tilePos.x + off1, tilePos.y + off2, tilePos.z, 0, 0, 0, 0);
+                    world.spawnParticle("dripLava", tilePos.x() + off1, tilePos.y() + off2, tilePos.z(), 0, 0, 0, 0);
                     break;
                 case SOUTH:
-                    world.spawnParticle("dripLava", tilePos.x + off1, tilePos.y + off2, tilePos.z + 1, 0, 0, 0, 0);
+                    world.spawnParticle("dripLava", tilePos.x() + off1, tilePos.y() + off2, tilePos.z() + 1, 0, 0, 0, 0);
                     break;
                 case WEST:
-                    world.spawnParticle("dripLava", tilePos.x, tilePos.y + off1, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripLava", tilePos.x(), tilePos.y() + off1, tilePos.z() + off2, 0, 0, 0, 0);
                     break;
                 case EAST:
-                    world.spawnParticle("dripLava", tilePos.x + 1, tilePos.y + off1, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripLava", tilePos.x() + 1, tilePos.y() + off1, tilePos.z() + off2, 0, 0, 0, 0);
                     break;
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkin.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkin.java
index c1fd40fef..ec8d659db 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkin.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkin.java
@@ -1,14 +1,14 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.material.MaterialColor;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.tool.ItemToolSword;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -18,14 +18,14 @@ public class BlockLogicPumpkin extends BlockLogicVeryRotatable
 
 	public BlockLogicPumpkin(@NotNull Block<?> block, boolean isCarvable)
     {
-        super(block, Material.vegetable);
+        super(block, Materials.VEGETABLE);
         block.setTicking(true);
         this.isCarvable = isCarvable;
         block.withOverrideColor(MaterialColor.paintedOrange);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!this.isCarvable) return false;
         ItemStack heldItem = player.getHeldItem();
         if (heldItem != null && heldItem.getItem() instanceof ItemToolSword){
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkinRedstone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkinRedstone.java
index d1dc9dd51..67112f100 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkinRedstone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPumpkinRedstone.java
@@ -1,40 +1,44 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicPumpkinRedstone extends BlockLogicVeryRotatable {
 
     public BlockLogicPumpkinRedstone(@NotNull Block<?> block) {
-        super(block, Material.vegetable);
+        super(block, Materials.VEGETABLE);
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         for (Direction dir : Direction.directions){
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, queryPos), id());
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        TilePos queryPos = new TilePos();
         for (Direction dir : Direction.directions){
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, queryPos), id());
         }
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return isEmittingSignal(world, tilePos, side);
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         Side mySide = Side.getSideById(source.getBlockData(tilePos));
         return mySide == side.getOpposite();
     }
@@ -45,7 +49,7 @@ public class BlockLogicPumpkinRedstone extends BlockLogicVeryRotatable {
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_PUSHABLE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRail.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRail.java
index ffe956de2..6f48849b8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRail.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRail.java
@@ -2,6 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.logic.RailDirection;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
@@ -9,12 +10,14 @@ import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -29,14 +32,14 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
     }
 
     protected BlockLogicRail(@NotNull Block<?> block, boolean isPowered) {
-        super(block, Material.decoration);
+        super(block, Materials.DECORATION);
         this.isPowered = isPowered;
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
     }
 
-    public @NotNull RailDirection getRailDirection(@NotNull WorldSource world, @NotNull TilePos tilePos){
+    public @NotNull RailDirection getRailDirection(@NotNull WorldSource world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
-        if (this.isPowered){
+        if (this.isPowered) {
             meta &= MASK_DIRECTION;
         }
         return RailDirection.getFromMeta(meta);
@@ -47,59 +50,58 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         RailDirection direction = getRailDirection(source, tilePos);
-        if(direction.isSloped()) {
-            return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.725F, 1.0F);
+        if (direction.isSloped()) {
+            return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.725F, 1.0F);
         } else {
-            return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
+            return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
         }
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM);
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         performRailTurn(world, tilePos, true);
-        if(this.block == Blocks.RAIL_POWERED) {
-        	onNeighborChanged(world, tilePos, id());
+        if (this.block == Blocks.RAIL_POWERED) {
+            onNeighborChanged(world, tilePos, id());
         }
     }
+
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-        if(world.isClientSide) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (world.isClientSide) {
             return;
         }
         int meta = world.getBlockData(tilePos);
         boolean isPoweredFlagSet = (meta & MASK_POWERED) != 0;
         RailDirection railDirection = getRailDirection(world, tilePos);
 
-        if(!isSupported(world, tilePos, Side.BOTTOM)) {
+        if (!isSupported(world, tilePos, Side.BOTTOM)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
             return;
@@ -122,97 +124,102 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
 
         Block<?> block = Blocks.getBlock(id);
 
-        if(this.block == Blocks.RAIL_POWERED) {
+        if (this.block == Blocks.RAIL_POWERED) {
+            TilePos queryPos = new TilePos();
+
             boolean gettingPower =
-                    world.hasNeighborSignal(tilePos) ||
-                    world.hasNeighborSignal(tilePos.up()) ||
+                world.hasNeighborSignal(tilePos) ||
+                    world.hasNeighborSignal(tilePos.up(queryPos)) ||
                     isConnectedPoweredRail1(world, tilePos, true, 0) ||
                     isConnectedPoweredRail1(world, tilePos, false, 0);
 
             boolean changedMeta = false;
-            if(gettingPower && !isPoweredFlagSet) {
+            if (gettingPower && !isPoweredFlagSet) {
                 // Set powered bit
                 world.setBlockDataNotify(tilePos, railDirection.meta | MASK_POWERED);
                 changedMeta = true;
-            } else if(!gettingPower && isPoweredFlagSet) {
+            } else if (!gettingPower && isPoweredFlagSet) {
                 // Remove powered bit
                 world.setBlockDataNotify(tilePos, railDirection.meta);
                 changedMeta = true;
             }
 
-            if(changedMeta) {
-                world.notifyBlocksOfNeighborChange(tilePos.down(), id());
-                if(railDirection.isSloped()) {
-                    world.notifyBlocksOfNeighborChange(tilePos.up(), id());
+            if (changedMeta) {
+                world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
+                if (railDirection.isSloped()) {
+                    world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
                 }
             }
-        } else if(block != null && block.isSignalSource() && new Rail(world, tilePos).getAdjacentTracks()== 3) {
+        } else if (block != null && block.isSignalSource() && new Rail(world, tilePos).getAdjacentTracks() == 3) {
             performRailTurn(world, tilePos, false);
         }
     }
     // Checks that the rail is placed on top of a block and doesn't slope into the air
 
-    private boolean isRailValid(@NotNull World world, @NotNull TilePos tilePos){
+    private boolean isRailValid(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         return switch (getRailDirection(world, tilePos)) {
-            case SLOPE_E -> isSupported(world, tilePos.add(1, 1, 0), Side.BOTTOM);
-            case SLOPE_W -> isSupported(world, tilePos.add(-1, 1, 0), Side.BOTTOM);
-            case SLOPE_N -> isSupported(world, tilePos.add(0, 1, -1), Side.BOTTOM);
-            case SLOPE_S -> isSupported(world, tilePos.add(0, 1, 1), Side.BOTTOM);
+            case SLOPE_E -> isSupported(world, tilePos.add(1, 1, 0, queryPos), Side.BOTTOM);
+            case SLOPE_W -> isSupported(world, tilePos.add(-1, 1, 0, queryPos), Side.BOTTOM);
+            case SLOPE_N -> isSupported(world, tilePos.add(0, 1, -1, queryPos), Side.BOTTOM);
+            case SLOPE_S -> isSupported(world, tilePos.add(0, 1, 1, queryPos), Side.BOTTOM);
             default -> true;
         };
     }
     // Turn logic what a regular rail is powered in an intersection
 
-    private void performRailTurn(@NotNull World world, @NotNull TilePos tilePos, boolean forceUpdate) {
+    private void performRailTurn(@NotNull World world, @NotNull TilePosc tilePos, boolean forceUpdate) {
         if (!world.isClientSide) {
             new Rail(world, tilePos).railTurn(world.hasNeighborSignal(tilePos), forceUpdate);
         }
     }
 
-    private boolean isConnectedPoweredRail1(@NotNull World world, @NotNull TilePos tilePos, boolean forward, int distance) {
+    private boolean isConnectedPoweredRail1(@NotNull World world, @NotNull TilePosc tilePos, boolean forward, int distance) {
         // Only check for powered rails for an 8 block span
-        if(distance >= 8) {
+        if (distance >= 8) {
             return false;
         }
         RailDirection railDirection = getRailDirection(world, tilePos);
         Axis axis = Axis.NONE;
 
 
-        TilePos next = forward ? railDirection.getNextRail(tilePos) : railDirection.getPrevRail(tilePos);
+        TilePos next = forward ? railDirection.getNextRail(tilePos, new TilePos()) : railDirection.getPrevRail(tilePos, new TilePos());
         axis = switch (railDirection) {
             case STRAIGHT_NS, SLOPE_N, SLOPE_S -> Axis.Z;
             case STRAIGHT_EW, SLOPE_E, SLOPE_W -> Axis.X;
             default -> axis;
         };
 
-        if(isConnectedPoweredRail2(world, next, forward, distance, axis)) { return true; }
-        return isConnectedPoweredRail2(world, next.down(), forward, distance, axis);
+        if (isConnectedPoweredRail2(world, next, forward, distance, axis)) {
+            return true;
+        }
+        return isConnectedPoweredRail2(world, next.down(new TilePos()), forward, distance, axis);
     }
 
     private boolean isConnectedPoweredRail2(@NotNull World world, @NotNull TilePos tilePos, boolean forward, int distance, @NotNull Axis axis) {
         int blockId = world.getBlockId(tilePos);
-        if(blockId == Blocks.RAIL_POWERED.id()) {
+        if (blockId == Blocks.RAIL_POWERED.id()) {
             int meta = world.getBlockData(tilePos);
             boolean isPoweredFlagSet = (meta & MASK_POWERED) != 0;
             RailDirection direction = getRailDirection(world, tilePos);
 
             // Return false for perpendicular powered rails
-            if(axis == Axis.X && (
-                    direction == RailDirection.STRAIGHT_NS ||
+            if (axis == Axis.X && (
+                direction == RailDirection.STRAIGHT_NS ||
                     direction == RailDirection.SLOPE_N ||
                     direction == RailDirection.SLOPE_S)) {
                 return false;
             }
-            if(axis == Axis.Z && (
-                    direction == RailDirection.STRAIGHT_EW ||
+            if (axis == Axis.Z && (
+                direction == RailDirection.STRAIGHT_EW ||
                     direction == RailDirection.SLOPE_E ||
                     direction == RailDirection.SLOPE_W)) {
                 return false;
             }
 
-            if(isPoweredFlagSet) {
+            if (isPoweredFlagSet) {
                 // If rail powered return true
-                if(world.hasNeighborSignal(tilePos) || world.hasNeighborSignal(tilePos.up())) {
+                if (world.hasNeighborSignal(tilePos) || world.hasNeighborSignal(tilePos.up(new TilePos()))) {
                     return true;
                 } else { // else check 1 block further down if powered
                     return isConnectedPoweredRail1(world, tilePos, forward, distance + 1);
@@ -223,12 +230,12 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_PUSHABLE;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side == Side.BOTTOM ? FullSupport.INSTANCE : PartialSupport.INSTANCE;
     }
 
@@ -237,9 +244,10 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
         private final @NotNull TilePos pos;
         private final boolean isPoweredRail;
         private final @NotNull List<TilePos> connectedTracks = new ArrayList<>();
-        public Rail(@NotNull World world, @NotNull TilePos pos) {
+
+        public Rail(@NotNull World world, @NotNull TilePosc pos) {
             this.world = world;
-            this.pos = pos;
+            this.pos = new TilePos(pos);
             BlockLogicRail logicRail = world.getBlockLogic(pos, BlockLogicRail.class);
             this.isPoweredRail = logicRail != null && logicRail.isPowered;
             int meta = world.getBlockData(pos) & (this.isPoweredRail ? MASK_DIRECTION : 0b1111_1111);
@@ -250,14 +258,14 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
 
         private void setConnections(@NotNull RailDirection direction) {
             this.connectedTracks.clear();
-            this.connectedTracks.add(direction.getNextRail(this.pos));
-            this.connectedTracks.add(direction.getPrevRail(this.pos));
+            this.connectedTracks.add(direction.getNextRail(this.pos, new TilePos()));
+            this.connectedTracks.add(direction.getPrevRail(this.pos, new TilePos()));
         }
 
         private void checkAndRemoveMissingRails() {
-            for(int i = 0; i < this.connectedTracks.size(); i++) {
+            for (int i = 0; i < this.connectedTracks.size(); i++) {
                 Rail rail = getMinecartTrackLogic(this.connectedTracks.get(i));
-                if(rail == null || !rail.isConnectedTo(this)) {
+                if (rail == null || !rail.isConnectedTo(this)) {
                     this.connectedTracks.remove(i--);
                 } else {
                     this.connectedTracks.set(i, rail.pos);
@@ -267,26 +275,26 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
         }
 
         private boolean isMinecartTrack(@NotNull TilePos tilePos) {
-            if(BlockLogicRail.isRailBlockAt(this.world, tilePos)) {
+            TilePos queryPos = new TilePos();
+            if (BlockLogicRail.isRailBlockAt(this.world, tilePos)) {
                 return true;
             }
-            if(BlockLogicRail.isRailBlockAt(this.world, tilePos.up())) {
+            if (BlockLogicRail.isRailBlockAt(this.world, tilePos.up(queryPos))) {
                 return true;
             }
-            return BlockLogicRail.isRailBlockAt(this.world, tilePos.down());
+            return BlockLogicRail.isRailBlockAt(this.world, tilePos.down(queryPos));
         }
 
         private @Nullable Rail getMinecartTrackLogic(@NotNull TilePos tilePos) {
-            if(BlockLogicRail.isRailBlockAt(this.world, tilePos)) {
+            if (BlockLogicRail.isRailBlockAt(this.world, tilePos)) {
                 return new Rail(this.world, tilePos);
             }
-            TilePos up = tilePos.up();
-            if(BlockLogicRail.isRailBlockAt(this.world, up)) {
-                return new Rail(this.world, up);
+            TilePos queryPos = new TilePos();
+            if (BlockLogicRail.isRailBlockAt(this.world, tilePos.up(queryPos))) {
+                return new Rail(this.world, tilePos.up(queryPos));
             }
-            TilePos down = tilePos.down();
-            if(BlockLogicRail.isRailBlockAt(this.world, down)) {
-                return new Rail(this.world, down);
+            if (BlockLogicRail.isRailBlockAt(this.world, tilePos.down(queryPos))) {
+                return new Rail(this.world, tilePos.down(queryPos));
             }
             return null;
         }
@@ -310,28 +318,30 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
         }
 
         private int getAdjacentTracks() {
+            TilePos queryPos = new TilePos();
             int count = 0;
-            if(isMinecartTrack(this.pos.north())) {
+            if (isMinecartTrack(this.pos.north(queryPos))) {
                 count++;
             }
-            if(isMinecartTrack(this.pos.south())) {
+            if (isMinecartTrack(this.pos.south(queryPos))) {
                 count++;
             }
-            if(isMinecartTrack(this.pos.west())) {
+            if (isMinecartTrack(this.pos.west(queryPos))) {
                 count++;
             }
-            if(isMinecartTrack(this.pos.east())) {
+            if (isMinecartTrack(this.pos.east(queryPos))) {
                 count++;
             }
             return count;
         }
 
         private boolean handleKeyPress(@NotNull Rail rail) {
-            if(isConnectedTo(rail)) {
+            if (isConnectedTo(rail)) {
                 return true;
             }
             return this.connectedTracks.size() != 2;
         }
+
         private boolean canTrackTurnTo(@NotNull TilePos tilePos) {
             Rail rail = getMinecartTrackLogic(tilePos);
             if (rail == null) return false;
@@ -341,82 +351,83 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
         }
 
         public void railTurn(boolean isPowered, boolean forceUpdate) {
-            boolean flagNorth = canTrackTurnTo(this.pos.north());
-            boolean flagSouth = canTrackTurnTo(this.pos.south());
-            boolean flagWest = canTrackTurnTo(this.pos.west());
-            boolean flagEast = canTrackTurnTo(this.pos.east());
+            TilePos queryPos = new TilePos();
+            boolean flagNorth = canTrackTurnTo(this.pos.north(queryPos));
+            boolean flagSouth = canTrackTurnTo(this.pos.south(queryPos));
+            boolean flagWest = canTrackTurnTo(this.pos.west(queryPos));
+            boolean flagEast = canTrackTurnTo(this.pos.east(queryPos));
 
             RailDirection railType = RailDirection.NONE;
-            if((flagNorth || flagSouth) && !flagWest && !flagEast) {
+            if ((flagNorth || flagSouth) && !flagWest && !flagEast) {
                 railType = RailDirection.STRAIGHT_NS;
             }
-            if((flagWest || flagEast) && !flagNorth && !flagSouth) {
+            if ((flagWest || flagEast) && !flagNorth && !flagSouth) {
                 railType = RailDirection.STRAIGHT_EW;
             }
-            if(!this.isPoweredRail) {
-                if(flagSouth && flagEast && !flagNorth && !flagWest) {
+            if (!this.isPoweredRail) {
+                if (flagSouth && flagEast && !flagNorth && !flagWest) {
                     railType = RailDirection.TURN_ES;
                 }
-                if(flagSouth && flagWest && !flagNorth && !flagEast) {
+                if (flagSouth && flagWest && !flagNorth && !flagEast) {
                     railType = RailDirection.TURN_WS;
                 }
-                if(flagNorth && flagWest && !flagSouth && !flagEast) {
+                if (flagNorth && flagWest && !flagSouth && !flagEast) {
                     railType = RailDirection.TURN_WN;
                 }
-                if(flagNorth && flagEast && !flagSouth && !flagWest) {
+                if (flagNorth && flagEast && !flagSouth && !flagWest) {
                     railType = RailDirection.TURN_EN;
                 }
             }
-            if(railType == RailDirection.NONE) {
-                if(flagNorth || flagSouth) {
+            if (railType == RailDirection.NONE) {
+                if (flagNorth || flagSouth) {
                     railType = RailDirection.STRAIGHT_NS;
                 }
-                if(flagWest || flagEast) {
+                if (flagWest || flagEast) {
                     railType = RailDirection.STRAIGHT_EW;
                 }
-                if(!this.isPoweredRail) {
-                    if(isPowered) {
-                        if(flagSouth && flagEast) {
+                if (!this.isPoweredRail) {
+                    if (isPowered) {
+                        if (flagSouth && flagEast) {
                             railType = RailDirection.TURN_ES;
                         }
-                        if(flagWest && flagSouth) {
+                        if (flagWest && flagSouth) {
                             railType = RailDirection.TURN_WS;
                         }
-                        if(flagEast && flagNorth) {
+                        if (flagEast && flagNorth) {
                             railType = RailDirection.TURN_EN;
                         }
-                        if(flagNorth && flagWest) {
+                        if (flagNorth && flagWest) {
                             railType = RailDirection.TURN_WN;
                         }
                     } else {
-                        if(flagNorth && flagWest) {
+                        if (flagNorth && flagWest) {
                             railType = RailDirection.TURN_WN;
                         }
-                        if(flagEast && flagNorth) {
+                        if (flagEast && flagNorth) {
                             railType = RailDirection.TURN_EN;
                         }
-                        if(flagWest && flagSouth) {
+                        if (flagWest && flagSouth) {
                             railType = RailDirection.TURN_WS;
                         }
-                        if(flagSouth && flagEast) {
+                        if (flagSouth && flagEast) {
                             railType = RailDirection.TURN_ES;
                         }
                     }
                 }
             }
-            if(railType == RailDirection.STRAIGHT_NS) {
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, -1))) {
+            if (railType == RailDirection.STRAIGHT_NS) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, -1, queryPos))) {
                     railType = RailDirection.SLOPE_N;
                 }
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, 1))) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, 1, queryPos))) {
                     railType = RailDirection.SLOPE_S;
                 }
             }
-            if(railType == RailDirection.STRAIGHT_EW) {
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(1, 1, 0))) {
+            if (railType == RailDirection.STRAIGHT_EW) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(1, 1, 0, queryPos))) {
                     railType = RailDirection.SLOPE_E;
                 }
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(-1, 1, 0))) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(-1, 1, 0, queryPos))) {
                     railType = RailDirection.SLOPE_W;
                 }
             }
@@ -426,11 +437,11 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
             setConnections(railType);
 
             int newMeta = railType.meta;
-            if(this.isPoweredRail) {
+            if (this.isPoweredRail) {
                 newMeta |= this.world.getBlockData(this.pos) & MASK_POWERED;
             }
 
-            if(forceUpdate || this.world.getBlockData(this.pos) != newMeta) {
+            if (forceUpdate || this.world.getBlockData(this.pos) != newMeta) {
                 this.world.setBlockDataNotify(this.pos, newMeta);
                 // Update the rail states of the connected tracks
                 for (TilePos connectedTrack : this.connectedTracks) {
@@ -445,54 +456,56 @@ public class BlockLogicRail extends BlockLogic implements ISupportable {
                 }
             }
         }
+
         private void updateRailState(@NotNull Rail otherLogic) {
             this.connectedTracks.add(otherLogic.pos);
-            boolean flagNorth = isInTrack(this.pos.north());
-            boolean flagSouth = isInTrack(this.pos.south());
-            boolean flagWest = isInTrack(this.pos.west());
-            boolean flagEast = isInTrack(this.pos.east());
+            TilePos queryPos = new TilePos();
+            boolean flagNorth = isInTrack(this.pos.north(queryPos));
+            boolean flagSouth = isInTrack(this.pos.south(queryPos));
+            boolean flagWest = isInTrack(this.pos.west(queryPos));
+            boolean flagEast = isInTrack(this.pos.east(queryPos));
             RailDirection railDirection = RailDirection.NONE;
-            if(flagNorth || flagSouth) {
+            if (flagNorth || flagSouth) {
                 railDirection = RailDirection.STRAIGHT_NS;
             }
-            if(flagWest || flagEast) {
+            if (flagWest || flagEast) {
                 railDirection = RailDirection.STRAIGHT_EW;
             }
-            if(!this.isPoweredRail) {
-                if(flagSouth && flagEast && !flagNorth && !flagWest) {
+            if (!this.isPoweredRail) {
+                if (flagSouth && flagEast && !flagNorth && !flagWest) {
                     railDirection = RailDirection.TURN_ES;
                 }
-                if(flagSouth && flagWest && !flagNorth && !flagEast) {
+                if (flagSouth && flagWest && !flagNorth && !flagEast) {
                     railDirection = RailDirection.TURN_WS;
                 }
-                if(flagNorth && flagWest && !flagSouth && !flagEast) {
+                if (flagNorth && flagWest && !flagSouth && !flagEast) {
                     railDirection = RailDirection.TURN_WN;
                 }
-                if(flagNorth && flagEast && !flagSouth && !flagWest) {
+                if (flagNorth && flagEast && !flagSouth && !flagWest) {
                     railDirection = RailDirection.TURN_EN;
                 }
             }
-            if(railDirection == RailDirection.STRAIGHT_NS) {
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, -1))) {
+            if (railDirection == RailDirection.STRAIGHT_NS) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, -1, queryPos))) {
                     railDirection = RailDirection.SLOPE_N;
                 }
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, 1))) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(0, 1, 1, queryPos))) {
                     railDirection = RailDirection.SLOPE_S;
                 }
             }
-            if(railDirection == RailDirection.STRAIGHT_EW) {
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(1, 1, 0))) {
+            if (railDirection == RailDirection.STRAIGHT_EW) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(1, 1, 0, queryPos))) {
                     railDirection = RailDirection.SLOPE_E;
                 }
-                if(BlockLogicRail.isRailBlockAt(this.world, this.pos.add(-1, 1, 0))) {
+                if (BlockLogicRail.isRailBlockAt(this.world, this.pos.add(-1, 1, 0, queryPos))) {
                     railDirection = RailDirection.SLOPE_W;
                 }
             }
-            if(railDirection == RailDirection.NONE) {
+            if (railDirection == RailDirection.NONE) {
                 railDirection = RailDirection.STRAIGHT_NS;
             }
             int newMeta = railDirection.meta;
-            if(this.isPoweredRail) {
+            if (this.isPoweredRail) {
                 newMeta |= this.world.getBlockData(this.pos) & MASK_POWERED;
             }
             this.world.setBlockDataNotify(this.pos, newMeta);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRailDetector.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRailDetector.java
index e3a692cb7..cb63be6bc 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRailDetector.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRailDetector.java
@@ -6,34 +6,32 @@ import java.util.Random;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.vehicle.EntityMinecart;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 public class BlockLogicRailDetector extends BlockLogicRail {
-    public BlockLogicRailDetector(@NotNull Block<?> block)
-    {
+    public BlockLogicRailDetector(@NotNull Block<?> block) {
         super(block, true);
         block.setTicking(true);
     }
 
     @Override
-    public int tickDelay()
-    {
+    public int tickDelay() {
         return 20;
     }
 
     @Override
-    public boolean isSignalSource()
-    {
+    public boolean isSignalSource() {
         return true;
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
-        if(world.isClientSide) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
+        if (world.isClientSide) {
             return;
         }
         int meta = world.getBlockData(tilePos);
@@ -43,8 +41,8 @@ public class BlockLogicRailDetector extends BlockLogicRail {
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-        if(world.isClientSide) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
         int meta = world.getBlockData(tilePos);
@@ -54,42 +52,41 @@ public class BlockLogicRailDetector extends BlockLogicRail {
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return (source.getBlockData(tilePos) & MASK_POWERED) != 0;
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
-        if((world.getBlockData(tilePos) & MASK_POWERED) == 0) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if ((world.getBlockData(tilePos) & MASK_POWERED) == 0) {
             return false;
         } else {
             return side == Side.TOP;
         }
     }
 
-    private void checkForMinecart(@NotNull World world, @NotNull TilePos tilePos, int meta) {
+    private void checkForMinecart(@NotNull World world, @NotNull TilePosc tilePos, int meta) {
         boolean isPowered = (meta & MASK_POWERED) != 0;
         boolean minecartPresent = false;
         float offset = 0.125f;
-        List<EntityMinecart> list = world.getEntitiesWithinAABB(EntityMinecart.class,
-            AABB.fromPool(tilePos.x + offset, tilePos.y + offset, tilePos.z + offset, tilePos.x + 1 - offset, tilePos.y + 1 - offset, tilePos.z + 1 - offset));
-        if(!list.isEmpty()) {
+        List<EntityMinecart> list = world.getEntitiesWithinAABB(EntityMinecart.class, new AABBd(tilePos.x() + offset, tilePos.y() + offset, tilePos.z() + offset, tilePos.x() + 1 - offset, tilePos.y() + 1 - offset, tilePos.z() + 1 - offset));
+        if (!list.isEmpty()) {
             minecartPresent = true;
         }
-        if(minecartPresent && !isPowered) {
+        if (minecartPresent && !isPowered) {
             // Set rail to powered
             world.setBlockDataNotify(tilePos, meta | MASK_POWERED);
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.down(), id());
+            world.notifyBlocksOfNeighborChange(tilePos.down(new TilePos()), id());
             world.markBlockDirty(tilePos);
-        } else if(!minecartPresent && isPowered) {
+        } else if (!minecartPresent && isPowered) {
             // Set rail to unpowered
             world.setBlockDataNotify(tilePos, meta & ~MASK_POWERED);
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.down(), id());
+            world.notifyBlocksOfNeighborChange(tilePos.down(new TilePos()), id());
             world.markBlockDirty(tilePos);
         }
-        if(minecartPresent) {
+        if (minecartPresent) {
             // Schedule update if minecart in rail
             world.scheduleBlockUpdate(tilePos, id(), tickDelay());
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRedstone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRedstone.java
index 5b99e16af..d8b6957d8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRedstone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRedstone.java
@@ -6,95 +6,93 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicRedstone extends BlockLogic
-{
-	public BlockLogicRedstone(@NotNull Block<?> block, @NotNull Material material)
-    {
-		super(block, material);
-	}
+public class BlockLogicRedstone extends BlockLogic {
+    public BlockLogicRedstone(@NotNull Block<?> block, @NotNull Material material) {
+        super(block, material);
+    }
 
-	@Override
-    public boolean isSignalSource()
-    {
+    @Override
+    public boolean isSignalSource() {
         return true;
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         return true;
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return true;
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        for (Direction dir : Direction.directions){
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        for (Direction dir : Direction.directions) {
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, queryPos), id());
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data)
-    {
-        for (Direction dir : Direction.directions){
-            world.notifyBlocksOfNeighborChange(tilePos.add(dir), id());
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        TilePos queryPos = new TilePos();
+        for (Direction dir : Direction.directions) {
+            world.notifyBlocksOfNeighborChange(tilePos.add(dir, queryPos), id());
         }
     }
 
-    
+
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         Random random = world.rand;
 
         final int redstoneBrightness = 10;
 
         final double d = 0.0625;
-        for (Direction dir : Direction.directions){
-            double px = (double) tilePos.x + random.nextFloat();
-            double py = (double) tilePos.y + random.nextFloat();
-            double pz = (double) tilePos.z + random.nextFloat();
-            TilePos p = tilePos.add(dir.getOpposite());
-            switch (dir){
+        TilePos queryPos = new TilePos();
+        for (Direction dir : Direction.directions) {
+            double px = (double) tilePos.x() + random.nextFloat();
+            double py = (double) tilePos.y() + random.nextFloat();
+            double pz = (double) tilePos.z() + random.nextFloat();
+            switch (dir) {
                 case DOWN:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        py = (tilePos.y + 1) + d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        py = (tilePos.y() + 1) + d;
                     }
                     break;
                 case UP:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        py = (tilePos.y + 0) - d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        py = (tilePos.y() + 0) - d;
                     }
                     break;
                 case NORTH:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        pz = (tilePos.z + 1) + d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        pz = (tilePos.z() + 1) + d;
                     }
                     break;
                 case SOUTH:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        pz = (tilePos.z + 0) - d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        pz = (tilePos.z() + 0) - d;
                     }
                     break;
                 case WEST:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        px = (tilePos.x + 1) + d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        px = (tilePos.x() + 1) + d;
                     }
                     break;
                 case EAST:
-                    if (!world.isBlockOpaqueCube(p)) {
-                        px = (tilePos.x + 0) - d;
+                    if (!world.isBlockOpaqueCube(tilePos.add(dir.getOpposite(), queryPos))) {
+                        px = (tilePos.x() + 0) - d;
                     }
                     break;
             }
-            if (px < tilePos.x || px > (tilePos.x + 1) || py < 0.0D || py > (tilePos.y + 1) || pz < tilePos.z || pz > (tilePos.z + 1)) {
+            if (px < tilePos.x() || px > (tilePos.x() + 1) || py < 0.0D || py > (tilePos.y() + 1) || pz < tilePos.z() || pz > (tilePos.z() + 1)) {
                 world.spawnParticle("reddust", px, py, pz, 0, 0, 0, redstoneBrightness);
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRepeater.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRepeater.java
index cfa98c69a..f769c2e54 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRepeater.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRepeater.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.Mob;
@@ -15,12 +15,13 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
-public class BlockLogicRepeater extends BlockLogic
-{
+
+public class BlockLogicRepeater extends BlockLogic {
     public static final double[] torchPosOffset = {
         -0.0625D, 0.0625D, 0.1875D, 0.3125D
     };
@@ -36,49 +37,46 @@ public class BlockLogicRepeater extends BlockLogic
 
     public final boolean isRepeaterPowered;
 
-	public BlockLogicRepeater(@NotNull Block<?> block, boolean isPowered)
-    {
-        super(block, Material.decoration);
+    public BlockLogicRepeater(@NotNull Block<?> block, boolean isPowered) {
+        super(block, Materials.DECORATION);
         this.isRepeaterPowered = isPowered;
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        return world.canPlaceOnSurfaceOfBlock(tilePos.down()) && super.canPlaceAt(world, tilePos);
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        return world.canPlaceOnSurfaceOfBlock(tilePos.down(new TilePos())) && super.canPlaceAt(world, tilePos);
     }
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Items.REPEATER) };
+        return new ItemStack[]{new ItemStack(Items.REPEATER)};
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos) {
-        return world.canPlaceOnSurfaceOfBlock(tilePos.down()) && super.canStay(world, tilePos);
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
+        return world.canPlaceOnSurfaceOfBlock(tilePos.down(new TilePos())) && super.canStay(world, tilePos);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         int meta = world.getBlockData(tilePos);
         boolean powered = isGettingPower(world, tilePos, meta);
-        if(this.isRepeaterPowered && !powered) {
+        if (this.isRepeaterPowered && !powered) {
             world.setBlockIdDataNotify(tilePos, Blocks.REPEATER_IDLE.id(), meta);
-        } else if(!this.isRepeaterPowered) {
+        } else if (!this.isRepeaterPowered) {
             world.setBlockIdDataNotify(tilePos, Blocks.REPEATER_ACTIVE.id(), meta);
-            if(!powered) {
+            if (!powered) {
                 int tickDelay = (meta & MASK_TICK_DELAY) >> 2;
                 world.scheduleBlockUpdate(tilePos, Blocks.REPEATER_ACTIVE.id(), tickDelayMap[tickDelay] * 2);
             }
@@ -94,20 +92,20 @@ public class BlockLogicRepeater extends BlockLogic
     // Cause block updates on the target block when removing a repeater,
     // which prevents redstone components on the other wide of the target block from staying powered.
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         Side back = getSideFromMeta(data);
         Side front = back.getOpposite();
-        world.notifyBlocksOfNeighborChange(tilePos.add(front.getDirection()), id());
+        world.notifyBlocksOfNeighborChange(tilePos.add(front.getDirection(), new TilePos()), id());
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return isEmittingSignal(world, tilePos, side);
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
-        if(!this.isRepeaterPowered) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
+        if (!this.isRepeaterPowered) {
             return false;
         }
         return side == getSideFromMeta(source.getBlockData(tilePos));
@@ -124,8 +122,8 @@ public class BlockLogicRepeater extends BlockLogic
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
-        if(!canStay(world, tilePos)) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        if (!canStay(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
             return;
@@ -133,25 +131,24 @@ public class BlockLogicRepeater extends BlockLogic
         int meta = world.getBlockData(tilePos);
         boolean powered = isGettingPower(world, tilePos, meta);
         int tickDelay = (meta & MASK_TICK_DELAY) >> 2;
-        if(this.isRepeaterPowered && !powered) {
+        if (this.isRepeaterPowered && !powered) {
             world.scheduleBlockUpdate(tilePos, id(), tickDelayMap[tickDelay] * 2);
-        } else if(!this.isRepeaterPowered && powered) {
+        } else if (!this.isRepeaterPowered && powered) {
             world.scheduleBlockUpdate(tilePos, id(), tickDelayMap[tickDelay] * 2);
         }
     }
 
-    private boolean isGettingPower(@NotNull World world, @NotNull TilePos tilePos, int meta)
-    {
+    private boolean isGettingPower(@NotNull World world, @NotNull TilePosc tilePos, int meta) {
         Side direction = getSideFromMeta(meta);
         if (direction.isVertical()) return false;
 
-        TilePos p = tilePos.add(direction.getDirection());
+        TilePos p = tilePos.add(direction.getDirection(), new TilePos());
         return world.hasSignal(p, direction) || (world.getBlockId(p) == Blocks.WIRE_REDSTONE.id() && (world.getBlockData(p) & BlockLogicWireRedstone.MASK_POWER) != 0);
     }
 
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         int metadata = world.getBlockData(tilePos);
         int tickDelay = (metadata & MASK_TICK_DELAY) >> 2;
         tickDelay = ((tickDelay + 1) << 2) & MASK_TICK_DELAY;
@@ -160,7 +157,7 @@ public class BlockLogicRepeater extends BlockLogic
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
         int metadata = world.getBlockData(tilePos);
         int tickDelay = (metadata & MASK_TICK_DELAY) >> 2;
         tickDelay = ((tickDelay + 1) << 2) & MASK_TICK_DELAY;
@@ -168,79 +165,77 @@ public class BlockLogicRepeater extends BlockLogic
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
-		int l = mob.getHorizontalPlacementDirection(side).index;
-		world.setBlockDataNotify(tilePos, l);
-		if(isGettingPower(world, tilePos, l)) {
-		    world.scheduleBlockUpdate(tilePos, id(), 1);
-		}
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+        int l = mob.getHorizontalPlacementDirection(side).index;
+        world.setBlockDataNotify(tilePos, l);
+        if (isGettingPower(world, tilePos, l)) {
+            world.scheduleBlockUpdate(tilePos, id(), 1);
+        }
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if (!side.isHorizontal()) side = Side.NORTH;
         int l = side.getDirection().index;
         world.setBlockDataNotify(tilePos, l);
-        if(isGettingPower(world, tilePos, l))
-        {
+        if (isGettingPower(world, tilePos, l)) {
             world.scheduleBlockUpdate(tilePos, id(), 1);
         }
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
-	@Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-		if (!this.isRepeaterPowered) {
-			return;
-		}
-		int meta = world.getBlockData(tilePos);
-		double px = (tilePos.x + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
-		double py = (tilePos.y + 0.4D) + (rand.nextFloat() - 0.5D) * 0.2D;
-		double pz = (tilePos.z + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
-		
-		double xOffset = 0.0;
-		double zOffset = 0.0;
+    @Override
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        if (!this.isRepeaterPowered) {
+            return;
+        }
+        int meta = world.getBlockData(tilePos);
+        double px = (tilePos.x() + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
+        double py = (tilePos.y() + 0.4D) + (rand.nextFloat() - 0.5D) * 0.2D;
+        double pz = (tilePos.z() + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
+
+        double xOffset = 0.0;
+        double zOffset = 0.0;
 
         final int redstoneBrightness = 15;
-		
-		if (rand.nextInt(2) == 0) {
-			switch (getSideFromMeta(meta)) {
+
+        if (rand.nextInt(2) == 0) {
+            switch (getSideFromMeta(meta)) {
                 case SOUTH:
-				    zOffset = -0.3125D;
-				    break;
+                    zOffset = -0.3125D;
+                    break;
                 case NORTH:
-				    zOffset = 0.3125D;
-				    break;
+                    zOffset = 0.3125D;
+                    break;
                 case EAST:
-				    xOffset = -0.3125D;
-				    break;
+                    xOffset = -0.3125D;
+                    break;
                 case WEST:
-				    xOffset = 0.3125D;
-				    break;
-			}
-		} else {
-			int tickDelay = (meta & MASK_TICK_DELAY) >> 2;
-			switch (getSideFromMeta(meta)) {
+                    xOffset = 0.3125D;
+                    break;
+            }
+        } else {
+            int tickDelay = (meta & MASK_TICK_DELAY) >> 2;
+            switch (getSideFromMeta(meta)) {
                 case SOUTH:
-				    zOffset = torchPosOffset[tickDelay];
-				    break;
+                    zOffset = torchPosOffset[tickDelay];
+                    break;
                 case NORTH:
-				    zOffset = -torchPosOffset[tickDelay];
-				    break;
+                    zOffset = -torchPosOffset[tickDelay];
+                    break;
                 case EAST:
-				    xOffset = torchPosOffset[tickDelay];
-				    break;
+                    xOffset = torchPosOffset[tickDelay];
+                    break;
                 case WEST:
-				    xOffset = -torchPosOffset[tickDelay];
-				    break;
-			}
-		}
-		world.spawnParticle("reddust", px + xOffset, py, pz + zOffset, 0, 0, 0, redstoneBrightness);
-	}
+                    xOffset = -torchPosOffset[tickDelay];
+                    break;
+            }
+        }
+        world.spawnParticle("reddust", px + xOffset, py, pz + zOffset, 0, 0, 0, redstoneBrightness);
+    }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRope.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRope.java
index 1ace33560..befa6e0e7 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRope.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRope.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
@@ -11,18 +11,21 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.tool.ItemToolShears;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicRope
     extends BlockLogic {
     public static final int MASK_ROPE_CONNECT = 0b1000_0000;
+
     public BlockLogicRope(@NotNull Block<?> block) {
-        super(block, Material.cloth);
+        super(block, Materials.CLOTH);
     }
 
     @Override
@@ -36,28 +39,29 @@ public class BlockLogicRope
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean isClimbable(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean isClimbable(@NotNull World world, @NotNull TilePosc tilePos) {
         return true;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        boolean hasBlockNegX = source.getBlockId(tilePos.add(-1,  0,  0)) == this.id();
-        boolean hasBlockPosX = source.getBlockId(tilePos.add( 1,  0,  0)) == this.id();
-        boolean hasBlockNegY = source.getBlockId(tilePos.add( 0, -1,  0)) == this.id();
-        boolean hasBlockPosY = source.getBlockId(tilePos.add( 0,  1,  0)) == this.id() || source.isBlockOpaqueCube(tilePos.add(0, 1, 0));
-        boolean hasBlockNegZ = source.getBlockId(tilePos.add( 0,  0, -1)) == this.id();
-        boolean hasBlockPosZ = source.getBlockId(tilePos.add( 0,  0,  1)) == this.id();
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        boolean hasBlockNegX = source.getBlockId(tilePos.add(-1, 0, 0, queryPos)) == this.id();
+        boolean hasBlockPosX = source.getBlockId(tilePos.add(1, 0, 0, queryPos)) == this.id();
+        boolean hasBlockNegY = source.getBlockId(tilePos.add(0, -1, 0, queryPos)) == this.id();
+        boolean hasBlockPosY = source.getBlockId(tilePos.add(0, 1, 0, queryPos)) == this.id() || source.isBlockOpaqueCube(tilePos.add(0, 1, 0, queryPos));
+        boolean hasBlockNegZ = source.getBlockId(tilePos.add(0, 0, -1, queryPos)) == this.id();
+        boolean hasBlockPosZ = source.getBlockId(tilePos.add(0, 0, 1, queryPos)) == this.id();
 
         float minX = 5 / 16.0f;
         float maxX = 11 / 16.0f;
@@ -73,24 +77,24 @@ public class BlockLogicRope
         if (hasBlockNegZ) minZ = 0;
         if (hasBlockPosZ) maxZ = 1;
 
-        return AABB.fromPool(minX, minY, minZ, maxX, maxY, maxZ);
+        return new AABBd(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         ItemStack heldItem = player.getHeldItem();
         if (heldItem != null && heldItem.getItem() instanceof ItemToolShears) {
             int meta = world.getBlockData(tilePos);
             int forceRope = (~meta) & MASK_ROPE_CONNECT;
             world.setBlockDataNotify(tilePos, forceRope | (meta & ~MASK_ROPE_CONNECT));
             heldItem.damageItem(1, player);
-            if (heldItem.stackSize <= 0){
+            if (heldItem.stackSize <= 0) {
                 player.destroyCurrentEquippedItem();
             }
             return true;
         }
 
-        if(heldItem == null) {
+        if (heldItem == null) {
             pickUpRope(world, tilePos, player);
             return true;
         }
@@ -98,60 +102,62 @@ public class BlockLogicRope
         return false;
     }
 
-    public void pickUpRope(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player) {
-    	if(world.isClientSide || world.getBlock(tilePos) != this.block) {
-    		return;
-    	}
-    	
-    	final int highestRope = tilePos.y;
-        int y = tilePos.y;
-    	// Find the position of the lowest rope
-    	while(tilePos.y > 0) {
-    		Block<?> block = world.getBlock(tilePos.down());
-    		if(block != this.block) {
-    			break;
-    		}
-    		y--;
-    	}
-    	final int lowestRope = y;
-    	
-    	// Determine how many ropes fit into the players inventory
-    	int freeSpace = 0;
-    	for(int i=0; i < player.inventory.mainInventory.length; i++) {
-    		ItemStack stack = player.inventory.mainInventory[i];
-    		if(stack == null) {
-    			freeSpace += Items.ROPE.getItemStackLimit(null);
-    			continue;
-    		}
-    		if(stack.getItem() == Items.ROPE) {
-    			freeSpace += Items.ROPE.getItemStackLimit(null) - stack.stackSize;	
-    		}
-    	}
-    	freeSpace = Math.min(freeSpace, 1);
-    	
-    	int ropesCollected = 0;
-    	for(y = lowestRope; y <= highestRope; y++) {
-    		if(ropesCollected >= freeSpace) {
-    			break;
-    		}
-    		world.setBlockIdNotify(tilePos, 0);
-    		ropesCollected++;
-    	}
-    	
-    	if(player.getGamemode().consumeBlocks()) {
-    		ItemStack stack = new ItemStack(Items.ROPE, ropesCollected);
-    		player.inventory.insertItem(stack, true);
-    		if(stack.stackSize > 0) {
-        		// this shouldnt happen
-        		player.dropPlayerItem(stack);
-        	}	
-    	}
-    	
-    	world.playBlockSoundEffect(player, tilePos.x + 0.5, highestRope + 0.5, tilePos.z + 0.5, block, EnumBlockSoundEffectType.PLACE);
+    public void pickUpRope(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player) {
+        if (world.isClientSide || world.getBlock(tilePos) != this.block) {
+            return;
+        }
+
+        TilePos queryPos = new TilePos();
+
+        final int highestRope = tilePos.y();
+        int y = tilePos.y();
+        // Find the position of the lowest rope
+        while (tilePos.y() > 0) {
+            Block<?> block = world.getBlock(tilePos.down(queryPos));
+            if (block != this.block) {
+                break;
+            }
+            y--;
+        }
+        final int lowestRope = y;
+
+        // Determine how many ropes fit into the players inventory
+        int freeSpace = 0;
+        for (int i = 0; i < player.inventory.mainInventory.length; i++) {
+            ItemStack stack = player.inventory.mainInventory[i];
+            if (stack == null) {
+                freeSpace += Items.ROPE.getItemStackLimit(null);
+                continue;
+            }
+            if (stack.getItem() == Items.ROPE) {
+                freeSpace += Items.ROPE.getItemStackLimit(null) - stack.stackSize;
+            }
+        }
+        freeSpace = Math.min(freeSpace, 1);
+
+        int ropesCollected = 0;
+        for (y = lowestRope; y <= highestRope; y++) {
+            if (ropesCollected >= freeSpace) {
+                break;
+            }
+            world.setBlockIdNotify(tilePos, 0);
+            ropesCollected++;
+        }
+
+        if (player.getGamemode().consumeBlocks()) {
+            ItemStack stack = new ItemStack(Items.ROPE, ropesCollected);
+            player.inventory.insertItem(stack, true);
+            if (stack.stackSize > 0) {
+                // this shouldnt happen
+                player.dropPlayerItem(stack);
+            }
+        }
+
+        world.playBlockSoundEffect(player, tilePos.x() + 0.5, highestRope + 0.5, tilePos.z() + 0.5, this.block, EnumBlockSoundEffectType.PLACE);
     }
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Items.ROPE) };
+        return new ItemStack[]{new ItemStack(Items.ROPE)};
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRotatable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRotatable.java
index cfb2e43f9..7b699fbe7 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicRotatable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicRotatable.java
@@ -6,16 +6,17 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class BlockLogicRotatable extends BlockLogic {
     public static final int MASK_DIRECTION = 0b0000_0111;
+
     public BlockLogicRotatable(@NotNull Block<?> block, @NotNull Material material) {
         super(block, material);
     }
 
-    public static @NotNull Direction getDirectionFromMeta(int meta)
-    {
+    public static @NotNull Direction getDirectionFromMeta(int meta) {
         return Direction.getDirectionById(meta & MASK_DIRECTION);
     }
 
@@ -24,36 +25,36 @@ public abstract class BlockLogicRotatable extends BlockLogic {
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         world.setBlockDataNotify(tilePos, mob.getHorizontalPlacementDirection(side).getOpposite().getId());
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if (!side.isHorizontal()) side = Side.SOUTH;
         world.setBlockDataNotify(tilePos, BlockLogicRotatable.setDirection(0, side.getDirection()));
     }
 
-    public static void setDefaultDirection(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        if(world.isClientSide) {
+    public static void setDefaultDirection(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (world.isClientSide) {
             return;
         }
-        int bN = world.getBlockId(tilePos.add(Direction.NORTH));
-        int bS = world.getBlockId(tilePos.add(Direction.SOUTH));
-        int bW = world.getBlockId(tilePos.add(Direction.WEST));
-        int bE = world.getBlockId(tilePos.add(Direction.EAST));
+        TilePos queryPos = new TilePos();
+        int bN = world.getBlockId(tilePos.north(queryPos));
+        int bS = world.getBlockId(tilePos.south(queryPos));
+        int bW = world.getBlockId(tilePos.west(queryPos));
+        int bE = world.getBlockId(tilePos.east(queryPos));
         Direction direction = Direction.NORTH;
-        if(Blocks.solid[bN] && !Blocks.solid[bS]) {
+        if (Blocks.solid[bN] && !Blocks.solid[bS]) {
             direction = Direction.SOUTH;
         }
-        if(Blocks.solid[bS] && !Blocks.solid[bN]) {
+        if (Blocks.solid[bS] && !Blocks.solid[bN]) {
             direction = Direction.NORTH;
         }
-        if(Blocks.solid[bW] && !Blocks.solid[bE]) {
+        if (Blocks.solid[bW] && !Blocks.solid[bE]) {
             direction = Direction.EAST;
         }
-        if(Blocks.solid[bE] && !Blocks.solid[bW]) {
+        if (Blocks.solid[bE] && !Blocks.solid[bW]) {
             direction = Direction.WEST;
         }
         world.setBlockDataNotify(tilePos, setDirection(world.getBlockData(tilePos), direction));
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSand.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSand.java
index ec6802be9..fd717f85d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSand.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSand.java
@@ -1,10 +1,11 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.entity.EntityFallingBlock;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
@@ -13,40 +14,43 @@ public class BlockLogicSand extends BlockLogic {
     public static boolean fallInstantly = false;
 
     public BlockLogicSand(@NotNull Block<?> block) {
-        super(block, Material.sand);
+        super(block, Materials.SAND);
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
+	public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos)
     {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay());
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id)
+	public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id)
     {
         world.scheduleBlockUpdate(tilePos, this.block.id(), tickDelay());
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+	public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         tryToFall(world, tilePos);
     }
 
-    private void tryToFall(@NotNull World world, @NotNull TilePos tilePos) {
-        if(canFallBelow(world, tilePos.down()) && tilePos.y >= 0) {
+    private void tryToFall(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        if(canFallBelow(world, tilePos.down(queryPos)) && tilePos.y() >= 0) {
             byte radius = 32;
-            if(fallInstantly || !world.areBlocksLoaded(tilePos.add(-radius, -radius, -radius), tilePos.add(radius, radius, radius))) {
+            if(fallInstantly || !world.areBlocksLoaded(tilePos.add(-radius, -radius, -radius, new TilePos()), tilePos.add(radius, radius, radius, new TilePos()))) {
                 world.setBlockIdNotify(tilePos, 0);
-                TilePos p = new TilePos(tilePos.x, tilePos.y - 1, tilePos.z);
-                while (canFallBelow(world, p) && p.y > 0) {
-                    p.y--;
+                int checkX = tilePos.x();
+                int checkY = tilePos.y() - 1;
+                int checkZ = tilePos.z();
+                while (canFallBelow(world, queryPos.set(checkX, checkY, checkZ)) && checkY > 0) {
+                    checkY--;
                 }
-                if(p.y > 0) {
-                    world.setBlockIdNotify(p, this.block.id());
+                if(checkY > 0) {
+                    world.setBlockIdNotify(queryPos.set(checkX, checkY, checkZ), this.block.id());
                 }
             } else {
-                EntityFallingBlock entityFallingBlock = new EntityFallingBlock(world, tilePos.x + 0.5, tilePos.y + 0.5, tilePos.z + 0.5, this.block.id(), 0, null);
+                EntityFallingBlock entityFallingBlock = new EntityFallingBlock(world, tilePos.x() + 0.5, tilePos.y() + 0.5, tilePos.z() + 0.5, this.block.id(), 0, null);
                 world.entityJoinedWorld(entityFallingBlock);
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBase.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBase.java
index 5c0d0f6fc..1ac8e43aa 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBase.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBase.java
@@ -9,57 +9,56 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public abstract class BlockLogicSaplingBase extends BlockLogicFlower implements IBonemealable
-{
-	public boolean canGrowOnSand = false;
+public abstract class BlockLogicSaplingBase extends BlockLogicFlower implements IBonemealable {
+    public boolean canGrowOnSand = false;
 
-	public BlockLogicSaplingBase(@NotNull Block<?> block) {
+    public BlockLogicSaplingBase(@NotNull Block<?> block) {
         super(block);
         float f = 0.4F;
         setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
     }
 
-	@Override
-	public boolean mayPlaceOn(int blockId)
-    {
+    @Override
+    public boolean mayPlaceOn(int blockId) {
         return blockId == Blocks.SAND.id() || super.mayPlaceOn(blockId);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-        if(world.isClientSide) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
 
-        if(!this.canGrowOnSand) {
-            if(world.getBlockId(tilePos.down()) == Blocks.SAND.id()) {
+        TilePos queryPos = new TilePos();
+
+        if (!this.canGrowOnSand) {
+            if (world.getBlockId(tilePos.down(queryPos)) == Blocks.SAND.id()) {
                 world.setBlockIdNotify(tilePos, Blocks.DEADBUSH.id());
-            }	
+            }
         }
 
         super.updateTick(world, tilePos, rand, isRandomTick);
         int growthRate = 30;
-        if(world.getSeasonManager().getCurrentSeason() != null){
+        if (world.getSeasonManager().getCurrentSeason() != null) {
             growthRate = MathHelper.floor_float(growthRate / world.getSeasonManager().getCurrentSeason().cropGrowthFactor);
         }
-        if(world.getBlockLightValue(tilePos.up()) >= 9 && rand.nextInt(growthRate) == 0) {
+        if (world.getBlockLightValue(tilePos.up(queryPos)) >= 9 && rand.nextInt(growthRate) == 0) {
             int l = world.getBlockData(tilePos);
-            if((l & 8) == 0)
-            {
+            if ((l & 8) == 0) {
                 world.setBlockDataNotify(tilePos, l | 8);
-            } else
-            {
+            } else {
                 growTree(world, tilePos, rand);
             }
         }
     }
-    
+
     @Override
-    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit){
-        if(!world.isClientSide) {
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
+        if (!world.isClientSide) {
             growTree(world, tilePos, world.rand);
             if (player == null || player.getGamemode().consumeBlocks()) {
                 itemStack.stackSize--;
@@ -68,5 +67,5 @@ public abstract class BlockLogicSaplingBase extends BlockLogicFlower implements
         return true;
     }
 
-    public abstract void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random);
+    public abstract void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random);
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBirch.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBirch.java
index 3b5ae3ebd..fa5d545e0 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBirch.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingBirch.java
@@ -3,30 +3,26 @@ package net.minecraft.core.block;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTree;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingBirch extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingBirch extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingBirch(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingBirch(@NotNull Block<?> block) {
         super(block);
     }
 
 
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
 
         world.setBlockId(tilePos, 0);
 
         WorldFeature tree = new WorldFeatureTree(Blocks.LEAVES_BIRCH.id(), Blocks.LOG_BIRCH.id(), 5);
 
-        if(!tree.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
+        if (!tree.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
             world.setBlockId(tilePos, id());
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCacao.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCacao.java
index 7f13e5e20..6f3846cea 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCacao.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCacao.java
@@ -3,27 +3,24 @@ package net.minecraft.core.block;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.WorldFeature;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTree;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingCacao extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingCacao extends BlockLogicSaplingBase {
 
-    public BlockLogicSaplingCacao(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingCacao(@NotNull Block<?> block) {
         super(block);
     }
 
     @Override
-    public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random) {
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
         WorldFeature treeSmall = new WorldFeatureTree(Blocks.LEAVES_CACAO.id(), Blocks.LOG_OAK_MOSSY.id(), 4);
         world.setBlockId(tilePos, 0);
 
-        if(!treeSmall.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
-                world.setBlockId(tilePos, id());
+        if (!treeSmall.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
+            world.setBlockId(tilePos, id());
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCherry.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCherry.java
index adc4da5b8..baa36b440 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCherry.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingCherry.java
@@ -6,27 +6,23 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.WorldFeature;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureCherryTreeFancy;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeCherry;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class BlockLogicSaplingCherry extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingCherry extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingCherry(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingCherry(@NotNull Block<?> block) {
         super(block);
     }
 
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
-        WorldFeature treeBig  = new WorldFeatureCherryTreeFancy(Blocks.LEAVES_CHERRY.id(), Blocks.LOG_CHERRY.id());
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
+        WorldFeature treeBig = new WorldFeatureCherryTreeFancy(Blocks.LEAVES_CHERRY.id(), Blocks.LOG_CHERRY.id());
         WorldFeature treeSmall = new WorldFeatureTreeCherry(Blocks.LEAVES_CHERRY.id(), Blocks.LOG_CHERRY.id(), 4);
         world.setBlockId(tilePos, 0);
 
-        if(!treeSmall.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
-            if(!treeBig.place(world, random, tilePos.x, tilePos.y, tilePos.z)) {
+        if (!treeSmall.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
+            if (!treeBig.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
                 world.setBlockId(tilePos, id());
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingEucalyptus.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingEucalyptus.java
index d0bc4fe27..5a5341728 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingEucalyptus.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingEucalyptus.java
@@ -3,29 +3,25 @@ package net.minecraft.core.block;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeEucalyptus;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingEucalyptus extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingEucalyptus extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingEucalyptus(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingEucalyptus(@NotNull Block<?> block) {
         super(block);
     }
-    
+
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
 
         world.setBlockId(tilePos, 0);
 
         WorldFeature tree = new WorldFeatureTreeEucalyptus(Blocks.LEAVES_EUCALYPTUS.id(), Blocks.LOG_EUCALYPTUS.id());
         tree.init(1.0D, 1.0D, 1.0D);
-        if(!tree.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
+        if (!tree.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
             world.setBlockId(tilePos, id());
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingOak.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingOak.java
index 98cca61b1..441e77d3c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingOak.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingOak.java
@@ -4,29 +4,25 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTree;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeFancy;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingOak extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingOak extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingOak(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingOak(@NotNull Block<?> block) {
         super(block);
     }
-    
+
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
-    	WorldFeature treeBig = new WorldFeatureTreeFancy(Blocks.LEAVES_OAK.id(), Blocks.LOG_OAK.id());
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
+        WorldFeature treeBig = new WorldFeatureTreeFancy(Blocks.LEAVES_OAK.id(), Blocks.LOG_OAK.id());
         WorldFeature treeSmall = new WorldFeatureTree(Blocks.LEAVES_OAK.id(), Blocks.LOG_OAK.id(), 4);
-    	world.setBlockId(tilePos, 0);
+        world.setBlockId(tilePos, 0);
 
-        if(!treeSmall.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
-            if(!treeBig.place(world, random, tilePos.x, tilePos.y, tilePos.z)) {
+        if (!treeSmall.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
+            if (!treeBig.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
                 world.setBlockId(tilePos, id());
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPalm.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPalm.java
index ca9bf7b35..f6b7351f0 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPalm.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPalm.java
@@ -5,21 +5,22 @@ import java.util.Random;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreePalm;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicSaplingPalm extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingPalm(@NotNull Block<?> block) {
-		super(block);
-		
-		this.canGrowOnSand = true;
-	}
-	
-	@Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random) {
-    	boolean big = world.getBlockId(tilePos.down()) != Blocks.SAND.id();
-    	
-    	new WorldFeatureTreePalm(Blocks.LOG_PALM, Blocks.LEAVES_PALM, big, true, false).place(world, random, tilePos.x, tilePos.y, tilePos.z);
-	}
+    public BlockLogicSaplingPalm(@NotNull Block<?> block) {
+        super(block);
+
+        this.canGrowOnSand = true;
+    }
+
+    @Override
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
+        boolean big = world.getBlockId(tilePos.down(new TilePos())) != Blocks.SAND.id();
+
+        new WorldFeatureTreePalm(Blocks.LOG_PALM, Blocks.LEAVES_PALM, big, true, false).place(world, random, tilePos.x(), tilePos.y(), tilePos.z());
+    }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPine.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPine.java
index 595fd82e4..ce99a00f2 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPine.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingPine.java
@@ -5,48 +5,43 @@ import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeTaigaBushy
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeTaigaTall;
 import net.minecraft.core.world.generate.feature.WorldFeature;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingPine extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingPine extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingPine(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingPine(@NotNull Block<?> block) {
         super(block);
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
-        if(world.isClientSide) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        if (world.isClientSide) {
             return;
         }
         super.updateTick(world, tilePos, rand, isRandomTick);
         int growthRate = 30;
-        if(world.getBlockLightValue(tilePos.up()) >= 9 && rand.nextInt(growthRate) == 0) {
+        if (world.getBlockLightValue(tilePos.up(new TilePos())) >= 9 && rand.nextInt(growthRate) == 0) {
             int l = world.getBlockData(tilePos);
-            if((l & 8) == 0)
-            {
+            if ((l & 8) == 0) {
                 world.setBlockDataNotify(tilePos, l | 8);
-            } else
-            {
+            } else {
                 growTree(world, tilePos, rand);
             }
         }
     }
-    
+
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
-        WorldFeature treeBig  = new WorldFeatureTreeTaigaTall(Blocks.LEAVES_PINE.id(), Blocks.LOG_PINE.id());
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
+        WorldFeature treeBig = new WorldFeatureTreeTaigaTall(Blocks.LEAVES_PINE.id(), Blocks.LOG_PINE.id());
         WorldFeature treeSmall = new WorldFeatureTreeTaigaBushy(Blocks.LEAVES_PINE.id(), Blocks.LOG_PINE.id());
-        
-    	world.setBlockId(tilePos, 0);
 
-        if(!treeSmall.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
-            if(!treeBig.place(world, random, tilePos.x, tilePos.y, tilePos.z)) {
+        world.setBlockId(tilePos, 0);
+
+        if (!treeSmall.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
+            if (!treeBig.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
                 world.setBlockId(tilePos, id());
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingRetro.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingRetro.java
index 7582d6478..653b78f5f 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingRetro.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingRetro.java
@@ -4,30 +4,26 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTree;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeFancy;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingRetro extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingRetro extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingRetro(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingRetro(@NotNull Block<?> block) {
         super(block);
     }
 
 
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
-        WorldFeature treeBig  = new WorldFeatureTreeFancy(Blocks.LEAVES_OAK_RETRO.id(), Blocks.LOG_OAK.id());
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
+        WorldFeature treeBig = new WorldFeatureTreeFancy(Blocks.LEAVES_OAK_RETRO.id(), Blocks.LOG_OAK.id());
         WorldFeature treeSmall = new WorldFeatureTree(Blocks.LEAVES_OAK_RETRO.id(), Blocks.LOG_OAK.id(), 4);
         world.setBlockId(tilePos, 0);
 
-        if(!treeSmall.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
-            if(!treeBig.place(world, random, tilePos.x, tilePos.y, tilePos.z)) {
+        if (!treeSmall.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
+            if (!treeBig.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
                 world.setBlockId(tilePos, id());
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingShrub.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingShrub.java
index 854c9d827..a6907c3b7 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingShrub.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingShrub.java
@@ -3,29 +3,25 @@ package net.minecraft.core.block;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeShrub;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingShrub extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingShrub extends BlockLogicSaplingBase {
 
-	public BlockLogicSaplingShrub(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingShrub(@NotNull Block<?> block) {
         super(block);
     }
-    
+
     @Override
-	public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
 
         world.setBlockId(tilePos, 0);
 
         WorldFeature tree = new WorldFeatureTreeShrub(Blocks.LEAVES_SHRUB.id(), Blocks.LOG_OAK.id());
-        
-        if(!tree.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
+
+        if (!tree.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
             world.setBlockId(tilePos, id());
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingThorn.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingThorn.java
index 128b04eb4..f34a16586 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingThorn.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSaplingThorn.java
@@ -3,29 +3,25 @@ package net.minecraft.core.block;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeThorn;
 import net.minecraft.core.world.generate.feature.WorldFeature;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSaplingThorn extends BlockLogicSaplingBase
-{
+public class BlockLogicSaplingThorn extends BlockLogicSaplingBase {
 
-    public BlockLogicSaplingThorn(@NotNull Block<?> block)
-    {
+    public BlockLogicSaplingThorn(@NotNull Block<?> block) {
         super(block);
     }
 
 
     @Override
-    public void growTree(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random random)
-    {
+    public void growTree(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random random) {
 
         world.setBlockId(tilePos, 0);
         WorldFeature treeFeature = new WorldFeatureTreeThorn(1, Blocks.LOG_THORN.id(), 0, Blocks.LEAVES_THORN.id(), 0);
 
-        if(!treeFeature.place(world, random, tilePos.x, tilePos.y, tilePos.z))
-        {
+        if (!treeFeature.place(world, random, tilePos.x(), tilePos.y(), tilePos.z())) {
             world.setBlockId(tilePos, id());
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSeat.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSeat.java
index 62cbb55e3..5e0f1cdd4 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSeat.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSeat.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntitySeat;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
@@ -12,20 +12,21 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicSeat extends BlockLogic
 {
     public BlockLogicSeat(@NotNull Block<?> block) {
-        super(block, Material.wood);
+        super(block, Materials.WOOD);
         setBlockBounds(0f, 0f, 0f, 1f, 9f / 16f, 1f);
         block.withEntity(() -> new TileEntitySeat(block));
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        if (world.isBlockNormalCube(tilePos.up())) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        if (world.isBlockNormalCube(tilePos.up(new TilePos()))) {
             return false;
         }
         if (!world.isClientSide) {
@@ -39,7 +40,7 @@ public class BlockLogicSeat extends BlockLogic
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         if (!world.isClientSide) {
             TileEntitySeat tileEntity = (TileEntitySeat) world.getTileEntity(tilePos);
             if (tileEntity != null && tileEntity.getPassenger() != null) {
@@ -60,7 +61,7 @@ public class BlockLogicSeat extends BlockLogic
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSign.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSign.java
index b18509550..4333eb06e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSign.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSign.java
@@ -4,6 +4,7 @@ import net.minecraft.core.achievement.Achievements;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.entity.TileEntitySign;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
@@ -13,15 +14,16 @@ import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicSign extends BlockLogic implements IPaintable
-{
+public class BlockLogicSign extends BlockLogic implements IPaintable {
     public static final int MASK_SIDE = 0b0000_1111;
     public static final int SIDE_NORTH = 2;
     public static final int SIDE_SOUTH = 3;
@@ -29,8 +31,8 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
     public static final int SIDE_EAST = 5;
     public final boolean isFreeStanding;
 
-	public BlockLogicSign(@NotNull Block<?> block, boolean isFreeStanding) {
-        super(block, Material.wood);
+    public BlockLogicSign(@NotNull Block<?> block, boolean isFreeStanding) {
+        super(block, Materials.WOOD);
         this.isFreeStanding = isFreeStanding;
         float f = 0.25F;
         float f1 = 1.0F;
@@ -39,13 +41,13 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        if(this.isFreeStanding) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        if (this.isFreeStanding) {
             return getBounds();
         }
         float bottom = 4.5f / 16f;
@@ -53,33 +55,31 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
         float width = 1.0f;
         float thickness = 2.0f / 16f;
         return switch (source.getBlockData(tilePos) & MASK_SIDE) {
-            case SIDE_NORTH -> AABB.fromPool(0.0F, bottom, 1.0F - thickness, width, top, 1.0F);
-            case SIDE_SOUTH -> AABB.fromPool(0.0F, bottom, 0.0F, width, top, thickness);
-            case SIDE_WEST -> AABB.fromPool(1.0F - thickness, bottom, 0.0F, 1.0F, top, width);
-            case SIDE_EAST -> AABB.fromPool(0.0F, bottom, 0.0F, thickness, top, width);
-            default -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+            case SIDE_NORTH -> new AABBd(0.0F, bottom, 1.0F - thickness, width, top, 1.0F);
+            case SIDE_SOUTH -> new AABBd(0.0F, bottom, 0.0F, width, top, thickness);
+            case SIDE_WEST -> new AABBd(1.0F - thickness, bottom, 0.0F, 1.0F, top, width);
+            case SIDE_EAST -> new AABBd(0.0F, bottom, 0.0F, thickness, top, width);
+            default -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         };
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public @NotNull Side getAttachedSide(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull Side getAttachedSide(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return switch (source.getBlockData(tilePos) & MASK_SIDE) {
             case SIDE_NORTH -> Side.SOUTH;
             case SIDE_SOUTH -> Side.NORTH;
@@ -90,24 +90,23 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id)
-    {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
+        TilePos queryPos = new TilePos();
         boolean isUnstable = false;
-        if(this.isFreeStanding) {
-            if(!world.getBlockMaterial(tilePos.down()).isSolid()) {
+        if (this.isFreeStanding) {
+            if (!world.getBlockMaterial(tilePos.down(queryPos)).isSolid()) {
                 isUnstable = true;
             }
         } else {
             isUnstable = switch (world.getBlockData(tilePos) & MASK_SIDE) {
-                case SIDE_NORTH -> !world.getBlockMaterial(tilePos.add(Direction.SOUTH)).isSolid();
-                case SIDE_SOUTH -> !world.getBlockMaterial(tilePos.add(Direction.NORTH)).isSolid();
-                case SIDE_WEST -> !world.getBlockMaterial(tilePos.add(Direction.EAST)).isSolid();
-                case SIDE_EAST -> !world.getBlockMaterial(tilePos.add(Direction.WEST)).isSolid();
+                case SIDE_NORTH -> !world.getBlockMaterial(tilePos.add(Direction.SOUTH, queryPos)).isSolid();
+                case SIDE_SOUTH -> !world.getBlockMaterial(tilePos.add(Direction.NORTH, queryPos)).isSolid();
+                case SIDE_WEST -> !world.getBlockMaterial(tilePos.add(Direction.EAST, queryPos)).isSolid();
+                case SIDE_EAST -> !world.getBlockMaterial(tilePos.add(Direction.WEST, queryPos)).isSolid();
                 default -> true;
             };
         }
-        if(isUnstable)
-        {
+        if (isUnstable) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
@@ -116,12 +115,12 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
 
     @Override
     public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
-        return new ItemStack[] { new ItemStack(Items.SIGN) };
+        return new ItemStack[]{new ItemStack(Items.SIGN)};
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        TileEntitySign signEntity = (TileEntitySign)world.getTileEntity(tilePos);
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        TileEntitySign signEntity = (TileEntitySign) world.getTileEntity(tilePos);
         if (signEntity != null) {
             if (signEntity.isLocked()) return false;
             ItemStack heldItem = player.getHeldItem();
@@ -146,12 +145,12 @@ public class BlockLogicSign extends BlockLogic implements IPaintable
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         world.setBlockIdRaw(tilePos, this.isFreeStanding ? Blocks.SIGN_POST_PLANKS_OAK_PAINTED.id() : Blocks.SIGN_WALL_PLANKS_OAK_PAINTED.id());
         world.setBlockDataNotify(tilePos, color.blockMeta << 4 | (world.getBlockData(tilePos) & MASK_SIDE));
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSignPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSignPainted.java
index 6dc963ac4..e3f523833 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSignPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSignPainted.java
@@ -6,7 +6,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -32,12 +32,12 @@ public class BlockLogicSignPainted extends BlockLogicSign implements IPainted{
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockDataNotify(tilePos, stripColorFromMetadata(world.getBlockData(tilePos)));
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         world.setBlockDataNotify(tilePos, color.blockMeta << 4 | stripColorFromMetadata(world.getBlockData(tilePos)));
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlab.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlab.java
index 3a7dc9e2d..be8881bb9 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlab.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlab.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.material.MaterialColor;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -14,13 +15,15 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.block.ItemBlockSlab;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -40,7 +43,7 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     public BlockLogicSlab(@NotNull Block<?> block, @NotNull Block<?> modelBlock, int modelBlockMetadata) {
-    	super(block, Material.stone);
+    	super(block, Materials.STONE);
         this.modelBlock = modelBlock;
         this.modelBlockMetadata = modelBlockMetadata;
         block.withLightBlock(1);
@@ -59,11 +62,11 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return switch (source.getBlockData(tilePos) & MASK_STATE) {
-            case STATE_LOWER -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
-            case STATE_DOUBLE -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
-            default -> AABB.fromPool(0.0F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F);
+            case STATE_LOWER -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
+            case STATE_DOUBLE -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+            default -> new AABBd(0.0F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F);
         };
     }
 
@@ -74,19 +77,19 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public boolean renderAsNormalBlockOnCondition(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public boolean renderAsNormalBlockOnCondition(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int meta = source.getBlockData(tilePos);
         return (meta & MASK_STATE) == STATE_DOUBLE;
     }
 
     @Override
-    public boolean canPlaceOnSurfaceOnCondition(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canPlaceOnSurfaceOnCondition(@NotNull World world, @NotNull TilePosc tilePos) {
         int meta = world.getBlockData(tilePos);
         return (meta & MASK_STATE) != STATE_LOWER;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int state = world.getBlockData(tilePos) & MASK_STATE;
         return switch (side) {
             case TOP -> state == STATE_UPPER || state == STATE_DOUBLE ? FullSupport.INSTANCE : PartialSupport.INSTANCE;
@@ -125,8 +128,8 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public void onEntityInside(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity, @NotNull Vec3 velocity) {
-        this.modelBlock.onEntityInside(world, tilePos, entity, velocity);
+    public void onEntityInside(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity, @NotNull Vector3d velocityDirection) {
+        this.modelBlock.onEntityInside(world, tilePos, entity, velocityDirection);
     }
 
     @Override
@@ -142,29 +145,30 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        return world.getBlockId(tilePos.down()) == id() ||
-                world.getBlockId(tilePos.up()) == id() ||
+	public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        return world.getBlockId(tilePos.down(queryPos)) == id() ||
+                world.getBlockId(tilePos.up(queryPos)) == id() ||
                 super.canPlaceAt(world, tilePos);
     }
 
     @Override
-    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity walker) {
+    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity walker) {
         this.modelBlock.onEntityWalkedOn(world, tilePos, walker);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+	public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         this.modelBlock.updateTick(world, tilePos, rand, false);
     }
 
     @Override
-    public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePosc tilePos) {
         this.modelBlock.onDestroyedByExplosion(world, tilePos);
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
     	Direction dir = mob.getVerticalPlacementDirection(side, yHit);
     	if(dir == Direction.DOWN) {
             world.setBlockDataNotify(tilePos, 0);
@@ -175,7 +179,7 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if(side == Side.TOP) {
             world.setBlockDataNotify(tilePos, 2);
         } else {
@@ -184,7 +188,7 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         onNeighborChanged(world, tilePos, 0);
         this.modelBlock.onPlacedByWorld(world, tilePos);
     }
@@ -195,22 +199,22 @@ public class BlockLogicSlab extends BlockLogic
     }
 
     @Override
-    public float getBrightness(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public float getBrightness(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return this.modelBlock.getBrightness(source, tilePos);
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         this.modelBlock.onAttacked(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         return this.modelBlock.onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+	public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         this.modelBlock.animationTick(world, tilePos, rand);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPaintable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPaintable.java
index b32e5fa16..fe9294690 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPaintable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPaintable.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicSlabPaintable extends BlockLogicSlab implements IPaintable {
@@ -11,7 +11,7 @@ public class BlockLogicSlabPaintable extends BlockLogicSlab implements IPaintabl
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.SLAB_PLANKS_PAINTED.id(), meta);
         Blocks.SLAB_PLANKS_PAINTED.getLogic().setColor(world, tilePos, color);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPainted.java
index f1d9b455b..deef4ed75 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSlabPainted.java
@@ -7,7 +7,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,18 +19,18 @@ public class BlockLogicSlabPainted extends BlockLogicSlab implements IPainted
 	}
 
 	@Override
-	public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+	public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
 		return itemStack.getMetadata();
 	}
 
 	@Override
-	public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, Mob mob, double xHit, double yHit) {
+	public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
 		int meta = mob.getVerticalPlacementDirection(side, yHit) == Direction.UP ? 2 : 0;
 		world.setBlockDataNotify(tilePos, meta | (world.getBlockData(tilePos) & 0xF0));
 	}
 
 	@Override
-	public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+	public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
 		int meta = side == Side.TOP ? 2 : 0;
 		world.setBlockDataNotify(tilePos, meta | (world.getBlockData(tilePos) & 0xF0));
 	}
@@ -51,13 +51,13 @@ public class BlockLogicSlabPainted extends BlockLogicSlab implements IPainted
 	}
 
 	@Override
-	public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+	public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
 		final int meta = world.getBlockData(tilePos);
 		world.setBlockIdDataNotify(tilePos, Blocks.PLANKS_OAK.id(), meta & 0xF);
 	}
 
 	@Override
-	public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+	public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
 		IPainted.super.setColor(world, tilePos, color);
 	}
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSnow.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSnow.java
index b963a6726..2f9fb5b45 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSnow.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSnow.java
@@ -1,13 +1,13 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -17,12 +17,12 @@ public class BlockLogicSnow extends BlockLogic
 {
 
 	public BlockLogicSnow(Block<?> block) {
-        super(block, Material.snow);
+        super(block, Materials.SNOW);
         block.setTicking(true);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+	public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         if(world.getSavedLightValue(LightLayer.Block, tilePos) > 11) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSoulSand.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSoulSand.java
index 2ffc3853a..b93cf2b38 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSoulSand.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSoulSand.java
@@ -1,30 +1,31 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.util.phys.AABB;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicSoulSand extends BlockLogic
 {
 
     public BlockLogicSoulSand(Block<?> block)
     {
-        super(block, Material.soulsand);
+        super(block, Materials.SOUL_SAND);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         double f = 2/16d;
-        return AABB.fromPool(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1, tilePos.y + 1 - f, tilePos.z + 1);
+        return new AABBd(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x() + 1, tilePos.y() + 1 - f, tilePos.z() + 1);
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
         entity.xd *= 0.4D;
         entity.zd *= 0.4D;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSpikes.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSpikes.java
index 3737c22a1..6f6fc42de 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSpikes.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSpikes.java
@@ -14,12 +14,13 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicSpikes extends BlockLogic
 {
@@ -33,7 +34,7 @@ public class BlockLogicSpikes extends BlockLogic
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         if (world.isClientSide) {
             return;
         }
@@ -51,7 +52,7 @@ public class BlockLogicSpikes extends BlockLogic
     }
 
 	@Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+	public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
 		if(world.isClientSide) {
 			return;
 		}
@@ -73,13 +74,13 @@ public class BlockLogicSpikes extends BlockLogic
 
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         double thickness = 3/16d;
-        return AABB.fromPool(tilePos.x, tilePos.y, tilePos.z, tilePos.x + 1,tilePos.y + thickness, tilePos.z + 1);
+        return new AABBd(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x() + 1,tilePos.y() + thickness, tilePos.z() + 1);
     }
 
     @Override
-    public void onEntityCollision(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity) {
+    public void onEntityCollision(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity) {
         int metaData = world.getBlockData(tilePos);
         if(isSpikesUp(metaData)) {
             if (entity instanceof Mob) {
@@ -102,7 +103,7 @@ public class BlockLogicSpikes extends BlockLogic
     }
 
     @Override
-    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePos tilePos) {
+    public boolean collidesWithEntity(@NotNull Entity entity, @NotNull World world, @NotNull TilePosc tilePos) {
         return !(entity instanceof EntityItem);
     }
     
@@ -122,7 +123,7 @@ public class BlockLogicSpikes extends BlockLogic
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side == Side.BOTTOM ? FullSupport.INSTANCE : PartialSupport.INSTANCE;
     }
 }
\ No newline at end of file
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSponge.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSponge.java
index 58c50d1ed..2405b7b65 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSponge.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSponge.java
@@ -1,49 +1,44 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.Dimension;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
-public class BlockLogicSponge extends BlockLogic
-{
+public class BlockLogicSponge extends BlockLogic {
     final boolean isWet;
-	public BlockLogicSponge(@NotNull Block<?> block, boolean isWet)
-    {
-        super(block, Material.sponge);
+
+    public BlockLogicSponge(@NotNull Block<?> block, boolean isWet) {
+        super(block, Materials.SPONGE);
         this.isWet = isWet;
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         super.onPlacedByWorld(world, tilePos);
-        if((world.dimension == Dimension.NETHER || inHot(world, tilePos)) && this.isWet){
+        if ((world.dimension == Dimension.NETHER || inHot(world, tilePos)) && this.isWet) {
             world.setBlockIdNotify(tilePos, Blocks.SPONGE_DRY.id());
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x + 0.5D, tilePos.y + 0.5D, tilePos.z + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
-            for(int l = 0; l < 8; l++)
-            {
-                world.spawnParticle("largesmoke", (double)tilePos.x + Math.random(), (double)tilePos.y + Math.random(), (double)tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 0);
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, tilePos.x() + 0.5D, tilePos.y() + 0.5D, tilePos.z() + 0.5D, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
+            for (int l = 0; l < 8; l++) {
+                world.spawnParticle("largesmoke", (double) tilePos.x() + Math.random(), (double) tilePos.y() + Math.random(), (double) tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 0);
             }
         }
         final byte radius = 2;
-        if(!this.isWet && inWater(world, tilePos)) {
-            TilePos p = new TilePos(tilePos);
-            for (int x = tilePos.x - radius; x <= tilePos.x + radius; x++) {
-                for (int y = tilePos.y - radius; y <= tilePos.y + radius; y++) {
-                    for (int z = tilePos.z - radius; z <= tilePos.z + radius; z++) {
-                        p.x = tilePos.x;
-                        p.y = tilePos.y;
-                        p.z = tilePos.z;
-                        if (Blocks.hasTag(world.getBlockId(p), BlockTags.IS_WATER)) {
-                            world.setBlockIdNotify(p, 0);
+        if (!this.isWet && inWater(world, tilePos)) {
+            TilePos queryPos = new TilePos();
+            for (queryPos.x = tilePos.x() - radius; queryPos.x <= tilePos.x() + radius; queryPos.x++) {
+                for (queryPos.y = tilePos.y() - radius; queryPos.y <= tilePos.y() + radius; queryPos.y++) {
+                    for (queryPos.z = tilePos.z() - radius; queryPos.z <= tilePos.z() + radius; queryPos.z++) {
+                        if (Blocks.hasTag(world.getBlockId(queryPos), BlockTags.IS_WATER)) {
+                            world.setBlockIdNotify(queryPos, 0);
 
                         }
                     }
@@ -54,37 +49,35 @@ public class BlockLogicSponge extends BlockLogic
     }
 
 
-    public boolean inWater(@NotNull World world, @NotNull TilePos tilePos){
+    public boolean inWater(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         for (int i = 0; i < Direction.directions.length; i++) {
             Direction dir = Direction.directions[i];
-            Block<?> b = world.getBlock(tilePos.add(dir));
+            Block<?> b = world.getBlock(tilePos.add(dir, queryPos));
             if (Blocks.hasTag(b, BlockTags.IS_WATER)) return true;
         }
         return false;
     }
 
-    public boolean inHot(@NotNull World world, @NotNull TilePos tilePos){
+    public boolean inHot(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         for (int i = 0; i < Direction.directions.length; i++) {
             Direction dir = Direction.directions[i];
-            Block<?> b = world.getBlock(tilePos.add(dir));
+            Block<?> b = world.getBlock(tilePos.add(dir, queryPos));
             if (b == Blocks.COBBLE_NETHERRACK_IGNEOUS || Blocks.hasTag(b, BlockTags.IS_LAVA)) return true;
         }
         return false;
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data)
-    {
-        if(!this.isWet) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (!this.isWet) {
             byte radius = 2;
-            TilePos p = new TilePos(tilePos);
-            for (int x = tilePos.x - radius; x <= tilePos.x + radius; x++) {
-                for (int y = tilePos.y - radius; y <= tilePos.y + radius; y++) {
-                    for (int z = tilePos.z - radius; z <= tilePos.z + radius; z++) {
-                        p.x = x;
-                        p.y = y;
-                        p.z = z;
-                        world.notifyBlocksOfNeighborChange(p, world.getBlockId(p));
+            TilePos queryPos = new TilePos(tilePos);
+            for (queryPos.x = tilePos.x() - radius; queryPos.x <= tilePos.x() + radius; queryPos.x++) {
+                for (queryPos.y = tilePos.y() - radius; queryPos.y <= tilePos.y() + radius; queryPos.y++) {
+                    for (queryPos.z = tilePos.z() - radius; queryPos.z <= tilePos.z() + radius; queryPos.z++) {
+                        world.notifyBlocksOfNeighborChange(queryPos, world.getBlockId(queryPos));
                     }
 
                 }
@@ -94,28 +87,28 @@ public class BlockLogicSponge extends BlockLogic
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         if (this.isWet) {
             Side side = Side.sides[rand.nextInt(6)]; // Get random side
-            if (side == Side.TOP || world.isBlockOpaqueCube(tilePos.add(side.getDirection()))) return;
+            if (side == Side.TOP || world.isBlockOpaqueCube(tilePos.add(side.getDirection(), new TilePos()))) return;
             float off1 = rand.nextFloat() * 0.9f + 0.05f;
             float off2 = rand.nextFloat() * 0.9f + 0.05f;
             float lOff = 0.1f; // Dumb offset to fix bad lighting
             switch (side) {
                 case BOTTOM:
-                    world.spawnParticle("dripWater", tilePos.x + off1, tilePos.y - lOff, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripWater", tilePos.x() + off1, tilePos.y() - lOff, tilePos.z() + off2, 0, 0, 0, 0);
                     break;
                 case NORTH:
-                    world.spawnParticle("dripWater", tilePos.x + off1, tilePos.y + off2, tilePos.z - lOff, 0, 0, 0, 0);
+                    world.spawnParticle("dripWater", tilePos.x() + off1, tilePos.y() + off2, tilePos.z() - lOff, 0, 0, 0, 0);
                     break;
                 case SOUTH:
-                    world.spawnParticle("dripWater", tilePos.x + off1, tilePos.y + off2, tilePos.z + 1 + lOff, 0, 0, 0, 0);
+                    world.spawnParticle("dripWater", tilePos.x() + off1, tilePos.y() + off2, tilePos.z() + 1 + lOff, 0, 0, 0, 0);
                     break;
                 case WEST:
-                    world.spawnParticle("dripWater", tilePos.x - lOff, tilePos.y + off1, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripWater", tilePos.x() - lOff, tilePos.y() + off1, tilePos.z() + off2, 0, 0, 0, 0);
                     break;
                 case EAST:
-                    world.spawnParticle("dripWater", tilePos.x + 1 + lOff, tilePos.y + off1, tilePos.z + off2, 0, 0, 0, 0);
+                    world.spawnParticle("dripWater", tilePos.x() + 1 + lOff, tilePos.y() + off1, tilePos.z() + off2, 0, 0, 0, 0);
                     break;
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairs.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairs.java
index 442e7304a..e25b4302d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairs.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairs.java
@@ -6,27 +6,28 @@ import java.util.Random;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.material.MaterialColor;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.player.Player;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicStairs extends BlockLogic
-{
-//    private static final Map<Integer, BoundingVolume> selectionVolumes = new HashMap<>();
+public class BlockLogicStairs extends BlockLogic {
+    //    private static final Map<Integer, BoundingVolume> selectionVolumes = new HashMap<>();
 //
 //    static
 //    {
@@ -172,9 +173,8 @@ public class BlockLogicStairs extends BlockLogic
 
     public @NotNull Block<?> modelBlock;
 
-	public BlockLogicStairs(@NotNull Block<?> block, @NotNull Block<?> modelBlock)
-    {
-        super(block, Material.stone);
+    public BlockLogicStairs(@NotNull Block<?> block, @NotNull Block<?> modelBlock) {
+        super(block, Materials.STONE);
         this.modelBlock = modelBlock;
         block.withLightBlock(255);
     }
@@ -191,24 +191,22 @@ public class BlockLogicStairs extends BlockLogic
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public boolean canPlaceOnSurfaceOnCondition(@NotNull World world, @NotNull TilePos tilePos) {
-    	return (world.getBlockData(tilePos) & MASK_ROTATION_VERTICAL) != 0;
+    public boolean canPlaceOnSurfaceOnCondition(@NotNull World world, @NotNull TilePosc tilePos) {
+        return (world.getBlockData(tilePos) & MASK_ROTATION_VERTICAL) != 0;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
         int hRot = meta & MASK_ROTATION_HORIZONTAL;
         if ((meta & MASK_ROTATION_VERTICAL) != 0) {
@@ -219,7 +217,7 @@ public class BlockLogicStairs extends BlockLogic
     }
 
     @Override
-    public void getCollisionAABBs(@NotNull World world, @NotNull TilePos tilePos, @NotNull AABB aabb, @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(@NotNull World world, @NotNull TilePosc tilePos, @NotNull AABBdc aabb, @NotNull List<@NotNull AABBdc> aabbList) {
         int meta = world.getBlockData(tilePos);
         int hRotation = meta & MASK_ROTATION_HORIZONTAL;
         int vRotation = meta & MASK_ROTATION_VERTICAL;
@@ -228,34 +226,31 @@ public class BlockLogicStairs extends BlockLogic
 
         switch (hRotation) {
             case H_ROTATION_WEST:
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F + stepYOffset, 0.0F, 0.5F, 0.5F + stepYOffset, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F + stepYOffset, 0.0F, 0.5F, 0.5F + stepYOffset, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
                 break;
             case H_ROTATION_EAST:
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 1.0F).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
                 break;
             case H_ROTATION_NORTH:
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 0.5F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F + stepYOffset, 0.0F, 1.0F, 0.5F + stepYOffset, 0.5F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
                 break;
             case H_ROTATION_SOUTH:
             default:
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F + stepYOffset, 0.5F, 1.0F, 0.5F + stepYOffset, 1.0F).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F + stepYOffset, 0.5F, 1.0F, 0.5F + stepYOffset, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
                 break;
         }
     }
 
     @Override
-    public ItemStack @Nullable [] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-    {
-        final ItemStack @Nullable [] result = dropCause != EnumDropCause.IMPROPER_TOOL ? new ItemStack[] { new ItemStack(this.block) } : null;
-
-        if (result != null)
-        {
-            for (ItemStack stack : result)
-            {
+    public ItemStack @Nullable [] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
+        final ItemStack @Nullable [] result = dropCause != EnumDropCause.IMPROPER_TOOL ? new ItemStack[]{new ItemStack(this.block)} : null;
+
+        if (result != null) {
+            for (ItemStack stack : result) {
                 stack.setMetadata(data & 0xF0);
                 stack.itemID = this.id();
             }
@@ -265,25 +260,22 @@ public class BlockLogicStairs extends BlockLogic
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         this.modelBlock.animationTick(world, tilePos, rand);
     }
 
     @Override
-    public float getBrightness(@NotNull WorldSource source, @NotNull TilePos tilePos)
-    {
+    public float getBrightness(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return this.modelBlock.getBrightness(source, tilePos);
     }
 
     @Override
-    public float getBlastResistance(Entity entity)
-    {
+    public float getBlastResistance(Entity entity) {
         return this.modelBlock.getBlastResistance(entity);
     }
 
     @Override
-    public int tickDelay()
-    {
+    public int tickDelay() {
         return this.modelBlock.tickDelay();
     }
 //    @Override
@@ -294,70 +286,65 @@ public class BlockLogicStairs extends BlockLogic
 //    }
 
     @Override
-    public void onEntityInside(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity entity, @NotNull Vec3 velocity) {
-        this.modelBlock.onEntityInside(world, tilePos, entity, velocity);
+    public void onEntityInside(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity entity, @NotNull Vector3d velocityDirection) {
+        this.modelBlock.onEntityInside(world, tilePos, entity, velocityDirection);
     }
 
     @Override
-    public boolean isCollidable()
-    {
+    public boolean isCollidable() {
         return this.modelBlock.isCollidable();
     }
 
     @Override
-    public boolean canCollideCheck(int data, boolean shouldCollideWithFluids)
-    {
+    public boolean canCollideCheck(int data, boolean shouldCollideWithFluids) {
         return this.modelBlock.canCollideCheck(data, shouldCollideWithFluids);
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return this.modelBlock.canPlaceAt(world, tilePos);
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         onNeighborChanged(world, tilePos, 0);
         this.modelBlock.onPlacedByWorld(world, tilePos);
     }
 
     @Override
-    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePos tilePos, @NotNull Entity walker) {
+    public void onEntityWalkedOn(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Entity walker) {
         this.modelBlock.onEntityWalkedOn(world, tilePos, walker);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         this.modelBlock.updateTick(world, tilePos, rand, false);
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         this.modelBlock.onAttacked(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         return this.modelBlock.onInteracted(world, tilePos, player, side, xHit, yHit);
     }
 
     @Override
-    public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePosc tilePos) {
         this.modelBlock.onDestroyedByExplosion(world, tilePos);
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos) & 0xF0;
 
         Direction hRotation = mob.getHorizontalPlacementDirection(side).getOpposite();
-        if(hRotation == Direction.NORTH) meta |= H_ROTATION_NORTH;
-        if(hRotation == Direction.EAST) meta |= H_ROTATION_EAST;
-        if(hRotation == Direction.SOUTH) meta |= H_ROTATION_SOUTH;
-        if(hRotation == Direction.WEST) meta |= H_ROTATION_WEST;
+        if (hRotation == Direction.NORTH) meta |= H_ROTATION_NORTH;
+        if (hRotation == Direction.EAST) meta |= H_ROTATION_EAST;
+        if (hRotation == Direction.SOUTH) meta |= H_ROTATION_SOUTH;
+        if (hRotation == Direction.WEST) meta |= H_ROTATION_WEST;
 
         Direction vRotation = mob.getVerticalPlacementDirection(side, yHit);
 //        if (vRotation == Direction.DOWN) meta |= 0b0000;
@@ -367,16 +354,16 @@ public class BlockLogicStairs extends BlockLogic
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos) & 0xF0;
 
         side = side.getOpposite();
         Side hSide = !side.isHorizontal() ? Side.NORTH : side;
         Direction hRotation = hSide.getOpposite().getDirection();
-        if(hRotation == Direction.NORTH) meta |= H_ROTATION_NORTH;
-        if(hRotation == Direction.EAST) meta |= H_ROTATION_EAST;
-        if(hRotation == Direction.SOUTH) meta |= H_ROTATION_SOUTH;
-        if(hRotation == Direction.WEST) meta |= H_ROTATION_WEST;
+        if (hRotation == Direction.NORTH) meta |= H_ROTATION_NORTH;
+        if (hRotation == Direction.EAST) meta |= H_ROTATION_EAST;
+        if (hRotation == Direction.SOUTH) meta |= H_ROTATION_SOUTH;
+        if (hRotation == Direction.WEST) meta |= H_ROTATION_WEST;
 
         Side vSide = !side.isVertical() ? Side.BOTTOM : side;
         Direction vRotation = vSide.getDirection();
@@ -387,11 +374,12 @@ public class BlockLogicStairs extends BlockLogic
     }
 
     @Override
-    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-    	return 0.0f;
+    public float getAmbientOcclusionStrength(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        return 0.0f;
     }
+
     @Override
-    public @NotNull MaterialColor getMaterialColor(){
+    public @NotNull MaterialColor getMaterialColor() {
         return this.modelBlock.getMaterialColor();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPaintable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPaintable.java
index 90039bb3c..f6ee94654 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPaintable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPaintable.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicStairsPaintable extends BlockLogicStairs implements IPaintable {
@@ -11,7 +11,7 @@ public class BlockLogicStairsPaintable extends BlockLogicStairs implements IPain
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.STAIRS_PLANKS_PAINTED.id(), meta);
         Blocks.STAIRS_PLANKS_PAINTED.getLogic().setColor(world, tilePos, color);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPainted.java
index a6d68e223..dc039ffc1 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStairsPainted.java
@@ -2,7 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicStairsPainted extends BlockLogicStairs implements IPainted {
@@ -26,13 +26,13 @@ public class BlockLogicStairsPainted extends BlockLogicStairs implements IPainte
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.STAIRS_PLANKS_OAK.id(), stripColorFromMetadata(meta));
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStalk.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStalk.java
index d84d6431a..581546f23 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStalk.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStalk.java
@@ -1,28 +1,28 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicStalk extends BlockLogic implements ISupportable {
     public BlockLogicStalk(@NotNull Block<?> block) {
-        super(block, Material.plant);
+        super(block, Materials.PLANT);
         block.setTicking(true);
         float offset = 0.2F;
         setBlockBounds(0.5F - offset, 0.0F, 0.5F - offset, 0.5F + offset, offset * 3F, 0.5F + offset);
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return super.canPlaceAt(world, tilePos) && canStay(world, tilePos);
     }
 
@@ -37,24 +37,24 @@ public class BlockLogicStalk extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos)
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos)
     {
         return isSupported(world, tilePos, Side.BOTTOM);
     }
 
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return FullSupport.INSTANCE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStatue.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStatue.java
index 4a337437e..4e1953668 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStatue.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStatue.java
@@ -15,6 +15,7 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -43,7 +44,7 @@ public class BlockLogicStatue extends BlockLogic {
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         final @Nullable TileEntityStatue statueEntity = getTileEntity(world, tilePos);
         if (statueEntity == null) {
             return false;
@@ -52,7 +53,7 @@ public class BlockLogicStatue extends BlockLogic {
         // Sneaking overrides all - next pose
         if (player.isSneaking()) {
             statueEntity.nextPose();
-            world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D, "random.scrape", 0.7F, 0.2F + world.rand.nextFloat() * 0.4F);
+            world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "random.scrape", 0.7F, 0.2F + world.rand.nextFloat() * 0.4F);
             return true;
         }
 
@@ -144,7 +145,7 @@ public class BlockLogicStatue extends BlockLogic {
 
         // All else fails - next pose
         statueEntity.nextPose();
-        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D, "random.scrape", 0.7F, 0.2F + world.rand.nextFloat() * 0.2F);
+        world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "random.scrape", 0.7F, 0.2F + world.rand.nextFloat() * 0.2F);
         return true;
     }
 
@@ -159,12 +160,12 @@ public class BlockLogicStatue extends BlockLogic {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
-    public @Nullable TileEntityStatue getTileEntity(final @NotNull World world, final @NotNull TilePos tilePos) {
-        TilePos entPos = this.isBottom ? tilePos : tilePos.down();
+    public @Nullable TileEntityStatue getTileEntity(final @NotNull World world, final @NotNull TilePosc tilePos) {
+        TilePosc entPos = this.isBottom ? tilePos : tilePos.down(new TilePos());
         final @Nullable Block<?> block = world.getBlock(entPos);
         if (block == null || !(block.getLogic() instanceof BlockLogicStatue)) {
             return null;
@@ -179,7 +180,7 @@ public class BlockLogicStatue extends BlockLogic {
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         if (this.isBottom) {
             List<ItemStack> stacks = new ArrayList<>();
             final @Nullable TileEntity tileEntity = world.getTileEntity(tilePos);
@@ -204,12 +205,12 @@ public class BlockLogicStatue extends BlockLogic {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         final Block<?> otherBlock;
         if (!this.isBottom) {
-            otherBlock = world.getBlock(tilePos.down());
+            otherBlock = world.getBlock(tilePos.down(new TilePos()));
         } else {
-            otherBlock = world.getBlock(tilePos.up());
+            otherBlock = world.getBlock(tilePos.up(new TilePos()));
         }
         if (!(otherBlock != null && otherBlock.getLogic() instanceof BlockLogicStatue)) {
             world.setBlockIdNotify(tilePos, 0);
@@ -217,26 +218,26 @@ public class BlockLogicStatue extends BlockLogic {
     }
 
     @Override
-    public @NotNull ItemStack @Nullable [] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, @NotNull TilePos tilePos, int data, @Nullable TileEntity tileEntity) {
+    public @NotNull ItemStack @Nullable [] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, @NotNull TilePosc tilePos, int data, @Nullable TileEntity tileEntity) {
         if (this.droppedItem == null) return null;
         if (dropCause != EnumDropCause.IMPROPER_TOOL) {
-            return new ItemStack[] { new ItemStack(this.droppedItem.get()) };
+            return new ItemStack[]{new ItemStack(this.droppedItem.get())};
         }
 
         return null;
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
-        if (tilePos.y >= world.getHeightBlocks() - 1) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (tilePos.y() >= world.getHeightBlocks() - 1) {
             return false;
         } else {
-            return super.canPlaceAt(world, tilePos) && super.canPlaceAt(world, tilePos.up());
+            return super.canPlaceAt(world, tilePos) && super.canPlaceAt(world, tilePos.up(new TilePos()));
         }
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_DESTROY_ON_PUSH;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStone.java
index 11c51e674..49b6c6f1b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicStone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicStone.java
@@ -10,6 +10,7 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -17,45 +18,43 @@ import java.util.Random;
 
 public class BlockLogicStone extends BlockLogic {
 
-	private final @NotNull Block<?> cobble;
-
-	public BlockLogicStone(@NotNull Block<?> block, @NotNull Block<?> cobbleStone, @NotNull Material material) {
-		super(block, material);
-		this.cobble = cobbleStone;
-	}
-
-	@Override
-	public void onHarvest(@NotNull World world, @NotNull Player player, @NotNull TilePos tilePos, int data, @Nullable TileEntity tileEntity)
-	{
-		super.onHarvest(world, player, tilePos, data, tileEntity);
-		if(
-			player.getStat(Blocks.STONE.getStat(StatList.STAT_MINED)) > 0 &&
-			player.getStat(Blocks.BASALT.getStat(StatList.STAT_MINED)) > 0 &&
-			player.getStat(Blocks.GRANITE.getStat(StatList.STAT_MINED)) > 0 &&
-			player.getStat(Blocks.LIMESTONE.getStat(StatList.STAT_MINED)) > 0 &&
-			player.getStat(Blocks.PERMAFROST.getStat(StatList.STAT_MINED)) > 0) {
-
-			player.triggerAchievement(Achievements.COLLECT_STONE);
-		}
-	}
-
-	@Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
-
-        Chunk chunk = world.getChunk(tilePos.toChunkPos());
-		if (tilePos.y <= 32 && chunk.getChunkRandom(0x3ad8025fL).nextInt(10) == 0 && world.getBlockId(tilePos.down()) == 0) {
-			if (rand.nextInt(50) == 0)
-				world.spawnParticle("slimechunk", tilePos.x, tilePos.y, tilePos.z, 0.0D, 0.0D, 0.0D, 0);
-		}
-	}
-
-	@Override
-	public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-	{
+    private final @NotNull Block<?> cobble;
+
+    public BlockLogicStone(@NotNull Block<?> block, @NotNull Block<?> cobbleStone, @NotNull Material material) {
+        super(block, material);
+        this.cobble = cobbleStone;
+    }
+
+    @Override
+    public void onHarvest(@NotNull World world, @NotNull Player player, @NotNull TilePosc tilePos, int data, @Nullable TileEntity tileEntity) {
+        super.onHarvest(world, player, tilePos, data, tileEntity);
+        if (
+            player.getStat(Blocks.STONE.getStat(StatList.STAT_MINED)) > 0 &&
+                player.getStat(Blocks.BASALT.getStat(StatList.STAT_MINED)) > 0 &&
+                player.getStat(Blocks.GRANITE.getStat(StatList.STAT_MINED)) > 0 &&
+                player.getStat(Blocks.LIMESTONE.getStat(StatList.STAT_MINED)) > 0 &&
+                player.getStat(Blocks.PERMAFROST.getStat(StatList.STAT_MINED)) > 0) {
+
+            player.triggerAchievement(Achievements.COLLECT_STONE);
+        }
+    }
+
+    @Override
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+
+        Chunk chunk = world.getChunk(tilePos);
+        if (tilePos.y() <= 32 && chunk.getChunkRandom(0x3ad8025fL).nextInt(10) == 0 && world.getBlockId(tilePos.down(new TilePos())) == 0) {
+            if (rand.nextInt(50) == 0)
+                world.spawnParticle("slimechunk", tilePos.x(), tilePos.y(), tilePos.z(), 0.0D, 0.0D, 0.0D, 0);
+        }
+    }
+
+    @Override
+    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
         return switch (dropCause) {
-            case PISTON_CRUSH, WORLD, EXPLOSION, PROPER_TOOL -> new ItemStack[]{new ItemStack(cobble)};
+            case PISTON_CRUSH, WORLD, EXPLOSION, PROPER_TOOL -> new ItemStack[]{new ItemStack(this.cobble)};
             case PICK_BLOCK, SILK_TOUCH -> new ItemStack[]{new ItemStack(this)};
             default -> null;
         };
-	}
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSugarcane.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSugarcane.java
index 7cd972dc5..dff58702a 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicSugarcane.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicSugarcane.java
@@ -1,43 +1,40 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.IBonemealable;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.Items;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
-public class BlockLogicSugarcane extends BlockLogic implements IBonemealable
-{
+public class BlockLogicSugarcane extends BlockLogic implements IBonemealable {
 
-	public BlockLogicSugarcane(@NotNull Block<?> block)
-    {
-        super(block, Material.plant);
+    public BlockLogicSugarcane(@NotNull Block<?> block) {
+        super(block, Materials.PLANT);
         float f = 0.375F;
         setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 1.0F, 0.5F + f);
         block.setTicking(true);
     }
 
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
-        TilePos up = tilePos.up();
-        if(world.isAirBlock(up))
-        {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
+        TilePos up = tilePos.up(new TilePos());
+        if (world.isAirBlock(up)) {
             int reedHeight = 0;
             TilePos p = new TilePos(tilePos);
             while (world.getBlockId(p) == id()) { // Stop natural reed growth if reed is already 3 blocks tall
@@ -46,33 +43,30 @@ public class BlockLogicSugarcane extends BlockLogic implements IBonemealable
             }
 
             int data = world.getBlockData(tilePos);
-            if(data >= 15)
-            {
+            if (data >= 15) {
                 world.setBlockIdNotify(up, id());
                 world.setBlockDataNotify(tilePos, 0);
-            } else
-            {
+            } else {
                 world.setBlockDataNotify(tilePos, data + 1);
             }
         }
     }
 
-    public void growReedOnTop(@NotNull World world, @NotNull TilePos tilePos){
+    public void growReedOnTop(@NotNull World world, @NotNull TilePosc tilePos) {
         TilePos p = new TilePos(tilePos);
         while (world.getBlockId(p) == id()) {
             p.y++;
         }
-        if(world.isAirBlock(p)){
-                world.setBlockIdNotify(p, id());
-            }
+        if (world.isAirBlock(p)) {
+            world.setBlockIdNotify(p, id());
+        }
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        TilePos down = tilePos.down();
-        Block<?> blockBelow = world.getBlock(down);
-        if(blockBelow == null) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        Block<?> blockBelow = world.getBlock(tilePos.down(queryPos));
+        if (blockBelow == null) {
             return false;
         } else if (blockBelow.id() == id()) {
             return true;
@@ -80,68 +74,59 @@ public class BlockLogicSugarcane extends BlockLogic implements IBonemealable
             return false;
         }
         return
-            Blocks.hasTag(world.getBlockId(down.add(Direction.WEST)), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(down.add(Direction.EAST)), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(down.add(Direction.NORTH)), BlockTags.IS_WATER) ||
-            Blocks.hasTag(world.getBlockId(down.add(Direction.SOUTH)), BlockTags.IS_WATER);
+            Blocks.hasTag(world.getBlockId(tilePos.down(queryPos).add(Direction.WEST, queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.down(queryPos).add(Direction.EAST, queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.down(queryPos).add(Direction.NORTH, queryPos)), BlockTags.IS_WATER) ||
+                Blocks.hasTag(world.getBlockId(tilePos.down(queryPos).add(Direction.SOUTH, queryPos)), BlockTags.IS_WATER);
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id)
-    {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         checkCanStay(world, tilePos);
     }
 
-    protected final void checkCanStay(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        if(!canStay(world, tilePos))
-        {
+    protected final void checkCanStay(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (!canStay(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
     @Override
-    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity)
-    {
-        return new ItemStack[] { new ItemStack(Items.SUGARCANE) };
+    public ItemStack[] getBreakResult(@NotNull World world, @NotNull EnumDropCause dropCause, int data, @Nullable TileEntity tileEntity) {
+        return new ItemStack[]{new ItemStack(Items.SUGARCANE)};
     }
 
     @Override
-    public boolean canStay(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canStay(@NotNull World world, @NotNull TilePosc tilePos) {
         return canPlaceAt(world, tilePos);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
-        if(!world.isClientSide)
-        {
+    public boolean onBonemealUsed(@NotNull ItemStack itemStack, @Nullable Player player, World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
+        if (!world.isClientSide) {
             growReedOnTop(world, tilePos);
-            if (player == null || player.getGamemode().consumeBlocks())
-            {
+            if (player == null || player.getGamemode().consumeBlocks()) {
                 itemStack.stackSize--;
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTNT.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTNT.java
index 9e9365027..7ae29c260 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTNT.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTNT.java
@@ -1,6 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.entity.EntityPrimedTNT;
 import net.minecraft.core.enums.EnumDropCause;
@@ -8,19 +9,18 @@ import net.minecraft.core.item.ItemFireStriker;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicTNT extends BlockLogic {
 
 	public BlockLogicTNT(@NotNull Block<?> block) {
-		super(block, Material.explosive);
+		super(block, Materials.EXPLOSIVE);
 	}
 
 	@Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+	public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
 		super.onPlacedByWorld(world, tilePos);
 		if (world.hasNeighborSignal(tilePos)) {
 			ignite(world, tilePos, true);
@@ -28,7 +28,7 @@ public class BlockLogicTNT extends BlockLogic {
 	}
 
 	@Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+	public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
 		if (id > 0 && world.hasNeighborSignal(tilePos)) {
 			ignite(world, tilePos, true);
 		}
@@ -45,17 +45,17 @@ public class BlockLogicTNT extends BlockLogic {
 	}
 
 	@Override
-	public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePos tilePos) {
-		EntityPrimedTNT entity = new EntityPrimedTNT(world, tilePos.x + 0.5F, tilePos.y + 0.5F, tilePos.z + 0.5F);
+	public void onDestroyedByExplosion(@NotNull World world, @NotNull TilePosc tilePos) {
+		EntityPrimedTNT entity = new EntityPrimedTNT(world, tilePos.x() + 0.5F, tilePos.y() + 0.5F, tilePos.z() + 0.5F);
 		entity.fuse = world.rand.nextInt(entity.fuse / 4) + entity.fuse / 8;
 		world.entityJoinedWorld(entity);
 	}
 
-	public void ignite(@NotNull World world, @NotNull TilePos tilePos, boolean sound) {
+	public void ignite(@NotNull World world, @NotNull TilePosc tilePos, boolean sound) {
 		ignite(world, null, tilePos, sound);
 	}
 
-	public void ignite(@NotNull World world, @Nullable Player player, @NotNull TilePos tilePos, boolean sound) {
+	public void ignite(@NotNull World world, @Nullable Player player, @NotNull TilePosc tilePos, boolean sound) {
 		if (world.isClientSide) {
 			if (player != null && player.inventory.getCurrentItem() != null && (player.inventory.getCurrentItem().getItem() instanceof ItemFireStriker)) {
 				player.inventory.getCurrentItem().damageItem(1, player);
@@ -63,7 +63,7 @@ public class BlockLogicTNT extends BlockLogic {
 			return;
 		}
 		world.setBlockIdNotify(tilePos, 0);
-		EntityPrimedTNT tnt = new EntityPrimedTNT(world, tilePos.x + 0.5F, tilePos.y + 0.5F, tilePos.z + 0.5F);
+		EntityPrimedTNT tnt = new EntityPrimedTNT(world, tilePos.x() + 0.5F, tilePos.y() + 0.5F, tilePos.z() + 0.5F);
 		world.entityJoinedWorld(tnt);
 		if (sound) world.playSoundAtEntity(null, tnt, "tile.tnt.fuse", 1.0F, 1.0F);
 		if (player != null && player.inventory.getCurrentItem() != null && (player.inventory.getCurrentItem().getItem() instanceof ItemFireStriker)) {
@@ -72,7 +72,7 @@ public class BlockLogicTNT extends BlockLogic {
 	}
 
 	@Override
-	public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+	public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
 		if (player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemFireStriker) {
 			world.setBlockData(tilePos, 1);
 		}
@@ -80,7 +80,7 @@ public class BlockLogicTNT extends BlockLogic {
 	}
 
 	@Override
-	public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+	public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
 		if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemFireStriker) {
 			ignite(world, player, tilePos, true);
 			return true;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorch.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorch.java
index c1f043d9c..ad5b45705 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorch.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorch.java
@@ -1,23 +1,23 @@
 package net.minecraft.core.block;
 
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
-public class BlockLogicTorch extends BlockLogic implements ISupportable
-{
+public class BlockLogicTorch extends BlockLogic implements ISupportable {
     public static final int MASK_DIRECTION = 0b0000_0111;
     public static final int SIDE_NONE = 0;
     public static final int SIDE_WEST = 1;
@@ -27,48 +27,44 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
     public static final int SIDE_BOTTOM = 5;
     public static final int SIDE_TOP = 6;
 
-	public BlockLogicTorch(@NotNull Block<?> block)
-    {
-        super(block, Material.decoration);
+    public BlockLogicTorch(@NotNull Block<?> block) {
+        super(block, Materials.DECORATION);
         block.setTicking(true);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource world, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource world, @NotNull TilePosc tilePos) {
         float f = 0.15F;
         int side = world.getBlockData(tilePos) & MASK_DIRECTION;
         return switch (side) {
-            case SIDE_WEST -> AABB.fromPool(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
-            case SIDE_EAST -> AABB.fromPool(1.0F - f * 2.0F, 0.2F, 0.5F - f, 1.0F, 0.8F, 0.5F + f);
-            case SIDE_NORTH -> AABB.fromPool(0.5F - f, 0.2F, 0.0F, 0.5F + f, 0.8F, f * 2.0F);
-            case SIDE_SOUTH -> AABB.fromPool(0.5F - f, 0.2F, 1.0F - f * 2.0F, 0.5F + f, 0.8F, 1.0F);
+            case SIDE_WEST -> new AABBd(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
+            case SIDE_EAST -> new AABBd(1.0F - f * 2.0F, 0.2F, 0.5F - f, 1.0F, 0.8F, 0.5F + f);
+            case SIDE_NORTH -> new AABBd(0.5F - f, 0.2F, 0.0F, 0.5F + f, 0.8F, f * 2.0F);
+            case SIDE_SOUTH -> new AABBd(0.5F - f, 0.2F, 1.0F - f * 2.0F, 0.5F + f, 0.8F, 1.0F);
             default -> {
                 final float f1 = 0.1F;
-                yield AABB.fromPool(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, 0.6F, 0.5F + f1);
+                yield new AABBd(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, 0.6F, 0.5F + f1);
             }
         };
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM)
             || isSupported(world, tilePos, Side.NORTH)
             || isSupported(world, tilePos, Side.SOUTH)
@@ -77,38 +73,38 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         if (side.isHorizontal()) side = side.getOpposite();
         onPlacedOnSide(world, tilePos, side, xHit, yHit);
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int orientation = SIDE_NONE;
         if (side.isHorizontal()) side = side.getOpposite();
         switch (side) {
             case TOP:
-                if(isSupported(world, tilePos, Side.BOTTOM)) {
+                if (isSupported(world, tilePos, Side.BOTTOM)) {
                     orientation = SIDE_BOTTOM;
                 }
                 break;
             case NORTH:
-                if(isSupported(world, tilePos, Side.SOUTH)) {
+                if (isSupported(world, tilePos, Side.SOUTH)) {
                     orientation = SIDE_SOUTH;
                 }
                 break;
             case SOUTH:
-                if(isSupported(world, tilePos, Side.NORTH)) {
+                if (isSupported(world, tilePos, Side.NORTH)) {
                     orientation = SIDE_NORTH;
                 }
                 break;
             case WEST:
-                if(isSupported(world, tilePos, Side.EAST)) {
+                if (isSupported(world, tilePos, Side.EAST)) {
                     orientation = SIDE_EAST;
                 }
                 break;
             case EAST:
-                if(isSupported(world, tilePos, Side.WEST)) {
+                if (isSupported(world, tilePos, Side.WEST)) {
                     orientation = SIDE_WEST;
                 }
                 break;
@@ -120,34 +116,31 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
         dropTorchIfCantStay(world, tilePos);
     }
 
-    public int getDefaultOrientation(@NotNull World world, @NotNull TilePos tilePos) {
-        if(isSupported(world, tilePos, Side.BOTTOM)) {
+    public int getDefaultOrientation(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (isSupported(world, tilePos, Side.BOTTOM)) {
             return SIDE_BOTTOM;
-        } else if(isSupported(world, tilePos, Side.WEST)) {
+        } else if (isSupported(world, tilePos, Side.WEST)) {
             return SIDE_WEST;
-        } else if(isSupported(world, tilePos, Side.EAST)) {
+        } else if (isSupported(world, tilePos, Side.EAST)) {
             return SIDE_EAST;
-        } else if(isSupported(world, tilePos, Side.NORTH)) {
+        } else if (isSupported(world, tilePos, Side.NORTH)) {
             return SIDE_NORTH;
-        } else if(isSupported(world, tilePos, Side.SOUTH)) {
+        } else if (isSupported(world, tilePos, Side.SOUTH)) {
             return SIDE_SOUTH;
         }
         return SIDE_NONE;
     }
-    
+
     @Override
-	public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick)
-    {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         super.updateTick(world, tilePos, rand, isRandomTick);
-        if(world.getBlockData(tilePos) == SIDE_NONE)
-        {
+        if (world.getBlockData(tilePos) == SIDE_NONE) {
             onPlacedByWorld(world, tilePos);
         }
     }
 
     @Override
-	public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         int orientation = getDefaultOrientation(world, tilePos);
         if (orientation != SIDE_NONE) {
             world.setBlockDataNotify(tilePos, orientation);
@@ -156,7 +149,7 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         boolean invalid;
         int side = world.getBlockData(tilePos) & MASK_DIRECTION;
         invalid = switch (side) {
@@ -167,27 +160,24 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
             case SIDE_BOTTOM -> !isSupported(world, tilePos, Side.BOTTOM);
             default -> true;
         };
-        if(invalid)
-        {
+        if (invalid) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, side, null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
-    private void dropTorchIfCantStay(@NotNull World world, @NotNull TilePos tilePos)
-    {
-        if(!canPlaceAt(world, tilePos)) {
+    private void dropTorchIfCantStay(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (!canPlaceAt(world, tilePos)) {
             dropWithCause(world, EnumDropCause.WORLD, tilePos, world.getBlockData(tilePos), null, null);
             world.setBlockIdNotify(tilePos, 0);
         }
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
-    {
-        double xPos = (double) tilePos.x + 0.5D;
-        double yPos = (double) tilePos.y + 0.7D;
-        double zPos = (double) tilePos.z + 0.5D;
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
+        double xPos = (double) tilePos.x() + 0.5D;
+        double yPos = (double) tilePos.y() + 0.7D;
+        double zPos = (double) tilePos.z() + 0.5D;
         double d3 = 0.22D;
         double d4 = 0.27D;
         int side = world.getBlockData(tilePos) & MASK_DIRECTION;
@@ -214,19 +204,19 @@ public class BlockLogicTorch extends BlockLogic implements ISupportable
                 break;
         }
     }
-    
+
     @Override
-    public int getLightmapCoord(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-		return source.getLightmapCoord(tilePos, this.block.emission > 0 ? 15 : 0);
+    public int getLightmapCoord(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        return source.getLightmapCoord(tilePos, this.block.emission > 0 ? 15 : 0);
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return switch (side) {
             case NORTH, SOUTH, WEST, EAST, BOTTOM -> PartialSupport.INSTANCE.center();
             default -> PartialSupport.INSTANCE;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorchRedstone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorchRedstone.java
index ea49fdb67..7d35b4547 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorchRedstone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTorchRedstone.java
@@ -7,6 +7,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -27,34 +28,36 @@ public class BlockLogicTorchRedstone extends BlockLogicTorch {
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         if (world.getBlockData(tilePos) == SIDE_NONE) {
             super.onPlacedByWorld(world, tilePos);
         }
+        TilePos queryPos = new TilePos();
         if (this.torchActive) {
-            world.notifyBlocksOfNeighborChange(tilePos.down(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.up(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.west(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.east(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.north(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.south(), id());
+            world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.west(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.east(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.north(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.south(queryPos), id());
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        TilePos queryPos = new TilePos();
         if (this.torchActive) {
-            world.notifyBlocksOfNeighborChange(tilePos.down(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.up(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.west(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.east(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.north(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.south(), id());
+            world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.west(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.east(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.north(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.south(queryPos), id());
         }
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         if (!this.torchActive) {
             return false;
         }
@@ -69,20 +72,20 @@ public class BlockLogicTorchRedstone extends BlockLogicTorch {
         };
     }
 
-    private boolean hasNeighborSignal(World world, @NotNull TilePos tilePos) {
+    private boolean hasNeighborSignal(World world, @NotNull TilePosc tilePos) {
         int direction = world.getBlockData(tilePos) & MASK_DIRECTION;
         return switch (direction) {
-            case SIDE_BOTTOM -> world.hasSignal(tilePos.down(), Side.BOTTOM);
-            case SIDE_SOUTH -> world.hasSignal(tilePos.south(), Side.SOUTH);
-            case SIDE_NORTH -> world.hasSignal(tilePos.north(), Side.NORTH);
-            case SIDE_EAST -> world.hasSignal(tilePos.east(), Side.EAST);
-            case SIDE_WEST -> world.hasSignal(tilePos.west(), Side.WEST);
+            case SIDE_BOTTOM -> world.hasSignal(tilePos.down(new TilePos()), Side.BOTTOM);
+            case SIDE_SOUTH -> world.hasSignal(tilePos.south(new TilePos()), Side.SOUTH);
+            case SIDE_NORTH -> world.hasSignal(tilePos.north(new TilePos()), Side.NORTH);
+            case SIDE_EAST -> world.hasSignal(tilePos.east(new TilePos()), Side.EAST);
+            case SIDE_WEST -> world.hasSignal(tilePos.west(new TilePos()), Side.WEST);
             default -> false;
         };
     }
 
     @Override
-    public void updateTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand, boolean isRandomTick) {
+    public void updateTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand, boolean isRandomTick) {
         boolean isPowered = hasNeighborSignal(world, tilePos);
         if (this.torchActive) {
             if (isPowered) {
@@ -94,13 +97,13 @@ public class BlockLogicTorchRedstone extends BlockLogicTorch {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         super.onNeighborChanged(world, tilePos, id);
         world.scheduleBlockUpdate(tilePos, id(), tickDelay());
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         if (side == Side.BOTTOM) {
             return isEmittingSignal(world, tilePos, side);
         } else {
@@ -119,15 +122,15 @@ public class BlockLogicTorchRedstone extends BlockLogicTorch {
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         if (!this.torchActive) {
             return;
         }
 
         int direction = world.getBlockData(tilePos) & MASK_DIRECTION;
-        double px = (tilePos.x + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
-        double py = (tilePos.y + 0.7D) + (rand.nextFloat() - 0.5D) * 0.2D;
-        double pz = (tilePos.z + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
+        double px = (tilePos.x() + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
+        double py = (tilePos.y() + 0.7D) + (rand.nextFloat() - 0.5D) * 0.2D;
+        double pz = (tilePos.z() + 0.5D) + (rand.nextFloat() - 0.5D) * 0.2D;
 
         double verticalOffset = 0.22D;
         double horizontalOffset = 0.27D;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoor.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoor.java
index 15ee13740..651e4d8ba 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoor.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoor.java
@@ -2,6 +2,7 @@ package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -13,13 +14,15 @@ import net.minecraft.core.item.tag.ItemTags;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     public static final int DIRECTION_SOUTH = 0;
@@ -39,7 +42,7 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = world.getBlockData(tilePos);
         boolean isOpened = isTrapdoorOpen(meta);
         boolean isPowered = world.hasNeighborSignal(tilePos);
@@ -60,7 +63,7 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
 
         if (isTrapdoorOpen(meta)) {
@@ -80,36 +83,36 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int meta = source.getBlockData(tilePos);
-        float thickness = 3/16f;
+        float thickness = 3 / 16f;
 
         if (isTrapdoorOpen(meta)) {
             return switch (meta & MASK_DIRECTION) {
-                case DIRECTION_SOUTH -> AABB.fromPool(0.0F, 0.0F, 1.0F - thickness, 1.0F, 1.0F, 1.0F);
-                case DIRECTION_NORTH -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, thickness);
-                case DIRECTION_EAST -> AABB.fromPool(1.0F - thickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);  // West
-                default -> AABB.fromPool(0.0F, 0.0F, 0.0F, thickness, 1.0F, 1.0F);
+                case DIRECTION_SOUTH -> new AABBd(0.0F, 0.0F, 1.0F - thickness, 1.0F, 1.0F, 1.0F);
+                case DIRECTION_NORTH -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, thickness);
+                case DIRECTION_EAST -> new AABBd(1.0F - thickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);  // West
+                default -> new AABBd(0.0F, 0.0F, 0.0F, thickness, 1.0F, 1.0F);
             };
         } else {
             if (isUpperHalf(meta)) {
-                return AABB.fromPool(0.0F, 1.0f - thickness, 0.0F, 1.0F, 1.0f, 1.0F);
+                return new AABBd(0.0F, 1.0f - thickness, 0.0F, 1.0F, 1.0f, 1.0F);
             } else {
-                return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, thickness, 1.0F);
+                return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, thickness, 1.0F);
             }
         }
     }
 
     @Override
-    public void onAttacked(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
+    public void onAttacked(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @NotNull Side side, double xHit, double yHit) {
         if (!Item.hasTag(player.getCurrentEquippedItem(), ItemTags.PREVENT_LEFT_CLICK_INTERACTIONS)) {
             onInteracted(world, tilePos, player, null, 0.0, 0.0);
         }
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        if (this.material != Material.metal && this.material != Material.steel) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        if (this.material != Materials.METAL && this.material != Materials.STEEL) {
             int data = world.getBlockData(tilePos);
             world.setBlockDataNotify(tilePos, data ^ MASK_OPEN);
             world.playBlockEvent(player, tilePos, LevelListener.EVENT_DOOR_SOUND, 0);
@@ -119,8 +122,8 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public void onActivatorInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
-        if (this.material != Material.metal && this.material != Material.steel) {
+    public void onActivatorInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull TileEntityActivator activator, @NotNull Direction direction) {
+        if (this.material != Materials.METAL && this.material != Materials.STEEL) {
             int data = world.getBlockData(tilePos);
             world.setBlockDataNotify(tilePos, data ^ MASK_OPEN);
             world.playBlockEvent(null, tilePos, LevelListener.EVENT_DOOR_SOUND, 0);
@@ -128,13 +131,13 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         if (world.isClientSide) {
             return;
         }
 
         Block<?> block = Blocks.getBlock(id);
-        if ((this.material != Material.metal && this.material != Material.steel && block != null && block.isSignalSource()) || ((this.material == Material.metal || this.material == Material.steel) && (block == null || block.isSignalSource()))) {
+        if ((this.material != Materials.METAL && this.material != Materials.STEEL && block != null && block.isSignalSource()) || ((this.material == Materials.METAL || this.material == Materials.STEEL) && (block == null || block.isSignalSource()))) {
             int meta = world.getBlockData(tilePos);
             boolean isOpened = isTrapdoorOpen(meta);
             boolean isPowered = world.hasNeighborSignal(tilePos);
@@ -147,7 +150,7 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         int meta = getMetaForDirection(player == null ? side.getDirection().getOpposite() : player.getHorizontalPlacementDirection(side, PlacementMode.SIDE));
         if (player != null && player.getVerticalPlacementDirection(side, yHit) == Direction.UP) {
             meta = setUpperHalf(meta, true);
@@ -156,11 +159,12 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
     }
 
     @Override
-    public boolean isClimbable(@NotNull World world, @NotNull TilePos tilePos) {
-        Block<?> block = world.getBlock(tilePos.down());
+    public boolean isClimbable(@NotNull World world, @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
+        Block<?> block = world.getBlock(tilePos.down(queryPos));
         int meta = world.getBlockData(tilePos);
         if (isTrapdoorOpen(meta) && (block != null && block.getLogic() instanceof BlockLogicLadder ladder)) {
-            Side ladderSide = ladder.getSideFromMeta(world.getBlockData(tilePos.down()));
+            Side ladderSide = ladder.getSideFromMeta(world.getBlockData(tilePos.down(queryPos)));
             Direction trapdoorDirection = getDirectionForMeta(meta);
             return ladderSide.getDirection() == trapdoorDirection.getOpposite();
         }
@@ -215,11 +219,11 @@ public class BlockLogicTrapDoor extends BlockLogic implements IPaintable {
 
     @Override
     public boolean canBePainted() {
-        return this.material == Material.wood;
+        return this.material == Materials.WOOD;
     }
 
     @Override
-    public void setColor(World world, @NotNull TilePos tilePos, DyeColor color) {
+    public void setColor(World world, @NotNull TilePosc tilePos, DyeColor color) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.TRAPDOOR_PLANKS_PAINTED.id(), meta & 0xF | color.blockMeta << 4);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoorPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoorPainted.java
index cfb05d68b..dd15b32ce 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoorPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrapDoorPainted.java
@@ -8,7 +8,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -18,7 +18,7 @@ public class BlockLogicTrapDoorPainted extends BlockLogicTrapDoor implements IPa
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return itemStack.getMetadata() | super.getPlacedData(player, itemStack, world, tilePos, side, xHit, yHit);
     }
 
@@ -44,13 +44,13 @@ public class BlockLogicTrapDoorPainted extends BlockLogicTrapDoor implements IPa
     }
 
     @Override
-    public void removeDye(World world, @NotNull TilePos tilePos) {
+    public void removeDye(World world, @NotNull TilePosc tilePos) {
         final int meta = world.getBlockData(tilePos);
         world.setBlockIdDataNotify(tilePos, Blocks.TRAPDOOR_PLANKS_OAK.id(), meta & 0xF);
     }
 
     @Override
-    public void setColor(@NotNull World world, @NotNull TilePos tilePos, @NotNull DyeColor color) {
+    public void setColor(@NotNull World world, @NotNull TilePosc tilePos, @NotNull DyeColor color) {
         IPainted.super.setColor(world, tilePos, color);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrommel.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrommel.java
index 92ca36df5..68c92b2e3 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrommel.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicTrommel.java
@@ -11,6 +11,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
@@ -40,7 +41,7 @@ public class BlockLogicTrommel extends BlockLogicRotatable
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
         if (!world.isClientSide) {
             TileEntityTrommel tileEntityTrommel = (TileEntityTrommel) world.getTileEntity(tilePos);
             player.displayTrommelScreen(tileEntityTrommel);
@@ -49,13 +50,13 @@ public class BlockLogicTrommel extends BlockLogicRotatable
     }
 
     @Override
-	public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand)
+	public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand)
     {
         if(!this.isActive)
             return;
-        double xPos = (double) tilePos.x + rand.nextFloat();
-        double yPos = (double) tilePos.y + rand.nextFloat() * 0.5D + 1D;
-        double zPos = (double) tilePos.z + rand.nextFloat();
+        double xPos = (double) tilePos.x() + rand.nextFloat();
+        double yPos = (double) tilePos.y() + rand.nextFloat() * 0.5D + 1D;
+        double zPos = (double) tilePos.z() + rand.nextFloat();
         world.spawnParticle("smoke", xPos, yPos, zPos, 0.0D, 0.0D, 0.0D, 0);
     }
     
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicVeryRotatable.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicVeryRotatable.java
index b858c52d5..886abf81b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicVeryRotatable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicVeryRotatable.java
@@ -5,7 +5,7 @@ import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class BlockLogicVeryRotatable
@@ -17,14 +17,14 @@ public abstract class BlockLogicVeryRotatable
     }
 
     @Override
-    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
+    public void onPlacedByMob(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final @NotNull Mob mob, final double xHit, final double yHit) {
         final @NotNull Direction direction = mob.getPlacementDirection(side).getOpposite();
 
         world.setBlockDataNotify(tilePos, setDirection(0, direction));
     }
 
     @Override
-    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit) {
+    public void onPlacedOnSide(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit) {
         world.setBlockDataNotify(tilePos, setDirection(0, side.getDirection()));
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWireRedstone.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWireRedstone.java
index aed928b3c..b6585226a 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWireRedstone.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWireRedstone.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.support.PartialSupport;
@@ -11,12 +11,13 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -34,12 +35,12 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     private final Set<TilePos> toUpdate = new HashSet<>();
 
     public BlockLogicWireRedstone(@NotNull Block<?> block) {
-        super(block, Material.decoration);
+        super(block, Materials.DECORATION);
         setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F);
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return null;
     }
 
@@ -54,16 +55,16 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return PartialSupport.INSTANCE;
     }
 
     @Override
-    public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos) {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return isSupported(world, tilePos, Side.BOTTOM);
     }
 
-    private void updatePowerStrength(@NotNull World world, @NotNull TilePos tilePos) {
+    private void updatePowerStrength(@NotNull World world, @NotNull TilePosc tilePos) {
         updatePowerStrength(world, tilePos, tilePos);
         ArrayList<TilePos> toUpdate = new ArrayList<>(this.toUpdate);
         this.toUpdate.clear();
@@ -72,36 +73,37 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
         }
     }
 
-    private void updatePowerStrength(@NotNull World world, @NotNull TilePos curPos, @NotNull TilePos lastPos) {
+    private void updatePowerStrength(@NotNull World world, @NotNull TilePosc curPos, @NotNull TilePosc lastPos) {
         int strength = world.getBlockData(curPos);
         int newStrength = 0;
         this.shouldSignal = false;
         boolean hasNeighborSignal = world.hasNeighborSignal(curPos);
         this.shouldSignal = true;
+        TilePos queryPos = new TilePos();
         if (hasNeighborSignal) {
             newStrength = 15;
         } else {
             for (int i = 0; i < 4; i++) {
-                TilePos iPos = new TilePos(curPos);
+                int checkX = curPos.x();
+                int checkY = curPos.y();
+                int checkZ = curPos.z();
                 switch (i) {
-                    case 0 -> iPos.x--;
-                    case 1 -> iPos.x++;
-                    case 2 -> iPos.z--;
-                    case 3 -> iPos.z++;
+                    case 0 -> checkX--;
+                    case 1 -> checkX++;
+                    case 2 -> checkZ--;
+                    case 3 -> checkZ++;
                 }
-                if (!iPos.equals(lastPos)) {
-                    newStrength = checkTarget(world, iPos, newStrength);
+                if (!lastPos.equals(checkX, checkY, checkZ)) {
+                    newStrength = checkTarget(world, queryPos.set(checkX, checkY, checkZ), newStrength);
                 }
-                if (world.isBlockNormalCube(iPos) && !world.isBlockNormalCube(curPos.up())) {
-                    TilePos iUp = iPos.up();
-                    if (!iUp.equals(lastPos)) {
-                        newStrength = checkTarget(world, iUp, newStrength);
+                if (world.isBlockNormalCube(queryPos.set(checkX, checkY, checkZ)) && !world.isBlockNormalCube(curPos.up(queryPos))) {
+                    if (!queryPos.set(checkX, checkY + 1, checkZ).equals(lastPos)) {
+                        newStrength = checkTarget(world, queryPos.set(checkX, checkY + 1, checkZ), newStrength);
                     }
                     continue;
                 }
-                TilePos iDown = iPos.down();
-                if (!world.isBlockNormalCube(iPos) && !iDown.equals(lastPos)) {
-                    newStrength = checkTarget(world, iDown, newStrength);
+                if (!world.isBlockNormalCube(queryPos.set(checkX, checkY, checkZ)) && !lastPos.equals(checkX, checkY - 1, checkZ)) {
+                    newStrength = checkTarget(world, queryPos.set(checkX, checkY - 1, checkZ), newStrength);
                 }
             }
 
@@ -120,140 +122,134 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
                 world.noNeighborUpdate = false;
             }
             for (int i = 0; i < 4; i++) {
-                TilePos iPos = curPos.down();
+                int checkX = curPos.x();
+                int checkY = curPos.y() - 1;
+                int checkZ = curPos.z();
                 switch (i) {
-                    case 0 -> iPos.x--;
-                    case 1 -> iPos.x++;
-                    case 2 -> iPos.z--;
-                    case 3 -> iPos.z++;
+                    case 0 -> checkX--;
+                    case 1 -> checkX++;
+                    case 2 -> checkZ--;
+                    case 3 -> checkZ++;
                 }
-                if (world.isBlockNormalCube(new TilePos(iPos.x, curPos.y, iPos.z))) {
-                    iPos.y += 2;
+                if (world.isBlockNormalCube(queryPos.set(checkX, curPos.y(), checkZ))) {
+                    checkY += 2;
                 }
-                int targetStrength = checkTarget(world, new TilePos(iPos.x, curPos.y, iPos.z), -1);
+                int targetStrength = checkTarget(world, queryPos.set(checkX, curPos.y(), checkZ), -1);
                 newStrength = world.getBlockData(curPos) & MASK_POWER;
                 if (newStrength > 0) {
                     newStrength--;
                 }
                 if (targetStrength >= 0 && targetStrength != newStrength) {
-                    updatePowerStrength(world, new TilePos(iPos.x, curPos.y, iPos.z), curPos);
+                    updatePowerStrength(world, queryPos.set(checkX, curPos.y(), checkZ), curPos);
                 }
-                targetStrength = checkTarget(world, iPos, -1);
+                targetStrength = checkTarget(world, queryPos.set(checkX, checkY, checkZ), -1);
                 newStrength = world.getBlockData(curPos) & MASK_POWER;
                 if (newStrength > 0) {
                     newStrength--;
                 }
                 if (targetStrength >= 0 && targetStrength != newStrength) {
-                    updatePowerStrength(world, iPos, curPos);
+                    updatePowerStrength(world, queryPos.set(checkX, checkY, checkZ), curPos);
                 }
             }
 
             if (strength == 0 || newStrength == 0) {
                 this.toUpdate.add(new TilePos(curPos));
-                this.toUpdate.add(curPos.west());
-                this.toUpdate.add(curPos.east());
-                this.toUpdate.add(curPos.down());
-                this.toUpdate.add(curPos.up());
-                this.toUpdate.add(curPos.north());
-                this.toUpdate.add(curPos.south());
+                this.toUpdate.add(curPos.west(new TilePos()));
+                this.toUpdate.add(curPos.east(new TilePos()));
+                this.toUpdate.add(curPos.down(new TilePos()));
+                this.toUpdate.add(curPos.up(new TilePos()));
+                this.toUpdate.add(curPos.north(new TilePos()));
+                this.toUpdate.add(curPos.south(new TilePos()));
             }
         }
     }
 
-    private void checkCornerChangeAt(@NotNull World world, @NotNull TilePos tilePos) {
+    private void checkCornerChangeAt(@NotNull World world, @NotNull TilePosc tilePos) {
         if (world.getBlockId(tilePos) == id()) {
+            TilePos queryPos = new TilePos();
             world.notifyBlocksOfNeighborChange(tilePos, id());
-            world.notifyBlocksOfNeighborChange(tilePos.west(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.east(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.north(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.south(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.up(), id());
-            world.notifyBlocksOfNeighborChange(tilePos.down(), id());
+            world.notifyBlocksOfNeighborChange(tilePos.west(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.east(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.north(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.south(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
+            world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
         }
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
         super.onPlacedByWorld(world, tilePos);
         if (world.isClientSide) {
             return;
         }
-        TilePos up = tilePos.up();
-        TilePos down = tilePos.down();
-        TilePos north = tilePos.north();
-        TilePos south = tilePos.south();
-        TilePos west = tilePos.west();
-        TilePos east = tilePos.east();
-//        updatePowerStrength(world, x, y, z);
+        TilePos queryPos = new TilePos();
+
+        //        updatePowerStrength(world, x, y, z);
         world.getWireHandler().onWireAdded(tilePos);
-        world.notifyBlocksOfNeighborChange(up, id());
-        world.notifyBlocksOfNeighborChange(down, id());
-        checkCornerChangeAt(world, west);
-        checkCornerChangeAt(world, east);
-        checkCornerChangeAt(world, north);
-        checkCornerChangeAt(world, south);
-        if (world.isBlockNormalCube(west)) {
-            checkCornerChangeAt(world, west.up());
+        world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
+        world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
+        checkCornerChangeAt(world, tilePos.west(queryPos));
+        checkCornerChangeAt(world, tilePos.east(queryPos));
+        checkCornerChangeAt(world, tilePos.north(queryPos));
+        checkCornerChangeAt(world, tilePos.south(queryPos));
+        if (world.isBlockNormalCube(tilePos.west(queryPos))) {
+            checkCornerChangeAt(world, tilePos.west(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, west.down());
+            checkCornerChangeAt(world, tilePos.west(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(east)) {
-            checkCornerChangeAt(world, east.up());
+        if (world.isBlockNormalCube(tilePos.east(queryPos))) {
+            checkCornerChangeAt(world, tilePos.east(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, east.down());
+            checkCornerChangeAt(world, tilePos.east(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(north)) {
-            checkCornerChangeAt(world, north.up());
+        if (world.isBlockNormalCube(tilePos.north(queryPos))) {
+            checkCornerChangeAt(world, tilePos.north(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, north.down());
+            checkCornerChangeAt(world, tilePos.north(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(south)) {
-            checkCornerChangeAt(world, south.up());
+        if (world.isBlockNormalCube(tilePos.south(queryPos))) {
+            checkCornerChangeAt(world, tilePos.south(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, south.down());
+            checkCornerChangeAt(world, tilePos.south(queryPos).down(queryPos));
         }
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         super.onRemoved(world, tilePos, data);
         if (world.isClientSide) {
             return;
         }
-        TilePos up = tilePos.up();
-        TilePos down = tilePos.down();
-        TilePos north = tilePos.north();
-        TilePos south = tilePos.south();
-        TilePos west = tilePos.west();
-        TilePos east = tilePos.east();
-
-        world.notifyBlocksOfNeighborChange(up, id());
-        world.notifyBlocksOfNeighborChange(down, id());
+
+        TilePos queryPos = new TilePos();
+        world.notifyBlocksOfNeighborChange(tilePos.up(queryPos), id());
+        world.notifyBlocksOfNeighborChange(tilePos.down(queryPos), id());
 //        updatePowerStrength(world, x, y, z);
         world.getWireHandler().onWireRemoved(tilePos, new BlockState(this.id(), world.getBlockData(tilePos)));
-        checkCornerChangeAt(world, west);
-        checkCornerChangeAt(world, east);
-        checkCornerChangeAt(world, north);
-        checkCornerChangeAt(world, south);
-        if (world.isBlockNormalCube(west)) {
-            checkCornerChangeAt(world, west.up());
+        checkCornerChangeAt(world, tilePos.west(queryPos));
+        checkCornerChangeAt(world, tilePos.east(queryPos));
+        checkCornerChangeAt(world, tilePos.north(queryPos));
+        checkCornerChangeAt(world, tilePos.south(queryPos));
+        if (world.isBlockNormalCube(tilePos.west(queryPos))) {
+            checkCornerChangeAt(world, tilePos.west(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, west.down());
+            checkCornerChangeAt(world, tilePos.west(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(east)) {
-            checkCornerChangeAt(world, east.up());
+        if (world.isBlockNormalCube(tilePos.east(queryPos))) {
+            checkCornerChangeAt(world, tilePos.east(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, east.down());
+            checkCornerChangeAt(world, tilePos.east(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(north)) {
-            checkCornerChangeAt(world, north.up());
+        if (world.isBlockNormalCube(tilePos.north(queryPos))) {
+            checkCornerChangeAt(world, tilePos.north(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, north.down());
+            checkCornerChangeAt(world, tilePos.north(queryPos).down(queryPos));
         }
-        if (world.isBlockNormalCube(south)) {
-            checkCornerChangeAt(world, south.up());
+        if (world.isBlockNormalCube(tilePos.south(queryPos))) {
+            checkCornerChangeAt(world, tilePos.south(queryPos).up(queryPos));
         } else {
-            checkCornerChangeAt(world, south.down());
+            checkCornerChangeAt(world, tilePos.south(queryPos).down(queryPos));
         }
     }
 
@@ -267,7 +263,7 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         if (world.isClientSide || world.getWireHandler().onWireUpdated(tilePos)) {
             return;
         }
@@ -288,12 +284,12 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingDirectSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return this.shouldSignal && isEmittingSignal(world, tilePos, side);
     }
 
     @Override
-    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePos tilePos, @NotNull Side side) {
+    public boolean isEmittingSignal(@NotNull WorldSource source, @NotNull TilePosc tilePos, @NotNull Side side) {
         if (!this.shouldSignal) {
             return false;
         }
@@ -305,37 +301,38 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
             return true;
         }
 
+        TilePos queryPos = new TilePos();
         boolean negXShouldConnectTo =
-            shouldConnectTo(source, tilePos.add(-1, 0, 0), Side.WEST) ||
-                !source.isBlockNormalCube(tilePos.add(-1, 0, 0)) &&
-                    shouldConnectToDiagonal(source, tilePos.add(-1, -1, 0), Side.NONE, Side.BOTTOM);
+            shouldConnectTo(source, tilePos.add(-1, 0, 0, queryPos), Side.WEST) ||
+                !source.isBlockNormalCube(tilePos.add(-1, 0, 0, queryPos)) &&
+                    shouldConnectToDiagonal(source, tilePos.add(-1, -1, 0, queryPos), Side.NONE, Side.BOTTOM);
 
         boolean posXShouldConnectTo =
-            shouldConnectTo(source, tilePos.add( 1, 0, 0), Side.EAST) ||
-                !source.isBlockNormalCube(tilePos.add( 1, 0, 0)) &&
-                    shouldConnectToDiagonal(source, tilePos.add( 1, -1, 0), Side.NONE, Side.BOTTOM);
+            shouldConnectTo(source, tilePos.add(1, 0, 0, queryPos), Side.EAST) ||
+                !source.isBlockNormalCube(tilePos.add(1, 0, 0, queryPos)) &&
+                    shouldConnectToDiagonal(source, tilePos.add(1, -1, 0, queryPos), Side.NONE, Side.BOTTOM);
 
         boolean negZShouldConnectTo =
-            shouldConnectTo(source, tilePos.add(0, 0, -1), Side.NORTH) ||
-                !source.isBlockNormalCube(tilePos.add(0, 0, -1)) &&
-                    shouldConnectToDiagonal(source, tilePos.add(0, -1, -1), Side.NONE, Side.BOTTOM);
+            shouldConnectTo(source, tilePos.add(0, 0, -1, queryPos), Side.NORTH) ||
+                !source.isBlockNormalCube(tilePos.add(0, 0, -1, queryPos)) &&
+                    shouldConnectToDiagonal(source, tilePos.add(0, -1, -1, queryPos), Side.NONE, Side.BOTTOM);
 
         boolean posZShouldConnectTo =
-            shouldConnectTo(source, tilePos.add(0, 0, 1), Side.SOUTH) ||
-                !source.isBlockNormalCube(tilePos.add(0, 0, 1)) &&
-                    shouldConnectToDiagonal(source, tilePos.add(0, -1, 1), Side.NONE, Side.BOTTOM);
+            shouldConnectTo(source, tilePos.add(0, 0, 1, queryPos), Side.SOUTH) ||
+                !source.isBlockNormalCube(tilePos.add(0, 0, 1, queryPos)) &&
+                    shouldConnectToDiagonal(source, tilePos.add(0, -1, 1, queryPos), Side.NONE, Side.BOTTOM);
 
-        if (!source.isBlockNormalCube(tilePos.up())) {
-            if (source.isBlockNormalCube(tilePos.add(-1, 0, 0)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0), Side.NONE, Side.TOP)) {
+        if (!source.isBlockNormalCube(tilePos.up(queryPos))) {
+            if (source.isBlockNormalCube(tilePos.add(-1, 0, 0, queryPos)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 negXShouldConnectTo = true;
             }
-            if (source.isBlockNormalCube(tilePos.add( 1, 0, 0)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0), Side.NONE, Side.TOP)) {
+            if (source.isBlockNormalCube(tilePos.add(1, 0, 0, queryPos)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 posXShouldConnectTo = true;
             }
-            if (source.isBlockNormalCube(tilePos.add(0, 0, -1)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0), Side.NONE, Side.TOP)) {
+            if (source.isBlockNormalCube(tilePos.add(0, 0, -1, queryPos)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 negZShouldConnectTo = true;
             }
-            if (source.isBlockNormalCube(tilePos.add(0, 0, 1)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0), Side.NONE, Side.TOP)) {
+            if (source.isBlockNormalCube(tilePos.add(0, 0, 1, queryPos)) && shouldConnectToDiagonal(source, tilePos.add(-1, 1, 0, queryPos), Side.NONE, Side.TOP)) {
                 posZShouldConnectTo = true;
             }
         }
@@ -378,14 +375,14 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     }
 
     @Override
-    public void animationTick(@NotNull World world, @NotNull TilePos tilePos, @NotNull Random rand) {
+    public void animationTick(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Random rand) {
         int meta = world.getBlockData(tilePos) & MASK_POWER;
         if (meta == 0) {
             return;
         }
-        double px = (double) tilePos.x + 0.5D + (rand.nextFloat() - 0.5D) * 0.2D;
-        double py = (double) tilePos.y + 0.0625D;
-        double pz = (double) tilePos.z + 0.5D + (rand.nextFloat() - 0.5D) * 0.2D;
+        double px = (double) tilePos.x() + 0.5D + (rand.nextFloat() - 0.5D) * 0.2D;
+        double py = (double) tilePos.y() + 0.0625D;
+        double pz = (double) tilePos.z() + 0.5D + (rand.nextFloat() - 0.5D) * 0.2D;
 
         final int redstoneBrightness = meta & 0xF;
 
@@ -426,14 +423,15 @@ public class BlockLogicWireRedstone extends BlockLogic implements ISupportable {
     }
 
     public static boolean shouldConnectToDiagonal(@NotNull WorldSource worldSource, @NotNull TilePos tilePos, @NotNull Side side1, @NotNull Side side2) {
-        if (!(side2 == Side.TOP || side2 == Side.BOTTOM)) return false; // Maybe some can generate a connection if placed below a block in the future?
+        if (!(side2 == Side.TOP || side2 == Side.BOTTOM))
+            return false; // Maybe some can generate a connection if placed below a block in the future?
 
         int blockId = worldSource.getBlockId(tilePos);
         return blockId == Blocks.WIRE_REDSTONE.id();
     }
 
     @Override
-    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupportConstraint(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return side == Side.BOTTOM ? PartialSupport.INSTANCE.center() : PartialSupport.INSTANCE;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWool.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWool.java
index 94d3981a7..13149ae0d 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWool.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWool.java
@@ -1,14 +1,14 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.entity.TileEntity;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -16,11 +16,11 @@ public class BlockLogicWool extends BlockLogic implements IPainted
 {
     public BlockLogicWool(@NotNull Block<?> block) {
 
-        super(block, Material.cloth);
+        super(block, Materials.CLOTH);
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return itemStack.getMetadata() & 0xF;
     }
 
@@ -46,7 +46,7 @@ public class BlockLogicWool extends BlockLogic implements IPainted
     }
 
     @Override
-    public void removeDye(@NotNull World world, @NotNull TilePos tilePos) {
+    public void removeDye(@NotNull World world, @NotNull TilePosc tilePos) {
         world.setBlockDataNotify(tilePos, 0);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWorkbench.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWorkbench.java
index 0a129c713..5489d4f55 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicWorkbench.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicWorkbench.java
@@ -1,25 +1,22 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class BlockLogicWorkbench extends BlockLogic
-{
+public class BlockLogicWorkbench extends BlockLogic {
 
-	public BlockLogicWorkbench(@NotNull Block<?> block)
-    {
-        super(block, Material.wood);
+    public BlockLogicWorkbench(@NotNull Block<?> block) {
+        super(block, Materials.WOOD);
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        if (!world.isClientSide)
-        {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        if (!world.isClientSide) {
             player.displayWorkbenchScreen(tilePos);
         }
         return true;
diff --git a/game/core/src/main/java/net/minecraft/core/block/Blocks.java b/game/core/src/main/java/net/minecraft/core/block/Blocks.java
index 5959ef2c8..d6430ac31 100644
--- a/game/core/src/main/java/net/minecraft/core/block/Blocks.java
+++ b/game/core/src/main/java/net/minecraft/core/block/Blocks.java
@@ -2,14 +2,13 @@ package net.minecraft.core.block;
 
 import it.unimi.dsi.fastutil.objects.Object2IntMap;
 import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.material.MaterialColor;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.piston.BlockLogicPistonBase;
 import net.minecraft.core.block.piston.BlockLogicPistonHead;
 import net.minecraft.core.block.piston.BlockLogicPistonMoving;
 import net.minecraft.core.block.piston.BlockLogicPistonBaseSteel;
 import net.minecraft.core.block.piston.BlockLogicPistonBaseSticky;
-import net.minecraft.core.block.support.ISupportable;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.data.tag.Tag;
 import net.minecraft.core.entity.Entity;
@@ -43,83 +42,83 @@ public final class Blocks {
     public static final boolean[] neighborNotifyOnMetadataChangeDisabled = new boolean[blocksList.length];
     public static int highestBlockId = 0;
 
-    public static final Block<?> STONE = register("stone", "minecraft:block/stone", 1, (b) -> new BlockLogicStone(b, Blocks.COBBLE_STONE, Material.stone))
+    public static final Block<?> STONE = register("stone", "minecraft:block/stone", 1, (b) -> new BlockLogicStone(b, Blocks.COBBLE_STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BASALT = register("basalt", "minecraft:block/basalt", 2, (b) -> new BlockLogicStone(b, Blocks.COBBLE_BASALT, Material.basalt))
+    public static final Block<?> BASALT = register("basalt", "minecraft:block/basalt", 2, (b) -> new BlockLogicStone(b, Blocks.COBBLE_BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> LIMESTONE = register("limestone", "minecraft:block/limestone", 3, (b) -> new BlockLogicStone(b, Blocks.COBBLE_LIMESTONE, Material.limestone))
+    public static final Block<?> LIMESTONE = register("limestone", "minecraft:block/limestone", 3, (b) -> new BlockLogicStone(b, Blocks.COBBLE_LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> GRANITE = register("granite", "minecraft:block/granite", 4, (b) -> new BlockLogicStone(b, Blocks.COBBLE_GRANITE, Material.granite))
+    public static final Block<?> GRANITE = register("granite", "minecraft:block/granite", 4, (b) -> new BlockLogicStone(b, Blocks.COBBLE_GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> MARBLE = register("marble", "minecraft:block/marble", 5, (b) -> new BlockLogic(b, Material.marble))
+    public static final Block<?> MARBLE = register("marble", "minecraft:block/marble", 5, (b) -> new BlockLogic(b, Materials.MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> SLATE = register("slate", "minecraft:block/slate", 6, (b) -> new BlockLogic(b, Material.slate))
+    public static final Block<?> SLATE = register("slate", "minecraft:block/slate", 6, (b) -> new BlockLogic(b, Materials.SLATE))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> PERMAFROST = register("permafrost", "minecraft:block/permafrost", 7, (b) -> new BlockLogicStone(b, Blocks.COBBLE_PERMAFROST, Material.permafrost))
+    public static final Block<?> PERMAFROST = register("permafrost", "minecraft:block/permafrost", 7, (b) -> new BlockLogicStone(b, Blocks.COBBLE_PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> COBBLE_STONE = register("cobble.stone", "minecraft:block/cobble_stone", 10, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_STONE = register("cobble.stone", "minecraft:block/cobble_stone", 10, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_STONE_MOSSY = register("cobble.stone.mossy", "minecraft:block/cobble_stone_mossy", 11, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_STONE_MOSSY = register("cobble.stone.mossy", "minecraft:block/cobble_stone_mossy", 11, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS);
-    public static final Block<?> COBBLE_BASALT = register("cobble.basalt", "minecraft:block/cobble_basalt", 12, (b) -> new BlockLogicCobble(b, Material.basalt, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_BASALT = register("cobble.basalt", "minecraft:block/cobble_basalt", 12, (b) -> new BlockLogicCobble(b, Materials.BASALT, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_LIMESTONE = register("cobble.limestone", "minecraft:block/cobble_limestone", 13, (b) -> new BlockLogicCobble(b, Material.limestone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_LIMESTONE = register("cobble.limestone", "minecraft:block/cobble_limestone", 13, (b) -> new BlockLogicCobble(b, Materials.LIMESTONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_GRANITE = register("cobble.granite", "minecraft:block/cobble_granite", 14, (b) -> new BlockLogicCobble(b, Material.granite, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_GRANITE = register("cobble.granite", "minecraft:block/cobble_granite", 14, (b) -> new BlockLogicCobble(b, Materials.GRANITE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_PERMAFROST = register("cobble.permafrost", "minecraft:block/cobble_permafrost", 15, (b) -> new BlockLogicCobble(b, Material.permafrost, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_PERMAFROST = register("cobble.permafrost", "minecraft:block/cobble_permafrost", 15, (b) -> new BlockLogicCobble(b, Materials.PERMAFROST, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.PERMAFROST).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_BASALT_MOSSY = register("cobble.basalt.mossy", "minecraft:block/cobble_basalt_mossy", 16, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_BASALT_MOSSY = register("cobble.basalt.mossy", "minecraft:block/cobble_basalt_mossy", 16, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS);
-    public static final Block<?> COBBLE_LIMESTONE_MOSSY = register("cobble.limestone.mossy", "minecraft:block/cobble_limestone_mossy", 17, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_LIMESTONE_MOSSY = register("cobble.limestone.mossy", "minecraft:block/cobble_limestone_mossy", 17, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS);
-    public static final Block<?> COBBLE_GRANITE_MOSSY = register("cobble.granite.mossy", "minecraft:block/cobble_granite_mossy", 18, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.GRAVEL))
+    public static final Block<?> COBBLE_GRANITE_MOSSY = register("cobble.granite.mossy", "minecraft:block/cobble_granite_mossy", 18, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.GRAVEL))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS);
 
-    public static final Block<?> PILLAR_MARBLE = register("pillar.marble", "minecraft:block/pillar_marble", 20, (b) -> new BlockLogicAxisAligned(b, Material.marble))
+    public static final Block<?> PILLAR_MARBLE = register("pillar.marble", "minecraft:block/pillar_marble", 20, (b) -> new BlockLogicAxisAligned(b, Materials.MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> CAPSTONE_MARBLE = register("capstone.marble", "minecraft:block/capstone_marble", 21, (b) -> new BlockLogic(b, Material.marble))
+    public static final Block<?> CAPSTONE_MARBLE = register("capstone.marble", "minecraft:block/capstone_marble", 21, (b) -> new BlockLogic(b, Materials.MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> SANDSTONE = register("sandstone", "minecraft:block/sandstone", 30, (b) -> new BlockLogicSandstone(b, Material.stone))
+    public static final Block<?> SANDSTONE = register("sandstone", "minecraft:block/sandstone", 30, (b) -> new BlockLogicSandstone(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(0.8F).withOverrideColor(MaterialColor.sand)
         .withTags(BlockTags.CAVES_CUT_THROUGH, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> STONE_CARVED = register("stone.carved", "minecraft:block/stone_carved", 40, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> STONE_CARVED = register("stone.carved", "minecraft:block/stone_carved", 40, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> GRANITE_CARVED = register("granite.carved", "minecraft:block/granite_carved", 41, (b) -> new BlockLogic(b, Material.granite))
+    public static final Block<?> GRANITE_CARVED = register("granite.carved", "minecraft:block/granite_carved", 41, (b) -> new BlockLogic(b, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> LIMESTONE_CARVED = register("limestone.carved", "minecraft:block/limestone_carved", 42, (b) -> new BlockLogic(b, Material.limestone))
+    public static final Block<?> LIMESTONE_CARVED = register("limestone.carved", "minecraft:block/limestone_carved", 42, (b) -> new BlockLogic(b, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BASALT_CARVED = register("basalt.carved", "minecraft:block/basalt_carved", 43, (b) -> new BlockLogic(b, Material.basalt))
+    public static final Block<?> BASALT_CARVED = register("basalt.carved", "minecraft:block/basalt_carved", 43, (b) -> new BlockLogic(b, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> PERMAFROST_CARVED = register("permafrost.carved", "minecraft:block/permafrost_carved", 44, (b) -> new BlockLogic(b, Material.permafrost))
+    public static final Block<?> PERMAFROST_CARVED = register("permafrost.carved", "minecraft:block/permafrost_carved", 44, (b) -> new BlockLogic(b, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(1.0F).withBlastResistance(10F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> NETHERRACK_CARVED = register("netherrack.carved", "minecraft:block/netherrack_carved", 45, (b) -> new BlockLogic(b, Material.netherrack))
+    public static final Block<?> NETHERRACK_CARVED = register("netherrack.carved", "minecraft:block/netherrack_carved", 45, (b) -> new BlockLogic(b, Materials.NETHERRACK))
         .withSound(BlockSounds.STONE).withHardness(0.4F).withBlastResistance(1F).withDisabledStats()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -136,7 +135,7 @@ public final class Blocks {
         .withTags(BlockTags.BROKEN_BY_FLUIDS);
 //    public static final BlockContainer<?> candleSoulwax;
 
-    public static final Block<?> LADDER_OAK = register("ladder.oak", "minecraft:block/ladder_oak", 70, BlockLogicLadder::new)
+    public static final Block<? extends BlockLogicLadder> LADDER_OAK = register("ladder.oak", "minecraft:block/ladder_oak", 70, BlockLogicLadder::new)
         .withSound(BlockSounds.WOOD).withHardness(0.4F).withDisabledNeighborNotifyOnMetadataChange()
         .setBlockItem(ItemBlockLadder::new)
         .withTags(BlockTags.MINEABLE_BY_AXE);
@@ -157,7 +156,7 @@ public final class Blocks {
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withTags(BlockTags.FENCES_CONNECT, BlockTags.MINEABLE_BY_AXE);
 
-    public static final Block<?> BOOKSHELF_PLANKS_OAK = register("bookshelf.planks.oak", "minecraft:block/bookshelf_planks_oak", 100, (b) -> new BlockLogicBookshelf(b, Material.wood))
+    public static final Block<?> BOOKSHELF_PLANKS_OAK = register("bookshelf.planks.oak", "minecraft:block/bookshelf_planks_oak", 100, (b) -> new BlockLogicBookshelf(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(1.5F)
         .withTags(BlockTags.FENCES_CONNECT, BlockTags.MINEABLE_BY_AXE);
 
@@ -169,49 +168,49 @@ public final class Blocks {
         .withSound(BlockSounds.CLOTH).withHardness(0.01F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.ROPE)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.PREVENT_MOB_SPAWNS, BlockTags.CAN_HANG_OFF, BlockTags.INSTANT_PICKUP);
 
-    public static final Block<?> BRICK_CLAY = register("brick.clay", "minecraft:block/brick_clay", 120, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_CLAY = register("brick.clay", "minecraft:block/brick_clay", 120, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3.0F).withBlastResistance(10F).withOverrideColor(MaterialColor.brick)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_STONE_POLISHED = register("brick.stone.polished", "minecraft:block/brick_stone_polished", 121, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_STONE_POLISHED = register("brick.stone.polished", "minecraft:block/brick_stone_polished", 121, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_STONE_POLISHED_MOSSY = register("brick.stone.polished.mossy", "minecraft:block/brick_stone_polished_mossy", 122, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_STONE_POLISHED_MOSSY = register("brick.stone.polished.mossy", "minecraft:block/brick_stone_polished_mossy", 122, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(2F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS);
-    public static final Block<?> BRICK_SANDSTONE = register("brick.sandstone", "minecraft:block/brick_sandstone", 123, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_SANDSTONE = register("brick.sandstone", "minecraft:block/brick_sandstone", 123, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(0.8F).withBlastResistance(10F).withOverrideColor(MaterialColor.sand)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_GOLD = register("brick.gold", "minecraft:block/brick_gold", 124, (b) -> new BlockLogic(b, Material.metal))
+    public static final Block<?> BRICK_GOLD = register("brick.gold", "minecraft:block/brick_gold", 124, (b) -> new BlockLogic(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.gold)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_LAPIS = register("brick.lapis", "minecraft:block/brick_lapis", 125, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_LAPIS = register("brick.lapis", "minecraft:block/brick_lapis", 125, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.lapis)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_BASALT = register("brick.basalt", "minecraft:block/brick_basalt", 126, (b) -> new BlockLogic(b, Material.basalt))
+    public static final Block<?> BRICK_BASALT = register("brick.basalt", "minecraft:block/brick_basalt", 126, (b) -> new BlockLogic(b, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_LIMESTONE = register("brick.limestone", "minecraft:block/brick_limestone", 127, (b) -> new BlockLogic(b, Material.limestone))
+    public static final Block<?> BRICK_LIMESTONE = register("brick.limestone", "minecraft:block/brick_limestone", 127, (b) -> new BlockLogic(b, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_GRANITE = register("brick.granite", "minecraft:block/brick_granite", 128, (b) -> new BlockLogic(b, Material.granite))
+    public static final Block<?> BRICK_GRANITE = register("brick.granite", "minecraft:block/brick_granite", 128, (b) -> new BlockLogic(b, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_MARBLE = register("brick.marble", "minecraft:block/brick_marble", 129, (b) -> new BlockLogic(b, Material.marble))
+    public static final Block<?> BRICK_MARBLE = register("brick.marble", "minecraft:block/brick_marble", 129, (b) -> new BlockLogic(b, Materials.MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_SLATE = register("brick.slate", "minecraft:block/brick_slate", 130, (b) -> new BlockLogic(b, Material.slate))
+    public static final Block<?> BRICK_SLATE = register("brick.slate", "minecraft:block/brick_slate", 130, (b) -> new BlockLogic(b, Materials.SLATE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_STONE = register("brick.stone", "minecraft:block/brick_stone", 131, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BRICK_STONE = register("brick.stone", "minecraft:block/brick_stone", 131, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_PERMAFROST = register("brick.permafrost", "minecraft:block/brick_permafrost", 132, (b) -> new BlockLogic(b, Material.permafrost))
+    public static final Block<?> BRICK_PERMAFROST = register("brick.permafrost", "minecraft:block/brick_permafrost", 132, (b) -> new BlockLogic(b, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(1.0F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_IRON = register("brick.iron", "minecraft:block/brick_iron", 133, (b) -> new BlockLogic(b, Material.metal))
+    public static final Block<?> BRICK_IRON = register("brick.iron", "minecraft:block/brick_iron", 133, (b) -> new BlockLogic(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(5F).withBlastResistance(10F).withOverrideColor(MaterialColor.iron)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BRICK_STEEL = register("brick.steel", "minecraft:block/brick_steel", 134, (b) -> new BlockLogic(b, Material.steel))
+    public static final Block<?> BRICK_STEEL = register("brick.steel", "minecraft:block/brick_steel", 134, (b) -> new BlockLogic(b, Materials.STEEL))
         .withSound(BlockSounds.METAL).withHardness(5F).withBlastResistance(2000F).withOverrideColor(MaterialColor.steel)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -333,17 +332,17 @@ public final class Blocks {
         .withSound(BlockSounds.PERMAFROST).withDisabledNeighborNotifyOnMetadataChange().withLitInteriorSurface(true)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> OBSIDIAN = register("obsidian", "minecraft:block/obsidian", 180, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> OBSIDIAN = register("obsidian", "minecraft:block/obsidian", 180, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(10F).withBlastResistance(2000F).withOverrideColor(MaterialColor.paintedBlack).withImmovableFlagSet()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.PISTON_CRUSHING);
 
-    public static final Block<?> GLASS = register("glass", "minecraft:block/glass", 190, (b) -> new BlockLogicGlass(b, Material.glass))
+    public static final Block<?> GLASS = register("glass", "minecraft:block/glass", 190, (b) -> new BlockLogicGlass(b, Materials.GLASS))
         .withSound(BlockSounds.GLASS).withHardness(0.3F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.EXTENDS_MOTION_SENSOR_RANGE);
     public static final Block<?> GLASS_TINTED = register("glass.tinted", "minecraft:block/glass_tinted", 191, BlockLogicGlassTinted::new)
         .withSound(BlockSounds.GLASS).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> GLASS_STEEL = register("glass.steel", "minecraft:block/glass_steel", 192, (b) -> new BlockLogicTransparent(b, Material.glass))
+    public static final Block<?> GLASS_STEEL = register("glass.steel", "minecraft:block/glass_steel", 192, (b) -> new BlockLogicTransparent(b, Materials.GLASS))
         .withSound(BlockSounds.GLASS).withHardness(0.3F).withBlastResistance(2000F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.EXTENDS_MOTION_SENSOR_RANGE);
 
@@ -361,20 +360,20 @@ public final class Blocks {
         .withSound(BlockSounds.GRAVEL).withHardness(0.5F).withLitInteriorSurface(true).withOverrideColor(MaterialColor.grassScorched)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL);
 
-    public static final Block<?> DIRT = register("dirt", "minecraft:block/dirt", 220, (b) -> new BlockLogic(b, Material.dirt))
+    public static final Block<?> DIRT = register("dirt", "minecraft:block/dirt", 220, (b) -> new BlockLogic(b, Materials.DIRT))
         .withSound(BlockSounds.GRAVEL).withHardness(0.5F)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL, BlockTags.GROWS_FLOWERS, BlockTags.GROWS_SUGAR_CANE, BlockTags.GROWS_TREES, BlockTags.CAVES_CUT_THROUGH);
-    public static final Block<?> DIRT_SCORCHED = register("dirt.scorched", "minecraft:block/dirt_scorched", 221, (b) -> new BlockLogic(b, Material.dirt))
+    public static final Block<?> DIRT_SCORCHED = register("dirt.scorched", "minecraft:block/dirt_scorched", 221, (b) -> new BlockLogic(b, Materials.DIRT))
         .withSound(BlockSounds.GRAVEL).withHardness(0.5F).withOverrideColor(MaterialColor.dirtScorched)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL, BlockTags.GROWS_FLOWERS, BlockTags.GROWS_SUGAR_CANE, BlockTags.GROWS_CACTI, BlockTags.GROWS_TREES, BlockTags.CAVES_CUT_THROUGH);
-    public static final Block<?> DIRT_SCORCHED_RICH = register("dirt.scorched.rich", "minecraft:block/dirt_scorched_rich", 222, (b) -> new BlockLogic(b, Material.dirt))
+    public static final Block<?> DIRT_SCORCHED_RICH = register("dirt.scorched.rich", "minecraft:block/dirt_scorched_rich", 222, (b) -> new BlockLogic(b, Materials.DIRT))
         .withSound(BlockSounds.GRAVEL).withHardness(0.6F).withOverrideColor(MaterialColor.dirtScorched)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL, BlockTags.GROWS_FLOWERS, BlockTags.GROWS_SUGAR_CANE, BlockTags.GROWS_CACTI, BlockTags.CAVES_CUT_THROUGH);
 
-    public static final Block<?> MUD = register("mud", "minecraft:block/mud", 225, (b) -> new BlockLogicMud(b, Material.dirt, false))
+    public static final Block<?> MUD = register("mud", "minecraft:block/mud", 225, (b) -> new BlockLogicMud(b, Materials.DIRT, false))
         .withSound(BlockSounds.GRAVEL).withHardness(0.6F).withOverrideColor(MaterialColor.mud)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL, BlockTags.GROWS_FLOWERS, BlockTags.GROWS_CACTI, BlockTags.GROWS_TREES, BlockTags.CAVES_CUT_THROUGH, BlockTags.GROWS_SUGAR_CANE);
-    public static final Block<?> MUD_BAKED = register("mud.baked", "minecraft:block/mud_baked", 226, (b) -> new BlockLogicMud(b, Material.steel, true))
+    public static final Block<?> MUD_BAKED = register("mud.baked", "minecraft:block/mud_baked", 226, (b) -> new BlockLogicMud(b, Materials.STEEL, true))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withOverrideColor(MaterialColor.dirt)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS, BlockTags.GROWS_CACTI, BlockTags.GROWS_TREES, BlockTags.CAVES_CUT_THROUGH, BlockTags.GROWS_SUGAR_CANE);
 
@@ -410,27 +409,27 @@ public final class Blocks {
     public static final Block<?> GRAVEL = register("gravel", "minecraft:block/gravel", 251, BlockLogicGravel::new)
         .withSound(BlockSounds.GRAVEL).withHardness(0.6F)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL);
-    public static final Block<?> SULFUR = register("sulfur", "minecraft:block/sulfur", 252, (b) -> new BlockLogic(b, Material.sand))
+    public static final Block<?> SULFUR = register("sulfur", "minecraft:block/sulfur", 252, (b) -> new BlockLogic(b, Materials.SAND))
             .withSound(BlockSounds.SAND).withHardness(0.7F)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL);
 
-    public static final Block<?> BEDROCK = register("bedrock", "minecraft:block/bedrock", 260, (b) -> new BlockLogicBedrock(b, Material.stone))
+    public static final Block<?> BEDROCK = register("bedrock", "minecraft:block/bedrock", 260, (b) -> new BlockLogicBedrock(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withSetUnbreakable().withBlastResistance(6000000F).withImmovableFlagSet()
         .withTags(BlockTags.PISTON_CRUSHING);
-    public static final Block<?> BONESHALE = register("boneshale", "minecraft:block/boneshale", 261, (b) -> new BlockLogicBoneShale(b, Material.stone))
+    public static final Block<?> BONESHALE = register("boneshale", "minecraft:block/boneshale", 261, (b) -> new BlockLogicBoneShale(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(16F).withBlastResistance(6000000F).withImmovableFlagSet()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NETHER_MOBS_SPAWN);
 
-    public static final Block<BlockLogicFluid> FLUID_WATER_FLOWING = register("fluid.water.flowing", "minecraft:block/fluid_water_flowing", 270, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidFlowing(b, Material.water, new FluidWater(), Blocks.FLUID_WATER_STILL))
+    public static final Block<BlockLogicFluid> FLUID_WATER_FLOWING = register("fluid.water.flowing", "minecraft:block/fluid_water_flowing", 270, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidFlowing(b, Materials.WATER, new FluidWater(), Blocks.FLUID_WATER_STILL))
         .withHardness(100F).withLightBlock(3).withDisabledNeighborNotifyOnMetadataChange().withDisabledStats()
         .withTags(BlockTags.IS_WATER, BlockTags.PLACE_OVERWRITES, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicFluid> FLUID_WATER_STILL = register("fluid.water.still", "minecraft:block/fluid_water_still", 271, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidStill(b, Material.water, new FluidWater(), Blocks.FLUID_WATER_FLOWING))
+    public static final Block<BlockLogicFluid> FLUID_WATER_STILL = register("fluid.water.still", "minecraft:block/fluid_water_still", 271, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidStill(b, Materials.WATER, new FluidWater(), Blocks.FLUID_WATER_FLOWING))
         .withHardness(100F).withLightBlock(3).withDisabledNeighborNotifyOnMetadataChange().withDisabledStats().setStatParent(() -> FLUID_WATER_FLOWING)
         .withTags(BlockTags.IS_WATER, BlockTags.PLACE_OVERWRITES, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicFluid> FLUID_LAVA_FLOWING = register("fluid.lava.flowing", "minecraft:block/fluid_lava_flowing", 272, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidFlowing(b, Material.lava, new FluidLava(), Blocks.FLUID_LAVA_STILL))
+    public static final Block<BlockLogicFluid> FLUID_LAVA_FLOWING = register("fluid.lava.flowing", "minecraft:block/fluid_lava_flowing", 272, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidFlowing(b, Materials.LAVA, new FluidLava(), Blocks.FLUID_LAVA_STILL))
         .withHardness(0.0F).withLightEmission(1.0F).withLightBlock(255).withDisabledNeighborNotifyOnMetadataChange().withDisabledStats()
         .withTags(BlockTags.IS_LAVA, BlockTags.PLACE_OVERWRITES, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicFluid> FLUID_LAVA_STILL = register("fluid.lava.still", "minecraft:block/fluid_lava_still", 273, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidStill(b, Material.lava, new FluidLava(), Blocks.FLUID_LAVA_FLOWING))
+    public static final Block<BlockLogicFluid> FLUID_LAVA_STILL = register("fluid.lava.still", "minecraft:block/fluid_lava_still", 273, (BlockLogicSupplier<BlockLogicFluid>) b -> new BlockLogicFluidStill(b, Materials.LAVA, new FluidLava(), Blocks.FLUID_LAVA_FLOWING))
         .withHardness(100F).withLightEmission(1.0F).withLightBlock(255).withDisabledNeighborNotifyOnMetadataChange().withDisabledStats().setStatParent(() -> FLUID_LAVA_FLOWING)
         .withTags(BlockTags.IS_LAVA, BlockTags.PLACE_OVERWRITES, BlockTags.NOT_IN_CREATIVE_MENU);
 
@@ -462,13 +461,13 @@ public final class Blocks {
     public static final Block<?> LEAVES_OAK = register("leaves.oak", "minecraft:block/leaves_oak", 290, BlockLogicLeavesOak::new)
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
-    public static final Block<?> LEAVES_OAK_RETRO = register("leaves.oak.retro", "minecraft:block/leaves_oak_retro", 291, (b) -> new BlockLogicLeavesBase(b, Material.leaves, Blocks.SAPLING_OAK_RETRO))
+    public static final Block<?> LEAVES_OAK_RETRO = register("leaves.oak.retro", "minecraft:block/leaves_oak_retro", 291, (b) -> new BlockLogicLeavesBase(b, Materials.LEAVES, Blocks.SAPLING_OAK_RETRO))
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
     public static final Block<?> LEAVES_PINE = register("leaves.pine", "minecraft:block/leaves_pine", 292, BlockLogicLeavesPine::new)
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.pineLeaves)
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
-    public static final Block<?> LEAVES_BIRCH = register("leaves.birch", "minecraft:block/leaves_birch", 293, (b) -> new BlockLogicLeavesBase(b, Material.leaves, Blocks.SAPLING_BIRCH))
+    public static final Block<?> LEAVES_BIRCH = register("leaves.birch", "minecraft:block/leaves_birch", 293, (b) -> new BlockLogicLeavesBase(b, Materials.LEAVES, Blocks.SAPLING_BIRCH))
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.birchLeaves)
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
     public static final Block<?> LEAVES_CHERRY = register("leaves.cherry", "minecraft:block/leaves_cherry", 294, BlockLogicLeavesCherry::new)
@@ -486,10 +485,10 @@ public final class Blocks {
     public static final Block<?> LEAVES_CACAO = register("leaves.cacao", "minecraft:block/leaves_cacao", 298, BlockLogicLeavesCacao::new)
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
-    public static final Block<?> LEAVES_THORN = register("leaves.thorn", "minecraft:block/leaves_thorn", 299, (b) -> new BlockLogicLeavesBase(b, Material.leaves, Blocks.SAPLING_THORN))
+    public static final Block<?> LEAVES_THORN = register("leaves.thorn", "minecraft:block/leaves_thorn", 299, (b) -> new BlockLogicLeavesBase(b, Materials.LEAVES, Blocks.SAPLING_THORN))
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.thornLeaves)
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
-    public static final Block<?> LEAVES_PALM = register("leaves.palm", "minecraft:block/leaves_palm", 300, (b) -> new BlockLogicLeavesBase(b, Material.leaves, Blocks.SAPLING_PALM))
+    public static final Block<?> LEAVES_PALM = register("leaves.palm", "minecraft:block/leaves_palm", 300, (b) -> new BlockLogicLeavesBase(b, Materials.LEAVES, Blocks.SAPLING_PALM))
         .withSound(BlockSounds.GRASS).withHardness(0.2F).withLightBlock(1).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.palmLeaves)
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_SHEARS);
 
@@ -536,7 +535,7 @@ public final class Blocks {
     public static final Block<?> SPINIFEX = register("spinifex", "minecraft:block/spinifex", 323, BlockLogicSpinifex::new)
         .withSound(BlockSounds.GRASS).withHardness(0.0F)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLACE_OVERWRITES, BlockTags.SHEARS_DO_SILK_TOUCH);
-    public static final Block<?> ALGAE = register("algae", "minecraft:block/algae", 324, (b) -> new BlockLogicAlgae(b, Material.plant))
+    public static final Block<?> ALGAE = register("algae", "minecraft:block/algae", 324, (b) -> new BlockLogicAlgae(b, Materials.PLANT))
         .withSound(BlockSounds.GRASS).withHardness(0.0F).withLitInteriorSurface(true)
         .setBlockItem(ItemBlockAlgae::new)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLACE_OVERWRITES, BlockTags.SHEARS_DO_SILK_TOUCH);
@@ -567,125 +566,125 @@ public final class Blocks {
         .withSound(BlockSounds.GRASS).withHardness(0.0F).withOverrideColor(MaterialColor.paintedRed)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLANTABLE_IN_JAR, BlockTags.PIGS_FAVOURITE_BLOCK);
 
-    public static final Block<?> ORE_COAL_STONE = register("ore.coal.stone", "minecraft:block/ore_coal_stone", 350, (b) -> new BlockLogicOreCoal(b, Blocks.STONE, Material.stone))
+    public static final Block<?> ORE_COAL_STONE = register("ore.coal.stone", "minecraft:block/ore_coal_stone", 350, (b) -> new BlockLogicOreCoal(b, Blocks.STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_COAL_BASALT = register("ore.coal.basalt", "minecraft:block/ore_coal_basalt", 351, (b) -> new BlockLogicOreCoal(b, Blocks.BASALT, Material.basalt))
+    public static final Block<?> ORE_COAL_BASALT = register("ore.coal.basalt", "minecraft:block/ore_coal_basalt", 351, (b) -> new BlockLogicOreCoal(b, Blocks.BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_COAL_LIMESTONE = register("ore.coal.limestone", "minecraft:block/ore_coal_limestone", 352, (b) -> new BlockLogicOreCoal(b, Blocks.LIMESTONE, Material.limestone))
+    public static final Block<?> ORE_COAL_LIMESTONE = register("ore.coal.limestone", "minecraft:block/ore_coal_limestone", 352, (b) -> new BlockLogicOreCoal(b, Blocks.LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_COAL_GRANITE = register("ore.coal.granite", "minecraft:block/ore_coal_granite", 353, (b) -> new BlockLogicOreCoal(b, Blocks.GRANITE, Material.granite))
+    public static final Block<?> ORE_COAL_GRANITE = register("ore.coal.granite", "minecraft:block/ore_coal_granite", 353, (b) -> new BlockLogicOreCoal(b, Blocks.GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_COAL_PERMAFROST = register("ore.coal.permafrost", "minecraft:block/ore_coal_permafrost", 354, (b) -> new BlockLogicOreCoal(b, Blocks.PERMAFROST, Material.permafrost))
+    public static final Block<?> ORE_COAL_PERMAFROST = register("ore.coal.permafrost", "minecraft:block/ore_coal_permafrost", 354, (b) -> new BlockLogicOreCoal(b, Blocks.PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> ORE_IRON_STONE = register("ore.iron.stone", "minecraft:block/ore_iron_stone", 360, (b) -> new BlockLogicOreIron(b, Blocks.STONE, Material.stone))
+    public static final Block<?> ORE_IRON_STONE = register("ore.iron.stone", "minecraft:block/ore_iron_stone", 360, (b) -> new BlockLogicOreIron(b, Blocks.STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_IRON_BASALT = register("ore.iron.basalt", "minecraft:block/ore_iron_basalt", 361, (b) -> new BlockLogicOreIron(b, Blocks.BASALT, Material.basalt))
+    public static final Block<?> ORE_IRON_BASALT = register("ore.iron.basalt", "minecraft:block/ore_iron_basalt", 361, (b) -> new BlockLogicOreIron(b, Blocks.BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_IRON_LIMESTONE = register("ore.iron.limestone", "minecraft:block/ore_iron_limestone", 362, (b) -> new BlockLogicOreIron(b, Blocks.LIMESTONE, Material.limestone))
+    public static final Block<?> ORE_IRON_LIMESTONE = register("ore.iron.limestone", "minecraft:block/ore_iron_limestone", 362, (b) -> new BlockLogicOreIron(b, Blocks.LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_IRON_GRANITE = register("ore.iron.granite", "minecraft:block/ore_iron_granite", 363, (b) -> new BlockLogicOreIron(b, Blocks.GRANITE, Material.granite))
+    public static final Block<?> ORE_IRON_GRANITE = register("ore.iron.granite", "minecraft:block/ore_iron_granite", 363, (b) -> new BlockLogicOreIron(b, Blocks.GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_IRON_PERMAFROST = register("ore.iron.permafrost", "minecraft:block/ore_iron_permafrost", 364, (b) -> new BlockLogicOreIron(b, Blocks.PERMAFROST, Material.permafrost))
+    public static final Block<?> ORE_IRON_PERMAFROST = register("ore.iron.permafrost", "minecraft:block/ore_iron_permafrost", 364, (b) -> new BlockLogicOreIron(b, Blocks.PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> ORE_GOLD_STONE = register("ore.gold.stone", "minecraft:block/ore_gold_stone", 370, (b) -> new BlockLogicOreGold(b, Blocks.STONE, Material.stone))
+    public static final Block<?> ORE_GOLD_STONE = register("ore.gold.stone", "minecraft:block/ore_gold_stone", 370, (b) -> new BlockLogicOreGold(b, Blocks.STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_GOLD_BASALT = register("ore.gold.basalt", "minecraft:block/ore_gold_basalt", 371, (b) -> new BlockLogicOreGold(b, Blocks.BASALT, Material.basalt))
+    public static final Block<?> ORE_GOLD_BASALT = register("ore.gold.basalt", "minecraft:block/ore_gold_basalt", 371, (b) -> new BlockLogicOreGold(b, Blocks.BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_GOLD_LIMESTONE = register("ore.gold.limestone", "minecraft:block/ore_gold_limestone", 372, (b) -> new BlockLogicOreGold(b, Blocks.LIMESTONE, Material.limestone))
+    public static final Block<?> ORE_GOLD_LIMESTONE = register("ore.gold.limestone", "minecraft:block/ore_gold_limestone", 372, (b) -> new BlockLogicOreGold(b, Blocks.LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_GOLD_GRANITE = register("ore.gold.granite", "minecraft:block/ore_gold_granite", 373, (b) -> new BlockLogicOreGold(b, Blocks.GRANITE, Material.granite))
+    public static final Block<?> ORE_GOLD_GRANITE = register("ore.gold.granite", "minecraft:block/ore_gold_granite", 373, (b) -> new BlockLogicOreGold(b, Blocks.GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_GOLD_PERMAFROST = register("ore.gold.permafrost", "minecraft:block/ore_gold_permafrost",374, (b) -> new BlockLogicOreGold(b, Blocks.PERMAFROST, Material.permafrost))
+    public static final Block<?> ORE_GOLD_PERMAFROST = register("ore.gold.permafrost", "minecraft:block/ore_gold_permafrost",374, (b) -> new BlockLogicOreGold(b, Blocks.PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> ORE_LAPIS_STONE = register("ore.lapis.stone", "minecraft:block/ore_lapis_stone", 380, (b) -> new BlockLogicOreLapis(b, Blocks.STONE, Material.stone))
+    public static final Block<?> ORE_LAPIS_STONE = register("ore.lapis.stone", "minecraft:block/ore_lapis_stone", 380, (b) -> new BlockLogicOreLapis(b, Blocks.STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_LAPIS_BASALT = register("ore.lapis.basalt", "minecraft:block/ore_lapis_basalt", 381, (b) -> new BlockLogicOreLapis(b, Blocks.BASALT, Material.basalt))
+    public static final Block<?> ORE_LAPIS_BASALT = register("ore.lapis.basalt", "minecraft:block/ore_lapis_basalt", 381, (b) -> new BlockLogicOreLapis(b, Blocks.BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_LAPIS_LIMESTONE = register("ore.lapis.limestone", "minecraft:block/ore_lapis_limestone", 382, (b) -> new BlockLogicOreLapis(b, Blocks.LIMESTONE, Material.limestone))
+    public static final Block<?> ORE_LAPIS_LIMESTONE = register("ore.lapis.limestone", "minecraft:block/ore_lapis_limestone", 382, (b) -> new BlockLogicOreLapis(b, Blocks.LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_LAPIS_GRANITE = register("ore.lapis.granite", "minecraft:block/ore_lapis_granite", 383, (b) -> new BlockLogicOreLapis(b, Blocks.GRANITE, Material.granite))
+    public static final Block<?> ORE_LAPIS_GRANITE = register("ore.lapis.granite", "minecraft:block/ore_lapis_granite", 383, (b) -> new BlockLogicOreLapis(b, Blocks.GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_LAPIS_PERMAFROST = register("ore.lapis.permafrost", "minecraft:block/ore_lapis_permafrost", 384, (b) -> new BlockLogicOreLapis(b, Blocks.PERMAFROST, Material.permafrost))
+    public static final Block<?> ORE_LAPIS_PERMAFROST = register("ore.lapis.permafrost", "minecraft:block/ore_lapis_permafrost", 384, (b) -> new BlockLogicOreLapis(b, Blocks.PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
     public static final Block<?> ORE_REDSTONE_STONE = register("ore.redstone.stone", "minecraft:block/ore_redstone_stone", 390,
-        (b) -> new BlockLogicOreRedstone(b, Blocks.STONE, Material.stone, false, Blocks.ORE_REDSTONE_STONE, Blocks.ORE_REDSTONE_GLOWING_STONE))
+        (b) -> new BlockLogicOreRedstone(b, Blocks.STONE, Materials.STONE, false, Blocks.ORE_REDSTONE_STONE, Blocks.ORE_REDSTONE_GLOWING_STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_BASALT = register("ore.redstone.basalt", "minecraft:block/ore_redstone_basalt", 391,
-        (b) -> new BlockLogicOreRedstone(b, Blocks.BASALT, Material.basalt, false, Blocks.ORE_REDSTONE_BASALT, Blocks.ORE_REDSTONE_GLOWING_BASALT))
+        (b) -> new BlockLogicOreRedstone(b, Blocks.BASALT, Materials.BASALT, false, Blocks.ORE_REDSTONE_BASALT, Blocks.ORE_REDSTONE_GLOWING_BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_LIMESTONE = register("ore.redstone.limestone", "minecraft:block/ore_redstone_limestone", 392,
-        (b) -> new BlockLogicOreRedstone(b, Blocks.LIMESTONE, Material.limestone, false, Blocks.ORE_REDSTONE_LIMESTONE, Blocks.ORE_REDSTONE_GLOWING_LIMESTONE))
+        (b) -> new BlockLogicOreRedstone(b, Blocks.LIMESTONE, Materials.LIMESTONE, false, Blocks.ORE_REDSTONE_LIMESTONE, Blocks.ORE_REDSTONE_GLOWING_LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_GRANITE = register("ore.redstone.granite", "minecraft:block/ore_redstone_granite", 393,
-        (b) -> new BlockLogicOreRedstone(b, Blocks.GRANITE, Material.granite, false, Blocks.ORE_REDSTONE_GRANITE, Blocks.ORE_REDSTONE_GLOWING_GRANITE))
+        (b) -> new BlockLogicOreRedstone(b, Blocks.GRANITE, Materials.GRANITE, false, Blocks.ORE_REDSTONE_GRANITE, Blocks.ORE_REDSTONE_GLOWING_GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_PERMAFROST = register("ore.redstone.permafrost", "minecraft:block/ore_redstone_permafrost", 394,
-        (b) -> new BlockLogicOreRedstone(b, Blocks.PERMAFROST, Material.permafrost, false, Blocks.ORE_REDSTONE_PERMAFROST, Blocks.ORE_REDSTONE_GLOWING_PERMAFROST))
+        (b) -> new BlockLogicOreRedstone(b, Blocks.PERMAFROST, Materials.PERMAFROST, false, Blocks.ORE_REDSTONE_PERMAFROST, Blocks.ORE_REDSTONE_GLOWING_PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
     public static final Block<?> ORE_REDSTONE_GLOWING_STONE = register("ore.redstone.glowing.stone", "minecraft:block/ore_redstone_glowing_stone", 400,
-        (b) -> new BlockLogicOreRedstone(b, null, Material.stone, true, Blocks.ORE_REDSTONE_STONE, Blocks.ORE_REDSTONE_GLOWING_STONE))
+        (b) -> new BlockLogicOreRedstone(b, null, Materials.STONE, true, Blocks.ORE_REDSTONE_STONE, Blocks.ORE_REDSTONE_GLOWING_STONE))
         .withSound(BlockSounds.STONE).withLightEmission(0.2F).withHardness(3F).withBlastResistance(5F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> ORE_REDSTONE_STONE)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_GLOWING_BASALT = register("ore.redstone.glowing.basalt", "minecraft:block/ore_redstone_glowing_basalt", 401,
-        (b) -> new BlockLogicOreRedstone(b, null, Material.basalt, true, Blocks.ORE_REDSTONE_BASALT, Blocks.ORE_REDSTONE_GLOWING_BASALT))
+        (b) -> new BlockLogicOreRedstone(b, null, Materials.BASALT, true, Blocks.ORE_REDSTONE_BASALT, Blocks.ORE_REDSTONE_GLOWING_BASALT))
         .withSound(BlockSounds.STONE).withLightEmission(0.2F).withHardness(3F).withBlastResistance(5F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> ORE_REDSTONE_BASALT)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_GLOWING_LIMESTONE = register("ore.redstone.glowing.limestone", "minecraft:block/ore_redstone_glowing_limestone", 402,
-        (b) -> new BlockLogicOreRedstone(b, null, Material.limestone, true, Blocks.ORE_REDSTONE_LIMESTONE, Blocks.ORE_REDSTONE_GLOWING_LIMESTONE))
+        (b) -> new BlockLogicOreRedstone(b, null, Materials.LIMESTONE, true, Blocks.ORE_REDSTONE_LIMESTONE, Blocks.ORE_REDSTONE_GLOWING_LIMESTONE))
         .withSound(BlockSounds.STONE).withLightEmission(0.2F).withHardness(3F).withBlastResistance(5F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> ORE_REDSTONE_LIMESTONE)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_GLOWING_GRANITE = register("ore.redstone.glowing.granite", "minecraft:block/ore_redstone_glowing_granite", 403,
-        (b) -> new BlockLogicOreRedstone(b, null, Material.granite, true, Blocks.ORE_REDSTONE_GRANITE, Blocks.ORE_REDSTONE_GLOWING_GRANITE))
+        (b) -> new BlockLogicOreRedstone(b, null, Materials.GRANITE, true, Blocks.ORE_REDSTONE_GRANITE, Blocks.ORE_REDSTONE_GLOWING_GRANITE))
         .withSound(BlockSounds.STONE).withLightEmission(0.2F).withHardness(3F).withBlastResistance(5F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> ORE_REDSTONE_GRANITE)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> ORE_REDSTONE_GLOWING_PERMAFROST = register("ore.redstone.glowing.permafrost", "minecraft:block/ore_redstone_glowing_permafrost", 404,
-        (b) -> new BlockLogicOreRedstone(b, null, Material.permafrost, true, Blocks.ORE_REDSTONE_PERMAFROST, Blocks.ORE_REDSTONE_GLOWING_PERMAFROST))
+        (b) -> new BlockLogicOreRedstone(b, null, Materials.PERMAFROST, true, Blocks.ORE_REDSTONE_PERMAFROST, Blocks.ORE_REDSTONE_GLOWING_PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withLightEmission(0.2F).withHardness(3F).withBlastResistance(5F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> ORE_REDSTONE_PERMAFROST)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> ORE_DIAMOND_STONE = register("ore.diamond.stone", "minecraft:block/ore_diamond_stone", 410, (b) -> new BlockLogicOreDiamond(b, Blocks.STONE, Material.stone))
+    public static final Block<?> ORE_DIAMOND_STONE = register("ore.diamond.stone", "minecraft:block/ore_diamond_stone", 410, (b) -> new BlockLogicOreDiamond(b, Blocks.STONE, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_DIAMOND_BASALT = register("ore.diamond.basalt", "minecraft:block/ore_diamond_basalt", 411, (b) -> new BlockLogicOreDiamond(b, Blocks.BASALT, Material.basalt))
+    public static final Block<?> ORE_DIAMOND_BASALT = register("ore.diamond.basalt", "minecraft:block/ore_diamond_basalt", 411, (b) -> new BlockLogicOreDiamond(b, Blocks.BASALT, Materials.BASALT))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_DIAMOND_LIMESTONE = register("ore.diamond.limestone", "minecraft:block/ore_diamond_limestone", 412, (b) -> new BlockLogicOreDiamond(b, Blocks.LIMESTONE, Material.limestone))
+    public static final Block<?> ORE_DIAMOND_LIMESTONE = register("ore.diamond.limestone", "minecraft:block/ore_diamond_limestone", 412, (b) -> new BlockLogicOreDiamond(b, Blocks.LIMESTONE, Materials.LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_DIAMOND_GRANITE = register("ore.diamond.granite", "minecraft:block/ore_diamond_granite", 413, (b) -> new BlockLogicOreDiamond(b, Blocks.GRANITE, Material.granite))
+    public static final Block<?> ORE_DIAMOND_GRANITE = register("ore.diamond.granite", "minecraft:block/ore_diamond_granite", 413, (b) -> new BlockLogicOreDiamond(b, Blocks.GRANITE, Materials.GRANITE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> ORE_DIAMOND_PERMAFROST = register("ore.diamond.permafrost", "minecraft:block/ore_diamond_permafrost", 414, (b) -> new BlockLogicOreDiamond(b, Blocks.PERMAFROST, Material.permafrost))
+    public static final Block<?> ORE_DIAMOND_PERMAFROST = register("ore.diamond.permafrost", "minecraft:block/ore_diamond_permafrost", 414, (b) -> new BlockLogicOreDiamond(b, Blocks.PERMAFROST, Materials.PERMAFROST))
         .withSound(BlockSounds.PERMAFROST).withHardness(3F).withBlastResistance(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -693,37 +692,37 @@ public final class Blocks {
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F).withLightEmission(0.625F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NETHER_MOBS_SPAWN);
 
-    public static final Block<?> BLOCK_COAL = register("block.coal", "minecraft:block/block_coal", 430, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BLOCK_COAL = register("block.coal", "minecraft:block/block_coal", 430, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.coal)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_IRON = register("block.iron", "minecraft:block/block_iron", 431, (b) -> new BlockLogic(b, Material.metal))
+    public static final Block<?> BLOCK_IRON = register("block.iron", "minecraft:block/block_iron", 431, (b) -> new BlockLogic(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(5F).withBlastResistance(10F).withOverrideColor(MaterialColor.iron)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_GOLD = register("block.gold", "minecraft:block/block_gold", 432, (b) -> new BlockLogic(b, Material.metal))
+    public static final Block<?> BLOCK_GOLD = register("block.gold", "minecraft:block/block_gold", 432, (b) -> new BlockLogic(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.gold)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_LAPIS = register("block.lapis", "minecraft:block/block_lapis", 433, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BLOCK_LAPIS = register("block.lapis", "minecraft:block/block_lapis", 433, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(5F).withOverrideColor(MaterialColor.lapis)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_REDSTONE = register("block.redstone", "minecraft:block/block_redstone", 434, (b) -> new BlockLogicRedstone(b, Material.stone))
+    public static final Block<?> BLOCK_REDSTONE = register("block.redstone", "minecraft:block/block_redstone", 434, (b) -> new BlockLogicRedstone(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(5F).withBlastResistance(10F).withOverrideColor(MaterialColor.redstone)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_DIAMOND = register("block.diamond", "minecraft:block/block_diamond", 435, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BLOCK_DIAMOND = register("block.diamond", "minecraft:block/block_diamond", 435, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(5F).withBlastResistance(10F).withOverrideColor(MaterialColor.diamond)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_NETHER_COAL = register("block.nethercoal", "minecraft:block/block_nethercoal", 436, (b) -> new BlockLogic(b, Material.netherrack))
+    public static final Block<?> BLOCK_NETHER_COAL = register("block.nethercoal", "minecraft:block/block_nethercoal", 436, (b) -> new BlockLogic(b, Materials.NETHERRACK))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_STEEL = register("block.steel", "minecraft:block/block_steel", 437, (b) -> new BlockLogic(b, Material.steel))
+    public static final Block<?> BLOCK_STEEL = register("block.steel", "minecraft:block/block_steel", 437, (b) -> new BlockLogic(b, Materials.STEEL))
         .withSound(BlockSounds.METAL).withHardness(5F).withBlastResistance(2000F).withOverrideColor(MaterialColor.steel)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_QUARTZ = register("block.quartz", "minecraft:block/block_quartz", 438, (b) -> new BlockLogic(b, Material.steel))
+    public static final Block<?> BLOCK_QUARTZ = register("block.quartz", "minecraft:block/block_quartz", 438, (b) -> new BlockLogic(b, Materials.STEEL))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.quartz)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_OLIVINE = register("block.olivine", "minecraft:block/block_olivine", 439, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BLOCK_OLIVINE = register("block.olivine", "minecraft:block/block_olivine", 439, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.olivine)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BLOCK_CHARCOAL = register("block.charcoal", "minecraft:block/block_charcoal", 440, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> BLOCK_CHARCOAL = register("block.charcoal", "minecraft:block/block_charcoal", 440, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(3F).withBlastResistance(10F).withOverrideColor(MaterialColor.coal)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -753,16 +752,16 @@ public final class Blocks {
         .withSound(BlockSounds.STONE).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.MINEABLE_BY_PICKAXE, BlockTags.PREVENT_MOB_SPAWNS);
 
-    public static final Block<?> PRESSURE_PLATE_STONE = register("pressureplate.stone", "minecraft:block/pressure_plate_stone", 490, (b) -> new BlockLogicPressurePlate<>(b, Mob.class, Material.stone))
+    public static final Block<?> PRESSURE_PLATE_STONE = register("pressureplate.stone", "minecraft:block/pressure_plate_stone", 490, (b) -> new BlockLogicPressurePlate<>(b, Mob.class, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.PREVENT_MOB_SPAWNS);
-    public static final Block<?> PRESSURE_PLATE_PLANKS_OAK = register("pressureplate.planks.oak", "minecraft:block/pressure_plate_planks_oak", 491, (b) -> new BlockLogicPressurePlate<>(b, Entity.class, Material.wood))
+    public static final Block<?> PRESSURE_PLATE_PLANKS_OAK = register("pressureplate.planks.oak", "minecraft:block/pressure_plate_planks_oak", 491, (b) -> new BlockLogicPressurePlate<>(b, Entity.class, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.PREVENT_MOB_SPAWNS);
-    public static final Block<?> PRESSURE_PLATE_COBBLE_STONE = register("pressureplate.cobble.stone", "minecraft:block/pressure_plate_cobble_stone", 492, (b) -> new BlockLogicPressurePlate<>(b, Player.class, Material.stone))
+    public static final Block<?> PRESSURE_PLATE_COBBLE_STONE = register("pressureplate.cobble.stone", "minecraft:block/pressure_plate_cobble_stone", 492, (b) -> new BlockLogicPressurePlate<>(b, Player.class, Materials.STONE))
         .withSound(BlockSounds.STONE).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.PREVENT_MOB_SPAWNS);
-    public static final Block<BlockLogicPressurePlatePainted> PRESSURE_PLATE_PLANKS_OAK_PAINTED = register("pressureplate.planks.oak.painted", "minecraft:block/pressure_plate_planks_oak_painted", 493, (BlockLogicSupplier<BlockLogicPressurePlatePainted>)b -> new BlockLogicPressurePlatePainted<>(b, Entity.class, Material.wood))
+    public static final Block<BlockLogicPressurePlatePainted> PRESSURE_PLATE_PLANKS_OAK_PAINTED = register("pressureplate.planks.oak.painted", "minecraft:block/pressure_plate_planks_oak_painted", 493, (BlockLogicSupplier<BlockLogicPressurePlatePainted>)b -> new BlockLogicPressurePlatePainted<>(b, Entity.class, Materials.WOOD))
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withSound(BlockSounds.WOOD).withHardness(0.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.PREVENT_MOB_SPAWNS);
@@ -821,7 +820,7 @@ public final class Blocks {
         .withSound(BlockSounds.METAL).withHardness(0.7F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.MINEABLE_BY_PICKAXE, BlockTags.PREVENT_MOB_SPAWNS);
 
-    public static final Block<?> SPIKES = register("spikes", "minecraft:block/spikes", 550, (b) -> new BlockLogicSpikes(b, Material.metal))
+    public static final Block<?> SPIKES = register("spikes", "minecraft:block/spikes", 550, (b) -> new BlockLogicSpikes(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withLightBlock(3).withHardness(2F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -832,20 +831,20 @@ public final class Blocks {
         .withSound(BlockSounds.STONE).withHardness(3.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> TRAPDOOR_PLANKS_OAK = register("trapdoor.planks.oak", "minecraft:block/trapdoor_planks_oak", 570, (b) -> new BlockLogicTrapDoor(b, Material.wood))
+    public static final Block<?> TRAPDOOR_PLANKS_OAK = register("trapdoor.planks.oak", "minecraft:block/trapdoor_planks_oak", 570, (b) -> new BlockLogicTrapDoor(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_AXE);
-    public static final Block<?> TRAPDOOR_IRON = register("trapdoor.iron", "minecraft:block/trapdoor_iron", 571, (b) -> new BlockLogicTrapDoor(b, Material.metal))
+    public static final Block<?> TRAPDOOR_IRON = register("trapdoor.iron", "minecraft:block/trapdoor_iron", 571, (b) -> new BlockLogicTrapDoor(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(5F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.iron)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> TRAPDOOR_GLASS = register("trapdoor.glass", "minecraft:block/trapdoor_glass", 572, (b) -> new BlockLogicTrapDoor(b, Material.glass))
+    public static final Block<?> TRAPDOOR_GLASS = register("trapdoor.glass", "minecraft:block/trapdoor_glass", 572, (b) -> new BlockLogicTrapDoor(b, Materials.GLASS))
         .withSound(BlockSounds.GLASS).withHardness(0.3F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> TRAPDOOR_PLANKS_PAINTED = register("trapdoor.planks.oak.painted", "minecraft:block/trapdoor_planks_oak_painted", 573, (b) -> new BlockLogicTrapDoorPainted(b, Material.wood))
+    public static final Block<?> TRAPDOOR_PLANKS_PAINTED = register("trapdoor.planks.oak.painted", "minecraft:block/trapdoor_planks_oak_painted", 573, (b) -> new BlockLogicTrapDoorPainted(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange()
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withTags(BlockTags.MINEABLE_BY_AXE);
-    public static final Block<?> TRAPDOOR_STEEL = register("trapdoor.steel", "minecraft:block/trapdoor_steel", 574, (b) -> new BlockLogicTrapDoor(b, Material.steel))
+    public static final Block<?> TRAPDOOR_STEEL = register("trapdoor.steel", "minecraft:block/trapdoor_steel", 574, (b) -> new BlockLogicTrapDoor(b, Materials.STEEL))
         .withSound(BlockSounds.METAL).withOverrideColor(MaterialColor.steel).withHardness(5F).withBlastResistance(2000F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.steel)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -853,45 +852,45 @@ public final class Blocks {
         .withSound(BlockSounds.GRASS).withHardness(0.0F);
 
     public static final Block<BlockLogicDoor> DOOR_PLANKS_OAK_BOTTOM = register("door.planks.oak.bottom", "minecraft:block/door_planks_oak_bottom", 590,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.wood, false, false, () -> Items.DOOR_OAK))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.WOOD, false, false, () -> Items.DOOR_OAK))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.DOOR_OAK)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
     public static final Block<BlockLogicDoor> DOOR_PLANKS_OAK_TOP = register("door.planks.oak.top", "minecraft:block/doors_planks_oak_top", 591,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.wood, true, false, () -> Items.DOOR_OAK))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.WOOD, true, false, () -> Items.DOOR_OAK))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> DOOR_PLANKS_OAK_BOTTOM)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
     public static final Block<BlockLogicDoor> DOOR_IRON_BOTTOM = register("door.iron.bottom", "minecraft:block/door_iron_bottom", 592,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.metal, false, true, () -> Items.DOOR_IRON))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.METAL, false, true, () -> Items.DOOR_IRON))
         .withSound(BlockSounds.METAL).withHardness(5F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.iron).setStatParent(() -> Items.DOOR_IRON)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicDoor> DOOR_IRON_TOP = register("door.iron.top", "minecraft:block/door_iron_top", 593,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.metal, true, true, () -> Items.DOOR_IRON))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.METAL, true, true, () -> Items.DOOR_IRON))
         .withSound(BlockSounds.METAL).withHardness(5F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.iron).setStatParent(() -> DOOR_IRON_BOTTOM)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicDoorPainted> DOOR_PLANKS_PAINTED_BOTTOM = register("door.planks.oak.painted.bottom", "minecraft:block/door_planks_oak_painted_bottom", 594,
-        (BlockLogicSupplier<BlockLogicDoorPainted>)(b) -> new BlockLogicDoorPainted(b, Material.wood, false))
+        (BlockLogicSupplier<BlockLogicDoorPainted>)(b) -> new BlockLogicDoorPainted(b, Materials.WOOD, false))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.DOOR_OAK_PAINTED)
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
     public static final Block<BlockLogicDoorPainted> DOOR_PLANKS_PAINTED_TOP = register("door.planks.oak.painted.top", "minecraft:block/door_planks_oak_painted_top", 595,
-        (BlockLogicSupplier<BlockLogicDoorPainted>)(b) -> new BlockLogicDoorPainted(b, Material.wood, true))
+        (BlockLogicSupplier<BlockLogicDoorPainted>)(b) -> new BlockLogicDoorPainted(b, Materials.WOOD, true))
         .withSound(BlockSounds.WOOD).withHardness(3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> DOOR_PLANKS_PAINTED_BOTTOM)
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
     public static final Block<BlockLogicDoor> DOOR_GLASS_BOTTOM = register("door.glass.bottom", "minecraft:block/door_glass_bottom", 596,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.glass, false, false, () -> Items.DOOR_GLASS))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.GLASS, false, false, () -> Items.DOOR_GLASS))
         .withSound(BlockSounds.GLASS).withHardness(0.3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.DOOR_GLASS)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicDoor> DOOR_GLASS_TOP = register("door.glass.top", "minecraft:block/door_glass_top", 597,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.glass, true, false, () -> Items.DOOR_GLASS))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.GLASS, true, false, () -> Items.DOOR_GLASS))
         .withSound(BlockSounds.GLASS).withHardness(0.3F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> DOOR_GLASS_BOTTOM)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicDoor> DOOR_STEEL_BOTTOM = register("door.steel.bottom", "minecraft:block/door_steel_bottom", 598,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.steel, false, true, () -> Items.DOOR_STEEL))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.STEEL, false, true, () -> Items.DOOR_STEEL))
         .withSound(BlockSounds.METAL).withHardness(5F).withOverrideColor(MaterialColor.steel).withBlastResistance(2000F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.steel).setStatParent(() -> Items.DOOR_STEEL)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicDoor> DOOR_STEEL_TOP = register("door.steel.top", "minecraft:block/door_steel_top", 599,
-        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Material.steel, true, true, () -> Items.DOOR_STEEL))
+        (BlockLogicSupplier<BlockLogicDoor>)b -> new BlockLogicDoor(b, Materials.STEEL, true, true, () -> Items.DOOR_STEEL))
         .withSound(BlockSounds.METAL).withHardness(5F).withOverrideColor(MaterialColor.steel).withBlastResistance(2000F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.steel).setStatParent(() -> DOOR_STEEL_BOTTOM)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -909,7 +908,7 @@ public final class Blocks {
         .withSound(BlockSounds.WOOD).withHardness(0.2F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.SEAT)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
 
-    public static final Block<?> COBWEB = register("cobweb", "minecraft:block/cobweb", 620, (b) -> new BlockLogicCobweb(b, Material.web))
+    public static final Block<?> COBWEB = register("cobweb", "minecraft:block/cobweb", 620, (b) -> new BlockLogicCobweb(b, Materials.WEB))
         .withSound(BlockSounds.CLOTH).withLightBlock(1).withHardness(4F)
         .withTags(BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_SHEARS, BlockTags.MINEABLE_BY_SWORD);
 
@@ -950,10 +949,10 @@ public final class Blocks {
         .withSound(BlockSounds.METAL).withHardness(3.5F).withLightEmission(0.875F).withDisabledNeighborNotifyOnMetadataChange().withOverrideColor(MaterialColor.steel).setStatParent(() -> FURNACE_BLAST_IDLE)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> TROMMEL_IDLE = register("trommel.idle", "minecraft:block/trommel_idle", 670, (b) -> new BlockLogicTrommel(b, Material.stone, false))
+    public static final Block<?> TROMMEL_IDLE = register("trommel.idle", "minecraft:block/trommel_idle", 670, (b) -> new BlockLogicTrommel(b, Materials.STONE, false))
         .withSound(BlockSounds.STONE).withHardness(3.5F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> TROMMEL_ACTIVE = register("trommel.active", "minecraft:block/trommel_active", 671, (b) -> new BlockLogicTrommel(b, Material.stone, true))
+    public static final Block<?> TROMMEL_ACTIVE = register("trommel.active", "minecraft:block/trommel_active", 671, (b) -> new BlockLogicTrommel(b, Materials.STONE, true))
         .withSound(BlockSounds.STONE).withHardness(3.5F).withLightEmission(0.875F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> TROMMEL_IDLE)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -965,10 +964,10 @@ public final class Blocks {
     public static final Block<BlockLogicChestLegacy> CHEST_LEGACY_PAINTED = register("chest.legacy.painted", "minecraft:block/chest_legacy_painted", 681, BlockLogicChestLegacy::new)
         .withSound(BlockSounds.WOOD).withHardness(2.5f).withBlastResistance(5.0f).setStatParent(() -> Blocks.CHEST_PLANKS_OAK_PAINTED)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
-    public static final Block<BlockLogicChest> CHEST_PLANKS_OAK = register("chest.planks.oak", "minecraft:block/chest_planks_oak", 682, (BlockLogicSupplier<BlockLogicChest>)(b) -> new BlockLogicChest(b, Material.wood))
+    public static final Block<BlockLogicChest> CHEST_PLANKS_OAK = register("chest.planks.oak", "minecraft:block/chest_planks_oak", 682, (BlockLogicSupplier<BlockLogicChest>)(b) -> new BlockLogicChest(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(2.5F).withBlastResistance(5.0f).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.FENCES_CONNECT, BlockTags.MINEABLE_BY_AXE);
-    public static final Block<BlockLogicChest> CHEST_PLANKS_OAK_PAINTED = register("chest.planks.oak.painted", "minecraft:block/chest_planks_oak_painted", 683, (BlockLogicSupplier<BlockLogicChest>)(b) -> new BlockLogicChestPainted(b, Material.wood))
+    public static final Block<BlockLogicChest> CHEST_PLANKS_OAK_PAINTED = register("chest.planks.oak.painted", "minecraft:block/chest_planks_oak_painted", 683, (BlockLogicSupplier<BlockLogicChest>)(b) -> new BlockLogicChestPainted(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(2.5F).withBlastResistance(5.0f).withDisabledNeighborNotifyOnMetadataChange()
         .setBlockItem((b) -> new ItemBlockPainted<>(b, true))
         .withTags(BlockTags.FENCES_CONNECT, BlockTags.MINEABLE_BY_AXE);
@@ -991,7 +990,7 @@ public final class Blocks {
         .withSound(BlockSounds.WOOD).withHardness(1.0F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> SIGN_POST_PLANKS_OAK)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
 
-    public static final Block<?> FLAG = register("flag", "minecraft:block/flag", 712, (b) -> new BlockLogicFlag(b, Material.wood))
+    public static final Block<?> FLAG = register("flag", "minecraft:block/flag", 712, (b) -> new BlockLogicFlag(b, Materials.WOOD))
         .withSound(BlockSounds.WOOD).withHardness(1.0F).setStatParent(() -> Items.FLAG)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
 
@@ -1002,23 +1001,23 @@ public final class Blocks {
             .withSound(BlockSounds.WOOD).withHardness(1.0F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> SIGN_POST_PLANKS_OAK)
             .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_AXE);
 
-    public static final Block<BlockLogicLayerSnow> LAYER_SNOW = register("layer.snow", "minecraft:block/layer_snow", 720, (BlockLogicSupplier<BlockLogicLayerSnow>)(b) -> new BlockLogicLayerSnow(b, Blocks.BLOCK_SNOW, Material.topSnow))
+    public static final Block<BlockLogicLayerSnow> LAYER_SNOW = register("layer.snow", "minecraft:block/layer_snow", 720, (BlockLogicSupplier<BlockLogicLayerSnow>)(b) -> new BlockLogicLayerSnow(b, Blocks.BLOCK_SNOW, Materials.TOP_SNOW))
         .withSound(BlockSounds.CLOTH).withHardness(0.1F).withLitInteriorSurface(true)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLACE_OVERWRITES, BlockTags.MINEABLE_BY_SHOVEL, BlockTags.OVERRIDE_STEPSOUND);
-    public static final Block<BlockLogicLayerLeaves> LAYER_LEAVES_OAK = register("layer.leaves.oak", "minecraft:block/layer_leaves_oak", 721, (BlockLogicSupplier<BlockLogicLayerLeaves>)(b) -> new BlockLogicLayerLeaves(b, Blocks.LEAVES_OAK, Material.leaves))
+    public static final Block<BlockLogicLayerLeaves> LAYER_LEAVES_OAK = register("layer.leaves.oak", "minecraft:block/layer_leaves_oak", 721, (BlockLogicSupplier<BlockLogicLayerLeaves>)(b) -> new BlockLogicLayerLeaves(b, Blocks.LEAVES_OAK, Materials.LEAVES))
         .withSound(BlockSounds.GRASS).withLitInteriorSurface(true)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLACE_OVERWRITES, BlockTags.SHEARS_DO_SILK_TOUCH, BlockTags.MINEABLE_BY_SHEARS, BlockTags.MINEABLE_BY_SWORD, BlockTags.MINEABLE_BY_AXE, BlockTags.MINEABLE_BY_HOE);
-    public static final Block<BlockLogicLayerBase> LAYER_SLATE = register("layer.slate", "minecraft:block/layer_slate", 722, (BlockLogicSupplier<BlockLogicLayerBase>)(b) -> new BlockLogicLayerSlate(b, Blocks.SLATE, Material.slate))
+    public static final Block<BlockLogicLayerBase> LAYER_SLATE = register("layer.slate", "minecraft:block/layer_slate", 722, (BlockLogicSupplier<BlockLogicLayerBase>)(b) -> new BlockLogicLayerSlate(b, Blocks.SLATE, Materials.SLATE))
         .withSound(BlockSounds.STONE).withHardness(1.5F).withBlastResistance(10F).withLitInteriorSurface(true)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<BlockLogicLayerAsh> LAYER_ASH = register("layer.ash", "minecraft:block/layer_ash", 723, (BlockLogicSupplier<BlockLogicLayerAsh>)(b) -> new BlockLogicLayerAsh(b, Blocks.BLOCK_ASH, Material.topAsh))
+    public static final Block<BlockLogicLayerAsh> LAYER_ASH = register("layer.ash", "minecraft:block/layer_ash", 723, (BlockLogicSupplier<BlockLogicLayerAsh>)(b) -> new BlockLogicLayerAsh(b, Blocks.BLOCK_ASH, Materials.TOP_ASH))
         .withSound(BlockSounds.CLOTH).withHardness(0.1F).withLitInteriorSurface(true)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.PLACE_OVERWRITES, BlockTags.MINEABLE_BY_SHOVEL, BlockTags.OVERRIDE_STEPSOUND);
 
     public static final Block<?> ICE = register("ice", "minecraft:block/ice", 730, BlockLogicIce::new)
         .withSound(BlockSounds.GLASS).withHardness(0.5F).withLightBlock(3)
         .withTags(BlockTags.SKATEABLE, BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> PERMAICE = register("ice.perma", "minecraft:block/permaice", 731, (b) -> new BlockLogicSlippery(b, Material.ice))
+    public static final Block<?> PERMAICE = register("ice.perma", "minecraft:block/permaice", 731, (b) -> new BlockLogicSlippery(b, Materials.ICE))
         .withSound(BlockSounds.GLASS).withHardness(1.5F).withBlastResistance(10F)
         .withTags(BlockTags.SKATEABLE, BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -1040,10 +1039,10 @@ public final class Blocks {
     public static final Block<?> SUGARCANE = register("sugarcane", "minecraft:block/sugarcane", 770, BlockLogicSugarcane::new)
         .withSound(BlockSounds.GRASS).withHardness(0.0F).withOverrideColor(MaterialColor.paintedLime).setStatParent(() -> Items.SUGARCANE)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.BROKEN_BY_FLUIDS, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<?> BLOCK_SUGARCANE = register("block.sugarcane", "minecraft:block/block_sugarcane", 771, (b) -> new BlockLogicAxisAligned(b, Material.moss))
+    public static final Block<?> BLOCK_SUGARCANE = register("block.sugarcane", "minecraft:block/block_sugarcane", 771, (b) -> new BlockLogicAxisAligned(b, Materials.MOSS))
         .withSound(BlockSounds.GRASS).withHardness(0.6F).withOverrideColor(MaterialColor.paintedLime)
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.FENCES_CONNECT);
-    public static final Block<?> BLOCK_SUGARCANE_BAKED = register("block.sugarcane.baked", "minecraft:block/block_sugarcane_baked", 772, (b) -> new BlockLogicAxisAligned(b, Material.moss))
+    public static final Block<?> BLOCK_SUGARCANE_BAKED = register("block.sugarcane.baked", "minecraft:block/block_sugarcane_baked", 772, (b) -> new BlockLogicAxisAligned(b, Materials.MOSS))
         .withSound(BlockSounds.GRASS).withHardness(0.6F).withOverrideColor(MaterialColor.wood)
         .withTags(BlockTags.MINEABLE_BY_AXE, BlockTags.FENCES_CONNECT);
 
@@ -1064,19 +1063,19 @@ public final class Blocks {
         .withSound(BlockSounds.WOOD).withHardness(1.0F).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_AXE);
 
-    public static final Block<?> COBBLE_NETHERRACK = register("cobble.netherrack", "minecraft:block/cobble_netherrack", 800, (b) -> new BlockLogicCobble(b, Material.netherrack, null))
+    public static final Block<?> COBBLE_NETHERRACK = register("cobble.netherrack", "minecraft:block/cobble_netherrack", 800, (b) -> new BlockLogicCobble(b, Materials.NETHERRACK, null))
         .withSound(BlockSounds.STONE).withHardness(0.4F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.INFINITE_BURN, BlockTags.CAVES_CUT_THROUGH, BlockTags.NETHER_MOBS_SPAWN);
     public static final Block<?> COBBLE_NETHERRACK_IGNEOUS = register("cobble.netherrack.igneous", "minecraft:block/cobble_netherrack_igneous", 801, BlockLogicNetherrackIgneous::new)
         .withSound(BlockSounds.STONE).withHardness(1.25F).withBlastResistance(7F).withLightEmission(10)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> COBBLE_NETHERRACK_MOSSY = register("cobble.netherrack.mossy", "minecraft:block/cobble_netherrack_mossy", 802, (b) -> new BlockLogicCobble(b, Material.netherrack, null))
+    public static final Block<?> COBBLE_NETHERRACK_MOSSY = register("cobble.netherrack.mossy", "minecraft:block/cobble_netherrack_mossy", 802, (b) -> new BlockLogicCobble(b, Materials.NETHERRACK, null))
         .withSound(BlockSounds.STONE).withHardness(0.4F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.GROWS_FLOWERS, BlockTags.INFINITE_BURN);
-    public static final Block<?> NETHERRACK = register("netherrack", "minecraft:block/netherrack", 803, (b) -> new BlockLogicStone(b, Blocks.COBBLE_NETHERRACK, Material.netherrack))
+    public static final Block<?> NETHERRACK = register("netherrack", "minecraft:block/netherrack", 803, (b) -> new BlockLogicStone(b, Blocks.COBBLE_NETHERRACK, Materials.NETHERRACK))
         .withSound(BlockSounds.STONE).withHardness(0.32F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.INFINITE_BURN, BlockTags.CAVES_CUT_THROUGH, BlockTags.NETHER_MOBS_SPAWN);
-    public static final Block<?> BRICK_NETHERRACK = register("brick.netherrack", "minecraft:block/brick_netherrack", 804, (b) -> new BlockLogic(b, Material.netherrack))
+    public static final Block<?> BRICK_NETHERRACK = register("brick.netherrack", "minecraft:block/brick_netherrack", 804, (b) -> new BlockLogic(b, Materials.NETHERRACK))
         .withSound(BlockSounds.STONE).withHardness(0.4F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<BlockLogicSlab> SLAB_NETHERRACK_POLISHED = register("slab.netherrack.carved", "minecraft:block/slab_netherrack_carved", 805, (BlockLogicSupplier<BlockLogicSlab>)b -> new BlockLogicSlab(b, Blocks.NETHERRACK_CARVED))
@@ -1098,11 +1097,11 @@ public final class Blocks {
     public static final Block<?> SOULSAND = register("soulsand", "minecraft:block/soulsand", 810, BlockLogicSoulSand::new)
         .withSound(BlockSounds.SAND).withHardness(0.5F).withOverrideColor(MaterialColor.paintedBrown)
         .withTags(BlockTags.MINEABLE_BY_SHOVEL, BlockTags.CAVES_CUT_THROUGH, BlockTags.NETHER_MOBS_SPAWN, BlockTags.INFINITE_BURN_COLD);
-    public static final Block<?> SOULSCHIST = register("soulschist", "minecraft:block/soulschist", 811, (b) -> new BlockLogicCobble(b, Material.stone, () -> Blocks.SOULSAND))
+    public static final Block<?> SOULSCHIST = register("soulschist", "minecraft:block/soulschist", 811, (b) -> new BlockLogicCobble(b, Materials.STONE, () -> Blocks.SOULSAND))
         .withSound(BlockSounds.STONE).withHardness(2.0F).withBlastResistance(10F).withOverrideColor(MaterialColor.paintedBrown)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NETHER_MOBS_SPAWN);
 
-    public static final Block<?> GLOWSTONE = register("glowstone", "minecraft:block/glowstone", 820, (b) -> new BlockLogicGlowStone(b, Material.stone))
+    public static final Block<?> GLOWSTONE = register("glowstone", "minecraft:block/glowstone", 820, (b) -> new BlockLogicGlowStone(b, Materials.STONE))
         .withSound(BlockSounds.GLASS).withHardness(0.3F).withLightEmission(1.0F).withOverrideColor(MaterialColor.paintedYellow)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
     public static final Block<?> CRYSTAL = register("crystal", "minecraft:block/crystal", 821, (b) -> new BlockLogicCrystal(b))
@@ -1111,7 +1110,7 @@ public final class Blocks {
     public static final Block<?> CRYSTAL_STALK = register("crystal.stalk", "minecraft:block/crystal_stalk", 822, (b) -> new BlockLogicStalk(b))
         .withSound(BlockSounds.GLASS).withDisabledNeighborNotifyOnMetadataChange().withLightEmission(0.8F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> NETHERRACK_CRYSTALLINE = register("netherrack.crystalline", "minecraft:block/netherrack_crystalline", 823, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> NETHERRACK_CRYSTALLINE = register("netherrack.crystalline", "minecraft:block/netherrack_crystalline", 823, (b) -> new BlockLogic(b, Materials.STONE))
         .withSound(BlockSounds.STONE).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.INFINITE_BURN, BlockTags.CAVES_CUT_THROUGH, BlockTags.NETHER_MOBS_SPAWN);
 
@@ -1144,25 +1143,25 @@ public final class Blocks {
         .setBlockItem(ItemBlockLamp::new)
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<?> STONE_POLISHED = register("stone.polished", "minecraft:block/stone_polished", 860, (b) -> new BlockLogic(b, Material.stone))
+    public static final Block<?> STONE_POLISHED = register("stone.polished", "minecraft:block/stone_polished", 860, (b) -> new BlockLogic(b, Materials.STONE))
             .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> GRANITE_POLISHED = register("granite.polished", "minecraft:block/granite_polished", 861, (b) -> new BlockLogic(b, Material.granite))
+    public static final Block<?> GRANITE_POLISHED = register("granite.polished", "minecraft:block/granite_polished", 861, (b) -> new BlockLogic(b, Materials.GRANITE))
             .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> LIMESTONE_POLISHED = register("limestone.polished", "minecraft:block/limestone_polished", 862, (b) -> new BlockLogic(b, Material.limestone))
+    public static final Block<?> LIMESTONE_POLISHED = register("limestone.polished", "minecraft:block/limestone_polished", 862, (b) -> new BlockLogic(b, Materials.LIMESTONE))
             .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> BASALT_POLISHED = register("basalt.polished", "minecraft:block/basalt_polished", 863, (b) -> new BlockLogic(b, Material.basalt))
+    public static final Block<?> BASALT_POLISHED = register("basalt.polished", "minecraft:block/basalt_polished", 863, (b) -> new BlockLogic(b, Materials.BASALT))
             .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> SLATE_POLISHED = register("slate.polished", "minecraft:block/slate_polished", 864, (b) -> new BlockLogic(b, Material.slate))
+    public static final Block<?> SLATE_POLISHED = register("slate.polished", "minecraft:block/slate_polished", 864, (b) -> new BlockLogic(b, Materials.SLATE))
             .withSound(BlockSounds.STONE).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> PERMAFROST_POLISHED = register("permafrost.polished", "minecraft:block/permafrost_polished", 865, (b) -> new BlockLogic(b, Material.permafrost))
+    public static final Block<?> PERMAFROST_POLISHED = register("permafrost.polished", "minecraft:block/permafrost_polished", 865, (b) -> new BlockLogic(b, Materials.PERMAFROST))
             .withSound(BlockSounds.PERMAFROST).withHardness(1.0F).withBlastResistance(10F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
-    public static final Block<?> NETHERRACK_POLISHED = register("netherrack.polished", "minecraft:block/netherrack_polished", 866, (b) -> new BlockLogic(b, Material.netherrack))
+    public static final Block<?> NETHERRACK_POLISHED = register("netherrack.polished", "minecraft:block/netherrack_polished", 866, (b) -> new BlockLogic(b, Materials.NETHERRACK))
             .withSound(BlockSounds.STONE).withHardness(0.4F).withDisabledNeighborNotifyOnMetadataChange()
             .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
@@ -1187,25 +1186,25 @@ public final class Blocks {
         .withSound(BlockSounds.GLASS).withHardness(0.1F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.JAR)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
 
-    public static final Block<?> OVERLAY_PEBBLES = register("overlay.pebbles", "minecraft:block/overlay_pebbles", 880, (b) -> new BlockLogicOverlayPebbles(b, Material.decoration))
+    public static final Block<?> OVERLAY_PEBBLES = register("overlay.pebbles", "minecraft:block/overlay_pebbles", 880, (b) -> new BlockLogicOverlayPebbles(b, Materials.DECORATION))
         .withSound(BlockSounds.STONE).withHardness(0.0F).withDisabledNeighborNotifyOnMetadataChange().setStatParent(() -> Items.AMMO_PEBBLE)
         .withTags(BlockTags.BROKEN_BY_FLUIDS, BlockTags.NOT_IN_CREATIVE_MENU, BlockTags.OVERRIDE_FRICTION);
 
-    public static final Block<BlockLogicFenceThin> FENCE_CHAINLINK = register("fence.chainlink", "minecraft:block/fence_chainlink", 890, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceChainlink(b, Material.metal))
+    public static final Block<BlockLogicFenceThin> FENCE_CHAINLINK = register("fence.chainlink", "minecraft:block/fence_chainlink", 890, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceChainlink(b, Materials.METAL))
         .withSound(BlockSounds.METAL).withHardness(5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.CHAINLINK_FENCES_CONNECT, BlockTags.CAN_HANG_OFF);
-    public static final Block<BlockLogicFenceThin> FENCE_PAPER_WALL = register("fence.paper_wall", "minecraft:block/fence_paper_wall", 891, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceWallPaper(b, Material.cloth))
+    public static final Block<BlockLogicFenceThin> FENCE_PAPER_WALL = register("fence.paper_wall", "minecraft:block/fence_paper_wall", 891, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceWallPaper(b, Materials.CLOTH))
         .withSound(BlockSounds.CLOTH).withHardness(0.5F)
         .withTags(BlockTags.MINEABLE_BY_SHEARS, BlockTags.FENCES_CONNECT, BlockTags.CAN_HANG_OFF, BlockTags.MINEABLE_BY_AXE);
-    public static final Block<BlockLogicFenceThin> FENCE_STEEL = register("fence.steel", "minecraft:block/fence_steel", 892, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceSteel(b, Material.steel))
+    public static final Block<BlockLogicFenceThin> FENCE_STEEL = register("fence.steel", "minecraft:block/fence_steel", 892, (BlockLogicSupplier<BlockLogicFenceThin>)b -> new BlockLogicFenceSteel(b, Materials.STEEL))
         .withSound(BlockSounds.METAL).withHardness(8F).withOverrideColor(MaterialColor.steel).withBlastResistance(2000F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.CHAINLINK_FENCES_CONNECT, BlockTags.CAN_HANG_OFF);
 
-    public static final Block<BlockLogicBasket> BASKET = register("basket", "minecraft:block/basket", 900, (BlockLogicSupplier<BlockLogicBasket>)(b) -> new BlockLogicBasket(b, Material.cloth))
+    public static final Block<BlockLogicBasket> BASKET = register("basket", "minecraft:block/basket", 900, (BlockLogicSupplier<BlockLogicBasket>)(b) -> new BlockLogicBasket(b, Materials.CLOTH))
         .withSound(BlockSounds.CLOTH).withHardness(0.5F).withOverrideColor(MaterialColor.wood).setStatParent(() -> Items.BASKET).withDisabledNeighborNotifyOnMetadataChange()
         .withTags(BlockTags.NOT_IN_CREATIVE_MENU);
 
-    public static final Block<?> PAPER_WALL = register("paper_wall", "minecraft:block/paper_wall", 910, (b) -> new BlockLogic(b, Material.cloth))
+    public static final Block<?> PAPER_WALL = register("paper_wall", "minecraft:block/paper_wall", 910, (b) -> new BlockLogic(b, Materials.CLOTH))
         .withSound(BlockSounds.CLOTH).withHardness(0.7F)
         .withTags(BlockTags.MINEABLE_BY_SHEARS, BlockTags.FENCES_CONNECT, BlockTags.CAN_HANG_OFF, BlockTags.MINEABLE_BY_AXE);
 
@@ -1260,40 +1259,40 @@ public final class Blocks {
         .withSound(BlockSounds.STONE).withDisabledNeighborNotifyOnMetadataChange().withLitInteriorSurface(true)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE);
 
-    public static final Block<BlockLogicStatue> STATUE_STONE_LOWER = register("statue.stone.lower", "minecraft:block/statue_stone_lower", 1010, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_STONE))
+    public static final Block<BlockLogicStatue> STATUE_STONE_LOWER = register("statue.stone.lower", "minecraft:block/statue_stone_lower", 1010, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_STONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_STONE_UPPER = register("statue.stone.upper", "minecraft:block/statue_stone_upper", 1011, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_STONE))
+    public static final Block<BlockLogicStatue> STATUE_STONE_UPPER = register("statue.stone.upper", "minecraft:block/statue_stone_upper", 1011, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_STONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_BASALT_LOWER = register("statue.basalt.lower", "minecraft:block/statue_basalt_lower", 1012, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_BASALT))
+    public static final Block<BlockLogicStatue> STATUE_BASALT_LOWER = register("statue.basalt.lower", "minecraft:block/statue_basalt_lower", 1012, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_BASALT))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_BASALT_UPPER = register("statue.basalt.upper", "minecraft:block/statue_basalt_upper", 1013, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_BASALT))
+    public static final Block<BlockLogicStatue> STATUE_BASALT_UPPER = register("statue.basalt.upper", "minecraft:block/statue_basalt_upper", 1013, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_BASALT))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_LIMESTONE_LOWER = register("statue.limestone.lower", "minecraft:block/statue_limestone_lower", 1014, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_LIMESTONE))
+    public static final Block<BlockLogicStatue> STATUE_LIMESTONE_LOWER = register("statue.limestone.lower", "minecraft:block/statue_limestone_lower", 1014, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_LIMESTONE_UPPER = register("statue.limestone.upper", "minecraft:block/statue_limestone_upper", 1015, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_LIMESTONE))
+    public static final Block<BlockLogicStatue> STATUE_LIMESTONE_UPPER = register("statue.limestone.upper", "minecraft:block/statue_limestone_upper", 1015, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_LIMESTONE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_GRANITE_LOWER = register("statue.granite.lower", "minecraft:block/statue_granite_lower", 1016, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_GRANITE))
+    public static final Block<BlockLogicStatue> STATUE_GRANITE_LOWER = register("statue.granite.lower", "minecraft:block/statue_granite_lower", 1016, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_GRANITE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_GRANITE_UPPER = register("statue.granite.upper", "minecraft:block/statue_granite_upper", 1017, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_GRANITE))
+    public static final Block<BlockLogicStatue> STATUE_GRANITE_UPPER = register("statue.granite.upper", "minecraft:block/statue_granite_upper", 1017, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_GRANITE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_MARBLE_LOWER = register("statue.marble.lower", "minecraft:block/statue_marble_lower", 1018, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_MARBLE))
+    public static final Block<BlockLogicStatue> STATUE_MARBLE_LOWER = register("statue.marble.lower", "minecraft:block/statue_marble_lower", 1018, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_MARBLE_UPPER = register("statue.marble.upper", "minecraft:block/statue_marble_upper", 1019, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_MARBLE))
+    public static final Block<BlockLogicStatue> STATUE_MARBLE_UPPER = register("statue.marble.upper", "minecraft:block/statue_marble_upper", 1019, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_MARBLE))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_PIGMAN_LOWER = register("statue.pigman.lower", "minecraft:block/statue_pigman_lower", 1020, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, true, () -> Items.STATUE_PIGMAN))
+    public static final Block<BlockLogicStatue> STATUE_PIGMAN_LOWER = register("statue.pigman.lower", "minecraft:block/statue_pigman_lower", 1020, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, true, () -> Items.STATUE_PIGMAN))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
-    public static final Block<BlockLogicStatue> STATUE_PIGMAN_UPPER = register("statue.pigman.upper", "minecraft:block/statue_pigman_upper", 1021, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Material.stone, false, () -> Items.STATUE_PIGMAN))
+    public static final Block<BlockLogicStatue> STATUE_PIGMAN_UPPER = register("statue.pigman.upper", "minecraft:block/statue_pigman_upper", 1021, (BlockLogicSupplier<BlockLogicStatue>) b -> new BlockLogicStatue(b, Materials.STONE, false, () -> Items.STATUE_PIGMAN))
         .withSound(BlockSounds.STONE).withHardness(1.5F)
         .withTags(BlockTags.MINEABLE_BY_PICKAXE, BlockTags.NOT_IN_CREATIVE_MENU);
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/Fluid.java b/game/core/src/main/java/net/minecraft/core/block/Fluid.java
index b9df01621..db88f38da 100644
--- a/game/core/src/main/java/net/minecraft/core/block/Fluid.java
+++ b/game/core/src/main/java/net/minecraft/core/block/Fluid.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
@@ -14,13 +15,13 @@ public interface Fluid {
     default void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z, final @NotNull Random rand) {
         animationTick(logicFluid, world, new TilePos(x, y, z), rand);
     }
-    void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand);
+    void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand);
 
     @Deprecated
     default void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z, final @NotNull Material encountered) {
         checkForHarden(logicFluid, world, new TilePos(x, y, z), encountered);
     }
-    void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Material encountered);
+    void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Material encountered);
 
     boolean shouldTick();
 
@@ -28,17 +29,17 @@ public interface Fluid {
     default void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z, final @NotNull Random rand) {
         updateTickStill(logicFluid, world, new TilePos(x, y, z), rand);
     }
-    void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand);
+    void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand);
 
     default byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z) {
         return getFlowDecayMod(logicFluid, world, new TilePos(x, y, z));
     }
-    byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos);
+    byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos);
 
     default boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z, final @NotNull Random rand) {
         return canBecomeSource(logicFluid, world, new TilePos(x, y, z), rand);
     }
-    boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand);
+    boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand);
 
     @Deprecated
     default void onFlowIntoBlock(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final int x, final int y, final int z, final int meta) {
diff --git a/game/core/src/main/java/net/minecraft/core/block/FluidLava.java b/game/core/src/main/java/net/minecraft/core/block/FluidLava.java
index ae78e77e8..9207fcd0e 100644
--- a/game/core/src/main/java/net/minecraft/core/block/FluidLava.java
+++ b/game/core/src/main/java/net/minecraft/core/block/FluidLava.java
@@ -1,37 +1,38 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
 public class FluidLava
-    implements Fluid
-{
+    implements Fluid {
     @Override
     public int tickDelay() {
         return 30;
     }
 
     @Override
-    public void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
-        TilePos up = tilePos.up();
-        final boolean isTop = world.getBlockMaterial(up) == Material.air && !world.isBlockOpaqueCube(up);
+    public void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
+        TilePos up = tilePos.up(new TilePos());
+        final boolean isTop = world.getBlockMaterial(up) == Materials.AIR && !world.isBlockOpaqueCube(up);
 
         if (isTop && rand.nextInt(100) == 0) {
-            final double xOff = (double) tilePos.x + rand.nextFloat();
-            final double yOff = (double) tilePos.y + logicFluid.getBounds().maxY;
-            final double zOff = (double) tilePos.z + rand.nextFloat();
+            final double xOff = (double) tilePos.x() + rand.nextFloat();
+            final double yOff = (double) tilePos.y() + logicFluid.getBounds().maxY();
+            final double zOff = (double) tilePos.z() + rand.nextFloat();
             world.spawnParticle("lava", xOff, yOff, zOff, 0.0D, 0.0D, 0.0D, 0);
         }
     }
 
     @Override
-    public void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Material encountered) {
-        if (encountered == Material.water) {
+    public void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Material encountered) {
+        if (encountered == Materials.WATER) {
             final int data = world.getBlockData(tilePos) & 0x0F;
             if (data == 0) {
                 if (world.dimension == Dimension.NETHER) {
@@ -56,8 +57,9 @@ public class FluidLava
     }
 
     @Override
-    public void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         TilePos p = new TilePos(tilePos);
+        TilePos queryPos = new TilePos(tilePos);
         final int count = rand.nextInt(3);
         for (int i = 0; i < count; i++) {
             p.x += rand.nextInt(3) - 1;
@@ -65,12 +67,12 @@ public class FluidLava
             p.z += rand.nextInt(3) - 1;
             final int id = world.getBlockId(p);
             if (id == 0) {
-                if (isFlammable(world, p.west()) ||
-                    isFlammable(world, p.east()) ||
-                    isFlammable(world, p.north()) ||
-                    isFlammable(world, p.south()) ||
-                    isFlammable(world, p.down()) ||
-                    isFlammable(world, p.up())) {
+                if (isFlammable(world, p.west(queryPos)) ||
+                    isFlammable(world, p.east(queryPos)) ||
+                    isFlammable(world, p.north(queryPos)) ||
+                    isFlammable(world, p.south(queryPos)) ||
+                    isFlammable(world, p.down(queryPos)) ||
+                    isFlammable(world, p.up(queryPos))) {
                     world.setBlockIdNotify(p, Blocks.FIRE.id());
                     return;
                 }
@@ -87,7 +89,7 @@ public class FluidLava
     }
 
     @Override
-    public byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos) {
+    public byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos) {
         if (world.dimension == Dimension.NETHER) {
             return 1;
         } else {
@@ -96,7 +98,7 @@ public class FluidLava
     }
 
     @Override
-    public boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         return false;
     }
 
@@ -107,6 +109,6 @@ public class FluidLava
 
     @Override
     public boolean canSpreadTo(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Material material) {
-        return material != Material.lava;
+        return material != Materials.LAVA;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/FluidWater.java b/game/core/src/main/java/net/minecraft/core/block/FluidWater.java
index e5f90874f..b54916f82 100644
--- a/game/core/src/main/java/net/minecraft/core/block/FluidWater.java
+++ b/game/core/src/main/java/net/minecraft/core/block/FluidWater.java
@@ -1,42 +1,43 @@
 package net.minecraft.core.block;
 
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
 
 public class FluidWater
-    implements Fluid
-{
+    implements Fluid {
     @Override
     public int tickDelay() {
         return 5;
     }
 
     @Override
-    public void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void animationTick(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         final int data = world.getBlockData(tilePos) & 0x0F;
-        TilePos up = tilePos.up();
-        final boolean isTop = world.getBlockMaterial(up) == Material.air && !world.isBlockOpaqueCube(up);
+        TilePos up = tilePos.up(new TilePos());
+        final boolean isTop = world.getBlockMaterial(up) == Materials.AIR && !world.isBlockOpaqueCube(up);
         if (rand.nextInt(64) == 0) {
             if (data > 0 && data < 8) {
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) tilePos.x + 0.5F, (float) tilePos.y + 0.5F, (float) tilePos.z + 0.5F, "liquid.water", rand.nextFloat() * 0.25F + 0.75F, rand.nextFloat() * 1.0F + 0.5F);
+                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (float) tilePos.x() + 0.5F, (float) tilePos.y() + 0.5F, (float) tilePos.z() + 0.5F, "liquid.water", rand.nextFloat() * 0.25F + 0.75F, rand.nextFloat() * 1.0F + 0.5F);
             }
         }
         if (world.dimension == Dimension.NETHER && isTop && data == 0 && rand.nextInt(4) == 0) {
-            world.spawnParticle("smoke", tilePos.x + Math.random(), tilePos.y + (14f / 16f), tilePos.z + Math.random(), 0.0D, 0.0D, 0.0D, 1);
+            world.spawnParticle("smoke", tilePos.x() + Math.random(), tilePos.y() + (14f / 16f), tilePos.z() + Math.random(), 0.0D, 0.0D, 0.0D, 1);
         }
 
     }
 
     @Override
-    public void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Material encountered) {
-        if (encountered == Material.lava) {
+    public void checkForHarden(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Material encountered) {
+        if (encountered == Materials.LAVA) {
             final int data = world.getBlockData(tilePos) & 0x0F;
             if (data == 0) {
                 world.setBlockIdNotify(tilePos, Blocks.COBBLE_LIMESTONE.id());
@@ -51,17 +52,17 @@ public class FluidWater
     }
 
     @Override
-    public void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         // Do nothing
     }
 
     @Override
-    public byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos) {
+    public byte getFlowDecayMod(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos) {
         return 1;
     }
 
     @Override
-    public boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Random rand) {
+    public boolean canBecomeSource(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) {
         return world.dimension != Dimension.NETHER;
     }
 
@@ -75,6 +76,6 @@ public class FluidWater
 
     @Override
     public boolean canSpreadTo(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Material material) {
-        return material != Material.lava;
+        return material != Materials.LAVA;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/IPaintable.java b/game/core/src/main/java/net/minecraft/core/block/IPaintable.java
index d6197584e..b88ea416a 100644
--- a/game/core/src/main/java/net/minecraft/core/block/IPaintable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/IPaintable.java
@@ -3,12 +3,13 @@ package net.minecraft.core.block;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public interface IPaintable {
     default boolean canBePainted() { return true; }
 
-    void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color);
+    void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color);
 
     @Deprecated
     default void setColor(final @NotNull World world, final int x, final int y, final int z, final @NotNull DyeColor color) {
diff --git a/game/core/src/main/java/net/minecraft/core/block/IPainted.java b/game/core/src/main/java/net/minecraft/core/block/IPainted.java
index 1d76f6781..d0fa3b7de 100644
--- a/game/core/src/main/java/net/minecraft/core/block/IPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/IPainted.java
@@ -3,6 +3,7 @@ package net.minecraft.core.block;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public interface IPainted
@@ -13,14 +14,14 @@ public interface IPainted
 
     int stripColorFromMetadata(int meta);
 
-    void removeDye(final @NotNull World world, final @NotNull TilePos tilePos);
+    void removeDye(final @NotNull World world, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default void removeDye(final @NotNull World world, final int x, final int y, final int z) {
         this.removeDye(world, new TilePos(x, y, z));
     }
 
-    default @NotNull DyeColor getColor(final @NotNull World world, final @NotNull TilePos tilePos) {
+    default @NotNull DyeColor getColor(final @NotNull World world, final @NotNull TilePosc tilePos) {
         return this.fromMetadata(world.getBlockData(tilePos));
     }
 
@@ -30,7 +31,7 @@ public interface IPainted
     }
 
     @Override
-    default void setColor(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull DyeColor color) {
+    default void setColor(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull DyeColor color) {
         final int data = world.getBlockData(tilePos);
         world.setBlockDataNotify(tilePos, this.stripColorFromMetadata(data) | this.toMetadata(color));
     }
diff --git a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityBasket.java b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityBasket.java
index cd3486e9c..1944ba820 100644
--- a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityBasket.java
+++ b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityBasket.java
@@ -19,20 +19,19 @@ import com.mojang.nbt.tags.ListTag;
 import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.net.packet.PacketTileEntityData;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.ICarriable;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class TileEntityBasket extends TileEntity
-{
+public class TileEntityBasket extends TileEntity {
     private int numUnitsInside = 0;
     private final Object2IntMap<BasketEntry> contents = new Object2IntArrayMap<>();
 
-    private void updateNumUnits()
-    {
+    private void updateNumUnits() {
         int currentNumInside = calcNumUnitsInside();
-        if (currentNumInside != numUnitsInside && worldObj != null){
+        if (currentNumInside != numUnitsInside && worldObj != null) {
             this.numUnitsInside = currentNumInside;
             worldObj.notifyBlockChange(x, y, z, worldObj.getBlockId(x, y, z));
             setChanged();
@@ -41,8 +40,7 @@ public class TileEntityBasket extends TileEntity
 
     private int calcNumUnitsInside() {
         int numInside = 0;
-        for (Map.Entry<BasketEntry, Integer> entry : contents.object2IntEntrySet())
-        {
+        for (Map.Entry<BasketEntry, Integer> entry : contents.object2IntEntrySet()) {
             final BasketEntry be = entry.getKey();
             final int numItems = entry.getValue();
 
@@ -52,14 +50,12 @@ public class TileEntityBasket extends TileEntity
         return numInside;
     }
 
-    private int getItemSizeUnits(final Item item)
-    {
+    private int getItemSizeUnits(final Item item) {
         return 64 / item.getItemStackLimit(null);
     }
 
 
-    private void dropItemStack(final Random rand, final ItemStack itemstack)
-    {
+    private void dropItemStack(final Random rand, final ItemStack itemstack) {
         final float f = rand.nextFloat() * 0.8F + 0.1F;
         final float f1 = rand.nextFloat() * 0.8F + 0.1F;
         final float f2 = rand.nextFloat() * 0.8F + 0.1F;
@@ -81,46 +77,43 @@ public class TileEntityBasket extends TileEntity
         workingWorld.entityJoinedWorld(item);
     }
 
-    public int getNumUnitsInside()
-    {
+    public int getNumUnitsInside() {
         return this.numUnitsInside;
     }
 
-    public int getMaxUnits()
-    {
+    public int getMaxUnits() {
         return 27 * 64;
     }
 
-	public void givePlayerAllItems(final World world, final Player player) {
-		final List<BasketEntry> toRemove = new ArrayList<>();
+    public void givePlayerAllItems(final World world, final Player player) {
+        final List<BasketEntry> toRemove = new ArrayList<>();
 
-		for(final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet()) {
-			final BasketEntry basketEntry = entry.getKey();
-			final ItemStack basketEntryStack = new ItemStack(basketEntry.id, entry.getIntValue(), basketEntry.metadata, basketEntry.tag);
-			// Beware! basketEntryStack may have a stack size higher than its limit!
-			
-			player.inventory.insertItem(basketEntryStack, true);
+        for (final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet()) {
+            final BasketEntry basketEntry = entry.getKey();
+            final ItemStack basketEntryStack = new ItemStack(basketEntry.id, entry.getIntValue(), basketEntry.metadata, basketEntry.tag);
+            // Beware! basketEntryStack may have a stack size higher than its limit!
+
+            player.inventory.insertItem(basketEntryStack, true);
             this.contents.put(basketEntry, basketEntryStack.stackSize);
-			
-			if(basketEntryStack.stackSize <= 0) {
-				toRemove.add(basketEntry);
-			}
-		}
 
-		for(final BasketEntry entry : toRemove) {
+            if (basketEntryStack.stackSize <= 0) {
+                toRemove.add(basketEntry);
+            }
+        }
+
+        for (final BasketEntry entry : toRemove) {
             this.contents.removeInt(entry);
-		}
+        }
 
-		updateNumUnits();
+        updateNumUnits();
         world.notifyBlockChange(this.x, this.y, this.z, Blocks.BASKET.id());
-	}
+    }
 
     @Override
     public void readAdditionalData(@NotNull final CompoundTag compoundTag) {
         final ListTag itemsTag = compoundTag.getList("Items");
         this.contents.clear();
-        for (int i = 0; i < itemsTag.tagCount(); i++)
-        {
+        for (int i = 0; i < itemsTag.tagCount(); i++) {
             final CompoundTag itemTag = (CompoundTag) itemsTag.tagAt(i);
             final BasketEntry entry = BasketEntry.read(itemTag);
             final int count = itemTag.getShort("Count");
@@ -130,8 +123,7 @@ public class TileEntityBasket extends TileEntity
     }
 
     @Override
-    public void tick()
-    {
+    public void tick() {
         if (this.worldObj != null && this.worldObj.isClientSide) return;
         if (this.carriedBlock != null && this.carriedBlock.world.isClientSide) return;
 
@@ -153,14 +145,13 @@ public class TileEntityBasket extends TileEntity
             return;
         }
 
-        final AABB aabb = AABB.fromPool(posX, posY, posZ, posX + 1, posY + 2, posZ + 1);
+        final AABBdc aabb = new AABBd(posX, posY, posZ, posX + 1, posY + 2, posZ + 1);
 
         final List<EntityItem> entities = workingWorld.getEntitiesWithinAABB(EntityItem.class, aabb);
 
         boolean shouldUpdate = false;
 
-        if (!entities.isEmpty())
-        {
+        if (!entities.isEmpty()) {
             for (int i = 0; i < entities.size(); i++) {
                 if (calcNumUnitsInside() >= getMaxUnits()) break;
                 EntityItem e = entities.get(i);
@@ -174,8 +165,7 @@ public class TileEntityBasket extends TileEntity
             }
         }
 
-        if (shouldUpdate)
-        {
+        if (shouldUpdate) {
             if (this.worldObj != null) {
                 this.worldObj.notifyBlockChange(this.x, this.y, this.z, Blocks.BASKET.id());
             }
@@ -183,8 +173,7 @@ public class TileEntityBasket extends TileEntity
         }
     }
 
-    private boolean importItemStack(final ItemStack stack)
-    {
+    private boolean importItemStack(final ItemStack stack) {
         BasketEntry entry = new BasketEntry(stack.itemID, stack.getMetadata(), stack.getData());
         final int sizeUnits = getItemSizeUnits(stack.getItem());
         final int freeUnits = getMaxUnits() - numUnitsInside;
@@ -198,11 +187,9 @@ public class TileEntityBasket extends TileEntity
     }
 
     @Override
-    public void writeAdditionalData(@NotNull final CompoundTag compoundTag)
-    {
+    public void writeAdditionalData(@NotNull final CompoundTag compoundTag) {
         final ListTag itemsTag = new ListTag();
-        for (final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet())
-        {
+        for (final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet()) {
             final CompoundTag itemTag = new CompoundTag();
             itemTag.putShort("Count", (short) entry.getIntValue());
             BasketEntry.write(itemTag, entry.getKey());
@@ -226,13 +213,11 @@ public class TileEntityBasket extends TileEntity
         super.dropContents(world, x, y, z);
         final Random rand = new Random();
 
-        for (final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet())
-        {
+        for (final Object2IntMap.Entry<BasketEntry> entry : this.contents.object2IntEntrySet()) {
             final BasketEntry be = entry.getKey();
             int numItems = entry.getIntValue();
 
-            while (numItems > 0)
-            {
+            while (numItems > 0) {
                 final int maxStackSize = be.getItem().getItemStackLimit(null);
                 int stackSize = maxStackSize;
                 final int remainingItems = numItems - maxStackSize;
@@ -252,26 +237,24 @@ public class TileEntityBasket extends TileEntity
     public void heldTick(final World world, final Entity holder) {
         tick();
     }
+
     @Override
     public boolean canBeCarried(final World world, final Entity potentialHolder) {
         return true;
     }
 
-    private static final class BasketEntry
-    {
+    private static final class BasketEntry {
         public final int id;
         public final int metadata;
         public final CompoundTag tag;
 
-        public BasketEntry(final int id, final int metadata, final CompoundTag tag)
-        {
+        public BasketEntry(final int id, final int metadata, final CompoundTag tag) {
             this.id = id;
             this.metadata = metadata;
             this.tag = tag;
         }
 
-        public static BasketEntry read(final CompoundTag tag)
-        {
+        public static BasketEntry read(final CompoundTag tag) {
             final int id = tag.getShort("id");
             final int damage = tag.getShort("Damage");
             final CompoundTag data = tag.getCompound("Data");
@@ -279,21 +262,18 @@ public class TileEntityBasket extends TileEntity
             return new BasketEntry(id, damage, data);
         }
 
-        public static void write(final CompoundTag tag, final BasketEntry entry)
-        {
+        public static void write(final CompoundTag tag, final BasketEntry entry) {
             tag.putShort("id", (short) entry.id);
             tag.putShort("Damage", (short) entry.metadata);
             tag.putCompound("Data", entry.tag);
         }
 
-        public Item getItem()
-        {
+        public Item getItem() {
             return Item.itemsList[this.id];
         }
 
         @Override
-        public boolean equals(final Object obj)
-        {
+        public boolean equals(final Object obj) {
             if (!(obj instanceof BasketEntry)) return false;
             final BasketEntry other = (BasketEntry) obj;
             if (this.id != other.id || this.metadata != other.metadata) return false;
@@ -301,14 +281,10 @@ public class TileEntityBasket extends TileEntity
         }
 
         @Override
-        public int hashCode()
-        {
-            if (this.tag.getValues().size() <= 2)
-            {
+        public int hashCode() {
+            if (this.tag.getValues().size() <= 2) {
                 return Objects.hash(this.id, this.metadata);
-            }
-            else
-            {
+            } else {
                 return Objects.hash(this.id, this.metadata, this.tag);
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityMobSpawner.java b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityMobSpawner.java
index 821bfb1de..3ba382720 100644
--- a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityMobSpawner.java
+++ b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityMobSpawner.java
@@ -4,16 +4,16 @@ import com.mojang.logging.LogUtils;
 import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.util.phys.AABB;
+import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.net.packet.PacketSetMobSpawner;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 import org.slf4j.Logger;
 
-public class TileEntityMobSpawner extends TileEntity
-{
+public class TileEntityMobSpawner extends TileEntity {
     private static final Logger LOGGER = LogUtils.getLogger();
     public int delay;
     private String mobId;
@@ -21,25 +21,22 @@ public class TileEntityMobSpawner extends TileEntity
     public double yaw2;
     private int nearby;
 
-    public TileEntityMobSpawner()
-    {
-        yaw2 = 0.0D;
-        mobId = "minecraft:pig";
-        delay = 20;
+    public TileEntityMobSpawner() {
+        this.yaw2 = 0.0D;
+        this.mobId = "minecraft:pig";
+        this.delay = 20;
     }
 
-    public String getMobId()
-    {
-        return mobId;
+    public String getMobId() {
+        return this.mobId;
     }
 
-    public void setMobId(String mobId)
-    {
-    	if(mobId != null && mobId.equalsIgnoreCase("none")) {
-    		this.mobId = null;
-    	} else {
-    		this.mobId = mobId;
-    	}
+    public void setMobId(String mobId) {
+        if (mobId != null && mobId.equalsIgnoreCase("none")) {
+            this.mobId = null;
+        } else {
+            this.mobId = mobId;
+        }
         try {
             if (EntityDispatcher.Legacy.isLegacyKey(mobId)) {
                 EntityDispatcher.EntityDispatcherEntry<?> entry = EntityDispatcher.getInstance().entryForClass(EntityDispatcher.Legacy.getClassFromEncodeID(mobId));
@@ -50,84 +47,75 @@ public class TileEntityMobSpawner extends TileEntity
         }
     }
 
-    public boolean anyPlayerInRange()
-    {
-        return worldObj != null && worldObj.getClosestPlayer((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, 16D) != null;
+    public boolean anyPlayerInRange() {
+        return this.worldObj != null && this.worldObj.getClosestPlayer((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D, 16D) != null;
     }
 
     @Override
-	public void tick()
-    {
-        if (worldObj.getBlockId(x, y, z) != Blocks.MOBSPAWNER.id()) return; // dumb fix for mp particle bug, need proper way to inform client to remove tileEntity
-        yaw2 = yaw;
-        if(!anyPlayerInRange())
-        {
+    public void tick() {
+        if (this.worldObj.getBlockId(this.x, this.y, this.z) != Blocks.MOBSPAWNER.id())
+            return; // dumb fix for mp particle bug, need proper way to inform client to remove tileEntity
+        this.yaw2 = this.yaw;
+        if (!anyPlayerInRange()) {
             return;
         }
-        double xPos = (double) x + worldObj.rand.nextFloat();
-        double yPos = (double) y + worldObj.rand.nextFloat();
-        double zPos = (double) z + worldObj.rand.nextFloat();
-        worldObj.spawnParticle("smoke", xPos, yPos, zPos, 0.0D, 0.0D, 0.0D, 0);
-        worldObj.spawnParticle("flame", xPos, yPos, zPos, 0.0D, 0.0D, 0.0D, 0);
-        for(yaw += 1000F / ((float)delay + 200F); yaw > 360D;)
-        {
-            yaw -= 360D;
-            yaw2 -= 360D;
+        double xPos = (double) this.x + this.worldObj.rand.nextFloat();
+        double yPos = (double) this.y + this.worldObj.rand.nextFloat();
+        double zPos = (double) this.z + this.worldObj.rand.nextFloat();
+        this.worldObj.spawnParticle("smoke", xPos, yPos, zPos, 0.0D, 0.0D, 0.0D, 0);
+        this.worldObj.spawnParticle("flame", xPos, yPos, zPos, 0.0D, 0.0D, 0.0D, 0);
+        for (this.yaw += 1000F / ((float) this.delay + 200F); this.yaw > 360D; ) {
+            this.yaw -= 360D;
+            this.yaw2 -= 360D;
         }
 
-        if(!worldObj.isClientSide)
-        {
-        	if(!worldObj.getDifficulty().canHostileMobsSpawn()) {
-        		return;
-        	}
-        	if(mobId == null || mobId.equalsIgnoreCase("none")) {
-        		return;
-        	}
-            if(delay == -1)
-            {
+        if (!this.worldObj.isClientSide) {
+            if (!this.worldObj.getDifficulty().canHostileMobsSpawn()) {
+                return;
+            }
+            if (this.mobId == null || this.mobId.equalsIgnoreCase("none")) {
+                return;
+            }
+            if (this.delay == -1) {
                 updateDelay();
             }
-            if(delay > 0)
-            {
-                delay--;
+            if (this.delay > 0) {
+                this.delay--;
                 return;
             }
-            if(mobId == null) {
-            	nearby = countNearbySpawners();
+            if (this.mobId == null) {
+                this.nearby = countNearbySpawners();
             }
             byte byte0 = 4;
-            for(int i = 0; i < byte0; i++)
-            {
-                Mob mob = (Mob) EntityDispatcher.getInstance().createEntityInWorld(mobId, worldObj);
+            for (int i = 0; i < byte0; i++) {
+                Mob mob = (Mob) EntityDispatcher.getInstance().createEntityInWorld(this.mobId, this.worldObj);
 
-                if(mob == null)
-                {
+                if (mob == null) {
                     return;
                 }
-                int j = worldObj.getEntitiesWithinAABB(mob.getClass(), AABB.fromPool(x, y, z, x + 1, y + 1, z + 1).grow(8D, 4D, 8D)).size();
-                if(j >= 6)
-                {
+                AABBd checkBB = new AABBd(this.x, this.y, this.z, this.x + 1, this.y + 1, this.z + 1);
+                MathHelper.aabbGrow(checkBB, 8, 4, 8, checkBB);
+                int nearbySpawnCount = this.worldObj.getEntitiesWithinAABB(mob.getClass(), checkBB).size();
+                if (nearbySpawnCount >= 6) {
                     updateDelay();
                     return;
                 }
-                double d6 = (double) x + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
-                double d7 = (y + worldObj.rand.nextInt(3)) - 1;
-                double d8 = (double) z + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
-                mob.moveTo(d6, d7, d8, worldObj.rand.nextFloat() * 360F, 0.0F);
-                if(!mob.canSpawnHere())
-                {
-                	updateDelay();
+                double d6 = (double) this.x + (this.worldObj.rand.nextDouble() - this.worldObj.rand.nextDouble()) * 4D;
+                double d7 = (this.y + this.worldObj.rand.nextInt(3)) - 1;
+                double d8 = (double) this.z + (this.worldObj.rand.nextDouble() - this.worldObj.rand.nextDouble()) * 4D;
+                mob.moveTo(d6, d7, d8, this.worldObj.rand.nextFloat() * 360F, 0.0F);
+                if (!mob.canSpawnHere()) {
+                    updateDelay();
                     continue;
                 }
-                worldObj.entityJoinedWorld(mob);
-                for(int k = 0; k < 20; k++)
-                {
-                    double d1 = (double) x + 0.5D + ((double)worldObj.rand.nextFloat() - 0.5D) * 2D;
-                    double d3 = (double) y + 0.5D + ((double)worldObj.rand.nextFloat() - 0.5D) * 2D;
-                    double d5 = (double) z + 0.5D + ((double)worldObj.rand.nextFloat() - 0.5D) * 2D;
-                    worldObj.spawnParticle("smoke", d1, d3, d5, 0.0D, 0.0D, 0.0D, 0);
-                    worldObj.spawnParticle("flame", d1, d3, d5, 0.0D, 0.0D, 0.0D, 0);
-                    worldObj.playSoundAtEntity(null, mob, "tile.mobspawner.spawn", 0.025F, 0.75F);
+                this.worldObj.entityJoinedWorld(mob);
+                for (int k = 0; k < 20; k++) {
+                    double d1 = (double) this.x + 0.5D + ((double) this.worldObj.rand.nextFloat() - 0.5D) * 2D;
+                    double d3 = (double) this.y + 0.5D + ((double) this.worldObj.rand.nextFloat() - 0.5D) * 2D;
+                    double d5 = (double) this.z + 0.5D + ((double) this.worldObj.rand.nextFloat() - 0.5D) * 2D;
+                    this.worldObj.spawnParticle("smoke", d1, d3, d5, 0.0D, 0.0D, 0.0D, 0);
+                    this.worldObj.spawnParticle("flame", d1, d3, d5, 0.0D, 0.0D, 0.0D, 0);
+                    this.worldObj.playSoundAtEntity(null, mob, "tile.mobspawner.spawn", 0.025F, 0.75F);
                 }
 
                 mob.spawnExplosionParticle();
@@ -137,54 +125,51 @@ public class TileEntityMobSpawner extends TileEntity
         }
         super.tick();
     }
-    
+
     @Override
-	public Packet getDescriptionPacket()
-    {
-        return new PacketSetMobSpawner(new TilePos(x, y, z), EntityDispatcher.getInstance().entryForId(mobId));
+    public Packet getDescriptionPacket() {
+        return new PacketSetMobSpawner(new TilePos(this.x, this.y, this.z), EntityDispatcher.getInstance().entryForId(this.mobId));
     }
-    
+
     public int countNearbySpawners() {
-    	int r = 4;
-    	int count = 0;
-    	for(int i = -r; i <= r; i++) {
-    		for(int j = -r; j <= r; j++) {
-    			for(int k = -r; k <= r; k++) {
-    				int id = worldObj.getBlockId(x + i, y + j, z + k);
-    				if(id == Blocks.MOBSPAWNER.id()) {
-    					count++;
-    				}
-    			}
-    		}
-    	}
-    	return count;
+        int r = 4;
+        int count = 0;
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = this.x -r; tilePos.x <= this.x + r; tilePos.x++) {
+            for (tilePos.y = this.y -r; tilePos.y <= this.y + r; tilePos.y++) {
+                for (tilePos.z = this.z -r; tilePos.z <= this.z + r; tilePos.z++) {
+                    int id = this.worldObj.getBlockId(tilePos);
+                    if (id == Blocks.MOBSPAWNER.id()) {
+                        count++;
+                    }
+                }
+            }
+        }
+        return count;
     }
 
-    private void updateDelay()
-    {
-    	delay = 200 + worldObj.rand.nextInt(600);
-    	if(mobId == null) {
-    		delay *= 2;
+    private void updateDelay() {
+        this.delay = 200 + this.worldObj.rand.nextInt(600);
+        if (this.mobId == null) {
+            this.delay *= 2;
             LOGGER.debug("x2");
-    		if(nearby > 1) {
+            if (this.nearby > 1) {
                 LOGGER.debug("x4");
-    			delay *= 4;
-    		}
-    	}
+                this.delay *= 4;
+            }
+        }
     }
 
     @Override
-    public void readAdditionalData(@NotNull CompoundTag compoundTag)
-    {
+    public void readAdditionalData(@NotNull CompoundTag compoundTag) {
         setMobId(compoundTag.getString("EntityId"));
-        delay = compoundTag.getShort("Delay");
+        this.delay = compoundTag.getShort("Delay");
     }
 
     @Override
-    public void writeAdditionalData(@NotNull CompoundTag compoundTag)
-    {
-        compoundTag.putString("EntityId", mobId != null ? mobId : "none");
-        compoundTag.putShort("Delay", (short)delay);
+    public void writeAdditionalData(@NotNull CompoundTag compoundTag) {
+        compoundTag.putString("EntityId", this.mobId != null ? this.mobId : "none");
+        compoundTag.putShort("Delay", (short) this.delay);
     }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntitySensor.java b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntitySensor.java
index 3bb024159..53f8f7553 100644
--- a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntitySensor.java
+++ b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntitySensor.java
@@ -6,163 +6,161 @@ import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.achievement.Achievements;
 import net.minecraft.core.block.BlockLogicVeryRotatable;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.BlockLogicMotionSensor;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class TileEntitySensor extends TileEntity {
 
-	private int getSightRange(World world, double x, double y, double z, Direction facing) {
-		if(facing == Direction.NONE) {
-			return 0;
-		}
-		
-		int range = 4;
-		int blockInFront = world.getBlockId(MathHelper.round(x + facing.getOffsetX()), MathHelper.round(y + facing.getOffsetY()), MathHelper.round(z + facing.getOffsetZ()));
-		if(Blocks.hasTag(blockInFront, BlockTags.EXTENDS_MOTION_SENSOR_RANGE)) {
-			range = 8;
-		}
-		
-		for(int i = 1; i <= range; i++) {
-			int x1 = MathHelper.round(x + facing.getOffsetX() * i);
-			int y1 = MathHelper.round(y + facing.getOffsetY() * i);
-			int z1 = MathHelper.round(z + facing.getOffsetZ() * i);
-			int id = world.getBlockId(x1, y1, z1);
-			if(Blocks.solid[id] && !Blocks.hasTag(id, BlockTags.EXTENDS_MOTION_SENSOR_RANGE)) {
-				return i - 1;
-			}
-		}
-		
-		return range;
-	}
-
-	private AABB getDetectionBox(double x, double y, double z, Direction facing, int range) {
-		double x1 = x + facing.getOffsetX();
-		double y1 = y + facing.getOffsetY();
-		double z1 = z + facing.getOffsetZ();
-		
-		double x2 = x + facing.getOffsetX() * range;
-		double y2 = y + facing.getOffsetY() * range;
-		double z2 = z + facing.getOffsetZ() * range;
-		
-		double minX = Math.min(x1, x2);
-		double minY = Math.min(y1, y2);
-		double minZ = Math.min(z1, z2);
-		
-		double maxX = Math.max(x1, x2) + 1;
-		double maxY = Math.max(y1, y2) + 1;
-		double maxZ = Math.max(z1, z2) + 1;
-		
-		return AABB.fromPool(minX, minY, minZ, maxX, maxY, maxZ);
-	}
-
-	@Override
-	public void tick() {
-		if(worldObj == null || worldObj.isClientSide) {
-			return;
-		}
-		
-		int id = worldObj.getBlockId(x, y, z);
-		int meta = worldObj.getBlockMetadata(x, y, z);
-		
-		boolean shouldBeActive = false;
-		Direction facing = BlockLogicVeryRotatable.metaToDirection(meta);
-		int effectiveRange = getSightRange(worldObj, x, y, z, facing);
-		if(effectiveRange > 0) {
-			AABB detectionBox = getDetectionBox(x, y, z, facing, effectiveRange);
-			List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, detectionBox);
-			for(int i=0; i < list.size(); i++) {
-				Entity entity = list.get(i);
-				if (entity.canInteract()) {
-					if(entity instanceof Player) {
-						Player player = (Player) entity;
-						player.triggerAchievement(Achievements.GET_SENSED);
-					}
-					shouldBeActive = true;
-				}
-			}
-		}
-		
-		if(shouldBeActive && id == Blocks.MOTION_SENSOR_IDLE.id()) {
-			worldObj.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x + 0.5, y + 0.5, z + 0.5, "tile.sensor_block.sense", 1f, worldObj.rand.nextFloat());
-			updateSensorBlockState(true, worldObj);
-		}
-		if(!shouldBeActive && id == Blocks.MOTION_SENSOR_ACTIVE.id()) {
-			updateSensorBlockState(false, worldObj);
-		}
-	}
-
-	@Override
-	public void readAdditionalData(@NotNull CompoundTag compoundTag) {
-
-	}
-
-	@Override
-	public void writeAdditionalData(@NotNull CompoundTag compoundTag) {
-
-	}
-
-	@Override
-	public void heldTick(World world, Entity holder) {
-		if(world == null || carriedBlock == null || world.isClientSide) {
-			return;
-		}
-		assert worldObj == null;
-
-		int id = carriedBlock.blockId;
-		int meta = carriedBlock.metadata;
-
-		boolean shouldBeActive = false;
-		Direction facing = BlockLogicVeryRotatable.metaToDirection(meta);
-		int effectiveRange = getSightRange(world, holder.x, holder.y, holder.z, facing);
-		if(effectiveRange > 0) {
-			AABB detectionBox = getDetectionBox(holder.x, holder.y, holder.z, facing, effectiveRange);
-			List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(null, detectionBox);
-			for(int i=0; i < list.size(); i++) {
-				Entity entity = list.get(i);
-				if (entity == holder) continue;
-				if(entity instanceof Player) {
-					Player player = (Player) entity;
-					player.triggerAchievement(Achievements.GET_SENSED);
-				}
-				shouldBeActive = true;
-			}
-		}
-
-		if(shouldBeActive && id == Blocks.MOTION_SENSOR_IDLE.id()) {
-			world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, x + 0.5, y + 0.5, z + 0.5, "tile.sensor_block.sense", 1f, world.rand.nextFloat());
-			updateSensorBlockState(true, world);
-		}
-		if(!shouldBeActive && id == Blocks.MOTION_SENSOR_ACTIVE.id()) {
-			updateSensorBlockState(false, world);
-		}
-	}
-
-	public void updateSensorBlockState(boolean active, World world) {
-		if (carriedBlock != null) {
-            if(active) {
-				carriedBlock.blockId = Blocks.MOTION_SENSOR_ACTIVE.id();
-			}else {
-				carriedBlock.blockId = Blocks.MOTION_SENSOR_IDLE.id();
-			}
-		} else {
-			int meta = world.getBlockMetadata(x, y, z);
-			int blockId;
-			if(active) {
-				blockId = Blocks.MOTION_SENSOR_ACTIVE.id();
-			}else {
-				blockId = Blocks.MOTION_SENSOR_IDLE.id();
-			}
-			world.setBlock(x, y, z, blockId);
-			world.setBlockMetadata(x, y, z, meta);
-			world.notifyBlockChange(x, y, z, blockId);
-		}
-	}
+    private int getSightRange(World world, double x, double y, double z, Direction facing) {
+        if (facing == Direction.NONE) {
+            return 0;
+        }
+
+        int range = 4;
+        int blockInFront = world.getBlockId(MathHelper.round(x + facing.getOffsetX()), MathHelper.round(y + facing.getOffsetY()), MathHelper.round(z + facing.getOffsetZ()));
+        if (Blocks.hasTag(blockInFront, BlockTags.EXTENDS_MOTION_SENSOR_RANGE)) {
+            range = 8;
+        }
+
+        for (int i = 1; i <= range; i++) {
+            int x1 = MathHelper.round(x + facing.getOffsetX() * i);
+            int y1 = MathHelper.round(y + facing.getOffsetY() * i);
+            int z1 = MathHelper.round(z + facing.getOffsetZ() * i);
+            int id = world.getBlockId(x1, y1, z1);
+            if (Blocks.solid[id] && !Blocks.hasTag(id, BlockTags.EXTENDS_MOTION_SENSOR_RANGE)) {
+                return i - 1;
+            }
+        }
+
+        return range;
+    }
+
+    private @NotNull AABBdc getDetectionBox(double x, double y, double z, @NotNull Direction facing, int range) {
+        double x1 = x + facing.getOffsetX();
+        double y1 = y + facing.getOffsetY();
+        double z1 = z + facing.getOffsetZ();
+
+        double x2 = x + facing.getOffsetX() * range;
+        double y2 = y + facing.getOffsetY() * range;
+        double z2 = z + facing.getOffsetZ() * range;
+
+        double minX = Math.min(x1, x2);
+        double minY = Math.min(y1, y2);
+        double minZ = Math.min(z1, z2);
+
+        double maxX = Math.max(x1, x2) + 1;
+        double maxY = Math.max(y1, y2) + 1;
+        double maxZ = Math.max(z1, z2) + 1;
+
+        return new AABBd(minX, minY, minZ, maxX, maxY, maxZ);
+    }
+
+    @Override
+    public void tick() {
+        if (this.worldObj == null || this.worldObj.isClientSide) {
+            return;
+        }
+
+        int id = this.worldObj.getBlockId(this.x, this.y, this.z);
+        int meta = this.worldObj.getBlockMetadata(this.x, this.y, this.z);
+
+        boolean shouldBeActive = false;
+        Direction facing = BlockLogicVeryRotatable.metaToDirection(meta);
+        int effectiveRange = getSightRange(this.worldObj, this.x, this.y, this.z, facing);
+        if (effectiveRange > 0) {
+            AABBdc detectionBox = getDetectionBox(this.x, this.y, this.z, facing, effectiveRange);
+            List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, detectionBox);
+            for (int i = 0; i < list.size(); i++) {
+                Entity entity = list.get(i);
+                if (entity.canInteract()) {
+                    if (entity instanceof Player player) {
+                        player.triggerAchievement(Achievements.GET_SENSED);
+                    }
+                    shouldBeActive = true;
+                }
+            }
+        }
+
+        if (shouldBeActive && id == Blocks.MOTION_SENSOR_IDLE.id()) {
+            this.worldObj.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, this.x + 0.5, this.y + 0.5, this.z + 0.5, "tile.sensor_block.sense", 1f, this.worldObj.rand.nextFloat());
+            updateSensorBlockState(true, this.worldObj);
+        }
+        if (!shouldBeActive && id == Blocks.MOTION_SENSOR_ACTIVE.id()) {
+            updateSensorBlockState(false, this.worldObj);
+        }
+    }
+
+    @Override
+    public void readAdditionalData(@NotNull CompoundTag compoundTag) {
+
+    }
+
+    @Override
+    public void writeAdditionalData(@NotNull CompoundTag compoundTag) {
+
+    }
+
+    @Override
+    public void heldTick(World world, Entity holder) {
+        if (world == null || this.carriedBlock == null || world.isClientSide) {
+            return;
+        }
+        assert this.worldObj == null;
+
+        int id = this.carriedBlock.blockId;
+        int meta = this.carriedBlock.metadata;
+
+        boolean shouldBeActive = false;
+        Direction facing = BlockLogicVeryRotatable.metaToDirection(meta);
+        int effectiveRange = getSightRange(world, holder.x, holder.y, holder.z, facing);
+        if (effectiveRange > 0) {
+            AABBdc detectionBox = getDetectionBox(holder.x, holder.y, holder.z, facing, effectiveRange);
+            List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(null, detectionBox);
+            for (int i = 0; i < list.size(); i++) {
+                Entity entity = list.get(i);
+                if (entity == holder) continue;
+                if (entity instanceof Player player) {
+                    player.triggerAchievement(Achievements.GET_SENSED);
+                }
+                shouldBeActive = true;
+            }
+        }
+
+        if (shouldBeActive && id == Blocks.MOTION_SENSOR_IDLE.id()) {
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, this.x + 0.5, this.y + 0.5, this.z + 0.5, "tile.sensor_block.sense", 1f, world.rand.nextFloat());
+            updateSensorBlockState(true, world);
+        }
+        if (!shouldBeActive && id == Blocks.MOTION_SENSOR_ACTIVE.id()) {
+            updateSensorBlockState(false, world);
+        }
+    }
+
+    public void updateSensorBlockState(boolean active, World world) {
+        if (this.carriedBlock != null) {
+            if (active) {
+                this.carriedBlock.blockId = Blocks.MOTION_SENSOR_ACTIVE.id();
+            } else {
+                this.carriedBlock.blockId = Blocks.MOTION_SENSOR_IDLE.id();
+            }
+        } else {
+            int meta = world.getBlockMetadata(this.x, this.y, this.z);
+            int blockId;
+            if (active) {
+                blockId = Blocks.MOTION_SENSOR_ACTIVE.id();
+            } else {
+                blockId = Blocks.MOTION_SENSOR_IDLE.id();
+            }
+            world.setBlock(this.x, this.y, this.z, blockId);
+            world.setBlockMetadata(this.x, this.y, this.z, meta);
+            world.notifyBlockChange(this.x, this.y, this.z, blockId);
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/logic/RailDirection.java b/game/core/src/main/java/net/minecraft/core/block/logic/RailDirection.java
index 6a74552d2..5cf2e5891 100644
--- a/game/core/src/main/java/net/minecraft/core/block/logic/RailDirection.java
+++ b/game/core/src/main/java/net/minecraft/core/block/logic/RailDirection.java
@@ -1,6 +1,7 @@
 package net.minecraft.core.block.logic;
 
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public enum RailDirection {
@@ -43,6 +44,7 @@ public enum RailDirection {
     static {
         directionMap = new RailDirection[TURN_EN.meta + 1];
         for (RailDirection d : values()){
+            if (d.meta < 0) continue;
             directionMap[d.meta] = d;
         }
     }
@@ -73,12 +75,12 @@ public enum RailDirection {
         this.offZ2 = offZ2;
     }
 
-    public @NotNull TilePos getNextRail(@NotNull TilePos curPos) {
-        return curPos.add(this.offX1, this.offY1, this.offZ1);
+    public @NotNull TilePos getNextRail(@NotNull TilePosc curPos, @NotNull TilePos dest) {
+        return curPos.add(this.offX1, this.offY1, this.offZ1, dest);
     }
 
-    public @NotNull TilePos getPrevRail(@NotNull TilePos curPos) {
-        return curPos.add(this.offX2, this.offY2, this.offZ2);
+    public @NotNull TilePos getPrevRail(@NotNull TilePosc curPos, @NotNull TilePos dest) {
+        return curPos.add(this.offX2, this.offY2, this.offZ2, dest);
     }
     public boolean isSloped(){
         return this.sloped;
diff --git a/game/core/src/main/java/net/minecraft/core/block/material/Material.java b/game/core/src/main/java/net/minecraft/core/block/material/Material.java
index d46fa1686..b5a2067eb 100644
--- a/game/core/src/main/java/net/minecraft/core/block/material/Material.java
+++ b/game/core/src/main/java/net/minecraft/core/block/material/Material.java
@@ -1,7 +1,8 @@
 package net.minecraft.core.block.material;
 
-public class Material
-{
+import org.jetbrains.annotations.NotNull;
+
+public class Material {
     public static final int PISTON_PUSHABLE = 0;
     public static final int PISTON_DESTROY_ON_PUSH = 1;
     public static final int PISTON_CANT_PUSH = 2;
@@ -11,175 +12,116 @@ public class Material
     public static final int LIGHTNING_LIGHT_CONDUCTOR = 5;
     public static final int LIGHTNING_LIGHT_INSULATOR = -5;
     public static final int LIGHTNING_STRONG_INSULATOR = -20;
+
     private boolean flammable;
     private boolean replaceable;
     private boolean notSolidBlocking;
-    public final MaterialColor color;
+    public final @NotNull MaterialColor color;
     private boolean alwaysDestroyable;
     private boolean isStone;
     private boolean isMetal;
     private int pushReaction = PISTON_PUSHABLE;
     private int lightningConductivity = LIGHTNING_NEUTRAL;
 
-    public Material(MaterialColor color)
-    {
-        alwaysDestroyable = true;
+    public Material(final @NotNull MaterialColor color) {
+        this.alwaysDestroyable = true;
         this.color = color;
     }
 
-    public boolean isLiquid()
-    {
+    public boolean isLiquid() {
         return false;
     }
 
-    public boolean isSolid()
-    {
+    public boolean isSolid() {
         return true;
     }
 
-    public boolean blocksLight()
-    {
+    public boolean blocksLight() {
         return true;
     }
 
-    public boolean blocksMotion()
-    {
+    public boolean blocksMotion() {
         return true;
     }
 
-    public Material setAsStone() {
-        isStone = true;
+    public @NotNull Material setAsStone() {
+        this.isStone = true;
         return this;
     }
 
-    public boolean isStone() { return isStone; }
+    public boolean isStone() {
+        return this.isStone;
+    }
 
-    public Material setAsMetal() {
-        isMetal = true;
+    public @NotNull Material setAsMetal() {
+        this.isMetal = true;
         return this;
     }
 
     public boolean isMetal() {
-        return isMetal;
+        return this.isMetal;
     }
 
-    public Material notSolidBlocking()
-    {
-        notSolidBlocking = true;
+    public @NotNull Material notSolidBlocking() {
+        this.notSolidBlocking = true;
         return this;
     }
 
-    public Material notAlwaysDestroyable()
-    {
-        alwaysDestroyable = false;
+    public @NotNull Material notAlwaysDestroyable() {
+        this.alwaysDestroyable = false;
         return this;
     }
 
-    public Material flammable()
-    {
-        flammable = true;
+    public @NotNull Material flammable() {
+        this.flammable = true;
         return this;
     }
 
-    public boolean isFlammable()
-    {
-        return flammable;
+    public boolean isFlammable() {
+        return this.flammable;
     }
 
-    public Material replaceable()
-    {
-        replaceable = true;
+    public @NotNull Material replaceable() {
+        this.replaceable = true;
         return this;
     }
 
-    public boolean isReplaceable()
-    {
-        return replaceable;
+    public boolean isReplaceable() {
+        return this.replaceable;
     }
 
-    public boolean isSolidBlocking()
-    {
-        if (notSolidBlocking)
-        {
+    public boolean isSolidBlocking() {
+        if (this.notSolidBlocking) {
             return false;
-        }
-        else
-        {
-            return blocksMotion();
+        } else {
+            return this.blocksMotion();
         }
     }
 
-    public boolean isAlwaysDestroyable()
-    {
-        return alwaysDestroyable;
+    public boolean isAlwaysDestroyable() {
+        return this.alwaysDestroyable;
     }
 
-    public int getPushReaction()
-    {
-        return pushReaction;
+    public int getPushReaction() {
+        return this.pushReaction;
     }
 
-    public Material destroyOnPush()
-    {
-        pushReaction = PISTON_DESTROY_ON_PUSH;
+    public @NotNull Material destroyOnPush() {
+        this.pushReaction = PISTON_DESTROY_ON_PUSH;
         return this;
     }
 
-    public Material notPushable()
-    {
-        pushReaction = PISTON_CANT_PUSH;
+    public @NotNull Material notPushable() {
+        this.pushReaction = PISTON_CANT_PUSH;
         return this;
     }
-    public int getConductivity(){
-        return lightningConductivity;
+
+    public int getConductivity() {
+        return this.lightningConductivity;
     }
-    public Material setConductivity(int conductivity){
-        lightningConductivity = conductivity;
+
+    public @NotNull Material setConductivity(final int conductivity) {
+        this.lightningConductivity = conductivity;
         return this;
     }
-
-
-    public static final Material air = new MaterialGas(MaterialColor.none);
-    public static final Material grass = new Material(MaterialColor.grass);
-    public static final Material dirt = new Material(MaterialColor.dirt);
-    public static final Material wood = new Material(MaterialColor.wood).flammable();
-
-    public static final Material stone = new Material(MaterialColor.stone).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material basalt = new Material(MaterialColor.basalt).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material limestone = new Material(MaterialColor.limestone).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material granite = new Material(MaterialColor.granite).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material permafrost = new Material(MaterialColor.permafrost).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material marble = new Material(MaterialColor.marble).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material slate = new Material(MaterialColor.slate).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-    public static final Material netherrack = new Material(MaterialColor.netherrack).setConductivity(LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
-
-    public static final Material metal = new Material(MaterialColor.metal).setConductivity(LIGHTNING_STRONG_CONDUCTOR).setAsMetal().notAlwaysDestroyable();
-    public static final Material steel = new Material(MaterialColor.steel).setConductivity(LIGHTNING_STRONG_CONDUCTOR).setAsMetal().notAlwaysDestroyable();
-    public static final Material water = new MaterialLiquid(MaterialColor.water).setConductivity(LIGHTNING_LIGHT_CONDUCTOR).destroyOnPush();
-    public static final Material lava = new MaterialLiquid(MaterialColor.fire).destroyOnPush();
-    public static final Material leaves = new Material(MaterialColor.plant).flammable().notSolidBlocking().destroyOnPush();
-    public static final Material plant = new MaterialDecoration(MaterialColor.plant).destroyOnPush().replaceable();
-    public static final Material sponge = new Material(MaterialColor.wool);
-    public static final Material cloth = new Material(MaterialColor.wool).flammable();
-    public static final Material fire = new MaterialGas(MaterialColor.none).destroyOnPush();
-    public static final Material sand = new Material(MaterialColor.sand);
-    public static final Material soulsand = new Material(MaterialColor.paintedBrown);
-    public static final Material decoration = new MaterialDecoration(MaterialColor.none).destroyOnPush();
-    public static final Material glass = new Material(MaterialColor.none).setConductivity(LIGHTNING_STRONG_INSULATOR).notSolidBlocking();
-    public static final Material explosive = new Material(MaterialColor.fire).flammable().notSolidBlocking();
-    public static final Material coral = new Material(MaterialColor.plant).destroyOnPush();
-    public static final Material ice = new Material(MaterialColor.ice).notSolidBlocking();
-    public static final Material topSnow = new MaterialDecoration(MaterialColor.snow).replaceable().notSolidBlocking().notAlwaysDestroyable().destroyOnPush();
-    public static final Material snow = new Material(MaterialColor.snow).notAlwaysDestroyable();
-    public static final Material topAsh = new MaterialDecoration(MaterialColor.snow).replaceable().notSolidBlocking().notAlwaysDestroyable().destroyOnPush();
-    public static final Material ash = new Material(MaterialColor.snow).notAlwaysDestroyable();
-    public static final Material cactus = new Material(MaterialColor.plant).notSolidBlocking().destroyOnPush();
-    public static final Material clay = new Material(MaterialColor.clay);
-    public static final Material vegetable = new Material(MaterialColor.plant).destroyOnPush();
-    public static final Material portal = new MaterialPortal(MaterialColor.none).notPushable();
-    public static final Material cake = new Material(MaterialColor.none).destroyOnPush();
-    public static final Material web = new Material(MaterialColor.wool).notAlwaysDestroyable().destroyOnPush();
-    public static final Material piston = new Material(MaterialColor.stone);
-    public static final Material moss = new Material(MaterialColor.grass).flammable().notAlwaysDestroyable();
-    public static final Material woodWet = (new Material(MaterialColor.grass).setConductivity(LIGHTNING_LIGHT_CONDUCTOR));
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/material/Materials.java b/game/core/src/main/java/net/minecraft/core/block/material/Materials.java
new file mode 100644
index 000000000..0ccf6a964
--- /dev/null
+++ b/game/core/src/main/java/net/minecraft/core/block/material/Materials.java
@@ -0,0 +1,49 @@
+package net.minecraft.core.block.material;
+
+import org.jetbrains.annotations.NotNull;
+
+public final class Materials {
+    public static final @NotNull Material AIR = new MaterialGas(MaterialColor.none);
+    public static final @NotNull Material GRASS = new Material(MaterialColor.grass);
+    public static final @NotNull Material DIRT = new Material(MaterialColor.dirt);
+    public static final @NotNull Material WOOD = new Material(MaterialColor.wood).flammable();
+    public static final @NotNull Material STONE = new Material(MaterialColor.stone).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material BASALT = new Material(MaterialColor.basalt).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material LIMESTONE = new Material(MaterialColor.limestone).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material GRANITE = new Material(MaterialColor.granite).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material PERMAFROST = new Material(MaterialColor.permafrost).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material MARBLE = new Material(MaterialColor.marble).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material SLATE = new Material(MaterialColor.slate).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material NETHERRACK = new Material(MaterialColor.netherrack).setConductivity(Material.LIGHTNING_LIGHT_INSULATOR).setAsStone().notAlwaysDestroyable();
+    public static final @NotNull Material METAL = new Material(MaterialColor.metal).setConductivity(Material.LIGHTNING_STRONG_CONDUCTOR).setAsMetal().notAlwaysDestroyable();
+    public static final @NotNull Material STEEL = new Material(MaterialColor.steel).setConductivity(Material.LIGHTNING_STRONG_CONDUCTOR).setAsMetal().notAlwaysDestroyable();
+    public static final @NotNull Material WATER = new MaterialLiquid(MaterialColor.water).setConductivity(Material.LIGHTNING_LIGHT_CONDUCTOR).destroyOnPush();
+    public static final @NotNull Material LAVA = new MaterialLiquid(MaterialColor.fire).destroyOnPush();
+    public static final @NotNull Material LEAVES = new Material(MaterialColor.plant).flammable().notSolidBlocking().destroyOnPush();
+    public static final @NotNull Material PLANT = new MaterialDecoration(MaterialColor.plant).destroyOnPush().replaceable();
+    public static final @NotNull Material SPONGE = new Material(MaterialColor.wool);
+    public static final @NotNull Material CLOTH = new Material(MaterialColor.wool).flammable();
+    public static final @NotNull Material FIRE = new MaterialGas(MaterialColor.none).destroyOnPush();
+    public static final @NotNull Material SAND = new Material(MaterialColor.sand);
+    public static final @NotNull Material SOUL_SAND = new Material(MaterialColor.paintedBrown);
+    public static final @NotNull Material DECORATION = new MaterialDecoration(MaterialColor.none).destroyOnPush();
+    public static final @NotNull Material GLASS = new Material(MaterialColor.none).setConductivity(Material.LIGHTNING_STRONG_INSULATOR).notSolidBlocking();
+    public static final @NotNull Material EXPLOSIVE = new Material(MaterialColor.fire).flammable().notSolidBlocking();
+    public static final @NotNull Material CORAL = new Material(MaterialColor.plant).destroyOnPush();
+    public static final @NotNull Material ICE = new Material(MaterialColor.ice).notSolidBlocking();
+    public static final @NotNull Material TOP_SNOW = new MaterialDecoration(MaterialColor.snow).replaceable().notSolidBlocking().notAlwaysDestroyable().destroyOnPush();
+    public static final @NotNull Material SNOW = new Material(MaterialColor.snow).notAlwaysDestroyable();
+    public static final @NotNull Material TOP_ASH = new MaterialDecoration(MaterialColor.snow).replaceable().notSolidBlocking().notAlwaysDestroyable().destroyOnPush();
+    public static final @NotNull Material ASH = new Material(MaterialColor.snow).notAlwaysDestroyable();
+    public static final @NotNull Material CACTUS = new Material(MaterialColor.plant).notSolidBlocking().destroyOnPush();
+    public static final @NotNull Material CLAY = new Material(MaterialColor.clay);
+    public static final @NotNull Material VEGETABLE = new Material(MaterialColor.plant).destroyOnPush();
+    public static final @NotNull Material PORTAL = new MaterialPortal(MaterialColor.none).notPushable();
+    public static final @NotNull Material CAKE = new Material(MaterialColor.none).destroyOnPush();
+    public static final @NotNull Material WEB = new Material(MaterialColor.wool).notAlwaysDestroyable().destroyOnPush();
+    public static final @NotNull Material PISTON = new Material(MaterialColor.stone);
+    public static final @NotNull Material MOSS = new Material(MaterialColor.grass).flammable().notAlwaysDestroyable();
+    public static final @NotNull Material WOOD_WET = (new Material(MaterialColor.grass).setConductivity(Material.LIGHTNING_LIGHT_CONDUCTOR));
+
+    private Materials() { }
+}
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBase.java b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBase.java
index 8d5ac089f..0e49e289b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBase.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBase.java
@@ -5,6 +5,7 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -16,16 +17,17 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicPistonBase extends BlockLogic
-{
+public class BlockLogicPistonBase extends BlockLogic {
     public static final int MASK_DIRECTION = 0b0000_0111;
     public static final int MASK_POWERED = 0b0000_1000;
 
@@ -79,111 +81,126 @@ public class BlockLogicPistonBase extends BlockLogic
 
     private final int maxPushedBlocks;
 
-    public BlockLogicPistonBase(@NotNull Block<?> block, int maxPushedBlocks)
-    {
-        super(block, Material.piston);
+    public BlockLogicPistonBase(@NotNull Block<?> block, int maxPushedBlocks) {
+        super(block, Materials.PISTON);
         this.maxPushedBlocks = maxPushedBlocks;
         block.withHardness(0.5F);
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-    public void onPlacedByMob(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
+    public void onPlacedByMob(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, @NotNull Mob mob, double xHit, double yHit) {
         Direction placementDirection = mob.getPlacementDirection(side).getOpposite();
         world.setBlockDataNotify(tilePos, placementDirection.getId());
-        if(!world.isClientSide) {
+        if (!world.isClientSide) {
             checkIfExtend(world, tilePos);
         }
     }
 
     @Override
-    public void onPlacedOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public void onPlacedOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         Direction placementDirection = side.getDirection();
         world.setBlockDataNotify(tilePos, placementDirection.getId());
-        if(!world.isClientSide) {
+        if (!world.isClientSide) {
             checkIfExtend(world, tilePos);
         }
     }
 
     @Override
-	public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id)
-    {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         checkIfExtend(world, tilePos);
     }
 
     @Override
-    public void onPlacedByWorld(@NotNull World world, @NotNull TilePos tilePos) {
-        if(!world.isClientSide && world.getTileEntity(tilePos) == null) {
+    public void onPlacedByWorld(@NotNull World world, @NotNull TilePosc tilePos) {
+        if (!world.isClientSide && world.getTileEntity(tilePos) == null) {
             checkIfExtend(world, tilePos);
         }
     }
 
-    private void checkIfExtend(@NotNull World world, @NotNull TilePos tilePos) {
+    private void checkIfExtend(@NotNull World world, @NotNull TilePosc tilePos) {
         int data = world.getBlockData(tilePos);
         Direction direction = getDirection(data);
         boolean hasNeighborSignal = getNeighborSignal(world, tilePos, direction);
-        if(data == MASK_DIRECTION) {
+        if (data == MASK_DIRECTION) {
             return;
         }
-        if(hasNeighborSignal && !isPowered(data)) {
-            if(canPushLine(world, tilePos, direction, this.maxPushedBlocks)) {
+        if (hasNeighborSignal && !isPowered(data)) {
+            if (canPushLine(world, tilePos, direction, this.maxPushedBlocks)) {
                 world.setBlockData(tilePos, direction.getId() | MASK_POWERED);
                 world.triggerEvent(tilePos, EVENT_EXTEND, direction.getId());
             }
-        }
-        else if(!hasNeighborSignal && isPowered(data)) {
+        } else if (!hasNeighborSignal && isPowered(data)) {
             world.setBlockData(tilePos, direction.getId());
             world.triggerEvent(tilePos, EVENT_RETRACT, direction.getId());
         }
     }
 
-    private boolean getNeighborSignal(@NotNull World world, @NotNull TilePos tilePos, Direction direction) {
-        if(direction != Direction.DOWN && world.hasSignal(tilePos.add(0, -1, 0), Side.BOTTOM)) { return true; }
-        if(direction != Direction.UP && world.hasSignal(tilePos.add(0, 1, 0), Side.TOP)) { return true; }
-        if(direction != Direction.NORTH && world.hasSignal(tilePos.add(0, 0, -1), Side.NORTH)) { return true; }
-        if(direction != Direction.SOUTH && world.hasSignal(tilePos.add(0, 0, 1), Side.SOUTH)) { return true; }
-        if(direction != Direction.EAST && world.hasSignal(tilePos.add(1, 0, 0), Side.EAST)) { return true; }
-        if(direction != Direction.WEST && world.hasSignal(tilePos.add(-1, 0, 0), Side.WEST)) { return true; }
-        if(world.hasSignal(tilePos, Side.BOTTOM)) { return true;}
+    private boolean getNeighborSignal(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction) {
+        TilePos queryPos = new TilePos();
+        if (direction != Direction.DOWN && world.hasSignal(tilePos.add(0, -1, 0, queryPos), Side.BOTTOM)) {
+            return true;
+        }
+        if (direction != Direction.UP && world.hasSignal(tilePos.add(0, 1, 0, queryPos), Side.TOP)) {
+            return true;
+        }
+        if (direction != Direction.NORTH && world.hasSignal(tilePos.add(0, 0, -1, queryPos), Side.NORTH)) {
+            return true;
+        }
+        if (direction != Direction.SOUTH && world.hasSignal(tilePos.add(0, 0, 1, queryPos), Side.SOUTH)) {
+            return true;
+        }
+        if (direction != Direction.EAST && world.hasSignal(tilePos.add(1, 0, 0, queryPos), Side.EAST)) {
+            return true;
+        }
+        if (direction != Direction.WEST && world.hasSignal(tilePos.add(-1, 0, 0, queryPos), Side.WEST)) {
+            return true;
+        }
+        if (world.hasSignal(tilePos, Side.BOTTOM)) {
+            return true;
+        }
         // QC
-        if(direction != Direction.UP && world.hasSignal(tilePos.add(0, 2, 0), Side.TOP)) { return true; }
-        if(world.hasSignal(tilePos.add(0, 1, -1), Side.NORTH)) { return true; }
-        if(world.hasSignal(tilePos.add(0, 1, 1), Side.SOUTH)) { return true; }
-        if(world.hasSignal(tilePos.add(-1, 1, 0), Side.WEST)) { return true; }
-        return world.hasSignal(tilePos.add(1, 1, 0), Side.EAST);
+        if (direction != Direction.UP && world.hasSignal(tilePos.add(0, 2, 0, queryPos), Side.TOP)) {
+            return true;
+        }
+        if (world.hasSignal(tilePos.add(0, 1, -1, queryPos), Side.NORTH)) {
+            return true;
+        }
+        if (world.hasSignal(tilePos.add(0, 1, 1, queryPos), Side.SOUTH)) {
+            return true;
+        }
+        if (world.hasSignal(tilePos.add(-1, 1, 0, queryPos), Side.WEST)) {
+            return true;
+        }
+        return world.hasSignal(tilePos.add(1, 1, 0, queryPos), Side.EAST);
     }
 
     @Override
-    public void triggerEvent(@NotNull World world, @NotNull TilePos tilePos, int index, int data)
-    {
+    public void triggerEvent(@NotNull World world, @NotNull TilePosc tilePos, int index, int data) {
         Direction direction = getDirection(data);
         if (direction == Direction.NONE) return;
-        if(index == EVENT_EXTEND)
-        {
+        if (index == EVENT_EXTEND) {
             extendEvent(world, tilePos, data, direction);
-        }
-        else if(index == EVENT_RETRACT)
-        {
+        } else if (index == EVENT_RETRACT) {
             retractEvent(world, tilePos, data, direction);
         }
     }
 
-    public void extendEvent(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        if(tryExtend(world, tilePos, direction, this.maxPushedBlocks)) {
+    public void extendEvent(@NotNull World world, @NotNull TilePosc tilePos, int data, @NotNull Direction direction) {
+        if (tryExtend(world, tilePos, direction, this.maxPushedBlocks)) {
             world.setBlockDataNotify(tilePos, direction.getId() | MASK_POWERED);
-            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double)tilePos.x + 0.5D, (double)tilePos.y + 0.5D, (double)tilePos.z + 0.5D, "tile.piston.out", 0.5F, world.rand.nextFloat() * 0.25F + 0.6F);
+            world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "tile.piston.out", 0.5F, world.rand.nextFloat() * 0.25F + 0.6F);
         }
     }
 
-    public void retractEvent(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        TilePos shiftedPos = tilePos.add(direction);
+    public void retractEvent(@NotNull World world, @NotNull TilePosc tilePos, int data, @NotNull Direction direction) {
+        TilePos shiftedPos = tilePos.add(direction, new TilePos());
         TileEntity tileEntity = world.getTileEntity(shiftedPos);
-        if((tileEntity instanceof TileEntityMovingPistonBlock moving)) {
+        if ((tileEntity instanceof TileEntityMovingPistonBlock moving)) {
             if (!moving.isExtending()) {
                 moving.finalTick();
             } else {
@@ -193,52 +210,47 @@ public class BlockLogicPistonBase extends BlockLogic
         world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(), direction.getId());
         world.replaceTileEntity(tilePos, BlockLogicPistonMoving.createTileEntity(this.block.id(), direction.getId(), null, direction, false, true));
         world.setBlockIdNotify(shiftedPos, 0);
-        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double)tilePos.x + 0.5D, (double)tilePos.y + 0.5D, (double)tilePos.z + 0.5D, "tile.piston.in", 0.5F, world.rand.nextFloat() * 0.15F + 0.6F);
+        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) tilePos.x() + 0.5D, (double) tilePos.y() + 0.5D, (double) tilePos.z() + 0.5D, "tile.piston.in", 0.5F, world.rand.nextFloat() * 0.15F + 0.6F);
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int data = source.getBlockData(tilePos);
-        if(isPowered(data))
-        {
+        if (isPowered(data)) {
             return switch (getDirection(data)) {
-                case DOWN -> AABB.fromPool(0.0F, 0.25F, 0.0F, 1.0F, 1.0F, 1.0F);
-                case UP -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);
-                case NORTH -> AABB.fromPool(0.0F, 0.0F, 0.25F, 1.0F, 1.0F, 1.0F);
-                case SOUTH -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F);
-                case WEST -> AABB.fromPool(0.25F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
-                default -> AABB.fromPool(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F);
+                case DOWN -> new AABBd(0.0F, 0.25F, 0.0F, 1.0F, 1.0F, 1.0F);
+                case UP -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);
+                case NORTH -> new AABBd(0.0F, 0.0F, 0.25F, 1.0F, 1.0F, 1.0F);
+                case SOUTH -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F);
+                case WEST -> new AABBd(0.25F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+                default -> new AABBd(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F);
             };
-        } else
-        {
-            return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+        } else {
+            return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         }
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
         if ((meta & MASK_POWERED) == 0) return FullSupport.INSTANCE;
         Direction dir = getDirection(meta);
         return pistonSupportLookupTable[side.getId() * 6 + dir.getId()];
     }
 
-    public static Direction getDirection(int data)
-    {
+    public static Direction getDirection(int data) {
         return Direction.getDirectionById(data & MASK_DIRECTION);
     }
 
-    public static boolean isPowered(int data)
-    {
+    public static boolean isPowered(int data) {
         return (data & MASK_POWERED) != 0;
     }
-    
+
     protected boolean isPushable(int id, @NotNull World world, @NotNull TilePos tilePos, boolean canDestroy) {
         Block<?> block = Blocks.getBlock(id);
         if (block == null) return false;
@@ -251,15 +263,15 @@ public class BlockLogicPistonBase extends BlockLogic
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         if (isPowered(world.getBlockData(tilePos))) {
             return Material.PISTON_CANT_PUSH;
         }
         return super.getPistonPushReaction(world, tilePos);
     }
 
-    protected boolean canPushLine(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction, int maxPushedBlocks) {
-        TilePos posO = tilePos.add(direction);
+    protected boolean canPushLine(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction, int maxPushedBlocks) {
+        TilePos posO = tilePos.add(direction, new TilePos());
         int blocks = 0;
         while (true) {
             if (blocks >= maxPushedBlocks + 1) {
@@ -292,8 +304,8 @@ public class BlockLogicPistonBase extends BlockLogic
         return true;
     }
 
-    public boolean tryCrush(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction) {
-        TilePos pos2 = tilePos.add(direction);
+    public boolean tryCrush(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction) {
+        TilePos pos2 = tilePos.add(direction, new TilePos());
         Block<?> block = world.getBlock(pos2);
         if (block == null) return true;
         world.playBlockEvent(null, pos2, LevelListener.EVENT_BLOCK_BREAK, world.getBlockId(pos2));
@@ -302,10 +314,9 @@ public class BlockLogicPistonBase extends BlockLogic
         return true;
     }
 
-    protected boolean tryExtend(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction, int maxPushedBlocks)
-    {
+    protected boolean tryExtend(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction, int maxPushedBlocks) {
         int data = world.getBlockData(tilePos);
-        TilePos posO = tilePos.add(direction);
+        TilePos posO = tilePos.add(direction, new TilePos());
         int blocks = 0;
         while (true) {
             if (blocks >= maxPushedBlocks + 1) {
@@ -342,7 +353,7 @@ public class BlockLogicPistonBase extends BlockLogic
             if (pushEntity instanceof TileEntityMovingPistonBlock && posP.equals(tilePos)) {
                 break;
             }
-            if(pushId == this.block.id() && posP.equals(tilePos)) {
+            if (pushId == this.block.id() && posP.equals(tilePos)) {
                 createPistonHeadAt(world, posO, data, direction);
             } else if (pushId == Blocks.PISTON_MOVING.id()) {
                 TileEntity old = world.getTileEntity(posP);
@@ -376,7 +387,7 @@ public class BlockLogicPistonBase extends BlockLogic
     }
 
     @Override
-    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePos tilePos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@Nullable Player player, @NotNull ItemStack itemStack, @NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side, double xHit, double yHit) {
         return MASK_DIRECTION;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSteel.java b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSteel.java
index f415fe016..a71f8ae16 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSteel.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSteel.java
@@ -10,19 +10,21 @@ import net.minecraft.core.entity.EntityFallingBlock;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.IVehicle;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.List;
 
 public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
-    public static final double HEAD_THICKNESS_STEEL = 6/16d;
+    public static final double HEAD_THICKNESS_STEEL = 6 / 16d;
 
     private Entity flungBlock = null;
 
@@ -31,25 +33,25 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         int data = source.getBlockData(tilePos);
-        if(isPowered(data)) {
+        if (isPowered(data)) {
             return switch (getDirection(data)) {
-                case DOWN -> AABB.fromPool(0.0F, HEAD_THICKNESS_STEEL, 0.0F, 1.0F, 1.0F, 1.0F);
-                case UP -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1 - HEAD_THICKNESS_STEEL, 1.0F);
-                case NORTH -> AABB.fromPool(0.0F, 0.0F, HEAD_THICKNESS_STEEL, 1.0F, 1.0F, 1.0F);
-                case SOUTH -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1 - HEAD_THICKNESS_STEEL);
-                case WEST -> AABB.fromPool(HEAD_THICKNESS_STEEL, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
-                default -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1 - HEAD_THICKNESS_STEEL, 1.0F, 1.0F);
+                case DOWN -> new AABBd(0.0F, HEAD_THICKNESS_STEEL, 0.0F, 1.0F, 1.0F, 1.0F);
+                case UP -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1 - HEAD_THICKNESS_STEEL, 1.0F);
+                case NORTH -> new AABBd(0.0F, 0.0F, HEAD_THICKNESS_STEEL, 1.0F, 1.0F, 1.0F);
+                case SOUTH -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1 - HEAD_THICKNESS_STEEL);
+                case WEST -> new AABBd(HEAD_THICKNESS_STEEL, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+                default -> new AABBd(0.0F, 0.0F, 0.0F, 1 - HEAD_THICKNESS_STEEL, 1.0F, 1.0F);
             };
         } else {
-            return AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+            return new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         }
     }
 
     @Override
-    protected boolean canPushLine(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction, int maxPushedBlocks) {
-        TilePos posO = tilePos.add(direction);
+    protected boolean canPushLine(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction, int maxPushedBlocks) {
+        TilePos posO = tilePos.add(direction, new TilePos());
         int blocks = 0;
         boolean didCrush = false;
         while (true) {
@@ -82,7 +84,7 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
             blocks++;
         }
         if (!didCrush && blocks == 1) { // Block Flinging
-            posO.set(tilePos.x + direction.getOffsetX(), tilePos.y + direction.getOffsetY(), tilePos.z + direction.getOffsetZ());
+            tilePos.add(direction, posO);
             Block<?> block = world.getBlock(posO);
             if (block == null) return true;
             int blockMeta = world.getBlockData(posO);
@@ -107,8 +109,8 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
     }
 
     @Override
-    public boolean tryCrush(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction) {
-        TilePos pos2 = tilePos.add(direction);
+    public boolean tryCrush(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction) {
+        TilePos pos2 = tilePos.add(direction, new TilePos());
         Block<?> block = world.getBlock(pos2);
         if (block == null) return true;
         world.playBlockEvent(null, pos2, LevelListener.EVENT_BLOCK_BREAK, world.getBlockId(pos2));
@@ -118,10 +120,10 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
     }
 
     @Override
-    protected boolean tryExtend(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction, int maxPushedBlocks) {
+    protected boolean tryExtend(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction, int maxPushedBlocks) {
         if (world.isClientSide) { // "Fixes" steel pistons appearing to push the block they just flung
             int data = world.getBlockData(tilePos);
-            TilePos posO = tilePos.add(direction);
+            TilePos posO = tilePos.add(direction, new TilePos());
             int blocks = 0;
             while (true) {
                 if (blocks >= maxPushedBlocks + 1) {
@@ -158,8 +160,7 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
                     if (pushEntity instanceof TileEntityMovingPistonBlock && posP.equals(tilePos)) {
                         break;
                     }
-                    if(pushId == this.block.id() && posP.equals(tilePos))
-                    {
+                    if (pushId == this.block.id() && posP.equals(tilePos)) {
                         createPistonHeadAt(world, posO, data, direction);
                     }
                     if (!posP.equals(tilePos))
@@ -175,11 +176,12 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
     }
 
     @Override
-    public void extendEvent(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        List<Entity> entityList = new ArrayList<>(world.getEntitiesWithinAABBExcludingEntity(null, AABB.fromPool((double)tilePos.x + direction.getOffsetX(), (double)tilePos.y + direction.getOffsetY(), (double)tilePos.z + direction.getOffsetZ(), (double)tilePos.x + direction.getOffsetX() + 1, (double)tilePos.y + direction.getOffsetY() + 1, (double)tilePos.z + direction.getOffsetZ() + 1)));
-        for (Entity entity : entityList){
+    public void extendEvent(@NotNull World world, @NotNull TilePosc tilePos, int data, @NotNull Direction direction) {
+        List<Entity> entityList = new ArrayList<>(world.getEntitiesWithinAABBExcludingEntity(null, new AABBd((double) tilePos.x() + direction.getOffsetX(), (double) tilePos.y() + direction.getOffsetY(), (double) tilePos.z() + direction.getOffsetZ(), (double) tilePos.x() + direction.getOffsetX() + 1, (double) tilePos.y() + direction.getOffsetY() + 1, (double) tilePos.z() + direction.getOffsetZ() + 1)));
+        for (Entity entity : entityList) {
             /*Fix for 1 tick extensions not working properly*/
-            if (entity == null || entity.noPhysics || entity == this.flungBlock || entity.world.isClientSide && entity instanceof Player) continue;
+            if (entity == null || entity.noPhysics || entity == this.flungBlock || entity.world.isClientSide && entity instanceof Player)
+                continue;
             final double speed = 2;
             entity.fling(direction.getOffsetX() * speed, direction.getOffsetY() * speed, direction.getOffsetZ() * speed, 1f);
         }
@@ -189,7 +191,7 @@ public class BlockLogicPistonBaseSteel extends BlockLogicPistonBase {
 
     @Override
     public void createPistonHeadAt(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(),  BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STEEL, direction.getId()));
+        world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(), BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STEEL, direction.getId()));
         world.replaceTileEntity(tilePos, BlockLogicPistonMoving.createTileEntity(Blocks.PISTON_HEAD_STEEL.id(), BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STEEL, direction.getId()), null, direction, true, false));
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSticky.java b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSticky.java
index 2588efa7b..55368869b 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSticky.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonBaseSticky.java
@@ -8,6 +8,7 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class BlockLogicPistonBaseSticky extends BlockLogicPistonBase {
@@ -16,10 +17,10 @@ public class BlockLogicPistonBaseSticky extends BlockLogicPistonBase {
     }
 
     @Override
-    public void retractEvent(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        TilePos posDir = tilePos.add(direction);
+    public void retractEvent(@NotNull World world, @NotNull TilePosc tilePos, int data, @NotNull Direction direction) {
+        TilePos posDir = tilePos.add(direction, new TilePos());
         TileEntity tileEntity = world.getTileEntity(posDir);
-        if((tileEntity instanceof TileEntityMovingPistonBlock moving)) {
+        if ((tileEntity instanceof TileEntityMovingPistonBlock moving)) {
             if (!moving.isExtending()) {
                 moving.finalTick();
             } else {
@@ -28,14 +29,14 @@ public class BlockLogicPistonBaseSticky extends BlockLogicPistonBase {
         }
         world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(), direction.getId());
         world.replaceTileEntity(tilePos, BlockLogicPistonMoving.createTileEntity(this.block.id(), direction.getId(), null, direction, false, true));
-        TilePos pos1 = new TilePos(tilePos.x + direction.getOffsetX() * 2, tilePos.y + direction.getOffsetY() * 2,tilePos.z + direction.getOffsetZ() * 2);
+        TilePos pos1 = new TilePos(tilePos.x() + direction.getOffsetX() * 2, tilePos.y() + direction.getOffsetY() * 2, tilePos.z() + direction.getOffsetZ() * 2);
         int retractId = world.getBlockId(pos1);
         int retactMeta = world.getBlockData(pos1);
         TileEntity retractEntity = world.getTileEntity(pos1);
         boolean pulledMoving = false;
-        if(retractId == Blocks.PISTON_MOVING.id()) {
-            if((world.getTileEntity(pos1) instanceof TileEntityMovingPistonBlock movingPistonBlock)) {
-                if(movingPistonBlock.getDirection() == direction && movingPistonBlock.isExtending()) {
+        if (retractId == Blocks.PISTON_MOVING.id()) {
+            if ((world.getTileEntity(pos1) instanceof TileEntityMovingPistonBlock movingPistonBlock)) {
+                if (movingPistonBlock.getDirection() == direction && movingPistonBlock.isExtending()) {
                     movingPistonBlock.finalTick();
                     retractId = movingPistonBlock.getMovedId();
                     retactMeta = movingPistonBlock.getMovedData();
@@ -46,7 +47,7 @@ public class BlockLogicPistonBaseSticky extends BlockLogicPistonBase {
         }
         Block<?> retractedBlock = Blocks.getBlock(retractId);
         TilePos pos2 = new TilePos(tilePos);
-        if(!pulledMoving && retractedBlock != null &&
+        if (!pulledMoving && retractedBlock != null &&
             isPushable(retractId, world, pos1, false) &&
             (retractedBlock.getPistonPushReaction(world, pos1) == Material.PISTON_PUSHABLE || (retractedBlock.getLogic() instanceof BlockLogicPistonBase))) {
             if (!(retractEntity instanceof TileEntityMovingPistonBlock)) {
@@ -59,14 +60,15 @@ public class BlockLogicPistonBaseSticky extends BlockLogicPistonBase {
             world.setBlockIdData(pos2, Blocks.PISTON_MOVING.id(), retactMeta);
             world.replaceTileEntity(pos2, BlockLogicPistonMoving.createTileEntity(retractId, retactMeta, retractEntity, direction, false, false));
             world.notifyBlockChange(pos1, 0);
-        } else if(!pulledMoving) {
+        } else if (!pulledMoving) {
             world.setBlockIdNotify(posDir, 0);
         }
-        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double)pos2.x + 0.5D, (double)pos2.y + 0.5D, (double)pos2.z + 0.5D, "tile.piston.in", 0.5F, world.rand.nextFloat() * 0.15F + 0.6F);
+        world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) pos2.x + 0.5D, (double) pos2.y + 0.5D, (double) pos2.z + 0.5D, "tile.piston.in", 0.5F, world.rand.nextFloat() * 0.15F + 0.6F);
     }
+
     @Override
     public void createPistonHeadAt(@NotNull World world, @NotNull TilePos tilePos, int data, @NotNull Direction direction) {
-        world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(),  BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STICKY, direction.getId()));
+        world.setBlockIdData(tilePos, Blocks.PISTON_MOVING.id(), BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STICKY, direction.getId()));
         world.replaceTileEntity(tilePos, BlockLogicPistonMoving.createTileEntity(Blocks.PISTON_HEAD.id(), BlockLogicPistonHead.setPistonType(BlockLogicPistonHead.TYPE_STICKY, direction.getId()), null, direction, true, false));
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonHead.java b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonHead.java
index 9e02da7b5..e2c470172 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonHead.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonHead.java
@@ -7,6 +7,7 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.FullSupport;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
@@ -14,15 +15,16 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicPistonHead extends BlockLogic
-{
+public class BlockLogicPistonHead extends BlockLogic {
     public static final int MASK_DIRECTION = 0b0000_0111;
     public static final int MASK_TYPE = 0b1111_1000;
     public static final int TYPE_NORMAL = 0;
@@ -31,27 +33,27 @@ public class BlockLogicPistonHead extends BlockLogic
 
     private final double headThickness;
     private final double shaftThickness;
-    public BlockLogicPistonHead(final Block<?> block, final double headThickness, final double shaftThickness)
-    {
-        super(block, Material.piston);
+
+    public BlockLogicPistonHead(final Block<?> block, final double headThickness, final double shaftThickness) {
+        super(block, Materials.PISTON);
         block.withHardness(0.5F);
         this.headThickness = headThickness;
         this.shaftThickness = shaftThickness;
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
         super.onRemoved(world, tilePos, data);
         Direction direction = getDirectionFromMeta(data);
-        if(direction == Direction.NONE) {
+        if (direction == Direction.NONE) {
             return;
         }
         Direction orientation = direction.getOpposite();
-        TilePos nextPos = tilePos.add(orientation);
+        TilePos nextPos = tilePos.add(orientation, new TilePos());
         Block<?> block = world.getBlock(nextPos);
-        if(block != null && block.getLogic() instanceof BlockLogicPistonBase) {
+        if (block != null && block.getLogic() instanceof BlockLogicPistonBase) {
             int data2 = world.getBlockData(nextPos);
-            if(BlockLogicPistonBase.isPowered(data2)) {
+            if (BlockLogicPistonBase.isPowered(data2)) {
                 block.dropWithCause(world, EnumDropCause.PROPER_TOOL, nextPos, data2, null, null);
                 world.setBlockIdNotify(nextPos, 0);
             }
@@ -59,86 +61,82 @@ public class BlockLogicPistonHead extends BlockLogic
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side) {
+    public @NotNull ISupport getSupport(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         int meta = world.getBlockData(tilePos);
         return getDirectionFromMeta(meta).getSide() == side ? FullSupport.INSTANCE : PartialSupport.INSTANCE;
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return false;
     }
 
     @Override
-    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side)
-    {
+    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return false;
     }
 
 
     @Override
-    public void getCollisionAABBs(@NotNull World world, @NotNull TilePos tilePos, @NotNull AABB aabb, @NotNull List<@NotNull AABB> aabbList) {
+    public void getCollisionAABBs(@NotNull World world, @NotNull TilePosc tilePos, @NotNull AABBdc aabb, @NotNull List<@NotNull AABBdc> aabbList) {
         switch (getDirectionFromMeta(world.getBlockData(tilePos))) {
             case DOWN -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - this.shaftThickness / 2, this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 + this.headThickness, 0.5 + this.shaftThickness / 2).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5 - this.shaftThickness / 2, this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 + this.headThickness, 0.5 + this.shaftThickness / 2).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
             case UP -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - this.shaftThickness / 2, -this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 - this.headThickness, 0.5 + this.shaftThickness / 2).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5 - this.shaftThickness / 2, -this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 - this.headThickness, 0.5 + this.shaftThickness / 2).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
             case NORTH -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 + this.headThickness).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 + this.headThickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
             case SOUTH -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, -this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 - this.headThickness).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, -this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2, 1 - this.headThickness).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
             case WEST -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, 1 + this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, 1 + this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
             case EAST -> {
-                addIntersectingBoundingBox(aabb, AABB.fromPool(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F).move(tilePos), aabbList);
-                addIntersectingBoundingBox(aabb, AABB.fromPool(-this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, 1 - this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2).move(tilePos), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
+                addIntersectingBoundingBox(aabb, new AABBd(-this.headThickness, 0.5 - this.shaftThickness / 2, 0.5 - this.shaftThickness / 2, 1 - this.headThickness, 0.5 + this.shaftThickness / 2, 0.5 + this.shaftThickness / 2).translate(tilePos.x(), tilePos.y(), tilePos.z()), aabbList);
             }
         }
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         return switch (getDirectionFromMeta(source.getBlockData(tilePos))) {
-            case DOWN -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F);
-            case UP -> AABB.fromPool(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F);
-            case NORTH -> AABB.fromPool(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness);
-            case SOUTH -> AABB.fromPool(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F);
-            case WEST -> AABB.fromPool(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F);
-            case EAST -> AABB.fromPool(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+            case DOWN -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, this.headThickness, 1.0F);
+            case UP -> new AABBd(0.0F, 1 - this.headThickness, 0.0F, 1.0F, 1.0F, 1.0F);
+            case NORTH -> new AABBd(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, this.headThickness);
+            case SOUTH -> new AABBd(0.0F, 0.0F, 1 - this.headThickness, 1.0F, 1.0F, 1.0F);
+            case WEST -> new AABBd(0.0F, 0.0F, 0.0F, this.headThickness, 1.0F, 1.0F);
+            case EAST -> new AABBd(1 - this.headThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
             default -> super.getBoundsFromState(source, tilePos);
         };
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         Direction direction = getDirectionFromMeta(world.getBlockData(tilePos));
-        if(direction == Direction.NONE) {
+        if (direction == Direction.NONE) {
             return;
         }
-        TilePos posOffset = tilePos.sub(direction);
+        TilePos posOffset = tilePos.sub(direction, new TilePos());
         Block<?> block = world.getBlock(posOffset);
         if (block != null && block.getLogic() instanceof BlockLogicPistonBase) {
             block.onNeighborChanged(world, posOffset, id);
@@ -148,12 +146,11 @@ public class BlockLogicPistonHead extends BlockLogic
     }
 
     @Override
-    public int getPistonPushReaction(@NotNull World world, @NotNull TilePos tilePos) {
+    public int getPistonPushReaction(@NotNull World world, @NotNull TilePosc tilePos) {
         return Material.PISTON_CANT_PUSH;
     }
 
-    public static Direction getDirectionFromMeta(int meta)
-    {
+    public static Direction getDirectionFromMeta(int meta) {
         return Direction.getDirectionById(meta & MASK_DIRECTION);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonMoving.java b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonMoving.java
index f27955585..f71417664 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonMoving.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/BlockLogicPistonMoving.java
@@ -4,31 +4,30 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogic;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class BlockLogicPistonMoving extends BlockLogic
-{
-    public BlockLogicPistonMoving(Block<?> container)
-    {
-        super(container, Material.piston);
+public class BlockLogicPistonMoving extends BlockLogic {
+    public BlockLogicPistonMoving(Block<?> container) {
+        super(container, Materials.PISTON);
         container.withHardness(-1F);
         container.withEntity(null);
     }
 
     @Override
-    public void onRemoved(@NotNull World world, @NotNull TilePos tilePos, int data) {
-        if(world.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock moving) {
+    public void onRemoved(@NotNull World world, @NotNull TilePosc tilePos, int data) {
+        if (world.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock moving) {
             moving.finalTick();
         } else {
             super.onRemoved(world, tilePos, data);
@@ -36,32 +35,28 @@ public class BlockLogicPistonMoving extends BlockLogic
     }
 
     @Override
-	public boolean canPlaceAt(@NotNull World world, @NotNull TilePos tilePos)
-    {
+    public boolean canPlaceAt(@NotNull World world, @NotNull TilePosc tilePos) {
         return false;
     }
 
     @Override
-    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePos tilePos, @NotNull Side side)
-    {
+    public boolean canPlaceOnSide(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Side side) {
         return false;
     }
 
     @Override
-	public boolean isSolidRender()
-    {
+    public boolean isSolidRender() {
         return false;
     }
 
     @Override
-	public boolean isCubeShaped()
-    {
+    public boolean isCubeShaped() {
         return false;
     }
 
     @Override
-    public boolean onInteracted(@NotNull World world, @NotNull TilePos tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
-        if(!world.isClientSide && world.getTileEntity(tilePos) == null) {
+    public boolean onInteracted(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Player player, @Nullable Side side, double xHit, double yHit) {
+        if (!world.isClientSide && world.getTileEntity(tilePos) == null) {
             int id = 0;
             if (world.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) id = piston.getMovedId();
             world.setBlockIdNotify(tilePos, id);
@@ -77,11 +72,11 @@ public class BlockLogicPistonMoving extends BlockLogic
     }
 
     @Override
-    public void dropWithCause(@NotNull World world, @NotNull EnumDropCause dropCause, @NotNull TilePos tilePos, int data, @Nullable TileEntity tileEntity, @Nullable Player player) {
-        if(world.isClientSide) {
+    public void dropWithCause(@NotNull World world, @NotNull EnumDropCause dropCause, @NotNull TilePosc tilePos, int data, @Nullable TileEntity tileEntity, @Nullable Player player) {
+        if (world.isClientSide) {
             return;
         }
-        if(world.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) {
+        if (world.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) {
             Block<?> b = Blocks.getBlock(piston.getMovedId());
             if (b != null) {
                 b.dropWithCause(world, EnumDropCause.WORLD, tilePos, data, null, null);
@@ -90,7 +85,7 @@ public class BlockLogicPistonMoving extends BlockLogic
     }
 
     @Override
-    public void onNeighborChanged(@NotNull World world, @NotNull TilePos tilePos, int id) {
+    public void onNeighborChanged(@NotNull World world, @NotNull TilePosc tilePos, int id) {
         if (!world.isClientSide) {
             world.getTileEntity(tilePos); // Im not sure if this actually does anything anymore??
         }
@@ -102,57 +97,44 @@ public class BlockLogicPistonMoving extends BlockLogic
     }
 
     @Override
-    public @Nullable AABB getCollisionAABB(@NotNull WorldSource source, @NotNull TilePos tilePos) {
+    public @Nullable AABBdc getCollisionAABB(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
         if (source.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) {
             float progress = piston.getProgress(0.0F);
-            if(piston.isExtending()) {
+            if (piston.isExtending()) {
                 progress = 1.0F - progress;
             }
             return getCollisionShapeFromTileEntity(source, tilePos, piston.getMovedId(), progress, piston.getDirection());
-        } else {
-            return null;
         }
+        return null;
     }
 
     @Override
-    public @NotNull AABB getBoundsFromState(@NotNull WorldSource source, @NotNull TilePos tilePos) {
-        if(source.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) {
+    public @NotNull AABBdc getBoundsFromState(@NotNull WorldSource source, @NotNull TilePosc tilePos) {
+        if (source.getTileEntity(tilePos) instanceof TileEntityMovingPistonBlock piston) {
             Block<?> block = Blocks.blocksList[piston.getMovedId()];
-            if(block == null || block == this.block) {
+            if (block == null || block == this.block) {
                 return super.getBoundsFromState(source, tilePos);
             }
-            float f = piston.getProgress(0.0F);
-            if(piston.isExtending()) {
-                f = 1.0F - f;
+            float directionStretch = piston.getProgress(0.0F);
+            if (piston.isExtending()) {
+                directionStretch = 1.0F - directionStretch;
             }
             Direction direction = piston.getDirection();
-            AABB otherBounds = block.getBoundsFromState(source, tilePos);
-            return AABB.fromPool(
-                otherBounds.minX - direction.getOffsetX() * f,
-                otherBounds.maxX - direction.getOffsetX() * f,
-                otherBounds.minY - direction.getOffsetY() * f,
-                otherBounds.maxY - direction.getOffsetY() * f,
-                otherBounds.minZ - direction.getOffsetZ() * f,
-                otherBounds.maxZ - direction.getOffsetZ() * f);
+            AABBdc otherBounds = block.getBoundsFromState(source, tilePos);
+            return otherBounds.translate(-direction.getOffsetX() * directionStretch, -direction.getOffsetY() * directionStretch, -direction.getOffsetZ() * directionStretch, new AABBd());
         }
         return super.getBoundsFromState(source, tilePos);
     }
 
-    public AABB getCollisionShapeFromTileEntity(@NotNull WorldSource source, @NotNull TilePos tilePos, int blockID, float directionStretch, @NotNull Direction direction) {
-        if(blockID == 0 || blockID == this.block.id()) {
+    public @Nullable AABBdc getCollisionShapeFromTileEntity(@NotNull WorldSource source, @NotNull TilePosc tilePos, int blockID, float directionStretch, @NotNull Direction direction) {
+        if (blockID == 0 || blockID == this.block.id()) {
             return null;
         }
-        AABB aabb = Blocks.blocksList[blockID].getCollisionAABB(source, tilePos);
-        if(aabb == null) {
+        AABBdc aabb = Blocks.blocksList[blockID].getCollisionAABB(source, tilePos);
+        if (aabb == null) {
             return null;
         } else {
-            aabb.minX -= direction.getOffsetX() * directionStretch;
-            aabb.maxX -= direction.getOffsetX() * directionStretch;
-            aabb.minY -= direction.getOffsetY() * directionStretch;
-            aabb.maxY -= direction.getOffsetY() * directionStretch;
-            aabb.minZ -= direction.getOffsetZ() * directionStretch;
-            aabb.maxZ -= direction.getOffsetZ() * directionStretch;
-            return aabb;
+            return aabb.translate(-direction.getOffsetX() * directionStretch, -direction.getOffsetY() * directionStretch, -direction.getOffsetZ() * directionStretch, new AABBd());
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/block/piston/TileEntityMovingPistonBlock.java b/game/core/src/main/java/net/minecraft/core/block/piston/TileEntityMovingPistonBlock.java
index 964a31704..b6f04adb0 100644
--- a/game/core/src/main/java/net/minecraft/core/block/piston/TileEntityMovingPistonBlock.java
+++ b/game/core/src/main/java/net/minecraft/core/block/piston/TileEntityMovingPistonBlock.java
@@ -6,12 +6,12 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.*;
 
@@ -123,7 +123,7 @@ public class TileEntityMovingPistonBlock extends TileEntity
         } else {
             stretch = 1.0F - stretch;
         }
-        AABB aabb = Blocks.PISTON_MOVING.getLogic().getCollisionShapeFromTileEntity(this.worldObj, new TilePos(this.x, this.y, this.z), this.movedId, stretch, this.direction);
+        AABBdc aabb = Blocks.PISTON_MOVING.getLogic().getCollisionShapeFromTileEntity(this.worldObj, new TilePos(this.x, this.y, this.z), this.movedId, stretch, this.direction);
         if (aabb == null) return;
 
         List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(null, aabb);
diff --git a/game/core/src/main/java/net/minecraft/core/block/support/ISupportable.java b/game/core/src/main/java/net/minecraft/core/block/support/ISupportable.java
index 0948e5b64..8527353b8 100644
--- a/game/core/src/main/java/net/minecraft/core/block/support/ISupportable.java
+++ b/game/core/src/main/java/net/minecraft/core/block/support/ISupportable.java
@@ -4,19 +4,20 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public interface ISupportable {
-    @NotNull ISupport getSupportConstraint(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side);
+    @NotNull ISupport getSupportConstraint(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side);
 
-    default boolean isSupported(final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final @Nullable Block<?> supportingBlock = world.getBlock(tilePos.add(side.getDirection()));
+    default boolean isSupported(final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side) {
+        final @Nullable Block<?> supportingBlock = world.getBlock(tilePos.add(side.getDirection(), new TilePos()));
         if (supportingBlock == null) {
             return false;
         }
 
-        final @NotNull ISupport supporting = supportingBlock.getSupport(world, tilePos.add(side.getDirection()), side.getOpposite());
+        final @NotNull ISupport supporting = supportingBlock.getSupport(world, tilePos.add(side.getDirection(), new TilePos()), side.getOpposite());
         final @NotNull ISupport supported = this.getSupportConstraint(world, tilePos, side);
         return supporting.canSupport(supported, side.getOpposite());
     }
diff --git a/game/core/src/main/java/net/minecraft/core/current/wire/Node.java b/game/core/src/main/java/net/minecraft/core/current/wire/Node.java
index 3001a2ae7..87ae2910b 100644
--- a/game/core/src/main/java/net/minecraft/core/current/wire/Node.java
+++ b/game/core/src/main/java/net/minecraft/core/current/wire/Node.java
@@ -5,6 +5,7 @@ import net.minecraft.core.current.util.BlockState;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 
 import java.util.Arrays;
 
@@ -16,97 +17,95 @@ import java.util.Arrays;
  */
 class Node {
 
-	// flags that encode the Node type
-	private static final int CONDUCTOR = 0b01;
-	private static final int SOURCE    = 0b10;
-
-	final World world;
-	final Node[] neighbors;
-
-	TilePos pos;
-	BlockState state;
-	boolean invalid;
-
-	private int flags;
-
-	/** The previous node in the priority queue. */
-	Node prev_node;
-	/** The next node in the priority queue. */
-	Node next_node;
-	/** The priority with which this node was queued. */
-	int priority;
-	/** The wire that queued this node for an update. */
-	WireNode neighborWire;
-
-	Node(World world) {
-		this.world = world;
-		this.neighbors = new Node[Directions.ALL.length];
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj) {
-			return true;
-		}
-		if (!(obj instanceof Node)) {
-			return false;
-		}
-
-		Node node = (Node)obj;
-
-		return world == node.world && pos.equals(node.pos);
-	}
-
-	@Override
-	public int hashCode() {
-		return pos.hashCode();
-	}
-
-	Node set(TilePos pos, BlockState state, boolean clearNeighbors) {
-		if (state.is(Blocks.WIRE_REDSTONE)) {
-			throw new IllegalStateException("Cannot update a regular Node to a WireNode!");
-		}
-
-		if (clearNeighbors) {
-			Arrays.fill(neighbors, null);
-		}
-
-		this.pos = pos;
-		this.state = state;
-		this.invalid = false;
-
-		this.flags = 0;
-
-		if (this.state.isConductor()) {
-			this.flags |= CONDUCTOR;
-		}
-		if (this.state.isSignalSource()) {
-			this.flags |= SOURCE;
-		}
-
-		return this;
-	}
-
-	/**
-	 * Determine the priority with which this node should be queued.
-	 */
-	int priority() {
-		return neighborWire.priority;
-	}
-
-	public boolean isWire() {
-		return false;
-	}
-
-	public boolean isConductor() {
-		return (flags & CONDUCTOR) != 0;
-	}
-
-	public boolean isSignalSource() {
-		return (flags & SOURCE) != 0;
-	}
-
-	public WireNode asWire() {
-		throw new UnsupportedOperationException("Not a WireNode!");
-	}
+    // flags that encode the Node type
+    private static final int CONDUCTOR = 0b01;
+    private static final int SOURCE = 0b10;
+
+    final World world;
+    final Node[] neighbors;
+
+    TilePos pos;
+    BlockState state;
+    boolean invalid;
+
+    private int flags;
+
+    /** The previous node in the priority queue. */
+    Node prev_node;
+    /** The next node in the priority queue. */
+    Node next_node;
+    /** The priority with which this node was queued. */
+    int priority;
+    /** The wire that queued this node for an update. */
+    WireNode neighborWire;
+
+    Node(World world) {
+        this.world = world;
+        this.neighbors = new Node[Directions.ALL.length];
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof Node node)) {
+            return false;
+        }
+
+        return this.world == node.world && this.pos.equals(node.pos);
+    }
+
+    @Override
+    public int hashCode() {
+        return this.pos.hashCode();
+    }
+
+    Node set(TilePosc pos, BlockState state, boolean clearNeighbors) {
+        if (state.is(Blocks.WIRE_REDSTONE)) {
+            throw new IllegalStateException("Cannot update a regular Node to a WireNode!");
+        }
+
+        if (clearNeighbors) {
+            Arrays.fill(this.neighbors, null);
+        }
+
+        this.pos = new TilePos(pos);
+        this.state = state;
+        this.invalid = false;
+
+        this.flags = 0;
+
+        if (this.state.isConductor()) {
+            this.flags |= CONDUCTOR;
+        }
+        if (this.state.isSignalSource()) {
+            this.flags |= SOURCE;
+        }
+
+        return this;
+    }
+
+    /**
+     * Determine the priority with which this node should be queued.
+     */
+    int priority() {
+        return this.neighborWire.priority;
+    }
+
+    public boolean isWire() {
+        return false;
+    }
+
+    public boolean isConductor() {
+        return (this.flags & CONDUCTOR) != 0;
+    }
+
+    public boolean isSignalSource() {
+        return (this.flags & SOURCE) != 0;
+    }
+
+    public WireNode asWire() {
+        throw new UnsupportedOperationException("Not a WireNode!");
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/current/wire/WireHandler.java b/game/core/src/main/java/net/minecraft/core/current/wire/WireHandler.java
index dfb5ad8cf..578ce8242 100644
--- a/game/core/src/main/java/net/minecraft/core/current/wire/WireHandler.java
+++ b/game/core/src/main/java/net/minecraft/core/current/wire/WireHandler.java
@@ -7,6 +7,8 @@ import net.minecraft.core.current.util.BlockState;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -130,974 +132,974 @@ import java.util.function.Consumer;
  */
 public class WireHandler {
 
-	public static class Directions {
-
-		public static final Direction[] ALL        = { Direction.WEST, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.DOWN, Direction.UP };
-		public static final Direction[] HORIZONTAL = { Direction.WEST, Direction.NORTH, Direction.EAST, Direction.SOUTH };
-
-		// Indices for the arrays above.
-		// The cardinal directions are ordered clockwise. This allows
-		// for conversion between relative and absolute directions
-		// ('left' 'right' vs 'east' 'west') with simple arithmetic:
-		// If some Direction index 'iDir' is considered 'forward', then
-		// '(iDir + 1) & 0b11' is 'right', '(iDir + 2) & 0b11' is 'backward', etc.
-		public static final int WEST  = 0b000; // 0
-		public static final int NORTH = 0b001; // 1
-		public static final int EAST  = 0b010; // 2
-		public static final int SOUTH = 0b011; // 3
-		public static final int DOWN  = 0b100; // 4
-		public static final int UP    = 0b101; // 5
-
-		public static int iOpposite(int iDir) {
-			return iDir ^ (0b10 >>> (iDir >>> 2));
-		}
-
-		// Each array is placed at the index that encodes the direction that is missing
-		// from the array.
-		private static final int[][] I_EXCEPT = {
-			{       NORTH, EAST, SOUTH, DOWN, UP },
-			{ WEST,        EAST, SOUTH, DOWN, UP },
-			{ WEST, NORTH,       SOUTH, DOWN, UP },
-			{ WEST, NORTH, EAST,        DOWN, UP },
-			{ WEST, NORTH, EAST, SOUTH,       UP },
-			{ WEST, NORTH, EAST, SOUTH, DOWN     }
-		};
-		private static final int[][] I_EXCEPT_CARDINAL = {
-			{       NORTH, EAST, SOUTH },
-			{ WEST,        EAST, SOUTH },
-			{ WEST, NORTH,       SOUTH },
-			{ WEST, NORTH, EAST,       },
-			{ WEST, NORTH, EAST, SOUTH },
-			{ WEST, NORTH, EAST, SOUTH }
-		};
-	}
-
-	/**
-	 * This conversion table takes in information about incoming flow, and outputs
-	 * the determined outgoing flow.
-	 *
-	 * <p>
-	 * The input is a 4 bit number that encodes the incoming flow. Each bit
-	 * represents a cardinal direction, and when it is 'on', there is flow in that
-	 * direction.
-	 *
-	 * <p>
-	 * The output is a single Direction index, or -1 for ambiguous cases.
-	 *
-	 * <p>
-	 * The outgoing flow is determined as follows:
-	 *
-	 * <p>
-	 * If there is just 1 direction of incoming flow, that direction will be the
-	 * direction of outgoing flow.
-	 *
-	 * <p>
-	 * If there are 2 directions of incoming flow, and these directions are not each
-	 * other's opposites, the direction that is 'more clockwise' will be the
-	 * direction of outgoing flow. More precisely, the direction that is 1 clockwise
-	 * turn from the other is picked.
-	 *
-	 * <p>
-	 * If there are 3 directions of incoming flow, the two opposing directions
-	 * cancel each other out, and the remaining direction will be the direction of
-	 * outgoing flow.
-	 *
-	 * <p>
-	 * In all other cases, the flow is completely ambiguous.
-	 */
-	static final int[] FLOW_IN_TO_FLOW_OUT = {
-		-1,               // 0b0000: -                     -> x
-		Directions.WEST,  // 0b0001: west                  -> west
-		Directions.NORTH, // 0b0010: north                 -> north
-		Directions.NORTH, // 0b0011: west/north            -> north
-		Directions.EAST,  // 0b0100: east                  -> east
-		-1,               // 0b0101: west/east             -> x
-		Directions.EAST,  // 0b0110: north/east            -> east
-		Directions.NORTH, // 0b0111: west/north/east       -> north
-		Directions.SOUTH, // 0b1000: south                 -> south
-		Directions.WEST,  // 0b1001: west/south            -> west
-		-1,               // 0b1010: north/south           -> x
-		Directions.WEST,  // 0b1011: west/north/south      -> west
-		Directions.SOUTH, // 0b1100: east/south            -> south
-		Directions.SOUTH, // 0b1101: west/east/south       -> south
-		Directions.EAST,  // 0b1110: north/east/south      -> east
-		-1,               // 0b1111: west/north/east/south -> x
-	};
-	/**
-	 * Update orders of all directions. Given that the index encodes the direction
-	 * that is to be considered 'forward', the resulting update order is
-	 * { front, back, right, left, down, up }.
-	 */
-	static final int[][] FULL_UPDATE_ORDERS = {
-		{ Directions.WEST , Directions.EAST , Directions.NORTH, Directions.SOUTH, Directions.DOWN, Directions.UP },
-		{ Directions.NORTH, Directions.SOUTH, Directions.EAST , Directions.WEST , Directions.DOWN, Directions.UP },
-		{ Directions.EAST , Directions.WEST , Directions.SOUTH, Directions.NORTH, Directions.DOWN, Directions.UP },
-		{ Directions.SOUTH, Directions.NORTH, Directions.WEST , Directions.EAST , Directions.DOWN, Directions.UP }
-	};
-	/**
-	 * The default update order of all directions. It is equivalent to the order of
-	 * shape updates in vanilla Minecraft.
-	 */
-	static final int[] DEFAULT_FULL_UPDATE_ORDER = FULL_UPDATE_ORDERS[0];
-	/**
-	 * Update orders of cardinal directions. Given that the index encodes the
-	 * direction that is to be considered 'forward', the resulting update order is
-	 * { front, back, right, left }.
-	 */
-	static final int[][] CARDINAL_UPDATE_ORDERS = {
-		{ Directions.WEST , Directions.EAST , Directions.NORTH, Directions.SOUTH },
-		{ Directions.NORTH, Directions.SOUTH, Directions.EAST , Directions.WEST  },
-		{ Directions.EAST , Directions.WEST , Directions.SOUTH, Directions.NORTH },
-		{ Directions.SOUTH, Directions.NORTH, Directions.WEST , Directions.EAST  }
-	};
-	/**
-	 * The default update order of all cardinal directions.
-	 */
-	static final int[] DEFAULT_CARDINAL_UPDATE_ORDER = CARDINAL_UPDATE_ORDERS[0];
-
-	private static final int POWER_MIN = BlockLogicWireRedstone.SIGNAL_MIN;
-	private static final int POWER_MAX = BlockLogicWireRedstone.SIGNAL_MAX;
-	private static final int POWER_STEP = BlockLogicWireRedstone.SIGNAL_STEP;
-
-	// If Vanilla will ever multi-thread the ticking of worlds, there should
-	// be only one WireHandler per world, in case redstone updates in multiple
-	// worlds at the same time. There are already mods that add multi-threading
-	// as well.
-	private final World world;
-
-	/** Map of wires and neighboring blocks. */
-	private final Map<TilePos, Node> nodes;
-	/** Queue for the breadth-first search through the network. */
-	private final Queue<WireNode> search;
-	/** Queue of updates to wires and neighboring blocks. */
-	private final Queue<Node> updates;
-
-	// Rather than creating new nodes every time a network is updated we keep
-	// a cache of nodes that can be re-used.
-	private Node[] nodeCache;
-	private int nodeCount;
-
-	/** Is this WireHandler currently working through the update queue? */
-	private boolean updating;
-
-	public WireHandler(World world) {
-		this.world = world;
-
-		this.nodes = new HashMap<>();
-		this.search = new SimpleQueue();
-		this.updates = new PriorityQueue();
-
-		this.nodeCache = new Node[16];
-		this.fillNodeCache(0, 16);
-	}
-
-	/**
-	 * Retrieve the {@link Node Node} that represents the
-	 * block at the given position in the world.
-	 */
-	private Node getOrAddNode(TilePos pos) {
-		return nodes.compute(pos, (key, node) -> {
-			if (node == null) {
-				// If there is not yet a node at this position, retrieve and
-				// update one from the cache.
-				return getNextNode(pos);
-			}
-			if (node.invalid) {
-				return revalidateNode(node);
-			}
-
-			return node;
-		});
-	}
-
-	/**
-	 * Remove and return the {@link Node Node} at the given
-	 * position.
-	 */
-	private Node removeNode(TilePos pos) {
-		return nodes.remove(pos);
-	}
-
-	/**
-	 * Return a {@link Node Node} that represents the block
-	 * at the given position.
-	 */
-	private Node getNextNode(TilePos pos) {
-		return getNextNode(pos, WorldHelper.getBlockState(world, pos));
-	}
-
-	/**
-	 * Return a node that represents the given position and block state. If it is a
-	 * wire, then create a new {@link WireNode WireNode}.
-	 * Otherwise, grab the next {@link Node Node} from the
-	 * cache and update it.
-	 */
-	private Node getNextNode(TilePos pos, BlockState state) {
-		return state.is(Blocks.WIRE_REDSTONE) ? new WireNode(world, pos, state) : getNextNode().set(pos, state, true);
-	}
-
-	/**
-	 * Grab the first unused node from the cache. If all of the cache is already in
-	 * use, increase it in size first.
-	 */
-	private Node getNextNode() {
-		if (nodeCount == nodeCache.length) {
-			increaseNodeCache();
-		}
-
-		return nodeCache[nodeCount++];
-	}
-
-	private void increaseNodeCache() {
-		Node[] oldCache = nodeCache;
-		nodeCache = new Node[oldCache.length << 1];
-
-		for (int index = 0; index < oldCache.length; index++) {
-			nodeCache[index] = oldCache[index];
-		}
-
-		fillNodeCache(oldCache.length, nodeCache.length);
-	}
-
-	private void fillNodeCache(int start, int end) {
-		for (int index = start; index < end; index++) {
-			nodeCache[index] = new Node(world);
-		}
-	}
-
-	/**
-	 * Try to revalidate the given node by looking at the block state that is
-	 * occupying its position. If the given node is a wire but the block state is
-	 * not, or vice versa, a new node must be created/grabbed from the cache.
-	 * Otherwise, the node can be quickly revalidated with the new block state.
-	 */
-	private Node revalidateNode(Node node) {
-		TilePos pos = node.pos;
-		BlockState state = WorldHelper.getBlockState(world, pos);
-
-		boolean wasWire = node.isWire();
-		boolean isWire = state.is(Blocks.WIRE_REDSTONE);
-
-		if (wasWire != isWire) {
-			return getNextNode(pos, state);
-		}
-
-		node.invalid = false;
-
-		if (isWire) {
-			// No need to update the block state of this wire - it will grab
-			// the current block state just before setting power anyway.
-			WireNode wire = node.asWire();
-
-			wire.root = false;
-			wire.discovered = false;
-			wire.searched = false;
-		} else {
-			node.set(pos, state, false);
-		}
-
-		return node;
-	}
-
-	/**
-	 * Retrieve the neighbor of a node in the given direction and create a link
-	 * between the two nodes if they are not yet linked. This link makes accessing
-	 * neighbors of a node signficantly faster.
-	 */
-	private Node getNeighbor(Node node, int iDir) {
-		Node neighbor = node.neighbors[iDir];
-
-		if (neighbor == null || neighbor.invalid) {
-			Direction dir = Directions.ALL[iDir];
-			TilePos pos = node.pos.add(dir);
-
-			Node oldNeighbor = neighbor;
-			neighbor = getOrAddNode(pos);
-
-			if (neighbor != oldNeighbor) {
-				int iOpp = Directions.iOpposite(iDir);
-
-				node.neighbors[iDir] = neighbor;
-				neighbor.neighbors[iOpp] = node;
-			}
-		}
-
-		return neighbor;
-	}
-
-	/**
-	 * Iterate over all neighboring nodes of the given wire. The iteration order is
-	 * designed to be an extension of the default block update order, and is
-	 * determined as follows:
-	 * <br>
-	 * 1. The direction of power flow through the wire is to be considered
-	 * 'forward'. The iteration order depends on the neighbors' relative positions
-	 * to the wire.
-	 * <br>
-	 * 2. Each neighbor is identified by the step(s) you must take, starting at the
-	 * wire, to reach it. Each step is 1 block, thus the position of a neighbor is
-	 * encoded by the direction(s) of the step(s), e.g. (right), (down), (up, left),
-	 * etc.
-	 * <br>
-	 * 3. Neighbors are iterated over in pairs that lie on opposite sides of the
-	 * wire.
-	 * <br>
-	 * 4. Neighbors are iterated over in order of their distance from the wire. This
-	 * means they are iterated over in 3 groups: direct neighbors first, then
-	 * diagonal neighbors, and last are the far neighbors that are 2 blocks directly
-	 * out.
-	 * <br>
-	 * 5. The order within each group is determined using the following basic order:
-	 * { front, back, right, left, down, up }. This order was chosen because it
-	 * converts to the following order of absolute directions when west is said to
-	 * be 'forward': { west, east, north, south, down, up } - this is the order of
-	 * shape updates.
-	 */
-	private void forEachNeighbor(WireNode wire, Consumer<Node> consumer) {
-		int forward   = wire.iFlowDir;
-		int rightward = (forward + 1) & 0b11;
-		int backward  = (forward + 2) & 0b11;
-		int leftward  = (forward + 3) & 0b11;
-		int downward  = Directions.DOWN;
-		int upward    = Directions.UP;
-
-		Node front = getNeighbor(wire, forward);
-		Node right = getNeighbor(wire, rightward);
-		Node back  = getNeighbor(wire, backward);
-		Node left  = getNeighbor(wire, leftward);
-		Node below = getNeighbor(wire, downward);
-		Node above = getNeighbor(wire, upward);
-
-		// direct neighbors (6)
-		consumer.accept(front);
-		consumer.accept(back);
-		consumer.accept(right);
-		consumer.accept(left);
-		consumer.accept(below);
-		consumer.accept(above);
-
-		// diagonal neighbors (12)
-		consumer.accept(getNeighbor(front, rightward));
-		consumer.accept(getNeighbor(back, leftward));
-		consumer.accept(getNeighbor(front, leftward));
-		consumer.accept(getNeighbor(back, rightward));
-		consumer.accept(getNeighbor(front, downward));
-		consumer.accept(getNeighbor(back, upward));
-		consumer.accept(getNeighbor(front, upward));
-		consumer.accept(getNeighbor(back, downward));
-		consumer.accept(getNeighbor(right, downward));
-		consumer.accept(getNeighbor(left, upward));
-		consumer.accept(getNeighbor(right, upward));
-		consumer.accept(getNeighbor(left, downward));
-
-		// far neighbors (6)
-		consumer.accept(getNeighbor(front, forward));
-		consumer.accept(getNeighbor(back, backward));
-		consumer.accept(getNeighbor(right, rightward));
-		consumer.accept(getNeighbor(left, leftward));
-		consumer.accept(getNeighbor(below, downward));
-		consumer.accept(getNeighbor(above, upward));
-	}
-
-	/**
-	 * This method should be called whenever a wire receives a block update.
-	 */
-	public boolean onWireUpdated(TilePos pos) {
-		Node node = getOrAddNode(pos);
-
-		invalidate();
-		findRoots(pos);
-		tryUpdate();
-
-		return node.isWire();
-	}
-
-	/**
-	 * This method should be called whenever a wire is placed.
-	 */
-	public void onWireAdded(TilePos pos) {
-		Node node = getOrAddNode(pos);
-
-		if (!node.isWire()) {
-			return; // we should never get here
-		}
-
-		WireNode wire = node.asWire();
-		wire.added = true;
-
-		invalidate();
-		revalidateNode(wire);
-		findRoot(wire);
-		tryUpdate();
-	}
-
-	/**
-	 * This method should be called whenever a wire is removed.
-	 */
-	public void onWireRemoved(TilePos pos, BlockState state) {
-		Node node = removeNode(pos);
-		WireNode wire;
-
-		if (node == null || !node.isWire()) {
-			wire = new WireNode(world, pos, state);
-		} else {
-			wire = node.asWire();
-		}
-
-		wire.invalid = true;
-		wire.removed = true;
-
-		// If these fields are set to 'true', the removal of this wire was part of
-		// already ongoing power changes, so we can exit early here.
-		if (updating && wire.shouldBreak) {
-			return;
-		}
-
-		invalidate();
-		revalidateNode(wire);
-		findRoot(wire);
-		tryUpdate();
-	}
-
-	/**
-	 * The nodes map is a snapshot of the state of the world. It becomes invalid
-	 * when power changes are carried out, since the block and shape updates can
-	 * lead to block changes. If these block changes cause the network to be updated
-	 * again every node must be invalidated, and revalidated before it is used
-	 * again. This ensures the power calculations of the network are accurate.
-	 */
-	private void invalidate() {
-		if (updating && !nodes.isEmpty()) {
-			nodes.forEach((key, node) -> {
-				node.invalid = true;
-			});
-		}
-	}
-
-	/**
-	 * Look for wires at and around the given position that are in an invalid state
-	 * and require power changes. These wires are called 'roots' because it is only
-	 * when these wires change power level that neighboring wires must adjust as
-	 * well.
-	 *
-	 * <p>
-	 * While it is strictly only necessary to check the wire at the given position,
-	 * if that wire is part of a network, it is beneficial to check its surroundings
-	 * for other wires that require power changes. This is because a network can
-	 * receive power at multiple points. Consider the following setup:
-	 *
-	 * <p>
-	 * (top-down view, W = wire, L = lever, _ = air/other)
-	 * <br> {@code _ _ W _ _ }
-	 * <br> {@code _ W W W _ }
-	 * <br> {@code W W L W W }
-	 * <br> {@code _ W W W _ }
-	 * <br> {@code _ _ W _ _ }
-	 *
-	 * <p>
-	 * The lever powers four wires in the network at once. If this is identified
-	 * correctly, the entire network can (un)power at once. While it is not
-	 * practical to cover every possible situation where a network is (un)powered
-	 * from multiple points at once, checking for common cases like the one
-	 * described above is relatively straight-forward.
-	 */
-	private void findRoots(TilePos pos) {
-		Node node = getOrAddNode(pos);
-
-		if (!node.isWire()) {
-			return; // we should never get here
-		}
-
-		WireNode wire = node.asWire();
-		findRoot(wire);
-
-		// If the wire at the given position is not in an invalid state
-		// we can exit early.
-		if (!wire.searched) {
-			return;
-		}
-
-		for (int iDir : FULL_UPDATE_ORDERS[wire.iFlowDir]) {
-			Node neighbor = getNeighbor(wire, iDir);
-
-			if (neighbor.isConductor() || neighbor.isSignalSource()) {
-				findRootsAround(neighbor, Directions.iOpposite(iDir));
-			}
-		}
-	}
-
-	/**
-	 * Look for wires around the given node that require power changes.
-	 */
-	private void findRootsAround(Node node, int except) {
-		for (int iDir : Directions.I_EXCEPT_CARDINAL[except]) {
-			Node neighbor = getNeighbor(node, iDir);
-
-			if (neighbor.isWire()) {
-				findRoot(neighbor.asWire());
-			}
-		}
-	}
-
-	/**
-	 * Check if the given wire requires power changes. If it does, queue it for the
-	 * breadth-first search as a root.
-	 */
-	private void findRoot(WireNode wire) {
-		// Each wire only needs to be checked once.
-		if (wire.discovered) {
-			return;
-		}
-
-		discover(wire);
-		findExternalPower(wire);
-		findPower(wire, false);
-
-		if (needsUpdate(wire)) {
-			searchRoot(wire);
-		}
-	}
-
-	/**
-	 * Prepare the given wire for the breadth-first search. This means:
-	 * <br>
-	 * - Check if the wire should break. Rather than breaking the wire right away,
-	 * its effects are integrated into the power calculations.
-	 * <br>
-	 * - Reset the virtual and external power.
-	 * <br>
-	 * - Find connections to neighboring wires.
-	 */
-	private void discover(WireNode wire) {
-		if (wire.discovered) {
-			return;
-		}
-
-		wire.discovered = true;
-		wire.searched = false;
-
-		if (!wire.removed && !wire.shouldBreak && !wire.state.canSurvive(world, wire.pos)) {
-			wire.shouldBreak = true;
-		}
-
-		wire.virtualPower = wire.currentPower;
-		wire.externalPower = POWER_MIN - 1;
-
-		wire.connections.set(this::getNeighbor);
-	}
-
-	/**
-	 * Determine the power level the given wire receives from the blocks around it.
-	 * Power from non-wire components only needs to be computed if power from
-	 * neighboring wires has decreased, so as to determine how low the power of the
-	 * wire can fall.
-	 */
-	private void findPower(WireNode wire, boolean ignoreSearched) {
-		// As wire power is (re-)computed, flow information must be reset.
-		wire.virtualPower = wire.externalPower;
-		wire.flowIn = 0;
-
-		// If the wire is removed or going to break, its power level should always be
-		// the minimum value. This is because it (effectively) no longer exists, so
-		// cannot provide any power to neighboring wires.
-		if (wire.removed || wire.shouldBreak) {
-			return;
-		}
-
-		// Power received from neighboring wires will never exceed POWER_MAX -
-		// POWER_STEP, so if the external power is already larger than or equal to
-		// that, there is no need to check for power from neighboring wires.
-		if (wire.externalPower < (POWER_MAX - POWER_STEP)) {
-			findWirePower(wire, ignoreSearched);
-		}
-	}
-
-	/**
-	 * Determine the power the given wire receives from connected neighboring wires
-	 * and update the virtual power accordingly.
-	 */
-	private void findWirePower(WireNode wire, boolean ignoreSearched) {
-		wire.connections.forEach(connection -> {
-			if (!connection.accept) {
-				return;
-			}
-
-			WireNode neighbor = connection.wire;
-
-			if (!ignoreSearched || !neighbor.searched) {
-				int power = Math.max(POWER_MIN, neighbor.virtualPower - POWER_STEP);
-				int iOpp = Directions.iOpposite(connection.iDir);
-
-				wire.offerPower(power, iOpp);
-			}
-		});
-	}
-
-	/**
-	 * Determine the redstone signal the given wire receives from non-wire
-	 * components and update the virtual power accordingly.
-	 */
-	private void findExternalPower(WireNode wire) {
-		// If the wire is removed or going to break, its power level should always be
-		// the minimum value. Thus external power need not be computed.
-		// In other cases external power need only be computed once.
-		if (wire.removed || wire.shouldBreak || wire.externalPower >= POWER_MIN) {
-			return;
-		}
-
-		wire.externalPower = hasExternalPower(wire) ? BlockLogicWireRedstone.SIGNAL_MAX : BlockLogicWireRedstone.SIGNAL_MIN;
-
-		if (wire.externalPower > wire.virtualPower) {
-			wire.virtualPower = wire.externalPower;
-		}
-	}
-
-	/**
-	 * Determine whether the given wire receives a redstone signal from non-wire
-	 * components.
-	 */
-	private boolean hasExternalPower(WireNode wire) {
-		for (int iDir = 0; iDir < Directions.ALL.length; iDir++) {
-			Node neighbor = getNeighbor(wire, iDir);
-
-			// Power from wires is handled separately.
-			if (neighbor.isWire()) {
-				continue;
-			}
-
-			// Since 1.16 there is a block that is both a conductor and a signal
-			// source: the target block!
-			if (neighbor.isConductor() && hasDirectSignalTo(wire, neighbor, Directions.iOpposite(iDir))) {
-				return true;
-			}
-			if (neighbor.isSignalSource() && neighbor.state.hasSignal(world, neighbor.pos, Directions.ALL[iDir])) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Determine whether the given wire receives a direct signal from non-wire
-	 * components through the given conductor node.
-	 */
-	private boolean hasDirectSignalTo(WireNode wire, Node node, int except) {
-		for (int iDir : Directions.I_EXCEPT[except]) {
-			Node neighbor = getNeighbor(node, iDir);
-
-			if (neighbor.isSignalSource() && neighbor.state.hasDirectSignal(world, neighbor.pos, Directions.ALL[iDir])) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Check if the given wire needs to update its state in the world.
-	 */
-	private boolean needsUpdate(WireNode wire) {
-		return wire.removed || wire.shouldBreak || wire.virtualPower != wire.currentPower;
-	}
-
-	/**
-	 * Queue the given wire for the breadth-first search as a root.
-	 */
-	private void searchRoot(WireNode wire) {
-		int iBackupFlowDir;
-
-		if (wire.connections.iFlowDir < 0) {
-			iBackupFlowDir = 0;
-		} else {
-			iBackupFlowDir = wire.connections.iFlowDir;
-		}
-
-		search(wire, true, iBackupFlowDir);
-	}
-
-	/**
-	 * Queue the given wire for the breadth-first search and set a backup flow
-	 * direction.
-	 */
-	private void search(WireNode wire, boolean root, int iBackupFlowDir) {
-		search.offer(wire);
-
-		wire.root = root;
-		wire.searched = true;
-		// Normally the flow is not set until the power level is updated. However,
-		// in networks with multiple power sources the update order between them
-		// depends on which was discovered first. To make this less prone to
-		// directionality, each wire node is given a 'backup' flow. For roots, this
-		// is the determined flow of their connections. For non-roots this is the
-		// direction from which they were discovered.
-		wire.iFlowDir = iBackupFlowDir;
-	}
-
-	private void tryUpdate() {
-		if (!search.isEmpty()) {
-			update();
-		}
-		if (!updating) {
-			nodes.clear();
-			nodeCount = 0;
-		}
-	}
-
-	/**
-	 * Update the network and neighboring blocks. This is done in 3 steps.
-	 *
-	 * <p>
-	 * <b>1. Search through the network</b>
-	 * <br>
-	 * Conduct a breadth-first search around the roots to find wires that are in an
-	 * invalid state and need power changes.
-	 *
-	 * <p>
-	 * <b>2. Depower the network</b>
-	 * <br>
-	 * Depower all wires in the network. This allows power to be spread most
-	 * efficiently.
-	 *
-	 * <p>
-	 * <b>3. Power the network</b>
-	 * <br>
-	 * Work through the update queue, setting the new power level of each wire and
-	 * updating neighboring blocks. After a wire has updated its power level, it
-	 * will queue updates for neighboring wires and blocks.
-	 */
-	private void update() {
-		// The profiler keeps track of how long various parts of the algorithm take.
-		// It is only here for debugging purposes, and is commented out in production.
+    public static class Directions {
+
+        public static final Direction[] ALL = {Direction.WEST, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.DOWN, Direction.UP};
+        public static final Direction[] HORIZONTAL = {Direction.WEST, Direction.NORTH, Direction.EAST, Direction.SOUTH};
+
+        // Indices for the arrays above.
+        // The cardinal directions are ordered clockwise. This allows
+        // for conversion between relative and absolute directions
+        // ('left' 'right' vs 'east' 'west') with simple arithmetic:
+        // If some Direction index 'iDir' is considered 'forward', then
+        // '(iDir + 1) & 0b11' is 'right', '(iDir + 2) & 0b11' is 'backward', etc.
+        public static final int WEST = 0b000; // 0
+        public static final int NORTH = 0b001; // 1
+        public static final int EAST = 0b010; // 2
+        public static final int SOUTH = 0b011; // 3
+        public static final int DOWN = 0b100; // 4
+        public static final int UP = 0b101; // 5
+
+        public static int iOpposite(int iDir) {
+            return iDir ^ (0b10 >>> (iDir >>> 2));
+        }
+
+        // Each array is placed at the index that encodes the direction that is missing
+        // from the array.
+        private static final int[][] I_EXCEPT = {
+            {NORTH, EAST, SOUTH, DOWN, UP},
+            {WEST, EAST, SOUTH, DOWN, UP},
+            {WEST, NORTH, SOUTH, DOWN, UP},
+            {WEST, NORTH, EAST, DOWN, UP},
+            {WEST, NORTH, EAST, SOUTH, UP},
+            {WEST, NORTH, EAST, SOUTH, DOWN}
+        };
+        private static final int[][] I_EXCEPT_CARDINAL = {
+            {NORTH, EAST, SOUTH},
+            {WEST, EAST, SOUTH},
+            {WEST, NORTH, SOUTH},
+            {WEST, NORTH, EAST,},
+            {WEST, NORTH, EAST, SOUTH},
+            {WEST, NORTH, EAST, SOUTH}
+        };
+    }
+
+    /**
+     * This conversion table takes in information about incoming flow, and outputs
+     * the determined outgoing flow.
+     *
+     * <p>
+     * The input is a 4 bit number that encodes the incoming flow. Each bit
+     * represents a cardinal direction, and when it is 'on', there is flow in that
+     * direction.
+     *
+     * <p>
+     * The output is a single Direction index, or -1 for ambiguous cases.
+     *
+     * <p>
+     * The outgoing flow is determined as follows:
+     *
+     * <p>
+     * If there is just 1 direction of incoming flow, that direction will be the
+     * direction of outgoing flow.
+     *
+     * <p>
+     * If there are 2 directions of incoming flow, and these directions are not each
+     * other's opposites, the direction that is 'more clockwise' will be the
+     * direction of outgoing flow. More precisely, the direction that is 1 clockwise
+     * turn from the other is picked.
+     *
+     * <p>
+     * If there are 3 directions of incoming flow, the two opposing directions
+     * cancel each other out, and the remaining direction will be the direction of
+     * outgoing flow.
+     *
+     * <p>
+     * In all other cases, the flow is completely ambiguous.
+     */
+    static final int[] FLOW_IN_TO_FLOW_OUT = {
+        -1,               // 0b0000: -                     -> x
+        Directions.WEST,  // 0b0001: west                  -> west
+        Directions.NORTH, // 0b0010: north                 -> north
+        Directions.NORTH, // 0b0011: west/north            -> north
+        Directions.EAST,  // 0b0100: east                  -> east
+        -1,               // 0b0101: west/east             -> x
+        Directions.EAST,  // 0b0110: north/east            -> east
+        Directions.NORTH, // 0b0111: west/north/east       -> north
+        Directions.SOUTH, // 0b1000: south                 -> south
+        Directions.WEST,  // 0b1001: west/south            -> west
+        -1,               // 0b1010: north/south           -> x
+        Directions.WEST,  // 0b1011: west/north/south      -> west
+        Directions.SOUTH, // 0b1100: east/south            -> south
+        Directions.SOUTH, // 0b1101: west/east/south       -> south
+        Directions.EAST,  // 0b1110: north/east/south      -> east
+        -1,               // 0b1111: west/north/east/south -> x
+    };
+    /**
+     * Update orders of all directions. Given that the index encodes the direction
+     * that is to be considered 'forward', the resulting update order is
+     * { front, back, right, left, down, up }.
+     */
+    static final int[][] FULL_UPDATE_ORDERS = {
+        {Directions.WEST, Directions.EAST, Directions.NORTH, Directions.SOUTH, Directions.DOWN, Directions.UP},
+        {Directions.NORTH, Directions.SOUTH, Directions.EAST, Directions.WEST, Directions.DOWN, Directions.UP},
+        {Directions.EAST, Directions.WEST, Directions.SOUTH, Directions.NORTH, Directions.DOWN, Directions.UP},
+        {Directions.SOUTH, Directions.NORTH, Directions.WEST, Directions.EAST, Directions.DOWN, Directions.UP}
+    };
+    /**
+     * The default update order of all directions. It is equivalent to the order of
+     * shape updates in vanilla Minecraft.
+     */
+    static final int[] DEFAULT_FULL_UPDATE_ORDER = FULL_UPDATE_ORDERS[0];
+    /**
+     * Update orders of cardinal directions. Given that the index encodes the
+     * direction that is to be considered 'forward', the resulting update order is
+     * { front, back, right, left }.
+     */
+    static final int[][] CARDINAL_UPDATE_ORDERS = {
+        {Directions.WEST, Directions.EAST, Directions.NORTH, Directions.SOUTH},
+        {Directions.NORTH, Directions.SOUTH, Directions.EAST, Directions.WEST},
+        {Directions.EAST, Directions.WEST, Directions.SOUTH, Directions.NORTH},
+        {Directions.SOUTH, Directions.NORTH, Directions.WEST, Directions.EAST}
+    };
+    /**
+     * The default update order of all cardinal directions.
+     */
+    static final int[] DEFAULT_CARDINAL_UPDATE_ORDER = CARDINAL_UPDATE_ORDERS[0];
+
+    private static final int POWER_MIN = BlockLogicWireRedstone.SIGNAL_MIN;
+    private static final int POWER_MAX = BlockLogicWireRedstone.SIGNAL_MAX;
+    private static final int POWER_STEP = BlockLogicWireRedstone.SIGNAL_STEP;
+
+    // If Vanilla will ever multi-thread the ticking of worlds, there should
+    // be only one WireHandler per world, in case redstone updates in multiple
+    // worlds at the same time. There are already mods that add multi-threading
+    // as well.
+    private final World world;
+
+    /** Map of wires and neighboring blocks. */
+    private final @NotNull Map<TilePos, Node> nodes;
+    /** Queue for the breadth-first search through the network. */
+    private final @NotNull Queue<WireNode> search;
+    /** Queue of updates to wires and neighboring blocks. */
+    private final @NotNull Queue<Node> updates;
+
+    // Rather than creating new nodes every time a network is updated we keep
+    // a cache of nodes that can be re-used.
+    private Node[] nodeCache;
+    private int nodeCount;
+
+    /** Is this WireHandler currently working through the update queue? */
+    private boolean updating;
+
+    public WireHandler(World world) {
+        this.world = world;
+
+        this.nodes = new HashMap<>();
+        this.search = new SimpleQueue();
+        this.updates = new PriorityQueue();
+
+        this.nodeCache = new Node[16];
+        this.fillNodeCache(0, 16);
+    }
+
+    /**
+     * Retrieve the {@link Node Node} that represents the
+     * block at the given position in the world.
+     */
+    private @NotNull Node getOrAddNode(@NotNull TilePosc pos) {
+        synchronized (this.nodes) {
+            return this.nodes.compute(new TilePos(pos), (key, node) -> {
+                if (node == null) {
+                    // If there is not yet a node at this position, retrieve and
+                    // update one from the cache.
+                    return getNextNode(pos);
+                }
+                if (node.invalid) {
+                    return revalidateNode(node);
+                }
+
+                return node;
+            });
+        }
+    }
+
+    /**
+     * Remove and return the {@link Node Node} at the given
+     * position.
+     */
+    private Node removeNode(TilePosc pos) {
+        return this.nodes.remove(pos);
+    }
+
+    /**
+     * Return a {@link Node Node} that represents the block
+     * at the given position.
+     */
+    private @NotNull Node getNextNode(@NotNull TilePosc pos) {
+        return getNextNode(pos, WorldHelper.getBlockState(this.world, pos));
+    }
+
+    /**
+     * Return a node that represents the given position and block state. If it is a
+     * wire, then create a new {@link WireNode WireNode}.
+     * Otherwise, grab the next {@link Node Node} from the
+     * cache and update it.
+     */
+    private @NotNull Node getNextNode(@NotNull TilePosc pos, @NotNull BlockState state) {
+        return state.is(Blocks.WIRE_REDSTONE) ? new WireNode(this.world, pos, state) : getNextNode().set(pos, state, true);
+    }
+
+    /**
+     * Grab the first unused node from the cache. If all of the cache is already in
+     * use, increase it in size first.
+     */
+    private Node getNextNode() {
+        if (this.nodeCount == this.nodeCache.length) {
+            increaseNodeCache();
+        }
+
+        return this.nodeCache[this.nodeCount++];
+    }
+
+    private void increaseNodeCache() {
+        Node[] oldCache = this.nodeCache;
+        this.nodeCache = new Node[oldCache.length << 1];
+
+        System.arraycopy(oldCache, 0, this.nodeCache, 0, oldCache.length);
+
+        fillNodeCache(oldCache.length, this.nodeCache.length);
+    }
+
+    private void fillNodeCache(int start, int end) {
+        for (int index = start; index < end; index++) {
+            this.nodeCache[index] = new Node(this.world);
+        }
+    }
+
+    /**
+     * Try to revalidate the given node by looking at the block state that is
+     * occupying its position. If the given node is a wire but the block state is
+     * not, or vice versa, a new node must be created/grabbed from the cache.
+     * Otherwise, the node can be quickly revalidated with the new block state.
+     */
+    private Node revalidateNode(Node node) {
+        TilePos pos = node.pos;
+        BlockState state = WorldHelper.getBlockState(this.world, pos);
+
+        boolean wasWire = node.isWire();
+        boolean isWire = state.is(Blocks.WIRE_REDSTONE);
+
+        if (wasWire != isWire) {
+            return getNextNode(pos, state);
+        }
+
+        node.invalid = false;
+
+        if (isWire) {
+            // No need to update the block state of this wire - it will grab
+            // the current block state just before setting power anyway.
+            WireNode wire = node.asWire();
+
+            wire.root = false;
+            wire.discovered = false;
+            wire.searched = false;
+        } else {
+            node.set(pos, state, false);
+        }
+
+        return node;
+    }
+
+    /**
+     * Retrieve the neighbor of a node in the given direction and create a link
+     * between the two nodes if they are not yet linked. This link makes accessing
+     * neighbors of a node signficantly faster.
+     */
+    private Node getNeighbor(Node node, int iDir) {
+        Node neighbor = node.neighbors[iDir];
+
+        if (neighbor == null || neighbor.invalid) {
+            Direction dir = Directions.ALL[iDir];
+            TilePos pos = node.pos.add(dir, new TilePos());
+
+            Node oldNeighbor = neighbor;
+            neighbor = getOrAddNode(pos);
+
+            if (neighbor != oldNeighbor) {
+                int iOpp = Directions.iOpposite(iDir);
+
+                node.neighbors[iDir] = neighbor;
+                neighbor.neighbors[iOpp] = node;
+            }
+        }
+
+        return neighbor;
+    }
+
+    /**
+     * Iterate over all neighboring nodes of the given wire. The iteration order is
+     * designed to be an extension of the default block update order, and is
+     * determined as follows:
+     * <br>
+     * 1. The direction of power flow through the wire is to be considered
+     * 'forward'. The iteration order depends on the neighbors' relative positions
+     * to the wire.
+     * <br>
+     * 2. Each neighbor is identified by the step(s) you must take, starting at the
+     * wire, to reach it. Each step is 1 block, thus the position of a neighbor is
+     * encoded by the direction(s) of the step(s), e.g. (right), (down), (up, left),
+     * etc.
+     * <br>
+     * 3. Neighbors are iterated over in pairs that lie on opposite sides of the
+     * wire.
+     * <br>
+     * 4. Neighbors are iterated over in order of their distance from the wire. This
+     * means they are iterated over in 3 groups: direct neighbors first, then
+     * diagonal neighbors, and last are the far neighbors that are 2 blocks directly
+     * out.
+     * <br>
+     * 5. The order within each group is determined using the following basic order:
+     * { front, back, right, left, down, up }. This order was chosen because it
+     * converts to the following order of absolute directions when west is said to
+     * be 'forward': { west, east, north, south, down, up } - this is the order of
+     * shape updates.
+     */
+    private void forEachNeighbor(WireNode wire, Consumer<Node> consumer) {
+        int forward = wire.iFlowDir;
+        int rightward = (forward + 1) & 0b11;
+        int backward = (forward + 2) & 0b11;
+        int leftward = (forward + 3) & 0b11;
+        int downward = Directions.DOWN;
+        int upward = Directions.UP;
+
+        Node front = getNeighbor(wire, forward);
+        Node right = getNeighbor(wire, rightward);
+        Node back = getNeighbor(wire, backward);
+        Node left = getNeighbor(wire, leftward);
+        Node below = getNeighbor(wire, downward);
+        Node above = getNeighbor(wire, upward);
+
+        // direct neighbors (6)
+        consumer.accept(front);
+        consumer.accept(back);
+        consumer.accept(right);
+        consumer.accept(left);
+        consumer.accept(below);
+        consumer.accept(above);
+
+        // diagonal neighbors (12)
+        consumer.accept(getNeighbor(front, rightward));
+        consumer.accept(getNeighbor(back, leftward));
+        consumer.accept(getNeighbor(front, leftward));
+        consumer.accept(getNeighbor(back, rightward));
+        consumer.accept(getNeighbor(front, downward));
+        consumer.accept(getNeighbor(back, upward));
+        consumer.accept(getNeighbor(front, upward));
+        consumer.accept(getNeighbor(back, downward));
+        consumer.accept(getNeighbor(right, downward));
+        consumer.accept(getNeighbor(left, upward));
+        consumer.accept(getNeighbor(right, upward));
+        consumer.accept(getNeighbor(left, downward));
+
+        // far neighbors (6)
+        consumer.accept(getNeighbor(front, forward));
+        consumer.accept(getNeighbor(back, backward));
+        consumer.accept(getNeighbor(right, rightward));
+        consumer.accept(getNeighbor(left, leftward));
+        consumer.accept(getNeighbor(below, downward));
+        consumer.accept(getNeighbor(above, upward));
+    }
+
+    /**
+     * This method should be called whenever a wire receives a block update.
+     */
+    public boolean onWireUpdated(TilePosc pos) {
+        Node node = getOrAddNode(pos);
+
+        invalidate();
+        findRoots(pos);
+        tryUpdate();
+
+        return node.isWire();
+    }
+
+    /**
+     * This method should be called whenever a wire is placed.
+     */
+    public void onWireAdded(TilePosc pos) {
+        Node node = getOrAddNode(pos);
+
+        if (!node.isWire()) {
+            return; // we should never get here
+        }
+
+        WireNode wire = node.asWire();
+        wire.added = true;
+
+        invalidate();
+        revalidateNode(wire);
+        findRoot(wire);
+        tryUpdate();
+    }
+
+    /**
+     * This method should be called whenever a wire is removed.
+     */
+    public void onWireRemoved(TilePosc pos, BlockState state) {
+        Node node = removeNode(pos);
+        WireNode wire;
+
+        if (node == null || !node.isWire()) {
+            wire = new WireNode(this.world, pos, state);
+        } else {
+            wire = node.asWire();
+        }
+
+        wire.invalid = true;
+        wire.removed = true;
+
+        // If these fields are set to 'true', the removal of this wire was part of
+        // already ongoing power changes, so we can exit early here.
+        if (this.updating && wire.shouldBreak) {
+            return;
+        }
+
+        invalidate();
+        revalidateNode(wire);
+        findRoot(wire);
+        tryUpdate();
+    }
+
+    /**
+     * The nodes map is a snapshot of the state of the world. It becomes invalid
+     * when power changes are carried out, since the block and shape updates can
+     * lead to block changes. If these block changes cause the network to be updated
+     * again every node must be invalidated, and revalidated before it is used
+     * again. This ensures the power calculations of the network are accurate.
+     */
+    private void invalidate() {
+        if (this.updating && !this.nodes.isEmpty()) {
+            this.nodes.forEach((key, node) -> {
+                node.invalid = true;
+            });
+        }
+    }
+
+    /**
+     * Look for wires at and around the given position that are in an invalid state
+     * and require power changes. These wires are called 'roots' because it is only
+     * when these wires change power level that neighboring wires must adjust as
+     * well.
+     *
+     * <p>
+     * While it is strictly only necessary to check the wire at the given position,
+     * if that wire is part of a network, it is beneficial to check its surroundings
+     * for other wires that require power changes. This is because a network can
+     * receive power at multiple points. Consider the following setup:
+     *
+     * <p>
+     * (top-down view, W = wire, L = lever, _ = air/other)
+     * <br> {@code _ _ W _ _ }
+     * <br> {@code _ W W W _ }
+     * <br> {@code W W L W W }
+     * <br> {@code _ W W W _ }
+     * <br> {@code _ _ W _ _ }
+     *
+     * <p>
+     * The lever powers four wires in the network at once. If this is identified
+     * correctly, the entire network can (un)power at once. While it is not
+     * practical to cover every possible situation where a network is (un)powered
+     * from multiple points at once, checking for common cases like the one
+     * described above is relatively straight-forward.
+     */
+    private void findRoots(TilePosc pos) {
+        Node node = getOrAddNode(pos);
+
+        if (!node.isWire()) {
+            return; // we should never get here
+        }
+
+        WireNode wire = node.asWire();
+        findRoot(wire);
+
+        // If the wire at the given position is not in an invalid state
+        // we can exit early.
+        if (!wire.searched) {
+            return;
+        }
+
+        for (int iDir : FULL_UPDATE_ORDERS[wire.iFlowDir]) {
+            Node neighbor = getNeighbor(wire, iDir);
+
+            if (neighbor.isConductor() || neighbor.isSignalSource()) {
+                findRootsAround(neighbor, Directions.iOpposite(iDir));
+            }
+        }
+    }
+
+    /**
+     * Look for wires around the given node that require power changes.
+     */
+    private void findRootsAround(Node node, int except) {
+        for (int iDir : Directions.I_EXCEPT_CARDINAL[except]) {
+            Node neighbor = getNeighbor(node, iDir);
+
+            if (neighbor.isWire()) {
+                findRoot(neighbor.asWire());
+            }
+        }
+    }
+
+    /**
+     * Check if the given wire requires power changes. If it does, queue it for the
+     * breadth-first search as a root.
+     */
+    private void findRoot(WireNode wire) {
+        // Each wire only needs to be checked once.
+        if (wire.discovered) {
+            return;
+        }
+
+        discover(wire);
+        findExternalPower(wire);
+        findPower(wire, false);
+
+        if (needsUpdate(wire)) {
+            searchRoot(wire);
+        }
+    }
+
+    /**
+     * Prepare the given wire for the breadth-first search. This means:
+     * <br>
+     * - Check if the wire should break. Rather than breaking the wire right away,
+     * its effects are integrated into the power calculations.
+     * <br>
+     * - Reset the virtual and external power.
+     * <br>
+     * - Find connections to neighboring wires.
+     */
+    private void discover(WireNode wire) {
+        if (wire.discovered) {
+            return;
+        }
+
+        wire.discovered = true;
+        wire.searched = false;
+
+        if (!wire.removed && !wire.shouldBreak && !wire.state.canSurvive(this.world, wire.pos)) {
+            wire.shouldBreak = true;
+        }
+
+        wire.virtualPower = wire.currentPower;
+        wire.externalPower = POWER_MIN - 1;
+
+        wire.connections.set(this::getNeighbor);
+    }
+
+    /**
+     * Determine the power level the given wire receives from the blocks around it.
+     * Power from non-wire components only needs to be computed if power from
+     * neighboring wires has decreased, so as to determine how low the power of the
+     * wire can fall.
+     */
+    private void findPower(WireNode wire, boolean ignoreSearched) {
+        // As wire power is (re-)computed, flow information must be reset.
+        wire.virtualPower = wire.externalPower;
+        wire.flowIn = 0;
+
+        // If the wire is removed or going to break, its power level should always be
+        // the minimum value. This is because it (effectively) no longer exists, so
+        // cannot provide any power to neighboring wires.
+        if (wire.removed || wire.shouldBreak) {
+            return;
+        }
+
+        // Power received from neighboring wires will never exceed POWER_MAX -
+        // POWER_STEP, so if the external power is already larger than or equal to
+        // that, there is no need to check for power from neighboring wires.
+        if (wire.externalPower < (POWER_MAX - POWER_STEP)) {
+            findWirePower(wire, ignoreSearched);
+        }
+    }
+
+    /**
+     * Determine the power the given wire receives from connected neighboring wires
+     * and update the virtual power accordingly.
+     */
+    private void findWirePower(WireNode wire, boolean ignoreSearched) {
+        wire.connections.forEach(connection -> {
+            if (!connection.accept) {
+                return;
+            }
+
+            WireNode neighbor = connection.wire;
+
+            if (!ignoreSearched || !neighbor.searched) {
+                int power = Math.max(POWER_MIN, neighbor.virtualPower - POWER_STEP);
+                int iOpp = Directions.iOpposite(connection.iDir);
+
+                wire.offerPower(power, iOpp);
+            }
+        });
+    }
+
+    /**
+     * Determine the redstone signal the given wire receives from non-wire
+     * components and update the virtual power accordingly.
+     */
+    private void findExternalPower(WireNode wire) {
+        // If the wire is removed or going to break, its power level should always be
+        // the minimum value. Thus external power need not be computed.
+        // In other cases external power need only be computed once.
+        if (wire.removed || wire.shouldBreak || wire.externalPower >= POWER_MIN) {
+            return;
+        }
+
+        wire.externalPower = hasExternalPower(wire) ? BlockLogicWireRedstone.SIGNAL_MAX : BlockLogicWireRedstone.SIGNAL_MIN;
+
+        if (wire.externalPower > wire.virtualPower) {
+            wire.virtualPower = wire.externalPower;
+        }
+    }
+
+    /**
+     * Determine whether the given wire receives a redstone signal from non-wire
+     * components.
+     */
+    private boolean hasExternalPower(WireNode wire) {
+        for (int iDir = 0; iDir < Directions.ALL.length; iDir++) {
+            Node neighbor = getNeighbor(wire, iDir);
+
+            // Power from wires is handled separately.
+            if (neighbor.isWire()) {
+                continue;
+            }
+
+            // Since 1.16 there is a block that is both a conductor and a signal
+            // source: the target block!
+            if (neighbor.isConductor() && hasDirectSignalTo(wire, neighbor, Directions.iOpposite(iDir))) {
+                return true;
+            }
+            if (neighbor.isSignalSource() && neighbor.state.hasSignal(this.world, neighbor.pos, Directions.ALL[iDir])) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Determine whether the given wire receives a direct signal from non-wire
+     * components through the given conductor node.
+     */
+    private boolean hasDirectSignalTo(WireNode wire, Node node, int except) {
+        for (int iDir : Directions.I_EXCEPT[except]) {
+            Node neighbor = getNeighbor(node, iDir);
+
+            if (neighbor.isSignalSource() && neighbor.state.hasDirectSignal(this.world, neighbor.pos, Directions.ALL[iDir])) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Check if the given wire needs to update its state in the world.
+     */
+    private boolean needsUpdate(WireNode wire) {
+        return wire.removed || wire.shouldBreak || wire.virtualPower != wire.currentPower;
+    }
+
+    /**
+     * Queue the given wire for the breadth-first search as a root.
+     */
+    private void searchRoot(WireNode wire) {
+        int iBackupFlowDir;
+
+        if (wire.connections.iFlowDir < 0) {
+            iBackupFlowDir = 0;
+        } else {
+            iBackupFlowDir = wire.connections.iFlowDir;
+        }
+
+        search(wire, true, iBackupFlowDir);
+    }
+
+    /**
+     * Queue the given wire for the breadth-first search and set a backup flow
+     * direction.
+     */
+    private void search(WireNode wire, boolean root, int iBackupFlowDir) {
+        this.search.offer(wire);
+
+        wire.root = root;
+        wire.searched = true;
+        // Normally the flow is not set until the power level is updated. However,
+        // in networks with multiple power sources the update order between them
+        // depends on which was discovered first. To make this less prone to
+        // directionality, each wire node is given a 'backup' flow. For roots, this
+        // is the determined flow of their connections. For non-roots this is the
+        // direction from which they were discovered.
+        wire.iFlowDir = iBackupFlowDir;
+    }
+
+    private void tryUpdate() {
+        if (!this.search.isEmpty()) {
+            update();
+        }
+        if (!this.updating) {
+            this.nodes.clear();
+            this.nodeCount = 0;
+        }
+    }
+
+    /**
+     * Update the network and neighboring blocks. This is done in 3 steps.
+     *
+     * <p>
+     * <b>1. Search through the network</b>
+     * <br>
+     * Conduct a breadth-first search around the roots to find wires that are in an
+     * invalid state and need power changes.
+     *
+     * <p>
+     * <b>2. Depower the network</b>
+     * <br>
+     * Depower all wires in the network. This allows power to be spread most
+     * efficiently.
+     *
+     * <p>
+     * <b>3. Power the network</b>
+     * <br>
+     * Work through the update queue, setting the new power level of each wire and
+     * updating neighboring blocks. After a wire has updated its power level, it
+     * will queue updates for neighboring wires and blocks.
+     */
+    private void update() {
+        // The profiler keeps track of how long various parts of the algorithm take.
+        // It is only here for debugging purposes, and is commented out in production.
 //		Profiler profiler = AlternateCurrentMod.createProfiler();
 //		profiler.start();
 
-		// Search through the network for wires that need power changes. This includes
-		// the roots as well as any wires that will be affected by power changes to
-		// those roots.
+        // Search through the network for wires that need power changes. This includes
+        // the roots as well as any wires that will be affected by power changes to
+        // those roots.
 //		profiler.push("search network");
-		searchNetwork();
+        searchNetwork();
 
-		// Depower all the wires in the network.
+        // Depower all the wires in the network.
 //		profiler.swap("depower network");
-		depowerNetwork();
+        depowerNetwork();
 
-		// Bring each wire up to its new power level and update neighboring blocks.
+        // Bring each wire up to its new power level and update neighboring blocks.
 //		profiler.swap("power network");
-		try {
-			powerNetwork();
-		} catch (Throwable t) {
-			// If anything goes wrong while carrying out power changes, this field must
-			// be reset to 'false', or the wire handler will be locked out of carrying
-			// out power changes until the world is reloaded.
-			updating = false;
-
-			throw t;
+        try {
+            powerNetwork();
+        } catch (Throwable t) {
+            // If anything goes wrong while carrying out power changes, this field must
+            // be reset to 'false', or the wire handler will be locked out of carrying
+            // out power changes until the world is reloaded.
+            this.updating = false;
+
+            throw t;
 //		} finally {
 //			profiler.pop();
 //			profiler.end();
-		}
-	}
-
-	/**
-	 * Search through the network for wires that are in an invalid state and need
-	 * power changes. These wires are added to the end of the queue, so that their
-	 * neighbors can be searched next.
-	 */
-	private void searchNetwork() {
-		for (WireNode wire : search) {
-			// The order in which wires are searched will influence the order in
-			// which they update their power levels.
-			wire.connections.forEach(connection -> {
-				if (!connection.offer) {
-					return;
-				}
-
-				WireNode neighbor = connection.wire;
-
-				if (neighbor.searched) {
-					return;
-				}
-
-				discover(neighbor);
-				findPower(neighbor, false);
-
-				// If power from neighboring wires has decreased, check for power
-				// from non-wire components so as to determine how low power can
-				// fall.
-				if (neighbor.virtualPower < neighbor.currentPower) {
-					findExternalPower(neighbor);
-				}
-
-				if (needsUpdate(neighbor)) {
-					search(neighbor, false, connection.iDir);
-				}
-			}, wire.iFlowDir);
-		}
-	}
-
-	/**
-	 * Depower all wires in the network so that power can be spread from the power
-	 * sources.
-	 */
-	private void depowerNetwork() {
-		while (!search.isEmpty()) {
-			WireNode wire = search.poll();
-			findPower(wire, true);
-
-			if (wire.root || wire.removed || wire.shouldBreak || wire.virtualPower > POWER_MIN) {
-				queueWire(wire);
-			} else {
-				// Wires that do not receive any power do not queue power changes
-				// until they are offered power from a neighboring wire. To ensure
-				// that they accept any power from neighboring wires and thus queue
-				// their power changes, their virtual power is set to below the
-				// minimum.
-				wire.virtualPower--;
-			}
-		}
-	}
-
-	/**
-	 * Work through the update queue, setting the new power level of each wire, then
-	 * queueing updates to connected wires and neighboring blocks.
-	 */
-	private void powerNetwork() {
-		// If an instantaneous update chain causes updates to another network
-		// (or the same network in another place), new power changes will be
-		// integrated into the already ongoing power queue, so we can exit early
-		// here.
-		if (updating) {
-			return;
-		}
-
-		updating = true;
-
-		while (!updates.isEmpty()) {
-			Node node = updates.poll();
-
-			if (node.isWire()) {
-				WireNode wire = node.asWire();
-
-				if (!needsUpdate(wire)) {
-					continue;
-				}
-
-				findPowerFlow(wire);
-				transmitPower(wire);
-
-				if (wire.setPower()) {
-					queueNeighbors(wire);
-				}
-			} else {
-				WireNode neighborWire = node.neighborWire;
-
-				if (neighborWire != null) {
-					updateBlock(node, neighborWire.state.getBlock());
-				}
-			}
-		}
-
-		updating = false;
-	}
-
-	/**
-	 * Use the information of incoming power flow to determine the direction of
-	 * power flow through this wire. If that flow is ambiguous, try to use a flow
-	 * direction based on connections to neighboring wires. If that is also
-	 * ambiguous, use the backup value that was set when the wire was first added to
-	 * the network.
-	 */
-	private void findPowerFlow(WireNode wire) {
-		int flow = FLOW_IN_TO_FLOW_OUT[wire.flowIn];
-
-		if (flow >= 0) {
-			wire.iFlowDir = flow;
-		} else if (wire.connections.iFlowDir >= 0) {
-			wire.iFlowDir = wire.connections.iFlowDir;
-		}
-	}
-
-	/**
-	 * Transmit power from the given wire to neighboring wires and queue updates to
-	 * those wires.
-	 */
-	private void transmitPower(WireNode wire) {
-		wire.connections.forEach(connection -> {
-			if (!connection.offer) {
-				return;
-			}
-
-			WireNode neighbor = connection.wire;
-
-			int power = Math.max(POWER_MIN, wire.virtualPower - POWER_STEP);
-			int iDir = connection.iDir;
-
-			if (neighbor.offerPower(power, iDir)) {
-				queueWire(neighbor);
-			}
-		}, wire.iFlowDir);
-	}
-
-	/**
-	 * Queue block updates to nodes around the given wire.
-	 */
-	private void queueNeighbors(WireNode wire) {
-		forEachNeighbor(wire, neighbor -> {
-			queueNeighbor(neighbor, wire);
-		});
-	}
-
-	/**
-	 * Queue the given node for an update from the given neighboring wire.
-	 */
-	private void queueNeighbor(Node node, WireNode neighborWire) {
-		// Updates to wires are queued when power is transmitted.
-		if (!node.isWire()) {
-			node.neighborWire = neighborWire;
-			updates.offer(node);
-		}
-	}
-
-	/**
-	 * Queue the given wire for a power change. If the wire does not need a power
-	 * change (perhaps because its power has already changed), transmit power to
-	 * neighboring wires.
-	 */
-	private void queueWire(WireNode wire) {
-		if (needsUpdate(wire)) {
-			updates.offer(wire);
-		} else {
-			findPowerFlow(wire);
-			transmitPower(wire);
-		}
-	}
-
-	/**
-	 * Emit a block update to the given node.
-	 */
-	private void updateBlock(Node node, Block<?> neighborBlock) {
-		TilePos pos = node.pos;
-		BlockState state = WorldHelper.getBlockState(world, pos);
-
-		// While this check makes sure wires in the network are not given block
-		// updates, it also prevents block updates to wires in neighboring networks.
-		// While this should not make a difference in theory, in practice, it is
-		// possible to force a network into an invalid state without updating it, even
-		// if it is relatively obscure.
-		// While I was willing to make this compromise in return for some significant
-		// performance gains in certain setups, if you are not, you can add all the
-		// positions of the network to a set and filter out block updates to wires in
-		// the network that way.
-		if (!state.isAir() && !state.is(Blocks.WIRE_REDSTONE)) {
-			state.neighborChanged(world, pos, neighborBlock);
-		}
-	}
-
-	@FunctionalInterface
-	public static interface NodeProvider {
-
-		public Node getNeighbor(Node node, int iDir);
-
-	}
+        }
+    }
+
+    /**
+     * Search through the network for wires that are in an invalid state and need
+     * power changes. These wires are added to the end of the queue, so that their
+     * neighbors can be searched next.
+     */
+    private void searchNetwork() {
+        for (WireNode wire : this.search) {
+            // The order in which wires are searched will influence the order in
+            // which they update their power levels.
+            wire.connections.forEach(connection -> {
+                if (!connection.offer) {
+                    return;
+                }
+
+                WireNode neighbor = connection.wire;
+
+                if (neighbor.searched) {
+                    return;
+                }
+
+                discover(neighbor);
+                findPower(neighbor, false);
+
+                // If power from neighboring wires has decreased, check for power
+                // from non-wire components so as to determine how low power can
+                // fall.
+                if (neighbor.virtualPower < neighbor.currentPower) {
+                    findExternalPower(neighbor);
+                }
+
+                if (needsUpdate(neighbor)) {
+                    search(neighbor, false, connection.iDir);
+                }
+            }, wire.iFlowDir);
+        }
+    }
+
+    /**
+     * Depower all wires in the network so that power can be spread from the power
+     * sources.
+     */
+    private void depowerNetwork() {
+        while (!this.search.isEmpty()) {
+            WireNode wire = this.search.poll();
+            findPower(wire, true);
+
+            if (wire.root || wire.removed || wire.shouldBreak || wire.virtualPower > POWER_MIN) {
+                queueWire(wire);
+            } else {
+                // Wires that do not receive any power do not queue power changes
+                // until they are offered power from a neighboring wire. To ensure
+                // that they accept any power from neighboring wires and thus queue
+                // their power changes, their virtual power is set to below the
+                // minimum.
+                wire.virtualPower--;
+            }
+        }
+    }
+
+    /**
+     * Work through the update queue, setting the new power level of each wire, then
+     * queueing updates to connected wires and neighboring blocks.
+     */
+    private void powerNetwork() {
+        // If an instantaneous update chain causes updates to another network
+        // (or the same network in another place), new power changes will be
+        // integrated into the already ongoing power queue, so we can exit early
+        // here.
+        if (this.updating) {
+            return;
+        }
+
+        this.updating = true;
+
+        while (!this.updates.isEmpty()) {
+            Node node = this.updates.poll();
+
+            if (node.isWire()) {
+                WireNode wire = node.asWire();
+
+                if (!needsUpdate(wire)) {
+                    continue;
+                }
+
+                findPowerFlow(wire);
+                transmitPower(wire);
+
+                if (wire.setPower()) {
+                    queueNeighbors(wire);
+                }
+            } else {
+                WireNode neighborWire = node.neighborWire;
+
+                if (neighborWire != null) {
+                    updateBlock(node, neighborWire.state.getBlock());
+                }
+            }
+        }
+
+        this.updating = false;
+    }
+
+    /**
+     * Use the information of incoming power flow to determine the direction of
+     * power flow through this wire. If that flow is ambiguous, try to use a flow
+     * direction based on connections to neighboring wires. If that is also
+     * ambiguous, use the backup value that was set when the wire was first added to
+     * the network.
+     */
+    private void findPowerFlow(WireNode wire) {
+        int flow = FLOW_IN_TO_FLOW_OUT[wire.flowIn];
+
+        if (flow >= 0) {
+            wire.iFlowDir = flow;
+        } else if (wire.connections.iFlowDir >= 0) {
+            wire.iFlowDir = wire.connections.iFlowDir;
+        }
+    }
+
+    /**
+     * Transmit power from the given wire to neighboring wires and queue updates to
+     * those wires.
+     */
+    private void transmitPower(WireNode wire) {
+        wire.connections.forEach(connection -> {
+            if (!connection.offer) {
+                return;
+            }
+
+            WireNode neighbor = connection.wire;
+
+            int power = Math.max(POWER_MIN, wire.virtualPower - POWER_STEP);
+            int iDir = connection.iDir;
+
+            if (neighbor.offerPower(power, iDir)) {
+                queueWire(neighbor);
+            }
+        }, wire.iFlowDir);
+    }
+
+    /**
+     * Queue block updates to nodes around the given wire.
+     */
+    private void queueNeighbors(WireNode wire) {
+        forEachNeighbor(wire, neighbor -> {
+            queueNeighbor(neighbor, wire);
+        });
+    }
+
+    /**
+     * Queue the given node for an update from the given neighboring wire.
+     */
+    private void queueNeighbor(Node node, WireNode neighborWire) {
+        // Updates to wires are queued when power is transmitted.
+        if (!node.isWire()) {
+            node.neighborWire = neighborWire;
+            this.updates.offer(node);
+        }
+    }
+
+    /**
+     * Queue the given wire for a power change. If the wire does not need a power
+     * change (perhaps because its power has already changed), transmit power to
+     * neighboring wires.
+     */
+    private void queueWire(WireNode wire) {
+        if (needsUpdate(wire)) {
+            this.updates.offer(wire);
+        } else {
+            findPowerFlow(wire);
+            transmitPower(wire);
+        }
+    }
+
+    /**
+     * Emit a block update to the given node.
+     */
+    private void updateBlock(Node node, Block<?> neighborBlock) {
+        TilePos pos = node.pos;
+        BlockState state = WorldHelper.getBlockState(this.world, pos);
+
+        // While this check makes sure wires in the network are not given block
+        // updates, it also prevents block updates to wires in neighboring networks.
+        // While this should not make a difference in theory, in practice, it is
+        // possible to force a network into an invalid state without updating it, even
+        // if it is relatively obscure.
+        // While I was willing to make this compromise in return for some significant
+        // performance gains in certain setups, if you are not, you can add all the
+        // positions of the network to a set and filter out block updates to wires in
+        // the network that way.
+        if (!state.isAir() && !state.is(Blocks.WIRE_REDSTONE)) {
+            state.neighborChanged(this.world, pos, neighborBlock);
+        }
+    }
+
+    @FunctionalInterface
+    public interface NodeProvider {
+
+        Node getNeighbor(Node node, int iDir);
+
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/current/wire/WireNode.java b/game/core/src/main/java/net/minecraft/core/current/wire/WireNode.java
index 13348b8c1..cca46b4a4 100644
--- a/game/core/src/main/java/net/minecraft/core/current/wire/WireNode.java
+++ b/game/core/src/main/java/net/minecraft/core/current/wire/WireNode.java
@@ -7,6 +7,7 @@ import net.minecraft.core.current.util.BlockState;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.slf4j.Logger;
 
 /**
@@ -17,110 +18,110 @@ import org.slf4j.Logger;
  * @author Space Walker
  */
 class WireNode extends Node {
-	private static final Logger LOGGER = LogUtils.getLogger();
-
-	final WireConnectionManager connections;
-
-	/** The power level this wire currently holds in the world. */
-	int currentPower;
-	/**
-	 * While calculating power changes for a network, this field is used to keep
-	 * track of the power level this wire should have.
-	 */
-	int virtualPower;
-	/** The power level received from non-wire components. */
-	int externalPower;
-	int direction;
-	/**
-	 * A 4-bit number that keeps track of the power flow of the wires that give this
-	 * wire its power level.
-	 */
-	int flowIn;
-	/** The direction of power flow, based on the incoming flow. */
-	int iFlowDir;
-	boolean added;
-	boolean removed;
-	boolean shouldBreak;
-	boolean root;
-	boolean discovered;
-	boolean searched;
-
-	/** The next wire in the simple queue. */
-	WireNode next_wire;
-
-	WireNode(World world, TilePos pos, BlockState state) {
-		super(world);
-
-		this.pos = pos;
-		this.state = state;
-
-		this.connections = new WireConnectionManager(this);
-
-		this.virtualPower = this.currentPower = this.state.get() & BlockLogicWireRedstone.MASK_POWER;
-		this.direction = this.state.get() & BlockLogicWireRedstone.MASK_DIRECTION;
-		this.priority = priority();
-	}
-
-	@Override
-	Node set(TilePos pos, BlockState state, boolean clearNeighbors) {
-		throw new UnsupportedOperationException("Cannot update a WireNode!");
-	}
-
-	@Override
-	int priority() {
-		return MathHelper.clamp(virtualPower, BlockLogicWireRedstone.SIGNAL_MIN, BlockLogicWireRedstone.SIGNAL_MAX);
-	}
-
-	@Override
-	public boolean isWire() {
-		return true;
-	}
-
-	@Override
-	public WireNode asWire() {
-		return this;
-	}
-
-	boolean offerPower(int power, int iDir) {
-		if (removed || shouldBreak) {
-			return false;
-		}
-		if (power == virtualPower) {
-			flowIn |= (1 << iDir);
-			return false;
-		}
-		if (power > virtualPower) {
-			virtualPower = power;
-			flowIn = (1 << iDir);
-
-			return true;
-		}
-
-		return false;
-	}
-
-	boolean setPower() {
-		if (removed) {
-			return true;
-		}
-
-		state = WorldHelper.getBlockState(world, pos);
-
-		if (!state.is(Blocks.WIRE_REDSTONE)) {
-			LOGGER.warn("Tried to update power of non redstone dust! This should never happen!", new RuntimeException());
-			return false; // we should never get here
-		}
-
-		if (shouldBreak) {
-			state.dropItems(world, pos);
-			world.setBlockId(pos, 0);
-
-			return true;
-		}
-
-		currentPower = MathHelper.clamp(virtualPower, BlockLogicWireRedstone.SIGNAL_MIN, BlockLogicWireRedstone.SIGNAL_MAX);
-		state = state.set(currentPower | direction);
-
-		return WorldHelper.setWireState(world, pos, state);
-	}
+    private static final Logger LOGGER = LogUtils.getLogger();
+
+    final WireConnectionManager connections;
+
+    /** The power level this wire currently holds in the world. */
+    int currentPower;
+    /**
+     * While calculating power changes for a network, this field is used to keep
+     * track of the power level this wire should have.
+     */
+    int virtualPower;
+    /** The power level received from non-wire components. */
+    int externalPower;
+    int direction;
+    /**
+     * A 4-bit number that keeps track of the power flow of the wires that give this
+     * wire its power level.
+     */
+    int flowIn;
+    /** The direction of power flow, based on the incoming flow. */
+    int iFlowDir;
+    boolean added;
+    boolean removed;
+    boolean shouldBreak;
+    boolean root;
+    boolean discovered;
+    boolean searched;
+
+    /** The next wire in the simple queue. */
+    WireNode next_wire;
+
+    WireNode(World world, TilePosc pos, BlockState state) {
+        super(world);
+
+        this.pos = new TilePos(pos);
+        this.state = state;
+
+        this.connections = new WireConnectionManager(this);
+
+        this.virtualPower = this.currentPower = this.state.get() & BlockLogicWireRedstone.MASK_POWER;
+        this.direction = this.state.get() & BlockLogicWireRedstone.MASK_DIRECTION;
+        this.priority = priority();
+    }
+
+    @Override
+    Node set(TilePosc pos, BlockState state, boolean clearNeighbors) {
+        throw new UnsupportedOperationException("Cannot update a WireNode!");
+    }
+
+    @Override
+    int priority() {
+        return MathHelper.clamp(this.virtualPower, BlockLogicWireRedstone.SIGNAL_MIN, BlockLogicWireRedstone.SIGNAL_MAX);
+    }
+
+    @Override
+    public boolean isWire() {
+        return true;
+    }
+
+    @Override
+    public WireNode asWire() {
+        return this;
+    }
+
+    boolean offerPower(int power, int iDir) {
+        if (this.removed || this.shouldBreak) {
+            return false;
+        }
+        if (power == this.virtualPower) {
+            this.flowIn |= (1 << iDir);
+            return false;
+        }
+        if (power > this.virtualPower) {
+            this.virtualPower = power;
+            this.flowIn = (1 << iDir);
+
+            return true;
+        }
+
+        return false;
+    }
+
+    boolean setPower() {
+        if (this.removed) {
+            return true;
+        }
+
+        this.state = WorldHelper.getBlockState(this.world, this.pos);
+
+        if (!this.state.is(Blocks.WIRE_REDSTONE)) {
+            LOGGER.warn("Tried to update power of non redstone dust! This should never happen!", new RuntimeException());
+            return false; // we should never get here
+        }
+
+        if (this.shouldBreak) {
+            this.state.dropItems(this.world, this.pos);
+            this.world.setBlockId(this.pos, 0);
+
+            return true;
+        }
+
+        this.currentPower = MathHelper.clamp(this.virtualPower, BlockLogicWireRedstone.SIGNAL_MIN, BlockLogicWireRedstone.SIGNAL_MAX);
+        this.state = this.state.set(this.currentPower | this.direction);
+
+        return WorldHelper.setWireState(this.world, this.pos, this.state);
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/current/wire/WorldHelper.java b/game/core/src/main/java/net/minecraft/core/current/wire/WorldHelper.java
index ff46f74a4..722ce72e7 100644
--- a/game/core/src/main/java/net/minecraft/core/current/wire/WorldHelper.java
+++ b/game/core/src/main/java/net/minecraft/core/current/wire/WorldHelper.java
@@ -3,57 +3,59 @@ package net.minecraft.core.current.wire;
 import net.minecraft.core.current.util.BlockState;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.jetbrains.annotations.NotNull;
 
 class WorldHelper {
 
-	private static final int Y_MIN = 0;
+    private static final int Y_MIN = 0;
 
-	static BlockState getBlockState(World world, TilePos pos) {
-		if (pos.y < Y_MIN || pos.y >= world.getHeightBlocks()) {
-			return BlockState.AIR;
-		}
+    static @NotNull BlockState getBlockState(@NotNull World world, @NotNull TilePosc pos) {
+        if (pos.y() < Y_MIN || pos.y() >= world.getHeightBlocks()) {
+            return BlockState.AIR;
+        }
 
-		int blockId = world.getBlockId(pos.x, pos.y, pos.z);
+        int blockId = world.getBlockId(pos);
 
-		if (blockId == 0) {
-			return BlockState.AIR;
-		}
+        if (blockId == 0) {
+            return BlockState.AIR;
+        }
 
-		return new BlockState(blockId, world.getBlockMetadata(pos.x, pos.y, pos.z));
-	}
+        return new BlockState(blockId, world.getBlockData(pos));
+    }
 
-	/**
-	 * An optimized version of {@link net.minecraft.world.World#setBlockState
-	 * World.setBlockState}. Since this method is only used to update redstone wire block
-	 * states, lighting checks, height map updates, and block entity updates are
-	 * omitted.
-	 */
-	static boolean setWireState(World world, TilePos pos, BlockState state) {
-		if (pos.y < Y_MIN || pos.y >= world.getHeightBlocks()) {
-			return false;
-		}
+    /**
+     * An optimized version of {@link net.minecraft.world.World#setBlockState
+     * World.setBlockState}. Since this method is only used to update redstone wire block
+     * states, lighting checks, height map updates, and block entity updates are
+     * omitted.
+     */
+    static boolean setWireState(@NotNull World world, @NotNull TilePos pos, @NotNull BlockState state) {
+        if (pos.y < Y_MIN || pos.y >= world.getHeightBlocks()) {
+            return false;
+        }
 
-		int blockId = state.getBlockId();
-		int prevBlockId = world.getBlockId(pos.x, pos.y, pos.z);
+        int blockId = state.getBlockId();
+        int prevBlockId = world.getBlockId(pos);
 
-		if (blockId != prevBlockId) {
-			return false;
-		}
+        if (blockId != prevBlockId) {
+            return false;
+        }
 
-		int metadata = state.get();
-		int prevMetadata = world.getBlockMetadata(pos.x, pos.y, pos.z);
+        int metadata = state.get();
+        int prevMetadata = world.getBlockData(pos);
 
-		if (metadata == prevMetadata) {
-			return false;
-		}
+        if (metadata == prevMetadata) {
+            return false;
+        }
 
-		world.setBlockMetadata(pos.x, pos.y, pos.z, metadata);
+        world.setBlockData(pos, metadata);
 
-		// notify clients of the BlockState change
-		world.notifyBlockChange(pos.x, pos.y, pos.z, blockId);
-		// mark the chunk for saving
-		world.markBlockDirty(pos.x, pos.y, pos.z);
+        // notify clients of the BlockState change
+        world.notifyBlockChange(pos, blockId);
+        // mark the chunk for saving
+        world.markBlockDirty(pos);
 
-		return true;
-	}
+        return true;
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/Entity.java b/game/core/src/main/java/net/minecraft/core/entity/Entity.java
index 3800df8cf..b59005a58 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/Entity.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/Entity.java
@@ -5,6 +5,7 @@ import java.util.Random;
 
 import net.minecraft.core.block.BlockLogicFluid;
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.animal.MobPig;
 import net.minecraft.core.entity.vehicle.EntityBoat;
 import net.minecraft.core.block.piston.BlockLogicPistonHead;
@@ -32,17 +33,15 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.IVehicle;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.data.SynchedEntityData;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public abstract class Entity
-    implements IVehicle
-{
-    private static @NotNull AABB DEFAULT_AABB = AABB.fromPool(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
-
+    implements IVehicle {
     public static final int DATA_SHARED_FLAGS_ID = 0;
     public static final int FLAG_ONFIRE = 0;
     public static final int FLAG_SNEAKING = 1;
@@ -70,7 +69,7 @@ public abstract class Entity
     public float xRotO;
     public float pushTime;
     public int pushesThisTick;
-    public final @NotNull AABB bb = Entity.DEFAULT_AABB.copyUnpooled();
+    public final @NotNull AABBd bb = new AABBd();
     public boolean onGround = false;
     public boolean horizontalCollision;
     public boolean verticalCollision;
@@ -124,86 +123,69 @@ public abstract class Entity
     public boolean turnWithVehicle = true;
 
     public Entity(final @NotNull World world) {
-        assert world != null : "Entity world must not be null! If no world ref available try using WorldClient.EMPTY_WORLD as a stub!";
         this.world = world;
         setPos(0.0D, 0.0D, 0.0D);
-        entityData.define(DATA_SHARED_FLAGS_ID, (byte) 0, Byte.class);
+        this.entityData.define(DATA_SHARED_FLAGS_ID, (byte) 0, Byte.class);
         defineSynchedData();
     }
 
     protected abstract void defineSynchedData();
 
-    public void spawnInit()
-    {
+    public void spawnInit() {
     }
 
-    public @NotNull SynchedEntityData getEntityData()
-    {
-        return entityData;
+    public @NotNull SynchedEntityData getEntityData() {
+        return this.entityData;
     }
 
     @Override
-	public boolean equals(@Nullable Object that)
-    {
-        if(that instanceof Entity)
-        {
-            return ((Entity)that).id == id;
-        }
-        else
-        {
+    public boolean equals(@Nullable Object that) {
+        if (that instanceof Entity) {
+            return ((Entity) that).id == this.id;
+        } else {
             return false;
         }
     }
 
     @Override
-    public int hashCode()
-    {
-        return id;
+    public int hashCode() {
+        return this.id;
     }
 
-    protected void resetPos()
-    {
-        do
-        {
-            if(y <= 0.0D)
-            {
+    protected void resetPos() {
+        do {
+            if (this.y <= 0.0D) {
                 break;
             }
-            setPos(x, y, z);
-            if(world.getCubes(this, bb).isEmpty())
-            {
+            setPos(this.x, this.y, this.z);
+            if (this.world.getCubes(this, this.bb).isEmpty()) {
                 break;
             }
-            y++;
-        } while(true);
-        xd = yd = zd = 0.0D;
-        xRot = 0.0F;
+            this.y++;
+        } while (true);
+        this.xd = this.yd = this.zd = 0.0D;
+        this.xRot = 0.0F;
     }
 
-    public void remove()
-    {
-        removed = true;
+    public void remove() {
+        this.removed = true;
     }
 
-    public boolean showBoundingBoxOnHover()
-    {
+    public boolean showBoundingBoxOnHover() {
         return false;
     }
 
-    protected final void setSize(float width, float height)
-    {
+    protected final void setSize(float width, float height) {
         this.bbWidth = width;
         this.bbHeight = height;
     }
 
-    public final void setRot(float yRot, float xRot)
-    {
+    public final void setRot(float yRot, float xRot) {
         this.yRot = yRot % 360F;
         this.xRot = xRot % 360F;
     }
 
-    public void setPos(final double x, final double y, final double z)
-    {
+    public void setPos(final double x, final double y, final double z) {
         this.x = x;
         this.y = y;
         this.z = z;
@@ -213,56 +195,51 @@ public abstract class Entity
     public void setBounds() {
         final double center = this.bbWidth / 2.0d;
         final double heightOfMob = this.bbHeight;
-        this.bb.set(
-            x - center,
-            (y - (double) this.heightOffset) + (double) this.ySlideOffset,
-            z - center,
-            x + center,
-            (y - (double) this.heightOffset) + (double) this.ySlideOffset + heightOfMob,
-            z + center);
+        this.bb.setMin(
+            this.x - center,
+            (this.y - (double) this.heightOffset) + (double) this.ySlideOffset,
+            this.z - center);
+        this.bb.setMax(
+            this.x + center,
+            (this.y - (double) this.heightOffset) + (double) this.ySlideOffset + heightOfMob,
+            this.z + center);
     }
 
-    public void interpolateTurn(float yRot, float xRot)
-    {
+    public void interpolateTurn(float yRot, float xRot) {
         float xRotCurrent = this.xRot;
         float yRotCurrent = this.yRot;
-        this.yRot += (double)yRot * 0.15D;
-        this.xRot -= (double)xRot * 0.15D;
-        if(this.xRot < -90F)
-        {
+        this.yRot += (double) yRot * 0.15D;
+        this.xRot -= (double) xRot * 0.15D;
+        if (this.xRot < -90F) {
             this.xRot = -90F;
         }
-        if(this.xRot > 90F)
-        {
+        if (this.xRot > 90F) {
             this.xRot = 90F;
         }
-        xRotO += this.xRot - xRotCurrent;
-        yRotO += this.yRot - yRotCurrent;
+        this.xRotO += this.xRot - xRotCurrent;
+        this.yRotO += this.yRot - yRotCurrent;
     }
 
-    public void tick()
-    {
+    public void tick() {
         baseTick();
     }
 
-    public void baseTick()
-    {
-        pushesThisTick = 0;
-        pushTime *= 0.98f;
-        if (pushTime < 0.001f){
-            pushTime = 0;
-        }
-        if(vehicle != null && vehicle.isRemoved())
-        {
-            vehicle = null;
-        }
-        tickCount++;
-        walkDistO = walkDist;
-        xo = x;
-        yo = y;
-        zo = z;
-        xRotO = xRot;
-        yRotO = yRot;
+    public void baseTick() {
+        this.pushesThisTick = 0;
+        this.pushTime *= 0.98f;
+        if (this.pushTime < 0.001f) {
+            this.pushTime = 0;
+        }
+        if (this.vehicle != null && this.vehicle.isRemoved()) {
+            this.vehicle = null;
+        }
+        this.tickCount++;
+        this.walkDistO = this.walkDist;
+        this.xo = this.x;
+        this.yo = this.y;
+        this.zo = this.z;
+        this.xRotO = this.xRot;
+        this.yRotO = this.yRot;
         // Removed at jonks request, should work though if it ever wants to be uncommented
 //        if (isSprinting())
 //        {
@@ -286,158 +263,132 @@ public abstract class Entity
 
         checkOnWater(true);
 
-        if(world.isClientSide)
-        {
-            remainingFireTicks = 0;
-        }
-        else if (remainingFireTicks > 0)
-        {
-            if (fireImmune)
-            {
-                remainingFireTicks -= 4;
-                if (remainingFireTicks < 0)
-                {
-                    remainingFireTicks = 0;
+        if (this.world.isClientSide) {
+            this.remainingFireTicks = 0;
+        } else if (this.remainingFireTicks > 0) {
+            if (this.fireImmune) {
+                this.remainingFireTicks -= 4;
+                if (this.remainingFireTicks < 0) {
+                    this.remainingFireTicks = 0;
                 }
-            }
-            else
-            {
-                if (remainingFireTicks % 20 == 0)
-                {
+            } else {
+                if (this.remainingFireTicks % 20 == 0) {
                     hurt(null, 1, DamageType.FIRE);
                 }
-                remainingFireTicks--;
+                this.remainingFireTicks--;
             }
         }
-        if (soundCooldown > 0){
-            soundCooldown--;
+        if (this.soundCooldown > 0) {
+            this.soundCooldown--;
         }
 
-        if (isInLava())
-        {
+        if (isInLava()) {
             lavaHurt();
         }
-        if (isInWater())
-        {
+        if (isInWater()) {
             waterHurt();
         }
 
-        if (y < -64D)
-        {
+        if (this.y < -64D) {
             outOfWorld();
         }
 
-        if (!world.isClientSide)
-        {
-            setSharedFlag(FLAG_ONFIRE, remainingFireTicks > 0);
-            setSharedFlag(FLAG_RIDING, vehicle != null);
+        if (!this.world.isClientSide) {
+            setSharedFlag(FLAG_ONFIRE, this.remainingFireTicks > 0);
+            setSharedFlag(FLAG_RIDING, this.vehicle != null);
         }
 
-        firstTick = false;
+        this.firstTick = false;
     }
+
     protected void checkOnWater(boolean addVelocity) {
-        if (checkAndHandleWater(addVelocity))
-        {
-            if(!wasInWater && !firstTick)
-            {
-                float f = MathHelper.sqrt(xd * xd * 0.2D + yd * yd + zd * zd * 0.2D) * 0.2F;
-                if(f > 1.0F)
-                {
+        if (checkAndHandleWater(addVelocity)) {
+            if (!this.wasInWater && !this.firstTick) {
+                float f = MathHelper.sqrt(this.xd * this.xd * 0.2D + this.yd * this.yd + this.zd * this.zd * 0.2D) * 0.2F;
+                if (f > 1.0F) {
                     f = 1.0F;
                 }
 
-                if (!Global.isServer){
-                    world.playSoundAtEntity(null, this, "random.splash", f, 1.0F + (random.nextFloat() - random.nextFloat()) * 0.4F);
+                if (!Global.isServer) {
+                    this.world.playSoundAtEntity(null, this, "random.splash", f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
                 } else {
-                    if(!world.isClientSide && soundCooldown == 0) {
-                        soundCooldown = 2;
-                        world.playSoundAtEntity(this, this, "random.splash", f, 1.0F + (random.nextFloat() - random.nextFloat()) * 0.4F);
+                    if (!this.world.isClientSide && this.soundCooldown == 0) {
+                        this.soundCooldown = 2;
+                        this.world.playSoundAtEntity(this, this, "random.splash", f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
                     }
                 }
-                
-                float f1 = MathHelper.floor(bb.minY);
-                for(int i = 0; (float)i < 1.0F + bbWidth * 20F; i++)
-                {
-                    double offX = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                    double offZ = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                    world.spawnParticle("bubble", x + offX, f1 + 1.0F, z + offZ, xd, yd - (double)(random.nextFloat() * 0.2F), zd, 0);
+
+                float f1 = MathHelper.floor(this.bb.minY);
+                for (int i = 0; (float) i < 1.0F + this.bbWidth * 20F; i++) {
+                    double offX = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                    double offZ = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                    this.world.spawnParticle("bubble", this.x + offX, f1 + 1.0F, this.z + offZ, this.xd, this.yd - (double) (this.random.nextFloat() * 0.2F), this.zd, 0);
                 }
 
-                for(int j = 0; (float)j < 1.0F + bbWidth * 20F; j++)
-                {
-                    double offX = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                    double offZ = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                    world.spawnParticle("splash", x + offX, f1 + 1.0F, z + offZ, xd, yd, zd, 0);
+                for (int j = 0; (float) j < 1.0F + this.bbWidth * 20F; j++) {
+                    double offX = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                    double offZ = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                    this.world.spawnParticle("splash", this.x + offX, f1 + 1.0F, this.z + offZ, this.xd, this.yd, this.zd, 0);
                 }
             }
-            fallDistance = 0.0F;
-            wasInWater = true;
-            remainingFireTicks = 0;
-        }
-        else
-        {
-            wasInWater = false;
+            this.fallDistance = 0.0F;
+            this.wasInWater = true;
+            this.remainingFireTicks = 0;
+        } else {
+            this.wasInWater = false;
         }
     }
 
     public void waterHurt() {
-        if (world.dimension == Dimension.NETHER && !(vehicle instanceof EntityBoat)) {
+        if (this.world.dimension == Dimension.NETHER && !(this.vehicle instanceof EntityBoat)) {
             hurt(null, 1, DamageType.FIRE);
         }
     }
 
-    public void lavaHurt()
-    {
-        if(!fireImmune)
-        {
+    public void lavaHurt() {
+        if (!this.fireImmune) {
             hurt(null, 4, DamageType.FIRE);
-            remainingFireTicks = 600;
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = 600;
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
 
-    public void fireHurt()
-    {
-        if(!fireImmune)
-        {
+    public void fireHurt() {
+        if (!this.fireImmune) {
             hurt(null, 1, DamageType.FIRE);
-            remainingFireTicks = 300;
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = 300;
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
 
-    public void outOfWorld()
-    {
+    public void outOfWorld() {
         remove();
     }
 
-    public boolean isFree(double x, double y, double z)
-    {
-        AABB offsetBb = bb.cloneMove(x, y, z).grow(-0.01, -0.01, -0.01);
-        List<AABB> list = world.getCubes(this, offsetBb);
-        if(!list.isEmpty())
-        {
+    public boolean isFree(double x, double y, double z) {
+        AABBd offsetBb = new AABBd();
+        MathHelper.aabbGrow(this.bb.translate(x, y, z, offsetBb), -0.01, -0.01, -0.01, offsetBb);
+
+        List<AABBdc> list = this.world.getCubes(this, offsetBb);
+        if (!list.isEmpty()) {
             return false;
         }
-        return !world.getIsAnyLiquid(offsetBb);
+        return !this.world.getIsAnyLiquid(offsetBb);
     }
 
-    public void move(double xd, double yd, double zd)
-    {
-        if(noPhysics)
-        {
-        	onGround = false;
-            bb.move(xd, yd, zd);
-            this.x = (bb.minX + bb.maxX) / 2.0;
-            this.y = (bb.minY + heightOffset) - ySlideOffset;
-            this.z = (bb.minZ + bb.maxZ) / 2.0;
+    public void move(double xd, double yd, double zd) {
+        if (this.noPhysics) {
+            this.onGround = false;
+            this.bb.translate(xd, yd, zd);
+            this.x = (this.bb.minX + this.bb.maxX) / 2.0;
+            this.y = (this.bb.minY + this.heightOffset) - this.ySlideOffset;
+            this.z = (this.bb.minZ + this.bb.maxZ) / 2.0;
             return;
         }
-        ySlideOffset *= 0.4f;
+        this.ySlideOffset *= 0.4f;
         double d3 = this.x;
         double d4 = this.z;
-        if(stuckInCobweb)
-        {
+        if (this.stuckInCobweb) {
             // Restricts all movement
             xd *= 0.25;
             this.xd = 0.0;
@@ -448,10 +399,9 @@ public abstract class Entity
             // Cancels the player's jump
             this.yd = 0.0;
 
-            stuckInCobweb = false;
+            this.stuckInCobweb = false;
         }
-        if(stuckInSpikes)
-        {
+        if (this.stuckInSpikes) {
             // Restricts all horizontal movement
             xd *= 0.25;
             this.xd = 0.0;
@@ -461,194 +411,194 @@ public abstract class Entity
             // Cancels the player's jump
             this.yd = 0.0;
 
-            stuckInSpikes = false;
+            this.stuckInSpikes = false;
         }
         double oldXd = xd;
         double oldYd = yd;
         double oldZd = zd;
-        AABB bbCopy = bb.copy();
-        
-        double bbWidth = bb.maxX - bb.minX - 0.05;
-        if(isSneaking()) { // Edge safety behavior
-			if(xd != 0.0) {
-				AABB floor = AABB.fromPool(bb.minX, bb.minY - 1.0, bb.minZ, bb.maxX, bb.minY, bb.maxZ).expand(xd, 0.0, 0.0);
-				List<AABB> collidingBoxes = world.getCubes(this, floor);
-				if(!collidingBoxes.isEmpty()) {
-					double limitX = 0.0;
-					for(int i=0; i < collidingBoxes.size(); i++) {
-						AABB bb1 = collidingBoxes.get(i);
-						if(xd < 0.0) {
-							limitX = Math.min(limitX, bb1.minX - bbWidth - bb.minX);
-						}else {
-							limitX = Math.max(limitX, bb1.maxX + bbWidth - bb.maxX);
-						}
-					}
-					if(xd < 0.0) {
-						oldXd = xd = Math.max(xd, limitX);
-					}else {
-						oldXd = xd = Math.min(xd, limitX);
-					}
-				}
-			}
-			if(zd != 0.0) {
-				AABB floor = AABB.fromPool(bb.minX, bb.minY - 1.0, bb.minZ, bb.maxX, bb.minY, bb.maxZ).expand(0.0, 0.0, zd);
-				List<AABB> collidingBoxes = world.getCubes(this, floor);
-				if(!collidingBoxes.isEmpty()) {
-					double limitZ = 0.0;
-					for(int i=0; i < collidingBoxes.size(); i++) {
-						AABB bb1 = collidingBoxes.get(i);
-						if(zd < 0.0) {
-							limitZ = Math.min(limitZ, bb1.minZ - bbWidth - bb.minZ);
-						}else {
-							limitZ = Math.max(limitZ, bb1.maxZ + bbWidth - bb.maxZ);
-						}
-					}
-					if(zd < 0.0) {
-						oldZd = zd = Math.max(zd, limitZ);
-					}else {
-						oldZd = zd = Math.min(zd, limitZ);
-					}
-				}
-			}
-        }
-        
-		List<AABB> cubes = world.getCubes(this, bb.expand(xd, yd, zd));
-		
-		// Check collision on Y Axis
-		for(int i = 0; i < cubes.size(); i++) {
-			yd = cubes.get(i).clipYCollide(bb, yd);
-		}
-
-		bb.move(0.0, yd, 0.0);
-		if(!slide && oldYd != yd) {
-			xd = yd = zd = 0.0;
-		}
-		
-		// Check collision on X Axis
-		for(int i = 0; i < cubes.size(); i++) {
-			xd = cubes.get(i).clipXCollide(bb, xd);
-		}
-
-		bb.move(xd, 0.0D, 0.0D);
-		if(!slide && oldXd != xd) {
-			xd = yd = zd = 0.0;
-		}
-		
-		// Check collision on Z Axis
-		for(int i = 0; i < cubes.size(); i++) {
-			zd = cubes.get(i).clipZCollide(bb, zd);
-		}
-		bb.move(0.0D, 0.0D, zd);
-		if(!slide && oldZd != zd) {
-			xd = yd = zd = 0.0;
-		}
-
-		boolean touchedGround = onGround || oldYd != yd && oldYd < 0.0;
-		boolean touchedWall = oldXd != xd || oldZd != zd;
-		
-		// Handle steps
-		if(footSize > 0.0f && touchedGround && touchedWall && (isSneaking() || ySlideOffset < 0.05f)) {
-			double oldX = xd;
-			double oldY = yd;
-			double oldZ = zd;
-			xd = oldXd;
-			yd = footSize;
-			zd = oldZd;
-			AABB axisalignedbb1 = bb.copy();
-			bb.setBB(bbCopy);
-			cubes = world.getCubes(this, bb.expand(xd, 0.0, zd));
-			for(int i = 0; i < cubes.size(); i++) {
-				yd = cubes.get(i).clipYCollide(bb, yd);
-			}
-
-			bb.move(0.0D, yd, 0.0D);
-			if(!slide && oldYd != yd) {
-				xd = yd = zd = 0.0D;
-			}
-			for(int i = 0; i < cubes.size(); i++) {
-				xd = cubes.get(i).clipXCollide(bb, xd);
-			}
-
-			bb.move(xd, 0.0D, 0.0D);
-			if(!slide && oldXd != xd) {
-				xd = yd = zd = 0.0D;
-			}
-			for(int i = 0; i < cubes.size(); i++) {
-				zd = cubes.get(i).clipZCollide(bb, zd);
-			}
-
-			bb.move(0.0D, 0.0D, zd);
-			if(!slide && oldZd != zd) {
-				xd = yd = zd = 0.0D;
-			}
-			if(!slide && oldYd != yd) {
-				xd = yd = zd = 0.0D;
-			}else {
-				yd = -footSize;
-				for(AABB aabb : cubes) {
-					yd = aabb.clipYCollide(bb, yd);
-				}
-
-				bb.move(0.0D, yd, 0.0D);
-			}
-			cubes = world.getCubes(this, bb);
-			if(oldX * oldX + oldZ * oldZ >= xd * xd + zd * zd || !cubes.isEmpty()) {
-				xd = oldX;
-				yd = oldY;
-				zd = oldZ;
-				bb.setBB(axisalignedbb1);
-			}
-		}
+        AABBd bbCopy = new AABBd(this.bb);
+
+        double bbWidth = this.bb.maxX - this.bb.minX - 0.05;
+        if (isSneaking()) { // Edge safety behavior
+            if (xd != 0.0) {
+                AABBd floor = new AABBd(this.bb.minX, this.bb.minY - 1.0, this.bb.minZ, this.bb.maxX, this.bb.minY, this.bb.maxZ);
+                MathHelper.aabbExpand(floor, xd, 0.0, 0.0, floor);
+                List<AABBdc> collidingBoxes = this.world.getCubes(this, floor);
+                if (!collidingBoxes.isEmpty()) {
+                    double limitX = 0.0;
+                    for (int i = 0; i < collidingBoxes.size(); i++) {
+                        AABBdc bb1 = collidingBoxes.get(i);
+                        if (xd < 0.0) {
+                            limitX = Math.min(limitX, bb1.minX() - bbWidth - this.bb.minX);
+                        } else {
+                            limitX = Math.max(limitX, bb1.maxX() + bbWidth - this.bb.maxX);
+                        }
+                    }
+                    if (xd < 0.0) {
+                        oldXd = xd = Math.max(xd, limitX);
+                    } else {
+                        oldXd = xd = Math.min(xd, limitX);
+                    }
+                }
+            }
+            if (zd != 0.0) {
+                AABBd floor = new AABBd(this.bb.minX, this.bb.minY - 1.0, this.bb.minZ, this.bb.maxX, this.bb.minY, this.bb.maxZ);
+                MathHelper.aabbExpand(floor, 0.0, 0.0, zd, floor);
+                List<AABBdc> collidingBoxes = this.world.getCubes(this, floor);
+                if (!collidingBoxes.isEmpty()) {
+                    double limitZ = 0.0;
+                    for (int i = 0; i < collidingBoxes.size(); i++) {
+                        AABBdc bb1 = collidingBoxes.get(i);
+                        if (zd < 0.0) {
+                            limitZ = Math.min(limitZ, bb1.minZ() - bbWidth - this.bb.minZ);
+                        } else {
+                            limitZ = Math.max(limitZ, bb1.maxZ() + bbWidth - this.bb.maxZ);
+                        }
+                    }
+                    if (zd < 0.0) {
+                        oldZd = zd = Math.max(zd, limitZ);
+                    } else {
+                        oldZd = zd = Math.min(zd, limitZ);
+                    }
+                }
+            }
+        }
+
+        List<AABBdc> cubes = this.world.getCubes(this, MathHelper.aabbExpand(this.bb, xd, yd, zd, new AABBd()));
+
+        // Check collision on Y Axis
+        for (int i = 0; i < cubes.size(); i++) {
+            yd = MathHelper.aabbClipYCollide(cubes.get(i), this.bb, yd);
+        }
+
+        this.bb.translate(0.0, yd, 0.0);
+        if (!this.slide && oldYd != yd) {
+            xd = yd = zd = 0.0;
+        }
+
+        // Check collision on X Axis
+        for (int i = 0; i < cubes.size(); i++) {
+            xd = MathHelper.aabbClipXCollide(cubes.get(i), this.bb, xd);
+        }
+
+        this.bb.translate(xd, 0.0D, 0.0D);
+        if (!this.slide && oldXd != xd) {
+            xd = yd = zd = 0.0;
+        }
+
+        // Check collision on Z Axis
+        for (int i = 0; i < cubes.size(); i++) {
+            zd = MathHelper.aabbClipZCollide(cubes.get(i), this.bb, zd);
+        }
+        this.bb.translate(0.0D, 0.0D, zd);
+        if (!this.slide && oldZd != zd) {
+            xd = yd = zd = 0.0;
+        }
+
+        boolean touchedGround = this.onGround || oldYd != yd && oldYd < 0.0;
+        boolean touchedWall = oldXd != xd || oldZd != zd;
+
+        // Handle steps
+        if (this.footSize > 0.0f && touchedGround && touchedWall && (isSneaking() || this.ySlideOffset < 0.05f)) {
+            double oldX = xd;
+            double oldY = yd;
+            double oldZ = zd;
+            xd = oldXd;
+            yd = this.footSize;
+            zd = oldZd;
+            AABBd aabbCopy = new AABBd(this.bb);
+            this.bb.set(bbCopy);
+            cubes = this.world.getCubes(this, MathHelper.aabbExpand(this.bb, xd, 0.0, zd, new AABBd()));
+            for (int i = 0; i < cubes.size(); i++) {
+                yd = MathHelper.aabbClipYCollide(cubes.get(i), this.bb, yd);
+            }
+
+            this.bb.translate(0.0D, yd, 0.0D);
+            if (!this.slide && oldYd != yd) {
+                xd = yd = zd = 0.0D;
+            }
+            for (int i = 0; i < cubes.size(); i++) {
+                xd = MathHelper.aabbClipXCollide(cubes.get(i), this.bb, xd);
+            }
+
+            this.bb.translate(xd, 0.0D, 0.0D);
+            if (!this.slide && oldXd != xd) {
+                xd = yd = zd = 0.0D;
+            }
+            for (int i = 0; i < cubes.size(); i++) {
+                zd = MathHelper.aabbClipZCollide(cubes.get(i), this.bb, zd);
+            }
+
+            this.bb.translate(0.0D, 0.0D, zd);
+            if (!this.slide && oldZd != zd) {
+                xd = yd = zd = 0.0D;
+            }
+            if (!this.slide && oldYd != yd) {
+                xd = yd = zd = 0.0D;
+            } else {
+                yd = -this.footSize;
+                for (AABBdc aabb : cubes) {
+                    yd = MathHelper.aabbClipYCollide(aabb, this.bb, yd);
+                }
+
+                this.bb.translate(0.0D, yd, 0.0D);
+            }
+            cubes = this.world.getCubes(this, this.bb);
+            if (oldX * oldX + oldZ * oldZ >= xd * xd + zd * zd || !cubes.isEmpty()) {
+                xd = oldX;
+                yd = oldY;
+                zd = oldZ;
+                this.bb.set(aabbCopy);
+            }
+        }
         //fix for entity jitter when blasted by cannonballs (can cause some client-side jitter when entity is under a ceiling. unsure exactly why)
         if (!this.world.isClientSide || this instanceof Player || !(this instanceof Mob)) {
-            this.x = (bb.minX + bb.maxX) / 2D;
-            this.y = (bb.minY + (double) heightOffset) - (double) ySlideOffset;
-            this.z = (bb.minZ + bb.maxZ) / 2D;
-        }
-        horizontalCollision = oldXd != xd || oldZd != zd;
-        verticalCollision = oldYd != yd;
-        onGround = oldYd != yd && oldYd < 0.0D;
-        collision = horizontalCollision || verticalCollision;
+            this.x = (this.bb.minX + this.bb.maxX) / 2D;
+            this.y = (this.bb.minY + (double) this.heightOffset) - (double) this.ySlideOffset;
+            this.z = (this.bb.minZ + this.bb.maxZ) / 2D;
+        }
+        this.horizontalCollision = oldXd != xd || oldZd != zd;
+        this.verticalCollision = oldYd != yd;
+        this.onGround = oldYd != yd && oldYd < 0.0D;
+        this.collision = this.horizontalCollision || this.verticalCollision;
         checkOnWater(false);
-        checkFallDamage(yd, onGround);
-        if(oldXd != xd)
-        {
+        checkFallDamage(yd, this.onGround);
+        if (oldXd != xd) {
             this.xd = 0.0D;
         }
-        if(oldYd != yd)
-        {
+        if (oldYd != yd) {
             this.yd = 0.0D;
         }
-        if(oldZd != zd)
-        {
+        if (oldZd != zd) {
             this.zd = 0.0D;
         }
         double d10 = this.x - d3;
         double d12 = this.z - d4;
-        if(makeStepSound() && !isSneaking() && vehicle == null) {
-            walkDist += (double) MathHelper.sqrt(d10 * d10 + d12 * d12) * 0.6;
-            
+        if (makeStepSound() && !isSneaking() && this.vehicle == null) {
+            this.walkDist += (double) MathHelper.sqrt(d10 * d10 + d12 * d12) * 0.6;
+
             // Tiny bounding box
-            AABB boundingBox = AABB.fromPool(this.x - 0.01, this.bb.minY - 0.01, this.z - 0.01, this.x + 0.01, this.bb.minY + 0.01, this.z + 0.01);
+            AABBdc boundingBox = new AABBd(this.x - 0.01, this.bb.minY - 0.01, this.z - 0.01, this.x + 0.01, this.bb.minY + 0.01, this.z + 0.01);
 
             int blockX = MathHelper.floor(this.x);
-            int blockY = MathHelper.floor(boundingBox.minY);
+            int blockY = MathHelper.floor(boundingBox.minY());
             int blockZ = MathHelper.floor(this.z);
 
             Block<?> blockWalkedOn = null;
 
-            blockCheck: for (int x = blockX - 1; x <= blockX + 1; x++) {
+            blockCheck:
+            for (int x = blockX - 1; x <= blockX + 1; x++) {
                 for (int z = blockZ - 1; z <= blockZ + 1; z++) {
                     for (int y = blockY - 1; y < blockY + 1; y++) {
-                        Block<?> block = world.getBlock(x, y, z);
-                        if(block == null) {
+                        Block<?> block = this.world.getBlock(x, y, z);
+                        if (block == null) {
                             continue;
                         }
 
-                        world.collidingBoundingBoxes.clear();
-                        block.getCollidingBoundingBoxes(world, x, y, z, boundingBox, world.collidingBoundingBoxes);
+                        this.world.collidingBoundingBoxes.clear();
+                        block.getCollidingBoundingBoxes(this.world, x, y, z, boundingBox, this.world.collidingBoundingBoxes);
 
-                        if(!world.collidingBoundingBoxes.isEmpty()) {
+                        if (!this.world.collidingBoundingBoxes.isEmpty()) {
                             blockWalkedOn = block;
                             blockX = x;
                             blockY = y;
@@ -658,46 +608,41 @@ public abstract class Entity
                     }
                 }
             }
-            
+
             // Check for snow layers
-            int blockYUp = MathHelper.floor(boundingBox.maxY);
-            Block<?> blockAbove = world.getBlock(blockX, blockYUp, blockZ);
-            if(blockAbove != null && blockAbove.hasTag(BlockTags.OVERRIDE_STEPSOUND)) {
-            	blockWalkedOn = blockAbove;
-            	blockY = blockYUp;
+            int blockYUp = MathHelper.floor(boundingBox.maxY());
+            Block<?> blockAbove = this.world.getBlock(blockX, blockYUp, blockZ);
+            if (blockAbove != null && blockAbove.hasTag(BlockTags.OVERRIDE_STEPSOUND)) {
+                blockWalkedOn = blockAbove;
+                blockY = blockYUp;
             }
-            
-            this.isWalking = walkDistO != walkDist;
-            
+
+            this.isWalking = this.walkDistO != this.walkDist;
+
             if (canInteract()) {
-                int walkedSteps = (int) (walkDist - nextStep);
-                if(walkedSteps > 0 && blockWalkedOn != null) {
-                    nextStep += walkedSteps;
-                    if (!muteStepSounds) {
-                        world.playBlockSoundEffect(this, this.x, this.bb.minY, this.z, blockWalkedOn, EnumBlockSoundEffectType.STEP);
-                        blockWalkedOn.onEntityWalking(world, blockX, blockY, blockZ, this);
+                int walkedSteps = (int) (this.walkDist - this.nextStep);
+                if (walkedSteps > 0 && blockWalkedOn != null) {
+                    this.nextStep += walkedSteps;
+                    if (!this.muteStepSounds) {
+                        this.world.playBlockSoundEffect(this, this.x, this.bb.minY, this.z, blockWalkedOn, EnumBlockSoundEffectType.STEP);
+                        blockWalkedOn.onEntityWalking(this.world, blockX, blockY, blockZ, this);
                     }
                 }
             }
         }
-        int minX = MathHelper.floor(bb.minX + 0.001D);
-        int minY = MathHelper.floor(bb.minY + 0.001D);
-        int minZ = MathHelper.floor(bb.minZ + 0.001D);
-        int maxX = MathHelper.floor(bb.maxX - 0.001D);
-        int maxY = MathHelper.floor(bb.maxY - 0.001D);
-        int maxZ = MathHelper.floor(bb.maxZ - 0.001D);
-        if(world.areBlocksLoaded(minX, minY, minZ, maxX, maxY, maxZ))
-        {
-            for(int _x = minX; _x <= maxX; _x++)
-            {
-                for(int _y = minY; _y <= maxY; _y++)
-                {
-                    for(int _z = minZ; _z <= maxZ; _z++)
-                    {
-                        int blockId = world.getBlockId(_x, _y, _z);
-                        if(blockId > 0)
-                        {
-                            Blocks.blocksList[blockId].onEntityCollidedWithBlock(world, _x, _y, _z, this);
+        int minX = MathHelper.floor(this.bb.minX + 0.001D);
+        int minY = MathHelper.floor(this.bb.minY + 0.001D);
+        int minZ = MathHelper.floor(this.bb.minZ + 0.001D);
+        int maxX = MathHelper.floor(this.bb.maxX - 0.001D);
+        int maxY = MathHelper.floor(this.bb.maxY - 0.001D);
+        int maxZ = MathHelper.floor(this.bb.maxZ - 0.001D);
+        if (this.world.areBlocksLoaded(minX, minY, minZ, maxX, maxY, maxZ)) {
+            for (int _x = minX; _x <= maxX; _x++) {
+                for (int _y = minY; _y <= maxY; _y++) {
+                    for (int _z = minZ; _z <= maxZ; _z++) {
+                        int blockId = this.world.getBlockId(_x, _y, _z);
+                        if (blockId > 0) {
+                            Blocks.blocksList[blockId].onEntityCollidedWithBlock(this.world, _x, _y, _z, this);
                         }
                     }
 
@@ -707,34 +652,28 @@ public abstract class Entity
 
         }
         boolean inWaterOrRain = isInWaterOrRain();
-        if(world.isBoundingBoxBurning(bb.getInsetBoundingBox(0.001D, 0.001D, 0.001D)))
-        {
+        if (this.world.isBoundingBoxBurning(MathHelper.aabbInsetBoundingBox(this.bb, 0.001D, 0.001D, 0.001D, new AABBd()))) {
             burn(1);
-            if(!inWaterOrRain)
-            {
-                remainingFireTicks++;
-                if(remainingFireTicks == 0)
-                {
-                    remainingFireTicks = 300;
+            if (!inWaterOrRain) {
+                this.remainingFireTicks++;
+                if (this.remainingFireTicks == 0) {
+                    this.remainingFireTicks = 300;
                 }
-                maxFireTicks = remainingFireTicks;
+                this.maxFireTicks = this.remainingFireTicks;
             }
-        } else
-        if(remainingFireTicks <= 0)
-        {
-            remainingFireTicks = -fireImmuneTicks;
+        } else if (this.remainingFireTicks <= 0) {
+            this.remainingFireTicks = -this.fireImmuneTicks;
         }
-        if(inWaterOrRain && remainingFireTicks > 0)
-        {
-            world.playSoundAtEntity(null, this, "random.fizz", 0.7F, 1.6F + (random.nextFloat() - random.nextFloat()) * 0.4F);
-            remainingFireTicks = -fireImmuneTicks;
+        if (inWaterOrRain && this.remainingFireTicks > 0) {
+            this.world.playSoundAtEntity(null, this, "random.fizz", 0.7F, 1.6F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
+            this.remainingFireTicks = -this.fireImmuneTicks;
         }
     }
 
     public void fling(double xd, double yd, double zd, float pushTime) {
         this.pushesThisTick++;
         this.fallDistance = 0;
-        double scalar = Math.sqrt(pushesThisTick) - Math.sqrt(pushesThisTick - 1);
+        double scalar = Math.sqrt(this.pushesThisTick) - Math.sqrt(this.pushesThisTick - 1);
         this.xd += xd * scalar;
         this.yd += yd * scalar;
         this.zd += zd * scalar;
@@ -747,429 +686,374 @@ public abstract class Entity
         return true;
     }
 
-    protected boolean makeStepSound()
-    {
+    protected boolean makeStepSound() {
         return true;
     }
 
-    protected void checkFallDamage(final double yd, final boolean onGround)
-    {
+    protected void checkFallDamage(final double yd, final boolean onGround) {
         if (this.vehicle != null || this.noPhysics) {
             this.fallDistance = 0;
-        }
-        else if (onGround)
-        {
-            if(this.fallDistance > 0.0F)
-            {
+        } else if (onGround) {
+            if (this.fallDistance > 0.0F) {
                 causeFallDamage(this.fallDistance);
                 this.fallDistance = 0.0F;
             }
-        }
-        else if (yd < 0.0D)
-        {
+        } else if (yd < 0.0D) {
             this.fallDistance -= (float) yd;
         }
     }
 
-    public AABB getBb()
-    {
+    public @Nullable AABBdc getCollisionAABB() {
         return null;
     }
 
-    protected void burn(int damage)
-    {
-        if (!fireImmune)
-        {
+    protected void burn(int damage) {
+        if (!this.fireImmune) {
             hurt(null, damage, DamageType.FIRE);
         }
     }
 
-    protected void causeFallDamage(float distance)
-    {
-        if (passenger != null)
-        {
-            passenger.causeFallDamage(distance);
+    protected void causeFallDamage(float distance) {
+        if (this.passenger != null) {
+            this.passenger.causeFallDamage(distance);
         }
     }
 
-    public boolean isInWaterOrRain()
-    {
-        return wasInWater || world.canBlockBeRainedOn(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
+    public boolean isInWaterOrRain() {
+        return this.wasInWater || this.world.canBlockBeRainedOn(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z));
     }
 
-    public boolean isInWater()
-    {
-        return wasInWater;
+    public boolean isInWater() {
+        return this.wasInWater;
     }
 
-    public boolean checkAndHandleWater(boolean addVelocity)
-    {
-        return world.handleMaterialAcceleration(bb/*.expand(0.0D, -0.4D, 0.0D)*/.getInsetBoundingBox(0.001D, 0.001D, 0.001D), Material.water, this, addVelocity);
+    public boolean checkAndHandleWater(boolean addVelocity) {
+        return this.world.handleMaterialAcceleration(MathHelper.aabbInsetBoundingBox(this.bb/*.expand(0.0D, -0.4D, 0.0D)*/, 0.001D, 0.001D, 0.001D, new AABBd()), Materials.WATER, this, addVelocity);
     }
 
-    public boolean isUnderLiquid(Material material)
-    {
-        double d = y + (double) getHeadHeight();
-        int i = MathHelper.floor(x);
-        int j = MathHelper.floor_float(MathHelper.floor(d));
-        int k = MathHelper.floor(z);
-        int l = world.getBlockId(i, j, k);
-        if(l != 0 && Blocks.blocksList[l].getMaterial() == material)
-        {
-            float f = BlockLogicFluid.getHeight(world.getBlockMetadata(i, j, k)) - 0.2F;
-            float f1 = (float)(j + 1) - f;
-            return d < (double)f1;
-        } else
-
-        {
+    public boolean isUnderLiquid(@NotNull Material material) {
+        double headY = this.y + (double) getHeadHeight();
+        TilePos tilePos = new TilePos(this.x, headY, this.z);
+        Block<?> block = this.world.getBlock(tilePos);
+        if (block != null && block.getMaterial() == material) {
+            float f = BlockLogicFluid.getHeight(this.world.getBlockData(tilePos)) - 0.2F;
+            float f1 = (float) (tilePos.y + 1) - f;
+            return headY < (double) f1;
+        } else {
             return false;
         }
     }
 
-    public float getHeadHeight()
-    {
+    public float getHeadHeight() {
         return 0.0F;
     }
 
-    public boolean isInLava()
-    {
-        return world.isMaterialInBB(bb/*.expand(-0.1D, -0.4D, -0.1D)*/, Material.lava);
+    public boolean isInLava() {
+        return this.world.isMaterialInBB(this.bb/*.expand(-0.1D, -0.4D, -0.1D)*/, Materials.LAVA);
     }
 
-    public void moveRelative(float strafe, float forward, float speed)
-    {
+    public void moveRelative(float strafe, float forward, float speed) {
         float f3 = MathHelper.sqrt_float(strafe * strafe + forward * forward);
-        if(f3 < 0.01F)
-        {
+        if (f3 < 0.01F) {
             return;
         }
-        if(f3 < 1.0F)
-        {
+        if (f3 < 1.0F) {
             f3 = 1.0F;
         }
         f3 = speed / f3;
         strafe *= f3;
         forward *= f3;
 
-        float sinYaw = MathHelper.sin((yRot * MathHelper.PI) / 180F);
-        float cosYaw = MathHelper.cos((yRot * MathHelper.PI) / 180F);
-        xd += strafe * cosYaw - forward * sinYaw ;
-        zd += forward * cosYaw + strafe * sinYaw;
-    }
-
-    public float calcBrightness(float partialTick)
-    {
-    	if(Global.accessor.isFullbrightEnabled()) {
-    		return 1.0f;
-    	}
-        int i = MathHelper.floor(x);
-        double d = (bb.maxY - bb.minY) * 0.66D;
-        int j = MathHelper.floor((y - (double) heightOffset) + d);
-        int k = MathHelper.floor(z);
-        if(world.areBlocksLoaded(MathHelper.floor(bb.minX), MathHelper.floor(bb.minY), MathHelper.floor(bb.minZ), MathHelper.floor(bb.maxX), MathHelper.floor(bb.maxY), MathHelper.floor(bb.maxZ)))
-        {
-            float f1 = world.getLightBrightness(i, j, k);
-            if(f1 < entityBrightness)
-            {
-                f1 = entityBrightness;
+        float sinYaw = MathHelper.sin((this.yRot * MathHelper.PI) / 180F);
+        float cosYaw = MathHelper.cos((this.yRot * MathHelper.PI) / 180F);
+        this.xd += strafe * cosYaw - forward * sinYaw;
+        this.zd += forward * cosYaw + strafe * sinYaw;
+    }
+
+    public float calcBrightness(float partialTick) {
+        if (Global.accessor.isFullbrightEnabled()) {
+            return 1.0f;
+        }
+        int i = MathHelper.floor(this.x);
+        double d = (this.bb.maxY - this.bb.minY) * 0.66D;
+        int j = MathHelper.floor((this.y - (double) this.heightOffset) + d);
+        int k = MathHelper.floor(this.z);
+        if (this.world.areBlocksLoaded(MathHelper.floor(this.bb.minX), MathHelper.floor(this.bb.minY), MathHelper.floor(this.bb.minZ), MathHelper.floor(this.bb.maxX), MathHelper.floor(this.bb.maxY), MathHelper.floor(this.bb.maxZ))) {
+            float f1 = this.world.getLightBrightness(i, j, k);
+            if (f1 < this.entityBrightness) {
+                f1 = this.entityBrightness;
             }
             return f1;
-        } else
-        {
-            return entityBrightness;
+        } else {
+            return this.entityBrightness;
         }
     }
 
     public float getBrightness(float partialTick) {
         return calcBrightness(partialTick);
     }
-    
+
     public int calcLightmap(float partialTick) {
         if (Global.accessor.isFullbrightEnabled()) return 15 << 20 | 15;
         TilePos blockPos = new TilePos(this.x, this.y - this.heightOffset + this.ySlideOffset + this.bbHeight * 0.66D, this.z);
 
         final int skylight;
         final int blocklight;
-        if(this.world.getBlockLitInteriorSurface(blockPos))
-        {
-            TilePos tu = blockPos.up();
-            TilePos tw = blockPos.west();
-            TilePos te = blockPos.east();
-            TilePos ts = blockPos.south();
-            TilePos tn = blockPos.north();
-
-                  int bU = this.world.getSavedLightValue(LightLayer.Block, tu);
-            final int bW = this.world.getSavedLightValue(LightLayer.Block, tw);
-            final int bE = this.world.getSavedLightValue(LightLayer.Block, te);
-            final int bS = this.world.getSavedLightValue(LightLayer.Block, ts);
-            final int bN = this.world.getSavedLightValue(LightLayer.Block, tn);
-            if(bW > bU) { bU = bW; }
-            if(bE > bU) { bU = bE; }
-            if(bS > bU) { bU = bS; }
-            if(bN > bU) { bU = bN; }
+        if (this.world.getBlockLitInteriorSurface(blockPos)) {
+            TilePos queryPos = new TilePos();
+
+            int bU = this.world.getSavedLightValue(LightLayer.Block, blockPos.up(queryPos));
+            final int bW = this.world.getSavedLightValue(LightLayer.Block, blockPos.west(queryPos));
+            final int bE = this.world.getSavedLightValue(LightLayer.Block, blockPos.east(queryPos));
+            final int bS = this.world.getSavedLightValue(LightLayer.Block, blockPos.south(queryPos));
+            final int bN = this.world.getSavedLightValue(LightLayer.Block, blockPos.north(queryPos));
+            if (bW > bU) {
+                bU = bW;
+            }
+            if (bE > bU) {
+                bU = bE;
+            }
+            if (bS > bU) {
+                bU = bS;
+            }
+            if (bN > bU) {
+                bU = bN;
+            }
             blocklight = bU;
 
-                  int sU = this.world.getSavedLightValue(LightLayer.Sky, tu);
-            final int sW = this.world.getSavedLightValue(LightLayer.Sky, tw);
-            final int sE = this.world.getSavedLightValue(LightLayer.Sky, te);
-            final int sS = this.world.getSavedLightValue(LightLayer.Sky, ts);
-            final int sN = this.world.getSavedLightValue(LightLayer.Sky, tn);
-            if(sW > sU) { sU = sW; }
-            if(sE > sU) { sU = sE; }
-            if(sS > sU) { sU = sS; }
-            if(sN > sU) { sU = sN; }
+            int sU = this.world.getSavedLightValue(LightLayer.Sky, blockPos.up(queryPos));
+            final int sW = this.world.getSavedLightValue(LightLayer.Sky, blockPos.west(queryPos));
+            final int sE = this.world.getSavedLightValue(LightLayer.Sky, blockPos.east(queryPos));
+            final int sS = this.world.getSavedLightValue(LightLayer.Sky, blockPos.south(queryPos));
+            final int sN = this.world.getSavedLightValue(LightLayer.Sky, blockPos.north(queryPos));
+            if (sW > sU) {
+                sU = sW;
+            }
+            if (sE > sU) {
+                sU = sE;
+            }
+            if (sS > sU) {
+                sU = sS;
+            }
+            if (sN > sU) {
+                sU = sN;
+            }
             skylight = sU;
 
         } else {
             skylight = this.world.getSavedLightValue(LightLayer.Sky, blockPos);
             blocklight = this.world.getSavedLightValue(LightLayer.Block, blockPos);
         }
-    	
-    	return this.world.getLightmapCoord(skylight, blocklight);
+
+        return this.world.getLightmapCoord(skylight, blocklight);
     }
 
     public int getLightmap(float partialTick) {
         return calcLightmap(partialTick);
     }
 
-    public void setWorld(@NotNull final World world)
-    {
+    public void setWorld(@NotNull final World world) {
         this.world = world;
     }
 
     public void absMoveTo(double x, double y, double z, float yRot,
-                          float xRot)
-    {
-        xo = this.x = x;
-        yo = this.y = y;
-        zo = this.z = z;
-        yRotO = this.yRot = yRot;
-        xRotO = this.xRot = xRot;
-        ySlideOffset = 0.0F;
-        double d3 = yRotO - yRot;
-        if(d3 < -180D)
-        {
-            yRotO += 360F;
-        }
-        if(d3 >= 180D)
-        {
-            yRotO -= 360F;
+                          float xRot) {
+        this.xo = this.x = x;
+        this.yo = this.y = y;
+        this.zo = this.z = z;
+        this.yRotO = this.yRot = yRot;
+        this.xRotO = this.xRot = xRot;
+        this.ySlideOffset = 0.0F;
+        double d3 = this.yRotO - yRot;
+        if (d3 < -180D) {
+            this.yRotO += 360F;
+        }
+        if (d3 >= 180D) {
+            this.yRotO -= 360F;
         }
         setPos(this.x, this.y, this.z);
         setRot(yRot, xRot);
     }
 
     public void moveTo(double x, double y, double z, float yRot,
-                       float xRot)
-    {
-       xo = this.x = x;
-       yo = this.y = y + (double) heightOffset;
-       zo = this.z = z;
+                       float xRot) {
+        this.xo = this.x = x;
+        this.yo = this.y = y + (double) this.heightOffset;
+        this.zo = this.z = z;
         this.yRot = yRot;
         this.xRot = xRot;
         setPos(this.x, this.y, this.z);
     }
 
-    public float distanceTo(Entity entity)
-    {
-        float f = (float)(x - entity.x);
-        float f1 = (float)(y - entity.y);
-        float f2 = (float)(z - entity.z);
+    public float distanceTo(Entity entity) {
+        float f = (float) (this.x - entity.x);
+        float f1 = (float) (this.y - entity.y);
+        float f2 = (float) (this.z - entity.z);
         return MathHelper.sqrt_float(f * f + f1 * f1 + f2 * f2);
     }
 
-    public double distanceToSqr(double d, double d1, double d2)
-    {
-        double d3 = x - d;
-        double d4 = y - d1;
-        double d5 = z - d2;
+    public double distanceToSqr(double d, double d1, double d2) {
+        double d3 = this.x - d;
+        double d4 = this.y - d1;
+        double d5 = this.z - d2;
         return d3 * d3 + d4 * d4 + d5 * d5;
     }
 
-    public double distanceTo(double d, double d1, double d2)
-    {
-        double d3 = x - d;
-        double d4 = y - d1;
-        double d5 = z - d2;
+    public double distanceTo(double d, double d1, double d2) {
+        double d3 = this.x - d;
+        double d4 = this.y - d1;
+        double d5 = this.z - d2;
         return MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
     }
 
-    public double distanceToSqr(Entity entity)
-    {
-        double d = x - entity.x;
-        double d1 = y - entity.y;
-        double d2 = z - entity.z;
+    public double distanceToSqr(Entity entity) {
+        double d = this.x - entity.x;
+        double d1 = this.y - entity.y;
+        double d2 = this.z - entity.z;
         return d * d + d1 * d1 + d2 * d2;
     }
 
-    public void playerTouch(Player player)
-    {
+    public void playerTouch(Player player) {
     }
 
-    public boolean collidesWith(Entity entity)
-    {
+    public boolean collidesWith(Entity entity) {
         return true;
     }
 
     public boolean collidesWithBlock(Block<?> block, int metadata) {
-        if (this.pushTime > 0.5f && (this.xd * this.xd + this.yd * this.yd + this.zd * this.zd) > 1 && Block.hasLogicClass(block, BlockLogicPistonHead.class)) return false; // TODO horrible hardcoded exception to getting stuck in piston heads during flings
-        return true;
+        return !(this.pushTime > 0.5f) || !((this.xd * this.xd + this.yd * this.yd + this.zd * this.zd) > 1) || !Block.hasLogicClass(block, BlockLogicPistonHead.class); // TODO horrible hardcoded exception to getting stuck in piston heads during flings
     }
 
-    public void push(Entity entity)
-    {
-        if (entity.passenger == this || entity.vehicle == this || entity.noPhysics || !entity.isPickable() || !this.collidesWith(entity) || !entity.collidesWith(this))
-        {
+    public void push(Entity entity) {
+        if (entity.passenger == this || entity.vehicle == this || entity.noPhysics || !entity.isPickable() || !this.collidesWith(entity) || !entity.collidesWith(this)) {
             return;
         }
-        double d = entity.x - x;
-        double d1 = entity.z - z;
+        double d = entity.x - this.x;
+        double d1 = entity.z - this.z;
         double d2 = MathHelper.abs_max(d, d1);
-        if (d2 >= 0.01D)
-        {
+        if (d2 >= 0.01D) {
             d2 = MathHelper.sqrt(d2);
             d /= d2;
             d1 /= d2;
             double d3 = 1.0D / d2;
-            if(d3 > 1.0D)
-            {
+            if (d3 > 1.0D) {
                 d3 = 1.0D;
             }
             d *= d3;
             d1 *= d3;
             d *= 0.05D;
             d1 *= 0.05D;
-            d *= 1.0F - pushthrough;
-            d1 *= 1.0F - pushthrough;
+            d *= 1.0F - this.pushthrough;
+            d1 *= 1.0F - this.pushthrough;
             push(-d, 0.0D, -d1);
             entity.push(d, 0.0D, d1);
         }
     }
 
-    public void push(double x, double y, double z)
-    {
-        xd += x;
-        yd += y;
-        zd += z;
+    public void push(double x, double y, double z) {
+        this.xd += x;
+        this.yd += y;
+        this.zd += z;
     }
 
-    protected void markHurt()
-    {
-        hurtMarked = true;
+    protected void markHurt() {
+        this.hurtMarked = true;
     }
 
-    public boolean hurt(Entity attacker, int baseDamage, DamageType type)
-    {
+    public boolean hurt(Entity attacker, int baseDamage, DamageType type) {
         markHurt();
         return false;
     }
 
-    public boolean isPickable()
-    {
+    public boolean isPickable() {
         return false;
     }
 
-    public boolean isSelectable()
-    {
+    public boolean isSelectable() {
         return isPickable();
     }
 
-    public boolean isPushable()
-    {
+    public boolean isPushable() {
         return false;
     }
 
-    public void awardKillScore(Entity entity, int i)
-    {
+    public void awardKillScore(Entity entity, int i) {
     }
 
-    public boolean shouldRender(final Vec3 vec3, final double viewDistanceModifier)
-    {
-        final double dx = this.x - vec3.x;
-        final double dy = this.y - vec3.y;
-        final double dz = this.z - vec3.z;
+    public boolean shouldRender(final @NotNull Vector3dc cameraPos, final double viewDistanceModifier) {
+        final double dx = this.x - cameraPos.x();
+        final double dy = this.y - cameraPos.y();
+        final double dz = this.z - cameraPos.z();
         final double distance = dx * dx + dy * dy + dz * dz;
         return shouldRenderAtSqrDistance(distance, viewDistanceModifier);
     }
 
-    public boolean shouldRenderAtSqrDistance(final double distance, final double viewDistanceModifier)
-    {
-        double d1 = this.bb.getSize();
+    public boolean shouldRenderAtSqrDistance(final double distance, final double viewDistanceModifier) {
+        double d1 = MathHelper.getAABBSize(this.bb);
         d1 *= 64D * this.viewScale * viewDistanceModifier;
         return distance < d1 * d1;
     }
 
-    public @Nullable String getEntityTexture()
-    {
+    public @Nullable String getEntityTexture() {
         return null;
     }
 
-    public boolean save(@NotNull CompoundTag tag)
-    {
+    public boolean save(@NotNull CompoundTag tag) {
         @Nullable NamespaceID s = getDispatcherId();
-        if(removed || s == null)
-        {
+        if (this.removed || s == null) {
             return false;
-        }
-        else
-        {
+        } else {
             tag.putString("id", s.toString());
             saveWithoutId(tag);
             return true;
         }
     }
 
-    public void saveWithoutId(@NotNull CompoundTag tag)
-    {
-        tag.put("Pos", newDoubleList(new double[] { x, y + ySlideOffset, z }));
-        tag.put("Motion", newDoubleList(new double[] { xd, yd, zd }));
-        tag.put("Rotation", newFloatList(new float[] { yRot, xRot }));
-        tag.putFloat("FallDistance", fallDistance);
-        tag.putShort("Fire", (short) remainingFireTicks);
-        tag.putShort("Air", (short) airSupply);
-        tag.putBoolean("OnGround", onGround);
-        tag.putFloat("PushTime", pushTime);
+    public void saveWithoutId(@NotNull CompoundTag tag) {
+        tag.put("Pos", newDoubleList(new double[]{this.x, this.y + this.ySlideOffset, this.z}));
+        tag.put("Motion", newDoubleList(new double[]{this.xd, this.yd, this.zd}));
+        tag.put("Rotation", newFloatList(new float[]{this.yRot, this.xRot}));
+        tag.putFloat("FallDistance", this.fallDistance);
+        tag.putShort("Fire", (short) this.remainingFireTicks);
+        tag.putShort("Air", (short) this.airSupply);
+        tag.putBoolean("OnGround", this.onGround);
+        tag.putFloat("PushTime", this.pushTime);
         addAdditionalSaveData(tag);
     }
 
-    public void load(@NotNull CompoundTag tag)
-    {
+    public void load(@NotNull CompoundTag tag) {
         ListTag posTag = tag.getList("Pos");
         ListTag motionTag = tag.getList("Motion");
         ListTag rotationTag = tag.getList("Rotation");
-        xd = ((DoubleTag)motionTag.tagAt(0)).getValue();
-        yd = ((DoubleTag)motionTag.tagAt(1)).getValue();
-        zd = ((DoubleTag)motionTag.tagAt(2)).getValue();
-        if(MathHelper.abs((float) xd) > 10D)
-        {
-            xd = 0.0D;
-        }
-        if(MathHelper.abs((float) yd) > 10D)
-        {
-            yd = 0.0D;
-        }
-        if(MathHelper.abs((float) zd) > 10D)
-        {
-            zd = 0.0D;
-        }
-        xo = x = ((DoubleTag)posTag.tagAt(0)).getValue();
-        yo = y = ((DoubleTag)posTag.tagAt(1)).getValue();
-        zo = z = ((DoubleTag)posTag.tagAt(2)).getValue();
-        yRotO = yRot = ((FloatTag)rotationTag.tagAt(0)).getValue();
-        xRotO = xRot = ((FloatTag)rotationTag.tagAt(1)).getValue();
-        fallDistance = tag.getFloat("FallDistance");
-        remainingFireTicks = tag.getShort("Fire");
-        maxFireTicks = remainingFireTicks;
-        airSupply = tag.getShort("Air");
-        onGround = tag.getBoolean("OnGround");
-        pushTime = tag.getFloat("PushTime");
-        setPos(x, y, z);
-        setRot(yRot, xRot);
+        this.xd = ((DoubleTag) motionTag.tagAt(0)).getValue();
+        this.yd = ((DoubleTag) motionTag.tagAt(1)).getValue();
+        this.zd = ((DoubleTag) motionTag.tagAt(2)).getValue();
+        if (MathHelper.abs((float) this.xd) > 10D) {
+            this.xd = 0.0D;
+        }
+        if (MathHelper.abs((float) this.yd) > 10D) {
+            this.yd = 0.0D;
+        }
+        if (MathHelper.abs((float) this.zd) > 10D) {
+            this.zd = 0.0D;
+        }
+        this.xo = this.x = ((DoubleTag) posTag.tagAt(0)).getValue();
+        this.yo = this.y = ((DoubleTag) posTag.tagAt(1)).getValue();
+        this.zo = this.z = ((DoubleTag) posTag.tagAt(2)).getValue();
+        this.yRotO = this.yRot = ((FloatTag) rotationTag.tagAt(0)).getValue();
+        this.xRotO = this.xRot = ((FloatTag) rotationTag.tagAt(1)).getValue();
+        this.fallDistance = tag.getFloat("FallDistance");
+        this.remainingFireTicks = tag.getShort("Fire");
+        this.maxFireTicks = this.remainingFireTicks;
+        this.airSupply = tag.getShort("Air");
+        this.onGround = tag.getBoolean("OnGround");
+        this.pushTime = tag.getFloat("PushTime");
+        setPos(this.x, this.y, this.z);
+        setRot(this.yRot, this.xRot);
         readAdditionalSaveData(tag);
     }
 
-    public final @Nullable NamespaceID getDispatcherId()
-    {
+    public final @Nullable NamespaceID getDispatcherId() {
         EntityDispatcher.EntityDispatcherEntry<?> entry = EntityDispatcher.getInstance().entryForClass(this.getClass());
         if (entry != null) {
             return entry.namespaceID;
@@ -1181,68 +1065,56 @@ public abstract class Entity
 
     public abstract void addAdditionalSaveData(@NotNull CompoundTag tag);
 
-    protected @NotNull ListTag newDoubleList(double[] array)
-    {
+    protected @NotNull ListTag newDoubleList(double[] array) {
         ListTag list = new ListTag();
-        for (double d : array)
-        {
+        for (double d : array) {
             list.addTag(new DoubleTag(d));
         }
 
         return list;
     }
 
-    protected @NotNull ListTag newFloatList(float[] array)
-    {
+    protected @NotNull ListTag newFloatList(float[] array) {
         ListTag list = new ListTag();
-        for (float f : array)
-        {
+        for (float f : array) {
             list.addTag(new FloatTag(f));
         }
 
         return list;
     }
 
-    public float getShadowHeightOffs()
-    {
+    public float getShadowHeightOffs() {
         return 0.25f;
     }
 
-    public @NotNull EntityItem dropItem(int itemId, int stackSize)
-    {
+    public @NotNull EntityItem dropItem(int itemId, int stackSize) {
         return dropItem(itemId, stackSize, 0.0F);
     }
 
-    public @NotNull EntityItem dropItem(int itemId, int stackSize, float verticalOffset)
-    {
+    public @NotNull EntityItem dropItem(int itemId, int stackSize, float verticalOffset) {
         return dropItem(new ItemStack(itemId, stackSize, 0), verticalOffset);
     }
 
-    public @NotNull EntityItem dropItem(@NotNull ItemStack itemStack, float verticalOffset)
-    {
-        final EntityItem entityitem = new EntityItem(world, x, y + verticalOffset, z, itemStack);
+    public @NotNull EntityItem dropItem(@NotNull ItemStack itemStack, float verticalOffset) {
+        final EntityItem entityitem = new EntityItem(this.world, this.x, this.y + verticalOffset, this.z, itemStack);
         entityitem.pickupDelay = 10;
         this.world.entityJoinedWorld(entityitem);
         return entityitem;
     }
 
-    public boolean isAlive()
-    {
-        return !removed;
+    public boolean isAlive() {
+        return !this.removed;
     }
 
-    public boolean isInWall()
-    {
-        for(int i = 0; i < 8; i++)
-        {
-            float f = ((float)((i >> 0) % 2) - 0.5F) * bbWidth * 0.9F;
-            float f1 = ((float)((i >> 1) % 2) - 0.5F) * 0.1F;
-            float f2 = ((float)((i >> 2) % 2) - 0.5F) * bbWidth * 0.9F;
-            int x = MathHelper.floor(this.x + (double)f);
-            int y = MathHelper.floor(this.y + (double) getHeadHeight() + (double)f1);
-            int z = MathHelper.floor(this.z + (double)f2);
-            if(world.isBlockNormalCube(x, y, z))
-            {
+    public boolean isInWall() {
+        for (int i = 0; i < 8; i++) {
+            float f = ((float) ((i >> 0) % 2) - 0.5F) * this.bbWidth * 0.9F;
+            float f1 = ((float) ((i >> 1) % 2) - 0.5F) * 0.1F;
+            float f2 = ((float) ((i >> 2) % 2) - 0.5F) * this.bbWidth * 0.9F;
+            int x = MathHelper.floor(this.x + (double) f);
+            int y = MathHelper.floor(this.y + (double) getHeadHeight() + (double) f1);
+            int z = MathHelper.floor(this.z + (double) f2);
+            if (this.world.isBlockNormalCube(x, y, z)) {
                 return true;
             }
         }
@@ -1250,88 +1122,76 @@ public abstract class Entity
         return false;
     }
 
-    public boolean interact(@NotNull Player player)
-    {
+    public boolean interact(@NotNull Player player) {
         return false;
     }
 
-    public void rideTick()
-    {
-        if (vehicle == null) {
+    public void rideTick() {
+        if (this.vehicle == null) {
             return;
         }
-        if(vehicle.isRemoved() || isSneaking() || (vehicle instanceof Entity && !((Entity) vehicle).isAlive()))
-        {
-            vehicle.ejectRider();
+        if (this.vehicle.isRemoved() || isSneaking() || (this.vehicle instanceof Entity && !((Entity) this.vehicle).isAlive())) {
+            this.vehicle.ejectRider();
             return;
         }
-        xd = 0.0D;
-        yd = 0.0D;
-        zd = 0.0D;
+        this.xd = 0.0D;
+        this.yd = 0.0D;
+        this.zd = 0.0D;
         tick();
-        if(vehicle == null)
-        {
+        if (this.vehicle == null) {
             return;
         }
-        vehicle.positionRider();
-        entityRiderYawDelta = MathHelper.normalizeRotation(entityRiderYawDelta + vehicle.getYRotDelta());
-        entityRiderPitchDelta = MathHelper.normalizeRotation(entityRiderPitchDelta + vehicle.getXRotDelta());
+        this.vehicle.positionRider();
+        this.entityRiderYawDelta = MathHelper.normalizeRotation(this.entityRiderYawDelta + this.vehicle.getYRotDelta());
+        this.entityRiderPitchDelta = MathHelper.normalizeRotation(this.entityRiderPitchDelta + this.vehicle.getXRotDelta());
 
         final float maxRot = 10F;
-        double yaw = MathHelper.clamp(entityRiderYawDelta / 2D, -maxRot, maxRot);
-        double pitch = MathHelper.clamp(entityRiderPitchDelta / 2D, -maxRot, maxRot);
+        double yaw = MathHelper.clamp(this.entityRiderYawDelta / 2D, -maxRot, maxRot);
+        double pitch = MathHelper.clamp(this.entityRiderPitchDelta / 2D, -maxRot, maxRot);
 
-        entityRiderYawDelta -= yaw;
+        this.entityRiderYawDelta -= yaw;
         //entityRiderPitchDelta -= pitch;
-        if(turnWithVehicle && !(vehicle instanceof MobPig)) yRot += yaw;
+        if (this.turnWithVehicle && !(this.vehicle instanceof MobPig)) this.yRot += yaw;
         //rotationPitch += pitch;
     }
 
     @Override
-    public void positionRider()
-    {
-        if (passenger == null) {
+    public void positionRider() {
+        if (this.passenger == null) {
             return;
         }
-        passenger.setPos(x, y + getRideHeight() + passenger.getRidingHeight(), z);
+        this.passenger.setPos(this.x, this.y + getRideHeight() + this.passenger.getRidingHeight(), this.z);
     }
 
-    public double getRidingHeight()
-    {
-        return heightOffset;
+    public double getRidingHeight() {
+        return this.heightOffset;
     }
 
-    public double getRideHeight()
-    {
-        return (double) bbHeight * 0.75D;
+    public double getRideHeight() {
+        return (double) this.bbHeight * 0.75D;
     }
 
-    public void startRiding(IVehicle vehicle)
-    {
-    	if(!canRide()) {
-    		return;
-    	}
+    public void startRiding(IVehicle vehicle) {
+        if (!canRide()) {
+            return;
+        }
         if (this.vehicle == vehicle) {
             return;
         }
-        entityRiderPitchDelta = 0.0D;
-        entityRiderYawDelta = 0.0D;
-        if(vehicle == null)
-        {
-            if(this.vehicle != null)
-            {
+        this.entityRiderPitchDelta = 0.0D;
+        this.entityRiderYawDelta = 0.0D;
+        if (vehicle == null) {
+            if (this.vehicle != null) {
                 this.vehicle.moveExitingEntity(this);
                 this.vehicle.setPassenger(null);
             }
             this.vehicle = null;
             return;
         }
-        if(this.vehicle != null)
-        {
+        if (this.vehicle != null) {
             this.vehicle.setPassenger(null);
         }
-        if(vehicle.getPassenger() != null)
-        {
+        if (vehicle.getPassenger() != null) {
             vehicle.getPassenger().vehicle = null;
         }
         this.vehicle = vehicle;
@@ -1344,75 +1204,63 @@ public abstract class Entity
 
     @Override
     public Entity ejectRider() {
-    	Entity entity = passenger;
-    	if(entity == null) return null;
-    	
-    	this.passenger = null;
-    	entity.vehicle = null;
-    	
-    	entity.moveTo(this.x, this.bb.minY, this.z, entity.yRot, entity.xRot);
-    	return entity;
+        Entity entity = this.passenger;
+        if (entity == null) return null;
+
+        this.passenger = null;
+        entity.vehicle = null;
+
+        entity.moveTo(this.x, this.bb.minY, this.z, entity.yRot, entity.xRot);
+        return entity;
     }
 
     public void lerpTo(double x, double y, double z, float yRot,
-                       float xRot, int i)
-    {
+                       float xRot, int i) {
         setPos(x, y, z);
         setRot(yRot, xRot);
-        List<AABB> cubes = world.getCubes(this, bb.getInsetBoundingBox(0.03125D, 0.0D, 0.03125D));
-        if(!cubes.isEmpty())
-        {
+        List<AABBdc> cubes = this.world.getCubes(this, MathHelper.aabbInsetBoundingBox(this.bb, 0.03125D, 0.0D, 0.03125D, new AABBd()));
+        if (!cubes.isEmpty()) {
             double d3 = 0.0D;
-            for (AABB cube : cubes)
-            {
-                if (cube.maxY > d3)
-                {
-                    d3 = cube.maxY;
+            for (AABBdc cube : cubes) {
+                if (cube.maxY() > d3) {
+                    d3 = cube.maxY();
                 }
             }
 
-            y += d3 - bb.minY;
+            y += d3 - this.bb.minY;
             setPos(x, y, z);
         }
     }
 
-    public float getPickRadius()
-    {
+    public float getPickRadius() {
         return 0.1F;
     }
 
-    public Vec3 getViewVector(float partialTick)
-    {
+    public @Nullable Vector3dc getViewVector(float partialTick) {
         return null;
     }
 
-    public void handlePortal(int portalBlockId, DyeColor portalColor)
-    {
+    public void handlePortal(int portalBlockId, DyeColor portalColor) {
     }
 
     @Nullable
-    public ItemStack[] getInventory()
-    {
+    public ItemStack[] getInventory() {
         return null;
     }
 
-    public void lerpMotion(double xd, double yd, double zd)
-    {
+    public void lerpMotion(double xd, double yd, double zd) {
         this.xd = xd;
         this.yd = yd;
         this.zd = zd;
     }
 
-    public void handleEntityEvent(byte byte0, float attackedAtYaw)
-    {
+    public void handleEntityEvent(byte byte0, float attackedAtYaw) {
     }
 
-    public void animateHurt()
-    {
+    public void animateHurt() {
     }
 
-    public void setEquippedSlot(int slot, int itemID, int itemMeta, CompoundTag tag)
-    {
+    public void setEquippedSlot(int slot, int itemID, int itemMeta, CompoundTag tag) {
     }
 
     public void setHeldObject(@Nullable ICarriable heldObject) {
@@ -1423,152 +1271,125 @@ public abstract class Entity
         return null;
     }
 
-    public boolean isOnFire()
-    {
-        return !fireImmune && remainingFireTicks > 0 || getSharedFlag(FLAG_ONFIRE);
+    public boolean isOnFire() {
+        return !this.fireImmune && this.remainingFireTicks > 0 || getSharedFlag(FLAG_ONFIRE);
     }
 
-    public boolean isPassenger()
-    {
-        return vehicle != null || getSharedFlag(FLAG_RIDING);
+    public boolean isPassenger() {
+        return this.vehicle != null || getSharedFlag(FLAG_RIDING);
     }
 
-    public boolean isSneaking()
-    {
+    public boolean isSneaking() {
         return getSharedFlag(FLAG_SNEAKING);
     }
-    
-    public void setSneaking(boolean flag)
-    {
-    	setSharedFlag(FLAG_SNEAKING, flag);
+
+    public void setSneaking(boolean flag) {
+        setSharedFlag(FLAG_SNEAKING, flag);
     }
 
-    protected boolean getSharedFlag(int i)
-    {
-        return (entityData.getByte(0) & 1 << i) != 0;
+    protected boolean getSharedFlag(int i) {
+        return (this.entityData.getByte(0) & 1 << i) != 0;
     }
 
-    protected void setSharedFlag(int id, boolean flag)
-    {
-        byte sharedFlags = entityData.getByte(DATA_SHARED_FLAGS_ID);
-        if(flag)
-        {
-            entityData.set(DATA_SHARED_FLAGS_ID, (byte) (sharedFlags | 1 << id));
-        } else
-        {
-            entityData.set(DATA_SHARED_FLAGS_ID, (byte) (sharedFlags & ~(1 << id)));
+    protected void setSharedFlag(int id, boolean flag) {
+        byte sharedFlags = this.entityData.getByte(DATA_SHARED_FLAGS_ID);
+        if (flag) {
+            this.entityData.set(DATA_SHARED_FLAGS_ID, (byte) (sharedFlags | 1 << id));
+        } else {
+            this.entityData.set(DATA_SHARED_FLAGS_ID, (byte) (sharedFlags & ~(1 << id)));
         }
     }
 
-    public void thunderHit(EntityLightning bolt)
-    {
+    public void thunderHit(EntityLightning bolt) {
         burn(5);
-        remainingFireTicks++;
-        if(remainingFireTicks == 0)
-        {
-            remainingFireTicks = 300;
+        this.remainingFireTicks++;
+        if (this.remainingFireTicks == 0) {
+            this.remainingFireTicks = 300;
         }
-        maxFireTicks = remainingFireTicks;
+        this.maxFireTicks = this.remainingFireTicks;
     }
 
-    public void killed(Mob mob)
-    {
+    public void killed(Mob mob) {
     }
 
-    protected boolean checkInTile(double d, double d1, double d2)
-    {
+    protected boolean checkInTile(double d, double d1, double d2) {
         int i = MathHelper.floor(d);
         int j = MathHelper.floor(d1);
         int k = MathHelper.floor(d2);
-        double d3 = d - (double)i;
-        double d4 = d1 - (double)j;
-        double d5 = d2 - (double)k;
-        if(world.isBlockNormalCube(i, j, k))
-        {
-            boolean flag = !world.isBlockNormalCube(i - 1, j, k);
-            boolean flag1 = !world.isBlockNormalCube(i + 1, j, k);
-            boolean flag2 = !world.isBlockNormalCube(i, j - 1, k);
-            boolean flag3 = !world.isBlockNormalCube(i, j + 1, k);
-            boolean flag4 = !world.isBlockNormalCube(i, j, k - 1);
-            boolean flag5 = !world.isBlockNormalCube(i, j, k + 1);
+        double d3 = d - (double) i;
+        double d4 = d1 - (double) j;
+        double d5 = d2 - (double) k;
+        if (this.world.isBlockNormalCube(i, j, k)) {
+            boolean flag = !this.world.isBlockNormalCube(i - 1, j, k);
+            boolean flag1 = !this.world.isBlockNormalCube(i + 1, j, k);
+            boolean flag2 = !this.world.isBlockNormalCube(i, j - 1, k);
+            boolean flag3 = !this.world.isBlockNormalCube(i, j + 1, k);
+            boolean flag4 = !this.world.isBlockNormalCube(i, j, k - 1);
+            boolean flag5 = !this.world.isBlockNormalCube(i, j, k + 1);
             byte byte0 = -1;
             double d6 = 9999D;
-            if(flag && d3 < d6)
-            {
+            if (flag && d3 < d6) {
                 d6 = d3;
                 byte0 = 0;
             }
-            if(flag1 && 1.0D - d3 < d6)
-            {
+            if (flag1 && 1.0D - d3 < d6) {
                 d6 = 1.0D - d3;
                 byte0 = 1;
             }
-            if(flag2 && d4 < d6)
-            {
+            if (flag2 && d4 < d6) {
                 d6 = d4;
                 byte0 = 2;
             }
-            if(flag3 && 1.0D - d4 < d6)
-            {
+            if (flag3 && 1.0D - d4 < d6) {
                 d6 = 1.0D - d4;
                 byte0 = 3;
             }
-            if(flag4 && d5 < d6)
-            {
+            if (flag4 && d5 < d6) {
                 d6 = d5;
                 byte0 = 4;
             }
-            if(flag5 && 1.0D - d5 < d6)
-            {
+            if (flag5 && 1.0D - d5 < d6) {
                 double d7 = 1.0D - d5;
                 byte0 = 5;
             }
-            float f = random.nextFloat() * 0.2F + 0.1F;
-            if(byte0 == 0)
-            {
-                xd = -f;
+            float f = this.random.nextFloat() * 0.2F + 0.1F;
+            if (byte0 == 0) {
+                this.xd = -f;
             }
-            if(byte0 == 1)
-            {
-                xd = f;
+            if (byte0 == 1) {
+                this.xd = f;
             }
-            if(byte0 == 2)
-            {
-                yd = -f;
+            if (byte0 == 2) {
+                this.yd = -f;
             }
-            if(byte0 == 3)
-            {
-                yd = f;
+            if (byte0 == 3) {
+                this.yd = f;
             }
-            if(byte0 == 4)
-            {
-                zd = -f;
+            if (byte0 == 4) {
+                this.zd = -f;
             }
-            if(byte0 == 5)
-            {
-                zd = f;
+            if (byte0 == 5) {
+                this.zd = f;
             }
         }
         return false;
     }
-    
+
     public boolean canRide() {
-    	return true;
+        return true;
     }
 
-    public boolean isSprinting()
-    {
+    public boolean isSprinting() {
         return getSharedFlag(FLAG_SPRINTING);
     }
 
-    public void setSprinting(boolean sprinting)
-    {
+    public void setSprinting(boolean sprinting) {
         setSharedFlag(FLAG_SPRINTING, sprinting);
     }
 
     @Override
     public boolean isRemoved() {
-        return removed;
+        return this.removed;
     }
 
     @Override
@@ -1578,22 +1399,22 @@ public abstract class Entity
 
     @Override
     public @Nullable Entity getPassenger() {
-        return passenger;
+        return this.passenger;
     }
 
     @Override
     public void moveExitingEntity(@NotNull Entity entity) {
-        entity.moveTo(x, bb.minY + (double) bbHeight, z, entity.yRot, entity.xRot);
+        entity.moveTo(this.x, this.bb.minY + (double) this.bbHeight, this.z, entity.yRot, entity.xRot);
     }
 
     @Override
     public float getYRotDelta() {
-        return (float) MathHelper.deltaAngle(yRot, yRotO);
+        return (float) MathHelper.deltaAngle(this.yRot, this.yRotO);
     }
 
     @Override
     public float getXRotDelta() {
-        return (float) MathHelper.deltaAngle(xRot, xRotO);
+        return (float) MathHelper.deltaAngle(this.xRot, this.xRotO);
     }
 
     // TODO at some point create a better more generalized method of controlling vehicles
@@ -1613,19 +1434,19 @@ public abstract class Entity
         return false;
     }
 
-    public static String getNameFromEntity(@NotNull Entity entity, boolean useNickname){
+    public static String getNameFromEntity(@NotNull Entity entity, boolean useNickname) {
         I18n translator = I18n.getInstance();
-        if (entity instanceof Mob && useNickname){
-            if (!((Mob) entity).nickname.isEmpty()){
+        if (entity instanceof Mob && useNickname) {
+            if (!((Mob) entity).nickname.isEmpty()) {
                 return ((Mob) entity).nickname;
             }
         }
-        if (entity instanceof Player){
+        if (entity instanceof Player) {
             return ((Player) entity).getDisplayName();
         }
         EntityDispatcher.EntityDispatcherEntry<?> entry = EntityDispatcher.getInstance().entryForClass(entity.getClass());
         if (entry != null) {
-            if (entry.nameKey != null){
+            if (entry.nameKey != null) {
                 return translator.translateKey(entry.nameKey);
             }
             return entry.namespaceID.value();
diff --git a/game/core/src/main/java/net/minecraft/core/entity/EntityFishingBobber.java b/game/core/src/main/java/net/minecraft/core/entity/EntityFishingBobber.java
index 7ae64349e..59eef94b5 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/EntityFishingBobber.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/EntityFishingBobber.java
@@ -1,8 +1,8 @@
 package net.minecraft.core.entity;
 
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.achievement.stat.StatList;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
@@ -10,19 +10,20 @@ import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.World;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.helper.DamageType;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 
-public class EntityFishingBobber extends Entity
-{
+public class EntityFishingBobber extends Entity {
     public static final int ID_BOBBER_BITFIELD = 2;
-    private int xTile;
-    private int yTile;
-    private int zTile;
+    private @Nullable TilePos tilePos = null;
     public Player owner;
     private int ticksInAir;
     private int ticksCatchable;
@@ -37,64 +38,59 @@ public class EntityFishingBobber extends Entity
     private double velocityY;
     private double velocityZ;
 
-    public EntityFishingBobber(World world)
-    {
+    public EntityFishingBobber(World world) {
         super(world);
-        ticksInAir = 0;
-        ticksCatchable = 0;
-        hookedEntity = null;
+        this.ticksInAir = 0;
+        this.ticksCatchable = 0;
+        this.hookedEntity = null;
         setSize(0.25F, 0.25F);
-        ignoreFrustumCheck = true;
+        this.ignoreFrustumCheck = true;
     }
 
-    public EntityFishingBobber(World world, double x, double y, double z)
-    {
+    public EntityFishingBobber(World world, double x, double y, double z) {
         this(world);
         setPos(x, y, z);
-        ignoreFrustumCheck = true;
+        this.ignoreFrustumCheck = true;
     }
 
-    public EntityFishingBobber(World world, Player owner)
-    {
+    public EntityFishingBobber(World world, Player owner) {
         super(world);
-        ticksInAir = 0;
-        ticksCatchable = 0;
-        hookedEntity = null;
-        ignoreFrustumCheck = true;
+        this.ticksInAir = 0;
+        this.ticksCatchable = 0;
+        this.hookedEntity = null;
+        this.ignoreFrustumCheck = true;
         this.owner = owner;
         this.owner.bobberEntity = this;
         setSize(0.25F, 0.25F);
-        moveTo(owner.x, (owner.y + 1.62D) - (double)owner.heightOffset, owner.z, owner.yRot, owner.xRot);
-        x -= MathHelper.cos((yRot / 180F) * MathHelper.PI) * 0.16F;
-        y -= 0.1D;
-        z -= MathHelper.sin((yRot / 180F) * MathHelper.PI) * 0.16F;
-        setPos(x, y, z);
-        heightOffset = 0.0F;
+        moveTo(owner.x, (owner.y + 1.62D) - (double) owner.heightOffset, owner.z, owner.yRot, owner.xRot);
+        this.x -= MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * 0.16F;
+        this.y -= 0.1D;
+        this.z -= MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * 0.16F;
+        setPos(this.x, this.y, this.z);
+        this.heightOffset = 0.0F;
         float f = 0.4F;
-        xd = -MathHelper.sin((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f;
-        zd = MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f;
-        yd = -MathHelper.sin((xRot / 180F) * MathHelper.PI) * f;
-        shoot(xd, yd, zd, 1.5F, 1.0F);
+        this.xd = -MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f;
+        this.zd = MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f;
+        this.yd = -MathHelper.sin((this.xRot / 180F) * MathHelper.PI) * f;
+        shoot(this.xd, this.yd, this.zd, 1.5F, 1.0F);
     }
 
     @Override
-	protected void defineSynchedData()
-    {
-        entityData.define(ID_BOBBER_BITFIELD, (byte)0, Byte.class);
+    protected void defineSynchedData() {
+        this.entityData.define(ID_BOBBER_BITFIELD, (byte) 0, Byte.class);
     }
 
     public boolean isInGround() {
-        return entityData.getByte(ID_BOBBER_BITFIELD) != 0;
+        return this.entityData.getByte(ID_BOBBER_BITFIELD) != 0;
     }
 
     public void setInGround(boolean flag) {
-        entityData.set(ID_BOBBER_BITFIELD, flag ? (byte)1 : (byte)0);
+        this.entityData.set(ID_BOBBER_BITFIELD, flag ? (byte) 1 : (byte) 0);
     }
 
     @Override
-	public boolean shouldRenderAtSqrDistance(double distance, double viewDistanceModifier)
-    {
-        double d1 = bb.getSize() * 4D;
+    public boolean shouldRenderAtSqrDistance(double distance, double viewDistanceModifier) {
+        double d1 = MathHelper.getAABBSize(this.bb) * 4D;
         d1 *= 64D * viewDistanceModifier;
         return distance < d1 * d1;
     }
@@ -104,285 +100,260 @@ public class EntityFishingBobber extends Entity
         x /= f2;
         y /= f2;
         z /= f2;
-        x += random.nextGaussian() * 0.0075D * (double)randomness;
-        y += random.nextGaussian() * 0.0075D * (double)randomness;
-        z += random.nextGaussian() * 0.0075D * (double)randomness;
+        x += this.random.nextGaussian() * 0.0075D * (double) randomness;
+        y += this.random.nextGaussian() * 0.0075D * (double) randomness;
+        z += this.random.nextGaussian() * 0.0075D * (double) randomness;
         x *= speed;
         y *= speed;
         z *= speed;
-        xd = x;
-        yd = y;
-        zd = z;
+        this.xd = x;
+        this.yd = y;
+        this.zd = z;
         float hAng = MathHelper.sqrt(x * x + z * z);
-        yRotO = yRot = (float)((Math.atan2(x, z) * 180D) / Math.PI);
-        xRotO = xRot = (float)((Math.atan2(y, hAng) * 180D) / Math.PI);
+        this.yRotO = this.yRot = (float) ((Math.atan2(x, z) * 180D) / Math.PI);
+        this.xRotO = this.xRot = (float) ((Math.atan2(y, hAng) * 180D) / Math.PI);
     }
 
     @Override
-	public void lerpTo(double x, double y, double z, float yRot,
-                       float xRot, int i)
-    {
-        lerpX = x;
-        lerpY = y;
-        lerpZ = z;
-        lerpYRot = yRot;
-        lerpXRot = xRot;
-        lerpSteps = i;
-        xd = velocityX;
-        yd = velocityY;
-        zd = velocityZ;
+    public void lerpTo(double x, double y, double z, float yRot,
+                       float xRot, int i) {
+        this.lerpX = x;
+        this.lerpY = y;
+        this.lerpZ = z;
+        this.lerpYRot = yRot;
+        this.lerpXRot = xRot;
+        this.lerpSteps = i;
+        this.xd = this.velocityX;
+        this.yd = this.velocityY;
+        this.zd = this.velocityZ;
     }
 
     @Override
-	public void lerpMotion(double xd, double yd, double zd)
-    {
-        velocityX = this.xd = xd;
-        velocityY = this.yd = yd;
-        velocityZ = this.zd = zd;
+    public void lerpMotion(double xd, double yd, double zd) {
+        this.velocityX = this.xd = xd;
+        this.velocityY = this.yd = yd;
+        this.velocityZ = this.zd = zd;
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         super.tick();
-        if(lerpSteps > 0)
-        {
-            double d = x + (lerpX - x) / (double) lerpSteps;
-            double d1 = y + (lerpY - y) / (double) lerpSteps;
-            double d2 = z + (lerpZ - z) / (double) lerpSteps;
+        if (this.lerpSteps > 0) {
+            double d = this.x + (this.lerpX - this.x) / (double) this.lerpSteps;
+            double d1 = this.y + (this.lerpY - this.y) / (double) this.lerpSteps;
+            double d2 = this.z + (this.lerpZ - this.z) / (double) this.lerpSteps;
             double d4;
-            for(d4 = lerpYRot - (double) yRot; d4 < -180D; d4 += 360D) { }
-            for(; d4 >= 180D; d4 -= 360D) { }
-            yRot += d4 / (double) lerpSteps;
-            xRot += (lerpXRot - (double) xRot) / (double) lerpSteps;
-            lerpSteps--;
+            for (d4 = this.lerpYRot - (double) this.yRot; d4 < -180D; d4 += 360D) {
+            }
+            for (; d4 >= 180D; d4 -= 360D) {
+            }
+            this.yRot += d4 / (double) this.lerpSteps;
+            this.xRot += (this.lerpXRot - (double) this.xRot) / (double) this.lerpSteps;
+            this.lerpSteps--;
             setPos(d, d1, d2);
-            setRot(yRot, xRot);
+            setRot(this.yRot, this.xRot);
             return;
         }
-        if(!world.isClientSide)
-        {
-            ItemStack heldPlayerItem = owner.getCurrentEquippedItem();
-            if(owner.removed || !owner.isAlive() || heldPlayerItem == null || heldPlayerItem.getItem() != Items.TOOL_FISHINGROD || distanceToSqr(owner) > 1024D)
-            {
+        if (!this.world.isClientSide) {
+            ItemStack heldPlayerItem = this.owner.getCurrentEquippedItem();
+            if (this.owner.removed || !this.owner.isAlive() || heldPlayerItem == null || heldPlayerItem.getItem() != Items.TOOL_FISHINGROD || distanceToSqr(this.owner) > 1024D) {
                 remove();
-                owner.bobberEntity = null;
+                this.owner.bobberEntity = null;
                 return;
             }
-            if(hookedEntity != null)
-            {
-                if(hookedEntity.removed)
-                {
-                    hookedEntity = null;
-                } else
-                {
-                    x = hookedEntity.x;
-                    y = hookedEntity.bb.minY + (double) hookedEntity.bbHeight * 0.8D;
-                    z = hookedEntity.z;
-                    if(hookedEntity instanceof MobPathfinder){
-                        ((MobPathfinder) hookedEntity).target = owner;
+            if (this.hookedEntity != null) {
+                if (this.hookedEntity.removed) {
+                    this.hookedEntity = null;
+                } else {
+                    this.x = this.hookedEntity.x;
+                    this.y = this.hookedEntity.bb.minY + (double) this.hookedEntity.bbHeight * 0.8D;
+                    this.z = this.hookedEntity.z;
+                    if (this.hookedEntity instanceof MobPathfinder) {
+                        ((MobPathfinder) this.hookedEntity).target = this.owner;
                     }
-                    double dx = owner.x - x;
-                    double dy = owner.y - y;
-                    double dz = owner.z - z;
+                    double dx = this.owner.x - this.x;
+                    double dy = this.owner.y - this.y;
+                    double dz = this.owner.z - this.z;
                     double distance = MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
-                    if(distance > 10) {
+                    if (distance > 10) {
                         double scale = 0.01D;
-                        hookedEntity.xd += dx * scale;
-                        hookedEntity.yd += dy * scale;
-                        hookedEntity.zd += dz * scale;
+                        this.hookedEntity.xd += dx * scale;
+                        this.hookedEntity.yd += dy * scale;
+                        this.hookedEntity.zd += dz * scale;
                     }
                     return;
                 }
             }
         }
-        if (isInGround()) {
-            if (world.getBlockId(xTile, yTile, zTile) == Blocks.ROPE.id()) {
-                x = xTile + 0.5D;
-                y = yTile + 0.5D;
-                z = zTile + 0.5D;
+        if (isInGround() && this.tilePos != null) {
+            if (this.world.getBlockId(this.tilePos) == Blocks.ROPE.id()) {
+                this.x = this.tilePos.x + 0.5D;
+                this.y = this.tilePos.y + 0.5D;
+                this.z = this.tilePos.z + 0.5D;
                 return;
             } else {
                 setInGround(false);
-                xd *= random.nextFloat() * 0.2F;
-                yd *= random.nextFloat() * 0.2F;
-                zd *= random.nextFloat() * 0.2F;
-                ticksInAir = 0;
-                ticksCatchable = 0;
+                this.xd *= this.random.nextFloat() * 0.2F;
+                this.yd *= this.random.nextFloat() * 0.2F;
+                this.zd *= this.random.nextFloat() * 0.2F;
+                this.ticksInAir = 0;
+                this.ticksCatchable = 0;
             }
         }
-        ticksInAir++;
-        Vec3 currentPos = Vec3.fromPool(x, y, z);
-        Vec3 nextPos = Vec3.fromPool(x + xd, y + yd, z + zd);
-        HitResult clip = world.checkBlockCollisionBetweenPoints(currentPos, nextPos);
-        currentPos = Vec3.fromPool(x, y, z);
-        nextPos = Vec3.fromPool(x + xd, y + yd, z + zd);
-        if(clip != null)
-        {
-            nextPos = Vec3.fromPool(clip.location.x, clip.location.y, clip.location.z);
-            if (clip instanceof HitResult.Tile hitTile && world.getBlockId(hitTile.tilePos) == Blocks.ROPE.id()) {
+        this.ticksInAir++;
+        Vector3dc currentPos = new Vector3d(this.x, this.y, this.z);
+        Vector3dc nextPos = new Vector3d(this.x + this.xd, this.y + this.yd, this.z + this.zd);
+        HitResult clip = this.world.checkBlockCollisionBetweenPoints(currentPos, nextPos);
+        currentPos = new Vector3d(this.x, this.y, this.z);
+        nextPos = new Vector3d(this.x + this.xd, this.y + this.yd, this.z + this.zd);
+        if (clip != null) {
+            nextPos = clip.location;
+            if (clip instanceof HitResult.Tile hitTile && this.world.getBlockId(hitTile.tilePos) == Blocks.ROPE.id()) {
                 setInGround(true);
-                xTile = hitTile.tilePos.x;
-                yTile = hitTile.tilePos.y;
-                zTile = hitTile.tilePos.z;
+                this.tilePos = new TilePos(hitTile.tilePos);
             }
         }
         Entity entity = null;
-        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.expand(xd, yd, zd).grow(1.0D, 1.0D, 1.0D));
+        AABBd checkBB = MathHelper.aabbExpand(this.bb, this.xd, this.yd, this.zd, new AABBd());
+        MathHelper.aabbGrow(checkBB, 1, 1, 1, checkBB);
+        List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, checkBB);
         double d3 = 0.0D;
-        for (Entity e : list)
-        {
-            if (!e.isPickable() || e == owner && ticksInAir < 5) {
+        for (Entity e : list) {
+            if (!e.isPickable() || e == this.owner && this.ticksInAir < 5) {
                 continue;
             }
             float f2 = 0.3F;
-            AABB aabb = e.bb.grow(f2, f2, f2);
-            HitResult newHitResult = aabb.clip(currentPos, nextPos);
+            AABBd aabb = MathHelper.aabbGrow(e.bb, f2, f2, f2, new AABBd());
+            HitResult newHitResult = MathHelper.aabbClip(aabb, currentPos, nextPos);
             if (newHitResult == null) {
                 continue;
             }
-            double d6 = currentPos.distanceTo(newHitResult.location);
+            double d6 = currentPos.distance(newHitResult.location);
             if (d6 < d3 || d3 == 0.0D) {
                 entity = e;
                 d3 = d6;
             }
         }
 
-        if(entity != null)
-        {
+        if (entity != null) {
             clip = new HitResult.Entity(entity);
         }
-        if(clip != null)
-        {
-            if(clip instanceof HitResult.Entity hitEntity)
-            {
-                if(hitEntity.entity.hurt(owner, 0, DamageType.COMBAT))
-                {
-                    hookedEntity = hitEntity.entity;
+        if (clip != null) {
+            if (clip instanceof HitResult.Entity hitEntity) {
+                if (hitEntity.entity.hurt(this.owner, 0, DamageType.COMBAT)) {
+                    this.hookedEntity = hitEntity.entity;
                 }
             }
         }
-        move(xd, yd, zd);
-        float f = MathHelper.sqrt(xd * xd + zd * zd);
-        yRot = (float)((java.lang.Math.atan2(xd, zd) * 180D) / Math.PI);
-        for(xRot = (float)((java.lang.Math.atan2(yd, f) * 180D) / Math.PI); xRot - xRotO < -180F; xRotO -= 360F) { }
-        for(; xRot - xRotO >= 180F; xRotO += 360F) { }
-        for(; yRot - yRotO < -180F; yRotO -= 360F) { }
-        for(; yRot - yRotO >= 180F; yRotO += 360F) { }
-        xRot = xRotO + (xRot - xRotO) * 0.2F;
-        yRot = yRotO + (yRot - yRotO) * 0.2F;
+        move(this.xd, this.yd, this.zd);
+        float f = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+        this.yRot = (float) ((java.lang.Math.atan2(this.xd, this.zd) * 180D) / Math.PI);
+        for (this.xRot = (float) ((java.lang.Math.atan2(this.yd, f) * 180D) / Math.PI); this.xRot - this.xRotO < -180F; this.xRotO -= 360F) {
+        }
+        for (; this.xRot - this.xRotO >= 180F; this.xRotO += 360F) {
+        }
+        for (; this.yRot - this.yRotO < -180F; this.yRotO -= 360F) {
+        }
+        for (; this.yRot - this.yRotO >= 180F; this.yRotO += 360F) {
+        }
+        this.xRot = this.xRotO + (this.xRot - this.xRotO) * 0.2F;
+        this.yRot = this.yRotO + (this.yRot - this.yRotO) * 0.2F;
 
         float movementScale = 0.92F;
-        if(onGround || horizontalCollision)
-        {
+        if (this.onGround || this.horizontalCollision) {
             movementScale = 0.5F;
         }
         int k = 5;
         double d5 = 0.0D;
-        for(int l = 0; l < k; l++)
-        {
-            double d8 = ((bb.minY + ((bb.maxY - bb.minY) * (double)(l)) / (double)k) - 0.125D) + 0.125D;
-            double d9 = ((bb.minY + ((bb.maxY - bb.minY) * (double)(l + 1)) / (double)k) - 0.125D) + 0.125D;
-            AABB axisalignedbb1 = AABB.fromPool(bb.minX, d8, bb.minZ, bb.maxX, d9, bb.maxZ);
-
-            if(world.isAABBInMaterial(axisalignedbb1, Material.water))
-            {
-                d5 += 1.0D / (double)k;
+        for (int l = 0; l < k; l++) {
+            double d8 = ((this.bb.minY + ((this.bb.maxY - this.bb.minY) * (double) (l)) / (double) k) - 0.125D) + 0.125D;
+            double d9 = ((this.bb.minY + ((this.bb.maxY - this.bb.minY) * (double) (l + 1)) / (double) k) - 0.125D) + 0.125D;
+            AABBdc aabb = new AABBd(this.bb.minX, d8, this.bb.minZ, this.bb.maxX, d9, this.bb.maxZ);
+            if (this.world.isAABBInMaterial(aabb, Materials.WATER)) {
+                d5 += 1.0D / (double) k;
             }
         }
 
-        if(d5 > 0.0D)
-        {
-            if(ticksCatchable > 0)
-            {
-                ticksCatchable--;
-            } else
-            {
+        if (d5 > 0.0D) {
+            if (this.ticksCatchable > 0) {
+                this.ticksCatchable--;
+            } else {
                 int catchRate = 500;
                 int rainRate = 0;
                 int algaeRate = 0;
-                if(world.canBlockBeRainedOn(MathHelper.floor(x), MathHelper.floor(y) + 1, MathHelper.floor(z)))
-                {
+                TilePos tileAbove = new TilePos(this.x, this.y + 1, this.z);
+                if (this.world.isBlockBeingRainedOn(tileAbove)) {
                     rainRate = 200;
                 }
 
-                if(world.getBlockId(MathHelper.floor(x), MathHelper.floor(y) + 1, MathHelper.floor(z)) == Blocks.ALGAE.id()) {
+                if (this.world.getBlockId(tileAbove) == Blocks.ALGAE.id()) {
                     algaeRate = 100;
                 }
                 catchRate = (catchRate - rainRate) - algaeRate;
 
-                if(random.nextInt(catchRate) == 0)
-                {
-                    ticksCatchable = random.nextInt(30) + 10;
-                    yd -= 0.2D;
-                    world.playSoundAtEntity(null, this, "random.splash", 0.25F, 1.0F + (random.nextFloat() - random.nextFloat()) * 0.4F);
-                    float f3 = MathHelper.floor(bb.minY);
-                    for(int i1 = 0; (float)i1 < 1.0F + bbWidth * 20F; i1++)
-                    {
-                        double xOff = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                        double zOff = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                        world.spawnParticle("bubble", x + xOff, f3 + 1.0F, z + zOff, xd, yd - (double)(random.nextFloat() * 0.2F), zd, 0);
+                if (this.random.nextInt(catchRate) == 0) {
+                    this.ticksCatchable = this.random.nextInt(30) + 10;
+                    this.yd -= 0.2D;
+                    this.world.playSoundAtEntity(null, this, "random.splash", 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
+                    float f3 = MathHelper.floor(this.bb.minY);
+                    for (int i1 = 0; (float) i1 < 1.0F + this.bbWidth * 20F; i1++) {
+                        double xOff = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                        double zOff = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                        this.world.spawnParticle("bubble", this.x + xOff, f3 + 1.0F, this.z + zOff, this.xd, this.yd - (double) (this.random.nextFloat() * 0.2F), this.zd, 0);
                     }
 
-                    for(int j1 = 0; (float)j1 < 1.0F + bbWidth * 20F; j1++)
-                    {
-                        double xOff = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                        double zOff = (random.nextFloat() * 2.0F - 1.0F) * bbWidth;
-                        world.spawnParticle("splash", x + xOff, f3 + 1.0F, z + zOff, xd, yd, zd, 0);
+                    for (int j1 = 0; (float) j1 < 1.0F + this.bbWidth * 20F; j1++) {
+                        double xOff = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                        double zOff = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth;
+                        this.world.spawnParticle("splash", this.x + xOff, f3 + 1.0F, this.z + zOff, this.xd, this.yd, this.zd, 0);
                     }
 
                 }
             }
         }
-        if(ticksCatchable > 0)
-        {
-            yd -= (double)(random.nextFloat() * random.nextFloat() * random.nextFloat()) * 0.2D;
+        if (this.ticksCatchable > 0) {
+            this.yd -= (double) (this.random.nextFloat() * this.random.nextFloat() * this.random.nextFloat()) * 0.2D;
         }
         double d7 = d5 * 2D - 1.0D;
-        yd += 0.04D * d7;
-        if(d5 > 0.0D)
-        {
-            movementScale = (float)((double)movementScale * 0.9D);
-            yd *= 0.8D;
+        this.yd += 0.04D * d7;
+        if (d5 > 0.0D) {
+            movementScale = (float) ((double) movementScale * 0.9D);
+            this.yd *= 0.8D;
         }
-        xd *= movementScale;
-        yd *= movementScale;
-        zd *= movementScale;
-        setPos(x, y, z);
+        this.xd *= movementScale;
+        this.yd *= movementScale;
+        this.zd *= movementScale;
+        setPos(this.x, this.y, this.z);
     }
 
     @Override
-    public void remove()
-    {
-        if(hookedEntity instanceof MobPathfinder){
-            ((MobPathfinder) hookedEntity).target = null;
+    public void remove() {
+        if (this.hookedEntity instanceof MobPathfinder) {
+            ((MobPathfinder) this.hookedEntity).target = null;
         }
         super.remove();
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag compoundTag) {
+    public void addAdditionalSaveData(@NotNull CompoundTag compoundTag) {
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag compoundTag) {
+    public void readAdditionalSaveData(@NotNull CompoundTag compoundTag) {
     }
 
     @Override
-	public float getShadowHeightOffs()
-    {
+    public float getShadowHeightOffs() {
         return 0.0F;
     }
 
-    public int yoink()
-    {
+    public int yoink() {
         int damage = 0;
 
-        if(isInGround())
-        {
-            double dx = x - owner.x;
-            double dy = y - owner.y;
-            double dz = z - owner.z;
+        if (isInGround()) {
+            double dx = this.x - this.owner.x;
+            double dy = this.y - this.owner.y;
+            double dz = this.z - this.owner.z;
             double distance = MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
             dx /= distance;
             dy /= distance;
@@ -392,46 +363,42 @@ public class EntityFishingBobber extends Entity
             dy = MathHelper.clamp(dy, -clamp, clamp);
             dz = MathHelper.clamp(dz, -clamp, clamp);
             double scale = 2D;
-            owner.xd += dx * scale;
-            owner.yd += dy * scale;
-            owner.zd += dz * scale;
+            this.owner.xd += dx * scale;
+            this.owner.yd += dy * scale;
+            this.owner.zd += dz * scale;
             damage = 5;
         }
-        if(hookedEntity != null)
-        {
-            double dx = owner.x - x;
-            double dy = owner.y - y;
-            double dz = owner.z - z;
+        if (this.hookedEntity != null) {
+            double dx = this.owner.x - this.x;
+            double dy = this.owner.y - this.y;
+            double dz = this.owner.z - this.z;
             double distance = MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
             double scale = 0.1D;
-            hookedEntity.xd += dx * scale;
-            hookedEntity.yd += dy * scale + (double) MathHelper.sqrt(distance) * 0.08D;
-            hookedEntity.zd += dz * scale;
+            this.hookedEntity.xd += dx * scale;
+            this.hookedEntity.yd += dy * scale + (double) MathHelper.sqrt(distance) * 0.08D;
+            this.hookedEntity.zd += dz * scale;
             damage = 3;
-        }
-        else if(ticksCatchable > 0)
-        {
-            if (!world.isClientSide) {
-                EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(Items.FOOD_FISH_RAW));
-                double dx = owner.x - x;
-                double dy = owner.y - y;
-                double dz = owner.z - z;
+        } else if (this.ticksCatchable > 0) {
+            if (!this.world.isClientSide) {
+                EntityItem entityitem = new EntityItem(this.world, this.x, this.y, this.z, new ItemStack(Items.FOOD_FISH_RAW));
+                double dx = this.owner.x - this.x;
+                double dy = this.owner.y - this.y;
+                double dz = this.owner.z - this.z;
                 double distance = MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
                 double scale = 0.1D;
                 entityitem.xd = dx * scale;
                 entityitem.yd = dy * scale + (double) MathHelper.sqrt(distance) * 0.08D;
                 entityitem.zd = dz * scale;
-                world.entityJoinedWorld(entityitem);
-                owner.addStat(StatList.fishCaughtStat, 1);
+                this.world.entityJoinedWorld(entityitem);
+                this.owner.addStat(StatList.fishCaughtStat, 1);
                 damage = 1;
             }
         }
-        if(isInGround())
-        {
+        if (isInGround()) {
             damage = 2;
         }
         remove();
-        owner.bobberEntity = null;
+        this.owner.bobberEntity = null;
         return damage;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/EntityItem.java b/game/core/src/main/java/net/minecraft/core/entity/EntityItem.java
index ee0532c76..c28403b42 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/EntityItem.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/EntityItem.java
@@ -8,16 +8,16 @@ import net.minecraft.core.achievement.stat.StatList;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicLog;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemDiscMusic;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 public class EntityItem extends Entity
 {
@@ -32,17 +32,17 @@ public class EntityItem extends Entity
 
     public EntityItem(World world, double x, double y, double z, ItemStack itemstack) {
         super(world);
-        age = 0;
-        health = 8;
-        bobOffset = (float)(Math.random() * Math.PI * 2D);
+        this.age = 0;
+        this.health = 8;
+        this.bobOffset = (float)(Math.random() * Math.PI * 2D);
         setSize(0.25F, 0.25F);
-        heightOffset = bbHeight / 2.0F;
+        this.heightOffset = this.bbHeight / 2.0F;
         setPos(x, y, z);
-        item = itemstack;
-        yRot = (float)(Math.random() * 360D);
-        xd = (float)(Math.random() * 0.2D - 0.1D);
-        yd = 0.2D;
-        zd = (float)(Math.random() * 0.2D - 0.1D);
+        this.item = itemstack;
+        this.yRot = (float)(Math.random() * 360D);
+        this.xd = (float)(Math.random() * 0.2D - 0.1D);
+        this.yd = 0.2D;
+        this.zd = (float)(Math.random() * 0.2D - 0.1D);
         if(itemstack == null) {
         	System.err.println("Created EntityItem with no item!");
         	Thread.dumpStack();
@@ -58,11 +58,11 @@ public class EntityItem extends Entity
     public EntityItem(World world)
     {
         super(world);
-        age = 0;
-        health = 5;
-        bobOffset = (float)(Math.random() * Math.PI * 2D);
+        this.age = 0;
+        this.health = 5;
+        this.bobOffset = (float)(Math.random() * Math.PI * 2D);
         setSize(0.25F, 0.25F);
-        heightOffset = bbHeight / 2.0F;
+        this.heightOffset = this.bbHeight / 2.0F;
     }
 
     @Override
@@ -74,74 +74,74 @@ public class EntityItem extends Entity
 	public void tick()
     {
         super.tick();
-        if(item == null) {
+        if(this.item == null) {
             System.err.println("Removing EntityItem with no item!");
             Thread.dumpStack();
             remove();
             return;
         }
-        if(item.stackSize <= 0) {
+        if(this.item.stackSize <= 0) {
         	remove();
         	return;
         }
         
         
-        if(pickupDelay > 0)
+        if(this.pickupDelay > 0)
         {
-            pickupDelay--;
+            this.pickupDelay--;
         }
-        xo = x;
-        yo = y;
-        zo = z;
-        yd -= 0.04D;
+        this.xo = this.x;
+        this.yo = this.y;
+        this.zo = this.z;
+        this.yd -= 0.04D;
         if(isInLava())
         {
-            yd = 0.2D;
-            xd = (random.nextFloat() - random.nextFloat()) * 0.2F;
-            zd = (random.nextFloat() - random.nextFloat()) * 0.2F;
-            world.playSoundAtEntity(null, this, "random.fizz", 0.4F, 2.0F + random.nextFloat() * 0.4F);
+            this.yd = 0.2D;
+            this.xd = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
+            this.zd = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
+            this.world.playSoundAtEntity(null, this, "random.fizz", 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
         }
 
-        checkInTile(x, (bb.minY + bb.maxY) / 2D, z);
-        move(xd, yd, zd);
+        checkInTile(this.x, (this.bb.minY + this.bb.maxY) / 2D, this.z);
+        move(this.xd, this.yd, this.zd);
         
-        if(!world.isClientSide) {
+        if(!this.world.isClientSide) {
         	if(enableItemClumping) {
-                if(MathHelper.floor(x) != MathHelper.floor(xo) || MathHelper.floor(y) != MathHelper.floor(yo) || MathHelper.floor(z) != MathHelper.floor(zo) || age % 25 == 0) {
+                if(MathHelper.floor(this.x) != MathHelper.floor(this.xo) || MathHelper.floor(this.y) != MathHelper.floor(this.yo) || MathHelper.floor(this.z) != MathHelper.floor(this.zo) || this.age % 25 == 0) {
                 	clumpToNearbyStack();
                 }		
         	}
         }
         
         float friction = 0.98F;
-        if(onGround)
+        if(this.onGround)
         {
             friction = 0.588F;
-            int blockId = world.getBlockId(MathHelper.floor(x), MathHelper.floor(bb.minY) - 1, MathHelper.floor(z));
+            int blockId = this.world.getBlockId(MathHelper.floor(this.x), MathHelper.floor(this.bb.minY) - 1, MathHelper.floor(this.z));
             if(blockId > 0)
             {
                 friction = Blocks.blocksList[blockId].friction * 0.98F;
             }
         }
-        xd *= friction;
-        yd *= 0.98D;
-        zd *= friction;
+        this.xd *= friction;
+        this.yd *= 0.98D;
+        this.zd *= friction;
 
-        if (wasInWater)
+        if (this.wasInWater)
         {
-            if(yd < 0.0f) {
-            	xd *= 0.95f;
-            	yd *= 0.45f;
-            	zd *= 0.95f;
+            if(this.yd < 0.0f) {
+                this.xd *= 0.95f;
+                this.yd *= 0.45f;
+                this.zd *= 0.95f;
             }
         }
 
-        if(onGround)
+        if(this.onGround)
         {
-            yd *= -0.5D;
+            this.yd *= -0.5D;
         }
-        age++;
-        if(age >= LIFETIME)
+        this.age++;
+        if(this.age >= LIFETIME)
         {
             remove();
         }
@@ -150,7 +150,7 @@ public class EntityItem extends Entity
     @Override
 	public boolean checkAndHandleWater(boolean addVelocity)
     {
-        return world.handleMaterialAcceleration(bb, Material.water, this, addVelocity);
+        return this.world.handleMaterialAcceleration(this.bb, Materials.WATER, this, addVelocity);
     }
 
     @Override
@@ -163,8 +163,8 @@ public class EntityItem extends Entity
     public boolean hurt(Entity entity, int i, DamageType type)
     {
         markHurt();
-        health -= i;
-        if(health <= 0)
+        this.health -= i;
+        if(this.health <= 0)
         {
             remove();
         }
@@ -174,61 +174,61 @@ public class EntityItem extends Entity
     @Override
 	public void addAdditionalSaveData(@NotNull CompoundTag tag)
     {
-        tag.putShort("Health", (byte)health);
-        tag.putShort("Age", (short)age);
-        if(item != null) {
-        	tag.putCompound("Item", item.writeToNBT(new CompoundTag()));
+        tag.putShort("Health", (byte) this.health);
+        tag.putShort("Age", (short) this.age);
+        if(this.item != null) {
+        	tag.putCompound("Item", this.item.writeToNBT(new CompoundTag()));
         }
     }
 
     @Override
 	public void readAdditionalSaveData(@NotNull CompoundTag tag)
     {
-        health = tag.getShort("Health") & 0xff;
-        age = tag.getShort("Age");
+        this.health = tag.getShort("Health") & 0xff;
+        this.age = tag.getShort("Age");
         if(tag.containsKey("Item")) {
-            item = ItemStack.readItemStackFromNbt(tag.getCompound("Item"));
+            this.item = ItemStack.readItemStackFromNbt(tag.getCompound("Item"));
         }
     }
 
 	@Override
 	public void playerTouch(Player player) {
-		if(world.isClientSide) {
+		if(this.world.isClientSide) {
 			return;
 		}
-		if(pickupDelay == 0) {
-			int previousStackSize = item.stackSize;
-			player.inventory.insertItem(item, true);
+		if(this.pickupDelay == 0) {
+			int previousStackSize = this.item.stackSize;
+			player.inventory.insertItem(this.item, true);
 
-			if(item.stackSize < previousStackSize) {
-				if(item.itemID < 16384) {
-                    Block<?> b = Blocks.blocksList[item.itemID];
+			if(this.item.stackSize < previousStackSize) {
+				if(this.item.itemID < 16384) {
+                    Block<?> b = Blocks.blocksList[this.item.itemID];
 					if(b != null && b.getLogic() instanceof BlockLogicLog) {
 						player.triggerAchievement(Achievements.MINE_WOOD);
 					}
 				}
-				if(item.itemID == Items.LEATHER.id) {
+				if(this.item.itemID == Items.LEATHER.id) {
 					player.triggerAchievement(Achievements.KILL_COW);
 				}
-                if(item.itemID == Items.DIAMOND.id) {
+                if(this.item.itemID == Items.DIAMOND.id) {
                     player.triggerAchievement(Achievements.GET_DIAMONDS);
                 }
-                if(item.itemID == Items.NETHERCOAL.id) {
+                if(this.item.itemID == Items.NETHERCOAL.id) {
                     player.triggerAchievement(Achievements.GET_NETHERCOAL);
                 }
-				if(item.itemID == Blocks.ICE.id()) {
+				if(this.item.itemID == Blocks.ICE.id()) {
 					player.triggerAchievement(Achievements.CRUSH_BLOCKS);
 				}
 				
-				if(item.stackSize <= 0) {
-					world.playSoundAtEntity(player, this, "item.pickup", 1F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 4.0F);
-					player.onItemPickup(this, item);
+				if(this.item.stackSize <= 0) {
+                    this.world.playSoundAtEntity(player, this, "item.pickup", 1F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.0F) * 4.0F);
+					player.onItemPickup(this, this.item);
 				}
 
-				if(item.itemID == Items.LANTERN_FIREFLY_GREEN.id
-						|| item.itemID == Items.LANTERN_FIREFLY_BLUE.id
-						|| item.itemID == Items.LANTERN_FIREFLY_ORANGE.id
-						|| item.itemID == Items.LANTERN_FIREFLY_RED.id) {
+				if(this.item.itemID == Items.LANTERN_FIREFLY_GREEN.id
+						|| this.item.itemID == Items.LANTERN_FIREFLY_BLUE.id
+						|| this.item.itemID == Items.LANTERN_FIREFLY_ORANGE.id
+						|| this.item.itemID == Items.LANTERN_FIREFLY_RED.id) {
 					if( player.getStat(Items.LANTERN_FIREFLY_RED.getStat(StatList.STAT_PICKED_UP)) > 0 &&
                             player.getStat(Items.LANTERN_FIREFLY_GREEN.getStat(StatList.STAT_PICKED_UP)) > 0 &&
                             player.getStat(Items.LANTERN_FIREFLY_BLUE.getStat(StatList.STAT_PICKED_UP)) > 0 &&
@@ -237,7 +237,7 @@ public class EntityItem extends Entity
 					}
 				}
 
-                if (item.getItem() instanceof ItemDiscMusic) {
+                if (this.item.getItem() instanceof ItemDiscMusic) {
                     if( player.getStat(Items.RECORD_13.getStat(StatList.STAT_PICKED_UP)) > 0 &&
                         player.getStat(Items.RECORD_CAT.getStat(StatList.STAT_PICKED_UP)) > 0 &&
                         player.getStat(Items.RECORD_BLOCKS.getStat(StatList.STAT_PICKED_UP)) > 0 &&
@@ -255,7 +255,7 @@ public class EntityItem extends Entity
                     }
                 }
 
-				if(item.stackSize <= 0) {
+				if(this.item.stackSize <= 0) {
 					remove();
 				}
 			}
@@ -263,8 +263,8 @@ public class EntityItem extends Entity
 	}
 
     public void clumpToNearbyStack() {
-    	AABB boundingBox = this.bb.grow(0.5, 0.0, 0.5);
-    	List<@NotNull EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, boundingBox);
+    	AABBd boundingBox = MathHelper.aabbGrow(this.bb, 0.5, 0.0, 0.5, new AABBd());
+    	List<@NotNull EntityItem> entities = this.world.getEntitiesWithinAABB(EntityItem.class, boundingBox);
     	
     	for(EntityItem otherEntity : entities) {
     		if(otherEntity == this || !otherEntity.isAlive() || !this.isAlive()) {
diff --git a/game/core/src/main/java/net/minecraft/core/entity/EntityLightning.java b/game/core/src/main/java/net/minecraft/core/entity/EntityLightning.java
index 49b91bea7..3a87f4948 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/EntityLightning.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/EntityLightning.java
@@ -4,128 +4,110 @@ import net.minecraft.core.entity.animal.MobWolf;
 import net.minecraft.core.enums.Difficulty;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.sound.SoundCategory;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 
-public class EntityLightning extends Entity
-{
+public class EntityLightning extends Entity {
     private int life;
     public long seed;
     private int flashes;
-    public EntityLightning(World world){
-        this(world,0, 0, 0);
+
+    public EntityLightning(World world) {
+        this(world, 0, 0, 0);
     }
 
-    public EntityLightning(World world, double x, double y, double z)
-    {
+    public EntityLightning(World world, double x, double y, double z) {
         super(world);
-        seed = 0L;
+        this.seed = 0L;
         moveTo(x, y, z, 0.0F, 0.0F);
-        life = 2;
-        seed = random.nextLong();
-        flashes = random.nextInt(3) + 1;
+        this.life = 2;
+        this.seed = this.random.nextLong();
+        this.flashes = this.random.nextInt(3) + 1;
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         super.tick();
-        if(life == 2)
-        {
-            world.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, x, y, z, "ambient.weather.thunder", 10000F, 0.8F + random.nextFloat() * 0.2F);
-            world.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, x, y, z, "random.explode", 2.0F, 0.5F + random.nextFloat() * 0.2F);
-            for (int i = 0; i < world.entities.size(); i++) {
-                Entity e = world.entities.get(i);
+        if (this.life == 2) {
+            this.world.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, this.x, this.y, this.z, "ambient.weather.thunder", 10000F, 0.8F + this.random.nextFloat() * 0.2F);
+            this.world.playSoundEffect(null, SoundCategory.WEATHER_SOUNDS, this.x, this.y, this.z, "random.explode", 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
+            for (int i = 0; i < this.world.entities.size(); i++) {
+                Entity e = this.world.entities.get(i);
                 if (e instanceof MobWolf) {
                     ((MobWolf) e).whine();
                 }
             }
         }
-        life--;
-        if(life < 0)
-        {
-            if(flashes == 0)
-            {
+        this.life--;
+        if (this.life < 0) {
+            if (this.flashes == 0) {
                 remove();
-            }
-            else if(life < -random.nextInt(10))
-            {
-                flashes--;
-                life = 1;
-                seed = random.nextLong();
-                if(world.areBlocksLoaded(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z), 10))
-                {
-                    int i = MathHelper.floor(x);
-                    int j = MathHelper.floor(y);
-                    int k = MathHelper.floor(z);
-                    if(world.getBlockId(i, j, k) == 0 && Blocks.FIRE.canPlaceBlockAt(world, i, j, k))
-                    {
-                        world.setBlockWithNotify(i, j, k, Blocks.FIRE.id());
+            } else if (this.life < -this.random.nextInt(10)) {
+                this.flashes--;
+                this.life = 1;
+                this.seed = this.random.nextLong();
+                if (this.world.areBlocksLoaded(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z), 10)) {
+                    int i = MathHelper.floor(this.x);
+                    int j = MathHelper.floor(this.y);
+                    int k = MathHelper.floor(this.z);
+                    if (this.world.getBlockId(i, j, k) == 0 && Blocks.FIRE.canPlaceBlockAt(this.world, i, j, k)) {
+                        this.world.setBlockWithNotify(i, j, k, Blocks.FIRE.id());
                     }
                 }
             }
         }
-        if(life >= 0)
-        {
+        if (this.life >= 0) {
             double radius = 3D;
-            List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, AABB.fromPool(x - radius, y - radius, z - radius, x + radius, y + 6D + radius, z + radius));
-            for (Entity entity : list)
-            {
+            List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, new AABBd(this.x - radius, this.y - radius, this.z - radius, this.x + radius, this.y + 6D + radius, this.z + radius));
+            for (Entity entity : list) {
                 entity.thunderHit(this);
             }
 
-            world.lightningFlicker = 2;
+            this.world.lightningFlicker = 2;
         }
     }
+
     @Override
-    protected void defineSynchedData(){
+    protected void defineSynchedData() {
 
     }
 
     @Override
-    public void spawnInit()
-    {
-        if(world.getDifficulty().id() >= Difficulty.NORMAL.id() && world.areBlocksLoaded(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z), 10))
-        {
-            int i = MathHelper.floor(x);
-            int k = MathHelper.floor(y);
-            int i1 = MathHelper.floor(z);
-            if(world.getBlockId(i, k, i1) == 0 && Blocks.FIRE.canPlaceBlockAt(world, i, k, i1))
-            {
-                world.setBlockWithNotify(i, k, i1, Blocks.FIRE.id());
+    public void spawnInit() {
+        if (this.world.getDifficulty().id() >= Difficulty.NORMAL.id() && this.world.areBlocksLoaded(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z), 10)) {
+            int i = MathHelper.floor(this.x);
+            int k = MathHelper.floor(this.y);
+            int i1 = MathHelper.floor(this.z);
+            if (this.world.getBlockId(i, k, i1) == 0 && Blocks.FIRE.canPlaceBlockAt(this.world, i, k, i1)) {
+                this.world.setBlockWithNotify(i, k, i1, Blocks.FIRE.id());
             }
-            for(int j = 0; j < 4; j++)
-            {
-                int l = (MathHelper.floor(x) + random.nextInt(3)) - 1;
-                int j1 = (MathHelper.floor(y) + random.nextInt(3)) - 1;
-                int k1 = (MathHelper.floor(z) + random.nextInt(3)) - 1;
-                if(world.getBlockId(l, j1, k1) == 0 && Blocks.FIRE.canPlaceBlockAt(world, l, j1, k1))
-                {
-                    world.setBlockWithNotify(l, j1, k1, Blocks.FIRE.id());
+            for (int j = 0; j < 4; j++) {
+                int l = (MathHelper.floor(this.x) + this.random.nextInt(3)) - 1;
+                int j1 = (MathHelper.floor(this.y) + this.random.nextInt(3)) - 1;
+                int k1 = (MathHelper.floor(this.z) + this.random.nextInt(3)) - 1;
+                if (this.world.getBlockId(l, j1, k1) == 0 && Blocks.FIRE.canPlaceBlockAt(this.world, l, j1, k1)) {
+                    this.world.setBlockWithNotify(l, j1, k1, Blocks.FIRE.id());
                 }
             }
         }
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
     }
 
     @Override
-    public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
     }
 
     @Override
-	public boolean shouldRender(Vec3 vec3, double viewDistanceModifier)
-    {
-        return life >= 0;
+    public boolean shouldRender(@NotNull Vector3dc cameraPos, double viewDistanceModifier) {
+        return this.life >= 0;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/EntityPainting.java b/game/core/src/main/java/net/minecraft/core/entity/EntityPainting.java
index 821ffff80..593f35531 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/EntityPainting.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/EntityPainting.java
@@ -17,8 +17,7 @@ import org.jetbrains.annotations.NotNull;
 
 import java.util.*;
 
-public class EntityPainting extends Entity
-{
+public class EntityPainting extends Entity {
     public static final int DATA_ITEM_ID = 16;
     public static final int DATA_ITEM_METADATA_ID = 17;
 
@@ -29,185 +28,149 @@ public class EntityPainting extends Entity
     public int blockZ;
     public ArtType art;
 
-    public EntityPainting(World world)
-    {
+    public EntityPainting(World world) {
         super(world);
-        updateCounter = 0;
-        direction = 0;
-        heightOffset = 0.0F;
-        art = ArtType.Kebab;
+        this.updateCounter = 0;
+        this.direction = 0;
+        this.heightOffset = 0.0F;
+        this.art = ArtType.Kebab;
         setSize(0.5F, 0.5F);
     }
 
     @Override
-    public boolean showBoundingBoxOnHover()
-    {
+    public boolean showBoundingBoxOnHover() {
         return true;
     }
 
-    public EntityPainting(World world, int x, int y, int z, int side, String motive)
-    {
+    public EntityPainting(World world, int x, int y, int z, int side, String motive) {
         this(world);
-        blockX = x;
-        blockY = y;
-        blockZ = z;
+        this.blockX = x;
+        this.blockY = y;
+        this.blockZ = z;
 
-        art = ArtType.map.getOrDefault(motive, art);
+        this.art = ArtType.map.getOrDefault(motive, this.art);
         setDirection(side);
     }
 
     @Override
-    protected void defineSynchedData()
-    {
-        entityData.define(DATA_ITEM_ID, (short)0, Short.class);
-        entityData.define(DATA_ITEM_METADATA_ID, (byte)0, Byte.class);
+    protected void defineSynchedData() {
+        this.entityData.define(DATA_ITEM_ID, (short) 0, Short.class);
+        this.entityData.define(DATA_ITEM_METADATA_ID, (byte) 0, Byte.class);
     }
 
-    public void setDirection(int direction)
-    {
+    public void setDirection(int direction) {
         this.direction = direction;
-        yRotO = yRot = direction * 90;
-        float sizeX = art.sizeX;
-        float sizeY = art.sizeY;
-        float sizeZ = art.sizeX;
-        if(direction == 0 || direction == 2)
-        {
+        this.yRotO = this.yRot = direction * 90;
+        float sizeX = this.art.sizeX;
+        float sizeY = this.art.sizeY;
+        float sizeZ = this.art.sizeX;
+        if (direction == 0 || direction == 2) {
             sizeZ = 0.5F;
-        } else
-        {
+        } else {
             sizeX = 0.5F;
         }
         sizeX /= 32F;
         sizeY /= 32F;
         sizeZ /= 32F;
-        double centerX = (double) blockX + 0.5D;
-        double centerY = (double) blockY + 0.5D;
-        double centerZ = (double) blockZ + 0.5D;
+        double centerX = (double) this.blockX + 0.5D;
+        double centerY = (double) this.blockY + 0.5D;
+        double centerZ = (double) this.blockZ + 0.5D;
         float offsetFromWall = 0.5F + 0.03F;
-        if(direction == 0)
-        {
+        if (direction == 0) {
             centerZ -= offsetFromWall;
         }
-        if(direction == 1)
-        {
+        if (direction == 1) {
             centerX -= offsetFromWall;
         }
-        if(direction == 2)
-        {
+        if (direction == 2) {
             centerZ += offsetFromWall;
         }
-        if(direction == 3)
-        {
+        if (direction == 3) {
             centerX += offsetFromWall;
         }
-        if(direction == 0)
-        {
-            centerX -= offsetFromCenter(art.sizeX);
+        if (direction == 0) {
+            centerX -= offsetFromCenter(this.art.sizeX);
         }
-        if(direction == 1)
-        {
-            centerZ += offsetFromCenter(art.sizeX);
+        if (direction == 1) {
+            centerZ += offsetFromCenter(this.art.sizeX);
         }
-        if(direction == 2)
-        {
-            centerX += offsetFromCenter(art.sizeX);
+        if (direction == 2) {
+            centerX += offsetFromCenter(this.art.sizeX);
         }
-        if(direction == 3)
-        {
-            centerZ -= offsetFromCenter(art.sizeX);
+        if (direction == 3) {
+            centerZ -= offsetFromCenter(this.art.sizeX);
         }
-        centerY += offsetFromCenter(art.sizeY);
+        centerY += offsetFromCenter(this.art.sizeY);
         setPos(centerX, centerY, centerZ);
         float expand = -0.00F;
-        bb.set(centerX - sizeX - expand, centerY - sizeY - expand, centerZ - sizeZ - expand, centerX + sizeX + expand, centerY + sizeY + expand, centerZ + sizeZ + expand);
-        if (direction == 0 || direction == 2)
-        {
-            bb.minZ -= 0.01f;
-            bb.maxZ += 0.01f;
+        this.bb.setMin(centerX - sizeX - expand, centerY - sizeY - expand, centerZ - sizeZ - expand).setMax(centerX + sizeX + expand, centerY + sizeY + expand, centerZ + sizeZ + expand);
+        if (direction == 0 || direction == 2) {
+            this.bb.minZ -= 0.01f;
+            this.bb.maxZ += 0.01f;
         }
-        if (direction == 1 || direction == 3)
-        {
-            bb.minX -= 0.01f;
-            bb.maxX += 0.01f;
+        if (direction == 1 || direction == 3) {
+            this.bb.minX -= 0.01f;
+            this.bb.maxX += 0.01f;
         }
     }
 
-    private float offsetFromCenter(int i)
-    {
-        if(i == 32)
-        {
+    private float offsetFromCenter(int i) {
+        if (i == 32) {
             return 0.5F;
         }
         return i != 64 ? 0.0F : 0.5F;
     }
 
     @Override
-    public void tick()
-    {
-        if(updateCounter++ == 100 && !world.isClientSide)
-        {
-            updateCounter = 0;
-            if(!canStay())
-            {
+    public void tick() {
+        if (this.updateCounter++ == 100 && !this.world.isClientSide) {
+            this.updateCounter = 0;
+            if (!canStay()) {
                 drop();
                 remove();
             }
         }
     }
 
-    public boolean canStay()
-    {
-        if(!world.getCubes(this, bb).isEmpty())
-        {
+    public boolean canStay() {
+        if (!this.world.getCubes(this, this.bb).isEmpty()) {
             return false;
         }
-        int xSize = art.sizeX / 16;
-        int ySize = art.sizeY / 16;
+        int xSize = this.art.sizeX / 16;
+        int ySize = this.art.sizeY / 16;
         int xPosition = this.blockX;
-        int yPosition = MathHelper.floor(y - (double)((float)art.sizeY / 32F));
+        int yPosition = MathHelper.floor(this.y - (double) ((float) this.art.sizeY / 32F));
         int zPosition = this.blockZ;
-        if(direction == 0)
-        {
-            xPosition = MathHelper.floor(x - (double)((float)art.sizeX / 32F));
+        if (this.direction == 0) {
+            xPosition = MathHelper.floor(this.x - (double) ((float) this.art.sizeX / 32F));
         }
-        if(direction == 1)
-        {
-            zPosition = MathHelper.floor(z - (double)((float)art.sizeX / 32F));
+        if (this.direction == 1) {
+            zPosition = MathHelper.floor(this.z - (double) ((float) this.art.sizeX / 32F));
         }
-        if(direction == 2)
-        {
-            xPosition = MathHelper.floor(x - (double)((float)art.sizeX / 32F));
+        if (this.direction == 2) {
+            xPosition = MathHelper.floor(this.x - (double) ((float) this.art.sizeX / 32F));
         }
-        if(direction == 3)
-        {
-            zPosition = MathHelper.floor(z - (double)((float)art.sizeX / 32F));
+        if (this.direction == 3) {
+            zPosition = MathHelper.floor(this.z - (double) ((float) this.art.sizeX / 32F));
         }
-        for(int dx = 0; dx < xSize; dx++)
-        {
-            for(int dy = 0; dy < ySize; dy++)
-            {
+        for (int dx = 0; dx < xSize; dx++) {
+            for (int dy = 0; dy < ySize; dy++) {
                 Material material;
-                if(direction == 0 || direction == 2)
-                {
-                    material = world.getBlockMaterial(xPosition + dx, yPosition + dy, this.blockZ);
-                }
-                else
-                {
-                    material = world.getBlockMaterial(this.blockX, yPosition + dy, zPosition + dx);
+                if (this.direction == 0 || this.direction == 2) {
+                    material = this.world.getBlockMaterial(xPosition + dx, yPosition + dy, this.blockZ);
+                } else {
+                    material = this.world.getBlockMaterial(this.blockX, yPosition + dy, zPosition + dx);
                 }
-                if(!material.isSolid())
-                {
+                if (!material.isSolid()) {
                     return false;
                 }
             }
 
         }
 
-        List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(this, bb);
-        for (Entity entity : entities)
-        {
-            if (entity instanceof EntityPainting)
-            {
+        List<Entity> entities = this.world.getEntitiesWithinAABBExcludingEntity(this, this.bb);
+        for (Entity entity : entities) {
+            if (entity instanceof EntityPainting) {
                 return false;
             }
         }
@@ -216,38 +179,33 @@ public class EntityPainting extends Entity
     }
 
     @Override
-    public boolean isPickable()
-    {
+    public boolean isPickable() {
         return true;
     }
 
     @Override
-    public boolean hurt(Entity entity, int i, DamageType type)
-    {
-        if(!removed && !world.isClientSide)
-        {
+    public boolean hurt(Entity entity, int i, DamageType type) {
+        if (!this.removed && !this.world.isClientSide) {
             markHurt();
-            if (!(entity instanceof Player) || ((Player) entity).getGamemode().dropBlockOnBreak())
-            {
+            if (!(entity instanceof Player) || ((Player) entity).getGamemode().dropBlockOnBreak()) {
                 drop();
                 remove();
             }
             remove();
-            world.playBlockSoundEffect(null, this.x, this.y + heightOffset, this.z, Blocks.PLANKS_OAK, EnumBlockSoundEffectType.MINE);
+            this.world.playBlockSoundEffect(null, this.x, this.y + this.heightOffset, this.z, Blocks.PLANKS_OAK, EnumBlockSoundEffectType.MINE);
         }
         return true;
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-        tag.putByte("Dir", (byte)direction);
-        tag.putString("Motive", art.key);
-        tag.putInt("TileX", blockX);
-        tag.putInt("TileY", blockY);
-        tag.putInt("TileZ", blockZ);
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
+        tag.putByte("Dir", (byte) this.direction);
+        tag.putString("Motive", this.art.key);
+        tag.putInt("TileX", this.blockX);
+        tag.putInt("TileY", this.blockY);
+        tag.putInt("TileZ", this.blockZ);
         ItemStack stack = getBorderStack();
-        if (stack != null){
+        if (stack != null) {
             tag.putBoolean("itemExists", true);
             tag.putInt("itemID", stack.itemID);
             tag.putInt("itemMeta", stack.getMetadata());
@@ -257,16 +215,15 @@ public class EntityPainting extends Entity
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-        direction = tag.getByte("Dir");
-        blockX = tag.getInteger("TileX");
-        blockY = tag.getInteger("TileY");
-        blockZ = tag.getInteger("TileZ");
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
+        this.direction = tag.getByte("Dir");
+        this.blockX = tag.getInteger("TileX");
+        this.blockY = tag.getInteger("TileY");
+        this.blockZ = tag.getInteger("TileZ");
         String motive = tag.getString("Motive");
-        art = ArtType.map.getOrDefault(motive, ArtType.Kebab);
-        setDirection(direction);
-        if (tag.getBoolean("itemExists")){
+        this.art = ArtType.map.getOrDefault(motive, ArtType.Kebab);
+        setDirection(this.direction);
+        if (tag.getBoolean("itemExists")) {
             int id = tag.getInteger("itemID");
             int meta = tag.getInteger("itemMeta");
             setStack(new ItemStack(id, 1, meta));
@@ -276,20 +233,16 @@ public class EntityPainting extends Entity
     }
 
     @Override
-	public void move(double xd, double yd, double zd)
-    {
-        if(!world.isClientSide && xd * xd + yd * yd + zd * zd > 0.0D)
-        {
+    public void move(double xd, double yd, double zd) {
+        if (!this.world.isClientSide && xd * xd + yd * yd + zd * zd > 0.0D) {
             drop();
             remove();
         }
     }
 
     @Override
-	public void push(double x, double y, double z)
-    {
-        if(!world.isClientSide && x * x + y * y + z * z > 0.0D)
-        {
+    public void push(double x, double y, double z) {
+        if (!this.world.isClientSide && x * x + y * y + z * z > 0.0D) {
             drop();
             remove();
         }
@@ -298,7 +251,7 @@ public class EntityPainting extends Entity
     protected void drop() {
         if (this.removed) return;
         final Direction d;
-        switch (direction) {
+        switch (this.direction) {
             case 0: {
                 d = Direction.NORTH;
                 break;
@@ -317,11 +270,11 @@ public class EntityPainting extends Entity
                 break;
             }
         }
-        final double x = this.x + d.getOffsetX()/4d;
-        final double y = this.y + d.getOffsetY()/4d;
-        final double z = this.z + d.getOffsetZ()/4d;
+        final double x = this.x + d.getOffsetX() / 4d;
+        final double y = this.y + d.getOffsetY() / 4d;
+        final double z = this.z + d.getOffsetZ() / 4d;
         this.world.entityJoinedWorld(new EntityItem(this.world, x, y, z, new ItemStack(Items.PAINTING)));
-        if (getBorderStack() != null){
+        if (getBorderStack() != null) {
             this.world.entityJoinedWorld(new EntityItem(this.world, x, y, z, getBorderStack()));
             setStack(null);
         }
@@ -329,7 +282,7 @@ public class EntityPainting extends Entity
 
     @Override
     public boolean interact(@NotNull Player player) {
-        if (player.getHeldItem() != null){
+        if (player.getHeldItem() != null) {
             ItemStack stack = player.getHeldItem();
             ItemStack paintingStack = getBorderStack();
             if (getBorder(stack) == null) return false;
@@ -338,15 +291,15 @@ public class EntityPainting extends Entity
             if (stack.stackSize <= 0) {
                 player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
             }
-            if (paintingStack != null && player.getGamemode().consumeBlocks()){
+            if (paintingStack != null && player.getGamemode().consumeBlocks()) {
                 player.inventory.insertItem(paintingStack, true);
                 if (paintingStack.stackSize > 0) {
                     player.dropPlayerItem(paintingStack);
                 }
             }
             return true;
-        } else if (getBorderStack() != null){
-            if (player.getGamemode().consumeBlocks()){
+        } else if (getBorderStack() != null) {
+            if (player.getGamemode().consumeBlocks()) {
                 player.inventory.insertItem(getBorderStack(), true);
             }
             setStack(null);
@@ -356,8 +309,8 @@ public class EntityPainting extends Entity
     }
 
     public ItemStack getBorderStack() {
-        int id = entityData.getShort(DATA_ITEM_ID);
-        int meta = Byte.toUnsignedInt(entityData.getByte(DATA_ITEM_METADATA_ID));
+        int id = this.entityData.getShort(DATA_ITEM_ID);
+        int meta = Byte.toUnsignedInt(this.entityData.getByte(DATA_ITEM_METADATA_ID));
 
         if (id != 0) {
             return new ItemStack(id, 1, meta);
@@ -366,22 +319,26 @@ public class EntityPainting extends Entity
         }
     }
 
-    public void setStack(ItemStack stack){
-        if (stack != null){
-            entityData.set(DATA_ITEM_ID, (short) stack.itemID);
-            entityData.set(DATA_ITEM_METADATA_ID, (byte) stack.getMetadata());
+    public void setStack(ItemStack stack) {
+        if (stack != null) {
+            this.entityData.set(DATA_ITEM_ID, (short) stack.itemID);
+            this.entityData.set(DATA_ITEM_METADATA_ID, (byte) stack.getMetadata());
         } else {
-            entityData.set(DATA_ITEM_ID, (short) 0);
-            entityData.set(DATA_ITEM_METADATA_ID, (byte) 0);
+            this.entityData.set(DATA_ITEM_ID, (short) 0);
+            this.entityData.set(DATA_ITEM_METADATA_ID, (byte) 0);
         }
     }
+
     private static final HashMap<String, String> borderMaterialMap = new HashMap<>();
+
     public static void addBorder(ItemStack stack, NamespaceID imagePath) {
         borderMaterialMap.put(stack.itemID + "|" + stack.getMetadata(), String.format("/assets/%s/textures/art/borders/%s.png", imagePath.namespace(), imagePath.value()));
     }
-    public static String getBorder(ItemStack stack){
+
+    public static String getBorder(ItemStack stack) {
         return borderMaterialMap.get(stack.itemID + "|" + stack.getMetadata());
     }
+
     static {
         addBorder(Items.INGOT_IRON.getDefaultStack(), NamespaceID.fromPool("minecraft", "border_iron"));
         addBorder(Items.INGOT_GOLD.getDefaultStack(), NamespaceID.fromPool("minecraft", "border_gold"));
diff --git a/game/core/src/main/java/net/minecraft/core/entity/Mob.java b/game/core/src/main/java/net/minecraft/core/entity/Mob.java
index 15f80f785..56f029b0d 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/Mob.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/Mob.java
@@ -3,12 +3,12 @@ package net.minecraft.core.entity;
 import com.b100.utils.StringUtils;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.Global;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.item.ItemFood;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.WeightedRandomLootObject;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.data.gamerule.GameRules;
 import net.minecraft.core.entity.player.Player;
@@ -22,25 +22,26 @@ import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-public abstract class Mob extends Entity
-{
+public abstract class Mob extends Entity {
     public static boolean SPAWN_NO_AI = false;
     public static final int DATA_VARIANT = 1;
     public static final int DATA_HEALTH = 2;
     protected @NotNull Map<ItemFood, ConsumedFood> consumedFood = new HashMap<>();
     public int heartsHalvesLife;
-//    public float timeOffs;
+    //    public float timeOffs;
 //    public float rotA;
     public float yBodyRot;
     public float yBodyRotO;
@@ -48,7 +49,7 @@ public abstract class Mob extends Entity
     protected float prevRidingRotUnused;
     protected float unusedRotation1;
     protected float prevRotationUnused;
-//    protected boolean hasHair;
+    //    protected boolean hasHair;
 //    protected boolean allowAlpha;
 //    protected float rotOffs;
 //    protected float bobStrength;
@@ -81,7 +82,7 @@ public abstract class Mob extends Entity
     protected double newPosZ;
     protected double newRotationYaw;
     protected double newRotationPitch;
-//    float fallTime;
+    //    float fallTime;
     protected int lastDamage;
     protected int entityAge;
     protected float moveStrafing;
@@ -111,50 +112,49 @@ public abstract class Mob extends Entity
     public @NotNull PlacementMode placementModeOverride = PlacementMode.FACING;
     public final @NotNull List<WeightedRandomLootObject> mobDrops = new ArrayList<>();
 
-    public Mob(@NotNull final World world)
-    {
+    public Mob(@NotNull final World world) {
         super(world);
-        heartsHalvesLife = 20;
-        yBodyRot = 0.0F;
-        yBodyRotO = 0.0F;
+        this.heartsHalvesLife = 20;
+        this.yBodyRot = 0.0F;
+        this.yBodyRotO = 0.0F;
 //        hasHair = true;
 //        allowAlpha = true;
 //        rotOffs = 0.0F;
 //        bobStrength = 1.0F;
-        scoreValue = 0;
+        this.scoreValue = 0;
 //        renderOffset = 0.0F;
-        isMultiplayerEntity = false;
-        attackedAtYaw = 0.0F;
-        deathTime = 0;
-        attackTime = 0;
-        dead = false;
+        this.isMultiplayerEntity = false;
+        this.attackedAtYaw = 0.0F;
+        this.deathTime = 0;
+        this.attackTime = 0;
+        this.dead = false;
 //        modelNum = -1;
 //        animSpeed = (float)(Math.random() * 0.9D + 0.1D);
 //        fallTime = 0.0F;
-        lastDamage = 0;
-        entityAge = 0;
-        isJumping = false;
-        defaultPitch = 0.0F;
-        moveSpeed = 0.7F;
-        numTicksToChaseTarget = 0;
-        blocksBuilding = true;
+        this.lastDamage = 0;
+        this.entityAge = 0;
+        this.isJumping = false;
+        this.defaultPitch = 0.0F;
+        this.moveSpeed = 0.7F;
+        this.numTicksToChaseTarget = 0;
+        this.blocksBuilding = true;
 //        rotA = (float)(Math.random() + 1.0D) * 0.01F;
-        setPos(x, y, z);
+        setPos(this.x, this.y, this.z);
 //        timeOffs = (float) Math.random() * 12398F;
-        yRot = (float)(Math.random() * Math.PI * 2D);
-        footSize = 0.5F;
+        this.yRot = (float) (Math.random() * Math.PI * 2D);
+        this.footSize = 0.5F;
 
-        int variant = random.nextInt(0xFF);
-        entityData.define(DATA_VARIANT, (byte) variant, Byte.class);
-        entityData.define(DATA_HEALTH, getMaxHealth(), Integer.class);
+        int variant = this.random.nextInt(0xFF);
+        this.entityData.define(DATA_VARIANT, (byte) variant, Byte.class);
+        this.entityData.define(DATA_HEALTH, getMaxHealth(), Integer.class);
         setSkinVariant(variant);
 
-        speed = 0.1f;
-        flySpeed = 0.02f;
+        this.speed = 0.1f;
+        this.flySpeed = 0.02f;
         this.noAI = SPAWN_NO_AI;
     }
 
-    protected final void setTextureIdentifier(final  @NotNull String namespace, final @NotNull String id) {
+    protected final void setTextureIdentifier(final @NotNull String namespace, final @NotNull String id) {
         this.textureIdentifier = NamespaceID.getPermanent(namespace, id);
         this.basePath = String.format("/assets/%s/textures/entity/%s/", this.textureIdentifier.namespace(), this.textureIdentifier.value());
         this.defaultTexture = this.basePath + "0.png";
@@ -162,17 +162,15 @@ public abstract class Mob extends Entity
     }
 
     @Override
-	protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
     }
 
-    public boolean canEntityBeSeen(Entity entity)
-    {
-        return world.checkBlockCollisionBetweenPoints(Vec3.fromPool(x, y + (double) getHeadHeight(), z), Vec3.fromPool(entity.x, entity.y + (double)entity.getHeadHeight(), entity.z)) == null;
+    public boolean canEntityBeSeen(Entity entity) {
+        return this.world.checkBlockCollisionBetweenPoints(new Vector3d(this.x, this.y + (double) getHeadHeight(), this.z), new Vector3d(entity.x, entity.y + (double) entity.getHeadHeight(), entity.z)) == null;
     }
 
     @Override
-	public @NotNull String getEntityTexture() {
+    public @NotNull String getEntityTexture() {
         return this.basePath + getTextureReference() + ".png";
     }
 
@@ -200,43 +198,38 @@ public abstract class Mob extends Entity
     }
 
     @Override
-	public boolean isPickable()
-    {
-        return !removed;
+    public boolean isPickable() {
+        return !this.removed;
     }
 
     @Override
-	public boolean isPushable()
-    {
-        return !removed;
+    public boolean isPushable() {
+        return !this.removed;
     }
 
-    public boolean isJumping() { return isJumping; }
+    public boolean isJumping() {
+        return this.isJumping;
+    }
 
     @Override
-	public float getHeadHeight()
-    {
-        return bbHeight * 0.85F;
+    public float getHeadHeight() {
+        return this.bbHeight * 0.85F;
     }
 
-    public int getAmbientSoundInterval()
-    {
+    public int getAmbientSoundInterval() {
         return 80;
     }
 
-    public @NotNull String getDisplayName()
-    {
-        return TextFormatting.get(chatColor) + nickname;
+    public @NotNull String getDisplayName() {
+        return TextFormatting.get(this.chatColor) + this.nickname;
     }
 
     @Override
-    public boolean interact(@NotNull Player player)
-    {
+    public boolean interact(@NotNull Player player) {
         ItemStack item = player.inventory.getCurrentItem();
-        if (item != null && item.itemID == Items.LABEL.id && item.hasCustomName())
-        {
-            if(item.hasCustomColor()) {
-            	this.chatColor = item.getCustomColor();
+        if (item != null && item.itemID == Items.LABEL.id && item.hasCustomName()) {
+            if (item.hasCustomColor()) {
+                this.chatColor = item.getCustomColor();
             } else {
                 this.chatColor = 0;
             }
@@ -247,13 +240,12 @@ public abstract class Mob extends Entity
         return false;
     }
 
-    protected void onLabelled()
-    {
+    protected void onLabelled() {
     }
 
-    public void setNickname(@NotNull String nickname){
+    public void setNickname(@NotNull String nickname) {
         this.nickname = nickname;
-        hadNicknameSet = true;
+        this.hadNicknameSet = true;
         onLabelled();
     }
 
@@ -266,237 +258,217 @@ public abstract class Mob extends Entity
         }
     }
 
-    public void playLivingSound()
-    {
+    public void playLivingSound() {
         String s = getLivingSound();
-        if(s != null && !world.isClientSide)
-        {
-            world.playSoundAtEntity(null, this, s, getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
+        if (s != null && !this.world.isClientSide) {
+            this.world.playSoundAtEntity(null, this, s, getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
         }
     }
-    
-    public void playHurtSound()
-    {
-        world.playSoundAtEntity(null, this, getHurtSound(), getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
+
+    public void playHurtSound() {
+        this.world.playSoundAtEntity(null, this, getHurtSound(), getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
     }
-    
-    public void playDeathSound()
-    {
-        world.playSoundAtEntity(null, this, getDeathSound(), getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
+
+    public void playDeathSound() {
+        this.world.playSoundAtEntity(null, this, getDeathSound(), getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
     }
 
     @Override
-	public void baseTick()
-    {
-        prevSwingProgress = swingProgress;
+    public void baseTick() {
+        this.prevSwingProgress = this.swingProgress;
         super.baseTick();
-        if(random.nextInt(1000) < livingSoundTime++)
-        {
-            livingSoundTime = -getAmbientSoundInterval();
+        if (this.random.nextInt(1000) < this.livingSoundTime++) {
+            this.livingSoundTime = -getAmbientSoundInterval();
             playLivingSound();
         }
-        if(isAlive() && isInWall() && !noPhysics)
-        {
+        if (isAlive() && isInWall() && !this.noPhysics) {
             hurt(null, 1, null);
         }
-        if(fireImmune || world.isClientSide)
-        {
-            remainingFireTicks = 0;
+        if (this.fireImmune || this.world.isClientSide) {
+            this.remainingFireTicks = 0;
         }
         trySuffocate();
-        prevCameraPitch = cameraPitch;
-        if(attackTime > 0)
-        {
-            attackTime--;
-        }
-        if(hurtTime > 0)
-        {
-            hurtTime--;
-        }
-        if(heartsFlashTime > 0)
-        {
-            heartsFlashTime--;
-        }
-        if(getHealth() <= 0)
-        {
-            deathTime++;
-            if(deathTime > 20)
-            {
+        this.prevCameraPitch = this.cameraPitch;
+        if (this.attackTime > 0) {
+            this.attackTime--;
+        }
+        if (this.hurtTime > 0) {
+            this.hurtTime--;
+        }
+        if (this.heartsFlashTime > 0) {
+            this.heartsFlashTime--;
+        }
+        if (getHealth() <= 0) {
+            this.deathTime++;
+            if (this.deathTime > 20) {
                 beforeRemove();
                 remove();
-                for(int j = 0; j < 20; j++)
-                {
-                    double motionX = random.nextGaussian() * 0.02D;
-                    double motionY = random.nextGaussian() * 0.02D;
-                    double motionZ = random.nextGaussian() * 0.02D;
-                    world.spawnParticle("explode", (x + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth, y + (double)(random.nextFloat() * bbHeight), (z + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth, motionX, motionY, motionZ, 0);
+                for (int j = 0; j < 20; j++) {
+                    double motionX = this.random.nextGaussian() * 0.02D;
+                    double motionY = this.random.nextGaussian() * 0.02D;
+                    double motionZ = this.random.nextGaussian() * 0.02D;
+                    this.world.spawnParticle("explode", (this.x + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth, this.y + (double) (this.random.nextFloat() * this.bbHeight), (this.z + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth, motionX, motionY, motionZ, 0);
                 }
 
             }
         }
         List<ItemFood> finishedFood = new ArrayList<>();
-        for (Map.Entry<ItemFood, ConsumedFood> entry : consumedFood.entrySet()) {
+        for (Map.Entry<ItemFood, ConsumedFood> entry : this.consumedFood.entrySet()) {
             entry.getValue().tick();
             if (entry.getValue().isFinished()) {
                 finishedFood.add(entry.getKey());
             }
         }
         for (ItemFood food : finishedFood) {
-            consumedFood.remove(food);
-        }
-        prevRotationUnused = unusedRotation1;
-        yBodyRotO = yBodyRot;
-        yRotO = yRot;
-        xRotO = xRot;
-    }
-
-    public void trySuffocate(){
-        if(isAlive() && isUnderLiquid(Material.water) && !canBreatheUnderwater())
-        {
-            airSupply--;
-            if(airSupply == -20)
-            {
-                airSupply = 0;
-                for(int i = 0; i < 8; i++)
-                {
-                    double offX = random.nextFloat() - random.nextFloat();
-                    double offY = random.nextFloat() - random.nextFloat();
-                    double offZ = random.nextFloat() - random.nextFloat();
-                    world.spawnParticle("bubble", x + offX, y + offY, z + offZ, xd, yd, zd, 0);
+            this.consumedFood.remove(food);
+        }
+        this.prevRotationUnused = this.unusedRotation1;
+        this.yBodyRotO = this.yBodyRot;
+        this.yRotO = this.yRot;
+        this.xRotO = this.xRot;
+    }
+
+    public void trySuffocate() {
+        if (isAlive() && isUnderLiquid(Materials.WATER) && !canBreatheUnderwater()) {
+            this.airSupply--;
+            if (this.airSupply == -20) {
+                this.airSupply = 0;
+                for (int i = 0; i < 8; i++) {
+                    double offX = this.random.nextFloat() - this.random.nextFloat();
+                    double offY = this.random.nextFloat() - this.random.nextFloat();
+                    double offZ = this.random.nextFloat() - this.random.nextFloat();
+                    this.world.spawnParticle("bubble", this.x + offX, this.y + offY, this.z + offZ, this.xd, this.yd, this.zd, 0);
                 }
 
                 hurt(null, 2, DamageType.DROWN);
             }
-            remainingFireTicks = 0;
-        } else
-        {
-            airSupply = airMaxSupply;
+            this.remainingFireTicks = 0;
+        } else {
+            this.airSupply = this.airMaxSupply;
         }
     }
 
-    public void spawnExplosionParticle()
-    {
-        for(int i = 0; i < 20; i++)
-        {
-            double d = random.nextGaussian() * 0.02D;
-            double d1 = random.nextGaussian() * 0.02D;
-            double d2 = random.nextGaussian() * 0.02D;
+    public void spawnExplosionParticle() {
+        for (int i = 0; i < 20; i++) {
+            double d = this.random.nextGaussian() * 0.02D;
+            double d1 = this.random.nextGaussian() * 0.02D;
+            double d2 = this.random.nextGaussian() * 0.02D;
             double d3 = 10D;
-            world.spawnParticle("explode", (x + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth - d * d3, (y + (double)(random.nextFloat() * bbHeight)) - d1 * d3, (z + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth - d2 * d3, d, d1, d2, 0);
+            this.world.spawnParticle("explode", (this.x + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth - d * d3, (this.y + (double) (this.random.nextFloat() * this.bbHeight)) - d1 * d3, (this.z + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth - d2 * d3, d, d1, d2, 0);
         }
 
     }
 
     @Override
-	public void rideTick()
-    {
+    public void rideTick() {
         super.rideTick();
-        ridingRotUnused = prevRidingRotUnused;
-        prevRidingRotUnused = 0.0F;
+        this.ridingRotUnused = this.prevRidingRotUnused;
+        this.prevRidingRotUnused = 0.0F;
     }
 
     @Override
-	public void lerpTo(double x, double y, double z, float yRot,
-                       float xRot, int i)
-    {
-        heightOffset = 0.0F;
-        newPosX = x;
-        newPosY = y;
-        newPosZ = z;
-        newRotationYaw = yRot;
-        newRotationPitch = xRot;
-        newPosRotationIncrements = i;
+    public void lerpTo(double x, double y, double z, float yRot,
+                       float xRot, int i) {
+        this.heightOffset = 0.0F;
+        this.newPosX = x;
+        this.newPosY = y;
+        this.newPosZ = z;
+        this.newRotationYaw = yRot;
+        this.newRotationPitch = xRot;
+        this.newPosRotationIncrements = i;
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         super.tick();
         if (this.noAI) return;
         onLivingUpdate();
-        double d = x - xo;
-        double d1 = z - zo;
+        double d = this.x - this.xo;
+        double d1 = this.z - this.zo;
         float f = MathHelper.sqrt(d * d + d1 * d1);
-        float f1 = yBodyRot;
+        float f1 = this.yBodyRot;
         float f2 = 0.0F;
-        ridingRotUnused = prevRidingRotUnused;
+        this.ridingRotUnused = this.prevRidingRotUnused;
         float f3 = 0.0F;
-        if(f > 0.05F)
-        {
+        if (f > 0.05F) {
             f3 = 1.0F;
             f2 = f * 3F;
             f1 = ((float) java.lang.Math.atan2(d1, d) * 180F) / MathHelper.PI - 90F;
         }
-        if(swingProgress > 0.0F)
-        {
-            f1 = yRot;
+        if (this.swingProgress > 0.0F) {
+            f1 = this.yRot;
         }
-        if(!onGround)
-        {
+        if (!this.onGround) {
             f3 = 0.0F;
         }
-        prevRidingRotUnused = prevRidingRotUnused + (f3 - prevRidingRotUnused) * 0.3F;
+        this.prevRidingRotUnused = this.prevRidingRotUnused + (f3 - this.prevRidingRotUnused) * 0.3F;
         float f4;
-        for(f4 = f1 - yBodyRot; f4 < -180F; f4 += 360F) { }
-        for(; f4 >= 180F; f4 -= 360F) { }
-        yBodyRot += f4 * 0.3F;
+        for (f4 = f1 - this.yBodyRot; f4 < -180F; f4 += 360F) {
+        }
+        for (; f4 >= 180F; f4 -= 360F) {
+        }
+        this.yBodyRot += f4 * 0.3F;
         float f5;
-        for(f5 = yRot - yBodyRot; f5 < -180F; f5 += 360F) { }
-        for(; f5 >= 180F; f5 -= 360F) { }
+        for (f5 = this.yRot - this.yBodyRot; f5 < -180F; f5 += 360F) {
+        }
+        for (; f5 >= 180F; f5 -= 360F) {
+        }
         boolean flag = f5 < -90F || f5 >= 90F;
-        if(f5 < -75F)
-        {
+        if (f5 < -75F) {
             f5 = -75F;
         }
-        if(f5 >= 75F)
-        {
+        if (f5 >= 75F) {
             f5 = 75F;
         }
-        yBodyRot = yRot - f5;
-        if(f5 * f5 > 2500F)
-        {
-            yBodyRot += f5 * 0.2F;
+        this.yBodyRot = this.yRot - f5;
+        if (f5 * f5 > 2500F) {
+            this.yBodyRot += f5 * 0.2F;
         }
-        if(flag)
-        {
+        if (flag) {
             f2 *= -1F;
         }
-        for(; yRot - yRotO < -180F; yRotO -= 360F) { }
-        for(; yRot - yRotO >= 180F; yRotO += 360F) { }
-        for(; yBodyRot - yBodyRotO < -180F; yBodyRotO -= 360F) { }
-        for(; yBodyRot - yBodyRotO >= 180F; yBodyRotO += 360F) { }
-        for(; xRot - xRotO < -180F; xRotO -= 360F) { }
-        for(; xRot - xRotO >= 180F; xRotO += 360F) { }
-        unusedRotation1 += f2;
+        for (; this.yRot - this.yRotO < -180F; this.yRotO -= 360F) {
+        }
+        for (; this.yRot - this.yRotO >= 180F; this.yRotO += 360F) {
+        }
+        for (; this.yBodyRot - this.yBodyRotO < -180F; this.yBodyRotO -= 360F) {
+        }
+        for (; this.yBodyRot - this.yBodyRotO >= 180F; this.yBodyRotO += 360F) {
+        }
+        for (; this.xRot - this.xRotO < -180F; this.xRotO -= 360F) {
+        }
+        for (; this.xRot - this.xRotO >= 180F; this.xRotO += 360F) {
+        }
+        this.unusedRotation1 += f2;
     }
 
-    public void heal(int i)
-    {
-        if(getHealth() <= 0)
-        {
+    public void heal(int i) {
+        if (getHealth() <= 0) {
             return;
         }
         setHealthRaw(getHealth() + i);
-        if(getHealth() > getMaxHealth())
-        {
+        if (getHealth() > getMaxHealth()) {
             setHealthRaw(getMaxHealth());
         }
-        heartsFlashTime = heartsHalvesLife / 2;
+        this.heartsFlashTime = this.heartsHalvesLife / 2;
     }
-    public int getHealth(){
-        return entityData.getInt(DATA_HEALTH);
+
+    public int getHealth() {
+        return this.entityData.getInt(DATA_HEALTH);
     }
-    public void setHealthRaw(int health){
-        entityData.set(DATA_HEALTH, health);
+
+    public void setHealthRaw(int health) {
+        this.entityData.set(DATA_HEALTH, health);
     }
-    public int getMaxHealth(){
+
+    public int getMaxHealth() {
         return 10;
     }
 
-    public int getTotalHealingRemaining(){
+    public int getTotalHealingRemaining() {
         int totalHealingRemaining = 0;
         for (ConsumedFood value :
-             consumedFood.values()) {
+            this.consumedFood.values()) {
             totalHealingRemaining += value.getHealRemaining();
         }
         return totalHealingRemaining;
@@ -504,199 +476,169 @@ public abstract class Mob extends Entity
 
     public void eatFood(ItemFood food) {
         if (food == null) return;
-        if (food.getTicksPerHeal() == 0 || world.getGameRuleValue(GameRules.INSTANT_HEALING)) {
+        if (food.getTicksPerHeal() == 0 || this.world.getGameRuleValue(GameRules.INSTANT_HEALING)) {
             heal(food.getHealAmount());
         } else {
-            if (consumedFood.containsKey(food)) {
-                consumedFood.get(food).addFood();
+            if (this.consumedFood.containsKey(food)) {
+                this.consumedFood.get(food).addFood();
             } else {
-                consumedFood.put(food, new ConsumedFood(this, food));
+                this.consumedFood.put(food, new ConsumedFood(this, food));
             }
         }
     }
 
     @Override
-    public boolean hurt(Entity attacker, int damage, DamageType type)
-    {
-        if(world.isClientSide)
-        {
+    public boolean hurt(Entity attacker, int damage, DamageType type) {
+        if (this.world.isClientSide) {
             return false;
         }
-        entityAge = 0;
-        if(getHealth() <= 0)
-        {
+        this.entityAge = 0;
+        if (getHealth() <= 0) {
             return false;
         }
-        walkAnimSpeed = 1.5F;
+        this.walkAnimSpeed = 1.5F;
         boolean flag = true;
-        if((float) heartsFlashTime > (float)heartsHalvesLife / 2.0F)
-        {
-            if(damage <= lastDamage)
-            {
+        if ((float) this.heartsFlashTime > (float) this.heartsHalvesLife / 2.0F) {
+            if (damage <= this.lastDamage) {
                 return false;
             }
-            damageEntity(damage - lastDamage, type);
-            lastDamage = damage;
+            damageEntity(damage - this.lastDamage, type);
+            this.lastDamage = damage;
             flag = false;
-        } else
-        {
-            lastDamage = damage;
-            prevHealth = getHealth();
-            prevBonusHealth = bonusHealth;
-            heartsFlashTime = heartsHalvesLife;
+        } else {
+            this.lastDamage = damage;
+            this.prevHealth = getHealth();
+            this.prevBonusHealth = this.bonusHealth;
+            this.heartsFlashTime = this.heartsHalvesLife;
             damageEntity(damage, type);
             if (damage > 0) {
-                hurtTime = maxHurtTime = 10;
+                this.hurtTime = this.maxHurtTime = 10;
             }
         }
-        attackedAtYaw = 0.0F;
-        if(flag)
-        {
+        this.attackedAtYaw = 0.0F;
+        if (flag) {
             markHurt();
-            if(attacker != null)
-            {
-                double d = attacker.x - x;
+            if (attacker != null) {
+                double d = attacker.x - this.x;
                 double d1;
-                for(d1 = attacker.z - z; d * d + d1 * d1 < 0.0001D; d1 = (java.lang.Math.random() - java.lang.Math.random()) * 0.01D)
-                {
+                for (d1 = attacker.z - this.z; d * d + d1 * d1 < 0.0001D; d1 = (java.lang.Math.random() - java.lang.Math.random()) * 0.01D) {
                     d = (java.lang.Math.random() - java.lang.Math.random()) * 0.01D;
                 }
 
-                attackedAtYaw = (float)((java.lang.Math.atan2(d1, d) * 180D) / Math.PI) - yRot;
+                this.attackedAtYaw = (float) ((java.lang.Math.atan2(d1, d) * 180D) / Math.PI) - this.yRot;
                 knockBack(attacker, damage, d, d1);
-            } else
-            {
-                attackedAtYaw = (int)(java.lang.Math.random() * 2D) * 180;
+            } else {
+                this.attackedAtYaw = (int) (java.lang.Math.random() * 2D) * 180;
             }
-            world.sendTrackedEntityStatusUpdatePacket(this, (byte)2, attackedAtYaw);
+            this.world.sendTrackedEntityStatusUpdatePacket(this, (byte) 2, this.attackedAtYaw);
         }
         // :)
-        if(getHealth() <= 0)
-        {
-            if(flag)
-            {
-            	playDeathSound();
+        if (getHealth() <= 0) {
+            if (flag) {
+                playDeathSound();
             }
             onDeath(attacker);
-        } else
-        if(flag && damage > 0)
-        {
-        	playHurtSound();
+        } else if (flag && damage > 0) {
+            playHurtSound();
         }
         return true;
     }
 
     @Override
-	public void animateHurt()
-    {
-        hurtTime = maxHurtTime = 10;
-        attackedAtYaw = 0.0F;
+    public void animateHurt() {
+        this.hurtTime = this.maxHurtTime = 10;
+        this.attackedAtYaw = 0.0F;
     }
 
-    protected void damageEntity(int i, DamageType damageType)
-    {
+    protected void damageEntity(int i, DamageType damageType) {
         setHealthRaw(getHealth() - i);
     }
 
-    protected float getSoundVolume()
-    {
+    protected float getSoundVolume() {
         return 1.0F;
     }
 
-    public @Nullable String getLivingSound()
-    {
+    public @Nullable String getLivingSound() {
         return null;
     }
 
-    protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "random.hurt";
     }
 
-    protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "random.hurt";
     }
 
-    public void knockBack(Entity entity, int i, double d, double d1)
-    {
+    public void knockBack(Entity entity, int i, double d, double d1) {
         float f = MathHelper.sqrt(d * d + d1 * d1);
         float f1 = 0.4F;
-        xd /= 2D;
-        yd /= 2D;
-        zd /= 2D;
-        xd -= (d / (double)f) * (double)f1;
-        yd += 0.40000000596046448D;
-        zd -= (d1 / (double)f) * (double)f1;
-        if(yd > 0.40000000596046448D)
-        {
-            yd = 0.40000000596046448D;
+        this.xd /= 2D;
+        this.yd /= 2D;
+        this.zd /= 2D;
+        this.xd -= (d / (double) f) * (double) f1;
+        this.yd += 0.40000000596046448D;
+        this.zd -= (d1 / (double) f) * (double) f1;
+        if (this.yd > 0.40000000596046448D) {
+            this.yd = 0.40000000596046448D;
         }
     }
 
-    public void onDeath(Entity entityKilledBy)
-    {
-        if(scoreValue >= 0 && entityKilledBy != null)
-        {
-            entityKilledBy.awardKillScore(this, scoreValue);
+    public void onDeath(Entity entityKilledBy) {
+        if (this.scoreValue >= 0 && entityKilledBy != null) {
+            entityKilledBy.awardKillScore(this, this.scoreValue);
         }
-        if(entityKilledBy != null)
-        {
+        if (entityKilledBy != null) {
             entityKilledBy.killed(this);
         }
-        dead = true;
-        if(!world.isClientSide)
-        {
+        this.dead = true;
+        if (!this.world.isClientSide) {
             dropDeathItems();
         }
-        if (vehicle != null){
-            vehicle.ejectRider();
-            vehicle = null;
+        if (this.vehicle != null) {
+            this.vehicle.ejectRider();
+            this.vehicle = null;
         }
-        world.sendTrackedEntityStatusUpdatePacket(this, (byte)3);
-        if (sendDeathMessage(entityKilledBy)){
-            world.sendGlobalMessage(getDeathMessage(entityKilledBy));
+        this.world.sendTrackedEntityStatusUpdatePacket(this, (byte) 3);
+        if (sendDeathMessage(entityKilledBy)) {
+            this.world.sendGlobalMessage(getDeathMessage(entityKilledBy));
         }
     }
 
-    public boolean sendDeathMessage(Entity entityKilledBy){
-        return !nickname.isEmpty();
+    public boolean sendDeathMessage(Entity entityKilledBy) {
+        return !this.nickname.isEmpty();
     }
-    public String getDeathMessage(Entity entityKilledBy){
+
+    public String getDeathMessage(Entity entityKilledBy) {
         final TextFormatting deathMsgColor = TextFormatting.RED;
         final TextFormatting reset = TextFormatting.RESET;
         String name = Entity.getNameFromEntity(this, true);
-        if (entityKilledBy != null){
+        if (entityKilledBy != null) {
             String murdererName = Entity.getNameFromEntity(entityKilledBy, true);
             return String.format("%s%s was killed by %s%s", name, deathMsgColor, reset, murdererName);
         }
-        if (world.isMaterialInBB(bb, Material.lava))
-        {
+        if (this.world.isMaterialInBB(this.bb, Materials.LAVA)) {
             return String.format("%s%s swam in lava.", name, deathMsgColor);
         }
-        if (world.getBlockId(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z)) == Blocks.SPIKES.id())
-        {
+        if (this.world.getBlockId(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z)) == Blocks.SPIKES.id()) {
             return String.format("%s%s got impaled.", name, deathMsgColor);
         }
-        if (fallDistance > 0)
-        {
+        if (this.fallDistance > 0) {
             return String.format("%s%s broke their legs.", name, deathMsgColor);
         }
-        if (airSupply <= 0)
-        {
+        if (this.airSupply <= 0) {
             return String.format("%s%s suffocated.", name, deathMsgColor);
         }
-        if (remainingFireTicks > 0)
-        {
+        if (this.remainingFireTicks > 0) {
             return String.format("%s%s was incinerated.", name, deathMsgColor);
         }
         return String.format("%s%s died", name, deathMsgColor);
     }
-    protected void dropDeathItems()
-    {
+
+    protected void dropDeathItems() {
         List<WeightedRandomLootObject> drops = getMobDrops();
-        if (drops != null){
-            for (WeightedRandomLootObject lootObject : drops){
+        if (drops != null) {
+            for (WeightedRandomLootObject lootObject : drops) {
                 ItemStack stack = lootObject.getItemStack();
                 if (stack == null) continue;
                 for (int i = 0; i < stack.stackSize; i++) {
@@ -706,52 +648,47 @@ public abstract class Mob extends Entity
         }
     }
 
-    protected List<WeightedRandomLootObject> getMobDrops(){
-        return mobDrops;
+    protected List<WeightedRandomLootObject> getMobDrops() {
+        return this.mobDrops;
     }
 
     @Override
-	protected void causeFallDamage(float distance)
-    {
+    protected void causeFallDamage(float distance) {
         super.causeFallDamage(distance);
         int i = (int) java.lang.Math.ceil(distance - 3F);
-        if(i > 0)
-        {
-            if (vehicle == null) {
+        if (i > 0) {
+            if (this.vehicle == null) {
                 hurt(null, i, DamageType.FALL);
             }
-            int j = world.getBlockId(MathHelper.floor(x), MathHelper.floor(y - 0.2D - (double) heightOffset), MathHelper.floor(z));
-            if(j > 0)
-            {
-                world.playBlockSoundEffect(this, this.x, this.y - this.heightOffset, this.z, Blocks.blocksList[j], EnumBlockSoundEffectType.ENTITY_LAND);
+            int j = this.world.getBlockId(MathHelper.floor(this.x), MathHelper.floor(this.y - 0.2D - (double) this.heightOffset), MathHelper.floor(this.z));
+            if (j > 0) {
+                this.world.playBlockSoundEffect(this, this.x, this.y - this.heightOffset, this.z, Blocks.blocksList[j], EnumBlockSoundEffectType.ENTITY_LAND);
             }
         }
     }
 
     public void setFlySpeed(float f) {
-    	this.noclipSpeed = f;
+        this.noclipSpeed = f;
     }
-    
+
     public void setFlightSmoothness(float flightSmoothness) {
-		this.flightSmoothness = flightSmoothness;
-	}
-    
-    public boolean canSkate()
-    {
+        this.flightSmoothness = flightSmoothness;
+    }
+
+    public boolean canSkate() {
         return false;
     }
 
-    public void moveEntityWithHeading(float moveStrafing, float moveForward)
-    {
-        Block<?> floorBlock = world.getBlock(MathHelper.floor(x), MathHelper.floor(bb.minY) - 1, MathHelper.floor(z));
-        Block<?> floorAboveBlock = world.getBlock(MathHelper.floor(x), MathHelper.floor(bb.minY), MathHelper.floor(z));
+    public void moveEntityWithHeading(float moveStrafing, float moveForward) {
+        Block<?> floorBlock = this.world.getBlock(MathHelper.floor(this.x), MathHelper.floor(this.bb.minY) - 1, MathHelper.floor(this.z));
+        Block<?> floorAboveBlock = this.world.getBlock(MathHelper.floor(this.x), MathHelper.floor(this.bb.minY), MathHelper.floor(this.z));
         this.muteStepSounds = false;
         this.isSkating = false;
 
-    	if(noPhysics) {
-    		int vertical = 0;
-    		if(isSneaking()) vertical--;
-    		if(isJumping) vertical++;
+        if (this.noPhysics) {
+            int vertical = 0;
+            if (isSneaking()) vertical--;
+            if (this.isJumping) vertical++;
     		
     		/*
     		// Change 0.50 to 0.25
@@ -762,101 +699,87 @@ public abstract class Mob extends Entity
     			adjustedSpeed = MathHelper.lerp(0.0f, 0.25f, noclipSpeed / 0.5f);
     		}
     		*/
-    		float adjustedSpeed = this.noclipSpeed;
-    		
-    		// 0.25 Speed and 1.00 Smoothness is vanilla creative mode
-    		float flySpeed = MathHelper.lerp(0.5f, 0.1f, flightSmoothness) * 2.0f * adjustedSpeed;
-    		float verticalFlySpeed = MathHelper.lerp(0.3f, 0.15f, flightSmoothness) * 4.0f * (adjustedSpeed > 0.25f ? ((adjustedSpeed) - 0.25f) * 0.5f + 0.25f : 0.25f);
-    		
-    		yd += verticalFlySpeed * vertical;
-    		
-    		moveRelative(moveStrafing, moveForward, flySpeed);
-    		move(xd, yd, zd);
-    		
-    		float mult = MathHelper.lerp(0.5f, 0.91f, flightSmoothness);
-    		float verticalMult = MathHelper.lerp(0.4f, 0.6f, flightSmoothness);
-    		
-    		xd *= mult;
-    		yd *= verticalMult;
-    		zd *= mult;
-    	}
-    	else if(isInWater())
-        {
-            double d = y;
+            float adjustedSpeed = this.noclipSpeed;
+
+            // 0.25 Speed and 1.00 Smoothness is vanilla creative mode
+            float flySpeed = MathHelper.lerp(0.5f, 0.1f, this.flightSmoothness) * 2.0f * adjustedSpeed;
+            float verticalFlySpeed = MathHelper.lerp(0.3f, 0.15f, this.flightSmoothness) * 4.0f * (adjustedSpeed > 0.25f ? ((adjustedSpeed) - 0.25f) * 0.5f + 0.25f : 0.25f);
+
+            this.yd += verticalFlySpeed * vertical;
+
+            moveRelative(moveStrafing, moveForward, flySpeed);
+            move(this.xd, this.yd, this.zd);
+
+            float mult = MathHelper.lerp(0.5f, 0.91f, this.flightSmoothness);
+            float verticalMult = MathHelper.lerp(0.4f, 0.6f, this.flightSmoothness);
+
+            this.xd *= mult;
+            this.yd *= verticalMult;
+            this.zd *= mult;
+        } else if (isInWater()) {
+            double d = this.y;
             moveRelative(moveStrafing, moveForward, 0.02F);
-            move(xd, yd, zd);
-            xd *= 0.8D;
-            yd *= 0.8D;
-            zd *= 0.8D;
-            yd -= 0.02D;
-            int blockX = MathHelper.floor(x);
-            int blockY = MathHelper.floor(y - heightOffset);
-            int blockZ = MathHelper.floor(z);
-            Block<?> b = world.getBlock(blockX, blockY, blockZ);
+            move(this.xd, this.yd, this.zd);
+            this.xd *= 0.8D;
+            this.yd *= 0.8D;
+            this.zd *= 0.8D;
+            this.yd -= 0.02D;
+            int blockX = MathHelper.floor(this.x);
+            int blockY = MathHelper.floor(this.y - this.heightOffset);
+            int blockZ = MathHelper.floor(this.z);
+            Block<?> b = this.world.getBlock(blockX, blockY, blockZ);
             float depth = 0.6f;
             if (b != null) {
-                depth = 1 - (float) b.getBlockBoundsFromState(world, blockX, blockY, blockZ).maxY;
+                depth = 1 - (float) b.getBlockBoundsFromState(this.world, blockX, blockY, blockZ).maxY();
             }
-            if(horizontalCollision && isFree(xd, ((yd + depth + 0.2) - y) + d, zd))
-            {
-                yd = 0.3D;
+            if (this.horizontalCollision && isFree(this.xd, ((this.yd + depth + 0.2) - this.y) + d, this.zd)) {
+                this.yd = 0.3D;
             }
-        }
-        else if(isInLava())
-        {
-            double d1 = y;
+        } else if (isInLava()) {
+            double d1 = this.y;
             moveRelative(moveStrafing, moveForward, 0.02F);
-            move(xd, yd, zd);
-            xd *= 0.5D;
-            yd *= 0.5D;
-            zd *= 0.5D;
-            yd -= 0.02D;
-            if(horizontalCollision && isFree(xd, ((yd + 0.6D) - y) + d1, zd))
-            {
-                yd = 0.3D;
+            move(this.xd, this.yd, this.zd);
+            this.xd *= 0.5D;
+            this.yd *= 0.5D;
+            this.zd *= 0.5D;
+            this.yd -= 0.02D;
+            if (this.horizontalCollision && isFree(this.xd, ((this.yd + 0.6D) - this.y) + d1, this.zd)) {
+                this.yd = 0.3D;
             }
-        }
-        else if (canSkate() && BlockTags.SKATEABLE.appliesTo(floorBlock))
-        {
-            muteStepSounds = true;
-            isSkating = true;
-            move(xd, yd, zd);
-            xd *= 0.99D;
-            zd *= 0.99D;
-            yd -= 0.08D;
-            yd *= 0.98D;
-            double speedSquared = (xd * xd) + (zd * zd);
-            if (Math.abs(xd) < 0.001D) xd = 0.0D;
-            if (Math.abs(zd) < 0.001D) zd = 0.0D;
-            if (isSneaking())
-            {
-                xd *= 0.8D;
-                zd *= 0.8D;
-                world.playSoundAtEntity(null, this, "random.skate", (float)Math.sqrt(speedSquared) * 2.0f + random.nextFloat() * 0.2f - 0.25f, 1.75f + (random.nextFloat() * 0.4f - 0.2f));
+        } else if (canSkate() && BlockTags.SKATEABLE.appliesTo(floorBlock)) {
+            this.muteStepSounds = true;
+            this.isSkating = true;
+            move(this.xd, this.yd, this.zd);
+            this.xd *= 0.99D;
+            this.zd *= 0.99D;
+            this.yd -= 0.08D;
+            this.yd *= 0.98D;
+            double speedSquared = (this.xd * this.xd) + (this.zd * this.zd);
+            if (Math.abs(this.xd) < 0.001D) this.xd = 0.0D;
+            if (Math.abs(this.zd) < 0.001D) this.zd = 0.0D;
+            if (isSneaking()) {
+                this.xd *= 0.8D;
+                this.zd *= 0.8D;
+                this.world.playSoundAtEntity(null, this, "random.skate", (float) Math.sqrt(speedSquared) * 2.0f + this.random.nextFloat() * 0.2f - 0.25f, 1.75f + (this.random.nextFloat() * 0.4f - 0.2f));
             }
-            if ((lastStrafe < 0 && moveStrafing > 0) || (lastStrafe > 0 && moveStrafing < 0))
-            {
+            if ((this.lastStrafe < 0 && moveStrafing > 0) || (this.lastStrafe > 0 && moveStrafing < 0)) {
                 moveRelative(moveStrafing * 0.1f, 0.0f, 0.125f);
                 float speedBoost = 0.025f;
                 float maxSpeed = 0.5f;
-                float dx = MathHelper.sin((yRot * MathHelper.PI) / 180F);
-                float dz = MathHelper.cos((yRot * MathHelper.PI) / 180F);
-                double newMotionX = xd - speedBoost * dx;
-                double newMotionZ = zd + speedBoost * dz;
-                if ((newMotionX * newMotionX) + (newMotionZ * newMotionZ) < maxSpeed * maxSpeed)
-                {
-                    xd = newMotionX;
-                    zd = newMotionZ;
+                float dx = MathHelper.sin((this.yRot * MathHelper.PI) / 180F);
+                float dz = MathHelper.cos((this.yRot * MathHelper.PI) / 180F);
+                double newMotionX = this.xd - speedBoost * dx;
+                double newMotionZ = this.zd + speedBoost * dz;
+                if ((newMotionX * newMotionX) + (newMotionZ * newMotionZ) < maxSpeed * maxSpeed) {
+                    this.xd = newMotionX;
+                    this.zd = newMotionZ;
                 }
-                world.playSoundAtEntity(null, this, "random.skate", (float)Math.sqrt(speedSquared) * 0.75f + random.nextFloat() * 0.2f, 2f + (random.nextFloat() * 0.4f - 0.2f));
+                this.world.playSoundAtEntity(null, this, "random.skate", (float) Math.sqrt(speedSquared) * 0.75f + this.random.nextFloat() * 0.2f, 2f + (this.random.nextFloat() * 0.4f - 0.2f));
             }
-            if (moveStrafing != 0) lastStrafe = moveStrafing;
-        }
-        else
-        {
+            if (moveStrafing != 0) this.lastStrafe = moveStrafing;
+        } else {
             float movementScale = 0.91F;
-            if(onGround)
-            {
+            if (this.onGround) {
                 movementScale = 0.5460001F;
                 if (BlockTags.OVERRIDE_FRICTION.appliesTo(floorAboveBlock)) {
                     movementScale = floorAboveBlock.friction * 0.91F;
@@ -866,74 +789,63 @@ public abstract class Mob extends Entity
             }
 
             float f3 = 0.1627714F / (movementScale * movementScale * movementScale);
-            moveRelative(moveStrafing, moveForward, onGround ? speed * f3 : flySpeed);
-            if(canClimb())
-            {
+            moveRelative(moveStrafing, moveForward, this.onGround ? this.speed * f3 : this.flySpeed);
+            if (canClimb()) {
                 float f4 = 0.15F;
-                if(xd < (double)(-f4))
-                {
-                    xd = -f4;
+                if (this.xd < (double) (-f4)) {
+                    this.xd = -f4;
                 }
-                if(xd > (double)f4)
-                {
-                    xd = f4;
+                if (this.xd > (double) f4) {
+                    this.xd = f4;
                 }
-                if(zd < (double)(-f4))
-                {
-                    zd = -f4;
+                if (this.zd < (double) (-f4)) {
+                    this.zd = -f4;
                 }
-                if(zd > (double)f4)
-                {
-                    zd = f4;
+                if (this.zd > (double) f4) {
+                    this.zd = f4;
                 }
-                fallDistance = 0.0F;
-                if(yd < -0.25D)
-                {
-                    yd = -0.25D;
+                this.fallDistance = 0.0F;
+                if (this.yd < -0.25D) {
+                    this.yd = -0.25D;
                 }
-                if(isSneaking() && yd < 0.0D)
-                {
-                    yd = 0.0D;
+                if (isSneaking() && this.yd < 0.0D) {
+                    this.yd = 0.0D;
                 }
             }
-            move(xd, yd, zd);
-            if((horizontalCollision || isJumping) && canClimb())
-            {
-                yd = 0.25D;
+            move(this.xd, this.yd, this.zd);
+            if ((this.horizontalCollision || this.isJumping) && canClimb()) {
+                this.yd = 0.25D;
             }
-            if (!onGround){
-                movementScale = MathHelper.lerp(movementScale, 1f, pushTime);
+            if (!this.onGround) {
+                movementScale = MathHelper.lerp(movementScale, 1f, this.pushTime);
             }
-            yd -= 0.08D;
-            yd *= 0.98D;
-            xd *= movementScale;
-            zd *= movementScale;
-        }
-        walkAnimSpeedO = walkAnimSpeed;
-        double d2 = x - xo;
-        double d3 = z - zo;
+            this.yd -= 0.08D;
+            this.yd *= 0.98D;
+            this.xd *= movementScale;
+            this.zd *= movementScale;
+        }
+        this.walkAnimSpeedO = this.walkAnimSpeed;
+        double d2 = this.x - this.xo;
+        double d3 = this.z - this.zo;
         float f5 = MathHelper.sqrt(d2 * d2 + d3 * d3) * 4F;
-        if(f5 > 1.0F)
-        {
+        if (f5 > 1.0F) {
             f5 = 1.0F;
         }
-        walkAnimSpeed += (f5 - walkAnimSpeed) * 0.4F;
-        walkAnimPos += walkAnimSpeed;
+        this.walkAnimSpeed += (f5 - this.walkAnimSpeed) * 0.4F;
+        this.walkAnimPos += this.walkAnimSpeed;
     }
 
-    public boolean canClimb()
-    {
-        int i = MathHelper.floor(x);
-        int j = MathHelper.floor(bb.minY);
-        int k = MathHelper.floor(z);
-        Block<?> block = world.getBlock(i, j, k);
-        return block != null && block.isClimbable(world, i, j, k);
+    public boolean canClimb() {
+        int i = MathHelper.floor(this.x);
+        int j = MathHelper.floor(this.bb.minY);
+        int k = MathHelper.floor(this.z);
+        Block<?> block = this.world.getBlock(i, j, k);
+        return block != null && block.isClimbable(this.world, i, j, k);
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull final CompoundTag tag)
-    {
-        tag.putShort("Health", (short)getHealth());
+    public void addAdditionalSaveData(@NotNull final CompoundTag tag) {
+        tag.putShort("Health", (short) getHealth());
         tag.putShort("HurtTime", (short) this.hurtTime);
         tag.putShort("DeathTime", (short) this.deathTime);
         tag.putShort("AttackTime", (short) this.attackTime);
@@ -944,11 +856,9 @@ public abstract class Mob extends Entity
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull final CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull final CompoundTag tag) {
         setHealthRaw(tag.getShort("Health"));
-        if(!tag.containsKey("Health"))
-        {
+        if (!tag.containsKey("Health")) {
             setHealthRaw(getMaxHealth());
         }
         this.hurtTime = tag.getShort("HurtTime");
@@ -961,400 +871,340 @@ public abstract class Mob extends Entity
     }
 
     @Override
-	public boolean isAlive()
-    {
-        return !removed && getHealth() > 0;
+    public boolean isAlive() {
+        return !this.removed && getHealth() > 0;
     }
 
-    public boolean canBreatheUnderwater()
-    {
+    public boolean canBreatheUnderwater() {
         return false;
     }
 
-    public void onLivingUpdate()
-    {
-        if(newPosRotationIncrements > 0)
-        {
-            double d = x + (newPosX - x) / (double)newPosRotationIncrements;
-            double d1 = y + (newPosY - y) / (double)newPosRotationIncrements;
-            double d2 = z + (newPosZ - z) / (double)newPosRotationIncrements;
+    public void onLivingUpdate() {
+        if (this.newPosRotationIncrements > 0) {
+            double d = this.x + (this.newPosX - this.x) / (double) this.newPosRotationIncrements;
+            double d1 = this.y + (this.newPosY - this.y) / (double) this.newPosRotationIncrements;
+            double d2 = this.z + (this.newPosZ - this.z) / (double) this.newPosRotationIncrements;
             double d3;
-            for(d3 = newRotationYaw - (double) yRot; d3 < -180D; d3 += 360D) { }
-            for(; d3 >= 180D; d3 -= 360D) { }
-            yRot += d3 / (double)newPosRotationIncrements;
-            xRot += (newRotationPitch - (double) xRot) / (double)newPosRotationIncrements;
-            newPosRotationIncrements--;
+            for (d3 = this.newRotationYaw - (double) this.yRot; d3 < -180D; d3 += 360D) {
+            }
+            for (; d3 >= 180D; d3 -= 360D) {
+            }
+            this.yRot += d3 / (double) this.newPosRotationIncrements;
+            this.xRot += (this.newRotationPitch - (double) this.xRot) / (double) this.newPosRotationIncrements;
+            this.newPosRotationIncrements--;
             setPos(d, d1, d2);
-            setRot(yRot, xRot);
-            List<AABB> list1 = world.getCubes(this, bb.getInsetBoundingBox(0.03125D, 0.0D, 0.03125D));
-            if(!list1.isEmpty())
-            {
+            setRot(this.yRot, this.xRot);
+            List<AABBdc> list1 = this.world.getCubes(this, MathHelper.aabbInsetBoundingBox(this.bb, 0.03125D, 0.0D, 0.03125D, new AABBd()));
+            if (!list1.isEmpty()) {
                 double d4 = 0.0D;
-                for(int j = 0; j < list1.size(); j++)
-                {
-                    AABB aabb = list1.get(j);
-                    if(aabb.maxY > d4)
-                    {
-                        d4 = aabb.maxY;
+                for (int j = 0; j < list1.size(); j++) {
+                    AABBdc aabb = list1.get(j);
+                    if (aabb.maxY() > d4) {
+                        d4 = aabb.maxY();
                     }
                 }
 
-                d1 += d4 - bb.minY;
+                d1 += d4 - this.bb.minY;
                 setPos(d, d1, d2);
             }
         }
-        if(isMovementBlocked())
-        {
-            isJumping = false;
-            moveStrafing = 0.0F;
-            moveForward = 0.0F;
-            randomYawVelocity = 0.0F;
-        } else
-        if(!isMultiplayerEntity)
-        {
+        if (isMovementBlocked()) {
+            this.isJumping = false;
+            this.moveStrafing = 0.0F;
+            this.moveForward = 0.0F;
+            this.randomYawVelocity = 0.0F;
+        } else if (!this.isMultiplayerEntity) {
             updateAI();
         }
         boolean inWater = isInWater();
         boolean inLava = isInLava();
-        if(isJumping)
-        {
-            if(inWater)
-            {
-                yd += 0.04D;
-            } else
-            if(inLava)
-            {
-                yd += 0.04D;
-            } else
-            if(onGround)
-            {
+        if (this.isJumping) {
+            if (inWater) {
+                this.yd += 0.04D;
+            } else if (inLava) {
+                this.yd += 0.04D;
+            } else if (this.onGround) {
                 jump();
             }
         }
-        moveStrafing *= 0.98F;
-        moveForward *= 0.98F;
-        randomYawVelocity *= 0.9F;
-        moveEntityWithHeading(moveStrafing, moveForward);
-        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.grow(0.2D, 0.0D, 0.2D));
-        if(list != null && !list.isEmpty())
-        {
-            for(int i = 0; i < list.size(); i++)
-            {
+        this.moveStrafing *= 0.98F;
+        this.moveForward *= 0.98F;
+        this.randomYawVelocity *= 0.9F;
+        moveEntityWithHeading(this.moveStrafing, this.moveForward);
+        List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, MathHelper.aabbGrow(this.bb, 0.2D, 0.0D, 0.2D, new AABBd()));
+        if (!list.isEmpty()) {
+            for (int i = 0; i < list.size(); i++) {
                 Entity entity = list.get(i);
-                if(entity.isPushable())
-                {
+                if (entity.isPushable()) {
                     entity.push(this);
                 }
             }
-
         }
     }
 
-    protected boolean isMovementBlocked()
-    {
+    protected boolean isMovementBlocked() {
         return getHealth() <= 0;
     }
 
-    protected void jump()
-    {
-    	if(noPhysics) {
-    		return;
-    	}
-        yd = jumpHeight;
-        if (isSprinting())
-        {
-            float f = yRot * 0.01745329F;
-            xd -= MathHelper.sin(f) * 0.2F;
-            zd += MathHelper.cos(f) * 0.2F;
+    protected void jump() {
+        if (this.noPhysics) {
+            return;
+        }
+        this.yd = this.jumpHeight;
+        if (isSprinting()) {
+            float f = this.yRot * 0.01745329F;
+            this.xd -= MathHelper.sin(f) * 0.2F;
+            this.zd += MathHelper.cos(f) * 0.2F;
         }
     }
 
-    protected boolean canDespawn()
-    {
-        return nickname.isEmpty();
+    protected boolean canDespawn() {
+        return this.nickname.isEmpty();
     }
 
-    public void tryToDespawn()
-    {
-        Player entityplayer = world.getClosestPlayerToEntity(this, -1D);
-        if(canDespawn() && entityplayer != null)
-        {
-            double d = entityplayer.x - x;
-            double d1 = entityplayer.y - y;
-            double d2 = entityplayer.z - z;
+    public void tryToDespawn() {
+        Player entityplayer = this.world.getClosestPlayerToEntity(this, -1D);
+        if (canDespawn() && entityplayer != null) {
+            double d = entityplayer.x - this.x;
+            double d1 = entityplayer.y - this.y;
+            double d2 = entityplayer.z - this.z;
             double d3 = d * d + d1 * d1 + d2 * d2;
-            if(d3 > 16384D) // 128 * 128
+            if (d3 > 16384D) // 128 * 128
             {
                 remove();
             }
-            if(entityAge > 600 && random.nextInt(800) == 0)
-            {
-                if(d3 < 1024D)
-                {
-                    entityAge = 0;
-                } else
-                {
+            if (this.entityAge > 600 && this.random.nextInt(800) == 0) {
+                if (d3 < 1024D) {
+                    this.entityAge = 0;
+                } else {
                     remove();
                 }
             }
         }
     }
 
-    protected void updateAI()
-    {
-        entityAge++;
+    protected void updateAI() {
+        this.entityAge++;
         tryToDespawn();
-        moveStrafing = 0.0F;
-        moveForward = 0.0F;
+        this.moveStrafing = 0.0F;
+        this.moveForward = 0.0F;
         float f = 8F;
-        if(random.nextFloat() < 0.02F)
-        {
-            Player entityplayer1 = world.getClosestPlayerToEntity(this, f);
-            if(entityplayer1 != null)
-            {
-                currentTarget = entityplayer1;
-                numTicksToChaseTarget = 10 + random.nextInt(20);
-            } else
-            {
-                randomYawVelocity = (random.nextFloat() - 0.5F) * 20F;
+        if (this.random.nextFloat() < 0.02F) {
+            Player entityplayer1 = this.world.getClosestPlayerToEntity(this, f);
+            if (entityplayer1 != null) {
+                this.currentTarget = entityplayer1;
+                this.numTicksToChaseTarget = 10 + this.random.nextInt(20);
+            } else {
+                this.randomYawVelocity = (this.random.nextFloat() - 0.5F) * 20F;
             }
         }
-        if(currentTarget != null)
-        {
-            lookAt(currentTarget, 10F, getLookingTilt());
-            if(numTicksToChaseTarget-- <= 0 || currentTarget.removed || currentTarget.distanceToSqr(this) > (double)(f * f))
-            {
-                currentTarget = null;
+        if (this.currentTarget != null) {
+            lookAt(this.currentTarget, 10F, getLookingTilt());
+            if (this.numTicksToChaseTarget-- <= 0 || this.currentTarget.removed || this.currentTarget.distanceToSqr(this) > (double) (f * f)) {
+                this.currentTarget = null;
             }
-        } else
-        {
-            if(random.nextFloat() < 0.05F)
-            {
-                randomYawVelocity = (random.nextFloat() - 0.5F) * 20F;
+        } else {
+            if (this.random.nextFloat() < 0.05F) {
+                this.randomYawVelocity = (this.random.nextFloat() - 0.5F) * 20F;
             }
-            yRot += randomYawVelocity;
-            xRot = defaultPitch;
+            this.yRot += this.randomYawVelocity;
+            this.xRot = this.defaultPitch;
         }
         boolean inWater = isInWater();
         boolean inLava = isInLava();
-        if(inWater || inLava)
-        {
-            isJumping = random.nextFloat() < 0.8F;
+        if (inWater || inLava) {
+            this.isJumping = this.random.nextFloat() < 0.8F;
         }
     }
 
-    protected int getLookingTilt()
-    {
+    protected int getLookingTilt() {
         return 40;
     }
 
-    public void lookAt(Entity entity, float yRot, float xRot)
-    {
+    public void lookAt(Entity entity, float yRot, float xRot) {
         double x = entity.x - this.x;
-        double y = entity.z - z;
+        double y = entity.z - this.z;
         double y2;
-        if(entity instanceof Mob)
-        {
-            Mob mob = (Mob)entity;
+        if (entity instanceof Mob mob) {
             y2 = mob.y + mob.getHeadHeight() - (this.y + this.getHeadHeight());
-        } else
-        {
+        } else {
             y2 = (entity.bb.minY + entity.bb.maxY) / 2D - (this.y + (double) getHeadHeight());
         }
         double d3 = MathHelper.sqrt(x * x + y * y);
-        float f2 = (float)((Math.atan2(y, x) * 180D) / Math.PI) - 90F;
-        float f3 = (float)(-((Math.atan2(-y2, d3) * 180D) / Math.PI));
+        float f2 = (float) ((Math.atan2(y, x) * 180D) / Math.PI) - 90F;
+        float f3 = (float) (-((Math.atan2(-y2, d3) * 180D) / Math.PI));
         this.xRot = -rotationLerp(this.xRot, f3, xRot);
         this.yRot = rotationLerp(this.yRot, f2, yRot);
     }
 
-    public boolean hasCurrentTarget()
-    {
-        return currentTarget != null;
+    public boolean hasCurrentTarget() {
+        return this.currentTarget != null;
     }
 
-    public Entity getCurrentTarget()
-    {
-        return currentTarget;
+    public Entity getCurrentTarget() {
+        return this.currentTarget;
     }
 
     private float rotationLerp(float f, float f1, float f2) // Was called rotLerp in the b1.2 leak
     {
         float f3;
-        for(f3 = f1 - f; f3 < -180F; f3 += 360F) { }
-        for(; f3 >= 180F; f3 -= 360F) { }
-        if(f3 > f2)
-        {
+        for (f3 = f1 - f; f3 < -180F; f3 += 360F) {
+        }
+        for (; f3 >= 180F; f3 -= 360F) {
+        }
+        if (f3 > f2) {
             f3 = f2;
         }
-        if(f3 < -f2)
-        {
+        if (f3 < -f2) {
             f3 = -f2;
         }
         return f + f3;
     }
 
-    public void beforeRemove()
-    {
+    public void beforeRemove() {
     }
 
-    public boolean canSpawnHere()
-    {
-        int blockX = MathHelper.floor(x);
-        int blockY = MathHelper.floor(bb.minY);
-        int blockZ = MathHelper.floor(z);
-        if(Blocks.hasTag(world.getBlockId(blockX, blockY, blockZ), BlockTags.PREVENT_MOB_SPAWNS)) {
-        	return false;
+    public boolean canSpawnHere() {
+        int blockX = MathHelper.floor(this.x);
+        int blockY = MathHelper.floor(this.bb.minY);
+        int blockZ = MathHelper.floor(this.z);
+        if (Blocks.hasTag(this.world.getBlockId(blockX, blockY, blockZ), BlockTags.PREVENT_MOB_SPAWNS)) {
+            return false;
         }
-        return world.checkIfAABBIsClear(bb) && world.getCubes(this, bb).size() == 0 && !world.getIsAnyLiquid(bb);
+        return this.world.checkIfAABBIsClear(this.bb) && this.world.getCubes(this, this.bb).isEmpty() && !this.world.getIsAnyLiquid(this.bb);
     }
 
     @Override
-	public void outOfWorld()
-    {
+    public void outOfWorld() {
         hurt(null, 4, null);
     }
 
-    public float getSwingProgress(float partialTick)
-    {
-        float f1 = swingProgress - prevSwingProgress;
-        if(f1 < 0.0F)
-        {
+    public float getSwingProgress(float partialTick) {
+        float f1 = this.swingProgress - this.prevSwingProgress;
+        if (f1 < 0.0F) {
             f1++;
         }
-        return prevSwingProgress + f1 * partialTick;
+        return this.prevSwingProgress + f1 * partialTick;
     }
 
-    public Vec3 getPosition(float partialTick, boolean headOffset)
-    {
-        if(partialTick == 1.0F || isRemoved())
-        {
-            return Vec3.fromPool(x, y + (headOffset ? getHeadHeight() : 0), z);
-        } else
-        {
-            double x = MathHelper.lerp(xo, this.x, partialTick);
-            double y = MathHelper.lerp(yo, this.y, partialTick);
-            double z = MathHelper.lerp(zo, this.z, partialTick);
-            return Vec3.fromPool(x, y + (headOffset ? getHeadHeight() : 0), z);
+    public @NotNull Vector3dc getPosition(float partialTick, boolean headOffset) {
+        if (partialTick == 1.0F || isRemoved()) {
+            return new Vector3d(this.x, this.y + (headOffset ? getHeadHeight() : 0), this.z);
+        } else {
+            double x = MathHelper.lerp(this.xo, this.x, partialTick);
+            double y = MathHelper.lerp(this.yo, this.y, partialTick);
+            double z = MathHelper.lerp(this.zo, this.z, partialTick);
+            return new Vector3d(x, y + (headOffset ? getHeadHeight() : 0), z);
         }
     }
 
     @Override
-	public Vec3 getViewVector(float partialTick)
-    {
-        if(partialTick == 1.0F || isRemoved())
-        {
-            float z = MathHelper.cos(-yRot * (MathHelper.PI / 180f) - MathHelper.PI);
-            float x = MathHelper.sin(-yRot * (MathHelper.PI / 180f) - MathHelper.PI);
-            float xzLen = -MathHelper.cos(-xRot * (MathHelper.PI / 180f));
-            float y = MathHelper.sin(-xRot * (MathHelper.PI / 180f));
-            return Vec3.fromPool(x * xzLen, y, z * xzLen);
-        }
-        else
-        {
-            float pitch = xRotO + (xRot - xRotO) * partialTick;
-            float yaw = yRotO + (yRot - yRotO) * partialTick;
-            float xzLen = -MathHelper.cos(-pitch * (MathHelper.PI / 180f));
-            float x = MathHelper.sin(-yaw * (MathHelper.PI / 180f) - MathHelper.PI);
-            float y = MathHelper.sin(-pitch * (MathHelper.PI / 180f));
-            float z = MathHelper.cos(-yaw * (MathHelper.PI / 180f) - MathHelper.PI);
-            return Vec3.fromPool(x * xzLen, y, z * xzLen);
+    public @Nullable Vector3dc getViewVector(float partialTick) {
+        if (partialTick == 1.0F || isRemoved()) {
+            float pitch = org.joml.Math.toRadians(this.xRot);
+            float yaw = org.joml.Math.toRadians(this.yRot);
+            float xzLen = -MathHelper.cos(-pitch);
+            float x = MathHelper.sin(-yaw - MathHelper.PI);
+            float y = MathHelper.sin(-pitch);
+            float z = MathHelper.cos(-yaw - MathHelper.PI);
+            return new Vector3d(x * xzLen, y, z * xzLen);
+        } else {
+            float pitch = org.joml.Math.toRadians(this.xRotO + (this.xRot - this.xRotO) * partialTick);
+            float yaw = org.joml.Math.toRadians(this.yRotO + (this.yRot - this.yRotO) * partialTick);
+            float xzLen = -MathHelper.cos(-pitch);
+            float x = MathHelper.sin(-yaw - MathHelper.PI);
+            float y = MathHelper.sin(-pitch);
+            float z = MathHelper.cos(-yaw - MathHelper.PI);
+            return new Vector3d(x * xzLen, y, z * xzLen);
         }
     }
 
 
-    public @Nullable HitResult rayCast(double distance, float partialTick, boolean collideWithFluids, boolean ignoreNonColliderBlocks, boolean useSelectorBoxes)
-    {
-        Vec3 head = getPosition(partialTick, true);
-        Vec3 viewDirection = getViewVector(partialTick);
-        Vec3 furthestPoint = head.add(viewDirection.x * distance, viewDirection.y * distance, viewDirection.z * distance);
-        return world.checkBlockCollisionBetweenPoints(head, furthestPoint, collideWithFluids, ignoreNonColliderBlocks, useSelectorBoxes);
+    public @Nullable HitResult rayCast(double distance, float partialTick, boolean collideWithFluids, boolean ignoreNonColliderBlocks, boolean useSelectorBoxes) {
+        Vector3dc head = getPosition(partialTick, true);
+        Vector3dc viewDirection = getViewVector(partialTick);
+        assert viewDirection != null;
+        Vector3dc furthestPoint = head.add(viewDirection.x() * distance, viewDirection.y() * distance, viewDirection.z() * distance, new Vector3d());
+        return this.world.checkBlockCollisionBetweenPoints(head, furthestPoint, collideWithFluids, ignoreNonColliderBlocks, useSelectorBoxes);
     }
 
-    public int getMaxSpawnedInChunk()
-    {
+    public int getMaxSpawnedInChunk() {
         return 4;
     }
 
     @Override
-	public void handleEntityEvent(byte byte0, float attackedAtYaw)
-    {
-        if(byte0 == 2)
-        {
-            walkAnimSpeed = 1.5F;
-            heartsFlashTime = heartsHalvesLife;
-            hurtTime = maxHurtTime = 10;
+    public void handleEntityEvent(byte byte0, float attackedAtYaw) {
+        if (byte0 == 2) {
+            this.walkAnimSpeed = 1.5F;
+            this.heartsFlashTime = this.heartsHalvesLife;
+            this.hurtTime = this.maxHurtTime = 10;
             this.attackedAtYaw = attackedAtYaw;
             hurt(null, 0, null);
-        } else
-        if(byte0 == 3)
-        {
+        } else if (byte0 == 3) {
             setHealthRaw(0);
             onDeath(null);
-        } else
-        {
+        } else {
             super.handleEntityEvent(byte0, attackedAtYaw);
         }
     }
 
-    public boolean isPlayerSleeping()
-    {
+    public boolean isPlayerSleeping() {
         return false;
     }
 
-    
+
     public @NotNull Direction getHorizontalPlacementDirection(Side side) {
-    	return getHorizontalPlacementDirection(side, PlacementMode.FACING);
+        return getHorizontalPlacementDirection(side, PlacementMode.FACING);
     }
-    
+
     public @NotNull Direction getHorizontalPlacementDirection(Side side, PlacementMode mode) {
-    	if(this.rotationLockHorizontal != null && this.rotationLockHorizontal != Direction.NONE) {
-    		return rotationLockHorizontal;
-    	}
-    	if(this.placementModeOverride != PlacementMode.DEFAULT) {
-    		mode = this.placementModeOverride;
-    	}
-    	if(mode == PlacementMode.SIDE && side != null && side.isHorizontal()) {
-    		return side.getDirection().getOpposite();
-    	}
-    	return Direction.getHorizontalDirection(this);
-    }
-    
+        if (this.rotationLockHorizontal != null && this.rotationLockHorizontal != Direction.NONE) {
+            return this.rotationLockHorizontal;
+        }
+        if (this.placementModeOverride != PlacementMode.DEFAULT) {
+            mode = this.placementModeOverride;
+        }
+        if (mode == PlacementMode.SIDE && side != null && side.isHorizontal()) {
+            return side.getDirection().getOpposite();
+        }
+        return Direction.getHorizontalDirection(this);
+    }
+
     public @NotNull Direction getPlacementDirection(final @NotNull Side side) {
-    	return getPlacementDirection(side, PlacementMode.FACING);
+        return getPlacementDirection(side, PlacementMode.FACING);
     }
-    
+
     public @NotNull Direction getPlacementDirection(final @Nullable Side side, @NotNull PlacementMode mode) {
-    	if(this.rotationLock != null && this.rotationLock != Direction.NONE) {
-    		return rotationLock;
-    	}
-    	if(this.placementModeOverride != PlacementMode.DEFAULT) {
-    		mode = this.placementModeOverride;
-    	}
-    	if(mode == PlacementMode.SIDE && side != null) {
-    		return side.getDirection();
-    	}
-    	return Direction.getDirection(this);
-    }
-    
+        if (this.rotationLock != null && this.rotationLock != Direction.NONE) {
+            return this.rotationLock;
+        }
+        if (this.placementModeOverride != PlacementMode.DEFAULT) {
+            mode = this.placementModeOverride;
+        }
+        if (mode == PlacementMode.SIDE && side != null) {
+            return side.getDirection();
+        }
+        return Direction.getDirection(this);
+    }
+
     public Direction getVerticalPlacementDirection(Side side, double sideHeight) {
-    	return getVerticalPlacementDirection(side, sideHeight, PlacementMode.SIDE);
+        return getVerticalPlacementDirection(side, sideHeight, PlacementMode.SIDE);
     }
-    
+
     public Direction getVerticalPlacementDirection(Side side, double sideHeight, PlacementMode mode) {
-    	if(this.rotationLockVertical != null && this.rotationLockVertical != Direction.NONE) {
-    		return this.rotationLockVertical;
-    	}
-    	if(this.placementModeOverride != PlacementMode.DEFAULT) {
-    		mode = this.placementModeOverride;
-    	}
-    	if(mode == PlacementMode.SIDE) {
-    		if(side.isVertical()) {
-    			return side.getDirection().getOpposite();
-    		}else {
-    			return sideHeight > 0.5 ? Direction.UP : Direction.DOWN;
-    		}
-    	}
-    	return xRot < 0.0f ? Direction.UP : Direction.DOWN;
+        if (this.rotationLockVertical != null && this.rotationLockVertical != Direction.NONE) {
+            return this.rotationLockVertical;
+        }
+        if (this.placementModeOverride != PlacementMode.DEFAULT) {
+            mode = this.placementModeOverride;
+        }
+        if (mode == PlacementMode.SIDE) {
+            if (side.isVertical()) {
+                return side.getDirection().getOpposite();
+            } else {
+                return sideHeight > 0.5 ? Direction.UP : Direction.DOWN;
+            }
+        }
+        return this.xRot < 0.0f ? Direction.UP : Direction.DOWN;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/MobAge.java b/game/core/src/main/java/net/minecraft/core/entity/MobAge.java
index 831606235..3027d248c 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/MobAge.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/MobAge.java
@@ -2,10 +2,11 @@ package net.minecraft.core.entity;
 
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.Global;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class MobAge
 {
@@ -21,7 +22,7 @@ public class MobAge
 
     private final @NotNull Mob mob;
     private final int maxAge;
-    private @Nullable AABB boundingBox = null;
+    private @Nullable AABBd boundingBox = null;
 
     private int ageDays;
     private long ticksInDay = 0;
@@ -56,12 +57,12 @@ public class MobAge
 
     public void tick(final @NotNull World world) {
 
-        if (this.boundingBox == null) {
-            final @Nullable AABB mobBB = this.mob.getBb();
-            if (mobBB != null) {
-                this.boundingBox = mobBB.copyPermanent();
-            }
-        }
+//        if (this.boundingBox == null) {
+//            final @Nullable AABBdc mobBB = this.mob.getCollisionAABB();
+//            if (mobBB != null) {
+//                this.boundingBox = new AABBd(mobBB);
+//            }
+//        }
         if (isAtMaxAge()) {
             return;
         }
@@ -83,18 +84,19 @@ public class MobAge
             this.ticksInDay -= Global.DAY_LENGTH_TICKS;
         }
 
-        // Update mob attributes
-        if (currentAge < this.maxAge && this.boundingBox != null) {
-            // Update mob size
-            final float size = getAgeScale();
-
-            this.mob.getBb().minX = this.boundingBox.minX * size;
-            this.mob.getBb().minY = this.boundingBox.minY * size;
-            this.mob.getBb().minZ = this.boundingBox.minZ * size;
-            this.mob.getBb().maxX = this.boundingBox.maxX * size;
-            this.mob.getBb().maxY = this.boundingBox.maxY * size;
-            this.mob.getBb().maxZ = this.boundingBox.maxZ * size;
-        }
+        // TODO this is insane and wrong, and before didn't even run
+//        // Update mob attributes
+//        if (currentAge < this.maxAge && this.boundingBox != null) {
+//            // Update mob size
+//            final float size = getAgeScale();
+//
+//            this.mob.getCollisionAABB().minX = this.boundingBox.minX * size;
+//            this.mob.getCollisionAABB().minY = this.boundingBox.minY * size;
+//            this.mob.getCollisionAABB().minZ = this.boundingBox.minZ * size;
+//            this.mob.getCollisionAABB().maxX = this.boundingBox.maxX * size;
+//            this.mob.getCollisionAABB().maxY = this.boundingBox.maxY * size;
+//            this.mob.getCollisionAABB().maxZ = this.boundingBox.maxZ * size;
+//        }
     }
 
     public void writeTag(final @NotNull CompoundTag mobTag) {
diff --git a/game/core/src/main/java/net/minecraft/core/entity/MobPathfinder.java b/game/core/src/main/java/net/minecraft/core/entity/MobPathfinder.java
index c17c11533..f7e47a5ca 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/MobPathfinder.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/MobPathfinder.java
@@ -2,17 +2,17 @@ package net.minecraft.core.entity;
 
 import net.minecraft.core.entity.animal.MobFireflyCluster;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.pathfinder.Path;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 
-public abstract class MobPathfinder extends Mob
-{
+public abstract class MobPathfinder extends Mob {
     private static final int MAX_TURN = 30;
     protected @Nullable Path pathToEntity;
     protected @Nullable Entity target;
@@ -20,142 +20,118 @@ public abstract class MobPathfinder extends Mob
     protected boolean hasAttacked;
     protected boolean doRandomWalk = true;
 
-    public MobPathfinder(@NotNull final World world)
-    {
+    public MobPathfinder(@NotNull final World world) {
         super(world);
-        hasAttacked = false;
+        this.hasAttacked = false;
     }
 
-    protected boolean isMovementCeased()
-    {
+    protected boolean isMovementCeased() {
         return false;
     }
 
     @Override
-	protected void updateAI()
-    {
-        hasAttacked = isMovementCeased();
+    protected void updateAI() {
+        this.hasAttacked = isMovementCeased();
         float sightRadius = 16F;
-        if(target == null)
-        {
-            target = findPlayerToAttack();
-            if(target != null)
-            {
-                pathToEntity = world.getPathToEntity(this, target, sightRadius);
+        if (this.target == null) {
+            this.target = findPlayerToAttack();
+            if (this.target != null) {
+                this.pathToEntity = this.world.getPathToEntity(this, this.target, sightRadius);
             }
-        }
-        else if(!target.isAlive())
-        {
-            target = null;
-        }
-        else
-        {
-            float distanceToEntity = target.distanceTo(this);
-            if(canEntityBeSeen(target))
-            {
-                attackEntity(target, distanceToEntity);
-            } else
-            {
-                attackBlockedEntity(target, distanceToEntity);
+        } else if (!this.target.isAlive()) {
+            this.target = null;
+        } else {
+            float distanceToEntity = this.target.distanceTo(this);
+            if (canEntityBeSeen(this.target)) {
+                attackEntity(this.target, distanceToEntity);
+            } else {
+                attackBlockedEntity(this.target, distanceToEntity);
             }
         }
-        if(this.doRandomWalk && (!hasAttacked && target != null && (pathToEntity == null || random.nextInt(20) == 0)))
-        {
+        if (this.doRandomWalk && (!this.hasAttacked && this.target != null && (this.pathToEntity == null || this.random.nextInt(20) == 0))) {
             //pathfind to entity
-            pathToEntity = world.getPathToEntity(this, target, sightRadius);
-        } else
-        if(this.doRandomWalk && (!hasAttacked && closestFireflyEntity == null && (pathToEntity == null && random.nextInt(80) == 0 || random.nextInt(80) == 0)))
-        {
+            this.pathToEntity = this.world.getPathToEntity(this, this.target, sightRadius);
+        } else if (this.doRandomWalk && (!this.hasAttacked && this.closestFireflyEntity == null && (this.pathToEntity == null && this.random.nextInt(80) == 0 || this.random.nextInt(80) == 0))) {
             // random roaming
             roamRandomPath();
         }
-        int i = MathHelper.floor(bb.minY + 0.5D);
+        int i = MathHelper.floor(this.bb.minY + 0.5D);
         boolean inWater = isInWater();
         boolean inLava = isInLava();
-        xRot = 0.0F;
-        if(pathToEntity == null || (this.doRandomWalk && random.nextInt(100) == 0))
-        {
+        this.xRot = 0.0F;
+        if (this.pathToEntity == null || (this.doRandomWalk && this.random.nextInt(100) == 0)) {
             super.updateAI();
-            pathToEntity = null;
+            this.pathToEntity = null;
             return;
         }
-        Vec3 coordsForNextPath = pathToEntity.getPos(this);
-        for(double d = bbWidth * 2.0F; coordsForNextPath != null && coordsForNextPath.distanceToSquared(x, coordsForNextPath.y, z) < d * d;)
-        {
-            pathToEntity.next();
-            if(pathToEntity.isDone())
-            {
-                closestFireflyEntity = null;
+        Vector3dc coordsForNextPath = this.pathToEntity.getPos(this);
+        for (double d = this.bbWidth * 2.0F; coordsForNextPath != null && coordsForNextPath.distanceSquared(this.x, coordsForNextPath.y(), this.z) < d * d; ) {
+            this.pathToEntity.next();
+            if (this.pathToEntity.isDone()) {
+                this.closestFireflyEntity = null;
                 coordsForNextPath = null;
-                pathToEntity = null;
-            } else
-            {
-                coordsForNextPath = pathToEntity.getPos(this);
+                this.pathToEntity = null;
+            } else {
+                coordsForNextPath = this.pathToEntity.getPos(this);
             }
         }
 
-        isJumping = false;
-        if(coordsForNextPath != null)
-        {
-            double x1 = coordsForNextPath.x - x;
-            double z1 = coordsForNextPath.z - z;
-            double y1 = coordsForNextPath.y - (double)i;
-            float f2 = (float)((java.lang.Math.atan2(z1, x1) * 180D) / Math.PI) - 90F;
-            float f3 = f2 - yRot;
+        this.isJumping = false;
+        if (coordsForNextPath != null) {
+            double x1 = coordsForNextPath.x() - this.x;
+            double z1 = coordsForNextPath.z() - this.z;
+            double y1 = coordsForNextPath.y() - (double) i;
+            float f2 = (float) ((java.lang.Math.atan2(z1, x1) * 180D) / Math.PI) - 90F;
+            float f3 = f2 - this.yRot;
 
             //move forward towards path
-            moveForward = moveSpeed;
-            for(; f3 < -180F; f3 += 360F) { }
-            for(; f3 >= 180F; f3 -= 360F) { }
-            if(f3 > MAX_TURN)
-            {
+            this.moveForward = this.moveSpeed;
+            for (; f3 < -180F; f3 += 360F) {
+            }
+            for (; f3 >= 180F; f3 -= 360F) {
+            }
+            if (f3 > MAX_TURN) {
                 f3 = MAX_TURN;
             }
-            if(f3 < -MAX_TURN)
-            {
+            if (f3 < -MAX_TURN) {
                 f3 = -MAX_TURN;
             }
-            yRot += f3;
-            if(hasAttacked && target != null)
-            {
-                double d4 = target.x - x;
-                double d5 = target.z - z;
-                float f5 = yRot;
-                yRot = (float)((java.lang.Math.atan2(d5, d4) * 180D) / Math.PI) - 90F;
-                float f4 = (((f5 - yRot) + 90F) * MathHelper.PI) / 180F;
-                moveStrafing = -MathHelper.sin(f4) * moveForward * 1.0F;
-                moveForward = MathHelper.cos(f4) * moveForward * 1.0F;
+            this.yRot += f3;
+            if (this.hasAttacked && this.target != null) {
+                double d4 = this.target.x - this.x;
+                double d5 = this.target.z - this.z;
+                float f5 = this.yRot;
+                this.yRot = (float) ((java.lang.Math.atan2(d5, d4) * 180D) / Math.PI) - 90F;
+                float f4 = (((f5 - this.yRot) + 90F) * MathHelper.PI) / 180F;
+                this.moveStrafing = -MathHelper.sin(f4) * this.moveForward * 1.0F;
+                this.moveForward = MathHelper.cos(f4) * this.moveForward * 1.0F;
             }
-            if(y1 > 0.0D)
-            {
-                isJumping = true;
+            if (y1 > 0.0D) {
+                this.isJumping = true;
             }
         }
-        if(target != null)
-        {
-            lookAt(target, 30F, 30F);
+        if (this.target != null) {
+            lookAt(this.target, 30F, 30F);
         }
-        if(horizontalCollision && !hasPath())
-        {
-            isJumping = true;
+        if (this.horizontalCollision && !hasPath()) {
+            this.isJumping = true;
         }
-        if(random.nextFloat() < 0.8F && (inWater || inLava))
-        {
-            isJumping = true;
+        if (this.random.nextFloat() < 0.8F && (inWater || inLava)) {
+            this.isJumping = true;
         }
     }
 
-    protected @Nullable Entity getClosestFireflyToEntity (int x, int y, int z, float radius){
-        List<MobFireflyCluster> nearbyFireflies = world.getEntitiesWithinAABB(MobFireflyCluster.class, AABB.fromPool(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D).grow(radius, 4D, radius));
+    protected @Nullable Entity getClosestFireflyToEntity(int x, int y, int z, float radius) {
+        AABBd bb = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+        MathHelper.aabbGrow(bb, radius, 4D, radius, bb);
+        List<MobFireflyCluster> nearbyFireflies = this.world.getEntitiesWithinAABB(MobFireflyCluster.class, bb);
 
         double closestDistance = -1D;
         MobFireflyCluster cluster = null;
-        for(int i = 0; i < nearbyFireflies.size(); i++)
-        {
+        for (int i = 0; i < nearbyFireflies.size(); i++) {
             MobFireflyCluster clusterInList = nearbyFireflies.get(i);
             double currentDistance = clusterInList.distanceToSqr(x, y, z);
-            if((radius < 0.0D || currentDistance < radius * radius) && (closestDistance == -1D || currentDistance < closestDistance))
-            {
+            if ((radius < 0.0D || currentDistance < radius * radius) && (closestDistance == -1D || currentDistance < closestDistance)) {
                 closestDistance = currentDistance;
                 cluster = clusterInList;
             }
@@ -163,79 +139,64 @@ public abstract class MobPathfinder extends Mob
         return cluster;
     }
 
-    protected void roamRandomPath()
-    {
-        boolean canMoveToPoint = false;
-        int x = -1;
-        int y = -1;
-        int z = -1;
+    protected void roamRandomPath() {
+        TilePos tilePos = null;
         float bestPathWeight = -99999F;
-        for(int l = 0; l < 10; l++)
-        {
-            int x1 = MathHelper.floor((this.x + (double) random.nextInt(13)) - 6D);
-            int y1 = MathHelper.floor((this.y + (double) random.nextInt(7)) - 3D);
-            int z1 = MathHelper.floor((this.z + (double) random.nextInt(13)) - 6D);
+        for (int l = 0; l < 10; l++) {
+            int x1 = MathHelper.floor((this.x + (double) this.random.nextInt(13)) - 6D);
+            int y1 = MathHelper.floor((this.y + (double) this.random.nextInt(7)) - 3D);
+            int z1 = MathHelper.floor((this.z + (double) this.random.nextInt(13)) - 6D);
             float currentPathWeight = getBlockPathWeight(x1, y1, z1);
-            if(currentPathWeight > bestPathWeight)
-            {
+            if (currentPathWeight > bestPathWeight) {
                 bestPathWeight = currentPathWeight;
-                x = x1;
-                y = y1;
-                z = z1;
-                canMoveToPoint = true;
+                if (tilePos != null) {
+                    tilePos.set(x1, y1, z1);
+                } else {
+                    tilePos = new TilePos(x1, y1, z1);
+                }
             }
         }
 
-        if(canMoveToPoint)
-        {
-            pathToEntity = world.getEntityPathToXYZ(this, x, y, z, 10F);
+        if (tilePos != null) {
+            this.pathToEntity = this.world.getEntityPathToTilePos(this, tilePos, 10F);
         }
     }
 
-    protected void attackEntity(@NotNull Entity entity, float distance)
-    {
+    protected void attackEntity(@NotNull Entity entity, float distance) {
     }
 
-    protected void attackBlockedEntity(@NotNull Entity entity, float f)
-    {
+    protected void attackBlockedEntity(@NotNull Entity entity, float f) {
     }
 
-    protected float getBlockPathWeight(int x, int y, int z)
-    {
+    protected float getBlockPathWeight(int x, int y, int z) {
         return 0.0F;
     }
 
-    protected Entity findPlayerToAttack()
-    {
+    protected Entity findPlayerToAttack() {
         return null;
     }
 
     @Override
-	public boolean canSpawnHere()
-    {
+    public boolean canSpawnHere() {
         int x = MathHelper.floor(this.x);
-        int y = MathHelper.floor(bb.minY);
+        int y = MathHelper.floor(this.bb.minY);
         int z = MathHelper.floor(this.z);
         return super.canSpawnHere() && getBlockPathWeight(x, y, z) >= 0.0F;
     }
 
-    public boolean hasPath()
-    {
-        return pathToEntity != null;
+    public boolean hasPath() {
+        return this.pathToEntity != null;
     }
 
-    public void setPathToEntity(@Nullable Path path)
-    {
-        pathToEntity = path;
+    public void setPathToEntity(@Nullable Path path) {
+        this.pathToEntity = path;
     }
 
-    public @Nullable Entity getTarget()
-    {
-        return target;
+    public @Nullable Entity getTarget() {
+        return this.target;
     }
 
-    public void setTarget(@Nullable Entity target)
-    {
+    public void setTarget(@Nullable Entity target) {
         this.target = target;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/entity/SpawnListEntry.java b/game/core/src/main/java/net/minecraft/core/entity/SpawnListEntry.java
index 103df3edd..4b8b1e77b 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/SpawnListEntry.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/SpawnListEntry.java
@@ -1,15 +1,14 @@
 package net.minecraft.core.entity;
 
 
-public class SpawnListEntry
-{
+import org.jetbrains.annotations.NotNull;
 
-    public SpawnListEntry(Class<? extends Entity> clazz, int frequency)
-    {
-        entityClass = clazz;
-        spawnFrequency = frequency;
-    }
-
-    public Class<? extends Entity> entityClass;
+public class SpawnListEntry {
+    public @NotNull Class<? extends Entity> entityClass;
     public int spawnFrequency;
+
+    public SpawnListEntry(final @NotNull Class<? extends Entity> clazz, final int frequency) {
+        this.entityClass = clazz;
+        this.spawnFrequency = frequency;
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobButterfly.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobButterfly.java
index 26e40d478..a38227e25 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobButterfly.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobButterfly.java
@@ -14,19 +14,16 @@ import net.minecraft.core.entity.SkinVariantList;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.item.Items;
-import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.function.Supplier;
 
@@ -40,7 +37,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     public static final ButterflyEntry COLOR_PINK;
     public static final ButterflyEntry COLOR_SILVER;
 
-    public static ButterflyEntry addEntry(int id, String name, double weight, Supplier<Item> jarItem, Biome ... allowedBiomes) {
+    public static ButterflyEntry addEntry(int id, String name, double weight, Supplier<Item> jarItem, Biome... allowedBiomes) {
         assert id >= 0 && id <= 0xFF : "ID is outside valid range!";
         ButterflyEntry entry = new ButterflyEntry(id, name, weight, jarItem, allowedBiomes);
         colorEntries.put(id, entry);
@@ -68,12 +65,11 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     @Override
     protected void defineSynchedData() {
         super.defineSynchedData();
-        entityData.define(DATA_COLOR_ID, (byte)0, Byte.class);
+        this.entityData.define(DATA_COLOR_ID, (byte) 0, Byte.class);
     }
 
     @Override
-    protected boolean makeStepSound()
-    {
+    protected boolean makeStepSound() {
         return false;
     }
 
@@ -93,20 +89,17 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     }
 
     @Override
-    public String getLivingSound()
-    {
+    public String getLivingSound() {
         return "";
     }
 
     @Override
-    protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "";
     }
 
     @Override
-    protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "";
     }
 
@@ -120,8 +113,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
         if (type == null || type == DamageType.GENERIC || type == DamageType.BLAST || type == DamageType.FIRE || type == DamageType.DROWN) {
             return super.hurt(attacker, i, type);
         }
@@ -133,7 +125,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     public void spawnInit() {
         super.spawnInit();
 
-        Biome currentBiome = world.getBlockBiome(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
+        Biome currentBiome = this.world.getBlockBiome(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z));
 
         WeightedRandomBag<ButterflyEntry> colorBag = new WeightedRandomBag<>();
         for (ButterflyEntry entry : colorEntries.values()) {
@@ -148,32 +140,27 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     }
 
     @Override
-    public boolean canSpawnHere()
-    {
-        if (!world.isDaytime()) return false;
+    public boolean canSpawnHere() {
+        if (!this.world.isDaytime()) return false;
         int x = MathHelper.floor(this.x);
-        int y = MathHelper.floor(bb.minY);
+        int y = MathHelper.floor(this.bb.minY);
         int z = MathHelper.floor(this.z);
-        int id = world.getBlockId(x, y - 1, z);
-        if (Blocks.blocksList[id] != null)
-        {
-            return Blocks.blocksList[id].hasTag(BlockTags.PASSIVE_MOBS_SPAWN) && world.getFullBlockLightValue(x, y, z) > 8 && super.canSpawnHere();
+        int id = this.world.getBlockId(x, y - 1, z);
+        if (Blocks.blocksList[id] != null) {
+            return Blocks.blocksList[id].hasTag(BlockTags.PASSIVE_MOBS_SPAWN) && this.world.getFullBlockLightValue(x, y, z) > 8 && super.canSpawnHere();
         }
         return false;
     }
 
-    private boolean isCourseTraversable(double waypointX, double waypointY, double waypointZ, double distanceFromEntity)
-    {
-
-        double dx = (waypointX - x) / distanceFromEntity;
-        double dy = (waypointY - y) / distanceFromEntity;
-        double dz = (waypointZ - z) / distanceFromEntity;
-        AABB entityBB = bb.copy();
-        for(int i = 0; (double)i < distanceFromEntity; i++)
-        {
-            entityBB.move(dx, dy, dz);
-            if(!world.getCubes(this, entityBB).isEmpty())
-            {
+    private boolean isCourseTraversable(double waypointX, double waypointY, double waypointZ, double distanceFromEntity) {
+
+        double dx = (waypointX - this.x) / distanceFromEntity;
+        double dy = (waypointY - this.y) / distanceFromEntity;
+        double dz = (waypointZ - this.z) / distanceFromEntity;
+        AABBd entityBB = new AABBd(this.bb);
+        for (int i = 0; (double) i < distanceFromEntity; i++) {
+            entityBB.translate(dx, dy, dz);
+            if (!this.world.getCubes(this, entityBB).isEmpty()) {
                 return false;
             }
         }
@@ -182,65 +169,64 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     }
 
     @Override
-    protected void updateAI()
-    {
-        entityAge++;
+    protected void updateAI() {
+        this.entityAge++;
         tryToDespawn();
 
-        Player closestPlayer = world.getClosestPlayerToEntity(this, 2);
+        Player closestPlayer = this.world.getClosestPlayerToEntity(this, 2);
         if (closestPlayer != null) {
-            double distanceX = closestPlayer.x - x;
+            double distanceX = closestPlayer.x - this.x;
 //            double distanceY = closestPlayer.y - y;
-            double distanceZ = closestPlayer.z - z;
+            double distanceZ = closestPlayer.z - this.z;
 
             double distance = Math.hypot(distanceX, distanceZ);
 
-            waypointX = x + (distanceX / distance) * -5;
-            waypointY = y + 4;
-            waypointZ = z + (distanceZ / distance) * -5;
+            this.waypointX = this.x + (distanceX / distance) * -5;
+            this.waypointY = this.y + 4;
+            this.waypointZ = this.z + (distanceZ / distance) * -5;
         }
 
-        double distanceX = waypointX - x;
-        double distanceY = waypointY - y;
-        double distanceZ = waypointZ - z;
+        double distanceX = this.waypointX - this.x;
+        double distanceY = this.waypointY - this.y;
+        double distanceZ = this.waypointZ - this.z;
 
         double distanceFromEntity = MathHelper.sqrt(distanceX * distanceX + distanceY * distanceY + distanceZ * distanceZ);
 
         if (distanceFromEntity > 32) {
-            waypointX = x;
-            waypointY = y;
-            waypointZ = z;
+            this.waypointX = this.x;
+            this.waypointY = this.y;
+            this.waypointZ = this.z;
             return;
         }
 
         if (distanceFromEntity > 1D) {
-            xd += (distanceX / distanceFromEntity) * 0.01D;
-            yd += (distanceY / distanceFromEntity) * 0.01D;
-            zd += (distanceZ / distanceFromEntity) * 0.01D;
-            yRot = (float) ((Math.atan2(xd, zd) * 180F) / MathHelper.PI);
+            this.xd += (distanceX / distanceFromEntity) * 0.01D;
+            this.yd += (distanceY / distanceFromEntity) * 0.01D;
+            this.zd += (distanceZ / distanceFromEntity) * 0.01D;
+            this.yRot = (float) ((Math.atan2(this.xd, this.zd) * 180F) / MathHelper.PI);
         }
 
-        if(courseChangeCooldown-- <= 0) {
-            courseChangeCooldown += random.nextInt(40) + 20;
-            if (!(distanceFromEntity > 1D) || !isCourseTraversable(waypointX, waypointY, waypointZ, distanceFromEntity)) {
-                double nextX = x + (double) ((random.nextFloat() * 2.0F - 1.0F) * 16F);
-                double nextY = y + (double) ((random.nextFloat() * 2.0F - 1.0F) * 5F);
-                double nextZ = z + (double) ((random.nextFloat() * 2.0F - 1.0F) * 16F);
+        if (this.courseChangeCooldown-- <= 0) {
+            this.courseChangeCooldown += this.random.nextInt(40) + 20;
+            if (!(distanceFromEntity > 1D) || !isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, distanceFromEntity)) {
+                double nextX = this.x + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16F);
+                double nextY = this.y + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 5F);
+                double nextZ = this.z + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16F);
 
-                if (nextY > y) {
+                if (nextY > this.y) {
                     if (isUpwardWaypointValid(MathHelper.floor(nextX), MathHelper.floor(nextY), MathHelper.floor(nextZ))) {
-                        waypointX = nextX;
-                        waypointY = nextY;
-                        waypointZ = nextZ;
+                        this.waypointX = nextX;
+                        this.waypointY = nextY;
+                        this.waypointZ = nextZ;
                     } else {
-                        waypointX = x;
-                        waypointY = y;
-                        waypointZ = z;
+                        this.waypointX = this.x;
+                        this.waypointY = this.y;
+                        this.waypointZ = this.z;
                     }
                 } else {
-                    waypointX = nextX;
-                    waypointY = nextY;
-                    waypointZ = nextZ;
+                    this.waypointX = nextX;
+                    this.waypointY = nextY;
+                    this.waypointZ = nextZ;
                 }
             } /*else {
                 xd += (distanceX / distanceFromEntity) * 0.1D;
@@ -254,7 +240,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     public boolean isUpwardWaypointValid(int x, int y, int z) {
         final byte range = 3;
         for (int _y = y; _y > y - range; _y--) {
-            Block<?> block = world.getBlock(x, _y, z);
+            Block<?> block = this.world.getBlock(x, _y, z);
             if (block == null/* || !block.hasTag(BlockTags.PASSIVE_MOBS_SPAWN)*/) continue;
             return true;
         }
@@ -262,12 +248,12 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     }
 
     public int getColor() {
-        return entityData.getByte(DATA_COLOR_ID) & 0xFF;
+        return this.entityData.getByte(DATA_COLOR_ID) & 0xFF;
     }
 
     public void setColor(int color) {
         assert color >= 0 && color <= 0xFF : "Color is outside valid range!";
-        entityData.set(DATA_COLOR_ID, (byte)color);
+        this.entityData.set(DATA_COLOR_ID, (byte) color);
     }
 
     @Override
@@ -295,7 +281,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
     @Override
     public String getTextureReference() {
         final SkinVariantList variantList = Global.accessor.getSkinVariantList();
-        return colorEntries.get(getColor()).name + "/" + variantList.getSkinReference(variantJsonPath, "0", getSkinVariant());
+        return colorEntries.get(getColor()).name + "/" + variantList.getSkinReference(this.variantJsonPath, "0", getSkinVariant());
     }
 
     public static class ButterflyEntry {
@@ -306,7 +292,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
         public final Supplier<Item> jarItem;
         public final double weight;
 
-        public ButterflyEntry(int id, String name, double weight, Supplier<Item> jarItem, Biome ... allowedBiomes) {
+        public ButterflyEntry(int id, String name, double weight, Supplier<Item> jarItem, Biome... allowedBiomes) {
             this.id = id;
             this.name = name;
             this.weight = weight;
@@ -319,13 +305,13 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
         }
 
         public ButterflyEntry addAllowedBiome(Biome biome) {
-            if (allowedBiomes == null) allowedBiomes = new HashSet<>();
+            if (this.allowedBiomes == null) this.allowedBiomes = new HashSet<>();
             this.allowedBiomes.add(biome);
             return this;
         }
 
         public ButterflyEntry removeAllowedBiome(Biome biome) {
-            if (allowedBiomes == null) allowedBiomes = new HashSet<>();
+            if (this.allowedBiomes == null) this.allowedBiomes = new HashSet<>();
             this.allowedBiomes.remove(biome);
             return this;
         }
@@ -336,7 +322,7 @@ public class MobButterfly extends MobFlying implements AmbientCreature {
         }
 
         public boolean isBiomeAllowed(Biome biome) {
-            return allowedBiomes == null || allowedBiomes.contains(biome);
+            return this.allowedBiomes == null || this.allowedBiomes.contains(biome);
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobDeer.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobDeer.java
index e8cb5e1f4..8ba37c9ed 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobDeer.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobDeer.java
@@ -9,12 +9,14 @@ import net.minecraft.core.item.Items;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.season.Seasons;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -83,7 +85,9 @@ public class MobDeer
         }
 
         if (player == null) {
-            final List<MobWolf> nearbyWolves = this.world.getEntitiesWithinAABB(MobWolf.class, AABB.fromPool(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D).grow(8D, 4D, 8D));
+            AABBd checkBB = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+            MathHelper.aabbGrow(checkBB, 8D, 4D, 8D, checkBB);
+            final List<MobWolf> nearbyWolves = this.world.getEntitiesWithinAABB(MobWolf.class, checkBB);
             if (!nearbyWolves.isEmpty()) {
                 @NotNull MobWolf closestWolf = nearbyWolves.get(0);
                 double closestWolfDist = this.distanceToSqr(closestWolf);
@@ -108,10 +112,10 @@ public class MobDeer
 
     protected void getPathAwayFromPoint(final double x, final double z, final double pX, final double pZ) {
         final int scale = 10;
-        final @NotNull Vec3 vec = Vec3.fromPool(x - pX, 0.0, z - pZ).normalize().scale(scale);
+        final @NotNull Vector3d vec = new Vector3d(x - pX, 0.0, z - pZ).normalize().mul(scale);
 
-        final Vec3 safePoint = Vec3.fromPool(this.x + vec.x, this.y + vec.y, this.z + vec.z);
-        this.pathToEntity = this.world.getEntityPathToXYZ(this, MathHelper.floor(safePoint.x), MathHelper.floor(safePoint.y), MathHelper.floor(safePoint.z), 16F);
+        final Vector3dc safePoint = vec.add(this.x, this.y, this.z);
+        this.pathToEntity = this.world.getEntityPathToTilePos(this, new TilePos(safePoint), 16F);
     }
 
     @Override
@@ -330,7 +334,9 @@ public class MobDeer
         }
 
         private void syncToOtherDeer() {
-            final @NotNull List<@NotNull MobDeer> nearbyDeer = this.deer.world.getEntitiesWithinAABB(MobDeer.class, AABB.fromPool(this.deer.x, this.deer.y, this.deer.z, this.deer.x + 1.0D, this.deer.y + 1.0D, this.deer.z + 1.0D).grow(8D, 4D, 8D));
+            AABBd checkBB = new AABBd(this.deer.x, this.deer.y, this.deer.z, this.deer.x + 1.0D, this.deer.y + 1.0D, this.deer.z + 1.0D);
+            MathHelper.aabbGrow(checkBB, 8, 4, 8, checkBB);
+            final @NotNull List<@NotNull MobDeer> nearbyDeer = this.deer.world.getEntitiesWithinAABB(MobDeer.class, checkBB);
             for (final @NotNull MobDeer deer : nearbyDeer) {
                 if (!(deer.brainState instanceof SpookedBrainState)) {
                     deer.brainState = new TransitionalBrainState(deer, new SpookedBrainState(deer, this.threat), this.deer.random.nextInt(10));
@@ -387,7 +393,9 @@ public class MobDeer
         }
 
         private void syncToOtherDeer() {
-            final @NotNull List<@NotNull MobDeer> nearbyDeer = this.deer.world.getEntitiesWithinAABB(MobDeer.class, AABB.fromPool(this.deer.x, this.deer.y, this.deer.z, this.deer.x + 1.0D, this.deer.y + 1.0D, this.deer.z + 1.0D).grow(8D, 4D, 8D));
+            AABBd checkBB = new AABBd(this.deer.x, this.deer.y, this.deer.z, this.deer.x + 1.0D, this.deer.y + 1.0D, this.deer.z + 1.0D);
+            MathHelper.aabbGrow(checkBB, 8D, 4D, 8D, checkBB);
+            final @NotNull List<@NotNull MobDeer> nearbyDeer = this.deer.world.getEntitiesWithinAABB(MobDeer.class, checkBB);
             for (final @NotNull MobDeer deer : nearbyDeer) {
                 if (!(deer.brainState instanceof FleeingBrainState)) {
                     deer.brainState = new TransitionalBrainState(deer, new FleeingBrainState(deer, this.threat), this.deer.random.nextInt(5));
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobFireflyCluster.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobFireflyCluster.java
index 145551dd7..4ddad70a8 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobFireflyCluster.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobFireflyCluster.java
@@ -14,61 +14,58 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.biome.Biomes;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 public class MobFireflyCluster extends MobFlying
-        implements AmbientCreature
-{
-	public static final int DATA_COLOR_ID = 16;
-	public static final int DATA_CLUSTER_SIZE_ID = 17;
-	public static final int DATA_COUNT_ID = 18;
-	public final int maxLifetime = 12000;
-	public final int maxClusterSize = 6;
+    implements AmbientCreature {
+    public static final int DATA_COLOR_ID = 16;
+    public static final int DATA_CLUSTER_SIZE_ID = 17;
+    public static final int DATA_COUNT_ID = 18;
+    public final int maxLifetime = 12000;
+    public final int maxClusterSize = 6;
     public final int slowUpdateCooldownMax = 500;
     public final int maxFireflyCountPerCluster = 64;
-	
+
     public int courseChangeCooldown;
     public int fireflyAge = 0;
-    
+
     private int syncedClusterSize = -1;
-    
+
     /**
      * Don't check for other entities every tick
      */
     private int slowUpdateCooldown;
-    
-    
-    public MobFireflyCluster(@NotNull final World world)
-    {
+
+
+    public MobFireflyCluster(@NotNull final World world) {
         super(world);
-        if(world.isClientSide) {
-        	setClusterSize(0);
-        	setFireflyCount(0);
-        }else {
-            setClusterSize(random.nextInt(maxClusterSize));
-            setFireflyCount(random.nextInt(5) + 3);
+        if (world.isClientSide) {
+            setClusterSize(0);
+            setFireflyCount(0);
+        } else {
+            setClusterSize(this.random.nextInt(this.maxClusterSize));
+            setFireflyCount(this.random.nextInt(5) + 3);
         }
         setSizeBasedOnClusterSize(getClusterSize());
 
-        courseChangeCooldown = 0;
-        moveSpeed = 0.05F;
-        fireImmune = true;
-        
+        this.courseChangeCooldown = 0;
+        this.moveSpeed = 0.05F;
+        this.fireImmune = true;
+
         // Give it a random cooldown so that not every check happens at the same time
-        slowUpdateCooldown = world.rand.nextInt(slowUpdateCooldownMax);
+        this.slowUpdateCooldown = world.rand.nextInt(this.slowUpdateCooldownMax);
     }
 
-	@Override
-	public void spawnInit() {
-		super.defineSynchedData();
-		Biome currentBiome = world.getBlockBiome((int) x, (int) y, (int) z);
-		FireflyColor color = null;
+    @Override
+    public void spawnInit() {
+        super.defineSynchedData();
+        Biome currentBiome = this.world.getBlockBiome((int) this.x, (int) this.y, (int) this.z);
+        FireflyColor color = null;
 
-		Collection<FireflyColor> colors = FireflyColor.fireFlyColors.values();
+        Collection<FireflyColor> colors = FireflyColor.fireFlyColors.values();
         for (FireflyColor fireFlyColor : colors) {
             Biome[] spawnBiomes = fireFlyColor.getSpawnBiomes();
             if (spawnBiomes == null) {
@@ -87,22 +84,18 @@ public class MobFireflyCluster extends MobFlying
             }
         }
 
-		if (color == null) {
-			color = FireflyColor.GREEN;
-		}
-
-		setColor(color);
-	}
-
-    protected FireflyColor getColourForBiome(Biome currentBiome){
-        for (FireflyColor c : FireflyColor.fireFlyColors.values())
-        {
-            if (c.getSpawnBiomes() != null)
-            {
-                for (Biome b : c.getSpawnBiomes())
-                {
-                    if (b == currentBiome)
-                    {
+        if (color == null) {
+            color = FireflyColor.GREEN;
+        }
+
+        setColor(color);
+    }
+
+    protected FireflyColor getColourForBiome(Biome currentBiome) {
+        for (FireflyColor c : FireflyColor.fireFlyColors.values()) {
+            if (c.getSpawnBiomes() != null) {
+                for (Biome b : c.getSpawnBiomes()) {
+                    if (b == currentBiome) {
                         return c;
                     }
                 }
@@ -112,68 +105,64 @@ public class MobFireflyCluster extends MobFlying
     }
 
     @Override
-    protected boolean makeStepSound()
-    {
+    protected boolean makeStepSound() {
         return false;
     }
 
     @Override
-    public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-		super.addAdditionalSaveData(tag);
-		tag.putByte("colour", entityData.getByte(16));
-		tag.putInt("FireflyAge", fireflyAge);
-		tag.putInt("FireflyCount", getFireflyCount());
-		tag.putInt("ClusterSize", getClusterSize());
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
+        super.addAdditionalSaveData(tag);
+        tag.putByte("colour", this.entityData.getByte(16));
+        tag.putInt("FireflyAge", this.fireflyAge);
+        tag.putInt("FireflyCount", getFireflyCount());
+        tag.putInt("ClusterSize", getClusterSize());
     }
 
     @Override
-    public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-		super.readAdditionalSaveData(tag);
-		entityData.set(16, tag.getByte("colour"));
-		this.fireflyAge = tag.getInteger("FireflyAge");
-		setFireflyCount(tag.getInteger("FireflyCount"));
-		setClusterSize(tag.getInteger("ClusterSize"));
-		setPos(x, y, z); // Update bounding box
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
+        super.readAdditionalSaveData(tag);
+        this.entityData.set(16, tag.getByte("colour"));
+        this.fireflyAge = tag.getInteger("FireflyAge");
+        setFireflyCount(tag.getInteger("FireflyCount"));
+        setClusterSize(tag.getInteger("ClusterSize"));
+        setPos(this.x, this.y, this.z); // Update bounding box
     }
 
     @Override
-    protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
         super.defineSynchedData();
 
-		entityData.define(DATA_COLOR_ID, (byte) 0, Byte.class);
-		entityData.define(DATA_CLUSTER_SIZE_ID, (byte) 0, Byte.class);
-		entityData.define(DATA_COUNT_ID, (byte) 0, Byte.class);
-    }
-
-	public void setColor(FireflyColor colour) {
-		entityData.set(DATA_COLOR_ID, (byte) colour.getId());
-	}
-
-	public FireflyColor getColor() {
-		int id = entityData.getByte(DATA_COLOR_ID);
-		return FireflyColor.fireFlyColors.get(id);
-	}
-	
-	public void setClusterSize(int clusterSize) {
-		entityData.set(DATA_CLUSTER_SIZE_ID, (byte) clusterSize);
-		setSizeBasedOnClusterSize(clusterSize);
-	}
-	
-	public int getClusterSize() {
-		return entityData.getByte(DATA_CLUSTER_SIZE_ID) & 0xFF;
-	}
-	
-	public void setFireflyCount(int fireflyCount) {
-		entityData.set(DATA_COUNT_ID, (byte) fireflyCount);
-	}
-	
-	public int getFireflyCount() {
-		return entityData.getByte(DATA_COUNT_ID) & 0xFF;
-	}
-    
+        this.entityData.define(DATA_COLOR_ID, (byte) 0, Byte.class);
+        this.entityData.define(DATA_CLUSTER_SIZE_ID, (byte) 0, Byte.class);
+        this.entityData.define(DATA_COUNT_ID, (byte) 0, Byte.class);
+    }
+
+    public void setColor(FireflyColor colour) {
+        this.entityData.set(DATA_COLOR_ID, (byte) colour.getId());
+    }
+
+    public FireflyColor getColor() {
+        int id = this.entityData.getByte(DATA_COLOR_ID);
+        return FireflyColor.fireFlyColors.get(id);
+    }
+
+    public void setClusterSize(int clusterSize) {
+        this.entityData.set(DATA_CLUSTER_SIZE_ID, (byte) clusterSize);
+        setSizeBasedOnClusterSize(clusterSize);
+    }
+
+    public int getClusterSize() {
+        return this.entityData.getByte(DATA_CLUSTER_SIZE_ID) & 0xFF;
+    }
+
+    public void setFireflyCount(int fireflyCount) {
+        this.entityData.set(DATA_COUNT_ID, (byte) fireflyCount);
+    }
+
+    public int getFireflyCount() {
+        return this.entityData.getByte(DATA_COUNT_ID) & 0xFF;
+    }
+
 //    private boolean isCourseTraversable(double waypointX, double waypointY, double waypointZ, double distanceFromEntity)
 //    {
 //
@@ -194,10 +183,9 @@ public class MobFireflyCluster extends MobFlying
 //    }
 
     @Override
-    protected void updateAI()
-    {
+    protected void updateAI() {
         //After 5 minutes, firefly changes color to match biome
-        
+
         // Set initial waypoint to random coordinate within 16 blocks of entity
 //        waypointX = posX + (double) ((rand.nextFloat() * 2.0F - 1.0F) * 16F);
 //        waypointY = posY + (double) ((rand.nextFloat() * 2.0F - 1.0F) * 5F);
@@ -227,23 +215,22 @@ public class MobFireflyCluster extends MobFlying
     }
 
     @Override
-    public boolean canSpawnHere()
-    {
+    public boolean canSpawnHere() {
         int x = MathHelper.floor(this.x);
-        int y = MathHelper.floor(bb.minY);
+        int y = MathHelper.floor(this.bb.minY);
         int z = MathHelper.floor(this.z);
-        int id = world.getBlockId(x, y - 1, z);
+        int id = this.world.getBlockId(x, y - 1, z);
 
-		if (shouldRemove()) return false;
-        if(world.getSavedLightValue(LightLayer.Block, x, y, z) > 0) return false;
-        if(world.getSavedLightValue(LightLayer.Sky, x, y, z) > random.nextInt(32))
+        if (shouldRemove()) return false;
+        if (this.world.getSavedLightValue(LightLayer.Block, x, y, z) > 0) return false;
+        if (this.world.getSavedLightValue(LightLayer.Sky, x, y, z) > this.random.nextInt(32))
             return false;
 
-        int blockLight = world.getBlockLightValue(x, y, z);
-        if(world.getCurrentWeather() != null && world.getCurrentWeather().isMobDaylightSpawnAllowed())
-            blockLight = blockLight/2;
+        int blockLight = this.world.getBlockLightValue(x, y, z);
+        if (this.world.getCurrentWeather() != null && this.world.getCurrentWeather().isMobDaylightSpawnAllowed())
+            blockLight = blockLight / 2;
 
-        return  blockLight <= 4 && (Blocks.blocksList[id] != null && Blocks.blocksList[id].hasTag(BlockTags.FIREFLIES_CAN_SPAWN)) && world.checkIfAABBIsClear(bb.grow(-2f, 0f, -2f));
+        return blockLight <= 4 && (Blocks.blocksList[id] != null && Blocks.blocksList[id].hasTag(BlockTags.FIREFLIES_CAN_SPAWN)) && this.world.checkIfAABBIsClear(MathHelper.aabbGrow(this.bb, -2f, 0f, -2f, new AABBd()));
     }
 
     @Override
@@ -266,233 +253,230 @@ public class MobFireflyCluster extends MobFlying
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
         return false;
     }
 
     @Override
-	public String getLivingSound()
-    {
+    public String getLivingSound() {
         return "";
     }
 
     @Override
-    protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "";
     }
 
     @Override
-    protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "";
     }
 
     @Override
-    public void tick()
-    {
-		super.tick();
-		fireflyAge++;
-		// render those funky little buggy dudes
-		double dy = (random.nextFloat() * 2F - 1F) * (bbHeight);
-		double dx = (random.nextFloat() * 2F - 1F) * (bbWidth);
-		double dz = (random.nextFloat() * 2F - 1F) * (bbWidth);
-		
-		if (random.nextInt(Math.max(1, 10 - getFireflyCount())) == 0) {
-			world.spawnParticle(getColor().getParticleName(), x + dx, y + dy, z + dz, xd, yd, zd, 0, 256D);
-		}
-		
-		if(world.isClientSide) {
-			int clusterSize = getClusterSize();
-			if(syncedClusterSize != clusterSize) {
-				setSizeBasedOnClusterSize(clusterSize);
-				syncedClusterSize = clusterSize;
-				setPos(x, y, z); // Update bounding box
-			}
-		}
-		
-		slowUpdates();
-		
-		if(!world.isClientSide && shouldRemove()) {
-			remove();
-		}
-    }
-	private boolean shouldRemove(){
-		if(getFireflyCount() <= 0) {
-			return true;
-		}
-
-		if (!world.getWorldType().hasCeiling() && world.isDaytime()) {
-			return true;
-		}
-
-		if(fireflyAge > maxLifetime) {
-			return true;
-		}
-		return false;
-	}
-    
+    public void tick() {
+        super.tick();
+        this.fireflyAge++;
+        // render those funky little buggy dudes
+        double dy = (this.random.nextFloat() * 2F - 1F) * (this.bbHeight);
+        double dx = (this.random.nextFloat() * 2F - 1F) * (this.bbWidth);
+        double dz = (this.random.nextFloat() * 2F - 1F) * (this.bbWidth);
+
+        if (this.random.nextInt(Math.max(1, 10 - getFireflyCount())) == 0) {
+            this.world.spawnParticle(getColor().getParticleName(), this.x + dx, this.y + dy, this.z + dz, this.xd, this.yd, this.zd, 0, 256D);
+        }
+
+        if (this.world.isClientSide) {
+            int clusterSize = getClusterSize();
+            if (this.syncedClusterSize != clusterSize) {
+                setSizeBasedOnClusterSize(clusterSize);
+                this.syncedClusterSize = clusterSize;
+                setPos(this.x, this.y, this.z); // Update bounding box
+            }
+        }
+
+        slowUpdates();
+
+        if (!this.world.isClientSide && shouldRemove()) {
+            remove();
+        }
+    }
+
+    private boolean shouldRemove() {
+        if (getFireflyCount() <= 0) {
+            return true;
+        }
+
+        if (!this.world.getWorldType().hasCeiling() && this.world.isDaytime()) {
+            return true;
+        }
+
+        return this.fireflyAge > this.maxLifetime;
+    }
+
     private void slowUpdates() {
-		if(--slowUpdateCooldown > 0) {
-			return;
-		}
-		
-		setPos(x, y, z); // Update bounding box
-		if(world.isClientSide) {
-			return;
-		}
-		
-		merge();
-		if(getClusterSize() < maxClusterSize) {
-			expandIfPossible();
-		}
-		
-		int blockX = MathHelper.floor(x);
-		int blockY = MathHelper.floor(y);
-		int blockZ = MathHelper.floor(z);
-		FireflyColor colorForBiome = getColourForBiome(world.getBlockBiome(blockX, blockY, blockZ));
-		if(colorForBiome != this.getColor()) {
-			setColor(colorForBiome);
-		}
-    }
-    
-	private void merge() {
-		slowUpdateCooldown = slowUpdateCooldownMax;
-		
-		List<@NotNull MobFireflyCluster> nearbyFireflies = world.getEntitiesWithinAABB(MobFireflyCluster.class, bb.grow(2, 2, 2));
-		int nearbyCount = nearbyFireflies.size();
-		
-		if(nearbyCount == 1) {
-			// list only contains this entity
-			return;
-		}
-		
-		for(int i=0; i < nearbyCount; i++) {
-			MobFireflyCluster fireflyCluster = nearbyFireflies.get(i);
-			if(fireflyCluster == this) {
-				continue;
-			}
-			if(fireflyCluster.getColor() != this.getColor()) {
-				continue;
-			}
-			
-			// merge into the larger cluster
-			if(fireflyCluster.getFireflyCount() > this.getFireflyCount() || (fireflyCluster.getFireflyCount() == this.getFireflyCount() && world.rand.nextBoolean())) {
-				merge(this, fireflyCluster);
-			}else {
-				merge(fireflyCluster, this);
-			}
-			
-			if(!isAlive()) {
-				return;
-			}
-		}
-	}
-	
-	private void merge(MobFireflyCluster from, MobFireflyCluster to) {
-		if(from.getFireflyCount() + to.getFireflyCount() < maxFireflyCountPerCluster) {
-			to.setFireflyCount(to.getFireflyCount() + from.getFireflyCount());
-			from.remove();
-		}
-	}
-	
-	public void expandIfPossible() {
-		int prevSize = getClusterSize();
-		setSizeBasedOnClusterSize(prevSize + 1);
-		setPos(x, y, z); // Update bounding box
-		
-		if(world.getCollidingSolidBlockBoundingBoxes(this, bb).isEmpty()) {
-			setClusterSize(prevSize + 1);
-			return;
-		}
-		
-		setSizeBasedOnClusterSize(prevSize);
-		setPos(x, y, z); // Update bounding box
-	}
-	
-	public void setSizeBasedOnClusterSize(int clusterSize) {
-		setSize(0.1f + clusterSize, 0.1f + clusterSize * 0.6f);
-	}
+        if (--this.slowUpdateCooldown > 0) {
+            return;
+        }
+
+        setPos(this.x, this.y, this.z); // Update bounding box
+        if (this.world.isClientSide) {
+            return;
+        }
+
+        merge();
+        if (getClusterSize() < this.maxClusterSize) {
+            expandIfPossible();
+        }
+
+        int blockX = MathHelper.floor(this.x);
+        int blockY = MathHelper.floor(this.y);
+        int blockZ = MathHelper.floor(this.z);
+        FireflyColor colorForBiome = getColourForBiome(this.world.getBlockBiome(blockX, blockY, blockZ));
+        if (colorForBiome != this.getColor()) {
+            setColor(colorForBiome);
+        }
+    }
+
+    private void merge() {
+        this.slowUpdateCooldown = this.slowUpdateCooldownMax;
+
+        List<@NotNull MobFireflyCluster> nearbyFireflies = this.world.getEntitiesWithinAABB(MobFireflyCluster.class, MathHelper.aabbGrow(this.bb, 2, 2, 2, new AABBd()));
+        int nearbyCount = nearbyFireflies.size();
+
+        if (nearbyCount == 1) {
+            // list only contains this entity
+            return;
+        }
+
+        for (int i = 0; i < nearbyCount; i++) {
+            MobFireflyCluster fireflyCluster = nearbyFireflies.get(i);
+            if (fireflyCluster == this) {
+                continue;
+            }
+            if (fireflyCluster.getColor() != this.getColor()) {
+                continue;
+            }
+
+            // merge into the larger cluster
+            if (fireflyCluster.getFireflyCount() > this.getFireflyCount() || (fireflyCluster.getFireflyCount() == this.getFireflyCount() && this.world.rand.nextBoolean())) {
+                merge(this, fireflyCluster);
+            } else {
+                merge(fireflyCluster, this);
+            }
+
+            if (!isAlive()) {
+                return;
+            }
+        }
+    }
+
+    private void merge(MobFireflyCluster from, MobFireflyCluster to) {
+        if (from.getFireflyCount() + to.getFireflyCount() < this.maxFireflyCountPerCluster) {
+            to.setFireflyCount(to.getFireflyCount() + from.getFireflyCount());
+            from.remove();
+        }
+    }
+
+    public void expandIfPossible() {
+        int prevSize = getClusterSize();
+        setSizeBasedOnClusterSize(prevSize + 1);
+        setPos(this.x, this.y, this.z); // Update bounding box
+
+        if (this.world.getCollidingSolidBlockBoundingBoxes(this, this.bb).isEmpty()) {
+            setClusterSize(prevSize + 1);
+            return;
+        }
+
+        setSizeBasedOnClusterSize(prevSize);
+        setPos(this.x, this.y, this.z); // Update bounding box
+    }
+
+    public void setSizeBasedOnClusterSize(int clusterSize) {
+        setSize(0.1f + clusterSize, 0.1f + clusterSize * 0.6f);
+    }
 
     @Override
-    public int getMaxSpawnedInChunk()
-    {
+    public int getMaxSpawnedInChunk() {
         return 1;
     }
-    
+
     @Override
     public boolean canRide() {
-    	return false;
-    }
-
-	@Override
-	public boolean cycleVariant() {
-		MobFireflyCluster.FireflyColor color = MobFireflyCluster.FireflyColor.fireFlyColors.get(getColor().getId() + 1 % MobFireflyCluster.FireflyColor.fireFlyColors.size());
-		setColor(color == null ? MobFireflyCluster.FireflyColor.GREEN : color);
-		return true;
-	}
-
-	public static class FireflyColor {
-		public static Int2ObjectMap<FireflyColor> fireFlyColors = new Int2ObjectArrayMap<>();
-		public static FireflyColor GREEN = register(new FireflyColor(0, "fireflyGreen", new Biome[] {
-				Biomes.OVERWORLD_RAINFOREST,
-				Biomes.OVERWORLD_SWAMPLAND,
-				Biomes.OVERWORLD_FOREST,
-				Biomes.OVERWORLD_SEASONAL_FOREST
-		},
-				new float[]{0.7f, 0.95f, 0.35f}));
-		public static FireflyColor ORANGE = register(new FireflyColor(1, "fireflyOrange", new Biome[] {
-				Biomes.OVERWORLD_DESERT,
-				Biomes.OVERWORLD_OUTBACK,
-				Biomes.OVERWORLD_OUTBACK_GRASSY,
-				Biomes.OVERWORLD_CAATINGA,
-				Biomes.OVERWORLD_CAATINGA_PLAINS,
-		},
-				new float[]{1f, 0.9f, 0.58f}));
-		public static FireflyColor BLUE = register(new FireflyColor(2, "fireflyBlue", new Biome[] {
-				Biomes.OVERWORLD_TAIGA,
-				Biomes.OVERWORLD_TUNDRA,
-				Biomes.OVERWORLD_BOREAL_FOREST,
-				Biomes.OVERWORLD_GLACIER,
-				Biomes.DRIFT_DRIFT
-		},
-				new float[]{0.67f, 1f, 0.99f}));
-		public static FireflyColor RED = register(new FireflyColor(3, "fireflyRed", new Biome[] {
-				Biomes.NETHER_NETHER
-		},
-				new float[]{1f, 0.25f, 0.25f}));
-		public static FireflyColor register(FireflyColor color){
-			fireFlyColors.put(color.getId(), color);
-			return color;
-		}
-		private final int id;
-		private final String particleName;
-		private Biome[] spawnBiomes;
-		private float[] midColor;
-
-		public int getId()
-		{
-			return id;
-		}
-
-		public String getParticleName()
-		{
-			return particleName;
-		}
-
-		public Biome[] getSpawnBiomes()
-		{
-			return spawnBiomes;
-		}
-		public float[] getMidColor() {return midColor;}
-		public void setSpawnBiomes(Biome[] biomes){this.spawnBiomes = biomes;}
-		public FireflyColor(int id, String particleName, Biome[] spawnBiomes, float[] midColor)
-		{
-			this.id = id;
-			this.particleName = particleName;
-			this.spawnBiomes = spawnBiomes;
-			this.midColor = midColor;
-		}
-	}
+        return false;
+    }
+
+    @Override
+    public boolean cycleVariant() {
+        MobFireflyCluster.FireflyColor color = MobFireflyCluster.FireflyColor.fireFlyColors.get(getColor().getId() + 1 % MobFireflyCluster.FireflyColor.fireFlyColors.size());
+        setColor(color == null ? MobFireflyCluster.FireflyColor.GREEN : color);
+        return true;
+    }
+
+    public static class FireflyColor {
+        public static Int2ObjectMap<FireflyColor> fireFlyColors = new Int2ObjectArrayMap<>();
+        public static FireflyColor GREEN = register(new FireflyColor(0, "fireflyGreen", new Biome[]{
+            Biomes.OVERWORLD_RAINFOREST,
+            Biomes.OVERWORLD_SWAMPLAND,
+            Biomes.OVERWORLD_FOREST,
+            Biomes.OVERWORLD_SEASONAL_FOREST
+        },
+            new float[]{0.7f, 0.95f, 0.35f}));
+        public static FireflyColor ORANGE = register(new FireflyColor(1, "fireflyOrange", new Biome[]{
+            Biomes.OVERWORLD_DESERT,
+            Biomes.OVERWORLD_OUTBACK,
+            Biomes.OVERWORLD_OUTBACK_GRASSY,
+            Biomes.OVERWORLD_CAATINGA,
+            Biomes.OVERWORLD_CAATINGA_PLAINS,
+        },
+            new float[]{1f, 0.9f, 0.58f}));
+        public static FireflyColor BLUE = register(new FireflyColor(2, "fireflyBlue", new Biome[]{
+            Biomes.OVERWORLD_TAIGA,
+            Biomes.OVERWORLD_TUNDRA,
+            Biomes.OVERWORLD_BOREAL_FOREST,
+            Biomes.OVERWORLD_GLACIER,
+            Biomes.DRIFT_DRIFT
+        },
+            new float[]{0.67f, 1f, 0.99f}));
+        public static FireflyColor RED = register(new FireflyColor(3, "fireflyRed", new Biome[]{
+            Biomes.NETHER_NETHER
+        },
+            new float[]{1f, 0.25f, 0.25f}));
+
+        public static FireflyColor register(FireflyColor color) {
+            fireFlyColors.put(color.getId(), color);
+            return color;
+        }
+
+        private final int id;
+        private final String particleName;
+        private Biome[] spawnBiomes;
+        private final float[] midColor;
+
+        public int getId() {
+            return this.id;
+        }
+
+        public String getParticleName() {
+            return this.particleName;
+        }
+
+        public Biome[] getSpawnBiomes() {
+            return this.spawnBiomes;
+        }
+
+        public float[] getMidColor() {
+            return this.midColor;
+        }
+
+        public void setSpawnBiomes(Biome[] biomes) {
+            this.spawnBiomes = biomes;
+        }
+
+        public FireflyColor(int id, String particleName, Biome[] spawnBiomes, float[] midColor) {
+            this.id = id;
+            this.particleName = particleName;
+            this.spawnBiomes = spawnBiomes;
+            this.midColor = midColor;
+        }
+    }
 }
\ No newline at end of file
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobSquid.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobSquid.java
index 29ad4c86d..32cf64749 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobSquid.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobSquid.java
@@ -2,10 +2,9 @@ package net.minecraft.core.entity.animal;
 
 import net.minecraft.core.WeightedRandomLootObject;
 import net.minecraft.core.block.Block;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.Items;
-import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
@@ -129,7 +128,7 @@ public class MobSquid extends MobWaterAnimal
     @Override
     public void trySuffocate(){
         if (isSpecial()) return;
-        if(isAlive() && !isUnderLiquid(Material.water) && canBreatheUnderwater())
+        if(isAlive() && !isUnderLiquid(Materials.WATER) && canBreatheUnderwater())
         {
             airSupply--;
             if(airSupply == -20)
@@ -177,9 +176,9 @@ public class MobSquid extends MobWaterAnimal
             if (isTouchingBlock && isInWater() && !world.isAirBlock((int) x, (int) (y + 1), (int) z) && !world.isAirBlock((int) x, (int) (y + 2), (int) z)){
                 ty = random.nextFloat() * 0.2F;
             } else {
-                if (upwardsBlock == null || upwardsBlock.getMaterial() != Material.water){
+                if (upwardsBlock == null || upwardsBlock.getMaterial() != Materials.WATER){
                     ty = -0.15F + random.nextFloat() * 0.2F; // Swim with bias down
-                } else if (downwardsBlock == null || downwardsBlock.getMaterial() != Material.water) {
+                } else if (downwardsBlock == null || downwardsBlock.getMaterial() != Materials.WATER) {
                     ty = -0.05F + random.nextFloat() * 0.4F; // Swim with bias up
                 } else {
                     ty = -0.1F + random.nextFloat() * 0.2F; // Swim with no bias
@@ -206,7 +205,7 @@ public class MobSquid extends MobWaterAnimal
                     for(int _z = minZ; _z <= maxZ; _z++)
                     {
                         Block<?> block = world.getBlock(_x, _y, _z);
-                        if(block != null && block.getMaterial() != Material.water)
+                        if(block != null && block.getMaterial() != Materials.WATER)
                         {
                             return true;
                         }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWaterAnimal.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWaterAnimal.java
index f40415e21..adf2a48bd 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWaterAnimal.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWaterAnimal.java
@@ -5,43 +5,36 @@ import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
 
-public class MobWaterAnimal extends MobPathfinder
-	implements WaterCreature
-{
+public abstract class MobWaterAnimal extends MobPathfinder
+    implements WaterCreature {
 
-    public MobWaterAnimal(World world)
-    {
+    public MobWaterAnimal(World world) {
         super(world);
-        scoreValue = 10;
+        this.scoreValue = 10;
     }
 
     @Override
-	public boolean canBreatheUnderwater()
-    {
+    public boolean canBreatheUnderwater() {
         return true;
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
     }
 
     @Override
-	public boolean canSpawnHere()
-    {
-        return world.checkIfAABBIsClear(bb);
+    public boolean canSpawnHere() {
+        return this.world.checkIfAABBIsClear(this.bb);
     }
 
     @Override
-	public int getAmbientSoundInterval()
-    {
+    public int getAmbientSoundInterval() {
         return 120;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java
index 73764f68c..deabb3348 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java
@@ -14,32 +14,32 @@ import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.pathfinder.Path;
 import net.minecraft.core.world.World;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.helper.DamageType;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
 import java.util.*;
 
 public class MobWolf
     extends MobAnimal
-    implements IItemHolding, AgedMob
-{
-    public static final Map<ArmorMaterial, IArmorItem> ARMOR_MATERIALS = new HashMap<>();
+    implements IItemHolding, AgedMob {
+    public static final Map<ArmorMaterial, IArmorItem<?>> ARMOR_MATERIALS = new HashMap<>();
+
     static {
-        ARMOR_MATERIALS.put(ArmorMaterial.LEATHER,   (IArmorItem) Items.ARMOR_CHESTPLATE_LEATHER);
-        ARMOR_MATERIALS.put(ArmorMaterial.CHAINMAIL, (IArmorItem) Items.ARMOR_CHESTPLATE_CHAINMAIL);
-        ARMOR_MATERIALS.put(ArmorMaterial.IRON,      (IArmorItem) Items.ARMOR_CHESTPLATE_IRON);
-        ARMOR_MATERIALS.put(ArmorMaterial.GOLD,      (IArmorItem) Items.ARMOR_CHESTPLATE_GOLD);
-        ARMOR_MATERIALS.put(ArmorMaterial.DIAMOND,   (IArmorItem) Items.ARMOR_CHESTPLATE_DIAMOND);
-        ARMOR_MATERIALS.put(ArmorMaterial.STEEL,     (IArmorItem) Items.ARMOR_CHESTPLATE_STEEL);
+        ARMOR_MATERIALS.put(ArmorMaterial.LEATHER, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_LEATHER);
+        ARMOR_MATERIALS.put(ArmorMaterial.CHAINMAIL, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_CHAINMAIL);
+        ARMOR_MATERIALS.put(ArmorMaterial.IRON, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_IRON);
+        ARMOR_MATERIALS.put(ArmorMaterial.GOLD, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_GOLD);
+        ARMOR_MATERIALS.put(ArmorMaterial.DIAMOND, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_DIAMOND);
+        ARMOR_MATERIALS.put(ArmorMaterial.STEEL, (IArmorItem<?>) Items.ARMOR_CHESTPLATE_STEEL);
     }
 
     public static final int DATA_HELD_ITEM = 15;
     public static final int DATA_GENERIC_FLAGS = 16;
-    public static final int MASK_SITTING =  0b0000_0001;
-    public static final int MASK_ANGRY =    0b0000_0010;
-    public static final int MASK_TAMED =    0b0000_0100;
+    public static final int MASK_SITTING = 0b0000_0001;
+    public static final int MASK_ANGRY = 0b0000_0010;
+    public static final int MASK_TAMED = 0b0000_0100;
     public static final int DATA_OWNER_UUID = 17;
     public static final int DATA_ARMOR_MATERIAL = 19;
 
@@ -53,28 +53,27 @@ public class MobWolf
     private ItemStack armor = null;
     private final @NotNull MobAge age;
 
-    public MobWolf(World world)
-    {
+    public MobWolf(World world) {
         super(world);
-        looksWithInterest = false;
+        this.looksWithInterest = false;
         setTextureIdentifier("minecraft", "wolf");
         setSize(0.8F, 0.8F);
-        moveSpeed = 1.1F;
-        scoreValue = 500;
-        age = MobAge.newRandom(this, MobAge.YEAR_LENGTH_DAYS * 2, 14, MobAge.YEAR_LENGTH_DAYS * 2);
+        this.moveSpeed = 1.1F;
+        this.scoreValue = 500;
+        this.age = MobAge.newRandom(this, MobAge.YEAR_LENGTH_DAYS * 2, 14, MobAge.YEAR_LENGTH_DAYS * 2);
     }
 
     @Override
-	protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
         super.defineSynchedData();
-        entityData.define(DATA_HELD_ITEM, null, ItemStack.class);
-        entityData.define(DATA_GENERIC_FLAGS, (byte) 0, Byte.class);
-        entityData.define(DATA_OWNER_UUID, null, UUID.class);
-        entityData.define(DATA_ARMOR_MATERIAL, "", String.class);
+        this.entityData.define(DATA_HELD_ITEM, null, ItemStack.class);
+        this.entityData.define(DATA_GENERIC_FLAGS, (byte) 0, Byte.class);
+        this.entityData.define(DATA_OWNER_UUID, null, UUID.class);
+        this.entityData.define(DATA_ARMOR_MATERIAL, "", String.class);
     }
+
     @Override
-    public boolean sendDeathMessage(Entity entityKilledBy){
+    public boolean sendDeathMessage(Entity entityKilledBy) {
         return super.sendDeathMessage(entityKilledBy) || isWolfTamed();
     }
 
@@ -85,7 +84,7 @@ public class MobWolf
 
     @Override
     public void spawnInit() {
-        if(random.nextInt(25 /*Used to be 100, but I think having it that high would make it excessively rare*/) == 0){
+        if (this.random.nextInt(25 /*Used to be 100, but I think having it that high would make it excessively rare*/) == 0) {
             setHeldItem(new ItemStack(Items.RECORD_DOG, 1));
         }
     }
@@ -107,7 +106,7 @@ public class MobWolf
     public void setArmor(final ItemStack stack) {
         ArmorMaterial material = null;
         this.armor = stack;
-        if (stack != null && stack.getItem() instanceof IArmorItem && ARMOR_MATERIALS.containsValue(stack.getItem())){
+        if (stack != null && stack.getItem() instanceof IArmorItem && ARMOR_MATERIALS.containsValue(stack.getItem())) {
             material = ((IArmorItem<?>) stack.getItem()).getArmorMaterial();
         }
         if (material == null) {
@@ -118,51 +117,35 @@ public class MobWolf
     }
 
     @Override
-	protected boolean makeStepSound()
-    {
+    protected boolean makeStepSound() {
         return false;
     }
 
     @Override
-	public @NotNull String getEntityTexture()
-    {
-        if(isWolfTamed())
-        {
+    public @NotNull String getEntityTexture() {
+        if (isWolfTamed()) {
             return "/assets/minecraft/textures/entity/wolf_tame/" + getTextureReference() + ".png";
-        }
-        else if(isWolfAngry())
-        {
+        } else if (isWolfAngry()) {
             return "/assets/minecraft/textures/entity/wolf_angry/" + getTextureReference() + ".png";
-        }
-        else
-        {
+        } else {
             return super.getEntityTexture();
         }
     }
 
     @Override
-    public @NotNull String getDefaultEntityTexture()
-    {
-        if(isWolfTamed())
-        {
+    public @NotNull String getDefaultEntityTexture() {
+        if (isWolfTamed()) {
             return "/assets/minecraft/textures/entity/wolf_tame/0.png";
-        }
-        else if(isWolfAngry())
-        {
+        } else if (isWolfAngry()) {
             return "/assets/minecraft/textures/entity/wolf_angry/0.png";
-        }
-        else
-        {
+        } else {
             return super.getDefaultEntityTexture();
         }
     }
 
     @Override
-    public boolean collidesWith(Entity entity)
-    {
-        if (entity instanceof Player)
-        {
-            Player player = (Player) entity;
+    public boolean collidesWith(Entity entity) {
+        if (entity instanceof Player player) {
             return !player.uuid.equals(getWolfOwner()) || isWolfSitting();
         }
 
@@ -170,13 +153,12 @@ public class MobWolf
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
         tag.putBoolean("Angry", isWolfAngry());
         tag.putBoolean("Sitting", isWolfSitting());
 
-        if(getHeldItem() != null) {
+        if (getHeldItem() != null) {
             CompoundTag heldItemNBT = new CompoundTag();
             getHeldItem().writeToNBT(heldItemNBT);
 
@@ -184,36 +166,32 @@ public class MobWolf
         }
         if (getArmorMaterial() != null) {
             CompoundTag armorTag = new CompoundTag();
-            armor.writeToNBT(armorTag);
+            this.armor.writeToNBT(armorTag);
             tag.putCompound("Armor", armorTag);
         }
         UUIDHelper.writeToTag(tag, getWolfOwner(), "OwnerUUID");
 
-        age.writeTag(tag);
+        this.age.writeTag(tag);
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
         setWolfAngry(tag.getBoolean("Angry"));
         setWolfSitting(tag.getBoolean("Sitting"));
 
         CompoundTag heldItemStack = tag.getCompound("HeldItem");
-        if(heldItemStack != null)
-        {
+        if (heldItemStack != null) {
             ItemStack stack = ItemStack.readItemStackFromNbt(heldItemStack);
-            if (stack != null)
-            {
+            if (stack != null) {
                 setHeldItem(stack);
             }
         }
 
-        if (tag.containsKey("Armor"))
-        {
+        if (tag.containsKey("Armor")) {
             ArmorMaterial material = null;
             String name = tag.getString("Armor");
-            if (!name.isEmpty()){
+            if (!name.isEmpty()) {
                 for (ArmorMaterial mat : ArmorMaterial.getArmorMaterials()) {
                     if (mat.identifier.toString().equalsIgnoreCase(name)) {
                         material = mat;
@@ -235,7 +213,10 @@ public class MobWolf
             String s = tag.getString("Owner");
             if (!s.isEmpty()) {
                 UUIDHelper.runConversionAction(s,
-                    (uuid) -> {setWolfOwner(uuid); setWolfTamed(true);},
+                    (uuid) -> {
+                        setWolfOwner(uuid);
+                        setWolfTamed(true);
+                    },
                     null);
             }
         } else {
@@ -243,29 +224,23 @@ public class MobWolf
             setWolfTamed(true);
         }
 
-        age.readTag(tag);
+        this.age.readTag(tag);
     }
 
     @Override
-	protected boolean canDespawn()
-    {
+    protected boolean canDespawn() {
         return !isWolfTamed() && super.canDespawn();
     }
 
     @Override
-    public String getLivingSound()
-    {
-        if(isWolfAngry())
-        {
+    public String getLivingSound() {
+        if (isWolfAngry()) {
             return "mob.wolf.growl";
         }
-        if(random.nextInt(3) == 0)
-        {
-            if((isWolfTamed() && getHealth() < getMaxHealth()/2))
-            {
+        if (this.random.nextInt(3) == 0) {
+            if ((isWolfTamed() && getHealth() < getMaxHealth() / 2)) {
                 return "mob.wolf.whine";
-            } else
-            {
+            } else {
                 return "mob.wolf.panting";
             }
         } else {
@@ -274,53 +249,45 @@ public class MobWolf
     }
 
     public void whine() {
-        if(!world.isClientSide)
-        {
-            livingSoundTime = -getAmbientSoundInterval();
-            world.playSoundAtEntity(null, this, "mob.wolf.whine", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
+        if (!this.world.isClientSide) {
+            this.livingSoundTime = -getAmbientSoundInterval();
+            this.world.playSoundAtEntity(null, this, "mob.wolf.whine", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F + getPitchModifier());
         }
     }
 
     @Override
-	protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "mob.wolf.hurt";
     }
 
     @Override
-	protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "mob.wolf.death";
     }
 
     @Override
-	protected float getSoundVolume()
-    {
+    protected float getSoundVolume() {
         return 0.4F;
     }
 
     @Override
-    protected void dropDeathItems()
-    {
-        if(getHeldItem() != null && getHeldItem().stackSize > 0) {
-        	dropItem(getHeldItem(), 0.0f);
+    protected void dropDeathItems() {
+        if (getHeldItem() != null && getHeldItem().stackSize > 0) {
+            dropItem(getHeldItem(), 0.0f);
             setHeldItem(null);
         }
-        if (armor != null && armor.stackSize > 0){
-            dropItem(armor, 0);
+        if (this.armor != null && this.armor.stackSize > 0) {
+            dropItem(this.armor, 0);
             setArmor(null);
         }
         super.dropDeathItems();
     }
 
     @Override
-	protected void updateAI()
-    {
+    protected void updateAI() {
         super.updateAI();
-        if (getTarget() instanceof EntityItem)
-        {
-            if (getTarget().isInWater() || getTarget().isInLava() || getTarget().isInWall() || !getTarget().onGround || getTarget().isRemoved())
-            {
+        if (getTarget() instanceof EntityItem) {
+            if (getTarget().isInWater() || getTarget().isInLava() || getTarget().isInWall() || !getTarget().onGround || getTarget().isRemoved()) {
                 setTarget(null);
             }
         }
@@ -329,55 +296,49 @@ public class MobWolf
             setTarget(null);
         }
 
-        if(!this.hasAttacked && !hasPath() && isWolfTamed() && this.vehicle == null)
-        {
+        if (!this.hasAttacked && !hasPath() && isWolfTamed() && this.vehicle == null) {
             final Player owner = this.world.getPlayerEntityByUUID(getWolfOwner());
-            if(owner != null)
-            {
+            if (owner != null) {
                 final float ownerDistance = owner.distanceTo(this);
-                if(ownerDistance > 5F)
-                {
+                if (ownerDistance > 5F) {
                     setPathToOwnerOrTeleport(owner, ownerDistance);
                 }
-            } else
-            if(isInWater())
-            {
+            } else if (isInWater()) {
                 setWolfSitting(false);
             }
-        } else
-        if(getTarget() == null && !hasPath())
-        {
-            if(!isWolfTamed() && world.rand.nextInt(50) == 0){
+        } else if (getTarget() == null && !hasPath()) {
+            if (!isWolfTamed() && this.world.rand.nextInt(50) == 0) {
                 List<MobAnimal> validTargets = new ArrayList<>();
-                List<MobAnimal> nearbyAnimals = world.getEntitiesWithinAABB(MobAnimal.class, AABB.fromPool(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D).grow(16D, 4D, 16D));
+                AABBd checkBB = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+                MathHelper.aabbGrow(checkBB, 16D, 4D, 16D, checkBB);
+                List<MobAnimal> nearbyAnimals = this.world.getEntitiesWithinAABB(MobAnimal.class, checkBB);
                 if (!nearbyAnimals.isEmpty()) {
-                    for(int i = 0; i < nearbyAnimals.size(); i++){
+                    for (int i = 0; i < nearbyAnimals.size(); i++) {
                         MobAnimal animal = nearbyAnimals.get(i);
-                        if(animal instanceof MobSheep || animal instanceof MobDeer)
+                        if (animal instanceof MobSheep || animal instanceof MobDeer)
                             validTargets.add(animal);
                     }
                 }
                 if (!validTargets.isEmpty()) {
-                    setTarget(validTargets.get(world.rand.nextInt(validTargets.size())));
+                    setTarget(validTargets.get(this.world.rand.nextInt(validTargets.size())));
                 }
             }
         }
         if (getTarget() == null) {
             ItemStack heldItemSlot = getHeldItem();
-            if((heldItemSlot == null || heldItemSlot.itemID <= 0)) {
+            if ((heldItemSlot == null || heldItemSlot.itemID <= 0)) {
                 List<EntityItem> triedItems = new ArrayList<>();
-                List<EntityItem> nearbyItems = world.getEntitiesWithinAABB(EntityItem.class, AABB.fromPool(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D).grow(16D, 4D, 16D));
+                AABBd checkBB = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+                MathHelper.aabbGrow(checkBB, 16D, 4D, 16D, checkBB);
+                List<EntityItem> nearbyItems = this.world.getEntitiesWithinAABB(EntityItem.class, checkBB);
                 if (!nearbyItems.isEmpty()) {
-                    while (triedItems.size() != nearbyItems.size())
-                    {
-                        EntityItem item = nearbyItems.get(world.rand.nextInt(nearbyItems.size()));
-                        if (triedItems.contains(item))
-                        {
+                    while (triedItems.size() != nearbyItems.size()) {
+                        EntityItem item = nearbyItems.get(this.world.rand.nextInt(nearbyItems.size()));
+                        if (triedItems.contains(item)) {
                             continue;
                         }
 
-                        if (item.isInWater() || item.isInLava() || item.isInWall() || !item.onGround || item.isRemoved())
-                        {
+                        if (item.isInWater() || item.isInLava() || item.isInWall() || !item.onGround || item.isRemoved()) {
                             triedItems.add(item);
                             continue;
                         }
@@ -390,8 +351,7 @@ public class MobWolf
         }
 
 
-        if(isInWater())
-        {
+        if (isInWater()) {
             setWolfSitting(false);
         }
     }
@@ -402,53 +362,40 @@ public class MobWolf
     }
 
     @Override
-	public void onLivingUpdate()
-    {
+    public void onLivingUpdate() {
         super.onLivingUpdate();
-        looksWithInterest = false;
-        if(hasCurrentTarget() && !hasPath() && !isWolfAngry())
-        {
+        this.looksWithInterest = false;
+        if (hasCurrentTarget() && !hasPath() && !isWolfAngry()) {
             Entity entity = getCurrentTarget();
-            if(entity instanceof Player)
-            {
-                Player entityplayer = (Player)entity;
+            if (entity instanceof Player entityplayer) {
                 ItemStack itemstack = entityplayer.inventory.getCurrentItem();
-                if(itemstack != null)
-                {
-                    if(!isWolfTamed() && itemstack.itemID == Items.BONE.id)
-                    {
-                        looksWithInterest = true;
-                    } else
-                    if(isWolfTamed() && (Item.itemsList[itemstack.itemID] instanceof ItemFood))
-                    {
-                        looksWithInterest = ((ItemFood)Item.itemsList[itemstack.itemID]).getIsWolfsFavoriteMeat();
+                if (itemstack != null) {
+                    if (!isWolfTamed() && itemstack.itemID == Items.BONE.id) {
+                        this.looksWithInterest = true;
+                    } else if (isWolfTamed() && (Item.itemsList[itemstack.itemID] instanceof ItemFood)) {
+                        this.looksWithInterest = ((ItemFood) Item.itemsList[itemstack.itemID]).getIsWolfsFavoriteMeat();
                     }
                 }
             }
         }
-        if(!isMultiplayerEntity && isWolfShaking && !field_25052_g && !hasPath() && onGround)
-        {
-            field_25052_g = true;
-            timeWolfIsShaking = 0.0F;
-            prevTimeWolfIsShaking = 0.0F;
-            world.sendTrackedEntityStatusUpdatePacket(this, (byte)8);
+        if (!this.isMultiplayerEntity && this.isWolfShaking && !this.field_25052_g && !hasPath() && this.onGround) {
+            this.field_25052_g = true;
+            this.timeWolfIsShaking = 0.0F;
+            this.prevTimeWolfIsShaking = 0.0F;
+            this.world.sendTrackedEntityStatusUpdatePacket(this, (byte) 8);
         }
 
         this.age.tick(this.world);
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         super.tick();
 
-        List<Entity> entitiesNearWolf = world.getEntitiesWithinAABBExcludingEntity(this, bb);
-        if(entitiesNearWolf != null && !entitiesNearWolf.isEmpty() && isAlive())
-        {
+        List<Entity> entitiesNearWolf = this.world.getEntitiesWithinAABBExcludingEntity(this, this.bb);
+        if (!entitiesNearWolf.isEmpty() && isAlive()) {
             for (Entity entity : entitiesNearWolf) {
-                if(entity instanceof EntityItem && (this.getHeldItem() == null || this.getHeldItem().getItem() == null)){
-                    EntityItem entityItem = (EntityItem) entity;
-
+                if (entity instanceof EntityItem entityItem && this.getHeldItem() == null) {
                     if (entityItem.item != null && entityItem.item.stackSize > 0 && entityItem.pickupDelay == 0) {
                         setHeldItem(entityItem.item.copy());
                         entityItem.item.stackSize = 0;
@@ -461,113 +408,90 @@ public class MobWolf
 
         }
 
-        interestedAngleOld = interestedAngle;
-        if(looksWithInterest)
-        {
-            interestedAngle = interestedAngle + (1.0F - interestedAngle) * 0.4F;
-        } else
-        {
-            interestedAngle = interestedAngle + (0.0F - interestedAngle) * 0.4F;
-        }
-        if(looksWithInterest)
-        {
-            numTicksToChaseTarget = 10;
-        }
-        if(isInWaterOrRain())
-        {
-            isWolfShaking = true;
-            field_25052_g = false;
-            timeWolfIsShaking = 0.0F;
-            prevTimeWolfIsShaking = 0.0F;
-        } else
-        if((isWolfShaking || field_25052_g) && field_25052_g)
-        {
-            if(timeWolfIsShaking == 0.0F)
-            {
-                world.playSoundAtEntity(null, this, "mob.wolf.shake", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
+        this.interestedAngleOld = this.interestedAngle;
+        if (this.looksWithInterest) {
+            this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F;
+        } else {
+            this.interestedAngle = this.interestedAngle + (0.0F - this.interestedAngle) * 0.4F;
+        }
+        if (this.looksWithInterest) {
+            this.numTicksToChaseTarget = 10;
+        }
+        if (isInWaterOrRain()) {
+            this.isWolfShaking = true;
+            this.field_25052_g = false;
+            this.timeWolfIsShaking = 0.0F;
+            this.prevTimeWolfIsShaking = 0.0F;
+        } else if ((this.isWolfShaking || this.field_25052_g) && this.field_25052_g) {
+            if (this.timeWolfIsShaking == 0.0F) {
+                this.world.playSoundAtEntity(null, this, "mob.wolf.shake", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
             }
-            prevTimeWolfIsShaking = timeWolfIsShaking;
-            timeWolfIsShaking += 0.05F;
-            if(prevTimeWolfIsShaking >= 2.0F)
-            {
-                isWolfShaking = false;
-                field_25052_g = false;
-                prevTimeWolfIsShaking = 0.0F;
-                timeWolfIsShaking = 0.0F;
+            this.prevTimeWolfIsShaking = this.timeWolfIsShaking;
+            this.timeWolfIsShaking += 0.05F;
+            if (this.prevTimeWolfIsShaking >= 2.0F) {
+                this.isWolfShaking = false;
+                this.field_25052_g = false;
+                this.prevTimeWolfIsShaking = 0.0F;
+                this.timeWolfIsShaking = 0.0F;
             }
-            if(timeWolfIsShaking > 0.4F)
-            {
-                float f = (float) bb.minY;
-                int i = (int)(MathHelper.sin((timeWolfIsShaking - 0.4F) * MathHelper.PI) * 7F);
-                for(int j = 0; j < i; j++)
-                {
-                    double offX = (random.nextFloat() * 2.0F - 1.0F) * bbWidth * 0.5F;
-                    double offZ = (random.nextFloat() * 2.0F - 1.0F) * bbWidth * 0.5F;
-                    world.spawnParticle("splash", x + offX, f + 0.8F, z + offZ, xd, yd, zd, 0);
+            if (this.timeWolfIsShaking > 0.4F) {
+                float f = (float) this.bb.minY;
+                int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * MathHelper.PI) * 7F);
+                for (int j = 0; j < i; j++) {
+                    double offX = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth * 0.5F;
+                    double offZ = (this.random.nextFloat() * 2.0F - 1.0F) * this.bbWidth * 0.5F;
+                    this.world.spawnParticle("splash", this.x + offX, f + 0.8F, this.z + offZ, this.xd, this.yd, this.zd, 0);
                 }
 
             }
         }
     }
 
-    public boolean getWolfShaking()
-    {
-        return isWolfShaking;
+    public boolean getWolfShaking() {
+        return this.isWolfShaking;
     }
 
-    public float getShadingWhileShaking(final float partialTick)
-    {
+    public float getShadingWhileShaking(final float partialTick) {
         return 0.75F + MathHelper.lerp(this.prevTimeWolfIsShaking, this.timeWolfIsShaking, partialTick) / 8.0F;
     }
 
-    public float getShakeAngle(final float partialTick, final float offset)
-    {
+    public float getShakeAngle(final float partialTick, final float offset) {
         final float shakeTime = MathHelper.clamp((MathHelper.lerp(this.prevTimeWolfIsShaking, this.timeWolfIsShaking, partialTick) + offset) / 1.8F, 0, 1);
         return MathHelper.sin(shakeTime * MathHelper.PI) * MathHelper.sin(shakeTime * MathHelper.PI * 11F) * 0.15F * MathHelper.PI;
     }
 
-    public float getInterestedAngle(float f)
-    {
-        return (interestedAngleOld + (interestedAngle - interestedAngleOld) * f) * 0.15F * MathHelper.PI;
+    public float getInterestedAngle(float f) {
+        return (this.interestedAngleOld + (this.interestedAngle - this.interestedAngleOld) * f) * 0.15F * MathHelper.PI;
     }
 
     @Override
-	public float getHeadHeight()
-    {
-        return bbHeight * 0.8F;
+    public float getHeadHeight() {
+        return this.bbHeight * 0.8F;
     }
 
     @Override
-	protected int getLookingTilt()
-    {
-        if(isWolfSitting())
-        {
+    protected int getLookingTilt() {
+        if (isWolfSitting()) {
             return 40;
-        } else
-        {
+        } else {
             return super.getLookingTilt();
         }
     }
 
-    private void setPathToOwnerOrTeleport(final Entity owner, final float distance)
-    {
+    private void setPathToOwnerOrTeleport(final Entity owner, final float distance) {
         final Path path = this.world.getPathToEntity(this, owner, 16F);
-        if(path == null && distance > 12F)
-        {
+        if (path == null && distance > 12F) {
             final int targetX = MathHelper.floor(owner.x);
             final int targetY = MathHelper.floor(owner.bb.minY);
             final int targetZ = MathHelper.floor(owner.z);
             final byte searchRadius = 2;
-            for(int _x = -searchRadius; _x <= searchRadius; _x++)
-            {
-                for(int _z = -searchRadius; _z <= searchRadius; _z++)
-                {
-                    if(
+            for (int _x = -searchRadius; _x <= searchRadius; _x++) {
+                for (int _z = -searchRadius; _z <= searchRadius; _z++) {
+                    if (
                         (Math.abs(_x) > 1 || Math.abs(_z) > 1) &&  // forbid teleports within a 1 block radius of the player
                             this.world.isBlockNormalCube(targetX + _x, targetY - 1, targetZ + _z) && // Solid floor
                             !this.world.isBlockNormalCube(targetX + _x, targetY, targetZ + _z) && // Two blocks of clearance
-                            !this.world.isBlockNormalCube(targetX + _x, targetY + 1, targetZ + _z))
-                    {
+                            !this.world.isBlockNormalCube(targetX + _x, targetY + 1, targetZ + _z)) {
                         moveTo(targetX + _x + 0.5F, targetY, targetZ + _z + 0.5F, this.yRot, this.xRot);
                         this.fallDistance = 0;
                         return;
@@ -576,111 +500,82 @@ public class MobWolf
 
             }
 
-        } else
-        {
+        } else {
             setPathToEntity(path);
         }
     }
 
     @Override
-	protected boolean isMovementCeased()
-    {
-        return isWolfSitting() || field_25052_g;
+    protected boolean isMovementCeased() {
+        return isWolfSitting() || this.field_25052_g;
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
         setWolfSitting(false);
-        if(attacker != null && !(attacker instanceof Player) && !(attacker instanceof ProjectileArrow))
-        {
+        if (attacker != null && !(attacker instanceof Player) && !(attacker instanceof ProjectileArrow)) {
             i = (i + 1) / 2;
         }
-        if(super.hurt(attacker, i, type))
-        {
-            if(!isWolfTamed() && !isWolfAngry())
-            {
-                if(attacker instanceof Player)
-                {
+        if (super.hurt(attacker, i, type)) {
+            if (!isWolfTamed() && !isWolfAngry()) {
+                if (attacker instanceof Player) {
                     setWolfAngry(true);
-                    target = attacker;
+                    this.target = attacker;
                 }
-                if((attacker instanceof ProjectileArrow) && ((ProjectileArrow) attacker).owner != null)
-                {
+                if ((attacker instanceof ProjectileArrow) && ((ProjectileArrow) attacker).owner != null) {
                     attacker = ((ProjectileArrow) attacker).owner;
                 }
-                if(attacker instanceof Mob)
-                {
-                    List<MobWolf> list = world.getEntitiesWithinAABB(MobWolf.class, AABB.fromPool(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D).grow(16D, 4D, 16D));
-                    Iterator<MobWolf> iterator = list.iterator();
-                    do
-                    {
-                        if(!iterator.hasNext())
-                        {
-                            break;
-                        }
-                        MobWolf mobWolf = iterator.next();
-                        if(!mobWolf.isWolfTamed() && mobWolf.target == null)
-                        {
+                if (attacker instanceof Mob) {
+                    AABBd checkBB = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+                    MathHelper.aabbGrow(checkBB, 16D, 4D, 16D, checkBB);
+                    List<MobWolf> list = this.world.getEntitiesWithinAABB(MobWolf.class, checkBB);
+                    for (MobWolf mobWolf : list) {
+                        if (!mobWolf.isWolfTamed() && mobWolf.target == null) {
                             mobWolf.target = attacker;
-                            if(attacker instanceof Player)
-                            {
+                            if (attacker instanceof Player) {
                                 mobWolf.setWolfAngry(true);
                             }
                         }
-                    } while(true);
+                    }
                 }
-            } else
-            if(attacker != this && attacker != null)
-            {
-                if(isWolfTamed() && (attacker instanceof Player) && ((Player) attacker).uuid.equals(getWolfOwner()))
-                {
+            } else if (attacker != this && attacker != null) {
+                if (isWolfTamed() && attacker instanceof Player attackerPlayer && attackerPlayer.uuid.equals(getWolfOwner())) {
                     return true;
                 }
-                target = attacker;
+                this.target = attacker;
             }
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
 
     @Override
-	protected Entity findPlayerToAttack()
-    {
-        if(isWolfAngry())
-        {
-            return world.getClosestPlayerToEntity(this, 16D);
-        } else
-        {
+    protected Entity findPlayerToAttack() {
+        if (isWolfAngry()) {
+            return this.world.getClosestPlayerToEntity(this, 16D);
+        } else {
             return null;
         }
     }
 
     @Override
-	protected void attackEntity(@NotNull Entity entity, float distance)
-    {
-        if(entity instanceof EntityItem || entity == world.getPlayerEntityByUUID(getWolfOwner()))
+    protected void attackEntity(@NotNull Entity entity, float distance) {
+        if (entity instanceof EntityItem || entity == this.world.getPlayerEntityByUUID(getWolfOwner()))
             return;
-        if(distance > 2.0F && distance < 6F && random.nextInt(10) == 0)
-        {
-            if(onGround)
-            {
-                double dx = entity.x - x;
-                double dz = entity.z - z;
+        if (distance > 2.0F && distance < 6F && this.random.nextInt(10) == 0) {
+            if (this.onGround) {
+                double dx = entity.x - this.x;
+                double dz = entity.z - this.z;
                 float targetDistance = MathHelper.sqrt(dx * dx + dz * dz);
-                xd = (dx / targetDistance) * 0.5D * 0.8D + xd * 0.2D;
-                zd = (dz / targetDistance) * 0.5D * 0.8D + zd * 0.2D;
-                yd = 0.4D;
+                this.xd = (dx / targetDistance) * 0.5D * 0.8D + this.xd * 0.2D;
+                this.zd = (dz / targetDistance) * 0.5D * 0.8D + this.zd * 0.2D;
+                this.yd = 0.4D;
             }
-        } else
-        if(distance < 1.5D && entity.bb.maxY > bb.minY && entity.bb.minY < bb.maxY)
-        {
-            attackTime = 20;
+        } else if (distance < 1.5D && entity.bb.maxY > this.bb.minY && entity.bb.minY < this.bb.maxY) {
+            this.attackTime = 20;
             byte damage = 2;
-            if(isWolfTamed())
-            {
+            if (isWolfTamed()) {
                 damage = 4;
             }
             entity.hurt(this, damage, DamageType.COMBAT);
@@ -700,15 +595,13 @@ public class MobWolf
         //If you take little damage and have lots of protection against that damage
         //there is a high change you wont take any damage
         double d = damage * protection;
-        int newDamage = (int) (random.nextFloat() > 0.5 ? Math.floor(d) : Math.ceil(d));
+        int newDamage = (int) (this.random.nextFloat() > 0.5 ? Math.floor(d) : Math.ceil(d));
 
         super.damageEntity(newDamage, damageType);
     }
 
-    public void lavaHurt()
-    {
-        if(!fireImmune)
-        {
+    public void lavaHurt() {
+        if (!this.fireImmune) {
             float protection = 0;
             ArmorMaterial material;
             if ((material = getArmorMaterial()) != null) {
@@ -716,15 +609,13 @@ public class MobWolf
             }
             protection = Math.max(protection, 0.01f);
             hurt(null, 4, DamageType.FIRE);
-            remainingFireTicks = (int) (80 + 520 * protection);
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = (int) (80 + 520 * protection);
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
 
-    public void fireHurt()
-    {
-        if(!fireImmune)
-        {
+    public void fireHurt() {
+        if (!this.fireImmune) {
             float protection = 0;
             ArmorMaterial material;
             if ((material = getArmorMaterial()) != null) {
@@ -732,68 +623,54 @@ public class MobWolf
             }
             protection = Math.max(protection, 0.01f);
             hurt(null, 1, DamageType.FIRE);
-            remainingFireTicks = (int) (40 + 260 * protection);
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = (int) (40 + 260 * protection);
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
 
     @Override
-	public boolean interact(@NotNull Player player)
-    {
+    public boolean interact(@NotNull Player player) {
         if (super.interact(player)) return true;
         ItemStack itemstack = player.inventory.getCurrentItem();
-        if(!isWolfTamed())
-        {
-            if(itemstack != null && itemstack.itemID == Items.BONE.id && !isWolfAngry())
-            {
+        if (!isWolfTamed()) {
+            if (itemstack != null && itemstack.itemID == Items.BONE.id && !isWolfAngry()) {
                 itemstack.consumeItem(player);
-                if(itemstack.stackSize <= 0)
-                {
+                if (itemstack.stackSize <= 0) {
                     player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
                 }
-                if(!world.isClientSide)
-                {
-                    if(random.nextInt(3) == 0 || !player.getGamemode().consumeBlocks())
-                    {
+                if (!this.world.isClientSide) {
+                    if (this.random.nextInt(3) == 0 || !player.getGamemode().consumeBlocks()) {
                         setWolfTamed(true);
                         setPathToEntity(null);
                         setWolfSitting(true);
                         setHealthRaw(getMaxHealth());
                         setWolfOwner(player.uuid);
                         showHeartsOrSmokeFX(true);
-                        world.sendTrackedEntityStatusUpdatePacket(this, (byte)7);
-                    } else
-                    {
+                        this.world.sendTrackedEntityStatusUpdatePacket(this, (byte) 7);
+                    } else {
                         showHeartsOrSmokeFX(false);
-                        world.sendTrackedEntityStatusUpdatePacket(this, (byte)6);
+                        this.world.sendTrackedEntityStatusUpdatePacket(this, (byte) 6);
                     }
                 }
                 return true;
             }
-        } else
-        {
-            if(itemstack != null && (Item.itemsList[itemstack.itemID] instanceof ItemFood))
-            {
-                ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID];
-                if(itemfood.getIsWolfsFavoriteMeat() && getHealth() < getMaxHealth())
-                {
-                	if (player.getGamemode().consumeBlocks())
-                	{
-                		itemstack.stackSize--;
-                		if(itemstack.stackSize <= 0)
-                		{
-                			player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
-                		}                		
-                	}
+        } else {
+            if (itemstack != null && (Item.itemsList[itemstack.itemID] instanceof ItemFood itemfood)) {
+                if (itemfood.getIsWolfsFavoriteMeat() && getHealth() < getMaxHealth()) {
+                    if (player.getGamemode().consumeBlocks()) {
+                        itemstack.stackSize--;
+                        if (itemstack.stackSize <= 0) {
+                            player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
+                        }
+                    }
                     heal(itemfood.getHealAmount());
                     return true;
                 }
             }
-            if (itemstack != null && itemstack.getItem() instanceof IArmorItem && player.uuid.equals(getWolfOwner())) {
-                IArmorItem armorItem = (IArmorItem) itemstack.getItem();
+            if (itemstack != null && itemstack.getItem() instanceof IArmorItem<?> armorItem && player.uuid.equals(getWolfOwner())) {
                 if (armorItem.getArmorMaterial() != null && ARMOR_MATERIALS.containsValue(armorItem)) {
-                    if (armor != null) {
-                        dropItem(armor, 0.0f);
+                    if (this.armor != null) {
+                        dropItem(this.armor, 0.0f);
                         setArmor(null);
                     }
                     setArmor(new ItemStack(itemstack.getItem(), 1, itemstack.getMetadata(), itemstack.getData()));
@@ -806,24 +683,22 @@ public class MobWolf
                     return true;
                 }
             }
-            if (itemstack == null && player.isSneaking() && armor != null && player.uuid.equals(getWolfOwner())) {
-                dropItem(armor, 0.0f);
+            if (itemstack == null && player.isSneaking() && this.armor != null && player.uuid.equals(getWolfOwner())) {
+                dropItem(this.armor, 0.0f);
                 setArmor(null);
                 return true;
             }
-            if(player.uuid.equals(getWolfOwner()))
-            {
-                if(!world.isClientSide)
-                {
+            if (player.uuid.equals(getWolfOwner())) {
+                if (!this.world.isClientSide) {
                     ItemStack heldItemSlot = getHeldItem();
-                    if(isWolfSitting() && heldItemSlot != null && heldItemSlot.getItem() != null && heldItemSlot.itemID > 0 && !player.isSneaking()) {
-                    	player.inventory.insertItem(heldItemSlot, true);
-                    	if(heldItemSlot.stackSize <= 0) {
-                    		setHeldItem(null);
-                    	}
-                    }else {
+                    if (isWolfSitting() && heldItemSlot != null && heldItemSlot.itemID > 0 && !player.isSneaking()) {
+                        player.inventory.insertItem(heldItemSlot, true);
+                        if (heldItemSlot.stackSize <= 0) {
+                            setHeldItem(null);
+                        }
+                    } else {
                         setWolfSitting(!isWolfSitting());
-                        isJumping = false;
+                        this.isJumping = false;
                         setPathToEntity(null);
                     }
                 }
@@ -833,110 +708,87 @@ public class MobWolf
         return false;
     }
 
-    void showHeartsOrSmokeFX(boolean doSmoke)
-    {
+    void showHeartsOrSmokeFX(boolean doSmoke) {
         String s = "heart";
-        if(!doSmoke)
-        {
+        if (!doSmoke) {
             s = "smoke";
         }
-        for(int i = 0; i < 7; i++)
-        {
-            double motionX = random.nextGaussian() * 0.02D;
-            double motionY = random.nextGaussian() * 0.02D;
-            double motionZ = random.nextGaussian() * 0.02D;
-            world.spawnParticle(s, (x + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth, y + 0.5D + (double)(random.nextFloat() * bbHeight), (z + (double)(random.nextFloat() * bbWidth * 2.0F)) - (double) bbWidth, motionX, motionY, motionZ, 0);
+        for (int i = 0; i < 7; i++) {
+            double motionX = this.random.nextGaussian() * 0.02D;
+            double motionY = this.random.nextGaussian() * 0.02D;
+            double motionZ = this.random.nextGaussian() * 0.02D;
+            this.world.spawnParticle(s, (this.x + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth, this.y + 0.5D + (double) (this.random.nextFloat() * this.bbHeight), (this.z + (double) (this.random.nextFloat() * this.bbWidth * 2.0F)) - (double) this.bbWidth, motionX, motionY, motionZ, 0);
         }
 
     }
+
     @Override
-    public int getMaxHealth(){
-        if (isWolfTamed()){
+    public int getMaxHealth() {
+        if (isWolfTamed()) {
             return 20;
         }
         return 8;
     }
 
     @Override
-	public void handleEntityEvent(byte byte0, float attackedAtYaw)
-    {
-        if(byte0 == 7)
-        {
+    public void handleEntityEvent(byte byte0, float attackedAtYaw) {
+        if (byte0 == 7) {
             showHeartsOrSmokeFX(true);
-        } else
-        if(byte0 == 6)
-        {
+        } else if (byte0 == 6) {
             showHeartsOrSmokeFX(false);
-        } else
-        if(byte0 == 8)
-        {
-            field_25052_g = true;
-            timeWolfIsShaking = 0.0F;
-            prevTimeWolfIsShaking = 0.0F;
-        } else
-        {
+        } else if (byte0 == 8) {
+            this.field_25052_g = true;
+            this.timeWolfIsShaking = 0.0F;
+            this.prevTimeWolfIsShaking = 0.0F;
+        } else {
             super.handleEntityEvent(byte0, attackedAtYaw);
         }
     }
 
-    public @Nullable UUID getWolfOwner()
-    {
-        return entityData.getUUID(DATA_OWNER_UUID);
+    public @Nullable UUID getWolfOwner() {
+        return this.entityData.getUUID(DATA_OWNER_UUID);
     }
 
-    public void setWolfOwner(UUID uuid)
-    {
-        entityData.set(DATA_OWNER_UUID, uuid);
+    public void setWolfOwner(UUID uuid) {
+        this.entityData.set(DATA_OWNER_UUID, uuid);
     }
 
-    public boolean isWolfSitting()
-    {
-        return (entityData.getByte(DATA_GENERIC_FLAGS) & MASK_SITTING) != 0;
+    public boolean isWolfSitting() {
+        return (this.entityData.getByte(DATA_GENERIC_FLAGS) & MASK_SITTING) != 0;
     }
 
-    public void setWolfSitting(boolean flag)
-    {
-        byte data = entityData.getByte(DATA_GENERIC_FLAGS);
-        if(flag)
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_SITTING));
-        } else
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_SITTING));
+    public void setWolfSitting(boolean flag) {
+        byte data = this.entityData.getByte(DATA_GENERIC_FLAGS);
+        if (flag) {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_SITTING));
+        } else {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_SITTING));
         }
     }
 
-    public boolean isWolfAngry()
-    {
-        return (entityData.getByte(DATA_GENERIC_FLAGS) & MASK_ANGRY) != 0;
+    public boolean isWolfAngry() {
+        return (this.entityData.getByte(DATA_GENERIC_FLAGS) & MASK_ANGRY) != 0;
     }
 
-    public void setWolfAngry(boolean flag)
-    {
-        byte data = entityData.getByte(DATA_GENERIC_FLAGS);
-        if(flag)
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_ANGRY));
-        } else
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_ANGRY));
+    public void setWolfAngry(boolean flag) {
+        byte data = this.entityData.getByte(DATA_GENERIC_FLAGS);
+        if (flag) {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_ANGRY));
+        } else {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_ANGRY));
         }
     }
 
-    public boolean isWolfTamed()
-    {
-        return (entityData.getByte(DATA_GENERIC_FLAGS) & MASK_TAMED) != 0;
+    public boolean isWolfTamed() {
+        return (this.entityData.getByte(DATA_GENERIC_FLAGS) & MASK_TAMED) != 0;
     }
 
-    public void setWolfTamed(boolean flag)
-    {
-        byte data = entityData.getByte(DATA_GENERIC_FLAGS);
-        if(flag)
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_TAMED));
-        } else
-        {
-            entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_TAMED));
+    public void setWolfTamed(boolean flag) {
+        byte data = this.entityData.getByte(DATA_GENERIC_FLAGS);
+        if (flag) {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data | MASK_TAMED));
+        } else {
+            this.entityData.set(DATA_GENERIC_FLAGS, (byte) (data & ~MASK_TAMED));
         }
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/entity/monster/MobGhast.java b/game/core/src/main/java/net/minecraft/core/entity/monster/MobGhast.java
index d78e45c64..b39971d03 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/monster/MobGhast.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/monster/MobGhast.java
@@ -1,23 +1,22 @@
 package net.minecraft.core.entity.monster;
 
 import net.minecraft.core.WeightedRandomLootObject;
-import net.minecraft.core.block.Block;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.entity.MobFlying;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.entity.projectile.ProjectileFireball;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.helper.DamageType;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 public class MobGhast extends MobFlying
-    implements Enemy
-{
+    implements Enemy {
     public static final int DATA_CHARGING = 16;
     public int courseChangeCooldown;
     public double waypointX;
@@ -29,200 +28,163 @@ public class MobGhast extends MobFlying
     public int attackCharge;
 
 
-    public MobGhast(World world)
-    {
+    public MobGhast(World world) {
         super(world);
-        courseChangeCooldown = 0;
-        targetedEntity = null;
-        aggroCooldown = 0;
-        attackChargeO = 0;
-        attackCharge = 0;
+        this.courseChangeCooldown = 0;
+        this.targetedEntity = null;
+        this.aggroCooldown = 0;
+        this.attackChargeO = 0;
+        this.attackCharge = 0;
         setTextureIdentifier("minecraft", "ghast");
         setSize(4F, 7F);
-        fireImmune = true;
-        scoreValue = 1000;
-        bb.grow(2F, 3F, 2F);
-        mobDrops.add(new WeightedRandomLootObject(Items.GUNPOWDER.getDefaultStack(), 0, 2));
+        this.fireImmune = true;
+        this.scoreValue = 1000;
+        MathHelper.aabbGrow(this.bb, 2f, 3f, 2f, this.bb);
+        this.mobDrops.add(new WeightedRandomLootObject(Items.GUNPOWDER.getDefaultStack(), 0, 2));
     }
 
     @Override
-	protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
         super.defineSynchedData();
-        entityData.define(DATA_CHARGING, (byte) 0, Byte.class);
+        this.entityData.define(DATA_CHARGING, (byte) 0, Byte.class);
     }
 
     @Override
-    public @NotNull String getEntityTexture()
-    {
-        if (this.entityData.getByte(DATA_CHARGING) != 1)
-        {
+    public @NotNull String getEntityTexture() {
+        if (this.entityData.getByte(DATA_CHARGING) != 1) {
             return super.getEntityTexture();
-        }
-        else
-        {
+        } else {
             return "/assets/minecraft/textures/entity/ghast_fire/" + getTextureReference() + ".png";
         }
     }
 
     @Override
-    public @NotNull String getDefaultEntityTexture()
-    {
-        if (this.entityData.getByte(DATA_CHARGING) != 1)
-        {
+    public @NotNull String getDefaultEntityTexture() {
+        if (this.entityData.getByte(DATA_CHARGING) != 1) {
             return super.getEntityTexture();
-        }
-        else
-        {
+        } else {
             return "/assets/minecraft/textures/entity/ghast_fire/0.png";
         }
     }
 
-    public void tick()
-    {
+    public void tick() {
         //prevAttackCounter = attackCounter; -uncomment if it still doesn't work
-        if(world.isClientSide)
-        {
-            byte i = entityData.getByte(DATA_CHARGING);
-            if(i > 0 && attackCharge == 0)
-            {
-                world.playSoundAtEntity(null, this, "mob.ghast.charge", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
+        if (this.world.isClientSide) {
+            byte i = this.entityData.getByte(DATA_CHARGING);
+            if (i > 0 && this.attackCharge == 0) {
+                this.world.playSoundAtEntity(null, this, "mob.ghast.charge", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
             }
-            attackCharge += i;
-            if(attackCharge < 0)
-            {
-                attackCharge = 0;
+            this.attackCharge += i;
+            if (this.attackCharge < 0) {
+                this.attackCharge = 0;
             }
-            if(attackCharge >= 20)
-            {
-                attackCharge = 20;
+            if (this.attackCharge >= 20) {
+                this.attackCharge = 20;
             }
-            if(attackCharge >= 20 && i == 0){
-                world.playSoundAtEntity(null, this, "mob.ghast.fireball", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
-                attackCharge = -40;
+            if (this.attackCharge >= 20 && i == 0) {
+                this.world.playSoundAtEntity(null, this, "mob.ghast.fireball", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+                this.attackCharge = -40;
             }
         }
         super.tick();
     }
 
     @Override
-	protected void updateAI()
-    {
-        if(!world.isClientSide && !world.getDifficulty().canHostileMobsSpawn())
-        {
+    protected void updateAI() {
+        if (!this.world.isClientSide && !this.world.getDifficulty().canHostileMobsSpawn()) {
             remove();
         }
         tryToDespawn();
-        attackChargeO = attackCharge;
-        double d = waypointX - x;
-        double d1 = waypointY - y;
-        double d2 = waypointZ - z;
+        this.attackChargeO = this.attackCharge;
+        double d = this.waypointX - this.x;
+        double d1 = this.waypointY - this.y;
+        double d2 = this.waypointZ - this.z;
         double d3 = MathHelper.sqrt(d * d + d1 * d1 + d2 * d2);
-        if(d3 < 1.0D || d3 > 60D)
-        {
-            waypointX = x + (double)((random.nextFloat() * 2.0F - 1.0F) * 16F);
-            waypointY = y + (double)((random.nextFloat() * 2.0F - 1.0F) * 16F);
-            waypointZ = z + (double)((random.nextFloat() * 2.0F - 1.0F) * 16F);
+        if (d3 < 1.0D || d3 > 60D) {
+            this.waypointX = this.x + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16F);
+            this.waypointY = this.y + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16F);
+            this.waypointZ = this.z + (double) ((this.random.nextFloat() * 2.0F - 1.0F) * 16F);
         }
-        if(courseChangeCooldown-- <= 0)
-        {
-            courseChangeCooldown += random.nextInt(5) + 2;
-            if(isCourseTraversable(waypointX, waypointY, waypointZ, d3))
-            {
-                xd += (d / d3) * 0.1D;
-                yd += (d1 / d3) * 0.1D;
-                zd += (d2 / d3) * 0.1D;
-            } else
-            {
-                waypointX = x;
-                waypointY = y;
-                waypointZ = z;
+        if (this.courseChangeCooldown-- <= 0) {
+            this.courseChangeCooldown += this.random.nextInt(5) + 2;
+            if (isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) {
+                this.xd += (d / d3) * 0.1D;
+                this.yd += (d1 / d3) * 0.1D;
+                this.zd += (d2 / d3) * 0.1D;
+            } else {
+                this.waypointX = this.x;
+                this.waypointY = this.y;
+                this.waypointZ = this.z;
             }
         }
-        if(targetedEntity != null && targetedEntity.removed)
-        {
-            targetedEntity = null;
+        if (this.targetedEntity != null && this.targetedEntity.removed) {
+            this.targetedEntity = null;
         }
-        if(targetedEntity == null || aggroCooldown-- <= 0)
-        {
-            targetedEntity = world.getClosestPlayerToEntity(this, 100D);
-            if (targetedEntity != null && !((Player) targetedEntity).getGamemode().areMobsHostile())
-            {
-            	targetedEntity = null;
+        if (this.targetedEntity == null || this.aggroCooldown-- <= 0) {
+            this.targetedEntity = this.world.getClosestPlayerToEntity(this, 100D);
+            if (this.targetedEntity != null && !((Player) this.targetedEntity).getGamemode().areMobsHostile()) {
+                this.targetedEntity = null;
             }
-            if(targetedEntity != null)
-            {
-                aggroCooldown = 20;
+            if (this.targetedEntity != null) {
+                this.aggroCooldown = 20;
             }
         }
         double d4 = 64D;
-        if(targetedEntity != null && targetedEntity.distanceToSqr(this) < d4 * d4)
-        {
+        if (this.targetedEntity != null && this.targetedEntity.distanceToSqr(this) < d4 * d4) {
             double d8 = 4D;
-            Vec3 vec3 = getViewVector(1.0F);
-            double dX = targetedEntity.x - x;
-            double dY = targetedEntity.y - y;
-            double dZ = targetedEntity.z - z;
+            Vector3dc viewVec = getViewVector(1.0F);
+            assert viewVec != null;
+            double dX = this.targetedEntity.x - this.x;
+            double dY = this.targetedEntity.y - this.y;
+            double dZ = this.targetedEntity.z - this.z;
             double dist = MathHelper.sqrt(dX * dX + dY * dY + dZ * dZ);
-            double vX = dX + (targetedEntity.xd * dist/7.5d) - vec3.x * d8;
-            double vY = dY + (targetedEntity.yd * dist/7.5d) - ((double)(bbHeight / 2.0F) + 0.5D);
-            double vZ = dZ + (targetedEntity.zd * dist/7.5d) - vec3.z * d8;
-            yBodyRot = yRot = (-(float) java.lang.Math.atan2(vX, vZ) * 180F) / MathHelper.PI;
-            if(canEntityBeSeen(targetedEntity))
-            {
-                if(attackCharge == 10)
-                {
-                    world.playSoundAtEntity(null, this, "mob.ghast.charge", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
+            double vX = dX + (this.targetedEntity.xd * dist / 7.5d) - viewVec.x() * d8;
+            double vY = dY + (this.targetedEntity.yd * dist / 7.5d) - ((double) (this.bbHeight / 2.0F) + 0.5D);
+            double vZ = dZ + (this.targetedEntity.zd * dist / 7.5d) - viewVec.z() * d8;
+            this.yBodyRot = this.yRot = (-(float) java.lang.Math.atan2(vX, vZ) * 180F) / MathHelper.PI;
+            if (canEntityBeSeen(this.targetedEntity)) {
+                if (this.attackCharge == 10) {
+                    this.world.playSoundAtEntity(null, this, "mob.ghast.charge", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
                 }
-                attackCharge++;
-                if(attackCharge == 20)
-                {
-                    world.playSoundAtEntity(null, this, "mob.ghast.fireball", getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
-                    ProjectileFireball fireball = new ProjectileFireball(world, this, vX, vY, vZ);
-
-                    fireball.x = x + vec3.x * d8;
-                    fireball.y = y + (double)(bbHeight / 2.0F) + 0.5D;
-                    fireball.z = z + vec3.z * d8;
-                    world.entityJoinedWorld(fireball);
-                    attackCharge = -40;
+                this.attackCharge++;
+                if (this.attackCharge == 20) {
+                    this.world.playSoundAtEntity(null, this, "mob.ghast.fireball", getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+                    ProjectileFireball fireball = new ProjectileFireball(this.world, this, vX, vY, vZ);
+
+                    fireball.x = this.x + viewVec.x() * d8;
+                    fireball.y = this.y + (double) (this.bbHeight / 2.0F) + 0.5D;
+                    fireball.z = this.z + viewVec.z() * d8;
+                    this.world.entityJoinedWorld(fireball);
+                    this.attackCharge = -40;
                 }
-            } else
-            if(attackCharge > 0)
-            {
-                attackCharge--;
+            } else if (this.attackCharge > 0) {
+                this.attackCharge--;
             } else {
-                targetedEntity = null;
+                this.targetedEntity = null;
             }
-        } else
-        {
-            yBodyRot = yRot = (-(float) java.lang.Math.atan2(xd, zd) * 180F) / MathHelper.PI;
-            if(attackCharge > 0)
-            {
-                attackCharge--;
+        } else {
+            this.yBodyRot = this.yRot = (-(float) java.lang.Math.atan2(this.xd, this.zd) * 180F) / MathHelper.PI;
+            if (this.attackCharge > 0) {
+                this.attackCharge--;
             }
         }
-        if(!world.isClientSide)
-        {
-            byte chargeData = entityData.getByte(DATA_CHARGING);
-            byte chargeState = (byte)(attackCharge <= 10 ? 0 : 1);
-            if(chargeData != chargeState)
-            {
-                entityData.set(DATA_CHARGING, chargeState);
+        if (!this.world.isClientSide) {
+            byte chargeData = this.entityData.getByte(DATA_CHARGING);
+            byte chargeState = (byte) (this.attackCharge <= 10 ? 0 : 1);
+            if (chargeData != chargeState) {
+                this.entityData.set(DATA_CHARGING, chargeState);
             }
         }
     }
 
-    private boolean isCourseTraversable(double d, double d1, double d2, double d3)
-    {
-        double d4 = (waypointX - x) / d3;
-        double d5 = (waypointY - y) / d3;
-        double d6 = (waypointZ - z) / d3;
-        AABB axisalignedbb = bb.copy();
-        for(int i = 1; (double)i < d3; i++)
-        {
-            axisalignedbb.move(d4, d5, d6);
-            if(world.getCubes(this, axisalignedbb).size() > 0)
-            {
+    private boolean isCourseTraversable(double x, double y, double z, double d3) {
+        double d4 = (x - this.x) / d3;
+        double d5 = (y - this.y) / d3;
+        double d6 = (z - this.z) / d3;
+        AABBd aabb = new AABBd(this.bb);
+        for (int i = 1; (double) i < d3; i++) {
+            aabb.translate(d4, d5, d6);
+            if (!this.world.getCubes(this, aabb).isEmpty()) {
                 return false;
             }
         }
@@ -231,63 +193,52 @@ public class MobGhast extends MobFlying
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
-        if(super.hurt(attacker, i, type))
-        {
-            if(passenger == attacker || vehicle == attacker)
-            {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
+        if (super.hurt(attacker, i, type)) {
+            if (this.passenger == attacker || this.vehicle == attacker) {
                 return true;
             }
-            if(attacker != this)
-            {
-                targetedEntity = attacker;
-                aggroCooldown = 60;
+            if (attacker != this) {
+                this.targetedEntity = attacker;
+                this.aggroCooldown = 60;
             }
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
 
     @Override
-    public String getLivingSound()
-    {
+    public String getLivingSound() {
         return "mob.ghast.moan";
     }
 
     @Override
-	protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "mob.ghast.scream";
     }
 
     @Override
-	protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "mob.ghast.death";
     }
 
     @Override
-	protected float getSoundVolume()
-    {
+    protected float getSoundVolume() {
         return 10F;
     }
 
     @Override
-	public boolean canSpawnHere()
-    {
+    public boolean canSpawnHere() {
         return
             this.world.getDifficulty().canHostileMobsSpawn() &&
                 this.random.nextInt(20) == 0 &&
-                BlockTags.NETHER_MOBS_SPAWN.appliesTo(this.world.getBlock(MathHelper.floor(this.x), MathHelper.floor(this.y - this.heightOffset) - 1, MathHelper.floor(this.z))) &&
+                BlockTags.NETHER_MOBS_SPAWN.appliesTo(this.world.getBlock(new TilePos(this.x, this.y - this.heightOffset - 1, this.z))) &&
                 super.canSpawnHere();
     }
 
     @Override
-	public int getMaxSpawnedInChunk()
-    {
+    public int getMaxSpawnedInChunk() {
         return 1;
     }
 
@@ -298,6 +249,6 @@ public class MobGhast extends MobFlying
 
     @Override
     public int calcLightmap(float partialTick) {
-        return world.getLightmapCoord(15, 15);
+        return this.world.getLightmapCoord(15, 15);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/monster/MobMonster.java b/game/core/src/main/java/net/minecraft/core/entity/monster/MobMonster.java
index b07e251e9..a7f292162 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/monster/MobMonster.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/monster/MobMonster.java
@@ -4,37 +4,37 @@ import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.MobPathfinder;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.LightLayer;
-import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.util.helper.DamageType;
+import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.core.world.season.Seasons;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 public abstract class MobMonster extends MobPathfinder
-    implements Enemy
-{
+    implements Enemy {
 
-    public MobMonster(@NotNull final World world)
-    {
+    public MobMonster(@NotNull final World world) {
         super(world);
-        attackStrength = 2;
+        this.attackStrength = 2;
     }
+
     @Override
-    public int getMaxHealth(){
+    public int getMaxHealth() {
         return 20;
     }
+
     @Override
-    protected void updateAI()
-    {
-        if(closestFireflyEntity == null) {
-            closestFireflyEntity = getClosestFireflyToEntity((int) x, (int) y, (int) z, 8F);
+    protected void updateAI() {
+        if (this.closestFireflyEntity == null) {
+            this.closestFireflyEntity = getClosestFireflyToEntity((int) this.x, (int) this.y, (int) this.z, 8F);
         }
 
-        if(closestFireflyEntity != null){
-            double dX = x - closestFireflyEntity.x;
-            double dZ = z - closestFireflyEntity.z;
+        if (this.closestFireflyEntity != null) {
+            double dX = this.x - this.closestFireflyEntity.x;
+            double dZ = this.z - this.closestFireflyEntity.z;
 
             double hypotenuse = Math.sqrt((dX * dX) + (dZ * dZ));
 
@@ -42,118 +42,97 @@ public abstract class MobMonster extends MobPathfinder
             dX = dX * scaleFactor;
             dZ = dZ * scaleFactor;
 
-            Vec3 distanceXYZ = Vec3.fromPool(x + dX, y, z + dZ);
-            pathToEntity = world.getEntityPathToXYZ(this, MathHelper.floor(distanceXYZ.x), MathHelper.floor(y), MathHelper.floor(distanceXYZ.z), 16F);
+            Vector3dc distanceXYZ = new Vector3d(this.x + dX, this.y, this.z + dZ);
+            this.pathToEntity = this.world.getEntityPathToTilePos(this, new TilePos(distanceXYZ), 16F);
         }
 
         super.updateAI();
     }
 
     @Override
-	public void onLivingUpdate()
-    {
+    public void onLivingUpdate() {
         float f = calcBrightness(1.0F);
-        if(f > 0.5F)
-        {
-            entityAge += 2;
+        if (f > 0.5F) {
+            this.entityAge += 2;
         }
         super.onLivingUpdate();
     }
 
     @Override
-	public void tick()
-    {
+    public void tick() {
         super.tick();
-        if(!world.isClientSide && !world.getDifficulty().canHostileMobsSpawn())
-        {
+        if (!this.world.isClientSide && !this.world.getDifficulty().canHostileMobsSpawn()) {
             remove();
         }
     }
 
     @Override
-	protected Entity findPlayerToAttack()
-    {
-        Player entityplayer = world.getClosestPlayerToEntity(this, 16D);
-        if(entityplayer != null && canEntityBeSeen(entityplayer) && entityplayer.getGamemode().areMobsHostile())
-        {
+    protected Entity findPlayerToAttack() {
+        Player entityplayer = this.world.getClosestPlayerToEntity(this, 16D);
+        if (entityplayer != null && canEntityBeSeen(entityplayer) && entityplayer.getGamemode().areMobsHostile()) {
             return entityplayer;
-        } else
-        {
+        } else {
             return null;
         }
     }
 
     @Override
-	public int getMaxSpawnedInChunk()
-    {
-        if(world.getSeasonManager().getCurrentSeason()== Seasons.OVERWORLD_SPRING)
+    public int getMaxSpawnedInChunk() {
+        if (this.world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_SPRING)
             return 2;
-        if(world.getSeasonManager().getCurrentSeason()== Seasons.OVERWORLD_WINTER)
+        if (this.world.getSeasonManager().getCurrentSeason() == Seasons.OVERWORLD_WINTER)
             return 8;
         return 4;
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
-        if(super.hurt(attacker, i, type))
-        {
-            if(passenger == attacker || vehicle == attacker)
-            {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
+        if (super.hurt(attacker, i, type)) {
+            if (this.passenger == attacker || this.vehicle == attacker) {
                 return true;
             }
-            if(attacker != this)
-            {
-                target = attacker;
+            if (attacker != this) {
+                this.target = attacker;
             }
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
 
     @Override
-	protected void attackEntity(@NotNull Entity entity, float distance)
-    {
-        if(attackTime <= 0 && distance < 2.0F && entity.bb.maxY > bb.minY && entity.bb.minY < bb.maxY)
-        {
-            attackTime = 20;
-            entity.hurt(this, attackStrength, DamageType.COMBAT);
+    protected void attackEntity(@NotNull Entity entity, float distance) {
+        if (this.attackTime <= 0 && distance < 2.0F && entity.bb.maxY > this.bb.minY && entity.bb.minY < this.bb.maxY) {
+            this.attackTime = 20;
+            entity.hurt(this, this.attackStrength, DamageType.COMBAT);
         }
     }
 
     @Override
-	protected float getBlockPathWeight(int x, int y, int z)
-    {
-        return 0.5F - world.getLightBrightness(x, y, z);
+    protected float getBlockPathWeight(int x, int y, int z) {
+        return 0.5F - this.world.getLightBrightness(x, y, z);
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
     }
 
     @Override
-	public boolean canSpawnHere()
-    {
-        int blockX = MathHelper.floor(x);
-        int blockY = MathHelper.floor(bb.minY);
-        int blockZ = MathHelper.floor(z);
-        if(world.getSavedLightValue(LightLayer.Block, blockX, blockY, blockZ) > 0) return false;
-        if(world.getSavedLightValue(LightLayer.Sky, blockX, blockY, blockZ) > random.nextInt(32))
+    public boolean canSpawnHere() {
+        TilePos blockPos = new TilePos(this.x, this.bb.minY, this.z);
+        if (this.world.getSavedLightValue(LightLayer.Block, blockPos) > 0) return false;
+        if (this.world.getSavedLightValue(LightLayer.Sky, blockPos) > this.random.nextInt(32))
             return false;
 
-        int blockLight = world.getBlockLightValue(blockX, blockY, blockZ);
-        if(world.getCurrentWeather() != null && world.getCurrentWeather().isMobDaylightSpawnAllowed())
-            blockLight = blockLight/2;
+        int blockLight = this.world.getBlockLightValue(blockPos);
+        if (this.world.getCurrentWeather() != null && this.world.getCurrentWeather().isMobDaylightSpawnAllowed())
+            blockLight = blockLight / 2;
 
         return blockLight <= 4 && super.canSpawnHere();
     }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/monster/MobZombiePig.java b/game/core/src/main/java/net/minecraft/core/entity/monster/MobZombiePig.java
index daae51138..e860ff6f2 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/monster/MobZombiePig.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/monster/MobZombiePig.java
@@ -13,33 +13,32 @@ import net.minecraft.core.util.helper.MathHelper;
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.world.World;
 import net.minecraft.core.util.helper.DamageType;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public class MobZombiePig extends MobZombie
-{
+public class MobZombiePig extends MobZombie {
     private static final ItemStack DEFAULT_HELD_ITEM;
 
-    static
-    {
+    static {
         DEFAULT_HELD_ITEM = new ItemStack(Items.TOOL_SWORD_GOLD, 1);
     }
 
     private int angerLevel;
     private int randomSoundDelay;
 
-    public MobZombiePig(World world)
-    {
+    public MobZombiePig(World world) {
         super(world);
-        angerLevel = 0;
-        randomSoundDelay = 0;
+        this.angerLevel = 0;
+        this.randomSoundDelay = 0;
         setTextureIdentifier("minecraft", "pigzombie");
-        moveSpeed = 0.5F;
-        attackStrength = 5;
-        fireImmune = false;
-        scoreValue = 500;
+        this.moveSpeed = 0.5F;
+        this.attackStrength = 5;
+        this.fireImmune = false;
+        this.scoreValue = 500;
     }
 
     @Override
@@ -50,83 +49,68 @@ public class MobZombiePig extends MobZombie
     }
 
     @Override
-	public void tick()
-    {
-        if (tickCount % 200 == 0 && target instanceof Player && ((Player) target).getStat(Achievements.MOST_WANTED) <= 0) {
+    public void tick() {
+        if (this.tickCount % 200 == 0 && this.target instanceof Player && ((Player) this.target).getStat(Achievements.MOST_WANTED) <= 0) {
             int agroNumber = 1;
-            for (Entity e : world.entities) {
+            for (Entity e : this.world.entities) {
                 if (e instanceof MobZombiePig && ((MobZombiePig) e).target == this.target) {
                     agroNumber++;
                 }
                 if (agroNumber >= 20) {
-                    ((Player) target).addStat(Achievements.MOST_WANTED, 1);
+                    ((Player) this.target).addStat(Achievements.MOST_WANTED, 1);
                     break;
                 }
             }
         }
-        moveSpeed = target == null ? 0.5F : 0.95F;
-        if(randomSoundDelay > 0 && --randomSoundDelay == 0)
-        {
-            world.playSoundAtEntity(null, this, "mob.zombiepig.zpigangry", getSoundVolume() * 2.0F, ((random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
+        this.moveSpeed = this.target == null ? 0.5F : 0.95F;
+        if (this.randomSoundDelay > 0 && --this.randomSoundDelay == 0) {
+            this.world.playSoundAtEntity(null, this, "mob.zombiepig.zpigangry", getSoundVolume() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
         }
         super.tick();
     }
 
     @Override
-	public boolean canSpawnHere()
-    {
-    	int x = MathHelper.floor(this.x);
-    	int y = MathHelper.floor(this.y);
-    	int z = MathHelper.floor(this.z);
-    	if(world.getBlockId(x, y, z) != 0) return false;
-        Block<?> below = world.getBlock(x, y - 1, z);
+    public boolean canSpawnHere() {
+        TilePos tilePos = new TilePos(this);
+        if (!this.world.isAirBlock(tilePos)) return false;
+        Block<?> below = this.world.getBlock(tilePos.down(new TilePos()));
         if (!BlockTags.NETHER_MOBS_SPAWN.appliesTo(below)) return false;
-        int blockLight = world.getSavedLightValue(LightLayer.Block, x, y, z);
-    	if(blockLight > 7) return false;
-        return world.getDifficulty().canHostileMobsSpawn() && world.checkIfAABBIsClear(bb) && world.getCubes(this, bb).isEmpty() && !world.getIsAnyLiquid(bb);
+        int blockLight = this.world.getSavedLightValue(LightLayer.Block, tilePos);
+        if (blockLight > 7) return false;
+        return this.world.getDifficulty().canHostileMobsSpawn() && this.world.checkIfAABBIsClear(this.bb) && this.world.getCubes(this, this.bb).isEmpty() && !this.world.getIsAnyLiquid(this.bb);
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
-        tag.putShort("Anger", (short)angerLevel);
+        tag.putShort("Anger", (short) this.angerLevel);
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
-        angerLevel = tag.getShort("Anger");
+        this.angerLevel = tag.getShort("Anger");
     }
 
     @Override
-	protected Entity findPlayerToAttack()
-    {
-        if(angerLevel == 0)
-        {
+    protected Entity findPlayerToAttack() {
+        if (this.angerLevel == 0) {
             return null;
-        } else
-        {
+        } else {
             return super.findPlayerToAttack();
         }
     }
 
     @Override
-    public boolean hurt(Entity attacker, int i, DamageType type)
-    {
-    	if(type == DamageType.FIRE) {
-    		return false;
-    	}
-        if(attacker instanceof Player)
-        {
-            List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.grow(32D, 32D, 32D));
-            for(int j = 0; j < list.size(); j++)
-            {
+    public boolean hurt(Entity attacker, int i, DamageType type) {
+        if (type == DamageType.FIRE) {
+            return false;
+        }
+        if (attacker instanceof Player) {
+            List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, MathHelper.aabbGrow(this.bb, 32D, 32D, 32D, new AABBd()));
+            for (int j = 0; j < list.size(); j++) {
                 Entity e = list.get(j);
-                if(e instanceof MobZombiePig)
-                {
-                    MobZombiePig mobZombiePig = (MobZombiePig)e;
+                if (e instanceof MobZombiePig mobZombiePig) {
                     mobZombiePig.becomeAngryAt(attacker);
                 }
             }
@@ -136,36 +120,31 @@ public class MobZombiePig extends MobZombie
         return super.hurt(attacker, i, type);
     }
 
-    private void becomeAngryAt(Entity entity)
-    {
-        target = entity;
-        angerLevel = 400 + random.nextInt(400);
-        randomSoundDelay = random.nextInt(40);
+    private void becomeAngryAt(Entity entity) {
+        this.target = entity;
+        this.angerLevel = 400 + this.random.nextInt(400);
+        this.randomSoundDelay = this.random.nextInt(40);
     }
 
     @Override
-    public String getLivingSound()
-    {
+    public String getLivingSound() {
         return "mob.zombiepig.zpig";
     }
 
     @Override
-	protected String getHurtSound()
-    {
+    protected String getHurtSound() {
         return "mob.zombiepig.zpighurt";
     }
 
     @Override
-	protected String getDeathSound()
-    {
+    protected String getDeathSound() {
         return "mob.zombiepig.zpigdeath";
     }
 
     @Override
-	protected List<WeightedRandomLootObject> getMobDrops()
-    {
+    protected List<WeightedRandomLootObject> getMobDrops() {
         List<WeightedRandomLootObject> drops = new ArrayList<>();
-        float drop = world.rand.nextFloat();
+        float drop = this.world.rand.nextFloat();
 
         if (!(drop < 0.5f)) {
             if (drop < 0.95f) {
diff --git a/game/core/src/main/java/net/minecraft/core/entity/player/Player.java b/game/core/src/main/java/net/minecraft/core/entity/player/Player.java
index 4d46bf2ca..5165626fb 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/player/Player.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/player/Player.java
@@ -4,6 +4,7 @@ import com.mojang.nbt.tags.CompoundTag;
 import com.mojang.nbt.tags.ListTag;
 import net.minecraft.core.block.BlockLogicBed;
 import net.minecraft.core.block.entity.*;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.*;
 import net.minecraft.core.entity.animal.MobPig;
 import net.minecraft.core.entity.animal.MobWolf;
@@ -18,7 +19,6 @@ import net.minecraft.core.achievement.stat.Stat;
 import net.minecraft.core.achievement.stat.StatList;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.data.gamerule.GameRules;
 import net.minecraft.core.entity.monster.MobGhast;
 import net.minecraft.core.entity.monster.MobGiant;
@@ -48,7 +48,6 @@ import net.minecraft.core.player.inventory.menu.MenuInventory;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.ICarriable;
 import net.minecraft.core.world.SpawnerMobs;
@@ -56,20 +55,22 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.core.world.chunk.provider.IChunkProvider;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.weather.Weathers;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.*;
 import java.util.function.Function;
 
 public abstract class Player
     extends Mob
-    implements IArmorWearing<HumanArmorShape>, IItemHolding
-{
+    implements IArmorWearing<HumanArmorShape>, IItemHolding {
     public static final int MOTION_STATE_DEFAULT = 0;
     public static final int MOTION_STATE_CROUCHED = 1;
-    
+
     public static final @NotNull UUID UUID_MAK = UUID.fromString("2c045432-9b19-46cc-b7f5-3c90a458b604");
     public static final @NotNull UUID UUID_JONK = UUID.fromString("73eaf85f-863e-47e4-9ae4-e4dd40dbc58a");
     public static final @NotNull UUID UUID_SHIGN = UUID.fromString("49f6ea39-30b2-4441-b07c-7bfe0beeb61e");
@@ -129,43 +130,41 @@ public abstract class Player
 
     public final PlayerConfig playerConfig = new PlayerConfig();
 
-    public Player(World world)
-    {
+    public Player(World world) {
         super(world);
-        inventory = new ContainerInventory(this);
+        this.inventory = new ContainerInventory(this);
 //        userType = 0;
-        score = 0;
-        isSwinging = false;
-        swingProgressInt = 0;
-        timeUntilPortal = 20;
-        inPortal = false;
-        bobberEntity = null;
-        inventorySlots = new MenuInventory(inventory, !world.isClientSide);
-        craftingInventory = inventorySlots;
+        this.score = 0;
+        this.isSwinging = false;
+        this.swingProgressInt = 0;
+        this.timeUntilPortal = 20;
+        this.inPortal = false;
+        this.bobberEntity = null;
+        this.inventorySlots = new MenuInventory(this.inventory, !world.isClientSide);
+        this.craftingInventory = this.inventorySlots;
         TilePos spawnPoint = world.getSpawnPoint();
-        moveTo((double)spawnPoint.x + 0.5D, spawnPoint.y + 1, (double)spawnPoint.z + 0.5D, 0.0F, 0.0F);
+        moveTo((double) spawnPoint.x + 0.5D, spawnPoint.y + 1, (double) spawnPoint.z + 0.5D, 0.0F, 0.0F);
 //        rotOffs = 180F;
-        fireImmuneTicks = 20;
+        this.fireImmuneTicks = 20;
         setTextureIdentifier("minecraft", "char");
         this.noAI = false;
     }
+
     @Override
-    public int getMaxHealth(){
+    public int getMaxHealth() {
         return 20;
     }
 
-    public ArtType getSelectedArt()
-    {
-        return ArtType.values.get(entityData.getByte(DATA_SELECTED_ART));
+    public ArtType getSelectedArt() {
+        return ArtType.values.get(this.entityData.getByte(DATA_SELECTED_ART));
     }
 
-    public void setSelectedArt(ArtType selectedArt)
-    {
-        entityData.set(DATA_SELECTED_ART, (byte)ArtType.values.indexOf(selectedArt));
+    public void setSelectedArt(ArtType selectedArt) {
+        this.entityData.set(DATA_SELECTED_ART, (byte) ArtType.values.indexOf(selectedArt));
     }
 
     private void setupScale() {
-        isDwarf = world.getGameRuleValue(GameRules.DWARF_MODE);
+        this.isDwarf = this.world.getGameRuleValue(GameRules.DWARF_MODE);
         if (this.isDwarf) {
             setSize(0.6f, isSneaking() ? 0.5f : 0.8f);
         } else {
@@ -175,12 +174,11 @@ public abstract class Player
     }
 
     public boolean isDwarf() {
-        return isDwarf;
+        return this.isDwarf;
     }
 
     @Override
-    public boolean isSneaking()
-    {
+    public boolean isSneaking() {
         return this.sneaking;
     }
 
@@ -189,17 +187,15 @@ public abstract class Player
     }
 
     @Override
-	protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
         super.defineSynchedData();
-        entityData.define(DATA_UNKNOWN, (byte) 0, Byte.class);
-        entityData.define(DATA_SELECTED_ART, (byte) 0, Byte.class); // selected art
-        entityData.define(DATA_HELD_ARROW, -1, Integer.class);
+        this.entityData.define(DATA_UNKNOWN, (byte) 0, Byte.class);
+        this.entityData.define(DATA_SELECTED_ART, (byte) 0, Byte.class); // selected art
+        this.entityData.define(DATA_HELD_ARROW, -1, Integer.class);
     }
 
     @Override
-    public boolean canSkate() 
-    {
+    public boolean canSkate() {
         final @Nullable ItemStack armor = getItemInArmorSlot(HumanArmorShape.BOOTS);
         if (armor == null) {
             return false;
@@ -209,46 +205,48 @@ public abstract class Player
     }
 
     // Determines if a block pushes the player out of it
-    protected boolean doesBlockPushOut(int x, int y, int z)
-    {
-        return world.isBlockNormalCube(x, y, z);
+    protected boolean doesBlockPushOut(int x, int y, int z) {
+        return this.world.isBlockNormalCube(x, y, z);
     }
 
-    protected boolean boundsClear(@NotNull final AABB bounds) {
-        return world.getCubes(this, bounds).isEmpty();
+    protected boolean boundsClear(final @NotNull AABBdc bounds) {
+        return this.world.getCubes(this, bounds).isEmpty();
     }
 
-    protected AABB getBoundsForState(final int state) {
+    protected @NotNull AABBdc getBoundsForState(final int state) {
         final double center = this.bbWidth / 2.0d;
         switch (state) {
             case MOTION_STATE_CROUCHED: {
                 final double heightOfMob = isDwarf() ? 0.5 : 1.5f;
-                return AABB.fromPool(
+                AABBd bb = new AABBd(
                     this.x - center,
                     (this.y - (double) this.heightOffset) + (double) this.ySlideOffset,
                     this.z - center,
                     this.x + center,
                     (this.y - (double) this.heightOffset) + (double) this.ySlideOffset + heightOfMob,
-                    this.z + center).shrink(0.0125, 0.0125, 0.0125);
+                    this.z + center);
+                MathHelper.aabbShrink(bb, 0.0125, 0.0125, 0.0125, bb);
+                return bb;
             }
             case MOTION_STATE_DEFAULT:
             default: {
                 final double heightOfMob = isDwarf() ? 0.8 : 1.8f;
-                return AABB.fromPool(
+                AABBd bb = new AABBd(
                     this.x - center,
                     (this.y - (double) this.heightOffset) + (double) this.ySlideOffset,
                     this.z - center,
                     this.x + center,
                     (this.y - (double) this.heightOffset) + (double) this.ySlideOffset + heightOfMob,
-                    this.z + center).shrink(0.0125, 0.0125, 0.0125);
+                    this.z + center);
+                MathHelper.aabbShrink(bb, 0.0125, 0.0125, 0.0125, bb);
+                return bb;
             }
         }
     }
 
     @Override
-	public void tick()
-    {
-        if (world.dimension == Dimension.NETHER) {
+    public void tick() {
+        if (this.world.dimension == Dimension.NETHER) {
             addStat(Achievements.ENTER_NETHER, 1);
             /*if (y >=128) {
                 addStat(Achievements.ENTER_NETHER, 1);
@@ -257,21 +255,21 @@ public abstract class Player
             }*/
         }
 
-        xdO = xd;
-        ydO = yd;
-        zdO = zd;
+        this.xdO = this.xd;
+        this.ydO = this.yd;
+        this.zdO = this.zd;
 
         boolean playEquipSound = false;
-        for (int i = 0; i < oldArmorInventory.length; i++) {
-            ItemStack armorOld = oldArmorInventory[i];
-            ItemStack armorCurrent = inventory.armorInventory[i];
+        for (int i = 0; i < this.oldArmorInventory.length; i++) {
+            ItemStack armorOld = this.oldArmorInventory[i];
+            ItemStack armorCurrent = this.inventory.armorInventory[i];
             if (armorOld != armorCurrent && (armorOld == null || armorCurrent == null || armorOld.itemID != armorCurrent.itemID)) {
                 playEquipSound = true;
             }
-            oldArmorInventory[i] = armorCurrent;
+            this.oldArmorInventory[i] = armorCurrent;
         }
         if (playEquipSound) {
-            world.playSoundAtEntity(this, this, "random.equip", 2f, 1f);
+            this.world.playSoundAtEntity(this, this, "random.equip", 2f, 1f);
         }
 
         final boolean wSneak = wantSneak();
@@ -289,59 +287,46 @@ public abstract class Player
 
         setupScale();
 
-        if(isPlayerSleeping())
-        {
-            sleepTimer++;
-            if(sleepTimer > 100)
-            {
-                sleepTimer = 100;
+        if (isPlayerSleeping()) {
+            this.sleepTimer++;
+            if (this.sleepTimer > 100) {
+                this.sleepTimer = 100;
             }
-            if(!world.isClientSide)
-            {
-                if(!isInBed())
-                {
+            if (!this.world.isClientSide) {
+                if (!isInBed()) {
                     wakeUpPlayer(true, true);
-                } else
-                if(world.isDaytime() && world.getCurrentWeather() != Weathers.OVERWORLD_STORM)
-                {
+                } else if (this.world.isDaytime() && this.world.getCurrentWeather() != Weathers.OVERWORLD_STORM) {
                     wakeUpPlayer(false, true);
                 }
             }
-        } 
-        else if(sleepTimer > 0)
-        {
-            sleepTimer++;
-            if(sleepTimer >= 110)
-            {
-                sleepTimer = 0;
+        } else if (this.sleepTimer > 0) {
+            this.sleepTimer++;
+            if (this.sleepTimer >= 110) {
+                this.sleepTimer = 0;
             }
         }
         super.tick();
-        if (heldObject != null) {
-            heldObject.heldTick(world, this);
+        if (this.heldObject != null) {
+            this.heldObject.heldTick(this.world, this);
         }
 
-        if(!world.isClientSide && craftingInventory != null && !craftingInventory.stillValid(this))
-        {
+        if (!this.world.isClientSide && this.craftingInventory != null && !this.craftingInventory.stillValid(this)) {
             closeScreen();
-            craftingInventory = inventorySlots;
+            this.craftingInventory = this.inventorySlots;
         }
         addStat(StatList.minutesPlayedStat, 1);
-        if(vehicle == null)
-        {
-            startMinecartRidingPoint = null;
+        if (this.vehicle == null) {
+            this.startMinecartRidingPoint = null;
         }
     }
 
     @Override
-    protected boolean isMovementBlocked()
-    {
+    protected boolean isMovementBlocked() {
         return getHealth() <= 0 || isPlayerSleeping();
     }
 
-    protected void closeScreen()
-    {
-        craftingInventory = inventorySlots;
+    protected void closeScreen() {
+        this.craftingInventory = this.inventorySlots;
     }
 
     @Override
@@ -350,372 +335,294 @@ public abstract class Player
     }
 
     @Override
-	public void rideTick()
-    {
-        double xdO = x;
-        double ydO = y;
-        double zdO = z;
+    public void rideTick() {
+        double xdO = this.x;
+        double ydO = this.y;
+        double zdO = this.z;
         super.rideTick();
-        addMountedMovementStat(x - xdO, y - ydO, z - zdO);
+        addMountedMovementStat(this.x - xdO, this.y - ydO, this.z - zdO);
     }
 
     @Override
-	public void resetPos()
-    {
+    public void resetPos() {
         setupScale();
         setHealthRaw(getMaxHealth());
-        deathTime = 0;
+        this.deathTime = 0;
         super.resetPos();
     }
 
     @Override
-    protected void updateAI()
-    {
-        if(isSwinging)
-        {
-            swingProgressInt++;
-            if(swingProgressInt >= 8)
-            {
-                swingProgressInt = 0;
-                isSwinging = false;
+    protected void updateAI() {
+        if (this.isSwinging) {
+            this.swingProgressInt++;
+            if (this.swingProgressInt >= 8) {
+                this.swingProgressInt = 0;
+                this.isSwinging = false;
             }
-        } else
-        {
-            swingProgressInt = 0;
+        } else {
+            this.swingProgressInt = 0;
         }
-        swingProgress = (float)swingProgressInt / 8F;
+        this.swingProgress = (float) this.swingProgressInt / 8F;
     }
 
     @Override
-    public void onLivingUpdate()
-    {
-        if(world.getDifficulty() == Difficulty.PEACEFUL && getHealth() < getMaxHealth() && (tickCount % 20) * 12 == 0)
-        {
+    public void onLivingUpdate() {
+        if (this.world.getDifficulty() == Difficulty.PEACEFUL && getHealth() < getMaxHealth() && (this.tickCount % 20) * 12 == 0) {
             heal(1);
         }
 
-        inventory.decrementAnimations();
-        cameraVelocityOld = cameraVelocity;
+        this.inventory.decrementAnimations();
+        this.cameraVelocityOld = this.cameraVelocity;
         super.onLivingUpdate();
 
-        speed = baseSpeed;
-        flySpeed = baseFlySpeed;
-        if (isSprinting())
-        {
-            speed += (double)baseSpeed * 0.3;
-            flySpeed += (double)baseFlySpeed * 0.3;
+        this.speed = this.baseSpeed;
+        this.flySpeed = this.baseFlySpeed;
+        if (isSprinting()) {
+            this.speed += (double) this.baseSpeed * 0.3;
+            this.flySpeed += (double) this.baseFlySpeed * 0.3;
         }
 
-        double velocity = MathHelper.sqrt(xd * xd + zd * zd);
-        double pitch = (float) Math.atan(-yd * 0.2D) * 15F;
-        if(velocity > 0.1F)
-        {
+        double velocity = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+        double pitch = (float) Math.atan(-this.yd * 0.2D) * 15F;
+        if (velocity > 0.1F) {
             velocity = 0.1F;
         }
-        if(!onGround || getHealth() <= 0)
-        {
+        if (!this.onGround || getHealth() <= 0) {
             velocity = 0.0F;
         }
-        if(onGround || getHealth() <= 0)
-        {
+        if (this.onGround || getHealth() <= 0) {
             pitch = 0.0F;
         }
-        cameraVelocity += (float) ((velocity - cameraVelocity) * 0.4F);
-        cameraPitch += (float) ((pitch - cameraPitch) * 0.8F);
+        this.cameraVelocity += (float) ((velocity - this.cameraVelocity) * 0.4F);
+        this.cameraPitch += (float) ((pitch - this.cameraPitch) * 0.8F);
 
 
         //clear death marker if player is within 16 blocks.
-        if(!dead) {
-            if (lastDeathPoint != null && distanceTo(lastDeathPoint.x, lastDeathPoint.y, lastDeathPoint.z) < 8D) {
-                lastDeathPoint = null;
+        if (!this.dead) {
+            if (this.lastDeathPoint != null && distanceTo(this.lastDeathPoint.x, this.lastDeathPoint.y, this.lastDeathPoint.z) < 8D) {
+                this.lastDeathPoint = null;
             }
         }
 
-        if(getHealth() > 0)
-        {
-            List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.grow(1.0D, 0.5D, 1.0D));
-            if(list != null)
-            {
-                for (Entity entity : list) {
-                    if (!entity.removed) {
-                        collideWithPlayer(entity);
-                    }
+        if (getHealth() > 0) {
+            List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, MathHelper.aabbGrow(this.bb, 1.0D, 0.5D, 1.0D, new AABBd()));
+            for (Entity entity : list) {
+                if (!entity.removed) {
+                    collideWithPlayer(entity);
                 }
             }
         }
     }
-    
+
     @Override
     public void playHurtSound() {
-    	float pitch = 1.0f;
-    	if(world.getGameRuleValue(GameRules.DWARF_MODE)) {
-    		pitch = 2.0f;
-    	}
-        world.playSoundAtEntity(null, this, getHurtSound(), getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + pitch);
+        float pitch = 1.0f;
+        if (this.world.getGameRuleValue(GameRules.DWARF_MODE)) {
+            pitch = 2.0f;
+        }
+        this.world.playSoundAtEntity(null, this, getHurtSound(), getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + pitch);
     }
-    
+
     @Override
     public void playDeathSound() {
-    	float pitch = 1.0f;
-    	if(world.getGameRuleValue(GameRules.DWARF_MODE)) {
-    		pitch = 2.0f;
-    	}
-        world.playSoundAtEntity(null, this, getDeathSound(), getSoundVolume(), (random.nextFloat() - random.nextFloat()) * 0.2F + pitch);
+        float pitch = 1.0f;
+        if (this.world.getGameRuleValue(GameRules.DWARF_MODE)) {
+            pitch = 2.0f;
+        }
+        this.world.playSoundAtEntity(null, this, getDeathSound(), getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + pitch);
     }
 
     @Override
-    protected String getHurtSound()
-    {
-        return playerConfig.hurtSound().hurtSound;
+    protected String getHurtSound() {
+        return this.playerConfig.hurtSound().hurtSound;
     }
 
     @Override
-    protected String getDeathSound()
-    {
-        return playerConfig.hurtSound().deathSound;
+    protected String getDeathSound() {
+        return this.playerConfig.hurtSound().deathSound;
     }
 
-    private void collideWithPlayer(Entity entity)
-    {
+    private void collideWithPlayer(Entity entity) {
         entity.playerTouch(this);
         addStat(StatList.mobEncounterStats.get(entity.getDispatcherId()), 1);
     }
 
-    public int getScore()
-    {
-        return score;
+    public int getScore() {
+        return this.score;
     }
 
     @Override
-    public void onDeath(Entity entityKilledBy)
-    {
-        if (getGamemode().isPermaDeath()){
+    public void onDeath(Entity entityKilledBy) {
+        if (getGamemode().isPermaDeath()) {
             setGamemode(Gamemode.spectator);
         }
         super.onDeath(entityKilledBy);
         setSize(0.2F, 0.2F);
-        setPos(x, y, z);
-        lastDeathPoint = new TilePos(this);
-        yd = 0.1d;
-        if(UUID_MAK.equals(uuid) || username.equals("MaggAndGeez"))
-        {
+        setPos(this.x, this.y, this.z);
+        this.lastDeathPoint = new TilePos(this);
+        this.yd = 0.1d;
+        if (UUID_MAK.equals(this.uuid) || this.username.equals("MaggAndGeez")) {
             dropPlayerItemWithRandomChoice(new ItemStack(Items.AMMO_FIREBALL, 1), true);
-        }
-        else if (UUID_JONK.equals(uuid) || username.equals("jonkadelic"))
-        {
+        } else if (UUID_JONK.equals(this.uuid) || this.username.equals("jonkadelic")) {
             dropPlayerItemWithRandomChoice(new ItemStack(Items.FOOD_COOKIE, 1), true);
-        }
-        else if (UUID_SHIGN.equals(uuid) || username.equals("ShignBright"))
-        {
+        } else if (UUID_SHIGN.equals(this.uuid) || this.username.equals("ShignBright")) {
             dropPlayerItemWithRandomChoice(new ItemStack(Items.SIGN_PAINTED, 1, DyeColor.PINK.itemMeta), true);
-        }
-        else if((UUID_MELON.equals(uuid) || username.equals("MelonMojito")) || (UUID_WATERMELON.equals(uuid) || username.equals("WatermelonMojito")))
-        {
-            ItemStack melon = new ItemStack(Blocks.PUMPKIN, 1, random.nextInt(Short.MAX_VALUE / 2) + 1);
+        } else if ((UUID_MELON.equals(this.uuid) || this.username.equals("MelonMojito")) || (UUID_WATERMELON.equals(this.uuid) || this.username.equals("WatermelonMojito"))) {
+            ItemStack melon = new ItemStack(Blocks.PUMPKIN, 1, this.random.nextInt(Short.MAX_VALUE / 2) + 1);
             melon.setCustomName("Melon");
             melon.setCustomColor((byte) TextFormatting.LIME.id);
             dropPlayerItemWithRandomChoice(melon, true);
         }
 
-        if (!world.getGameRuleValue(GameRules.KEEP_INVENTORY))
-        {
-            craftingInventory.onCraftGuiClosed(this);
-            inventory.dropAllItems();
+        if (!this.world.getGameRuleValue(GameRules.KEEP_INVENTORY)) {
+            this.craftingInventory.onCraftGuiClosed(this);
+            this.inventory.dropAllItems();
         }
-        if (heldObject != null) { // TODO consider whether making the held object kept with keep inventory is a good idea
-            heldObject.drop(world, this);
-            heldObject = null;
+        if (this.heldObject != null) { // TODO consider whether making the held object kept with keep inventory is a good idea
+            this.heldObject.drop(this.world, this);
+            this.heldObject = null;
         }
 
-        if(entityKilledBy != null)
-        {
-            xd = -MathHelper.cos(((attackedAtYaw + yRot) * MathHelper.PI) / 180F) * 0.1F;
-            zd = -MathHelper.sin(((attackedAtYaw + yRot) * MathHelper.PI) / 180F) * 0.1F;
-        } else
-        {
-            xd = zd = 0.0D;
+        if (entityKilledBy != null) {
+            this.xd = -MathHelper.cos(((this.attackedAtYaw + this.yRot) * MathHelper.PI) / 180F) * 0.1F;
+            this.zd = -MathHelper.sin(((this.attackedAtYaw + this.yRot) * MathHelper.PI) / 180F) * 0.1F;
+        } else {
+            this.xd = this.zd = 0.0D;
         }
         addStat(StatList.deathsStat, 1);
     }
 
     @Override
-    public boolean sendDeathMessage(Entity entityKilledBy){
+    public boolean sendDeathMessage(Entity entityKilledBy) {
         return true;
     }
+
     @Override
-    public String getDeathMessage(Entity entityKilledBy){
-        if (random.nextInt(8000) == 666)
-        {
+    public String getDeathMessage(Entity entityKilledBy) {
+        if (this.random.nextInt(8000) == 666) {
             return getDisplayName() + deathMsgColor + " was killed by Herobrine.";
         }
-        if (entityKilledBy instanceof MobZombie)
-        {
-            if (entityKilledBy instanceof MobZombiePig)
-            {
+        if (entityKilledBy instanceof MobZombie) {
+            if (entityKilledBy instanceof MobZombiePig) {
                 return getDisplayName() + deathMsgColor + " discovered mob mentality.";
-            }
-            else
-            {
+            } else {
                 return getDisplayName() + deathMsgColor + " became a zombie.";
             }
         }
-        if (entityKilledBy instanceof MobCreeper)
-        {
+        if (entityKilledBy instanceof MobCreeper) {
             return deathMsgColor + "Aw man, " + getDisplayName() + deathMsgColor + " didn't see the creeper.";
         }
-        if (entityKilledBy instanceof MobSkeleton)
-        {
+        if (entityKilledBy instanceof MobSkeleton) {
             return getDisplayName() + deathMsgColor + " was a victim of aimbot.";
         }
-        if (entityKilledBy instanceof MobSpider)
-        {
+        if (entityKilledBy instanceof MobSpider) {
             return getDisplayName() + deathMsgColor + " spent too much time on the web.";
         }
-        if (entityKilledBy instanceof MobGhast)
-        {
+        if (entityKilledBy instanceof MobGhast) {
             return getDisplayName() + deathMsgColor + " didn't return the serve.";
         }
-        if (entityKilledBy instanceof MobSlime)
-        {
+        if (entityKilledBy instanceof MobSlime) {
             return getDisplayName() + deathMsgColor + " was slimed.";
         }
-        if (entityKilledBy instanceof MobWolf)
-        {
+        if (entityKilledBy instanceof MobWolf) {
             return getDisplayName() + deathMsgColor + " got what they deserved.";
         }
-        if (entityKilledBy instanceof ProjectileArrowGolden)
-        {
-            if (((ProjectileArrowGolden) entityKilledBy).owner instanceof Player)
-            {
-                if (((Player) ((ProjectileArrowGolden) entityKilledBy).owner).uuid.equals(uuid))
-                {
+        if (entityKilledBy instanceof ProjectileArrowGolden) {
+            if (((ProjectileArrowGolden) entityKilledBy).owner instanceof Player) {
+                if (((Player) ((ProjectileArrowGolden) entityKilledBy).owner).uuid.equals(this.uuid)) {
                     return getDisplayName() + deathMsgColor + " got gold in their eye.";
                 }
                 return getDisplayName() + deathMsgColor + " got pierced by " +
                     ((ProjectileArrow) entityKilledBy).owner.getDisplayName() + deathMsgColor + ".";
-            }
-            else
-            {
+            } else {
                 return getDisplayName() + deathMsgColor + " is Swiss cheese.";
             }
         }
-        if (entityKilledBy instanceof ProjectileArrow)
-        {
-            if (((ProjectileArrow) entityKilledBy).owner instanceof MobSkeleton)
-            {
+        if (entityKilledBy instanceof ProjectileArrow) {
+            if (((ProjectileArrow) entityKilledBy).owner instanceof MobSkeleton) {
                 return getDisplayName() + deathMsgColor + " was a victim of aimbot.";
-            }
-            else if (((ProjectileArrow) entityKilledBy).owner instanceof Player)
-            {
-                if (((Player) ((ProjectileArrow) entityKilledBy).owner).uuid.equals(uuid))
-                {
+            } else if (((ProjectileArrow) entityKilledBy).owner instanceof Player) {
+                if (((Player) ((ProjectileArrow) entityKilledBy).owner).uuid.equals(this.uuid)) {
                     return getDisplayName() + deathMsgColor + " lost a game of Russian roulette.";
                 }
                 return getDisplayName() + deathMsgColor + " got 360 noscoped by " +
                     ((ProjectileArrow) entityKilledBy).owner.getDisplayName() + deathMsgColor + ".";
-            }
-            else
-            {
+            } else {
                 return getDisplayName() + deathMsgColor + " is a pincushion.";
             }
         }
-        if (entityKilledBy instanceof ProjectileCannonball)
-        {
-            if (((ProjectileCannonball) entityKilledBy).owner instanceof Player)
-            {
-                if (((Player) ((ProjectileCannonball) entityKilledBy).owner).uuid.equals(uuid))
-                {
+        if (entityKilledBy instanceof ProjectileCannonball) {
+            if (((ProjectileCannonball) entityKilledBy).owner instanceof Player) {
+                if (((Player) ((ProjectileCannonball) entityKilledBy).owner).uuid.equals(this.uuid)) {
                     return getDisplayName() + deathMsgColor + " jumped too high.";
                 }
                 return getDisplayName() + deathMsgColor + " was fragmented by " +
                     ((ProjectileCannonball) entityKilledBy).owner.getDisplayName() + deathMsgColor + ".";
-            }
-            else
-            {
+            } else {
                 return getDisplayName() + deathMsgColor + " was detonated remotely.";
             }
         }
-        if (entityKilledBy instanceof ProjectileFireball)
-        {
+        if (entityKilledBy instanceof ProjectileFireball) {
             return getDisplayName() + deathMsgColor + " didn't return the serve.";
         }
-        if (entityKilledBy instanceof MobGiant)
-        {
+        if (entityKilledBy instanceof MobGiant) {
             return getDisplayName() + deathMsgColor + " was killed by- wait, what?!";
         }
-        if (entityKilledBy instanceof EntityLightning)
-        {
+        if (entityKilledBy instanceof EntityLightning) {
             return getDisplayName() + deathMsgColor + " was grounded.";
         }
-        if (entityKilledBy instanceof EntityPrimedTNT)
-        {
+        if (entityKilledBy instanceof EntityPrimedTNT) {
             return getDisplayName() + deathMsgColor + " was killed by Popbob.";
         }
-        if (entityKilledBy instanceof Player)
-        {
+        if (entityKilledBy instanceof Player) {
             return getDisplayName() + deathMsgColor + " was backstabbed by " + ((Player) entityKilledBy).getDisplayName() + deathMsgColor + ".";
         }
-        if (entityKilledBy instanceof MobPig)
-        {
+        if (entityKilledBy instanceof MobPig) {
             return getDisplayName() + deathMsgColor + " is *really* bad at Minecraft.";
-        }
-        else
-        {
-            if (world.getBlockMaterial(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z)) == Material.lava)
-            {
+        } else {
+            if (this.world.getBlockMaterial(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z)) == Materials.LAVA) {
                 return getDisplayName() + deathMsgColor + " got lost in the sauce.";
             }
-            if (world.getBlockId(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z)) == Blocks.SPIKES.id())
-            {
+            if (this.world.getBlockId(MathHelper.floor(this.x), MathHelper.floor(this.y), MathHelper.floor(this.z)) == Blocks.SPIKES.id()) {
                 return getDisplayName() + deathMsgColor + " fell for the trap.";
             }
-            if (fallDistance > 0)
-            {
+            if (this.fallDistance > 0) {
                 return getDisplayName() + deathMsgColor + " forgot to tie their laces.";
             }
-            if (airSupply <= 0)
-            {
+            if (this.airSupply <= 0) {
                 return getDisplayName() + deathMsgColor + " is sleeping with the fishes.";
             }
-            if (remainingFireTicks > 0)
-            {
+            if (this.remainingFireTicks > 0) {
                 return getDisplayName() + deathMsgColor + " was cooked well done.";
             }
             return getDisplayName() + deathMsgColor + " died mysteriously.";
         }
     }
-    
+
     @Override
-    protected void dropDeathItems()
-    {
+    protected void dropDeathItems() {
     }
 
     @Override
-	public void awardKillScore(Entity entity, int i)
-    {
-        score += i;
-        if(entity instanceof Player)
-        {
+    public void awardKillScore(Entity entity, int i) {
+        this.score += i;
+        if (entity instanceof Player) {
             addStat(StatList.playerKillsStat, 1);
-        } else
-        {
+        } else {
             addStat(StatList.mobKillsStat, 1);
         }
     }
 
-    public void dropCurrentItem(boolean dropFullStack)
-    {
-        dropPlayerItemWithRandomChoice(inventory.removeItem(inventory.getCurrentItemIndex(), dropFullStack ? 64 : 1), false);
+    public void dropCurrentItem(boolean dropFullStack) {
+        dropPlayerItemWithRandomChoice(this.inventory.removeItem(this.inventory.getCurrentItemIndex(), dropFullStack ? 64 : 1), false);
     }
 
-    public void dropPlayerItem(ItemStack itemstack)
-    {
+    public void dropPlayerItem(ItemStack itemstack) {
         dropPlayerItemWithRandomChoice(itemstack, false);
     }
 
-    public void setHotbarOffset(int offset)
-    {
-        inventory.setHotbarOffset(offset, false);
+    public void setHotbarOffset(int offset) {
+        this.inventory.setHotbarOffset(offset, false);
     }
 
     @Override
@@ -730,7 +637,7 @@ public abstract class Player
 
     @Override
     public boolean isPickable() {
-        if (getGamemode().canInteract()){
+        if (getGamemode().canInteract()) {
             return super.isPickable();
         }
         return false;
@@ -738,7 +645,7 @@ public abstract class Player
 
     @Override
     public boolean isPushable() {
-        if (getGamemode().canInteract()){
+        if (getGamemode().canInteract()) {
             return super.isPushable();
         }
         return false;
@@ -746,228 +653,200 @@ public abstract class Player
 
     @Override
     public boolean isSelectable() {
-        if (getGamemode().canInteract()){
+        if (getGamemode().canInteract()) {
             return super.isSelectable();
         }
         return false;
     }
 
     @Override
-    public void push(Entity entity)
-    {
-        if (noPhysics || !getGamemode().canInteract()) return;
+    public void push(Entity entity) {
+        if (this.noPhysics || !getGamemode().canInteract()) return;
         super.push(entity);
     }
 
-    public void dropPlayerItemWithRandomChoice(ItemStack itemstack, boolean flag)
-    {
+    public void dropPlayerItemWithRandomChoice(ItemStack itemstack, boolean flag) {
         if (!getGamemode().canInteract()) return;
-        if(itemstack == null)
-        {
+        if (itemstack == null) {
             return;
         }
-        EntityItem entityitem = new EntityItem(world, x, (y - 0.30000001192092896D) + (double) this.getHeadHeight(), z, itemstack);
+        EntityItem entityitem = new EntityItem(this.world, this.x, (this.y - 0.30000001192092896D) + (double) this.getHeadHeight(), this.z, itemstack);
         entityitem.pickupDelay = 40;
         float f = 0.1F;
-        if(flag)
-        {
-            float f2 = random.nextFloat() * 0.5F;
-            float f4 = random.nextFloat() * MathHelper.PI * 2.0F;
+        if (flag) {
+            float f2 = this.random.nextFloat() * 0.5F;
+            float f4 = this.random.nextFloat() * MathHelper.PI * 2.0F;
             entityitem.xd = -MathHelper.sin(f4) * f2;
             entityitem.zd = MathHelper.cos(f4) * f2;
             entityitem.yd = 0.2D;
-        } else
-        {
+        } else {
             float f1 = 0.3F;
-            entityitem.xd = -MathHelper.sin((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f1;
-            entityitem.zd = MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f1;
-            entityitem.yd = -MathHelper.sin((xRot / 180F) * MathHelper.PI) * f1 + 0.1F;
+            entityitem.xd = -MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f1;
+            entityitem.zd = MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f1;
+            entityitem.yd = -MathHelper.sin((this.xRot / 180F) * MathHelper.PI) * f1 + 0.1F;
             f1 = 0.02F;
-            float f3 = random.nextFloat() * MathHelper.PI * 2.0F;
-            f1 *= random.nextFloat();
-            entityitem.xd += java.lang.Math.cos(f3) * (double)f1;
-            entityitem.yd += (random.nextFloat() - random.nextFloat()) * 0.1F;
-            entityitem.zd += java.lang.Math.sin(f3) * (double)f1;
+            float f3 = this.random.nextFloat() * MathHelper.PI * 2.0F;
+            f1 *= this.random.nextFloat();
+            entityitem.xd += java.lang.Math.cos(f3) * (double) f1;
+            entityitem.yd += (this.random.nextFloat() - this.random.nextFloat()) * 0.1F;
+            entityitem.zd += java.lang.Math.sin(f3) * (double) f1;
         }
         joinEntityItemWithWorld(entityitem);
         addStat(StatList.dropStat, 1);
     }
 
-    protected void joinEntityItemWithWorld(EntityItem entityitem)
-    {
-        world.entityJoinedWorld(entityitem);
+    protected void joinEntityItemWithWorld(EntityItem entityitem) {
+        this.world.entityJoinedWorld(entityitem);
     }
 
-    public float getCurrentPlayerStrVsBlock(@NotNull Block<?> block)
-    {
-        float f = inventory.getStrVsBlock(block);
-        float defaultBreakSpeed = (inventory.getCurrentItem() != null && inventory.getCurrentItem().getItem() instanceof ItemToolSword) ? 1.51f : 1.01f;
-        if (this.getGamemode().doesRequireToolToBreak() && f <= defaultBreakSpeed) return 0; // Requires to break and not effective against block
-        if(isUnderLiquid(Material.water))
-        {
+    public float getCurrentPlayerStrVsBlock(@NotNull Block<?> block) {
+        float f = this.inventory.getStrVsBlock(block);
+        float defaultBreakSpeed = (this.inventory.getCurrentItem() != null && this.inventory.getCurrentItem().getItem() instanceof ItemToolSword) ? 1.51f : 1.01f;
+        if (this.getGamemode().doesRequireToolToBreak() && f <= defaultBreakSpeed)
+            return 0; // Requires to break and not effective against block
+        if (isUnderLiquid(Materials.WATER)) {
             f /= 5F;
         }
-        if(!onGround && !canClimb() && vehicle == null)
-        {
+        if (!this.onGround && !canClimb() && this.vehicle == null) {
             f /= 5F;
         }
         return f;
     }
 
-    public boolean canHarvestBlock(Block<?> block)
-    {
+    public boolean canHarvestBlock(Block<?> block) {
         if (block == null) return false;
-        return inventory.canHarvestBlock(block);
+        return this.inventory.canHarvestBlock(block);
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
-        nickname = nickname.replace(" ", "");
+        this.nickname = this.nickname.replace(" ", "");
         ListTag nbttaglist = tag.getList("Inventory");
-        inventory.readFromNBT(nbttaglist);
+        this.inventory.readFromNBT(nbttaglist);
 
-        for (int i = 0; i < oldArmorInventory.length; i++) {
-            oldArmorInventory[i] = inventory.armorInventory[i];
-        }
+        System.arraycopy(this.inventory.armorInventory, 0, this.oldArmorInventory, 0, this.oldArmorInventory.length);
 
-        inventory.setCurrentItemIndex(tag.getIntegerOrDefault("CurrentItem", inventory.getCurrentItemIndex()), true);
-        inventory.setHotbarOffset(tag.getIntegerOrDefault("HotbarOffset", inventory.getHotbarOffset()), true);
+        this.inventory.setCurrentItemIndex(tag.getIntegerOrDefault("CurrentItem", this.inventory.getCurrentItemIndex()), true);
+        this.inventory.setHotbarOffset(tag.getIntegerOrDefault("HotbarOffset", this.inventory.getHotbarOffset()), true);
         int dim = tag.getInteger("Dimension");
         if (dim == -1) dim = 1;
-        dimension = dim;
-        sleeping = tag.getBoolean("Sleeping");
-        sleepTimer = tag.getShort("SleepTimer");
+        this.dimension = dim;
+        this.sleeping = tag.getBoolean("Sleeping");
+        this.sleepTimer = tag.getShort("SleepTimer");
         setGamemodeOnLogin(Gamemode.gamemodesList[tag.getInteger("Gamemode")]);
-        noPhysics = tag.getBoolean("Noclip") && gamemode.canPlayerFly();
+        this.noPhysics = tag.getBoolean("Noclip") && this.gamemode.canPlayerFly();
         this.sneaking = tag.getBoolean("Sneaking");
-        if(sleeping)
-        {
-            bedTilePos = new TilePos(this);
+        if (this.sleeping) {
+            this.bedTilePos = new TilePos(this);
             wakeUpPlayer(true, true);
         }
-        if(tag.containsKey("SpawnX") && tag.containsKey("SpawnY") && tag.containsKey("SpawnZ"))
-        {
-            playerSpawnPoint = new TilePos(tag.getInteger("SpawnX"), tag.getInteger("SpawnY"), tag.getInteger("SpawnZ"));
+        if (tag.containsKey("SpawnX") && tag.containsKey("SpawnY") && tag.containsKey("SpawnZ")) {
+            this.playerSpawnPoint = new TilePos(tag.getInteger("SpawnX"), tag.getInteger("SpawnY"), tag.getInteger("SpawnZ"));
         }
-        if(tag.containsKey("LastDeathX") && tag.containsKey("LastDeathY") && tag.containsKey("LastDeathZ"))
-        {
-            lastDeathPoint = new TilePos(tag.getInteger("LastDeathX"), tag.getInteger("LastDeathY"), tag.getInteger("LastDeathZ"));
+        if (tag.containsKey("LastDeathX") && tag.containsKey("LastDeathY") && tag.containsKey("LastDeathZ")) {
+            this.lastDeathPoint = new TilePos(tag.getInteger("LastDeathX"), tag.getInteger("LastDeathY"), tag.getInteger("LastDeathZ"));
         }
         if (tag.containsKey("HeldObject")) {
             CompoundTag heldTag = tag.getCompound("HeldObject");
-            heldObject = ICarriable.createAndLoadCarriable(this, heldTag);
+            this.heldObject = ICarriable.createAndLoadCarriable(this, heldTag);
         }
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
-        tag.put("Inventory", inventory.writeToNBT(new ListTag()));
-        tag.putInt("CurrentItem", inventory.getCurrentItemIndex());
-        tag.putInt("HotbarOffset", inventory.getHotbarOffset());
-        tag.putInt("Dimension", dimension);
-        tag.putBoolean("Sleeping", sleeping);
-        tag.putShort("SleepTimer", (short)sleepTimer);
-        tag.putInt("Gamemode", gamemode.getId());
-        tag.putBoolean("Noclip", noPhysics && gamemode.canPlayerFly());
+        tag.put("Inventory", this.inventory.writeToNBT(new ListTag()));
+        tag.putInt("CurrentItem", this.inventory.getCurrentItemIndex());
+        tag.putInt("HotbarOffset", this.inventory.getHotbarOffset());
+        tag.putInt("Dimension", this.dimension);
+        tag.putBoolean("Sleeping", this.sleeping);
+        tag.putShort("SleepTimer", (short) this.sleepTimer);
+        tag.putInt("Gamemode", this.gamemode.getId());
+        tag.putBoolean("Noclip", this.noPhysics && this.gamemode.canPlayerFly());
         tag.putBoolean("Sneaking", this.sneaking);
-        if(playerSpawnPoint != null)
-        {
-            tag.putInt("SpawnX", playerSpawnPoint.x);
-            tag.putInt("SpawnY", playerSpawnPoint.y);
-            tag.putInt("SpawnZ", playerSpawnPoint.z);
+        if (this.playerSpawnPoint != null) {
+            tag.putInt("SpawnX", this.playerSpawnPoint.x);
+            tag.putInt("SpawnY", this.playerSpawnPoint.y);
+            tag.putInt("SpawnZ", this.playerSpawnPoint.z);
         }
 
-        if(lastDeathPoint != null)
-        {
-            tag.putInt("LastDeathX", lastDeathPoint.x);
-            tag.putInt("LastDeathY", lastDeathPoint.y);
-            tag.putInt("LastDeathZ", lastDeathPoint.z);
+        if (this.lastDeathPoint != null) {
+            tag.putInt("LastDeathX", this.lastDeathPoint.x);
+            tag.putInt("LastDeathY", this.lastDeathPoint.y);
+            tag.putInt("LastDeathZ", this.lastDeathPoint.z);
         }
 
-        if (heldObject != null) {
+        if (this.heldObject != null) {
             CompoundTag heldTag = new CompoundTag();
-            heldObject.writeToNBT(heldTag);
+            this.heldObject.writeToNBT(heldTag);
             tag.put("HeldObject", heldTag);
         }
     }
 
     @Override
-    public @NotNull String getDisplayName()
-    {
-        String name = nickname;
-        if (name.isEmpty()) name = username;
+    public @NotNull String getDisplayName() {
+        String name = this.nickname;
+        if (name.isEmpty()) name = this.username;
         else name = TextFormatting.ITALIC + name;
 
-        return TextFormatting.get(chatColor) + name;
+        return TextFormatting.get(this.chatColor) + name;
     }
 
-    public void displayContainerScreen(Container container)
-    {
+    public void displayContainerScreen(Container container) {
     }
 
-    public void displayChestScreen(Container container, double x, double y, double z)
-    {
+    public void displayChestScreen(Container container, double x, double y, double z) {
     }
 
     public void displayNBTEditor(@Nullable CompoundTag tag, @Nullable Function<@NotNull CompoundTag, Void> exitAction) {
 
     }
 
-    public void displayWorkbenchScreen(@NotNull TilePos tilePos)
-    {
+    public void displayWorkbenchScreen(@NotNull TilePosc tilePos) {
     }
 
-    public void displayLabelEditorScreen(ItemStack itemStack, int slot)
-    {
+    public void displayLabelEditorScreen(ItemStack itemStack, int slot) {
     }
 
-    public void displayPaintingPickerScreen()
-    {
+    public void displayPaintingPickerScreen() {
     }
 
-    public void displayMobPickerScreen(@NotNull TilePos tilePos) { }
+    public void displayMobPickerScreen(@NotNull TilePosc tilePos) {
+    }
 
-    public void displayWandMobPickerScreen(ItemStack itemStack) { }
+    public void displayWandMobPickerScreen(ItemStack itemStack) {
+    }
 
-    public void displayGuidebookScreen() { }
+    public void displayGuidebookScreen() {
+    }
 
-    public void onItemPickup(Entity entity, ItemStack item)
-    {
+    public void onItemPickup(Entity entity, ItemStack item) {
     }
 
     @Override
-	public float getHeadHeight() {
+    public float getHeadHeight() {
         return this.bbHeight - 0.18f;
     }
 
-    public boolean killPlayer()
-    {
+    public boolean killPlayer() {
         return super.hurt(null, 100, null);
     }
 
     @Override
-    public boolean hurt(Entity attacker, int damage, DamageType type)
-    {
-        entityAge = 0;
-        if(getHealth() <= 0)
-        {
+    public boolean hurt(Entity attacker, int damage, DamageType type) {
+        this.entityAge = 0;
+        if (getHealth() <= 0) {
             return false;
         }
-        if (gamemode.isPlayerInvulnerable())
-        {
+        if (this.gamemode.isPlayerInvulnerable()) {
             return false;
         }
-        if(isPlayerSleeping() && !world.isClientSide)
-        {
+        if (isPlayerSleeping() && !this.world.isClientSide) {
             wakeUpPlayer(true, true);
         }
-        if((attacker instanceof MobMonster) || (attacker instanceof ProjectileArrow))
-        {
-            switch (world.getDifficulty()) {
+        if ((attacker instanceof MobMonster) || (attacker instanceof ProjectileArrow)) {
+            switch (this.world.getDifficulty()) {
                 case PEACEFUL: {
                     damage = 0;
                     break;
@@ -983,17 +862,14 @@ public abstract class Player
             }
         }
         Entity blamedAttacker = attacker;
-        if (damage == 0 && !(attacker instanceof MobSnowman))
-        {
+        if (damage == 0 && !(attacker instanceof MobSnowman)) {
             return false;
         }
-        if((blamedAttacker instanceof ProjectileArrow) && ((ProjectileArrow)blamedAttacker).owner != null)
-        {
-            blamedAttacker = ((ProjectileArrow)blamedAttacker).owner;
+        if ((blamedAttacker instanceof ProjectileArrow) && ((ProjectileArrow) blamedAttacker).owner != null) {
+            blamedAttacker = ((ProjectileArrow) blamedAttacker).owner;
         }
-        if(blamedAttacker instanceof Mob)
-        {
-            alertWolves((Mob)blamedAttacker, false);
+        if (blamedAttacker instanceof Mob) {
+            alertWolves((Mob) blamedAttacker, false);
         }
         addStat(StatList.damageTakenStat, damage);
         if (attacker != null) {
@@ -1003,110 +879,94 @@ public abstract class Player
         return super.hurt(attacker, damage, type);
     }
 
-    protected boolean func_27025_G()
-    {
+    protected boolean func_27025_G() {
         return false;
     }
 
-    protected void alertWolves(Mob attacker, boolean flag)
-    {
-        if((attacker instanceof MobCreeper) || (attacker instanceof MobGhast))
-        {
+    protected void alertWolves(Mob attacker, boolean flag) {
+        if ((attacker instanceof MobCreeper) || (attacker instanceof MobGhast)) {
             return;
         }
-        if(attacker instanceof MobWolf)
-        {
-            MobWolf wolf = (MobWolf)attacker;
-            if(wolf.isWolfTamed() && uuid.equals(wolf.getWolfOwner()))
-            {
+        if (attacker instanceof MobWolf wolf) {
+            if (wolf.isWolfTamed() && this.uuid.equals(wolf.getWolfOwner())) {
                 return;
             }
         }
-        if((attacker instanceof Player) && !func_27025_G())
-        {
+        if ((attacker instanceof Player) && !func_27025_G()) {
             return;
         }
-        List<MobWolf> list = world.getEntitiesWithinAABB(MobWolf.class, AABB.fromPool(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D).grow(16D, 4D, 16D));
+        AABBd bb = new AABBd(this.x, this.y, this.z, this.x + 1.0D, this.y + 1.0D, this.z + 1.0D);
+        MathHelper.aabbGrow(bb, 16, 4, 16, bb);
+        List<MobWolf> list = this.world.getEntitiesWithinAABB(MobWolf.class, bb);
         for (MobWolf wolf : list) {
-            if (wolf.isWolfTamed() && wolf.getTarget() == null && uuid.equals(wolf.getWolfOwner()) && (!flag || !wolf.isWolfSitting())) {
+            if (wolf.isWolfTamed() && wolf.getTarget() == null && this.uuid.equals(wolf.getWolfOwner()) && (!flag || !wolf.isWolfSitting())) {
                 wolf.setTarget(attacker);
             }
         }
     }
 
     @Override
-	protected void damageEntity(int damage, DamageType damageType) {
-    	float protection = 1.0f;
+    protected void damageEntity(int damage, DamageType damageType) {
+        float protection = 1.0f;
         if (damageType != null) {
             protection -= getTotalProtectionAmount(damageType);
         }
-    	protection = Math.max(protection, 0.01f);
-    	
-    	//If you take little damage and have lots of protection against that damage
-    	//there is a high change you wont take any damage
-    	double d = damage * protection;
-    	int newDamage = (int) (random.nextFloat() > 0.5 ? Math.floor(d) : Math.ceil(d));
-
-    	int preventedDamage = damage - newDamage;
-    	if(damageType != null && damageType.shouldDamageArmor()){
-        	//Reduce armor for big damage amounts, for example explosions
-        	int armorDamage = (int) Math.ceil(preventedDamage / 4.0);
-        	damageArmor(armorDamage);
-    	}
-    	
+        protection = Math.max(protection, 0.01f);
+
+        //If you take little damage and have lots of protection against that damage
+        //there is a high change you wont take any damage
+        double d = damage * protection;
+        int newDamage = (int) (this.random.nextFloat() > 0.5 ? Math.floor(d) : Math.ceil(d));
+
+        int preventedDamage = damage - newDamage;
+        if (damageType != null && damageType.shouldDamageArmor()) {
+            //Reduce armor for big damage amounts, for example explosions
+            int armorDamage = (int) Math.ceil(preventedDamage / 4.0);
+            damageArmor(armorDamage);
+        }
+
         super.damageEntity(newDamage, damageType);
     }
 
-    public void lavaHurt()
-    {
-        if(!fireImmune)
-        {
+    public void lavaHurt() {
+        if (!this.fireImmune) {
             float protection = 1.0f - getTotalProtectionAmount(DamageType.FIRE);
             protection = Math.max(protection, 0.01f);
             hurt(null, 4, DamageType.FIRE);
-            remainingFireTicks = (int) (80 + 520 * protection);
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = (int) (80 + 520 * protection);
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
 
-    public void fireHurt()
-    {
-        if(!fireImmune)
-        {
+    public void fireHurt() {
+        if (!this.fireImmune) {
             float protection = 1.0f - getTotalProtectionAmount(DamageType.FIRE);
             protection = Math.max(protection, 0.01f);
             hurt(null, 1, DamageType.FIRE);
-            remainingFireTicks = (int) (40 + 260 * protection);
-            maxFireTicks = remainingFireTicks;
+            this.remainingFireTicks = (int) (40 + 260 * protection);
+            this.maxFireTicks = this.remainingFireTicks;
         }
     }
-    
-    public void displayFurnaceScreen(TileEntityFurnace tileEntity)
-    {
+
+    public void displayFurnaceScreen(TileEntityFurnace tileEntity) {
     }
 
-    public void displayBlastFurnaceScreen(TileEntityFurnaceBlast tileEntity)
-    {
+    public void displayBlastFurnaceScreen(TileEntityFurnaceBlast tileEntity) {
     }
 
-    public void displayTrommelScreen(TileEntityTrommel tileEntity)
-    {
+    public void displayTrommelScreen(TileEntityTrommel tileEntity) {
     }
 
-    public void displayDispenserScreen(TileEntityDispenser tileEntity)
-    {
+    public void displayDispenserScreen(TileEntityDispenser tileEntity) {
     }
 
-    public void displayActivatorScreen(TileEntityActivator tileEntity)
-    {
+    public void displayActivatorScreen(TileEntityActivator tileEntity) {
     }
 
-    public void displaySignEditorScreen(TileEntitySign tileEntity)
-    {
+    public void displaySignEditorScreen(TileEntitySign tileEntity) {
     }
 
-    public void displayFlagEditorScreen(TileEntityFlag tileEntity)
-    {
+    public void displayFlagEditorScreen(TileEntityFlag tileEntity) {
     }
 
     @Override
@@ -1114,77 +974,61 @@ public abstract class Player
         return false;
     }
 
-    public boolean useCurrentItemOnEntity(Entity entity)
-    {
+    public boolean useCurrentItemOnEntity(Entity entity) {
         boolean flag = false;
-        if(entity.interact(this))
-        {
+        if (entity.interact(this)) {
             swingItem();
             flag = true;
         }
         ItemStack itemstack = getCurrentEquippedItem();
-        if(itemstack != null && (entity instanceof Mob))
-        {
-            if (itemstack.useItemOnEntity(this, (Mob)entity))
-            {
+        if (itemstack != null && (entity instanceof Mob)) {
+            if (itemstack.useItemOnEntity(this, (Mob) entity)) {
                 swingItem();
                 flag = true;
             }
-            if(itemstack.stackSize <= 0)
-            {
+            if (itemstack.stackSize <= 0) {
                 destroyCurrentEquippedItem();
             }
         }
         return flag;
     }
 
-    public ItemStack getCurrentEquippedItem()
-    {
-        return inventory.getCurrentItem();
+    public ItemStack getCurrentEquippedItem() {
+        return this.inventory.getCurrentItem();
     }
 
-    public void destroyCurrentEquippedItem()
-    {
-        inventory.setItem(inventory.getCurrentItemIndex(), null);
+    public void destroyCurrentEquippedItem() {
+        this.inventory.setItem(this.inventory.getCurrentItemIndex(), null);
     }
 
     @Override
-    public double getRidingHeight()
-    {
-        return isDwarf ? heightOffset + 0.05 : heightOffset - 0.5f;
+    public double getRidingHeight() {
+        return this.isDwarf ? this.heightOffset + 0.05 : this.heightOffset - 0.5f;
     }
 
-    public void swingItem()
-    {
-        swingProgressInt = -1;
-        isSwinging = true;
+    public void swingItem() {
+        this.swingProgressInt = -1;
+        this.isSwinging = true;
     }
 
-    public void attackTargetEntityWithCurrentItem(@NotNull Entity entity)
-    {
+    public void attackTargetEntityWithCurrentItem(@NotNull Entity entity) {
         if (!getGamemode().canInteract()) return;
-        int i = inventory.getDamageVsEntity(entity);
-        if(i > 0)
-        {
-            if(yd < 0.0D)
-            {
+        int i = this.inventory.getDamageVsEntity(entity);
+        if (i > 0) {
+            if (this.yd < 0.0D) {
                 i++;
             }
             entity.hurt(this, i, DamageType.COMBAT);
             ItemStack itemstack = getCurrentEquippedItem();
-            if(itemstack != null && (entity instanceof Mob))
-            {
-                itemstack.hitEntity((Mob)entity, this);
-                if(itemstack.stackSize <= 0)
-                {
+            if (itemstack != null && (entity instanceof Mob)) {
+                itemstack.hitEntity((Mob) entity, this);
+                if (itemstack.stackSize <= 0) {
                     destroyCurrentEquippedItem();
                 }
             }
-            if(entity instanceof Mob)
-            {
-                if(entity.isAlive())
-                {
-                    alertWolves((Mob)entity, true);
+            if (entity instanceof Mob) {
+                if (entity.isAlive()) {
+                    alertWolves((Mob) entity, true);
                 }
                 addStat(StatList.damageDealtStat, i);
             }
@@ -1192,63 +1036,56 @@ public abstract class Player
         addStat(StatList.mobEncounterStats.get(entity.getDispatcherId()), 1);
     }
 
-    public void respawnPlayer()
-    {
+    public void respawnPlayer() {
     }
 
     public abstract void animate4();
 
-    public void onItemStackChanged(ItemStack itemstack)
-    {
+    public void onItemStackChanged(ItemStack itemstack) {
     }
 
     @Override
-	  public void remove()
-    {
+    public void remove() {
         super.remove();
-        inventorySlots.onCraftGuiClosed(this);
-        if(craftingInventory != null)
-        {
-            craftingInventory.onCraftGuiClosed(this);
+        this.inventorySlots.onCraftGuiClosed(this);
+        if (this.craftingInventory != null) {
+            this.craftingInventory.onCraftGuiClosed(this);
         }
     }
 
     @Override
-	  public boolean isInWall()
-    {
-        return !sleeping && super.isInWall();
+    public boolean isInWall() {
+        return !this.sleeping && super.isInWall();
     }
 
-    public EnumSleepStatus sleepInBedAt(int x, int y, int z)
-    {
-        if(!world.isClientSide) {
-            if(isPlayerSleeping() || !isAlive()) {
+    public EnumSleepStatus sleepInBedAt(int x, int y, int z) {
+        if (!this.world.isClientSide) {
+            if (isPlayerSleeping() || !isAlive()) {
                 return EnumSleepStatus.OTHER_PROBLEM;
             }
-            if(!world.worldType.mayRespawn()) {
+            if (!this.world.worldType.mayRespawn()) {
                 return EnumSleepStatus.NOT_POSSIBLE_HERE;
             }
-            if(java.lang.Math.abs(this.x - (double)x) > 3D || java.lang.Math.abs(this.y - (double)y) > 3D || java.lang.Math.abs(this.z - (double)z) > 3D) {
+            if (java.lang.Math.abs(this.x - (double) x) > 3D || java.lang.Math.abs(this.y - (double) y) > 3D || java.lang.Math.abs(this.z - (double) z) > 3D) {
                 return EnumSleepStatus.TOO_FAR_AWAY;
             }
-            if(bedTilePos == null || !bedTilePos.equals(new TilePos(x, y, z))) {
-                if(playerSpawnPoint == null || !playerSpawnPoint.equals(new TilePos(x, y, z))) {
+            if (this.bedTilePos == null || !this.bedTilePos.equals(new TilePos(x, y, z))) {
+                if (this.playerSpawnPoint == null || !this.playerSpawnPoint.equals(new TilePos(x, y, z))) {
                     sendTranslatedChatMessage("bed.setSpawn");
                     setPlayerSpawnPoint(new TilePos(x, y, z));
                 }
             }
-            if (!world.getGameRuleValue(GameRules.ALLOW_SLEEPING))
-            {
-				sendStatusMessage(I18n.getInstance().translateKey("bed.noAllowSleeping"));
+            if (!this.world.getGameRuleValue(GameRules.ALLOW_SLEEPING)) {
+                sendStatusMessage(I18n.getInstance().translateKey("bed.noAllowSleeping"));
                 return EnumSleepStatus.DISABLED_BY_GAMERULE;
             }
 
-            if(world.isDaytime() && world.getCurrentWeather() != Weathers.OVERWORLD_STORM) {
-            	sendStatusMessage(I18n.getInstance().translateKey("bed.noSleep"));
+            if (this.world.isDaytime() && this.world.getCurrentWeather() != Weathers.OVERWORLD_STORM) {
+                sendStatusMessage(I18n.getInstance().translateKey("bed.noSleep"));
                 return EnumSleepStatus.NOT_POSSIBLE_NOW;
             }
 
-            if (SpawnerMobs.isUnsafeToSleep(world, this)) {
+            if (SpawnerMobs.isUnsafeToSleep(this.world, this)) {
                 sendStatusMessage(I18n.getInstance().translateKey("bed.unsafeToSleep"));
                 return EnumSleepStatus.NOT_SAFE;
             }
@@ -1256,102 +1093,91 @@ public abstract class Player
         setPlayerSleeping(x, y, z);
         return EnumSleepStatus.OK;
     }
-    
+
     private void setPlayerSleeping(int x, int y, int z) {
         setSize(0.2F, 0.2F);
-        if(world.isBlockLoaded(x, y, z))
-        {
-            int meta = world.getBlockMetadata(x, y, z);
+        if (this.world.isBlockLoaded(x, y, z)) {
+            int meta = this.world.getBlockMetadata(x, y, z);
             int dir = BlockLogicBed.getDirection(meta);
             float xOff = 0.5F;
             float zOff = 0.5F;
-            
-            if(dir == 0) {
+
+            if (dir == 0) {
                 zOff = 0.9f;
-            }else if(dir == 1) {
+            } else if (dir == 1) {
                 xOff = 0.1f;
-            }else if(dir == 2) {
+            } else if (dir == 2) {
                 zOff = 0.1f;
-            }else if(dir == 3) {
+            } else if (dir == 3) {
                 xOff = 0.9f;
             }
-            
+
             func_22052_e(dir);
             setPos(x + xOff, y + 0.9375F, z + zOff);
         } else {
             setPos(x + 0.5F, y + 0.9375F, z + 0.5F);
         }
-        sleeping = true;
-        sleepTimer = 0;
+        this.sleeping = true;
+        this.sleepTimer = 0;
 
-        xd = zd = yd = 0.0;
-    	bedTilePos = new TilePos(x, y, z);
-        if(!world.isClientSide) {
-            world.updateEnoughPlayersSleepingFlag(this);
+        this.xd = this.zd = this.yd = 0.0;
+        this.bedTilePos = new TilePos(x, y, z);
+        if (!this.world.isClientSide) {
+            this.world.updateEnoughPlayersSleepingFlag(this);
         }
     }
 
-    private void func_22052_e(int i)
-    {
-        sleepOffX = 0.0F;
-        sleepOffZ = 0.0F;
-        switch(i)
-        {
-        case 0: // '\0'
-            sleepOffZ = -1.8F;
-            break;
+    private void func_22052_e(int i) {
+        this.sleepOffX = 0.0F;
+        this.sleepOffZ = 0.0F;
+        switch (i) {
+            case 0: // '\0'
+                this.sleepOffZ = -1.8F;
+                break;
 
-        case 2: // '\002'
-            sleepOffZ = 1.8F;
-            break;
+            case 2: // '\002'
+                this.sleepOffZ = 1.8F;
+                break;
 
-        case 1: // '\001'
-            sleepOffX = 1.8F;
-            break;
+            case 1: // '\001'
+                this.sleepOffX = 1.8F;
+                break;
 
-        case 3: // '\003'
-            sleepOffX = -1.8F;
-            break;
+            case 3: // '\003'
+                this.sleepOffX = -1.8F;
+                break;
         }
     }
 
-    public void wakeUpPlayer(boolean flag, boolean flag1)
-    {
+    public void wakeUpPlayer(boolean flag, boolean flag1) {
         setupScale();
-        TilePos bedPos = bedTilePos;
+        TilePos bedPos = this.bedTilePos;
         Block<?> b;
-        if(bedPos != null && (b = world.getBlock(bedPos)) != null && b.getLogic() instanceof BlockLogicBed)
-        {
-            BlockLogicBed.setBedOccupied(world, bedPos, false);
-            TilePos emptyPos = BlockLogicBed.getNearestEmptyTilePos(world, bedPos, 0);
-            if(emptyPos == null)
-            {
-                emptyPos = bedPos.up();
+        if (bedPos != null && (b = this.world.getBlock(bedPos)) != null && b.getLogic() instanceof BlockLogicBed) {
+            BlockLogicBed.setBedOccupied(this.world, bedPos, false);
+            TilePos emptyPos = BlockLogicBed.getNearestEmptyTilePos(this.world, bedPos, 0);
+            if (emptyPos == null) {
+                emptyPos = bedPos.up(new TilePos());
             }
-            setPos((float)emptyPos.x + 0.5F, (float)emptyPos.y + heightOffset + 0.1F, (float)emptyPos.z + 0.5F);
+            setPos((float) emptyPos.x + 0.5F, (float) emptyPos.y + this.heightOffset + 0.1F, (float) emptyPos.z + 0.5F);
         }
-        sleeping = false;
-        if(!world.isClientSide && flag1)
-        {
-            world.updateEnoughPlayersSleepingFlag(this);
+        this.sleeping = false;
+        if (!this.world.isClientSide && flag1) {
+            this.world.updateEnoughPlayersSleepingFlag(this);
         }
-        if(flag)
-        {
-            sleepTimer = 0;
-        } else
-        {
-            sleepTimer = 100;
+        if (flag) {
+            this.sleepTimer = 0;
+        } else {
+            this.sleepTimer = 100;
         }
     }
 
-    private boolean isInBed()
-    {
+    private boolean isInBed() {
         Block<?> b;
-        return (b = world.getBlock(bedTilePos.x, bedTilePos.y, bedTilePos.z)) != null && b.getLogic() instanceof BlockLogicBed;
+        return (b = this.world.getBlock(this.bedTilePos.x, this.bedTilePos.y, this.bedTilePos.z)) != null && b.getLogic() instanceof BlockLogicBed;
     }
 
-    public static @Nullable TilePos getValidBedSpawnCoordinates(@NotNull final World world, @NotNull final TilePos coords)
-    {
+    public static @Nullable TilePos getValidBedSpawnCoordinates(@NotNull final World world, @NotNull final TilePos coords) {
         final IChunkProvider chunkProvider = world.getChunkProvider();
         chunkProvider.setCurrentChunkOver(coords.x >> 4, coords.z >> 4);
         chunkProvider.prepareChunk(coords.x - 3 >> 4, coords.z - 3 >> 4);
@@ -1365,204 +1191,161 @@ public abstract class Player
         }
     }
 
-    public float getBedOrientationInDegrees()
-    {
-        if(bedTilePos != null)
-        {
-            int i = world.getBlockMetadata(bedTilePos.x, bedTilePos.y, bedTilePos.z);
+    public float getBedOrientationInDegrees() {
+        if (this.bedTilePos != null) {
+            int i = this.world.getBlockMetadata(this.bedTilePos.x, this.bedTilePos.y, this.bedTilePos.z);
             int j = BlockLogicBed.getDirection(i);
-            switch(j)
-            {
-            case 0: // '\0'
-                return 90F;
+            switch (j) {
+                case 0: // '\0'
+                    return 90F;
 
-            case 1: // '\001'
-                return 0.0F;
+                case 1: // '\001'
+                    return 0.0F;
 
-            case 2: // '\002'
-                return 270F;
+                case 2: // '\002'
+                    return 270F;
 
-            case 3: // '\003'
-                return 180F;
+                case 3: // '\003'
+                    return 180F;
             }
         }
         return 0.0F;
     }
 
     @Override
-    public boolean isPlayerSleeping()
-    {
-        return sleeping;
+    public boolean isPlayerSleeping() {
+        return this.sleeping;
     }
 
-    public boolean isPlayerFullyAsleep()
-    {
-        return sleeping && sleepTimer >= 100;
+    public boolean isPlayerFullyAsleep() {
+        return this.sleeping && this.sleepTimer >= 100;
     }
 
-    public int getSleepTimer()
-    {
-        return sleepTimer;
+    public int getSleepTimer() {
+        return this.sleepTimer;
     }
 
     /**
      * Translate the string and send it to this player
      */
     public void sendTranslatedChatMessage(String message) {
-    	sendMessage(I18n.getInstance().translateKey(message));
+        sendMessage(I18n.getInstance().translateKey(message));
     }
-    
+
     /**
      * Send a string to this player, displayed in chat
      */
     public abstract void sendMessage(String message);
-    
+
     /**
      * Send a string to this player, displayed above the hotbar
      */
     public abstract void sendStatusMessage(String message);
 
     @Override
-    public ItemStack getHeldItem()
-    {
-        return inventory.getCurrentItem();
+    public ItemStack getHeldItem() {
+        return this.inventory.getCurrentItem();
     }
 
     @Override
     public boolean isLeftHanded() {
-        return playerConfig.isLeftHand();
+        return this.playerConfig.isLeftHand();
     }
 
     @Override
     public void setHeldItem(@Nullable ItemStack item) {
-        inventory.setCurrentItem(item, true);
+        this.inventory.setCurrentItem(item, true);
     }
 
-    public void updateCreativeInventory(int page, String searchText)
-    {
+    public void updateCreativeInventory(int page, String searchText) {
     }
 
-    public @Nullable TilePos getPlayerSpawnPoint()
-    {
+    public @Nullable TilePos getPlayerSpawnPoint() {
         return this.playerSpawnPoint;
     }
 
-    public void setPlayerSpawnPoint(TilePos spawnCoords)
-    {
-        if(spawnCoords != null)
-        {
-            playerSpawnPoint = new TilePos(spawnCoords);
-        } else
-        {
-            playerSpawnPoint = null;
+    public void setPlayerSpawnPoint(TilePos spawnCoords) {
+        if (spawnCoords != null) {
+            this.playerSpawnPoint = new TilePos(spawnCoords);
+        } else {
+            this.playerSpawnPoint = null;
         }
     }
 
-    public void triggerAchievement(Stat statbase)
-    {
+    public void triggerAchievement(Stat statbase) {
         addStat(statbase, 1);
     }
 
-    public void addStat(Stat statbase, int i)
-    {
+    public void addStat(Stat statbase, int i) {
     }
-    
-    public int getStat(Stat statbase)
-    {
+
+    public int getStat(Stat statbase) {
         return 0;
     }
 
     @Override
-    protected void jump()
-    {
+    protected void jump() {
         super.jump();
         addStat(StatList.jumpStat, 1);
     }
 
     @Override
-    public void moveEntityWithHeading(float moveStrafing, float moveForward)
-    {
-        double d = x;
-        double d1 = y;
-        double d2 = z;
+    public void moveEntityWithHeading(float moveStrafing, float moveForward) {
+        double d = this.x;
+        double d1 = this.y;
+        double d2 = this.z;
         super.moveEntityWithHeading(moveStrafing, moveForward);
-        addMovementStat(x - d, y - d1, z - d2);
+        addMovementStat(this.x - d, this.y - d1, this.z - d2);
     }
 
-    private void addMovementStat(double d, double d1, double d2)
-    {
-        if(vehicle != null)
-        {
+    private void addMovementStat(double d, double d1, double d2) {
+        if (this.vehicle != null) {
             return;
         }
-        if(isUnderLiquid(Material.water))
-        {
+        if (isUnderLiquid(Materials.WATER)) {
             int i = java.lang.Math.round(MathHelper.sqrt(d * d + d1 * d1 + d2 * d2) * 100F);
-            if(i > 0)
-            {
+            if (i > 0) {
                 addStat(StatList.distanceDoveStat, i);
             }
-        } else
-        if(isInWater())
-        {
+        } else if (isInWater()) {
             int j = java.lang.Math.round(MathHelper.sqrt(d * d + d2 * d2) * 100F);
-            if(j > 0)
-            {
+            if (j > 0) {
                 addStat(StatList.distanceSwumStat, j);
-                if (dimension == Dimension.NETHER.id) {
+                if (this.dimension == Dimension.NETHER.id) {
                     addStat(Achievements.SWIM_NETHER, 1);
                 }
             }
-        } else
-        if(canClimb())
-        {
-            if(d1 > 0.0D)
-            {
+        } else if (canClimb()) {
+            if (d1 > 0.0D) {
                 addStat(StatList.distanceClimbedStat, (int) java.lang.Math.round(d1 * 100D));
             }
-        } else
-        if(onGround)
-        {
+        } else if (this.onGround) {
             int k = java.lang.Math.round(MathHelper.sqrt(d * d + d2 * d2) * 100F);
-            if(k > 0)
-            {
+            if (k > 0) {
                 addStat(StatList.distanceWalkedStat, k);
             }
-        } else
-        {
+        } else {
             int l = java.lang.Math.round(MathHelper.sqrt(d * d + d2 * d2) * 100F);
-            if(l > 25)
-            {
+            if (l > 25) {
                 addStat(StatList.distanceFlownStat, l);
             }
         }
     }
 
-    private void addMountedMovementStat(double d, double d1, double d2)
-    {
-        if(vehicle != null)
-        {
+    private void addMountedMovementStat(double d, double d1, double d2) {
+        if (this.vehicle != null) {
             int i = java.lang.Math.round(MathHelper.sqrt(d * d + d1 * d1 + d2 * d2) * 100F);
-            if(i > 0)
-            {
-                if(vehicle instanceof EntityMinecart)
-                {
+            if (i > 0) {
+                if (this.vehicle instanceof EntityMinecart) {
                     addStat(StatList.distanceByMinecartStat, i);
-                    if(startMinecartRidingPoint == null)
-                    {
-                        startMinecartRidingPoint = new TilePos(this);
-                    } else
-                    if(startMinecartRidingPoint.distToSq(this) >= 1000D)
-                    {
+                    if (this.startMinecartRidingPoint == null) {
+                        this.startMinecartRidingPoint = new TilePos(this);
+                    } else if (this.startMinecartRidingPoint.distanceSquared(this) >= 1000D) {
                         addStat(Achievements.ON_A_RAIL, 1);
                     }
-                } else
-                if(vehicle instanceof EntityBoat)
-                {
+                } else if (this.vehicle instanceof EntityBoat) {
                     addStat(StatList.distanceByBoatStat, i);
-                } else
-                if(vehicle instanceof MobPig)
-                {
+                } else if (this.vehicle instanceof MobPig) {
                     addStat(StatList.distanceByPigStat, i);
                 }
             }
@@ -1570,207 +1353,189 @@ public abstract class Player
     }
 
     @Override
-	protected void causeFallDamage(float distance)
-    {
-        if(distance >= 2.0F)
-        {
+    protected void causeFallDamage(float distance) {
+        if (distance >= 2.0F) {
             addStat(StatList.distanceFallenStat, (int) java.lang.Math.round((double) distance * 100D));
         }
         super.causeFallDamage(distance);
     }
 
     @Override
-	public void killed(Mob mob)
-    {
-        if(mob instanceof MobMonster)
-        {
+    public void killed(Mob mob) {
+        if (mob instanceof MobMonster) {
             triggerAchievement(Achievements.KILL_ENEMY);
         }
     }
 
     @Override
-	public void handlePortal(int portalBlockId, DyeColor portalColor)
-    {
-        if(timeUntilPortal > 0)
-        {
-            timeUntilPortal = 10;
-        }
-        else
-        {
-        	this.portalID = portalBlockId;
+    public void handlePortal(int portalBlockId, DyeColor portalColor) {
+        if (this.timeUntilPortal > 0) {
+            this.timeUntilPortal = 10;
+        } else {
+            this.portalID = portalBlockId;
             this.portalColor = portalColor;
-            inPortal = true;
+            this.inPortal = true;
         }
     }
-    
+
     @Override
-    public boolean canBreatheUnderwater()
-    {
-        return gamemode.isPlayerInvulnerable();
+    public boolean canBreatheUnderwater() {
+        return this.gamemode.isPlayerInvulnerable();
     }
-    
-    public @NotNull Gamemode getGamemode()
-    {
-        return gamemode;
+
+    public @NotNull Gamemode getGamemode() {
+        return this.gamemode;
     }
 
 
-    public void setGamemodeOnLogin(Gamemode gamemode)
-    {
+    public void setGamemodeOnLogin(Gamemode gamemode) {
         this.gamemode = gamemode;
 
-        MenuInventory newContainer = gamemode.getContainer(this.inventory, !world.isClientSide);
-        if (craftingInventory == inventorySlots)
-        {
-            craftingInventory = newContainer;
+        MenuInventory newContainer = gamemode.getContainer(this.inventory, !this.world.isClientSide);
+        if (this.craftingInventory == this.inventorySlots) {
+            this.craftingInventory = newContainer;
         }
-        inventorySlots = newContainer;
-        if (!gamemode.canPlayerFly())
-        {
-            noPhysics = false;
+        this.inventorySlots = newContainer;
+        if (!gamemode.canPlayerFly()) {
+            this.noPhysics = false;
         }
 
-        fireImmune = gamemode.isImmuneToFire();
+        this.fireImmune = gamemode.isImmuneToFire();
     }
 
-    public void setGamemode(Gamemode gamemode)
-    {
+    public void setGamemode(Gamemode gamemode) {
         this.gamemode = gamemode;
-        fireImmune = gamemode.isImmuneToFire();
+        this.fireImmune = gamemode.isImmuneToFire();
     }
 
-    public void setNoclip(final boolean noclip)
-	{
-		noPhysics = noclip;
-		if (noPhysics)
-		{
-			yd += 0.079f;
-		}
-	}
+    public void setNoclip(final boolean noclip) {
+        this.noPhysics = noclip;
+        if (this.noPhysics) {
+            this.yd += 0.079f;
+        }
+    }
 
-    public void setLastDeathPoint(TilePos lastDeathPos){
+    public void setLastDeathPoint(TilePos lastDeathPos) {
         this.lastDeathPoint = lastDeathPos;
     }
 
-    public TilePos getLastDeathPoint(){
-        return lastDeathPoint;
+    public TilePos getLastDeathPoint() {
+        return this.lastDeathPoint;
     }
 
     public void pickBlock(int x, int y, int z, boolean pickFully) {
-        Block<?> block = world.getBlock(x, y, z);
-    	int meta = world.getBlockMetadata(x, y, z);
-    	
-    	if(block == null) {
-    		return;
-    	}
-    	
-    	TileEntity tileEntity = world.getTileEntity(x, y, z);
-    	ItemStack[] result = block.getBreakResult(world, EnumDropCause.PICK_BLOCK, x, y, z, meta, tileEntity);
-    	ItemStack selectItem = result != null ? result[0] : null;
-    	
-    	if(selectItem == null) {
-    		return;
-    	}
-
-        if (pickFully && gamemode == Gamemode.creative && tileEntity != null) {
+        Block<?> block = this.world.getBlock(x, y, z);
+        int meta = this.world.getBlockMetadata(x, y, z);
+
+        if (block == null) {
+            return;
+        }
+
+        TileEntity tileEntity = this.world.getTileEntity(x, y, z);
+        ItemStack[] result = block.getBreakResult(this.world, EnumDropCause.PICK_BLOCK, x, y, z, meta, tileEntity);
+        ItemStack selectItem = result != null ? result[0] : null;
+
+        if (selectItem == null) {
+            return;
+        }
+
+        if (pickFully && this.gamemode == Gamemode.creative && tileEntity != null) {
             CompoundTag entityTag = new CompoundTag();
             tileEntity.writeAdditionalData(entityTag);
             selectItem.getData().put("tileEntityData", entityTag);
         }
 
-		//Find item in hotbar, and select it
-		for(int i=0; i < 9; i++) {
-			ItemStack stack = inventory.getItem(i + inventory.getHotbarOffset());
-			if(stack != null && stack.itemID == selectItem.itemID && stack.getMetadata() == selectItem.getMetadata() && stack.getData().equals(selectItem.getData())) {
-				setCurrentItem(i + inventory.getHotbarOffset());
-				return;
-			}
-		}
-		
-		//Find empty hotbar slot
-		int emptyHotbarSlot = -1;
-		int slot = inventory.getCurrentItemIndex();
-		for(int i=0; i < 9; i++) {
-			if(inventory.getItem(i + inventory.getHotbarOffset()) == null) {
-				emptyHotbarSlot = i + inventory.getHotbarOffset();
-				slot = i + inventory.getHotbarOffset();
-				break;
-			}
-		}
-		
-		//Find item with lowest stack size in inventory
-		int itemSlot = -1;
-		int stackSize = -1;
-		for(int i=0; i < 36; i++) {
-			ItemStack stack = inventory.getItem(i);
-			if(stack != null && stack.itemID == selectItem.itemID && stack.getMetadata() == selectItem.getMetadata() && stack.getData().equals(selectItem.getData())) {
-				if(stackSize == -1 || stack.stackSize < stackSize) {
-					itemSlot = i;
-					stackSize = stack.stackSize;
-				}
-			}
-		}
-		
-		if(itemSlot == -1) {
-			if(getGamemode() == Gamemode.creative) {
-				int emptySlot = -1;
-				for(int i = 0; i < 36; i++) {
-					if(inventory.getItem(i) == null) {
-						emptySlot = i;
-						break;
-					}
-				}
-				
-				int createItemInsertSlot = emptyHotbarSlot != -1 ? emptyHotbarSlot : inventory.getCurrentItemIndex();
-				selectItem.stackSize = 1;
-				if(emptySlot != -1) {
-					swapItems(emptySlot, createItemInsertSlot);
-				}
-				inventory.setItem(createItemInsertSlot, selectItem);
-				setCurrentItem(createItemInsertSlot);
-			}
-			
-			return;
-		}
-		
-		swapItems(slot, itemSlot);
-		setCurrentItem(slot);
-    }
-    
+        //Find item in hotbar, and select it
+        for (int i = 0; i < 9; i++) {
+            ItemStack stack = this.inventory.getItem(i + this.inventory.getHotbarOffset());
+            if (stack != null && stack.itemID == selectItem.itemID && stack.getMetadata() == selectItem.getMetadata() && stack.getData().equals(selectItem.getData())) {
+                setCurrentItem(i + this.inventory.getHotbarOffset());
+                return;
+            }
+        }
+
+        //Find empty hotbar slot
+        int emptyHotbarSlot = -1;
+        int slot = this.inventory.getCurrentItemIndex();
+        for (int i = 0; i < 9; i++) {
+            if (this.inventory.getItem(i + this.inventory.getHotbarOffset()) == null) {
+                emptyHotbarSlot = i + this.inventory.getHotbarOffset();
+                slot = i + this.inventory.getHotbarOffset();
+                break;
+            }
+        }
+
+        //Find item with lowest stack size in inventory
+        int itemSlot = -1;
+        int stackSize = -1;
+        for (int i = 0; i < 36; i++) {
+            ItemStack stack = this.inventory.getItem(i);
+            if (stack != null && stack.itemID == selectItem.itemID && stack.getMetadata() == selectItem.getMetadata() && stack.getData().equals(selectItem.getData())) {
+                if (stackSize == -1 || stack.stackSize < stackSize) {
+                    itemSlot = i;
+                    stackSize = stack.stackSize;
+                }
+            }
+        }
+
+        if (itemSlot == -1) {
+            if (getGamemode() == Gamemode.creative) {
+                int emptySlot = -1;
+                for (int i = 0; i < 36; i++) {
+                    if (this.inventory.getItem(i) == null) {
+                        emptySlot = i;
+                        break;
+                    }
+                }
+
+                int createItemInsertSlot = emptyHotbarSlot != -1 ? emptyHotbarSlot : this.inventory.getCurrentItemIndex();
+                selectItem.stackSize = 1;
+                if (emptySlot != -1) {
+                    swapItems(emptySlot, createItemInsertSlot);
+                }
+                this.inventory.setItem(createItemInsertSlot, selectItem);
+                setCurrentItem(createItemInsertSlot);
+            }
+
+            return;
+        }
+
+        swapItems(slot, itemSlot);
+        setCurrentItem(slot);
+    }
+
     public void setCurrentItem(int i) {
-        inventory.setCurrentItemIndex(i, false);
+        this.inventory.setCurrentItemIndex(i, false);
     }
-    
+
     public void swapItems(int slot1, int slot2) {
-        ItemStack stack1 = inventory.getItem(slot1);
-        ItemStack stack2 = inventory.getItem(slot2);
+        ItemStack stack1 = this.inventory.getItem(slot1);
+        ItemStack stack2 = this.inventory.getItem(slot2);
 
-        inventory.setItem(slot2, stack1);
-        inventory.setItem(slot1, stack2);
+        this.inventory.setItem(slot2, stack1);
+        this.inventory.setItem(slot1, stack2);
     }
-    public Item getNextArrow(){
+
+    public Item getNextArrow() {
         Item nextArrow = null;
         ItemStack quiverSlot = getItemInArmorSlot(HumanArmorShape.CHEST);
-        if(quiverSlot != null && quiverSlot.itemID == Items.ARMOR_QUIVER.id && quiverSlot.getMetadata() < quiverSlot.getMaxDamage()){
+        if (quiverSlot != null && quiverSlot.itemID == Items.ARMOR_QUIVER.id && quiverSlot.getMetadata() < quiverSlot.getMaxDamage()) {
             nextArrow = Items.AMMO_ARROW;
-        }
-        else if(quiverSlot != null && quiverSlot.itemID == Items.ARMOR_QUIVER_GOLD.id){
+        } else if (quiverSlot != null && quiverSlot.itemID == Items.ARMOR_QUIVER_GOLD.id) {
             nextArrow = Items.AMMO_ARROW_PURPLE;
-        }
-        else if (hasItem(Items.AMMO_ARROW_GOLD))
-        {
+        } else if (hasItem(Items.AMMO_ARROW_GOLD)) {
             nextArrow = Items.AMMO_ARROW_GOLD;
-        }
-        else if(hasItem(Items.AMMO_ARROW))
-        {
+        } else if (hasItem(Items.AMMO_ARROW)) {
             nextArrow = Items.AMMO_ARROW;
         }
         return nextArrow;
     }
-    public int getArrowId(){
-        return entityData.getInt(DATA_HELD_ARROW);
+
+    public int getArrowId() {
+        return this.entityData.getInt(DATA_HELD_ARROW);
     }
-    public boolean hasItem(Item item){
+
+    public boolean hasItem(Item item) {
         for (ItemStack stack : this.inventory.mainInventory) {
             if (stack != null && stack.getItem() == item) return true;
         }
@@ -1828,11 +1593,11 @@ public abstract class Player
 
         private void setToggle(boolean flag, int mask) {
             if (flag) {
-                config = (short) (config | mask);
+                this.config = (short) (this.config | mask);
             } else {
-                config = (short) (config & ~mask);
+                this.config = (short) (this.config & ~mask);
             }
-            if (listener != null) listener.onValueChange();
+            if (this.listener != null) this.listener.onValueChange();
         }
 
         public void assignListener(PlayerConfigListener listener) {
@@ -1840,32 +1605,84 @@ public abstract class Player
         }
 
         public boolean isLeftHand() {
-            return (config & MASK_LEFT_HAND) != 0;
-        }
-        public boolean capeEnabled() {return (config & MASK_CAPE) != 0;}
-        public boolean hatEnabled() {return (config & MASK_OUTER_HEAD) != 0;}
-        public boolean jacketEnabled() {return (config & MASK_OUTER_TORSO) != 0;}
-        public boolean sleeveLeftEnabled() {return (config & MASK_OUTER_ARM_LEFT) != 0;}
-        public boolean sleeveRightEnabled() {return (config & MASK_OUTER_ARM_RIGHT) != 0;}
-        public boolean pantLeftEnabled() {return (config & MASK_OUTER_LEG_LEFT) != 0;}
-        public boolean pantRightEnabled() {return (config & MASK_OUTER_LEG_RIGHT) != 0;}
-        public boolean devModelEnabled() {return (config & MASK_DEV_MODEL) != 0;}
+            return (this.config & MASK_LEFT_HAND) != 0;
+        }
+
+        public boolean capeEnabled() {
+            return (this.config & MASK_CAPE) != 0;
+        }
+
+        public boolean hatEnabled() {
+            return (this.config & MASK_OUTER_HEAD) != 0;
+        }
+
+        public boolean jacketEnabled() {
+            return (this.config & MASK_OUTER_TORSO) != 0;
+        }
+
+        public boolean sleeveLeftEnabled() {
+            return (this.config & MASK_OUTER_ARM_LEFT) != 0;
+        }
+
+        public boolean sleeveRightEnabled() {
+            return (this.config & MASK_OUTER_ARM_RIGHT) != 0;
+        }
+
+        public boolean pantLeftEnabled() {
+            return (this.config & MASK_OUTER_LEG_LEFT) != 0;
+        }
+
+        public boolean pantRightEnabled() {
+            return (this.config & MASK_OUTER_LEG_RIGHT) != 0;
+        }
+
+        public boolean devModelEnabled() {
+            return (this.config & MASK_DEV_MODEL) != 0;
+        }
+
         public @NotNull HurtSound hurtSound() {
-            return HurtSound.getHurtSoundFromId((config & MASK_HURT_SOUND) >> 8);
-        }
-
-        public void setLeftHand(boolean leftHand) {setToggle(leftHand, MASK_LEFT_HAND);}
-        public void setCape(boolean cape) {setToggle(cape, MASK_CAPE);}
-        public void setHat(boolean hat) {setToggle(hat, MASK_OUTER_HEAD);}
-        public void setJacket(boolean jacket) {setToggle(jacket, MASK_OUTER_TORSO);}
-        public void setSleeveLeft(boolean sleeveLeft) {setToggle(sleeveLeft, MASK_OUTER_ARM_LEFT);}
-        public void setSleeveRight(boolean sleeveRight) {setToggle(sleeveRight, MASK_OUTER_ARM_RIGHT);}
-        public void setPantLeft(boolean pantLeft) {setToggle(pantLeft, MASK_OUTER_LEG_LEFT);}
-        public void setPantRight(boolean pantRight) {setToggle(pantRight, MASK_OUTER_LEG_RIGHT);}
-        public void setDevModelEnabled(boolean pantRight) {setToggle(pantRight, MASK_DEV_MODEL);}
+            return HurtSound.getHurtSoundFromId((this.config & MASK_HURT_SOUND) >> 8);
+        }
+
+        public void setLeftHand(boolean leftHand) {
+            setToggle(leftHand, MASK_LEFT_HAND);
+        }
+
+        public void setCape(boolean cape) {
+            setToggle(cape, MASK_CAPE);
+        }
+
+        public void setHat(boolean hat) {
+            setToggle(hat, MASK_OUTER_HEAD);
+        }
+
+        public void setJacket(boolean jacket) {
+            setToggle(jacket, MASK_OUTER_TORSO);
+        }
+
+        public void setSleeveLeft(boolean sleeveLeft) {
+            setToggle(sleeveLeft, MASK_OUTER_ARM_LEFT);
+        }
+
+        public void setSleeveRight(boolean sleeveRight) {
+            setToggle(sleeveRight, MASK_OUTER_ARM_RIGHT);
+        }
+
+        public void setPantLeft(boolean pantLeft) {
+            setToggle(pantLeft, MASK_OUTER_LEG_LEFT);
+        }
+
+        public void setPantRight(boolean pantRight) {
+            setToggle(pantRight, MASK_OUTER_LEG_RIGHT);
+        }
+
+        public void setDevModelEnabled(boolean pantRight) {
+            setToggle(pantRight, MASK_DEV_MODEL);
+        }
+
         public void setHurtSound(@NotNull HurtSound hurtSound) {
             this.config = (short) ((this.config & ~MASK_HURT_SOUND) | ((hurtSound.ordinal() << 8) & MASK_HURT_SOUND));
-            if (listener != null) listener.onValueChange();
+            if (this.listener != null) this.listener.onValueChange();
         }
 
         public interface PlayerConfigListener {
@@ -1879,6 +1696,7 @@ public abstract class Player
 
             private static final HurtSound[] hurtSounds = new HurtSound[16];
             private static int maxHurtSound;
+
             static {
                 for (HurtSound sound : values()) {
                     hurtSounds[sound.ordinal()] = sound;
diff --git a/game/core/src/main/java/net/minecraft/core/entity/projectile/Projectile.java b/game/core/src/main/java/net/minecraft/core/entity/projectile/Projectile.java
index d8702141f..f3a3b729b 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/projectile/Projectile.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/projectile/Projectile.java
@@ -8,10 +8,12 @@ import net.minecraft.core.entity.Entity;
 import net.minecraft.core.item.Item;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 
@@ -25,51 +27,49 @@ public class Projectile extends Entity {
     protected float gravity;
     protected float defaultProjectileSpeed;
     protected float projectileSpeed;
-    public Projectile(World world)
-    {
+
+    public Projectile(@NotNull World world) {
         super(world);
-        ticksInAir = 0;
+        this.ticksInAir = 0;
         setSize(0.25F, 0.25F);
 
         initProjectile();
     }
 
-    public Projectile(World world, Mob owner)
-    {
+    public Projectile(@NotNull World world, @NotNull Mob owner) {
         super(world);
-        ticksInAir = 0;
+        this.ticksInAir = 0;
         this.owner = owner;
         setSize(0.25F, 0.25F);
-        moveTo(owner.x, owner.y + (double)owner.getHeadHeight(), owner.z, owner.yRot, owner.xRot);
+        moveTo(owner.x, owner.y + (double) owner.getHeadHeight(), owner.z, owner.yRot, owner.xRot);
         if (owner instanceof IItemHolding && ((IItemHolding) owner).isLeftHanded()) {
-            x += MathHelper.cos((yRot / 180F) * MathHelper.PI) * 0.16F;
-            y -= 0.1D;
-            z += MathHelper.sin((yRot / 180F) * MathHelper.PI) * 0.16F;
+            this.x += MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * 0.16F;
+            this.y -= 0.1D;
+            this.z += MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * 0.16F;
         } else {
-            x -= MathHelper.cos((yRot / 180F) * MathHelper.PI) * 0.16F;
-            y -= 0.1D;
-            z -= MathHelper.sin((yRot / 180F) * MathHelper.PI) * 0.16F;
+            this.x -= MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * 0.16F;
+            this.y -= 0.1D;
+            this.z -= MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * 0.16F;
         }
 
-        setPos(x, y, z);
-        heightOffset = 0.0F;
+        setPos(this.x, this.y, this.z);
+        this.heightOffset = 0.0F;
         float f = 0.4F;
-        xd = -MathHelper.sin((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f;
-        zd = MathHelper.cos((yRot / 180F) * MathHelper.PI) * MathHelper.cos((xRot / 180F) * MathHelper.PI) * f;
-        yd = -MathHelper.sin((xRot / 180F) * MathHelper.PI) * f;
-        setHeading(xd, yd, zd, 1.5F, 1.0F);
+        this.xd = -MathHelper.sin((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f;
+        this.zd = MathHelper.cos((this.yRot / 180F) * MathHelper.PI) * MathHelper.cos((this.xRot / 180F) * MathHelper.PI) * f;
+        this.yd = -MathHelper.sin((this.xRot / 180F) * MathHelper.PI) * f;
+        setHeading(this.xd, this.yd, this.zd, 1.5F, 1.0F);
 
         initProjectile();
     }
 
-    public Projectile(World world, double x, double y, double z)
-    {
+    public Projectile(@NotNull World world, double x, double y, double z) {
         super(world);
-        ticksInAir = 0;
-        ticksInGround = 0;
+        this.ticksInAir = 0;
+        this.ticksInGround = 0;
         setSize(0.25F, 0.25F);
         setPos(x, y, z);
-        heightOffset = 0.0F;
+        this.heightOffset = 0.0F;
 
         initProjectile();
     }
@@ -78,16 +78,16 @@ public class Projectile extends Entity {
     protected void defineSynchedData() {
 
     }
-    protected void initProjectile(){
-        damage = 0;
-        defaultGravity = 0.03f;
-        defaultProjectileSpeed = 0.99f;
+
+    protected void initProjectile() {
+        this.damage = 0;
+        this.defaultGravity = 0.03f;
+        this.defaultProjectileSpeed = 0.99f;
     }
 
     @Override
-    public boolean shouldRenderAtSqrDistance(final double distance, final double viewDistanceModifier)
-    {
-        double d1 = this.bb.getSize() * 4D;
+    public boolean shouldRenderAtSqrDistance(final double distance, final double viewDistanceModifier) {
+        double d1 = MathHelper.getAABBSize(this.bb) * 4D;
         d1 *= 64D * viewDistanceModifier;
         return distance < d1 * d1;
     }
@@ -102,29 +102,27 @@ public class Projectile extends Entity {
 
     }
 
-    public void setHeading(double newMotionX, double newMotionY, double newMotionZ, float speed, float randomness)
-    {
+    public void setHeading(double newMotionX, double newMotionY, double newMotionZ, float speed, float randomness) {
         float velocity = MathHelper.sqrt(newMotionX * newMotionX + newMotionY * newMotionY + newMotionZ * newMotionZ);
         newMotionX /= velocity;
         newMotionY /= velocity;
         newMotionZ /= velocity;
-        newMotionX += random.nextGaussian() * 0.0075 * (double)randomness;
-        newMotionY += random.nextGaussian() * 0.0075 * (double)randomness;
-        newMotionZ += random.nextGaussian() * 0.0075 * (double)randomness;
+        newMotionX += this.random.nextGaussian() * 0.0075 * (double) randomness;
+        newMotionY += this.random.nextGaussian() * 0.0075 * (double) randomness;
+        newMotionZ += this.random.nextGaussian() * 0.0075 * (double) randomness;
         newMotionX *= speed;
         newMotionY *= speed;
         newMotionZ *= speed;
-        xd = newMotionX;
-        yd = newMotionY;
-        zd = newMotionZ;
+        this.xd = newMotionX;
+        this.yd = newMotionY;
+        this.zd = newMotionZ;
         float f3 = MathHelper.sqrt(newMotionX * newMotionX + newMotionZ * newMotionZ);
-        yRotO = yRot = (float)((java.lang.Math.atan2(newMotionX, newMotionZ) * 180D) / Math.PI);
-        xRotO = xRot = (float)((java.lang.Math.atan2(newMotionY, f3) * 180D) / Math.PI);
-        ticksInGround = 0;
+        this.yRotO = this.yRot = (float) ((java.lang.Math.atan2(newMotionX, newMotionZ) * 180D) / Math.PI);
+        this.xRotO = this.xRot = (float) ((java.lang.Math.atan2(newMotionY, f3) * 180D) / Math.PI);
+        this.ticksInGround = 0;
     }
 
-    public void setHeadingPrecise(double newMotionX, double newMotionY, double newMotionZ, float speed)
-    {
+    public void setHeadingPrecise(double newMotionX, double newMotionY, double newMotionZ, float speed) {
         float velocity = MathHelper.sqrt(newMotionX * newMotionX + newMotionY * newMotionY + newMotionZ * newMotionZ);
         newMotionX /= velocity;
         newMotionY /= velocity;
@@ -132,138 +130,134 @@ public class Projectile extends Entity {
         newMotionX *= speed;
         newMotionY *= speed;
         newMotionZ *= speed;
-        xd = newMotionX;
-        yd = newMotionY;
-        zd = newMotionZ;
+        this.xd = newMotionX;
+        this.yd = newMotionY;
+        this.zd = newMotionZ;
         float horizontalVelocity = MathHelper.sqrt(newMotionX * newMotionX + newMotionZ * newMotionZ);
-        yRotO = yRot = (float)((Math.atan2(newMotionX, newMotionZ) * 180D) / Math.PI);
-        xRotO = xRot = (float)((Math.atan2(newMotionY, horizontalVelocity) * 180D) / Math.PI);
-        ticksInGround = 0;
+        this.yRotO = this.yRot = (float) ((Math.atan2(newMotionX, newMotionZ) * 180D) / Math.PI);
+        this.xRotO = this.xRot = (float) ((Math.atan2(newMotionY, horizontalVelocity) * 180D) / Math.PI);
+        this.ticksInGround = 0;
     }
 
 
     @Override
-    public void lerpMotion(double xd, double yd, double zd)
-    {
+    public void lerpMotion(double xd, double yd, double zd) {
         this.xd = xd;
         this.yd = yd;
         this.zd = zd;
-        if(xRotO == 0.0F && yRotO == 0.0F)
-        {
+        if (this.xRotO == 0.0F && this.yRotO == 0.0F) {
             float f = MathHelper.sqrt(xd * xd + zd * zd);
-            yRotO = yRot = (float)((Math.atan2(xd, zd) * 180D) / Math.PI);
-            xRotO = xRot = (float)((Math.atan2(yd, f) * 180D) / Math.PI);
+            this.yRotO = this.yRot = (float) ((Math.atan2(xd, zd) * 180D) / Math.PI);
+            this.xRotO = this.xRot = (float) ((Math.atan2(yd, f) * 180D) / Math.PI);
         }
     }
 
     @Override
-    public void tick()
-    {
-        gravity = defaultGravity;
-        projectileSpeed = defaultProjectileSpeed;
+    public void tick() {
+        this.gravity = this.defaultGravity;
+        this.projectileSpeed = this.defaultProjectileSpeed;
         super.tick();
-        ticksInAir++;
+        this.ticksInAir++;
 
         HitResult movingobjectposition = getHitResult();
-        Vec3 oldPosition = Vec3.fromPool(x, y, z);
-        Vec3 newPosition = Vec3.fromPool(x + xd, y + yd, z + zd);
-        if(movingobjectposition != null)
-        {
-            newPosition = Vec3.fromPool(movingobjectposition.location.x, movingobjectposition.location.y, movingobjectposition.location.z);
+        Vector3dc oldPosition = new Vector3d(this.x, this.y, this.z);
+        Vector3dc newPosition = new Vector3d(this.x + this.xd, this.y + this.yd, this.z + this.zd);
+        if (movingobjectposition != null) {
+            newPosition = movingobjectposition.location;
         }
-        if(!world.isClientSide)
-        {
+        if (!this.world.isClientSide) {
             Entity entity = null;
-            List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.expand(xd, yd, zd).grow(1.0D, 1.0D, 1.0D));
+            AABBd r = MathHelper.aabbExpand(this.bb, this.xd, this.yd, this.zd, new AABBd());
+            MathHelper.aabbGrow(r, 1.0D, 1.0D, 1.0D, r);
+            List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, r);
             double d = 0.0D;
             for (Entity entity1 : list) {
-                if (!entity1.isPickable() || entity1 == owner && ticksInAir < 5) {
+                if (!entity1.isPickable() || entity1 == this.owner && this.ticksInAir < 5) {
                     continue;
                 }
                 float f4 = 0.3F;
-                AABB axisalignedbb = entity1.bb.grow(f4, f4, f4);
-                HitResult movingobjectposition1 = axisalignedbb.clip(oldPosition, newPosition);
-                if (movingobjectposition1 == null) {
+                AABBdc aabb = MathHelper.aabbGrow(entity1.bb, f4, f4, f4, new AABBd());
+                HitResult hitResult = MathHelper.aabbClip(aabb, oldPosition, newPosition);
+                if (hitResult == null) {
                     continue;
                 }
-                double d1 = oldPosition.distanceTo(movingobjectposition1.location);
+                double d1 = oldPosition.distance(hitResult.location);
                 if (d1 < d || d == 0.0D) {
                     entity = entity1;
                     d = d1;
                 }
             }
 
-            if(entity != null)
-            {
+            if (entity != null) {
                 movingobjectposition = new HitResult.Entity(entity);
             }
         }
-        if(movingobjectposition != null)
-        {
+        if (movingobjectposition != null) {
             onHit(movingobjectposition);
         }
         afterTick();
     }
-    public HitResult getHitResult(){
-        Vec3 oldPosition = Vec3.fromPool(x, y, z);
-        Vec3 newPosition = Vec3.fromPool(x + xd, y + yd, z + zd);
-        return world.checkBlockCollisionBetweenPoints(oldPosition, newPosition);
+
+    public HitResult getHitResult() {
+        Vector3d oldPosition = new Vector3d(this.x, this.y, this.z);
+        Vector3d newPosition = new Vector3d(this.x + this.xd, this.y + this.yd, this.z + this.zd);
+        return this.world.checkBlockCollisionBetweenPoints(oldPosition, newPosition);
     }
-    public void onHit(@NotNull HitResult hitResult){
-        if(hitResult instanceof HitResult.Entity hitEntity) {
-            hitEntity.entity.hurt(owner, damage, DamageType.COMBAT);
+
+    public void onHit(@NotNull HitResult hitResult) {
+        if (hitResult instanceof HitResult.Entity hitEntity) {
+            hitEntity.entity.hurt(this.owner, this.damage, DamageType.COMBAT);
         }
-        if (modelItem != null){
-            for(int j = 0; j < 8; j++)
-            {
-                world.spawnParticle("item", x, y, z, 0.0, 0.0D, 0.0D, modelItem.id);
+        if (this.modelItem != null) {
+            for (int j = 0; j < 8; j++) {
+                this.world.spawnParticle("item", this.x, this.y, this.z, 0.0, 0.0D, 0.0D, this.modelItem.id);
             }
         }
         remove();
     }
-    public void afterTick(){
-        x += xd;
-        y += yd;
-        z += zd;
-        float f = MathHelper.sqrt(xd * xd + zd * zd);
-        yRot = (float)((java.lang.Math.atan2(xd, zd) * 180D) / Math.PI);
-        xRot = (float)((Math.atan2(yd, f) * 180D) / Math.PI);
-        while (xRot - xRotO < -180F) {
-            xRotO -= 360F;
+
+    public void afterTick() {
+        this.x += this.xd;
+        this.y += this.yd;
+        this.z += this.zd;
+        float f = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+        this.yRot = (float) ((java.lang.Math.atan2(this.xd, this.zd) * 180D) / Math.PI);
+        this.xRot = (float) ((Math.atan2(this.yd, f) * 180D) / Math.PI);
+        while (this.xRot - this.xRotO < -180F) {
+            this.xRotO -= 360F;
         }
-        while (xRot - xRotO >= 180F) {
-            xRotO += 360F;
+        while (this.xRot - this.xRotO >= 180F) {
+            this.xRotO += 360F;
         }
-        while (yRot - yRotO < -180F) {
-            yRotO -= 360F;
+        while (this.yRot - this.yRotO < -180F) {
+            this.yRotO -= 360F;
         }
-        while (yRot - yRotO >= 180F) {
-            yRotO += 360F;
+        while (this.yRot - this.yRotO >= 180F) {
+            this.yRotO += 360F;
         }
-        xRot = xRotO + (xRot - xRotO) * 0.2F;
-        yRot = yRotO + (yRot - yRotO) * 0.2F;
-        if(isInWater())
-        {
+        this.xRot = this.xRotO + (this.xRot - this.xRotO) * 0.2F;
+        this.yRot = this.yRotO + (this.yRot - this.yRotO) * 0.2F;
+        if (isInWater()) {
             waterTick();
         }
-        xd *= projectileSpeed;
-        yd *= projectileSpeed;
-        zd *= projectileSpeed;
-        yd -= gravity;
-        setPos(x, y, z);
+        this.xd *= this.projectileSpeed;
+        this.yd *= this.projectileSpeed;
+        this.zd *= this.projectileSpeed;
+        this.yd -= this.gravity;
+        setPos(this.x, this.y, this.z);
     }
-    public void waterTick(){
-        for(int k = 0; k < 4; k++)
-        {
+
+    public void waterTick() {
+        for (int k = 0; k < 4; k++) {
             double particleDistance = 0.25F;
-            world.spawnParticle("bubble", x - xd * particleDistance, y - yd * particleDistance, z - zd * particleDistance, xd, yd, zd, 0);
+            this.world.spawnParticle("bubble", this.x - this.xd * particleDistance, this.y - this.yd * particleDistance, this.z - this.zd * particleDistance, this.xd, this.yd, this.zd, 0);
         }
 
-        projectileSpeed = 0.8F;
+        this.projectileSpeed = 0.8F;
     }
+
     @Override
-    public float getShadowHeightOffs()
-    {
+    public float getShadowHeightOffs() {
         return 0.0F;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileArrow.java b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileArrow.java
index 81aa3c093..01138b4ce 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileArrow.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileArrow.java
@@ -2,6 +2,7 @@ package net.minecraft.core.entity.projectile;
 
 import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.achievement.Achievements;
+import net.minecraft.core.block.Blocks;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.phys.HitResult;
@@ -10,26 +11,25 @@ import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.primitives.AABBdc;
 
-public class ProjectileArrow extends Projectile
-{
+public class ProjectileArrow extends Projectile {
     public static final int TYPE_NORMAL = 0;
     public static final int TYPE_PURPLE = 1;
     public static final int TYPE_GOLDEN = 2;
     protected int mobsHit = 0;
-    protected int xTile = -1;
-    protected int yTile = -1;
-    protected int zTile = -1;
-    protected int inTile = 0;
+    protected @Nullable TilePos tilePos = null;
+    protected @Nullable Block<?> inTile = null;
     public int shake = 0;
     protected int inData = 0;
     protected int arrowType;
     protected ItemStack stack = new ItemStack(Items.AMMO_ARROW);
-    
+
     /*
      * I have reverted these to not be synced in multiplayer,
      * because arrows shot into the ground by players were very jittery.
@@ -39,238 +39,221 @@ public class ProjectileArrow extends Projectile
     protected boolean inGround = false;
     protected boolean doesArrowBelongToPlayer = false;
 
-	public ProjectileArrow(World world) {
-		this(world, TYPE_NORMAL);
-	}
-	
-    public ProjectileArrow(World world, int arrowType)
-    {
+    public ProjectileArrow(@NotNull World world) {
+        this(world, TYPE_NORMAL);
+    }
+
+    public ProjectileArrow(@NotNull World world, int arrowType) {
         super(world);
         this.arrowType = arrowType;
     }
 
-    public ProjectileArrow(World world, double d, double d1, double d2, int arrowType)
-    {
-        super(world, d, d1, d2);
+    public ProjectileArrow(@NotNull World world, double x, double y, double z, int arrowType) {
+        super(world, x, y, z);
         this.arrowType = arrowType;
     }
 
-    public ProjectileArrow(World world, Mob entityliving, boolean doesArrowBelongToPlayer, int arrowType)
-    {
-        super(world, entityliving);
+    public ProjectileArrow(@NotNull World world, @NotNull Mob owner, boolean doesArrowBelongToPlayer, int arrowType) {
+        super(world, owner);
         setDoesArrowBelongToPlayer(doesArrowBelongToPlayer);
         this.arrowType = arrowType;
     }
 
     @Override
-	protected void initProjectile()
-    {
+    protected void initProjectile() {
         super.initProjectile();
-        damage = 5;
+        this.damage = 5;
     }
-    
+
     public void setDoesArrowBelongToPlayer(boolean flag) {
-    	this.doesArrowBelongToPlayer = flag;
+        this.doesArrowBelongToPlayer = flag;
     }
-    
+
     public boolean arrowBelongsToPlayer() {
-    	return doesArrowBelongToPlayer;
+        return this.doesArrowBelongToPlayer;
     }
-    
+
     public void setGrounded(boolean flag) {
-    	this.inGround = flag;
+        this.inGround = flag;
     }
-    
+
     public boolean isGrounded() {
-    	return inGround;
+        return this.inGround;
     }
-    
+
     @Override
-	public void lerpMotion(double xd, double yd, double zd)
-    {
+    public void lerpMotion(double xd, double yd, double zd) {
         this.xd = xd;
         this.yd = yd;
         this.zd = zd;
-        if(xRotO == 0.0F && yRotO == 0.0F)
-        {
+        if (this.xRotO == 0.0F && this.yRotO == 0.0F) {
             float f = MathHelper.sqrt(xd * xd + zd * zd);
-            yRot = (float) ((Math.atan2(xd, zd) * 180D) / Math.PI);
-            xRot = (float) ((Math.atan2(yd, f) * 180D) / Math.PI);
-            xRotO = xRot;
-            yRotO = yRot;
-            moveTo(x, y, z, yRot, xRot);
-            ticksInGround = 0;
+            this.yRot = (float) ((Math.atan2(xd, zd) * 180D) / Math.PI);
+            this.xRot = (float) ((Math.atan2(yd, f) * 180D) / Math.PI);
+            this.xRotO = this.xRot;
+            this.yRotO = this.yRot;
+            moveTo(this.x, this.y, this.z, this.yRot, this.xRot);
+            this.ticksInGround = 0;
         }
     }
 
     @Override
-	public void tick()
-    {
-        if(shake > 0)
-        {
-            shake--;
+    public void tick() {
+        if (this.shake > 0) {
+            this.shake--;
         }
-        if(xRotO == 0.0F && yRotO == 0.0F)
-        {
-            float f = MathHelper.sqrt(xd * xd + zd * zd);
-            yRotO = yRot = (float)((Math.atan2(xd, zd) * 180D) / Math.PI);
-            xRotO = xRot = (float)((Math.atan2(yd, f) * 180D) / Math.PI);
+        if (this.xRotO == 0.0F && this.yRotO == 0.0F) {
+            float f = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+            this.yRotO = this.yRot = (float) ((Math.atan2(this.xd, this.zd) * 180D) / Math.PI);
+            this.xRotO = this.xRot = (float) ((Math.atan2(this.yd, f) * 180D) / Math.PI);
         }
-        Block<?> block = world.getBlock(xTile, yTile, zTile);
-        if(block != null)
-        {
-            AABB aabb = block.getCollisionBoundingBoxFromPool(world, xTile, yTile, zTile);
-            if(aabb != null && aabb.contains(Vec3.fromPool(x, y, z)))
-            {
-                setGrounded(true);
+        if (this.tilePos != null) {
+            Block<?> block = this.world.getBlock(this.tilePos);
+            if (block != null) {
+                AABBdc aabb = block.getCollisionAABB(this.world, this.tilePos);
+                if (aabb != null && aabb.containsPoint(new Vector3d(this.x, this.y, this.z))) {
+                    setGrounded(true);
+                }
             }
         }
-        if(isGrounded())
-        {
-            int id = world.getBlockId(xTile, yTile, zTile);
-            int meta = world.getBlockMetadata(xTile, yTile, zTile);
-            if(id != inTile || meta != inData)
-            {
+        if (isGrounded() && this.tilePos != null) {
+            Block<?> b = this.world.getBlock(this.tilePos);
+            int meta = this.world.getBlockData(this.tilePos);
+            if (b != this.inTile || meta != this.inData) {
                 setGrounded(false);
-                xd *= random.nextFloat() * 0.2D;
-                yd *= random.nextFloat() * 0.2D;
-                zd *= random.nextFloat() * 0.2D;
-                ticksInGround = 0;
-                ticksInAir = 0;
+                this.xd *= this.random.nextFloat() * 0.2D;
+                this.yd *= this.random.nextFloat() * 0.2D;
+                this.zd *= this.random.nextFloat() * 0.2D;
+                this.ticksInGround = 0;
+                this.ticksInAir = 0;
                 return;
             }
-            ticksInGround++;
-            if(ticksInGround == 1200)
-            {
+            this.ticksInGround++;
+            if (this.ticksInGround == 1200) {
                 remove();
             }
             return;
-        }
-        else if(this instanceof ProjectileArrowGolden)
-        {
-            world.spawnParticle("arrowtrail", x, y, z, xd * 0.05D, yd * 0.05D - 0.1D, zd * 0.05D, 0);
-            world.spawnParticle("arrowtrail", x + xd * 0.5D, y + yd * 0.5D, z + zd * 0.5D, xd * 0.05D, yd * 0.05D - 0.1D, zd * 0.05D, 0);
+        } else if (this instanceof ProjectileArrowGolden) {
+            this.world.spawnParticle("arrowtrail", this.x, this.y, this.z, this.xd * 0.05D, this.yd * 0.05D - 0.1D, this.zd * 0.05D, 0);
+            this.world.spawnParticle("arrowtrail", this.x + this.xd * 0.5D, this.y + this.yd * 0.5D, this.z + this.zd * 0.5D, this.xd * 0.05D, this.yd * 0.05D - 0.1D, this.zd * 0.05D, 0);
         }
         super.tick();
     }
-    public HitResult getHitResult(){
-        Vec3 oldPosition = Vec3.fromPool(x, y, z);
-        Vec3 newPosition = Vec3.fromPool(x + xd, y + yd, z + zd);
-        return world.checkBlockCollisionBetweenPoints(oldPosition, newPosition, false, true, false);
+
+    public HitResult getHitResult() {
+        Vector3d oldPosition = new Vector3d(this.x, this.y, this.z);
+        Vector3d newPosition = new Vector3d(this.x + this.xd, this.y + this.yd, this.z + this.zd);
+        return this.world.checkBlockCollisionBetweenPoints(oldPosition, newPosition, false, true, false);
     }
-    public void onHit(@NotNull HitResult hitResult){
-        if(hitResult instanceof HitResult.Entity hitEntity)
-        {
-            if(hitEntity.entity.hurt(this.owner, damage, DamageType.COMBAT))
-            {
-                if(this.isOnFire())
+
+    public void onHit(@NotNull HitResult hitResult) {
+        if (hitResult instanceof HitResult.Entity hitEntity) {
+            if (hitEntity.entity.hurt(this.owner, this.damage, DamageType.COMBAT)) {
+                if (this.isOnFire())
                     hitEntity.entity.fireHurt();
-                if(!world.isClientSide) {
-                	world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (random.nextFloat() * 0.2F + 0.9F));
+                if (!this.world.isClientSide) {
+                    this.world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
                 }
-                if(!(this instanceof ProjectileArrowGolden))
-                {
+                if (!(this instanceof ProjectileArrowGolden)) {
                     remove();
                 } else {
-                    if (owner instanceof Player && ++mobsHit >= 3) {
-                        ((Player) owner).addStat(Achievements.TRIPLE_HIT, 1);
+                    if (this.owner instanceof Player && ++this.mobsHit >= 3) {
+                        ((Player) this.owner).addStat(Achievements.TRIPLE_HIT, 1);
                     }
                 }
-            } else if(!(this instanceof ProjectileArrowGolden))
-            {
-                xd *= -0.1D;
-                yd *= -0.1D;
-                zd *= -0.1D;
-                yRot += 180F;
-                yRotO += 180F;
-                ticksInAir = 0;
+            } else if (!(this instanceof ProjectileArrowGolden)) {
+                this.xd *= -0.1D;
+                this.yd *= -0.1D;
+                this.zd *= -0.1D;
+                this.yRot += 180F;
+                this.yRotO += 180F;
+                this.ticksInAir = 0;
             }
-        } else if (hitResult instanceof HitResult.Tile hitTile)
-        {
-            xTile = hitTile.tilePos.x;
-            yTile = hitTile.tilePos.y;
-            zTile = hitTile.tilePos.z;
-            inTile = world.getBlockId(hitTile.tilePos);
-            inData = world.getBlockData(hitTile.tilePos);
-            xd = (float)(hitResult.location.x - x);
-            yd = (float)(hitResult.location.y - y);
-            zd = (float)(hitResult.location.z - z);
-            float f1 = MathHelper.sqrt(xd * xd + yd * yd + zd * zd);
-            x -= (xd / (double)f1) * 0.05D;
-            y -= (yd / (double)f1) * 0.05D;
-            z -= (zd / (double)f1) * 0.05D;
+        } else if (hitResult instanceof HitResult.Tile hitTile) {
+            this.tilePos = new TilePos(hitTile.tilePos);
+            this.inTile = this.world.getBlock(hitTile.tilePos);
+            this.inData = this.world.getBlockData(hitTile.tilePos);
+            this.xd = (float) (hitResult.location.x() - this.x);
+            this.yd = (float) (hitResult.location.y() - this.y);
+            this.zd = (float) (hitResult.location.z() - this.z);
+            float f1 = MathHelper.sqrt(this.xd * this.xd + this.yd * this.yd + this.zd * this.zd);
+            this.x -= (this.xd / (double) f1) * 0.05D;
+            this.y -= (this.yd / (double) f1) * 0.05D;
+            this.z -= (this.zd / (double) f1) * 0.05D;
             inGroundAction();
         }
     }
-    
-    protected void inGroundAction()
-    {
-    	if(world.isClientSide) {
+
+    protected void inGroundAction() {
+        if (this.world.isClientSide) {
             setGrounded(true);
-            shake = 7;
+            this.shake = 7;
             return;
-    	}
+        }
         if (!arrowBelongsToPlayer()) {
-            world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (random.nextFloat() * 0.2F + 0.9F));
-            for(int j = 0; j < 4; j++)
-            {
-                world.spawnParticle("item", x, y, z, 0.0, 0.0D, 0.0D, Items.AMMO_ARROW.id);
+            this.world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
+            for (int j = 0; j < 4; j++) {
+                this.world.spawnParticle("item", this.x, this.y, this.z, 0.0, 0.0D, 0.0D, Items.AMMO_ARROW.id);
             }
             remove();
             return;
         }
-        world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (random.nextFloat() * 0.2F + 0.9F));
+        this.world.playSoundAtEntity(null, this, "random.drr", 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
         setGrounded(true);
-        shake = 7;
+        this.shake = 7;
     }
 
-    public int getArrowType(){
-        return arrowType;
+    public int getArrowType() {
+        return this.arrowType;
     }
 
     @Override
-	public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         super.addAdditionalSaveData(tag);
-        tag.putShort("xTile", (short) xTile);
-        tag.putShort("yTile", (short) yTile);
-        tag.putShort("zTile", (short) zTile);
-        tag.putShort("inTile", (short) inTile);
-        tag.putByte("shake", (byte) shake);
-        tag.putByte("inData", (byte) inData);
-        tag.putByte("inGround", (byte)(isGrounded() ? 1 : 0));
+        if (this.tilePos != null) {
+            tag.putInt("tilePosX", this.tilePos.x);
+            tag.putInt("tilePosY", this.tilePos.x);
+            tag.putInt("tilePosZ", this.tilePos.x);
+        }
+        if (this.inTile != null) {
+            tag.putShort("inTile", (short) this.inTile.id());
+        }
+        tag.putByte("shake", (byte) this.shake);
+        tag.putByte("inData", (byte) this.inData);
+        tag.putByte("inGround", (byte) (isGrounded() ? 1 : 0));
         tag.putBoolean("player", arrowBelongsToPlayer());
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         super.readAdditionalSaveData(tag);
-        xTile = tag.getShort("xTile");
-        yTile = tag.getShort("yTile");
-        zTile = tag.getShort("zTile");
-        inTile = tag.getShort("inTile") & 0x3fff;
-        shake = tag.getByte("shake") & 0xff;
-        inData = tag.getByte("inData") & 0xff;
+        if (tag.containsKey("xTile") && tag.containsKey("yTile") && tag.containsKey("zTile")) {
+            this.tilePos = new TilePos(tag.getShort("xTile"), tag.getShort("yTile"), tag.getShort("zTile"));
+        } else if (tag.containsKey("tilePosX") && tag.containsKey("tilePosY") && tag.containsKey("tilePosZ")) {
+            this.tilePos = new TilePos(tag.getInteger("tilePosX"), tag.getInteger("tilePosY"), tag.getInteger("tilePosZ"));
+        }
+
+        if (tag.containsKey("inTile")) {
+            this.inTile = Blocks.getBlock(tag.getShort("inTile") & 0x3fff);
+        }
+        this.shake = tag.getByte("shake") & 0xff;
+        this.inData = tag.getByte("inData") & 0xff;
         setGrounded(tag.getByte("inGround") == 1);
         setDoesArrowBelongToPlayer(tag.getBoolean("player"));
     }
 
     @Override
-	public void playerTouch(Player player)
-    {
-        if(world.isClientSide)
-        {
+    public void playerTouch(Player player) {
+        if (this.world.isClientSide) {
             return;
         }
-        if(isGrounded() && arrowBelongsToPlayer() && shake <= 0)
-        {
-        	player.inventory.insertItem(stack, true);
-        	if(stack.stackSize <= 0) {
-                world.playSoundAtEntity(player, this, "item.pickup", 1F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 4.0F);
-                player.onItemPickup(this, stack);
+        if (isGrounded() && arrowBelongsToPlayer() && this.shake <= 0) {
+            player.inventory.insertItem(this.stack, true);
+            if (this.stack.stackSize <= 0) {
+                this.world.playSoundAtEntity(player, this, "item.pickup", 1F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.0F) * 4.0F);
+                player.onItemPickup(this, this.stack);
                 remove();
-        	}
+            }
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileCannonballBouncy.java b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileCannonballBouncy.java
index cf88d93cd..214b20130 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileCannonballBouncy.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileCannonballBouncy.java
@@ -6,131 +6,122 @@ import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.Axis;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 
-public class ProjectileCannonballBouncy extends ProjectileCannonball
-{
+public class ProjectileCannonballBouncy extends ProjectileCannonball {
     private int fuse = 50;
 
-    public ProjectileCannonballBouncy(World world, Mob owner)
-    {
+    public ProjectileCannonballBouncy(World world, Mob owner) {
         super(world, owner);
-        x += xd;
-        y += yd;
-        z += zd;
-        setHeading(xd, yd, zd, 0.75F, 0.0F);
+        this.x += this.xd;
+        this.y += this.yd;
+        this.z += this.zd;
+        setHeading(this.xd, this.yd, this.zd, 0.75F, 0.0F);
         this.defaultGravity = 0.06f;
     }
 
-    public ProjectileCannonballBouncy(World world, double x, double y, double z)
-    {
+    public ProjectileCannonballBouncy(World world, double x, double y, double z) {
         super(world, x, y, z);
         this.defaultGravity = 0.06f;
     }
 
     @Override
-    public void tick()
-    {
+    public void tick() {
         baseTick();
-        if(xRotO == 0.0F && yRotO == 0.0F)
-        {
-            float f = MathHelper.sqrt(xd * xd + zd * zd);
-            yRotO = yRot = (float)((Math.atan2(xd, zd) * 180D) / Math.PI);
-            xRotO = xRot = (float)((Math.atan2(yd, f) * 180D) / Math.PI);
+        if (this.xRotO == 0.0F && this.yRotO == 0.0F) {
+            float f = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+            this.yRotO = this.yRot = (float) ((Math.atan2(this.xd, this.zd) * 180D) / Math.PI);
+            this.xRotO = this.xRot = (float) ((Math.atan2(this.yd, f) * 180D) / Math.PI);
         }
 
-        float velocity = MathHelper.sqrt(xd * xd + yd * yd + zd * zd);
+        float velocity = MathHelper.sqrt(this.xd * this.xd + this.yd * this.yd + this.zd * this.zd);
 
         // Check for block collision
-        Vec3 currentPos = Vec3.fromPool(x, y, z);
-        Vec3 nextPos = Vec3.fromPool(x + xd, y + yd - 0.25f, z + zd);
-        HitResult hit = world.checkBlockCollisionBetweenPoints(currentPos, nextPos, false, true, false);
-        if(hit != null)
-        {
-            if (hit instanceof HitResult.Tile hitTile)
-            {
+        Vector3dc currentPos = new Vector3d(this.x, this.y, this.z);
+        Vector3dc nextPos = new Vector3d(this.x + this.xd, this.y + this.yd - 0.25f, this.z + this.zd);
+        HitResult hit = this.world.checkBlockCollisionBetweenPoints(currentPos, nextPos, false, true, false);
+        if (hit != null) {
+            if (hit instanceof HitResult.Tile hitTile) {
                 float bounceAxisScale = 0.4f;
                 float otherAxisScale = 0.6f;
                 float minVelocity = 0.2f;
                 Side side = hitTile.side;
-                if (side == Side.TOP && (Math.abs(yd) < 0.25f || velocity < minVelocity))
-                {
-                    yd = 0f;
-                    y = hitTile.tilePos.y + 1f + 0.25f;
-                    xd = 0f;
-                    zd = 0f;
+                if (side == Side.TOP && (Math.abs(this.yd) < 0.25f || velocity < minVelocity)) {
+                    this.yd = 0f;
+                    this.y = hitTile.tilePos.y() + 1f + 0.25f;
+                    this.xd = 0f;
+                    this.zd = 0f;
                     return;
                 }
-                if (side.getAxis() == Axis.Y)
-                {
-                    yd = -yd * bounceAxisScale;
-                    xd *= otherAxisScale;
-                    zd *= otherAxisScale;
-                    world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
+                if (side.getAxis() == Axis.Y) {
+                    this.yd = -this.yd * bounceAxisScale;
+                    this.xd *= otherAxisScale;
+                    this.zd *= otherAxisScale;
+                    this.world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
                 }
-                if (side.getAxis() == Axis.X)
-                {
-                    xd = -xd * bounceAxisScale;
-                    yd *= otherAxisScale;
-                    zd *= otherAxisScale;
-                    world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
+                if (side.getAxis() == Axis.X) {
+                    this.xd = -this.xd * bounceAxisScale;
+                    this.yd *= otherAxisScale;
+                    this.zd *= otherAxisScale;
+                    this.world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
                 }
-                if (side.getAxis() == Axis.Z)
-                {
-                    zd = -zd * bounceAxisScale;
-                    xd *= otherAxisScale;
-                    yd *= otherAxisScale;
-                    world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
+                if (side.getAxis() == Axis.Z) {
+                    this.zd = -this.zd * bounceAxisScale;
+                    this.xd *= otherAxisScale;
+                    this.yd *= otherAxisScale;
+                    this.world.playSoundAtEntity(null, this, "random.explode", 0.25f * velocity, 2.0f);
                 }
             }
         }
 
         // Check for entity collision
-        List<Entity> collidingEntities = world.getEntitiesWithinAABBExcludingEntity(this, this.bb.cloneMove(xd, yd, zd));
-        if ((collidingEntities != null && collidingEntities.size() > 0) || fuse <= 0)
-        {
-            if (!((collidingEntities != null && collidingEntities.size() == 1) && collidingEntities.get(0) == owner && tickCount < 4))
-            {
-                world.createExplosion(owner, x, y + bbHeight/2, z, 1.5F, false, true);
+        List<Entity> collidingEntities = this.world.getEntitiesWithinAABBExcludingEntity(this, this.bb.translate(this.xd, this.yd, this.zd, new AABBd()));
+        if (!collidingEntities.isEmpty() || this.fuse <= 0) {
+            if (!(collidingEntities.size() == 1 && collidingEntities.get(0) == this.owner && this.tickCount < 4)) {
+                this.world.createExplosion(this.owner, this.x, this.y + this.bbHeight / 2, this.z, 1.5F, false, true);
                 remove();
                 return;
             }
         }
 
         // Update position
-        x += xd;
-        y += yd;
-        z += zd;
+        this.x += this.xd;
+        this.y += this.yd;
+        this.z += this.zd;
 
-        float velocityHorizontal = MathHelper.sqrt(xd * xd + zd * zd);
-        yRot = (float)((Math.atan2(xd, zd) * 180D) / Math.PI);
-        for(xRot = (float)((Math.atan2(yd, velocityHorizontal) * 180D) / Math.PI); xRot - xRotO < -180F; xRotO -= 360F) { }
-        for(; xRot - xRotO >= 180F; xRotO += 360F) { }
-        for(; yRot - yRotO < -180F; yRotO -= 360F) { }
-        for(; yRot - yRotO >= 180F; yRotO += 360F) { }
-        xRot = xRotO + (xRot - xRotO) * 0.2F;
-        yRot = yRotO + (yRot - yRotO) * 0.2F;
+        float velocityHorizontal = MathHelper.sqrt(this.xd * this.xd + this.zd * this.zd);
+        this.yRot = (float) ((Math.atan2(this.xd, this.zd) * 180D) / Math.PI);
+        for (this.xRot = (float) ((Math.atan2(this.yd, velocityHorizontal) * 180D) / Math.PI); this.xRot - this.xRotO < -180F; this.xRotO -= 360F) {
+        }
+        for (; this.xRot - this.xRotO >= 180F; this.xRotO += 360F) {
+        }
+        for (; this.yRot - this.yRotO < -180F; this.yRotO -= 360F) {
+        }
+        for (; this.yRot - this.yRotO >= 180F; this.yRotO += 360F) {
+        }
+        this.xRot = this.xRotO + (this.xRot - this.xRotO) * 0.2F;
+        this.yRot = this.yRotO + (this.yRot - this.yRotO) * 0.2F;
         float deceleration = 0.99F;
         float gravity = 0.06F;
-        if(isInWater())
-        {
-            for(int i = 0; i < 4; i++)
-            {
+        if (isInWater()) {
+            for (int i = 0; i < 4; i++) {
                 double particleDistance = 0.25D;
-                world.spawnParticle("bubble", x - xd * particleDistance, y - yd * particleDistance, z - zd * particleDistance, xd, yd, zd, 0);
+                this.world.spawnParticle("bubble", this.x - this.xd * particleDistance, this.y - this.yd * particleDistance, this.z - this.zd * particleDistance, this.xd, this.yd, this.zd, 0);
             }
 
             deceleration = 0.8F;
         }
-        world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
-        xd *= deceleration;
-        yd *= deceleration;
-        zd *= deceleration;
-        yd -= gravity;
-        setPos(x, y, z);
-        fuse--;
+        this.world.spawnParticle("largesmoke", this.x, this.y, this.z, 0.0D, 0.0D, 0.0D, 0);
+        this.xd *= deceleration;
+        this.yd *= deceleration;
+        this.zd *= deceleration;
+        this.yd -= gravity;
+        setPos(this.x, this.y, this.z);
+        this.fuse--;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileFireball.java b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileFireball.java
index 628d9bb1d..6455a3ec1 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileFireball.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/projectile/ProjectileFireball.java
@@ -5,132 +5,124 @@ import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.monster.MobGhast;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
 import net.minecraft.core.util.helper.DamageType;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3dc;
 
-public class ProjectileFireball extends Projectile
-{
+public class ProjectileFireball extends Projectile {
     public static final double FIREBALL_SPEED = 1d;
 
-    public ProjectileFireball(World world)
-    {
+    public ProjectileFireball(World world) {
         super(world);
         setSize(1.0F, 1.0F);
     }
 
     public ProjectileFireball(World world, double x, double y, double z,
-                              double vX, double vY, double vZ)
-    {
+                              double vX, double vY, double vZ) {
         super(world);
         setSize(1.0F, 1.0F);
-        moveTo(x, y, z, yRot, xRot);
+        moveTo(x, y, z, this.yRot, this.xRot);
         setPos(x, y, z);
         setVelocity(vX, vY, vZ, FIREBALL_SPEED);
     }
-    public ProjectileFireball(World world, Mob owner, double vX, double vY, double vZ)
-    {
+
+    public ProjectileFireball(World world, Mob owner, double vX, double vY, double vZ) {
         super(world);
         setSize(1.0F, 1.0F);
         moveTo(owner.x, owner.y, owner.z, owner.yRot, owner.xRot);
-        setPos(x, y, z);
+        setPos(this.x, this.y, this.z);
         this.owner = owner;
-        heightOffset = 0.0F;
-        vX += (random.nextGaussian() - random.nextGaussian()) * 0.8D;
-        vY += (random.nextGaussian()) * 0.4D;
-        vZ += (random.nextGaussian() - random.nextGaussian()) * 0.8D;
+        this.heightOffset = 0.0F;
+        vX += (this.random.nextGaussian() - this.random.nextGaussian()) * 0.8D;
+        vY += (this.random.nextGaussian()) * 0.4D;
+        vZ += (this.random.nextGaussian() - this.random.nextGaussian()) * 0.8D;
         setVelocity(vX, vY, vZ, FIREBALL_SPEED);
     }
-    private void setVelocity(double vX, double vY, double vZ, double speed){
+
+    private void setVelocity(double vX, double vY, double vZ, double speed) {
         double velocity = MathHelper.sqrt(vX * vX + vY * vY + vZ * vZ);
-        if (velocity != 0){
-            xd = (vX / velocity) * speed;
-            yd = (vY / velocity) * speed;
-            zd = (vZ / velocity) * speed;
+        if (velocity != 0) {
+            this.xd = (vX / velocity) * speed;
+            this.yd = (vY / velocity) * speed;
+            this.zd = (vZ / velocity) * speed;
         } else {
-            xd = 0;
-            yd = 0;
-            zd = 0;
+            this.xd = 0;
+            this.yd = 0;
+            this.zd = 0;
         }
     }
 
     @Override
-    protected void initProjectile()
-    {
-        damage = 0;
-        defaultGravity = 0.00f;
-        defaultProjectileSpeed = 1f;
+    protected void initProjectile() {
+        this.damage = 0;
+        this.defaultGravity = 0.00f;
+        this.defaultProjectileSpeed = 1f;
     }
+
     @Override
-	public void tick()
-    {
-        remainingFireTicks = 10;
-        world.spawnParticle("flame", x, y, z, xd * 0.05D, yd * 0.05D - 0.1D, zd * 0.05D, 0);
-        world.spawnParticle("flame", x + xd * 0.5D, y + yd * 0.5D, z + zd * 0.5D, xd * 0.05D, yd * 0.05D - 0.1D, zd * 0.05D, 0);
+    public void tick() {
+        this.remainingFireTicks = 10;
+        this.world.spawnParticle("flame", this.x, this.y, this.z, this.xd * 0.05D, this.yd * 0.05D - 0.1D, this.zd * 0.05D, 0);
+        this.world.spawnParticle("flame", this.x + this.xd * 0.5D, this.y + this.yd * 0.5D, this.z + this.zd * 0.5D, this.xd * 0.05D, this.yd * 0.05D - 0.1D, this.zd * 0.05D, 0);
         super.tick();
     }
-    public void onHit(@NotNull HitResult result){
-        if (tickCount > 5){
-            if(!world.isClientSide)
-            {
-                if(result instanceof HitResult.Entity hitEntity)
-                {
-                    if (hitEntity.entity instanceof MobGhast){
-                        hitEntity.entity.hurt(owner, 20, DamageType.COMBAT);
+
+    public void onHit(@NotNull HitResult result) {
+        if (this.tickCount > 5) {
+            if (!this.world.isClientSide) {
+                if (result instanceof HitResult.Entity hitEntity) {
+                    if (hitEntity.entity instanceof MobGhast) {
+                        hitEntity.entity.hurt(this.owner, 20, DamageType.COMBAT);
                     } else {
-                        hitEntity.entity.hurt(owner, damage, DamageType.COMBAT);
+                        hitEntity.entity.hurt(this.owner, this.damage, DamageType.COMBAT);
                     }
-                    if (hitEntity.entity instanceof Mob && owner instanceof Player) {
-                        ((Player) owner).addStat(Achievements.HIT_FIREBALL, 1);
+                    if (hitEntity.entity instanceof Mob && this.owner instanceof Player player) {
+                        player.addStat(Achievements.HIT_FIREBALL, 1);
                     }
                 }
-                world.createExplosion(owner, x, y + bbHeight/2, z, 1.5F, true, false);
+                this.world.createExplosion(this.owner, this.x, this.y + this.bbHeight / 2, this.z, 1.5F, true, false);
             }
             remove();
         }
     }
-    public void afterTick(){
+
+    public void afterTick() {
         super.afterTick();
-        world.spawnParticle("largesmoke", x, y, z, 0.0D, 0.0D, 0.0D, 0);
+        this.world.spawnParticle("largesmoke", this.x, this.y, this.z, 0.0D, 0.0D, 0.0D, 0);
     }
 
     @Override
-	public boolean isPickable()
-    {
+    public boolean isPickable() {
         return true;
     }
 
     @Override
-	public float getPickRadius()
-    {
+    public float getPickRadius() {
         return 1f;
     }
+
     @Override
-    public boolean hurt(Entity entity, int i, DamageType type)
-    {
+    public boolean hurt(Entity entity, int i, DamageType type) {
         markHurt();
-        if(entity != null)
-        {
-            Vec3 lookAngle = entity.getViewVector(1);
-            if (entity instanceof Mob){
+        if (entity != null) {
+            Vector3dc lookAngle = entity.getViewVector(1);
+            if (entity instanceof Mob) {
                 this.owner = (Mob) entity;
             }
-            if(lookAngle != null)
-            {
-                setVelocity(lookAngle.x, lookAngle.y, lookAngle.z, FIREBALL_SPEED);
+            if (lookAngle != null) {
+                setVelocity(lookAngle.x(), lookAngle.y(), lookAngle.z(), FIREBALL_SPEED);
             }
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
+
     @Override
-    public void lerpMotion(double xd, double yd, double zd)
-    {
+    public void lerpMotion(double xd, double yd, double zd) {
         this.xd = xd;
         this.yd = yd;
         this.zd = zd;
diff --git a/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityBoat.java b/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityBoat.java
index 2553bf9ae..e2873835b 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityBoat.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityBoat.java
@@ -4,7 +4,7 @@ import com.mojang.nbt.tags.CompoundTag;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntityFlag;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
@@ -15,14 +15,15 @@ import net.minecraft.core.util.helper.BlockParticleHelper;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 
-public class EntityBoat extends Entity
-{
+public class EntityBoat extends Entity {
     private static final double MAX_BOAT_SPEED = 0.8D;
     private static final double ACCELERATION = 0.0065D;
     private static final float MAX_ROTATION_SPEED = 5f;
@@ -48,104 +49,90 @@ public class EntityBoat extends Entity
     public TileEntityFlag tileEntityFlag = null;
 
 
-    public EntityBoat(World world)
-    {
+    public EntityBoat(World world) {
         super(world);
-        boatCurrentDamage = 0;
-        boatTimeSinceHit = 0;
-        boatRockDirection = 1;
-        blocksBuilding = true;
+        this.boatCurrentDamage = 0;
+        this.boatTimeSinceHit = 0;
+        this.boatRockDirection = 1;
+        this.blocksBuilding = true;
         setSize(1.5F, 0.6F);
-        heightOffset = bbHeight / 2.0F;
-        sendAdditionalData = true;
+        this.heightOffset = this.bbHeight / 2.0F;
+        this.sendAdditionalData = true;
     }
 
-    private void createTileEntity()
-    {
+    private void createTileEntity() {
         if (this.flag == null) return;
         this.tileEntityFlag = new TileEntityFlag();
         CompoundTag flagData = this.flag.getData().getCompoundOrDefault("FlagData", null);
-        if (flagData != null)
-        {
+        if (flagData != null) {
             this.tileEntityFlag.readAdditionalData(flagData);
         }
     }
 
     @Override
-	protected boolean makeStepSound()
-    {
+    protected boolean makeStepSound() {
         return false;
     }
 
     @Override
-	protected void defineSynchedData()
-    {
+    protected void defineSynchedData() {
     }
 
     @Override
-	public AABB getBb()
-    {
-        return bb;
+    public @Nullable AABBdc getCollisionAABB() {
+        return this.bb;
     }
 
     @Override
-	public boolean isPushable()
-    {
+    public boolean isPushable() {
         return true;
     }
 
-    public EntityBoat(World world, double d, double d1, double d2)
-    {
+    public EntityBoat(@NotNull World world, double x, double y, double z) {
         this(world);
-        setPos(d, d1 + (double) heightOffset, d2);
-        xd = 0.0D;
-        yd = 0.0D;
-        zd = 0.0D;
-        xo = d;
-        yo = d1;
-        zo = d2;
+        setPos(x, y + (double) this.heightOffset, z);
+        this.xd = 0.0D;
+        this.yd = 0.0D;
+        this.zd = 0.0D;
+        this.xo = x;
+        this.yo = y;
+        this.zo = z;
     }
 
     @Override
-	public double getRideHeight()
-    {
-        return (double) bbHeight * 0.0D - 0.3D;
+    public double getRideHeight() {
+        return (double) this.bbHeight * 0.0D - 0.3D;
     }
+
     @Override
-    public boolean hurt(Entity entity, int i, DamageType type)
-    {
-        int numParticles = random.nextInt(8) + 1;
-        for (int q = 0; q < numParticles; q++)
-        {
-            world.spawnParticle("block", x, y, z, xd, yd, zd, BlockParticleHelper.encodeBlockData(Blocks.PLANKS_OAK.id(), 0, Side.BOTTOM));
+    public boolean hurt(Entity entity, int i, DamageType type) {
+        int numParticles = this.random.nextInt(8) + 1;
+        for (int q = 0; q < numParticles; q++) {
+            this.world.spawnParticle("block", this.x, this.y, this.z, this.xd, this.yd, this.zd, BlockParticleHelper.encodeBlockData(Blocks.PLANKS_OAK.id(), 0, Side.BOTTOM));
         }
-        if(world.isClientSide || removed)
-        {
+        if (this.world.isClientSide || this.removed) {
             return true;
         }
-        if(entity instanceof Player) {
-        	if(((Player) entity).getGamemode() == Gamemode.creative) {
-        		remove();
-                if (this.flag != null)
-                {
+        if (entity instanceof Player player) {
+            if (player.getGamemode() == Gamemode.creative) {
+                remove();
+                if (this.flag != null) {
                     dropItem(this.flag.copy(), 0.0F);
                 }
                 return true;
-        	}
+            }
         }
-        boatRockDirection = -boatRockDirection;
-        boatTimeSinceHit = 10;
-        boatCurrentDamage += i * 10;
+        this.boatRockDirection = -this.boatRockDirection;
+        this.boatTimeSinceHit = 10;
+        this.boatCurrentDamage += i * 10;
         markHurt();
-        if(boatCurrentDamage > 40)
-        {
-            if(passenger != null)
-            {
-                passenger.startRiding(this);
+        if (this.boatCurrentDamage > 40) {
+            if (this.passenger != null) {
+                this.passenger.startRiding(this);
             }
-            if(entity instanceof Player){
+            if (entity instanceof Player) {
                 dropItem(Items.BOAT.id, 1, 0.0F);
-            }else {
+            } else {
                 for (int j = 0; j < 3; j++) {
                     dropItem(Blocks.PLANKS_OAK.id(), 1, 0.0F);
                 }
@@ -154,8 +141,7 @@ public class EntityBoat extends Entity
                     dropItem(Items.STICK.id, 1, 0.0F);
                 }
             }
-            if (this.flag != null)
-            {
+            if (this.flag != null) {
                 dropItem(this.flag.copy(), 0.0F);
             }
 
@@ -165,12 +151,12 @@ public class EntityBoat extends Entity
     }
 
     @Override
-    public void remove(){
-        Entity entity = passenger;
+    public void remove() {
+        Entity entity = this.passenger;
 
-        if (entity != null){
-            double bbCenterX = (bb.minX + bb.maxX)/2;
-            double bbCenterZ = (bb.minZ + bb.maxZ)/2;
+        if (entity != null) {
+            double bbCenterX = (this.bb.minX + this.bb.maxX) / 2;
+            double bbCenterZ = (this.bb.minZ + this.bb.maxZ) / 2;
 
             this.passenger = null;
             entity.vehicle = null;
@@ -181,166 +167,148 @@ public class EntityBoat extends Entity
     }
 
     @Override
-	public void animateHurt()
-    {
-        boatRockDirection = -boatRockDirection;
-        boatTimeSinceHit = 10;
-        boatCurrentDamage += boatCurrentDamage * 10;
+    public void animateHurt() {
+        this.boatRockDirection = -this.boatRockDirection;
+        this.boatTimeSinceHit = 10;
+        this.boatCurrentDamage += this.boatCurrentDamage * 10;
     }
 
     @Override
-	public boolean isPickable()
-    {
-        return !removed;
+    public boolean isPickable() {
+        return !this.removed;
     }
 
     @Override
-	public void lerpTo(double x, double y, double z, float yRot,
-                       float xRot, int i)
-    {
-        lerpX = x;
-        lerpY = y;
-        lerpZ = z;
-        boatPitch = xRot;
-        lerpTicks = i;
+    public void lerpTo(double x, double y, double z, float yRot,
+                       float xRot, int i) {
+        this.lerpX = x;
+        this.lerpY = y;
+        this.lerpZ = z;
+        this.boatPitch = xRot;
+        this.lerpTicks = i;
         // Don't interpolate velocity from server when controlling the boat
-        if (passenger != null && !passenger.lerpVehicleMotion()) return;
-        lerpYRot = yRot;
-        xd = velocityX;
-        yd = velocityY;
-        zd = velocityZ;
+        if (this.passenger != null && !this.passenger.lerpVehicleMotion()) return;
+        this.lerpYRot = yRot;
+        this.xd = this.velocityX;
+        this.yd = this.velocityY;
+        this.zd = this.velocityZ;
     }
 
     @Override
-	public void lerpMotion(double xd, double yd, double zd)
-    {
+    public void lerpMotion(double xd, double yd, double zd) {
         // Don't interpolate velocity from server when controlling the boat
-        if (passenger != null && !passenger.lerpVehicleMotion()) return;
-        velocityX = this.xd = xd;
-        velocityY = this.yd = yd;
-        velocityZ = this.zd = zd;
+        if (this.passenger != null && !this.passenger.lerpVehicleMotion()) return;
+        this.velocityX = this.xd = xd;
+        this.velocityY = this.yd = yd;
+        this.velocityZ = this.zd = zd;
     }
+
     @Override
-	public void tick()
-    {
-        setRot(yRot, xRot);
+    public void tick() {
+        setRot(this.yRot, this.xRot);
         super.tick();
-        if(boatTimeSinceHit > 0)
-        {
-            boatTimeSinceHit--;
+        if (this.boatTimeSinceHit > 0) {
+            this.boatTimeSinceHit--;
         }
-        if(boatCurrentDamage > 0)
-        {
-            boatCurrentDamage--;
+        if (this.boatCurrentDamage > 0) {
+            this.boatCurrentDamage--;
         }
-        xo = x;
-        yo = y;
-        zo = z;
+        this.xo = this.x;
+        this.yo = this.y;
+        this.zo = this.z;
         final int waterSections = 5;
         double bouyancy = 0.0D;
         boolean inWater = false;
-        for(int i = 0; i < waterSections; i++) // Splits the boat into individual sections to measure how submerged it is, 1 being fully submerged, 0 being fully exposed
+        for (int i = 0; i < waterSections; i++) // Splits the boat into individual sections to measure how submerged it is, 1 being fully submerged, 0 being fully exposed
         {
-            double minY = (bb.minY + ((bb.maxY - bb.minY) * (double)(i)) / (double)waterSections) - 0.125D;
-            double maxY = (bb.minY + ((bb.maxY - bb.minY) * (double)(i + 1)) / (double)waterSections) - 0.125D;
-            AABB axisalignedbb = AABB.fromPool(bb.minX, minY, bb.minZ, bb.maxX, maxY, bb.maxZ);
-            if(world.isAABBInMaterial(axisalignedbb, Material.water))
-            {
-                bouyancy += 1.0D / (double)waterSections;
+            double minY = (this.bb.minY + ((this.bb.maxY - this.bb.minY) * (double) (i)) / (double) waterSections) - 0.125D;
+            double maxY = (this.bb.minY + ((this.bb.maxY - this.bb.minY) * (double) (i + 1)) / (double) waterSections) - 0.125D;
+            AABBdc aabb = new AABBd(this.bb.minX, minY, this.bb.minZ, this.bb.maxX, maxY, this.bb.maxZ);
+            if (this.world.isAABBInMaterial(aabb, Materials.WATER)) {
+                bouyancy += 1.0D / (double) waterSections;
                 inWater = true;
             }
         }
 
-        if(world.isClientSide)
-        {
-            if(lerpTicks > 0)
-            {
-                double lerpX = x + (this.lerpX - x) / (double) lerpTicks;
-                double lerpY = y + (this.lerpY - y) / (double) lerpTicks;
-                double lerpZ = z + (this.lerpZ - z) / (double) lerpTicks;
-                xRot += (boatPitch - xRot) / lerpTicks;
-                if (passenger == null || passenger.lerpVehicleMotion()){
+        if (this.world.isClientSide) {
+            if (this.lerpTicks > 0) {
+                double lerpX = this.x + (this.lerpX - this.x) / (double) this.lerpTicks;
+                double lerpY = this.y + (this.lerpY - this.y) / (double) this.lerpTicks;
+                double lerpZ = this.z + (this.lerpZ - this.z) / (double) this.lerpTicks;
+                this.xRot += (this.boatPitch - this.xRot) / this.lerpTicks;
+                if (this.passenger == null || this.passenger.lerpVehicleMotion()) {
                     float lerpYRot;
-                    lerpYRot = MathHelper.normalizeRotation(this.lerpYRot - yRot);
-                    yRot += lerpYRot / lerpTicks;
+                    lerpYRot = MathHelper.normalizeRotation(this.lerpYRot - this.yRot);
+                    this.yRot += lerpYRot / this.lerpTicks;
                 }
-                lerpTicks--;
+                this.lerpTicks--;
                 setPos(lerpX, lerpY, lerpZ);
             }
             boatMovement();
-            move(xd , yd, zd);
-            setRot(yRot, xRot);
-            xd *= 0.99D;
-            yd *= 0.95D;
-            zd *= 0.99D;
+            move(this.xd, this.yd, this.zd);
+            setRot(this.yRot, this.xRot);
+            this.xd *= 0.99D;
+            this.yd *= 0.95D;
+            this.zd *= 0.99D;
             return;
         }
-        if(bouyancy < 1.0D)
-        {
-            yd += 0.04D * (bouyancy * 2D - 1.0D);
-        } else
-        {
-            if(yd < 0.0D)
-            {
-                yd /= 2D;
+        if (bouyancy < 1.0D) {
+            this.yd += 0.04D * (bouyancy * 2D - 1.0D);
+        } else {
+            if (this.yd < 0.0D) {
+                this.yd /= 2D;
             }
-            yd += 0.007D;
+            this.yd += 0.007D;
         }
 
         boatMovement();
 
-        if (passenger == null){
-            float nextYRot = yRot;
-            if(Math.hypot(xd, zd) > 0.001D)
-            {
-                nextYRot = (float)Math.toDegrees(Math.atan2(zd, xd)) + 180;
+        if (this.passenger == null) {
+            float nextYRot = this.yRot;
+            if (Math.hypot(this.xd, this.zd) > 0.001D) {
+                nextYRot = (float) Math.toDegrees(Math.atan2(this.zd, this.xd)) + 180;
             }
             float changeInYRot;
-            changeInYRot = MathHelper.normalizeRotation(nextYRot - yRot);
+            changeInYRot = MathHelper.normalizeRotation(nextYRot - this.yRot);
             changeInYRot = MathHelper.clamp(changeInYRot, -20F, 20F);
-            yRot = MathHelper.normalizeRotation(yRot + changeInYRot);
-            setRot(yRot, xRot);
+            this.yRot = MathHelper.normalizeRotation(this.yRot + changeInYRot);
+            setRot(this.yRot, this.xRot);
         }
 
-        move(xd, yd, zd);
-        double horizontalSpeed = Math.sqrt(xd * xd + zd * zd);
-        if(inWater && horizontalSpeed > 0.15D)
-        {
-            double d12 = Math.cos(((double) yRot * Math.PI) / 180D);
-            double d15 = Math.sin(((double) yRot * Math.PI) / 180D);
-            for(int i1 = 0; (double)i1 < 1.0D + horizontalSpeed * 60D; i1++)
-            {
-                double d18 = random.nextFloat() * 2.0F - 1.0F;
-                double d20 = (double)(random.nextInt(2) * 2 - 1) * 0.6D;
-                if(random.nextBoolean())
-                {
-                    double posX = (x - d12 * d18 * 0.8D) + d15 * d20;
-                    double posZ = z - d15 * d18 * 0.8D - d12 * d20;
-                    world.spawnParticle("splash", posX, y - 0.125D, posZ, xd, yd, zd, 0);
-                } else
-                {
-                    double posX = x + d12 + d15 * d18 * 0.7D;
-                    double posZ = (z + d15) - d12 * d18 * 0.7D;
-                    world.spawnParticle("splash", posX, y - 0.125D, posZ, xd, yd, zd, 0);
+        move(this.xd, this.yd, this.zd);
+        double horizontalSpeed = Math.sqrt(this.xd * this.xd + this.zd * this.zd);
+        if (inWater && horizontalSpeed > 0.15D) {
+            double d12 = Math.cos(((double) this.yRot * Math.PI) / 180D);
+            double d15 = Math.sin(((double) this.yRot * Math.PI) / 180D);
+            for (int i1 = 0; (double) i1 < 1.0D + horizontalSpeed * 60D; i1++) {
+                double d18 = this.random.nextFloat() * 2.0F - 1.0F;
+                double d20 = (double) (this.random.nextInt(2) * 2 - 1) * 0.6D;
+                if (this.random.nextBoolean()) {
+                    double posX = (this.x - d12 * d18 * 0.8D) + d15 * d20;
+                    double posZ = this.z - d15 * d18 * 0.8D - d12 * d20;
+                    this.world.spawnParticle("splash", posX, this.y - 0.125D, posZ, this.xd, this.yd, this.zd, 0);
+                } else {
+                    double posX = this.x + d12 + d15 * d18 * 0.7D;
+                    double posZ = (this.z + d15) - d12 * d18 * 0.7D;
+                    this.world.spawnParticle("splash", posX, this.y - 0.125D, posZ, this.xd, this.yd, this.zd, 0);
                 }
             }
 
         }
 
-        if (passenger == null || !passenger.deferVehicleBehavior()){
-            xd *= 0.99D;
-            yd *= 0.95D;
-            zd *= 0.99D;
+        if (this.passenger == null || !this.passenger.deferVehicleBehavior()) {
+            this.xd *= 0.99D;
+            this.yd *= 0.95D;
+            this.zd *= 0.99D;
         }
 
-        xRot = 0.0F;
+        this.xRot = 0.0F;
 
         // Push entities in bounding box
-        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.grow(0.2D, 0.0D, 0.2D));
-        if(list != null && !list.isEmpty())
-        {
+        List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, MathHelper.aabbGrow(this.bb, 0.2D, 0.0D, 0.2D, new AABBd()));
+        if (!list.isEmpty()) {
             for (Entity entity : list) {
-                if (entity != passenger && entity.isPushable() && (entity instanceof EntityBoat)) {
+                if (entity != this.passenger && entity.isPushable() && (entity instanceof EntityBoat)) {
                     entity.push(this);
                 }
             }
@@ -348,114 +316,107 @@ public class EntityBoat extends Entity
         }
 
         // Break snow layers on the ground
-        for(int i = 0; i < 4; i++)
-        {
-            int blockX = MathHelper.floor(x + ((double)(i % 2) - 0.5D) * 0.8D);
-            int blockY = MathHelper.floor(y);
-            int blockZ = MathHelper.floor(z + ((double)(i / 2) - 0.5D) * 0.8D);
-            Block<?> block = world.getBlock(blockX, blockY, blockZ);
-            if(block != null && block.hasTag(BlockTags.BOAT_BREAKS))
-            {
-                world.setBlockWithNotify(blockX, blockY, blockZ, 0);
+        for (int i = 0; i < 4; i++) {
+            int blockX = MathHelper.floor(this.x + ((double) (i % 2) - 0.5D) * 0.8D);
+            int blockY = MathHelper.floor(this.y);
+            int blockZ = MathHelper.floor(this.z + ((double) (i / 2) - 0.5D) * 0.8D);
+            Block<?> block = this.world.getBlock(blockX, blockY, blockZ);
+            if (block != null && block.hasTag(BlockTags.BOAT_BREAKS)) {
+                this.world.setBlockWithNotify(blockX, blockY, blockZ, 0);
             }
         }
 
         // Remove passenger is passenger removal is queued
-        if(passenger != null && passenger.removed)
-        {
-            passenger = null;
+        if (this.passenger != null && this.passenger.removed) {
+            this.passenger = null;
         }
     }
-    public void boatMovement(){
-        double boatRad = Math.toRadians(yRot + 90);
-        double vectorRad = Math.atan2(xd, zd);
+
+    public void boatMovement() {
+        double boatRad = Math.toRadians(this.yRot + 90);
+        double vectorRad = Math.atan2(this.xd, this.zd);
         double currentBoatSpeed;
-        if (passenger != null){
+        if (this.passenger != null) {
             boolean isBackwards = Math.cos(-boatRad - vectorRad) < 0;
             double ang = vectorRad + boatRad + (isBackwards ? Math.PI : 0);
 
-            double _xd = xd;
-            xd = _xd * Math.cos(ang) - zd * Math.sin(ang);
-            zd = _xd * Math.sin(ang) + zd * Math.cos(ang);
+            double _xd = this.xd;
+            this.xd = _xd * Math.cos(ang) - this.zd * Math.sin(ang);
+            this.zd = _xd * Math.sin(ang) + this.zd * Math.cos(ang);
         }
 
         double xdOff;
         double zdOff;
-        currentBoatSpeed = Math.hypot(xd, zd);
-        if(passenger != null) {
-            passenger.handleSpecialVehicleControl();
+        currentBoatSpeed = Math.hypot(this.xd, this.zd);
+        if (this.passenger != null) {
+            this.passenger.handleSpecialVehicleControl();
         }
-        yRot += pendingYRot;
-        pendingYRot = 0;
-        xdOff = pendingXDChange;
-        zdOff = pendingZDChange;
-        pendingXDChange = 0;
-        pendingZDChange = 0;
+        this.yRot += this.pendingYRot;
+        this.pendingYRot = 0;
+        xdOff = this.pendingXDChange;
+        zdOff = this.pendingZDChange;
+        this.pendingXDChange = 0;
+        this.pendingZDChange = 0;
 
         double offsetMagnitude = Math.hypot(xdOff, zdOff);
-        double vecAngle = Math.acos((xd * xdOff + zd * zdOff)/ ((currentBoatSpeed + 0.00000000001D) * (offsetMagnitude + 0.00000000001D)));
-        double multiplier = (1 + (vecAngle/Math.PI)); // Increase acceleration if it runs opposite to the current motion vector
+        double vecAngle = Math.acos((this.xd * xdOff + this.zd * zdOff) / ((currentBoatSpeed + 0.00000000001D) * (offsetMagnitude + 0.00000000001D)));
+        double multiplier = (1 + (vecAngle / Math.PI)); // Increase acceleration if it runs opposite to the current motion vector
         xdOff *= multiplier;
         zdOff *= multiplier;
 
 //        System.out.printf("%f %f\n", xdOff, zdOff);
 
-        xd += xdOff;
-        zd += zdOff;
+        this.xd += xdOff;
+        this.zd += zdOff;
 
-        if(passenger != null) {
-            passenger.sendSpecialVehiclePacket();
+        if (this.passenger != null) {
+            this.passenger.sendSpecialVehiclePacket();
         }
 
         // Cap max speed properly
-        currentBoatSpeed = Math.hypot(xd, zd);
-        if (currentBoatSpeed > MAX_BOAT_SPEED){
-            xd = xd/currentBoatSpeed * MAX_BOAT_SPEED;
-            zd = zd/currentBoatSpeed * MAX_BOAT_SPEED;
+        currentBoatSpeed = Math.hypot(this.xd, this.zd);
+        if (currentBoatSpeed > MAX_BOAT_SPEED) {
+            this.xd = this.xd / currentBoatSpeed * MAX_BOAT_SPEED;
+            this.zd = this.zd / currentBoatSpeed * MAX_BOAT_SPEED;
         }
 
-        if(onGround)
-        {
-            xd *= 0.5D;
-            yd *= 0.5D;
-            zd *= 0.5D;
+        if (this.onGround) {
+            this.xd *= 0.5D;
+            this.yd *= 0.5D;
+            this.zd *= 0.5D;
         }
     }
 
-    public void controlBoat(float forward, float strafe){
-        double currentBoatSpeed = Math.hypot(xd, zd);
-        pendingYRot = (float) (strafe * (MIN_ROTATION_SPEED + (MAX_ROTATION_SPEED - MIN_ROTATION_SPEED) * Math.max(((MAX_BOAT_SPEED - (currentBoatSpeed * 1.5))/ MAX_BOAT_SPEED), 0))); // I love interpolation
+    public void controlBoat(float forward, float strafe) {
+        double currentBoatSpeed = Math.hypot(this.xd, this.zd);
+        this.pendingYRot = (float) (strafe * (MIN_ROTATION_SPEED + (MAX_ROTATION_SPEED - MIN_ROTATION_SPEED) * Math.max(((MAX_BOAT_SPEED - (currentBoatSpeed * 1.5)) / MAX_BOAT_SPEED), 0))); // I love interpolation
         float velOff = (float) (forward * ACCELERATION);
-        pendingXDChange = Math.cos(Math.toRadians(yRot)) * velOff;
-        pendingZDChange = Math.sin(Math.toRadians(yRot)) * velOff;
+        this.pendingXDChange = Math.cos(Math.toRadians(this.yRot)) * velOff;
+        this.pendingZDChange = Math.sin(Math.toRadians(this.yRot)) * velOff;
     }
 
-    public void handleControlDirect(float xd, float zd, float yRot){
+    public void handleControlDirect(float xd, float zd, float yRot) {
         this.yRot = (float) MathHelper.clamp(yRot, this.yRot - MAX_PACKET_ROTATION_CHANGE, this.yRot + MAX_PACKET_ROTATION_CHANGE);
         this.xd = MathHelper.clamp(xd, this.xd - MAX_PACKET_SPEED_CHANGE, this.xd + MAX_PACKET_SPEED_CHANGE);
         this.zd = MathHelper.clamp(zd, this.zd - MAX_PACKET_SPEED_CHANGE, this.zd + MAX_PACKET_SPEED_CHANGE);
     }
 
     @Override
-	public void positionRider()
-    {
-        if (passenger != null) {
-            double d = Math.cos(((double) yRot * Math.PI) / 180D) * 0.4D;
-            double d1 = Math.sin(((double) yRot * Math.PI) / 180D) * 0.4D;
-            passenger.setPos(x + d, y + getRideHeight() + passenger.getRidingHeight(), z + d1);
+    public void positionRider() {
+        if (this.passenger != null) {
+            double d = Math.cos(((double) this.yRot * Math.PI) / 180D) * 0.4D;
+            double d1 = Math.sin(((double) this.yRot * Math.PI) / 180D) * 0.4D;
+            this.passenger.setPos(this.x + d, this.y + getRideHeight() + this.passenger.getRidingHeight(), this.z + d1);
         }
     }
 
     @Override
     public void waterHurt() {
-        return;
     }
 
     @Override
-    public void addAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-        if (this.flag != null)
-        {
+    public void addAdditionalSaveData(@NotNull CompoundTag tag) {
+        if (this.flag != null) {
             CompoundTag flagTag = new CompoundTag();
             this.flag.writeToNBT(flagTag);
             tag.put("Flag", flagTag);
@@ -463,10 +424,8 @@ public class EntityBoat extends Entity
     }
 
     @Override
-	public void readAdditionalSaveData(@NotNull CompoundTag tag)
-    {
-        if (tag.containsKey("Flag"))
-        {
+    public void readAdditionalSaveData(@NotNull CompoundTag tag) {
+        if (tag.containsKey("Flag")) {
             CompoundTag flagTag = tag.getCompound("Flag");
             this.flag = ItemStack.readItemStackFromNbt(flagTag);
             createTileEntity();
@@ -474,62 +433,59 @@ public class EntityBoat extends Entity
     }
 
     @Override
-	public float getShadowHeightOffs()
-    {
+    public float getShadowHeightOffs() {
         return 0.0F;
     }
 
     @Override
-	public boolean interact(@NotNull Player player)
-    {
-        if(passenger != null && (passenger instanceof Player) && passenger != player)
-        {
+    public boolean interact(@NotNull Player player) {
+        if (this.passenger != null && (this.passenger instanceof Player) && this.passenger != player) {
             return true;
         }
-        if(!world.isClientSide)
-        {
-            if (player.getHeldItem() != null && player.getHeldItem().itemID == Items.FLAG.id && flag == null)
-            {
+        if (!this.world.isClientSide) {
+            if (player.getHeldItem() != null && player.getHeldItem().itemID == Items.FLAG.id && this.flag == null) {
                 this.flag = player.getHeldItem().copy();
                 player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
                 createTileEntity();
-                world.sendTrackedEntityDataPacket(this);
+                this.world.sendTrackedEntityDataPacket(this);
                 return true;
             }
             player.startRiding(this);
         }
         return true;
     }
+
     @Override
     public Entity ejectRider() {
-        Entity entity = passenger;
-        if(entity == null) return null;
+        Entity entity = this.passenger;
+        if (entity == null) return null;
 
         this.passenger = null;
         entity.vehicle = null;
 
-        double bbCenterX = (bb.minX + bb.maxX)/2;
-        double bbCenterY = (bb.minY + bb.maxY)/2;
-        double bbCenterZ = (bb.minZ + bb.maxZ)/2;
+        double bbCenterX = (this.bb.minX + this.bb.maxX) / 2;
+        double bbCenterY = (this.bb.minY + this.bb.maxY) / 2;
+        double bbCenterZ = (this.bb.minZ + this.bb.maxZ) / 2;
 
         boolean flag = false;
         for (int i = 0; i < 4; i++) {
             final double length = 1.75D;
-            double angle = Math.toRadians(yRot - 90) + (Math.PI/2) * i;
+            double angle = Math.toRadians(this.yRot - 90) + (Math.PI / 2) * i;
             double checkX = bbCenterX + Math.cos(angle) * length;
             double checkZ = bbCenterZ + Math.sin(angle) * length;
             entity.moveTo(checkX, this.bb.maxY + 0.1, checkZ, entity.yRot, entity.xRot);
-            if (/*world.checkIfAABBIsClear(entity.bb) && */world.getCubes(entity, entity.bb).isEmpty()){
+            if (/*world.checkIfAABBIsClear(entity.bb) && */this.world.getCubes(entity, entity.bb).isEmpty()) {
                 flag = true;
                 break;
             }
         }
-        if (!flag){
+        if (!flag) {
             entity.moveTo(bbCenterX, this.bb.maxY + 0.1, bbCenterZ, entity.yRot, entity.xRot);
         }
         return entity;
     }
 
     @Override
-    protected void causeFallDamage(float distance){}
+    protected void causeFallDamage(float distance) {
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityMinecart.java b/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityMinecart.java
index f4d6fda8c..7d3ab1f45 100644
--- a/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityMinecart.java
+++ b/game/core/src/main/java/net/minecraft/core/entity/vehicle/EntityMinecart.java
@@ -23,11 +23,13 @@ import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.InventorySorter;
 import net.minecraft.core.util.helper.DamageType;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 
@@ -46,44 +48,44 @@ public class EntityMinecart extends Entity implements Container {
     // 10 x 2 x 3 table of something
     private static final int[][][] EXITS = {
         {
-            {  0,  0, -1 }, // STRAIGHT_NS
-            {  0,  0,  1 }
+            {0, 0, -1}, // STRAIGHT_NS
+            {0, 0, 1}
         },
         {
-            { -1,  0,  0 }, // STRAIGHT_EW
-            {  1,  0,  0 }
+            {-1, 0, 0}, // STRAIGHT_EW
+            {1, 0, 0}
         },
         {
-            { -1, -1,  0 }, // SLOPE_E
-            {  1,  0,  0 }
+            {-1, -1, 0}, // SLOPE_E
+            {1, 0, 0}
         },
         {
-            { -1,  0,  0 }, // SLOPE_W
-            {  1, -1,  0 }
+            {-1, 0, 0}, // SLOPE_W
+            {1, -1, 0}
         },
         {
-            {  0,  0, -1 }, // SLOPE_N
-            {  0, -1, 1  }
+            {0, 0, -1}, // SLOPE_N
+            {0, -1, 1}
         },
         {
-            {  0, -1, -1 }, // SLOPE_S
-            {  0,  0,  1 }
+            {0, -1, -1}, // SLOPE_S
+            {0, 0, 1}
         },
         {
-            {  0,  0,  1 }, // TURN_ES
-            {  1,  0,  0 }
+            {0, 0, 1}, // TURN_ES
+            {1, 0, 0}
         },
         {
-            {  0,  0,  1 }, // TURN_WS
-            { -1,  0,  0 }
+            {0, 0, 1}, // TURN_WS
+            {-1, 0, 0}
         },
         {
-            {  0,  0, -1 }, // TURN_WN
-            { -1,  0,  0 }
+            {0, 0, -1}, // TURN_WN
+            {-1, 0, 0}
         },
         {
-            {  0,  0, -1 }, // TURN_EN
-            {  1,  0,  0 }
+            {0, 0, -1}, // TURN_EN
+            {1, 0, 0}
         }
     };
     private ItemStack[] items;
@@ -106,67 +108,88 @@ public class EntityMinecart extends Entity implements Container {
 
     public EntityMinecart(World world) {
         super(world);
-        items = new ItemStack[36];
-        currentDamage = 0;
-        timeSinceHit = 0;
-        hurtDirection = 1;
-        flipped = false;
-        blocksBuilding = true;
+        this.items = new ItemStack[36];
+        this.currentDamage = 0;
+        this.timeSinceHit = 0;
+        this.hurtDirection = 1;
+        this.flipped = false;
+        this.blocksBuilding = true;
         setSize(0.98F, 0.7F);
-        heightOffset = bbHeight / 2.0F;
+        this.heightOffset = this.bbHeight / 2.0F;
     }
+
     public EntityMinecart(World world, double x, double y, double z, int type) {
         this(world);
-        setPos(x, y + (double) heightOffset, z);
-        xd = 0.0D;
-        yd = 0.0D;
-        zd = 0.0D;
-        xo = x;
-        yo = y;
-        zo = z;
+        setPos(x, y + (double) this.heightOffset, z);
+        this.xd = 0.0D;
+        this.yd = 0.0D;
+        this.zd = 0.0D;
+        this.xo = x;
+        this.yo = y;
+        this.zo = z;
         setType((byte) type);
     }
+
     @Override
     public float getShadowHeightOffs() {
         return 0.0F;
     }
+
     @Override
-	protected boolean makeStepSound() {
+    protected boolean makeStepSound() {
         return false;
     }
+
     @Override
-	protected void defineSynchedData() {
-        entityData.define(DATA_TYPE, (byte)0, Byte.class);
-        entityData.define(DATA_META, 0, Integer.class);
-        entityData.define(DATA_FUEL, 0, Integer.class);
+    protected void defineSynchedData() {
+        this.entityData.define(DATA_TYPE, (byte) 0, Byte.class);
+        this.entityData.define(DATA_META, 0, Integer.class);
+        this.entityData.define(DATA_FUEL, 0, Integer.class);
     }
 
-    public void setType(byte type) {entityData.set(DATA_TYPE, type);}
-    public byte getType() {return entityData.getByte(DATA_TYPE);}
+    public void setType(byte type) {
+        this.entityData.set(DATA_TYPE, type);
+    }
 
-    public void setMeta(int meta) {entityData.set(DATA_META, meta);}
-    public int getMeta() {return entityData.getInt(DATA_META);}
+    public byte getType() {
+        return this.entityData.getByte(DATA_TYPE);
+    }
 
-    public void setFuel(int fuel) {entityData.set(DATA_FUEL, fuel);}
-    public int getFuel() {return entityData.getInt(DATA_FUEL);}
+    public void setMeta(int meta) {
+        this.entityData.set(DATA_META, meta);
+    }
+
+    public int getMeta() {
+        return this.entityData.getInt(DATA_META);
+    }
+
+    public void setFuel(int fuel) {
+        this.entityData.set(DATA_FUEL, fuel);
+    }
+
+    public int getFuel() {
+        return this.entityData.getInt(DATA_FUEL);
+    }
 
 
     @Override
-	public boolean isPushable() {
+    public boolean isPushable() {
         return true;
     }
+
     @Override
     public boolean isPickable() {
-        return !removed;
+        return !this.removed;
     }
+
     @Override
     public double getRideHeight() {
-        return (double) bbHeight * 0.0D - 0.3D;
+        return (double) this.bbHeight * 0.0D - 0.3D;
     }
 
     @Override
     public Entity ejectRider() {
-        Entity entity = passenger;
+        Entity entity = this.passenger;
         if (entity == null) return null;
 
         this.passenger = null;
@@ -192,31 +215,31 @@ public class EntityMinecart extends Entity implements Container {
     }
 
     private boolean isSafe(int x, int y, int z) {
-        return !world.isBlockNormalCube(x, y, z) && !world.isBlockNormalCube(x, y + 1, z);
+        return !this.world.isBlockNormalCube(x, y, z) && !this.world.isBlockNormalCube(x, y + 1, z);
     }
 
     @Override
     public boolean hurt(Entity entity, int baseDamage, DamageType type) {
-        if(world.isClientSide || removed) {
+        if (this.world.isClientSide || this.removed) {
             return true;
         }
-        if(entity instanceof Player) {
-        	if(((Player) entity).getGamemode() == Gamemode.creative) {
-        		remove();
-        		return true;
-        	}
+        if (entity instanceof Player player) {
+            if (player.getGamemode() == Gamemode.creative) {
+                remove();
+                return true;
+            }
         }
-        hurtDirection = -hurtDirection;
-        timeSinceHit = 10;
+        this.hurtDirection = -this.hurtDirection;
+        this.timeSinceHit = 10;
         markHurt();
-        currentDamage += baseDamage * 10;
-        if(currentDamage > 40) {
-            if(passenger != null) {
-                passenger.startRiding(this);
+        this.currentDamage += baseDamage * 10;
+        if (this.currentDamage > 40) {
+            if (this.passenger != null) {
+                this.passenger.startRiding(this);
             }
-            if (!world.isClientSide){
+            if (!this.world.isClientSide) {
                 dropItem(Items.MINECART.id, 1, 0.0F);
-                switch (getType()){
+                switch (getType()) {
                     case CHEST_CART:
                         if ((getMeta() & TYPE_MASK_PAINTED_CHEST) != 0) {
                             dropItem(new ItemStack(Blocks.CHEST_PLANKS_OAK_PAINTED, 1, getMeta() & TYPE_MASK_COLOR), 0.0F);
@@ -235,26 +258,26 @@ public class EntityMinecart extends Entity implements Container {
     }
 
     @Override
-	public void animateHurt() {
-        hurtDirection = -hurtDirection;
-        timeSinceHit = 10;
-        currentDamage += currentDamage * 10;
+    public void animateHurt() {
+        this.hurtDirection = -this.hurtDirection;
+        this.timeSinceHit = 10;
+        this.currentDamage += this.currentDamage * 10;
     }
 
     @Override
-	public void remove() {
-        if (!world.isClientSide){
-            for(int j = 0; j < this.getContainerSize(); j++) {
+    public void remove() {
+        if (!this.world.isClientSide) {
+            for (int j = 0; j < this.getContainerSize(); j++) {
                 ItemStack itemStack = this.getItem(j);
-                if(itemStack == null) continue;
+                if (itemStack == null) continue;
 
                 final float range = 0.7F;
-                double x1 = (double) (random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
-                double y1 = (double) (random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
-                double z1 = (double) (random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
-                EntityItem entityItem = new EntityItem(world, x + x1, y + y1, z + z1, itemStack);
+                double x1 = (double) (this.random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
+                double y1 = (double) (this.random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
+                double z1 = (double) (this.random.nextFloat() * range) + (double) (1.0F - range) * 0.5D;
+                EntityItem entityItem = new EntityItem(this.world, this.x + x1, this.y + y1, this.z + z1, itemStack);
                 entityItem.pickupDelay = 10;
-                world.entityJoinedWorld(entityItem);
+                this.world.entityJoinedWorld(entityItem);
                 entityItem.xd *= 0.5;
                 entityItem.yd *= 0.5;
                 entityItem.zd *= 0.5;
@@ -267,34 +290,34 @@ public class EntityMinecart extends Entity implements Container {
     }
 
     @Override
-	public void tick() {
-        if(timeSinceHit > 0) timeSinceHit--;
-        if(currentDamage > 0) currentDamage--;
+    public void tick() {
+        if (this.timeSinceHit > 0) this.timeSinceHit--;
+        if (this.currentDamage > 0) this.currentDamage--;
 
-        pushesThisTick = 0;
-        pushTime *= 0.98f;
-        if (pushTime < 0.05f || (pushTime < 0.25 && onGround)){
-            pushTime = 0;
+        this.pushesThisTick = 0;
+        this.pushTime *= 0.98f;
+        if (this.pushTime < 0.05f || (this.pushTime < 0.25 && this.onGround)) {
+            this.pushTime = 0;
         }
 
 
-        double _xo = x;
-        double _yo = y;
-        double _zo = z;
-        float _yRot = yRot;
-        float _xRot = xRot;
-        if (world.isClientSide){
-            if (lerpTicks > 0){
-                double newX = x + (lerpX - x) / (double) lerpTicks;
-                double newY = y + (lerpY - y) / (double) lerpTicks;
-                double newZ = z + (lerpZ - z) / (double) lerpTicks;
+        double _xo = this.x;
+        double _yo = this.y;
+        double _zo = this.z;
+        float _yRot = this.yRot;
+        float _xRot = this.xRot;
+        if (this.world.isClientSide) {
+            if (this.lerpTicks > 0) {
+                double newX = this.x + (this.lerpX - this.x) / (double) this.lerpTicks;
+                double newY = this.y + (this.lerpY - this.y) / (double) this.lerpTicks;
+                double newZ = this.z + (this.lerpZ - this.z) / (double) this.lerpTicks;
 
-                yRot += (float) (MathHelper.normalizeRotation(lerpYRot - (double) yRot) / lerpTicks);
-                xRot += (float) (MathHelper.normalizeRotation(lerpXRot - (double) xRot) / lerpTicks);
+                this.yRot += (float) (MathHelper.normalizeRotation(this.lerpYRot - (double) this.yRot) / this.lerpTicks);
+                this.xRot += (float) (MathHelper.normalizeRotation(this.lerpXRot - (double) this.xRot) / this.lerpTicks);
 
-                lerpTicks--;
+                this.lerpTicks--;
                 setPos(newX, newY, newZ);
-                setRot(yRot, xRot);
+                setRot(this.yRot, this.xRot);
             }
         } else {
             motionIteration();
@@ -308,100 +331,101 @@ public class EntityMinecart extends Entity implements Container {
     }
 
     public void motionIteration() {
-        xo = x;
-        yo = y;
-        zo = z;
-        yd -= 0.04D;
-        int blockX = MathHelper.floor(x);
-        int blockY = MathHelper.floor(y);
-        int blockZ = MathHelper.floor(z);
-        if(BlockLogicRail.isRailBlockAt(world, new TilePos(blockX, blockY - 1, blockZ))) {
+        this.xo = this.x;
+        this.yo = this.y;
+        this.zo = this.z;
+        this.yd -= 0.04D;
+        int blockX = MathHelper.floor(this.x);
+        int blockY = MathHelper.floor(this.y);
+        int blockZ = MathHelper.floor(this.z);
+        TilePos tilePos = new TilePos(this.x, this.y, this.z);
+        TilePos queryPos = new TilePos();
+        if (BlockLogicRail.isRailBlockAt(this.world, tilePos.down(queryPos))) {
             blockY--;
         }
         final double maxSpeed = 0.4D;
         boolean didFurnacePush = false;
         final double d5 = 0.0078125D;
-        Block<?> block = world.getBlock(blockX, blockY, blockZ);
-        if(block != null && block.getLogic() instanceof BlockLogicRail) {
-            BlockLogicRail rail = (BlockLogicRail) block.getLogic();
-            Vec3 vec3d = getPos(x, y, z);
-            y = blockY;
+        Block<?> block = this.world.getBlock(tilePos);
+        if (block != null && block.getLogic() instanceof BlockLogicRail rail) {
+            Vector3dc vec3d = getPos(this.x, this.y, this.z);
+            this.y = blockY;
             boolean onPoweredPoweredRail = false;
             boolean onUnpoweredPoweredRail = false;
-            if(block == Blocks.RAIL_POWERED) {
-                onPoweredPoweredRail = (world.getBlockMetadata(blockX, blockY, blockZ) & 0b1000) != 0;
+            if (block == Blocks.RAIL_POWERED) {
+                onPoweredPoweredRail = (this.world.getBlockData(tilePos) & 0b1000) != 0;
                 onUnpoweredPoweredRail = !onPoweredPoweredRail;
             }
-            RailDirection railDirection = rail.getRailDirection(world, new TilePos(blockX, blockY, blockZ));
+            RailDirection railDirection = rail.getRailDirection(this.world, new TilePos(tilePos));
 
-            if(railDirection.isSloped()) {
-                y = blockY + 1;
+            if (railDirection.isSloped()) {
+                this.y = blockY + 1;
             }
-            if(railDirection == RailDirection.SLOPE_E) {
-                xd -= d5;
+            if (railDirection == RailDirection.SLOPE_E) {
+                this.xd -= d5;
             }
-            if(railDirection == RailDirection.SLOPE_W) {
-                xd += d5;
+            if (railDirection == RailDirection.SLOPE_W) {
+                this.xd += d5;
             }
-            if(railDirection == RailDirection.SLOPE_N) {
-                zd += d5;
+            if (railDirection == RailDirection.SLOPE_N) {
+                this.zd += d5;
             }
-            if(railDirection == RailDirection.SLOPE_S) {
-                zd -= d5;
+            if (railDirection == RailDirection.SLOPE_S) {
+                this.zd -= d5;
             }
             int[][] nextRailTable = EXITS[railDirection.meta];
             double d9 = nextRailTable[1][0] - nextRailTable[0][0];
             double d10 = nextRailTable[1][2] - nextRailTable[0][2];
             double d11 = Math.sqrt(d9 * d9 + d10 * d10);
-            double d12 = xd * d9 + zd * d10;
-            if(d12 < 0.0D) {
+            double d12 = this.xd * d9 + this.zd * d10;
+            if (d12 < 0.0D) {
                 d9 = -d9;
                 d10 = -d10;
             }
 
-            double vel = Math.hypot(xd, zd);
-            xd = (vel * d9) / d11;
-            zd = (vel * d10) / d11;
-            if(onUnpoweredPoweredRail) { // Speed penalty
+            double vel = Math.hypot(this.xd, this.zd);
+            this.xd = (vel * d9) / d11;
+            this.zd = (vel * d10) / d11;
+            if (onUnpoweredPoweredRail) { // Speed penalty
                 // If current speed below threshold kill all motion
-                if(Math.hypot(xd, zd) < 0.03D) {
-                    xd *= 0.0D;
-                    yd *= 0.0D;
-                    zd *= 0.0D;
+                if (Math.hypot(this.xd, this.zd) < 0.03D) {
+                    this.xd *= 0.0D;
+                    this.yd *= 0.0D;
+                    this.zd *= 0.0D;
                 } else {
-                    xd *= 0.5D;
-                    yd *= 0.0D;
-                    zd *= 0.5D;
+                    this.xd *= 0.5D;
+                    this.yd *= 0.0D;
+                    this.zd *= 0.5D;
                 }
             }
-            double d18 = (double)blockX + 0.5D + (double)nextRailTable[0][0] * 0.5D;
-            double d19 = (double)blockZ + 0.5D + (double)nextRailTable[0][2] * 0.5D;
-            double d20 = (double)blockX + 0.5D + (double)nextRailTable[1][0] * 0.5D;
-            double d21 = (double)blockZ + 0.5D + (double)nextRailTable[1][2] * 0.5D;
+            double d18 = (double) blockX + 0.5D + (double) nextRailTable[0][0] * 0.5D;
+            double d19 = (double) blockZ + 0.5D + (double) nextRailTable[0][2] * 0.5D;
+            double d20 = (double) blockX + 0.5D + (double) nextRailTable[1][0] * 0.5D;
+            double d21 = (double) blockZ + 0.5D + (double) nextRailTable[1][2] * 0.5D;
             d9 = d20 - d18;
             d10 = d21 - d19;
             double d17;
-            if(d9 == 0.0D) {
-                d17 = z - (double)blockZ;
-            } else if(d10 == 0.0D) {
-                d17 = x - (double)blockX;
+            if (d9 == 0.0D) {
+                d17 = this.z - (double) blockZ;
+            } else if (d10 == 0.0D) {
+                d17 = this.x - (double) blockX;
             } else {
-                double d22 = x - d18;
-                double d24 = z - d19;
+                double d22 = this.x - d18;
+                double d24 = this.z - d19;
                 d17 = (d22 * d9 + d24 * d10) * 2D;
             }
-            x = d18 + d9 * d17;
-            z = d19 + d10 * d17;
-            setPos(x, y + (double) heightOffset, z);
+            this.x = d18 + d9 * d17;
+            this.z = d19 + d10 * d17;
+            setPos(this.x, this.y + (double) this.heightOffset, this.z);
 
             // Let passenger push minecart slowly
-            if(passenger != null && passenger instanceof Player && Math.hypot(xd, zd) < 0.01f) {
-                xd += passenger.xd * 0.05;
-                zd += passenger.zd * 0.05;
+            if (this.passenger != null && this.passenger instanceof Player && Math.hypot(this.xd, this.zd) < 0.01f) {
+                this.xd += this.passenger.xd * 0.05;
+                this.zd += this.passenger.zd * 0.05;
             }
-            double _xd = xd;
-            double _zd = zd;
-            if(passenger != null) {
+            double _xd = this.xd;
+            double _zd = this.zd;
+            if (this.passenger != null) {
                 _xd *= 0.75D;
                 _zd *= 0.75D;
             }
@@ -410,155 +434,156 @@ public class EntityMinecart extends Entity implements Container {
             _zd = MathHelper.clamp(_zd, -maxSpeed, maxSpeed);
 
             move(_xd, 0.0D, _zd);
-            if(nextRailTable[0][1] != 0 && MathHelper.floor(x) - blockX == nextRailTable[0][0] && MathHelper.floor(z) - blockZ == nextRailTable[0][2]) {
-                setPos(x, y + (double)nextRailTable[0][1], z);
-            } else if(nextRailTable[1][1] != 0 && MathHelper.floor(x) - blockX == nextRailTable[1][0] && MathHelper.floor(z) - blockZ == nextRailTable[1][2]) {
-                setPos(x, y + (double)nextRailTable[1][1], z);
+            if (nextRailTable[0][1] != 0 && MathHelper.floor(this.x) - blockX == nextRailTable[0][0] && MathHelper.floor(this.z) - blockZ == nextRailTable[0][2]) {
+                setPos(this.x, this.y + (double) nextRailTable[0][1], this.z);
+            } else if (nextRailTable[1][1] != 0 && MathHelper.floor(this.x) - blockX == nextRailTable[1][0] && MathHelper.floor(this.z) - blockZ == nextRailTable[1][2]) {
+                setPos(this.x, this.y + (double) nextRailTable[1][1], this.z);
             }
-            if(passenger != null) {
-                xd *= 0.997D;
-                yd *= 0.0D;
-                zd *= 0.997D;
+            if (this.passenger != null) {
+                this.xd *= 0.997D;
+                this.yd *= 0.0D;
+                this.zd *= 0.997D;
             } else {
-                if(getType() == FURNACE_CART) {
-                    vel = Math.hypot(xPush, zPush);
-                    if(vel > 0.01D) {
+                if (getType() == FURNACE_CART) {
+                    vel = Math.hypot(this.xPush, this.zPush);
+                    if (vel > 0.01D) {
                         didFurnacePush = true;
-                        xPush /= vel;
-                        zPush /= vel;
-                        xd *= 0.8D;
-                        yd *= 0.0D;
-                        zd *= 0.8D;
+                        this.xPush /= vel;
+                        this.zPush /= vel;
+                        this.xd *= 0.8D;
+                        this.yd *= 0.0D;
+                        this.zd *= 0.8D;
                         final double pushScalar = 0.04D;
-                        xd += xPush * pushScalar;
-                        zd += zPush * pushScalar;
+                        this.xd += this.xPush * pushScalar;
+                        this.zd += this.zPush * pushScalar;
                     } else {
-                        xd *= 0.9D;
-                        yd *= 0.0D;
-                        zd *= 0.9D;
+                        this.xd *= 0.9D;
+                        this.yd *= 0.0D;
+                        this.zd *= 0.9D;
                     }
                 }
-                xd *= 0.96D;
-                yd *= 0.0D;
-                zd *= 0.96D;
+                this.xd *= 0.96D;
+                this.yd *= 0.0D;
+                this.zd *= 0.96D;
             }
-            Vec3 vec3d1 = getPos(x, y, z);
-            if(vec3d1 != null && vec3d != null) {
-                double slopeSpeedOffset = (vec3d.y - vec3d1.y) * 0.05D; // I think this give a speed buff/penalty for going up/down slopes
-                vel = Math.hypot(xd, zd);
-                if(vel > 0.0D) {
-                    xd = (xd / vel) * (vel + slopeSpeedOffset);
-                    zd = (zd / vel) * (vel + slopeSpeedOffset);
+            Vector3dc vec3d1 = getPos(this.x, this.y, this.z);
+            if (vec3d1 != null && vec3d != null) {
+                double slopeSpeedOffset = (vec3d.y() - vec3d1.y()) * 0.05D; // I think this give a speed buff/penalty for going up/down slopes
+                vel = Math.hypot(this.xd, this.zd);
+                if (vel > 0.0D) {
+                    this.xd = (this.xd / vel) * (vel + slopeSpeedOffset);
+                    this.zd = (this.zd / vel) * (vel + slopeSpeedOffset);
                 }
-                setPos(x, vec3d1.y, z);
+                setPos(this.x, vec3d1.y(), this.z);
             }
-            int newBlockX = MathHelper.floor(x);
-            int newBlockZ = MathHelper.floor(z);
-            if(newBlockX != blockX || newBlockZ != blockZ) {
-                vel = Math.hypot(xd, zd);
-                xd = vel * (double)(newBlockX - blockX);
-                zd = vel * (double)(newBlockZ - blockZ);
+            int newBlockX = MathHelper.floor(this.x);
+            int newBlockZ = MathHelper.floor(this.z);
+            if (newBlockX != blockX || newBlockZ != blockZ) {
+                vel = Math.hypot(this.xd, this.zd);
+                this.xd = vel * (double) (newBlockX - blockX);
+                this.zd = vel * (double) (newBlockZ - blockZ);
             }
-            if(getType() == FURNACE_CART) {
-                double pushMagnitude = Math.hypot(xPush, zPush);
-                if(pushMagnitude > 0.01D && Math.hypot(xd, zd) > 0.001D) {
-                    xPush = xd;
-                    zPush = zd;
+            if (getType() == FURNACE_CART) {
+                double pushMagnitude = Math.hypot(this.xPush, this.zPush);
+                if (pushMagnitude > 0.01D && Math.hypot(this.xd, this.zd) > 0.001D) {
+                    this.xPush = this.xd;
+                    this.zPush = this.zd;
                 }
             }
-            if(onPoweredPoweredRail) { // Speed boost
-                vel = Math.hypot(xd, zd);
-                if(vel > 0.01D) {
+            if (onPoweredPoweredRail) { // Speed boost
+                vel = Math.hypot(this.xd, this.zd);
+                if (vel > 0.01D) {
                     final double scalar = 0.06D;
-                    xd += (xd / vel) * scalar;
-                    zd += (zd / vel) * scalar;
-                } else if(railDirection == RailDirection.STRAIGHT_EW) {
-                    if(world.isBlockNormalCube(blockX - 1, blockY, blockZ)) {
-                        xd = 0.02D;
-                    } else if(world.isBlockNormalCube(blockX + 1, blockY, blockZ)) {
-                        xd = -0.02D;
+                    this.xd += (this.xd / vel) * scalar;
+                    this.zd += (this.zd / vel) * scalar;
+                } else if (railDirection == RailDirection.STRAIGHT_EW) {
+                    if (this.world.isBlockNormalCube(tilePos.west(queryPos))) {
+                        this.xd = 0.02D;
+                    } else if (this.world.isBlockNormalCube(tilePos.east(queryPos))) {
+                        this.xd = -0.02D;
                     }
-                } else if(railDirection == RailDirection.STRAIGHT_NS) {
-                    if(world.isBlockNormalCube(blockX, blockY, blockZ - 1)) {
-                        zd = 0.02D;
-                    } else if(world.isBlockNormalCube(blockX, blockY, blockZ + 1)) {
-                        zd = -0.02D;
+                } else if (railDirection == RailDirection.STRAIGHT_NS) {
+                    if (this.world.isBlockNormalCube(tilePos.north(queryPos))) {
+                        this.zd = 0.02D;
+                    } else if (this.world.isBlockNormalCube(tilePos.south(queryPos))) {
+                        this.zd = -0.02D;
                     }
                 }
             }
         } else {
-            xd = MathHelper.clamp(xd, -maxSpeed, maxSpeed);
-            zd = MathHelper.clamp(zd, -maxSpeed, maxSpeed);
+            this.xd = MathHelper.clamp(this.xd, -maxSpeed, maxSpeed);
+            this.zd = MathHelper.clamp(this.zd, -maxSpeed, maxSpeed);
 
-            if(onGround) {
-                xd *= 0.5D;
-                yd *= 0.5D;
-                zd *= 0.5D;
+            if (this.onGround) {
+                this.xd *= 0.5D;
+                this.yd *= 0.5D;
+                this.zd *= 0.5D;
             }
-            move(xd, yd, zd);
-            if(!onGround) {
-                xd *= 0.95D;
-                yd *= 0.95D;
-                zd *= 0.95D;
+            move(this.xd, this.yd, this.zd);
+            if (!this.onGround) {
+                this.xd *= 0.95D;
+                this.yd *= 0.95D;
+                this.zd *= 0.95D;
             }
         }
-        xRot = 0.0F;
-        double diffX = xo - x;
-        double diffZ = zo - z;
-        if(Math.hypot(diffX, diffZ) > 0.001D) {
-            yRot = (float) Math.toDegrees(Math.atan2(diffZ, diffX));
-            if(flipped) {
-                yRot += 180F;
+        this.xRot = 0.0F;
+        double diffX = this.xo - this.x;
+        double diffZ = this.zo - this.z;
+        if (Math.hypot(diffX, diffZ) > 0.001D) {
+            this.yRot = (float) Math.toDegrees(Math.atan2(diffZ, diffX));
+            if (this.flipped) {
+                this.yRot += 180F;
             }
         }
 
-        double diffYRot = MathHelper.normalizeRotation(yRot - yRotO);
+        double diffYRot = MathHelper.normalizeRotation(this.yRot - this.yRotO);
 
         // Cause minecart to flip 180?
-        if(diffYRot < -170D || diffYRot >= 170D) {
-            yRot += 180F;
-            flipped = !flipped;
+        if (diffYRot < -170D || diffYRot >= 170D) {
+            this.yRot += 180F;
+            this.flipped = !this.flipped;
         }
 
-        setRot(yRot, xRot);
-        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(this, bb.expand(0.2D, 0.0D, 0.2));
-        if(list != null && !list.isEmpty()) {
+        setRot(this.yRot, this.xRot);
+        List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, MathHelper.aabbExpand(this.bb, 0.2D, 0.0D, 0.2, new AABBd()));
+        if (!list.isEmpty()) {
             for (Entity entity : list) {
-                if ((entity instanceof EntityMinecart) && entity != passenger && entity.isPushable()) {
+                if ((entity instanceof EntityMinecart) && entity != this.passenger && entity.isPushable()) {
                     entity.push(this);
                 }
             }
         }
-        if(passenger != null && passenger.removed) {
-            passenger = null;
+        if (this.passenger != null && this.passenger.removed) {
+            this.passenger = null;
         }
-        if(didFurnacePush && random.nextInt(4) == 0) {
+        if (didFurnacePush && this.random.nextInt(4) == 0) {
             setFuel(getFuel() - 1);
-            if(getFuel() < 0) {
-                xPush = 0.0D;
-                zPush = 0.0D;
+            if (getFuel() < 0) {
+                this.xPush = 0.0D;
+                this.zPush = 0.0D;
             }
-            world.spawnParticle("largesmoke", x, y + 0.8D, z, 0.0D, 0.0D, 0.0D, 0);
+            this.world.spawnParticle("largesmoke", this.x, this.y + 0.8D, this.z, 0.0D, 0.0D, 0.0D, 0);
         }
     }
 
-    public Vec3 getPosOffs(final double x, final double y, final double z, final double scalar /*Not sure what this is for still*/) {
+    public @Nullable Vector3dc getPosOffs(final double x, final double y, final double z, final double scalar /*Not sure what this is for still*/) {
         int blockX = MathHelper.floor(x);
         int blockY = MathHelper.floor(y);
         int blockZ = MathHelper.floor(z);
-        if(BlockLogicRail.isRailBlockAt(world, new TilePos(blockX, blockY - 1, blockZ))) {
+        if (BlockLogicRail.isRailBlockAt(this.world, new TilePos(blockX, blockY - 1, blockZ))) {
             blockY--;
         }
 
-        Block<?> block = world.getBlock(blockX, blockY, blockZ);
-        if (!(block != null && block.getLogic() instanceof BlockLogicRail)) { return null; }
+        Block<?> block = this.world.getBlock(blockX, blockY, blockZ);
+        if (!(block != null && block.getLogic() instanceof BlockLogicRail rail)) {
+            return null;
+        }
 
-        BlockLogicRail rail = (BlockLogicRail) block.getLogic();
-        int meta = world.getBlockMetadata(blockX, blockY, blockZ);
-        if(rail.getIsPowered()) {
+        int meta = this.world.getBlockMetadata(blockX, blockY, blockZ);
+        if (rail.getIsPowered()) {
             meta &= 0b111;
         }
-        if(meta >= 2 && meta <= 5) {
+        if (meta >= 2 && meta <= 5) {
             blockY += 1;
         }
         int[][] ai = EXITS[meta];
@@ -570,49 +595,51 @@ public class EntityMinecart extends Entity implements Container {
         double vecX = x + d4 * scalar;
         double vecZ = z + d5 * scalar;
         double vecY = blockY;
-        if(ai[0][1] != 0 && MathHelper.floor(x) - blockX == ai[0][0] && MathHelper.floor(z) - blockZ == ai[0][2]) {
+        if (ai[0][1] != 0 && MathHelper.floor(x) - blockX == ai[0][0] && MathHelper.floor(z) - blockZ == ai[0][2]) {
             vecY += ai[0][1];
-        } else if(ai[1][1] != 0 && MathHelper.floor(x) - blockX == ai[1][0] && MathHelper.floor(z) - blockZ == ai[1][2]) {
+        } else if (ai[1][1] != 0 && MathHelper.floor(x) - blockX == ai[1][0] && MathHelper.floor(z) - blockZ == ai[1][2]) {
             vecY += ai[1][1];
         }
         return getPos(vecX, vecY, vecZ);
     }
+
     /**
      * @return null if not on rail otherwise ?
      */
     // If this gets fucked up then the animation looks wrong?
-    @Nullable
-    public Vec3 getPos(final double x, final double y, final double z) {
+    public @Nullable Vector3dc getPos(final double x, final double y, final double z) {
         int blockX = MathHelper.floor(x);
         int blockY = MathHelper.floor(y);
         int blockZ = MathHelper.floor(z);
 
-        if(BlockLogicRail.isRailBlockAt(world, new TilePos(blockX, blockY - 1, blockZ))) {
+        if (BlockLogicRail.isRailBlockAt(this.world, new TilePos(blockX, blockY - 1, blockZ))) {
             blockY--;
         }
-        Block<?> block = world.getBlock(blockX, blockY, blockZ);
-        if (!(Block.hasLogicClass(block, BlockLogicRail.class))) { return null; }
+        Block<?> block = this.world.getBlock(blockX, blockY, blockZ);
+        if (!(Block.hasLogicClass(block, BlockLogicRail.class))) {
+            return null;
+        }
 
         BlockLogicRail rail = (BlockLogicRail) block.getLogic();
-        RailDirection direction = rail.getRailDirection(world, new TilePos(blockX, blockY, blockZ));
+        RailDirection direction = rail.getRailDirection(this.world, new TilePos(blockX, blockY, blockZ));
 
         int[][] offsetMap = EXITS[direction.meta];
-        double x1 = (double)blockX + 0.5D + (double)offsetMap[0][0] * 0.5D;
-        double y1 = (double)blockY + 0.5D + (double)offsetMap[0][1] * 0.5D;
-        double z1 = (double)blockZ + 0.5D + (double)offsetMap[0][2] * 0.5D;
-        double x2 = (double)blockX + 0.5D + (double)offsetMap[1][0] * 0.5D;
-        double y2 = (double)blockY + 0.5D + (double)offsetMap[1][1] * 0.5D;
-        double z2 = (double)blockZ + 0.5D + (double)offsetMap[1][2] * 0.5D;
+        double x1 = (double) blockX + 0.5D + (double) offsetMap[0][0] * 0.5D;
+        double y1 = (double) blockY + 0.5D + (double) offsetMap[0][1] * 0.5D;
+        double z1 = (double) blockZ + 0.5D + (double) offsetMap[0][2] * 0.5D;
+        double x2 = (double) blockX + 0.5D + (double) offsetMap[1][0] * 0.5D;
+        double y2 = (double) blockY + 0.5D + (double) offsetMap[1][1] * 0.5D;
+        double z2 = (double) blockZ + 0.5D + (double) offsetMap[1][2] * 0.5D;
 
         double railsDX = x2 - x1;
         double railsDY = (y2 - y1) * 2D;
         double railsDZ = z2 - z1;
 
         double proximity; // ?
-        if(railsDX == 0.0D) { // If rail axis is aligned NorthSouth
-            proximity = z - (double)blockZ;
-        } else if(railsDZ == 0.0D) { // If rail axis is aligned EastWest
-            proximity = x - (double)blockX;
+        if (railsDX == 0.0D) { // If rail axis is aligned NorthSouth
+            proximity = z - (double) blockZ;
+        } else if (railsDZ == 0.0D) { // If rail axis is aligned EastWest
+            proximity = x - (double) blockX;
         } else { // If Rail Curves?
             double targetDX = x - x1;
             double targetDZ = z - z1;
@@ -622,48 +649,48 @@ public class EntityMinecart extends Entity implements Container {
         double vecX = x1 + railsDX * proximity;
         double vecY = y1 + railsDY * proximity;
         double vecZ = z1 + railsDZ * proximity;
-        if(railsDY < 0.0D) {
+        if (railsDY < 0.0D) {
             vecY++;
         }
 
-        if(railsDY > 0.0D) {
+        if (railsDY > 0.0D) {
             vecY += 0.5D;
         }
-        return Vec3.fromPool(vecX, vecY, vecZ);
+        return new Vector3d(vecX, vecY, vecZ);
     }
 
     @Override
     public void lerpTo(double x, double y, double z, float yRot, float xRot, int ticks) {
-        lerpX = x;
-        lerpY = y;
-        lerpZ = z;
-        lerpYRot = yRot;
-        lerpXRot = xRot;
-        lerpTicks = 2;
-        xd = lerpXD;
-        yd = lerpYD;
-        zd = lerpZD;
+        this.lerpX = x;
+        this.lerpY = y;
+        this.lerpZ = z;
+        this.lerpYRot = yRot;
+        this.lerpXRot = xRot;
+        this.lerpTicks = 2;
+        this.xd = this.lerpXD;
+        this.yd = this.lerpYD;
+        this.zd = this.lerpZD;
     }
 
     @Override
     public void lerpMotion(double xd, double yd, double zd) {
-        lerpXD = this.xd = xd;
-        lerpYD = this.yd = yd;
-        lerpZD = this.zd = zd;
+        this.lerpXD = this.xd = xd;
+        this.lerpYD = this.yd = yd;
+        this.lerpZD = this.zd = zd;
     }
 
     @Override
-	public void push(Entity entity) {
-        if(world.isClientSide) {
+    public void push(Entity entity) {
+        if (this.world.isClientSide) {
             return;
         }
-        if(entity == passenger) {
+        if (entity == this.passenger) {
             return;
         }
-        if(!entity.isPushable()) {
-        	return;
+        if (!entity.isPushable()) {
+            return;
         }
-        if(getType() == PASSENGER_CART && (entity instanceof Mob) && !(entity instanceof Player) && xd * xd + zd * zd > 0.01D && passenger == null && entity.vehicle == null) {
+        if (getType() == PASSENGER_CART && (entity instanceof Mob) && !(entity instanceof Player) && this.xd * this.xd + this.zd * this.zd > 0.01D && this.passenger == null && entity.vehicle == null) {
             entity.startRiding(this);
         }
         final double diffX = entity.x - this.x;
@@ -694,15 +721,13 @@ public class EntityMinecart extends Entity implements Container {
                     this.push(entity.xd - xForce, 0.0, entity.zd - zForce);
                     entity.xd *= 0.7;
                     entity.zd *= 0.7;
-                }
-                else if (otherType != FURNACE_CART && thisType == FURNACE_CART) {
+                } else if (otherType != FURNACE_CART && thisType == FURNACE_CART) {
                     entity.xd *= 0.2;
                     entity.zd *= 0.2;
                     entity.push(this.xd + xForce, 0.0, this.zd + zForce);
                     this.xd *= 0.7;
                     this.zd *= 0.7;
-                }
-                else {
+                } else {
                     final double avgXD = (entity.xd + this.xd) / 2.0;
                     final double avgZD = (entity.zd + this.zd) / 2.0;
                     this.xd *= 0.2;
@@ -712,8 +737,7 @@ public class EntityMinecart extends Entity implements Container {
                     entity.zd *= 0.2;
                     entity.push(avgXD + xForce, 0.0, avgZD + zForce);
                 }
-            }
-            else {
+            } else {
                 this.push(-xForce, 0.0, -zForce);
                 entity.push(xForce / 4.0, 0.0, zForce / 4.0);
             }
@@ -722,20 +746,18 @@ public class EntityMinecart extends Entity implements Container {
 
     @Override
     public boolean stillValid(Player player) {
-        if(isRemoved()) {
+        if (isRemoved()) {
             return false;
         }
         return player.distanceToSqr(this) <= 64D; // Can interact within 8 blocks
     }
 
     @Override
-	public boolean interact(@NotNull Player player) {
-        switch (getType()){
+    public boolean interact(@NotNull Player player) {
+        switch (getType()) {
             case PASSENGER_CART:
-                if (!world.isClientSide && passenger == null && player.isSneaking() && player.getHeldObject() instanceof CarriedBlock) {
-                    CarriedBlock carriedBlock = (CarriedBlock) player.getHeldObject();
-                    if (carriedBlock.entity instanceof TileEntityChest) {
-                        TileEntityChest chest = (TileEntityChest) carriedBlock.entity;
+                if (!this.world.isClientSide && this.passenger == null && player.isSneaking() && player.getHeldObject() instanceof CarriedBlock carriedBlock) {
+                    if (carriedBlock.entity instanceof TileEntityChest chest) {
                         setType(CHEST_CART);
                         if (carriedBlock.blockId == Blocks.CHEST_PLANKS_OAK_PAINTED.id()) {
                             setMeta(carriedBlock.metadata & TYPE_MASK_COLOR | TYPE_MASK_PAINTED_CHEST);
@@ -750,15 +772,15 @@ public class EntityMinecart extends Entity implements Container {
                         return true;
                     }
                 }
-                if(passenger != null && (passenger instanceof Player) && passenger != player) {
+                if (this.passenger != null && (this.passenger instanceof Player) && this.passenger != player) {
                     return true;
                 }
-                if(!world.isClientSide) {
+                if (!this.world.isClientSide) {
                     player.startRiding(this);
                 }
                 break;
             case CHEST_CART:
-                if(!world.isClientSide) {
+                if (!this.world.isClientSide) {
                     if (player.isSneaking() && player.inventory.getCurrentItem() == null && player.getHeldObject() == null) {
                         TileEntityChest tileEntityChest = new TileEntityChest();
                         for (int i = 0; i < this.getContainerSize(); i++) {
@@ -772,7 +794,7 @@ public class EntityMinecart extends Entity implements Container {
                         } else {
                             block = Blocks.CHEST_PLANKS_OAK;
                         }
-                        tileEntityChest.carriedBlock = tileEntityChest.getCarriedEntry(world, player, block, getMeta() & TYPE_MASK_COLOR);
+                        tileEntityChest.carriedBlock = tileEntityChest.getCarriedEntry(this.world, player, block, getMeta() & TYPE_MASK_COLOR);
                         player.setHeldObject(tileEntityChest.carriedBlock);
                         setType(PASSENGER_CART);
                         setMeta(0);
@@ -783,15 +805,14 @@ public class EntityMinecart extends Entity implements Container {
                 break;
             case FURNACE_CART:
                 ItemStack itemstack = player.inventory.getCurrentItem();
-                if(itemstack != null && LookupFuelFurnace.instance.getFuelYield(itemstack.itemID) > 0 && itemstack.consumeItem(player)) {
-                    if(itemstack.stackSize <= 0)
-                    {
+                if (itemstack != null && LookupFuelFurnace.instance.getFuelYield(itemstack.itemID) > 0 && itemstack.consumeItem(player)) {
+                    if (itemstack.stackSize <= 0) {
                         player.inventory.setItem(player.inventory.getCurrentItemIndex(), null);
                     }
-                    setFuel(getFuel() + MathHelper.round(((LookupFuelFurnace.instance.getFuelYield(itemstack.itemID)/1600F) * 1200)));
+                    setFuel(getFuel() + MathHelper.round(((LookupFuelFurnace.instance.getFuelYield(itemstack.itemID) / 1600F) * 1200)));
                 }
-                xPush = x - player.x;
-                zPush = z - player.z;
+                this.xPush = this.x - player.x;
+                this.zPush = this.z - player.z;
                 break;
         }
         return true;
@@ -801,22 +822,22 @@ public class EntityMinecart extends Entity implements Container {
     public void addAdditionalSaveData(@NotNull CompoundTag tag) {
         tag.putInt("Type", getType());
         tag.putInt("TypeMeta", getMeta());
-        switch (getType()){
+        switch (getType()) {
             case CHEST_CART:
                 ListTag nbttaglist = new ListTag();
-                for(int i = 0; i < items.length; i++) {
-                    if(items[i] != null) {
+                for (int i = 0; i < this.items.length; i++) {
+                    if (this.items[i] != null) {
                         CompoundTag nbttagcompound1 = new CompoundTag();
-                        nbttagcompound1.putByte("Slot", (byte)i);
-                        items[i].writeToNBT(nbttagcompound1);
+                        nbttagcompound1.putByte("Slot", (byte) i);
+                        this.items[i].writeToNBT(nbttagcompound1);
                         nbttaglist.addTag(nbttagcompound1);
                     }
                 }
                 tag.put("Items", nbttaglist);
                 break;
             case FURNACE_CART:
-                tag.putDouble("PushX", xPush);
-                tag.putDouble("PushZ", zPush);
+                tag.putDouble("PushX", this.xPush);
+                tag.putDouble("PushZ", this.zPush);
                 tag.putInt("Fuel", getFuel());
                 break;
         }
@@ -826,21 +847,21 @@ public class EntityMinecart extends Entity implements Container {
     public void readAdditionalSaveData(@NotNull CompoundTag tag) {
         setType((byte) tag.getInteger("Type"));
         setMeta(tag.getInteger("TypeMeta"));
-        switch (getType()){
+        switch (getType()) {
             case CHEST_CART:
                 ListTag nbttaglist = tag.getList("Items");
-                items = new ItemStack[getContainerSize()];
-                for(int i = 0; i < nbttaglist.tagCount(); i++) {
-                    CompoundTag nbttagcompound1 = (CompoundTag)nbttaglist.tagAt(i);
+                this.items = new ItemStack[getContainerSize()];
+                for (int i = 0; i < nbttaglist.tagCount(); i++) {
+                    CompoundTag nbttagcompound1 = (CompoundTag) nbttaglist.tagAt(i);
                     int j = nbttagcompound1.getByte("Slot") & 0xff;
-                    if(j < items.length) {
-                        items[j] = ItemStack.readItemStackFromNbt(nbttagcompound1);
+                    if (j < this.items.length) {
+                        this.items[j] = ItemStack.readItemStackFromNbt(nbttagcompound1);
                     }
                 }
                 break;
             case FURNACE_CART:
-                xPush = tag.getDouble("PushX");
-                zPush = tag.getDouble("PushZ");
+                this.xPush = tag.getDouble("PushX");
+                this.zPush = tag.getDouble("PushZ");
                 Tag<?> t = tag.getTag("Fuel");
                 if (t instanceof ShortTag) {
                     setFuel(((ShortTag) t).getValue());
@@ -868,20 +889,20 @@ public class EntityMinecart extends Entity implements Container {
 
     @Override
     public @Nullable ItemStack getItem(int index) {
-        return items[index];
+        return this.items[index];
     }
 
     @Override
     public @Nullable ItemStack removeItem(int index, int takeAmount) {
-        if(items[index] != null) {
-            if(items[index].stackSize <= takeAmount) {
-                ItemStack itemstack = items[index];
-                items[index] = null;
+        if (this.items[index] != null) {
+            if (this.items[index].stackSize <= takeAmount) {
+                ItemStack itemstack = this.items[index];
+                this.items[index] = null;
                 return itemstack;
             }
-            ItemStack itemstack1 = items[index].splitStack(takeAmount);
-            if(items[index].stackSize <= 0) {
-                items[index] = null;
+            ItemStack itemstack1 = this.items[index].splitStack(takeAmount);
+            if (this.items[index].stackSize <= 0) {
+                this.items[index] = null;
             }
             return itemstack1;
         } else {
@@ -891,8 +912,8 @@ public class EntityMinecart extends Entity implements Container {
 
     @Override
     public void setItem(int index, @Nullable ItemStack itemstack) {
-        items[index] = itemstack;
-        if(itemstack != null && itemstack.stackSize > getMaxStackSize()) {
+        this.items[index] = itemstack;
+        if (itemstack != null && itemstack.stackSize > getMaxStackSize()) {
             itemstack.stackSize = getMaxStackSize();
         }
     }
@@ -903,7 +924,7 @@ public class EntityMinecart extends Entity implements Container {
 
     @Override
     public void sortContainer() {
-        InventorySorter.sortInventory(items);
+        InventorySorter.sortInventory(this.items);
     }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/enums/MobCategory.java b/game/core/src/main/java/net/minecraft/core/enums/MobCategory.java
index e655f22b3..74edf9686 100644
--- a/game/core/src/main/java/net/minecraft/core/enums/MobCategory.java
+++ b/game/core/src/main/java/net/minecraft/core/enums/MobCategory.java
@@ -1,46 +1,44 @@
 package net.minecraft.core.enums;
 
-import net.minecraft.core.entity.Entity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.animal.AmbientCreature;
 import net.minecraft.core.entity.animal.Creature;
-import net.minecraft.core.entity.animal.MobAnimal;
-import net.minecraft.core.entity.animal.MobWaterAnimal;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.animal.WaterCreature;
 import net.minecraft.core.entity.monster.Enemy;
+import org.jetbrains.annotations.NotNull;
 
 public enum MobCategory {
-
-	monster("monster", 0, Enemy.class, 70, Material.air, false),
-    creature("creature", 1, Creature.class, 15, Material.air, true),
-    waterCreature("waterCreature", 2, WaterCreature.class, 5, Material.water, true),
-    ambientCreature("ambient", 3, AmbientCreature.class, 2, Material.air, true);
+	MONSTER(Enemy.class, 70, Materials.AIR, false),
+    CREATURE(Creature.class, 15, Materials.AIR, true),
+    WATER_CREATURE(WaterCreature.class, 5, Materials.WATER, true),
+    AMBIENT(AmbientCreature.class, 2, Materials.AIR, true);
 	
-	private final Class<?> baseClass;
+	private final @NotNull Class<?> baseClass;
 	private final int maxPerChunk;
 	private final Material spawnMaterial;
 	private final boolean isPeaceful;
 
-	MobCategory(String name, int id, Class<?> baseClass, int maxPerChunk, Material spawnMaterial, boolean isPeaceful) {
+	MobCategory(final @NotNull Class<?> baseClass, final int maxPerChunk, final @NotNull Material spawnMaterial, final boolean isPeaceful) {
 		this.baseClass = baseClass;
 		this.maxPerChunk = maxPerChunk;
 		this.spawnMaterial = spawnMaterial;
 		this.isPeaceful = isPeaceful;
 	}
 
-	public Class<?> getBaseClass() {
-		return baseClass;
+	public @NotNull Class<?> getBaseClass() {
+		return this.baseClass;
 	}
 
 	public int getMaxCreaturesPerChunk() {
-		return maxPerChunk;
+		return this.maxPerChunk;
 	}
 
-	public Material getSpawnMaterial() {
-		return spawnMaterial;
+	public @NotNull Material getSpawnMaterial() {
+		return this.spawnMaterial;
 	}
 
 	public boolean isPeaceful() {
-		return isPeaceful;
+		return this.isPeaceful;
 	}
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/IBonemealable.java b/game/core/src/main/java/net/minecraft/core/item/IBonemealable.java
index 5e43c1cb8..0f7cad7b7 100644
--- a/game/core/src/main/java/net/minecraft/core/item/IBonemealable.java
+++ b/game/core/src/main/java/net/minecraft/core/item/IBonemealable.java
@@ -4,11 +4,12 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public interface IBonemealable {
-    boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePos tilePos, final @NotNull Side side, final double xHit, final double yHit);
+    boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Side side, final double xHit, final double yHit);
 
     @Deprecated
     default boolean onBonemealUsed(final @NotNull ItemStack itemStack, final @Nullable Player player, final @NotNull World world, final int x, final int y, final int z, final @NotNull Side side, final double xHit, final double yHit) {
diff --git a/game/core/src/main/java/net/minecraft/core/item/Item.java b/game/core/src/main/java/net/minecraft/core/item/Item.java
index 708db3305..13bc34eff 100644
--- a/game/core/src/main/java/net/minecraft/core/item/Item.java
+++ b/game/core/src/main/java/net/minecraft/core/item/Item.java
@@ -23,6 +23,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -224,7 +225,7 @@ public class Item implements ITaggable<Item>, IItemConvertible {
     public final boolean onUseItemOnBlock(@NotNull final ItemStack selfStack, @Nullable final Player player, @NotNull final World world, final int blockX, final int blockY, final int blockZ, @NotNull final Side side, final double xPlaced, final double yPlaced) {
         return onUseOnBlock(selfStack, world, player, new TilePos(blockX, blockY, blockZ), side, xPlaced, yPlaced);
     }
-    public boolean onUseOnBlock(final @NotNull ItemStack selfStack, final @NotNull World world, final @Nullable Player player, final @NotNull TilePos blockPos, final @NotNull Side side, final double xHit, final double yHit) {
+    public boolean onUseOnBlock(final @NotNull ItemStack selfStack, final @NotNull World world, final @Nullable Player player, final @NotNull TilePosc blockPos, final @NotNull Side side, final double xHit, final double yHit) {
         return false;
     }
 
@@ -232,7 +233,7 @@ public class Item implements ITaggable<Item>, IItemConvertible {
     public final void onUseByActivator(final @NotNull ItemStack selfStack, final @NotNull TileEntityActivator activator, final @NotNull World world, final @NotNull Random random, final int blockX, final int blockY, final int blockZ, final double offX, final double offY, final double offZ, final @NotNull Direction direction) {
         onUseByActivator(selfStack, world, activator, random, new TilePos(blockX, blockY, blockZ), direction, offX, offY, offZ);
     }
-    public void onUseByActivator(final @NotNull ItemStack selfStack, final @NotNull World world, final @NotNull TileEntityActivator activator, final @NotNull Random random, final @NotNull TilePos blockPos, final @NotNull Direction direction, final double offX, final double offY, final double offZ) {
+    public void onUseByActivator(final @NotNull ItemStack selfStack, final @NotNull World world, final @NotNull TileEntityActivator activator, final @NotNull Random random, final @NotNull TilePosc blockPos, final @NotNull Direction direction, final double offX, final double offY, final double offZ) {
 
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemBed.java b/game/core/src/main/java/net/minecraft/core/item/ItemBed.java
index eb55bd66a..341ec886f 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemBed.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemBed.java
@@ -7,27 +7,27 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class ItemBed extends Item {
 
-    public ItemBed(@NotNull String name, @NotNull String namespaceId, int id)
-    {
+    public ItemBed(@NotNull String name, @NotNull String namespaceId, int id) {
         super(name, namespaceId, id);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-        TilePos pos = blockPos;
-        if(!world.canPlaceInsideBlock(pos)) {
-            pos = pos.add(side.getDirection());
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        TilePosc pos = blockPos;
+        if (!world.canPlaceInsideBlock(pos)) {
+            pos = pos.add(side.getDirection(), new TilePos());
         }
         Direction dir = player == null ? Direction.NORTH : player.getHorizontalPlacementDirection(null).getOpposite();
-        TilePos pos2 = pos.add(dir);
-        if(world.isAirBlock(pos) && world.isAirBlock(pos2) && world.canPlaceOnSurfaceOfBlock(pos.down()) && world.canPlaceOnSurfaceOfBlock(pos2.down())) {
-            if(world.canBlockIdBePlacedAt(Blocks.BED.id(), pos, false, side) && selfStack.consumeItem(player)) {
-                world.playBlockSoundEffect(player, pos.x + 0.5F, pos.y + 0.5F, pos.z + 0.5F, Blocks.BED, EnumBlockSoundEffectType.PLACE);
+        TilePos pos2 = pos.add(dir, new TilePos());
+        if (world.isAirBlock(pos) && world.isAirBlock(pos2) && world.canPlaceOnSurfaceOfBlock(pos.down(new TilePos())) && world.canPlaceOnSurfaceOfBlock(pos2.down(new TilePos()))) {
+            if (world.canBlockIdBePlacedAt(Blocks.BED.id(), pos, false, side) && selfStack.consumeItem(player)) {
+                world.playBlockSoundEffect(player, pos.x() + 0.5F, pos.y() + 0.5F, pos.z() + 0.5F, Blocks.BED, EnumBlockSoundEffectType.PLACE);
                 world.setBlockIdDataNotify(pos, Blocks.BED.id(), dir.getHorizontalIndex());
                 world.setBlockIdDataNotify(pos2, Blocks.BED.id(), dir.getHorizontalIndex() | 0b1000);
                 return true;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemBoat.java b/game/core/src/main/java/net/minecraft/core/item/ItemBoat.java
index 00501561b..05c89c8c3 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemBoat.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemBoat.java
@@ -8,6 +8,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -23,13 +24,13 @@ public class ItemBoat extends Item {
     @Override
     public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
         HitResult rayCast = player.rayCast(player.getGamemode().getBlockReachDistance(), 1f, true, false, false);
-        if(rayCast == null) {
+        if (rayCast == null) {
             return selfStack;
         }
-        if(rayCast instanceof HitResult.Tile hitTile) {
+        if (rayCast instanceof HitResult.Tile hitTile) {
             TilePos pos = new TilePos(hitTile.tilePos);
-            if(!world.isClientSide) {
-                if(world.getBlockId(pos) == Blocks.LAYER_SNOW.id()) {
+            if (!world.isClientSide) {
+                if (world.getBlockId(pos) == Blocks.LAYER_SNOW.id()) {
                     pos.y--;
                 }
                 EntityBoat boat = new EntityBoat(world, pos.x + 0.5F, pos.y + 1.0F, pos.z + 0.5F);
@@ -42,10 +43,10 @@ public class ItemBoat extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        double x = blockPos.x + offX + direction.getOffsetX();
-        double y = blockPos.y + offY + direction.getOffsetY();
-        double z = blockPos.z + offZ + direction.getOffsetZ();
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        double x = blockPos.x() + offX + direction.getOffsetX();
+        double y = blockPos.y() + offY + direction.getOffsetY();
+        double z = blockPos.z() + offZ + direction.getOffsetZ();
         selfStack.consumeItem(null);
         EntityBoat boat = new EntityBoat(world, x, y, z);
         world.entityJoinedWorld(boat);
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemBucket.java b/game/core/src/main/java/net/minecraft/core/item/ItemBucket.java
index 1ff425c4e..252832a64 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemBucket.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemBucket.java
@@ -12,81 +12,81 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class ItemBucket extends Item
-{
-	private final @Nullable Block<?> blockToPlace;
-    public ItemBucket(@NotNull String name, @NotNull String namespaceId, int id, @Nullable Block<?> blockToPlace)
-    {
+public class ItemBucket extends Item {
+    private final @Nullable Block<?> blockToPlace;
+
+    public ItemBucket(@NotNull String name, @NotNull String namespaceId, int id, @Nullable Block<?> blockToPlace) {
         super(name, namespaceId, id);
         this.maxStackSize = 1;
         this.blockToPlace = blockToPlace;
     }
 
     @Override
-	public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
-		if(this.blockToPlace == null) {
-			// Milk
-			return new ItemStack(Items.BUCKET);
-		}
+    public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
+        if (this.blockToPlace == null) {
+            // Milk
+            return new ItemStack(Items.BUCKET);
+        }
+
+        double reachDistance = player.getGamemode().getBlockReachDistance();
+        HitResult rayCast = player.rayCast(reachDistance, 1f, false, false, false);
+
+        if (!(rayCast instanceof HitResult.Tile hitTile)) {
+            return selfStack;
+        }
+
+        TilePos rayCastPos = new TilePos(hitTile.tilePos);
+        if (!world.canMineBlock(player, rayCastPos)) {
+            return selfStack;
+        }
+
+        Block<?> block = world.getBlock(rayCastPos);
+        if (block != null && !block.hasTag(BlockTags.PLACE_OVERWRITES) && !block.hasTag(BlockTags.BROKEN_BY_FLUIDS)) {
+            Side side = hitTile.side;
+            rayCastPos.x += side.getOffsetX();
+            rayCastPos.y += side.getOffsetY();
+            rayCastPos.z += side.getOffsetZ();
+        }
 
-		double reachDistance = player.getGamemode().getBlockReachDistance();
-		HitResult rayCast = player.rayCast(reachDistance, 1f, false, false, false);
-		
-		if(!(rayCast instanceof HitResult.Tile hitTile)) {
-			return selfStack;
-		}
+        if (rayCastPos.y < 0 || rayCastPos.y >= world.getHeightBlocks()) {
+            return selfStack;
+        }
 
-		TilePos rayCastPos = new TilePos(hitTile.tilePos);
-		if(!world.canMineBlock(player, rayCastPos)) {
-			return selfStack;
-		}
-		
-		Block<?> block = world.getBlock(rayCastPos);
-		if(block != null && !block.hasTag(BlockTags.PLACE_OVERWRITES) && !block.hasTag(BlockTags.BROKEN_BY_FLUIDS)) {
-			Side side = hitTile.side;
-			rayCastPos.x += side.getOffsetX();
-			rayCastPos.y += side.getOffsetY();
-			rayCastPos.z += side.getOffsetZ();
-		}
-		
-		if(rayCastPos.y < 0 || rayCastPos.y >= world.getHeightBlocks()) {
-			return selfStack;
-		}
-		
-		if(world.isAirBlock(rayCastPos) || !world.getBlockMaterial(rayCastPos).isSolid()) {
+        if (world.isAirBlock(rayCastPos) || !world.getBlockMaterial(rayCastPos).isSolid()) {
             if (this.blockToPlace == Blocks.FLUID_WATER_FLOWING) {
                 world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, rayCastPos.x + 0.5F, rayCastPos.y + 0.5F, rayCastPos.z + 0.5F, "liquid.splash", 0.5f, 1.0f);
             }
             player.swingItem();
             Block<?> block1 = world.getBlock(rayCastPos);
-            if(block1 != null) {
+            if (block1 != null) {
                 block1.dropWithCause(world, EnumDropCause.WORLD, rayCastPos, world.getBlockData(rayCastPos), null, null);
             }
             world.setBlockIdDataNotify(rayCastPos, this.blockToPlace.id(), 0);
-            if(player.getGamemode().consumeBlocks()) {
-				return new ItemStack(Items.BUCKET);
-			}
-		}
+            if (player.getGamemode().consumeBlocks()) {
+                return new ItemStack(Items.BUCKET);
+            }
+        }
 
-		return selfStack;
-	}
+        return selfStack;
+    }
 
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		if (this.blockToPlace == null) {
-			selfStack.itemID = Items.BUCKET.id;
-			return;
-		}
-		TilePos posAhead = blockPos.add(direction);
-		Block<?> b = world.getBlock(posAhead);
-		if (b == null || BlockTags.PLACE_OVERWRITES.appliesTo(b) || BlockTags.BROKEN_BY_FLUIDS.appliesTo(b)) {
-			world.setBlockIdNotify(posAhead, this.blockToPlace.id());
-			selfStack.itemID = Items.BUCKET.id;
-		}
-	}
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        if (this.blockToPlace == null) {
+            selfStack.itemID = Items.BUCKET.id;
+            return;
+        }
+        TilePos posAhead = blockPos.add(direction, new TilePos());
+        Block<?> b = world.getBlock(posAhead);
+        if (b == null || BlockTags.PLACE_OVERWRITES.appliesTo(b) || BlockTags.BROKEN_BY_FLUIDS.appliesTo(b)) {
+            world.setBlockIdNotify(posAhead, this.blockToPlace.id());
+            selfStack.itemID = Items.BUCKET.id;
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemBucketEmpty.java b/game/core/src/main/java/net/minecraft/core/item/ItemBucketEmpty.java
index ad9f12dfc..c48450322 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemBucketEmpty.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemBucketEmpty.java
@@ -1,16 +1,18 @@
 package net.minecraft.core.item;
 
 import net.minecraft.core.block.entity.TileEntityActivator;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.animal.MobCow;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.world.World;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
@@ -27,19 +29,19 @@ public class ItemBucketEmpty extends Item {
         double reachDistance = player.getGamemode().getBlockReachDistance();
         HitResult hitResult = player.rayCast(reachDistance, 1f, true, false, false);
 
-        if(hitResult == null) {
+        if (hitResult == null) {
             return selfStack;
         }
-        if(hitResult instanceof HitResult.Tile hitTile) {
-            if(!world.canMineBlock(player, hitTile.tilePos)) {
+        if (hitResult instanceof HitResult.Tile hitTile) {
+            if (!world.canMineBlock(player, hitTile.tilePos)) {
                 return selfStack;
-            } else if(world.getBlockMaterial(hitTile.tilePos) == Material.water && world.getBlockData(hitTile.tilePos) == 0) {
-                if(useBucket(player, new ItemStack(Items.BUCKET_WATER))){
+            } else if (world.getBlockMaterial(hitTile.tilePos) == Materials.WATER && world.getBlockData(hitTile.tilePos) == 0) {
+                if (useBucket(player, new ItemStack(Items.BUCKET_WATER))) {
                     world.setBlockIdNotify(hitTile.tilePos, 0);
                     player.swingItem();
                 }
-            } else if(world.getBlockMaterial(hitTile.tilePos) == Material.lava && world.getBlockData(hitTile.tilePos) == 0) {
-                if(useBucket(player, new ItemStack(Items.BUCKET_LAVA))){
+            } else if (world.getBlockMaterial(hitTile.tilePos) == Materials.LAVA && world.getBlockData(hitTile.tilePos) == 0) {
+                if (useBucket(player, new ItemStack(Items.BUCKET_LAVA))) {
                     world.setBlockIdNotify(hitTile.tilePos, 0);
                     player.swingItem();
                 }
@@ -49,23 +51,23 @@ public class ItemBucketEmpty extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
         if (selfStack.stackSize > 1) { // TODO figure out wtf to do for stacked buckets for this
             return;
         }
 
-        TilePos shiftedPos = blockPos.add(direction);
-        if(world.getBlockMaterial(shiftedPos) == Material.water && world.getBlockData(shiftedPos) == 0) {
+        TilePos shiftedPos = blockPos.add(direction, new TilePos());
+        if (world.getBlockMaterial(shiftedPos) == Materials.WATER && world.getBlockData(shiftedPos) == 0) {
             world.setBlockIdNotify(shiftedPos, 0);
             selfStack.itemID = Items.BUCKET_WATER.id;
             return;
-        } else if(world.getBlockMaterial(shiftedPos) == Material.lava && world.getBlockData(shiftedPos) == 0) {
+        } else if (world.getBlockMaterial(shiftedPos) == Materials.LAVA && world.getBlockData(shiftedPos) == 0) {
             world.setBlockIdNotify(shiftedPos, 0);
             selfStack.itemID = Items.BUCKET_LAVA.id;
             return;
         }
 
-        AABB box = AABB.fromPool(shiftedPos.x, shiftedPos.y, shiftedPos.z, shiftedPos.x + 1, shiftedPos.y + 1, shiftedPos.z + 1);
+        AABBdc box = new AABBd(shiftedPos.x, shiftedPos.y, shiftedPos.z, shiftedPos.x + 1, shiftedPos.y + 1, shiftedPos.z + 1);
         List<MobCow> entities = world.getEntitiesWithinAABB(MobCow.class, box);
         if (!entities.isEmpty()) {
             selfStack.itemID = Items.BUCKET_MILK.id;
@@ -74,15 +76,15 @@ public class ItemBucketEmpty extends Item {
 
     public static boolean useBucket(@NotNull Player player, @NotNull ItemStack itemToGive) {
         ItemStack currentItem = player.inventory.getCurrentItem();
-        if(currentItem == null || currentItem.stackSize <= 1) {
+        if (currentItem == null || currentItem.stackSize <= 1) {
             player.inventory.setItem(player.inventory.getCurrentItemIndex(), itemToGive);
             return true;
         } else {
-        	player.inventory.insertItem(itemToGive, true);
-        	if(itemToGive.stackSize < 1) {
-        		player.inventory.getCurrentItem().consumeItem(player);
-        		return true;
-        	}
+            player.inventory.insertItem(itemToGive, true);
+            if (itemToGive.stackSize < 1) {
+                player.inventory.getCurrentItem().consumeItem(player);
+                return true;
+            }
         }
         return false;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemDiscMusic.java b/game/core/src/main/java/net/minecraft/core/item/ItemDiscMusic.java
index ee9c0eb7f..40deff422 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemDiscMusic.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemDiscMusic.java
@@ -8,19 +8,18 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.world.LevelListener;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class ItemDiscMusic extends Item
-{
+public class ItemDiscMusic extends Item {
     public final @Nullable String recordName;
     public final @Nullable String recordAuthor;
 
 
-    public ItemDiscMusic(@NotNull String name, @NotNull String namespaceId, int id, @Nullable String recordName, @Nullable String recordAuthor)
-    {
+    public ItemDiscMusic(@NotNull String name, @NotNull String namespaceId, int id, @Nullable String recordName, @Nullable String recordAuthor) {
         super(name, namespaceId, id);
         this.recordName = recordName;
         this.recordAuthor = recordAuthor;
@@ -28,8 +27,8 @@ public class ItemDiscMusic extends Item
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-        if(world.getBlockId(blockPos) == Blocks.JUKEBOX.id() && world.getBlockData(blockPos) == 0) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (world.getBlockId(blockPos) == Blocks.JUKEBOX.id() && world.getBlockData(blockPos) == 0) {
             if (!world.isClientSide) {
                 Blocks.JUKEBOX.getLogic().playRecord(world, new TilePos(blockPos), this.id);
                 world.playBlockEvent(null, blockPos, LevelListener.EVENT_JUKEBOX_TOGGLE, this.id);
@@ -41,8 +40,8 @@ public class ItemDiscMusic extends Item
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        TilePos pos = blockPos.add(direction);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        TilePos pos = blockPos.add(direction, new TilePos());
         int b = world.getBlockId(pos);
         if (b == Blocks.JUKEBOX.id() && world.getBlockData(pos) == 0) {
             Blocks.JUKEBOX.getLogic().playRecord(world, new TilePos(pos), this.id);
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemDoor.java b/game/core/src/main/java/net/minecraft/core/item/ItemDoor.java
index 911d15585..5f273a557 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemDoor.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemDoor.java
@@ -12,120 +12,121 @@ import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
 public class ItemDoor extends Item {
-	protected final @NotNull Block<? extends BlockLogicDoor> doorBlockBottom;
-	protected final @NotNull Block<? extends BlockLogicDoor> doorBlockTop;
+    protected final @NotNull Block<? extends BlockLogicDoor> doorBlockBottom;
+    protected final @NotNull Block<? extends BlockLogicDoor> doorBlockTop;
 
-	public ItemDoor(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<? extends BlockLogicDoor> doorBlockBottom, @NotNull Block<? extends BlockLogicDoor> doorBlockTop) {
-		super(name, namespaceId, id);
+    public ItemDoor(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<? extends BlockLogicDoor> doorBlockBottom, @NotNull Block<? extends BlockLogicDoor> doorBlockTop) {
+        super(name, namespaceId, id);
         this.maxStackSize = 64;
         this.doorBlockBottom = doorBlockBottom;
         this.doorBlockTop = doorBlockTop;
     }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		if (player == null) return false;
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(side.getDirection());
-		}
-
-		Direction leftDir = player.getHorizontalPlacementDirection(side).rotate(3);
-		int meta = leftDir.getHorizontalIndex();
-
-		int isSolidBlockLeft = (isSupported(world, blockPos, leftDir, false) ? 1 : 0) + (isSupported(world, blockPos.up(), leftDir, false) ? 1 : 0);
-		int isSolidBlockRight = (isSupported(world, blockPos, leftDir.getOpposite(), true) ? 1 : 0) + (isSupported(world, blockPos.up(), leftDir.getOpposite(), true) ? 1 : 0);
-		boolean isDoorLeft = world.getBlockId(blockPos.add(leftDir)) == this.doorBlockBottom.id() || world.getBlockId(blockPos.add(leftDir).up()) == this.doorBlockTop.id();
-		boolean isDoorRight = world.getBlockId(blockPos.sub(leftDir)) == this.doorBlockBottom.id() || world.getBlockId(blockPos.sub(leftDir).up()) == this.doorBlockTop.id();
-		boolean isMirrored = false;
-
-		if(isDoorLeft && !isDoorRight) {
-			isMirrored = (world.getBlockData(blockPos.add(leftDir)) & BlockLogicDoor.MASK_HINGE) == 0;
-		} else if (isSolidBlockLeft <= 0 || side.getDirection() != leftDir.getOpposite()) {
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (player == null) return false;
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+        }
+
+        Direction leftDir = player.getHorizontalPlacementDirection(side).rotate(3);
+        int meta = leftDir.getHorizontalIndex();
+
+        int isSolidBlockLeft = (isSupported(world, blockPos, leftDir, false) ? 1 : 0) + (isSupported(world, blockPos.up(new TilePos()), leftDir, false) ? 1 : 0);
+        int isSolidBlockRight = (isSupported(world, blockPos, leftDir.getOpposite(), true) ? 1 : 0) + (isSupported(world, blockPos.up(new TilePos()), leftDir.getOpposite(), true) ? 1 : 0);
+        boolean isDoorLeft = world.getBlockId(blockPos.add(leftDir, new TilePos())) == this.doorBlockBottom.id() || world.getBlockId(blockPos.add(leftDir, new TilePos()).up(new TilePos())) == this.doorBlockTop.id();
+        boolean isDoorRight = world.getBlockId(blockPos.sub(leftDir, new TilePos())) == this.doorBlockBottom.id() || world.getBlockId(blockPos.sub(leftDir, new TilePos()).up(new TilePos())) == this.doorBlockTop.id();
+        boolean isMirrored = false;
+
+        if (isDoorLeft && !isDoorRight) {
+            isMirrored = (world.getBlockData(blockPos.add(leftDir, new TilePos())) & BlockLogicDoor.MASK_HINGE) == 0;
+        } else if (isSolidBlockLeft <= 0 || side.getDirection() != leftDir.getOpposite()) {
             if (isSolidBlockRight > 0 && side.getDirection() == leftDir) {
                 isMirrored = true;
             } else if (isSolidBlockRight > isSolidBlockLeft) {
                 isMirrored = true;
             }
         }
-        if(isMirrored) {
-			meta = meta - 1 & 0b11;
-			meta |= 0b100;
-			meta |= 0b1000;
-		}
-		meta |= (DyeColor.colorFromItemMeta(selfStack.getMetadata()).blockMeta) << 4 & 0xF0;
-
-		if(!this.doorBlockBottom.getLogic().canPlaceAt(world, blockPos, meta)) {
-			return false;
-		}
-
-		world.noNeighborUpdate = true;
-		world.setBlockIdDataNotify(blockPos, this.doorBlockBottom.id(), meta);
-		world.setBlockIdDataNotify(blockPos.up(), this.doorBlockTop.id(), meta);
-		world.noNeighborUpdate = false;
-		world.notifyBlocksOfNeighborChange(blockPos, this.doorBlockBottom.id());
-		world.notifyBlocksOfNeighborChange(blockPos.up(), this.doorBlockTop.id());
-		world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.doorBlockBottom, EnumBlockSoundEffectType.PLACE);
+        if (isMirrored) {
+            meta = meta - 1 & 0b11;
+            meta |= 0b100;
+            meta |= 0b1000;
+        }
+        meta |= (DyeColor.colorFromItemMeta(selfStack.getMetadata()).blockMeta) << 4 & 0xF0;
+
+        if (!this.doorBlockBottom.getLogic().canPlaceAt(world, blockPos, meta)) {
+            return false;
+        }
+
+        world.noNeighborUpdate = true;
+        world.setBlockIdDataNotify(blockPos, this.doorBlockBottom.id(), meta);
+        world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.doorBlockTop.id(), meta);
+        world.noNeighborUpdate = false;
+        world.notifyBlocksOfNeighborChange(blockPos, this.doorBlockBottom.id());
+        world.notifyBlocksOfNeighborChange(blockPos.up(new TilePos()), this.doorBlockTop.id());
+        world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.doorBlockBottom, EnumBlockSoundEffectType.PLACE);
         this.doorBlockBottom.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-        this.doorBlockTop.onPlacedByMob(world, blockPos.up(), side, player, xHit, yHit);
-		selfStack.consumeItem(player);
-		return true;
-	}
-
-	public boolean isSupported(@NotNull World world, @NotNull TilePos tilePos, @NotNull Direction direction, boolean mirrored) {
-		ISupport support = world.getSupport(tilePos.add(direction), direction.getSide().getOpposite());
-		return support.canSupport(mirrored ? PartialSupport.INSTANCE.right() : PartialSupport.INSTANCE.left(), direction.getSide());
-	}
-
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(direction);
-		}
-
-		if (!direction.isHorizontal()) direction = Direction.NORTH;
-		Direction lefDir = direction.rotate(3);
-		int meta = lefDir.getHorizontalIndex();
-
-		int isSolidBlockLeft = (isSupported(world, blockPos, lefDir, false) ? 1 : 0) + (isSupported(world, blockPos.up(), lefDir, false) ? 1 : 0);
-		int isSolidBlockRight = (isSupported(world, blockPos, lefDir.getOpposite(), true) ? 1 : 0) + (isSupported(world, blockPos.up(), lefDir.getOpposite(), true) ? 1 : 0);
-		boolean isDoorLeft = world.getBlockId(blockPos.add(lefDir)) == this.doorBlockBottom.id() || world.getBlockId(blockPos.add(lefDir).up()) == this.doorBlockTop.id();
-		boolean isDoorRight = world.getBlockId(blockPos.sub(lefDir)) == this.doorBlockBottom.id() || world.getBlockId(blockPos.sub(lefDir).up()) == this.doorBlockTop.id();
-		boolean isMirrored = false;
-
-		if(isDoorLeft && !isDoorRight) {
-			isMirrored = (world.getBlockData(blockPos.add(lefDir)) & BlockLogicDoor.MASK_HINGE) == 0;
-		} else if (isSolidBlockLeft <= 0 || direction != lefDir.getOpposite()) {
+        this.doorBlockTop.onPlacedByMob(world, blockPos.up(new TilePos()), side, player, xHit, yHit);
+        selfStack.consumeItem(player);
+        return true;
+    }
+
+    public boolean isSupported(@NotNull World world, @NotNull TilePosc tilePos, @NotNull Direction direction, boolean mirrored) {
+        ISupport support = world.getSupport(tilePos.add(direction, new TilePos()), direction.getSide().getOpposite());
+        return support.canSupport(mirrored ? PartialSupport.INSTANCE.right() : PartialSupport.INSTANCE.left(), direction.getSide());
+    }
+
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(direction, new TilePos());
+        }
+
+        if (!direction.isHorizontal()) direction = Direction.NORTH;
+        Direction lefDir = direction.rotate(3);
+        int meta = lefDir.getHorizontalIndex();
+
+        int isSolidBlockLeft = (isSupported(world, blockPos, lefDir, false) ? 1 : 0) + (isSupported(world, blockPos.up(new TilePos()), lefDir, false) ? 1 : 0);
+        int isSolidBlockRight = (isSupported(world, blockPos, lefDir.getOpposite(), true) ? 1 : 0) + (isSupported(world, blockPos.up(new TilePos()), lefDir.getOpposite(), true) ? 1 : 0);
+        boolean isDoorLeft = world.getBlockId(blockPos.add(lefDir, new TilePos())) == this.doorBlockBottom.id() || world.getBlockId(blockPos.add(lefDir, new TilePos()).up(new TilePos())) == this.doorBlockTop.id();
+        boolean isDoorRight = world.getBlockId(blockPos.sub(lefDir, new TilePos())) == this.doorBlockBottom.id() || world.getBlockId(blockPos.sub(lefDir, new TilePos()).up(new TilePos())) == this.doorBlockTop.id();
+        boolean isMirrored = false;
+
+        if (isDoorLeft && !isDoorRight) {
+            isMirrored = (world.getBlockData(blockPos.add(lefDir, new TilePos())) & BlockLogicDoor.MASK_HINGE) == 0;
+        } else if (isSolidBlockLeft <= 0 || direction != lefDir.getOpposite()) {
             if (isSolidBlockRight > 0 && direction == lefDir) {
                 isMirrored = true;
             } else if (isSolidBlockRight > isSolidBlockLeft) {
                 isMirrored = true;
             }
         }
-        if(isMirrored) {
-			meta = meta - 1 & 0b11;
-			meta |= 0b100;
-			meta |= 0b1000;
-		}
-		meta |= (DyeColor.colorFromItemMeta(selfStack.getMetadata()).blockMeta) << 4 & 0xF0;
-		if(!this.doorBlockBottom.getLogic().canPlaceAt(world, blockPos, meta)) {
-			return;
-		}
-
-		world.noNeighborUpdate = true;
-		world.setBlockIdDataNotify(blockPos, this.doorBlockBottom.id(), meta);
-		world.setBlockIdDataNotify(blockPos.up(), this.doorBlockTop.id(), meta);
-		world.noNeighborUpdate = false;
-		world.notifyBlocksOfNeighborChange(blockPos, this.doorBlockBottom.id());
-		world.notifyBlocksOfNeighborChange(blockPos.up(), this.doorBlockTop.id());
-		world.playBlockSoundEffect(null, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.doorBlockBottom, EnumBlockSoundEffectType.PLACE);
+        if (isMirrored) {
+            meta = meta - 1 & 0b11;
+            meta |= 0b100;
+            meta |= 0b1000;
+        }
+        meta |= (DyeColor.colorFromItemMeta(selfStack.getMetadata()).blockMeta) << 4 & 0xF0;
+        if (!this.doorBlockBottom.getLogic().canPlaceAt(world, blockPos, meta)) {
+            return;
+        }
+
+        world.noNeighborUpdate = true;
+        world.setBlockIdDataNotify(blockPos, this.doorBlockBottom.id(), meta);
+        world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.doorBlockTop.id(), meta);
+        world.noNeighborUpdate = false;
+        world.notifyBlocksOfNeighborChange(blockPos, this.doorBlockBottom.id());
+        world.notifyBlocksOfNeighborChange(blockPos.up(new TilePos()), this.doorBlockTop.id());
+        world.playBlockSoundEffect(null, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.doorBlockBottom, EnumBlockSoundEffectType.PLACE);
         this.doorBlockBottom.onPlacedOnSide(world, blockPos, direction.getSide(), 0.5, 0.5);
-        this.doorBlockTop.onPlacedOnSide(world, blockPos.up(), direction.getSide(), 0.5, 0.5);
-		selfStack.consumeItem(null);
-	}
+        this.doorBlockTop.onPlacedOnSide(world, blockPos.up(new TilePos()), direction.getSide(), 0.5, 0.5);
+        selfStack.consumeItem(null);
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemDye.java b/game/core/src/main/java/net/minecraft/core/item/ItemDye.java
index aa53bac2e..48d97f4e0 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemDye.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemDye.java
@@ -18,6 +18,7 @@ import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.type.WorldTypes;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -38,7 +39,7 @@ public class ItemDye extends Item {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xPlaced, double yPlaced) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xPlaced, double yPlaced) {
         Block<?> block = world.getBlock(blockPos);
         if (Block.hasLogicClass(block, BlockLogicSign.class) && world.getTileEntity(blockPos) instanceof TileEntitySign sign) {
             if ((DyeColor.WHITE.itemMeta - selfStack.getMetadata()) != sign.getColor().id) {
@@ -50,39 +51,35 @@ public class ItemDye extends Item {
             }
             return false;
         }
-        if(selfStack.getMetadata() == DyeColor.WHITE.itemMeta) {
-            if (Block.getLogicClass(block) instanceof IBonemealable bonemealable){
-                if (bonemealable.onBonemealUsed(selfStack, player, world, blockPos, side, xPlaced, yPlaced)){
+        if (selfStack.getMetadata() == DyeColor.WHITE.itemMeta) {
+            TilePos queryPos = new TilePos();
+
+            if (Block.getLogicClass(block) instanceof IBonemealable bonemealable) {
+                if (bonemealable.onBonemealUsed(selfStack, player, world, blockPos, side, xPlaced, yPlaced)) {
                     return true;
                 }
             }
-            if(block == Blocks.DIRT)
-            {
-                if(!world.isClientSide)
-                {
-                    if(Blocks.lightBlock[world.getBlockId(blockPos.up())] <= 2) {
+            if (block == Blocks.DIRT) {
+                if (!world.isClientSide) {
+                    if (Blocks.lightBlock[world.getBlockId(blockPos.up(queryPos))] <= 2) {
                         int grass = Blocks.GRASS.id();
-                        if(world.dimensionData.getWorldType() == WorldTypes.OVERWORLD_RETRO) {
+                        if (world.dimensionData.getWorldType() == WorldTypes.OVERWORLD_RETRO) {
                             grass = Blocks.GRASS_RETRO.id();
                         }
                         world.setBlockIdNotify(blockPos, grass);
-                        if (player == null || player.getGamemode().consumeBlocks())
-                        {
+                        if (player == null || player.getGamemode().consumeBlocks()) {
                             selfStack.stackSize--;
                         }
                     }
                 }
                 return true;
             }
-            if(block == Blocks.DIRT_SCORCHED)
-            {
-                if (!world.isClientSide)
-                {
-                    if(Blocks.lightBlock[world.getBlockId(blockPos.up())] <= 2) {
+            if (block == Blocks.DIRT_SCORCHED) {
+                if (!world.isClientSide) {
+                    if (Blocks.lightBlock[world.getBlockId(blockPos.up(queryPos))] <= 2) {
                         int grass = Blocks.GRASS_SCORCHED.id();
                         world.setBlockIdNotify(blockPos, grass);
-                        if (player == null || player.getGamemode().consumeBlocks())
-                        {
+                        if (player == null || player.getGamemode().consumeBlocks()) {
                             selfStack.stackSize--;
                         }
                     }
@@ -90,39 +87,31 @@ public class ItemDye extends Item {
                 return true;
             }
 
-            if(block != null && block.hasTag(BlockTags.GROWS_FLOWERS))
-            {
-                if(!world.isClientSide)
-                {
-                    if (player == null || player.getGamemode().consumeBlocks())
-                    {
+            if (block != null && block.hasTag(BlockTags.GROWS_FLOWERS)) {
+                if (!world.isClientSide) {
+                    if (player == null || player.getGamemode().consumeBlocks()) {
                         selfStack.stackSize--;
                     }
                     TilePos p = new TilePos(blockPos);
                     label0:
-                    for(int j1 = 0; j1 < 128; j1++)
-                    {
-                        p.set(blockPos.x, blockPos.y + 1, blockPos.z);
-                        for(int j2 = 0; j2 < j1 / 16; j2++)
-                        {
+                    for (int j1 = 0; j1 < 128; j1++) {
+                        p.set(blockPos.x(), blockPos.y() + 1, blockPos.z());
+                        for (int j2 = 0; j2 < j1 / 16; j2++) {
                             p.x += itemRand.nextInt(3) - 1;
                             p.y += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2;
                             p.z += itemRand.nextInt(3) - 1;
-                            int id1 = world.getBlockId(p.down());
-                            if(Blocks.blocksList[id1] == null || !Blocks.blocksList[id1].hasTag(BlockTags.GROWS_FLOWERS))
-                            {
+                            int id1 = world.getBlockId(p.down(queryPos));
+                            if (Blocks.blocksList[id1] == null || !Blocks.blocksList[id1].hasTag(BlockTags.GROWS_FLOWERS)) {
                                 continue label0;
                             }
                         }
 
-                        if(world.getBlockId(p) != 0)
-                        {
+                        if (world.getBlockId(p) != 0) {
                             continue;
                         }
-                        if(itemRand.nextInt(10) != 0)
-                        {
-                            if(world.getBlockId(p.down()) == Blocks.DIRT_SCORCHED.id() ||
-                                    world.getBlockId(p.down()) == Blocks.DIRT_SCORCHED_RICH.id())
+                        if (itemRand.nextInt(10) != 0) {
+                            if (world.getBlockId(p.down(queryPos)) == Blocks.DIRT_SCORCHED.id() ||
+                                world.getBlockId(p.down(queryPos)) == Blocks.DIRT_SCORCHED_RICH.id())
                                 world.setBlockIdNotify(p, Blocks.SPINIFEX.id());
                             else
                                 world.setBlockIdNotify(p, Blocks.TALLGRASS.id());
@@ -130,7 +119,7 @@ public class ItemDye extends Item {
                         }
                         int r = itemRand.nextInt(12);
                         Biome biome = world.getBlockBiome(p);
-                        if (r < 1){
+                        if (r < 1) {
                             world.setBlockIdNotify(p, Blocks.FLOWER_YELLOW.id());
                         } else if (r < 2) {
                             world.setBlockIdNotify(p, Blocks.FLOWER_RED.id());
@@ -152,15 +141,15 @@ public class ItemDye extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        onUseOnBlock(selfStack, world, null, blockPos.add(direction), direction.getSide(), 0.5, 0.5);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        onUseOnBlock(selfStack, world, null, blockPos.add(direction, new TilePos()), direction.getSide(), 0.5, 0.5);
     }
 
     @Override
     public boolean useOnEntity(@NotNull ItemStack selfStack, @NotNull Player player, @NotNull Mob mob) {
-        if(mob instanceof MobSheep mobSheep) {
+        if (mob instanceof MobSheep mobSheep) {
             DyeColor woolColor = DyeColor.colorFromItemMeta(selfStack.getMetadata());
-            if(mobSheep.getFleeceColor() != woolColor && selfStack.consumeItem(player)) {
+            if (mobSheep.getFleeceColor() != woolColor && selfStack.consumeItem(player)) {
                 mobSheep.setFleeceColor(woolColor);
                 return true;
             }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemEgg.java b/game/core/src/main/java/net/minecraft/core/item/ItemEgg.java
index 99fc35109..7b08f9f97 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemEgg.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemEgg.java
@@ -5,7 +5,7 @@ import net.minecraft.core.entity.projectile.ProjectileEgg;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -22,15 +22,15 @@ public class ItemEgg extends Item implements IDispensable {
     public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
         selfStack.consumeItem(player);
         world.playSoundAtEntity(player, player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
-        if(!world.isClientSide) {
+        if (!world.isClientSide) {
             world.entityJoinedWorld(new ProjectileEgg(world, player));
         }
         return selfStack;
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        ProjectileEgg projectileEgg = new ProjectileEgg(world, blockPos.x + offX, blockPos.y + offY, blockPos.z + offZ);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        ProjectileEgg projectileEgg = new ProjectileEgg(world, blockPos.x() + offX, blockPos.y() + offY, blockPos.z() + offZ);
         projectileEgg.setHeading(direction.getOffsetX() * 0.6, direction.getOffsetY() == 0 ? 0.1 : direction.getOffsetY() * 0.6, direction.getOffsetZ() * 0.6f, 1.1F, 6F);
         world.entityJoinedWorld(projectileEgg);
         selfStack.stackSize -= 1;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemFireStriker.java b/game/core/src/main/java/net/minecraft/core/item/ItemFireStriker.java
index a78f44def..528e97afb 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemFireStriker.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemFireStriker.java
@@ -13,6 +13,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -23,15 +24,15 @@ public class ItemFireStriker extends Item {
     public ItemFireStriker(@NotNull String name, @NotNull String namespaceId, int id) {
         super(name, namespaceId, id);
         this.maxStackSize = 1;
-        setMaxDamage(ToolMaterial.iron.getDurability()/2);
+        setMaxDamage(ToolMaterial.iron.getDurability() / 2);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-        blockPos = blockPos.add(side.getDirection());
-        if(world.isAirBlock(blockPos)) {
-            if(world.setBlockIdNotify(blockPos, Blocks.FIRE.id())){
-                world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) blockPos.x + 0.5D, (double) blockPos.y + 0.5D, (double) blockPos.z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        blockPos = blockPos.add(side.getDirection(), new TilePos());
+        if (world.isAirBlock(blockPos)) {
+            if (world.setBlockIdNotify(blockPos, Blocks.FIRE.id())) {
+                world.playSoundEffect(player, SoundCategory.WORLD_SOUNDS, (double) blockPos.x() + 0.5D, (double) blockPos.y() + 0.5D, (double) blockPos.z() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
                 selfStack.damageItem(1, player);
                 return true;
             }
@@ -41,20 +42,21 @@ public class ItemFireStriker extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
         if (!onUseOnBlock(selfStack, world, null, blockPos, direction.getSide(), 0.5, 0.5)) {
-            blockPos = blockPos.add(direction);
+            blockPos = blockPos.add(direction, new TilePos());
+            TilePos queryPos = new TilePos();
             Block<?> b = world.getBlock(blockPos);
             if (Block.getLogicClass(b) instanceof BlockLogicBrazier brazier && brazier.isBurning()) {
-                if (Block.hasLogicClass(world.getBlock(blockPos.east()), BlockLogicFluid.class) ||
-                    Block.hasLogicClass(world.getBlock(blockPos.west()), BlockLogicFluid.class) ||
-                    Block.hasLogicClass(world.getBlock(blockPos.south()), BlockLogicFluid.class) ||
-                    Block.hasLogicClass(world.getBlock(blockPos.north()), BlockLogicFluid.class)) {
+                if (Block.hasLogicClass(world.getBlock(blockPos.east(queryPos)), BlockLogicFluid.class) ||
+                    Block.hasLogicClass(world.getBlock(blockPos.west(queryPos)), BlockLogicFluid.class) ||
+                    Block.hasLogicClass(world.getBlock(blockPos.south(queryPos)), BlockLogicFluid.class) ||
+                    Block.hasLogicClass(world.getBlock(blockPos.north(queryPos)), BlockLogicFluid.class)) {
                     return;
                 }
                 world.setBlockIdDataNotify(blockPos, Blocks.BRAZIER_ACTIVE.id(), 0);
                 selfStack.damageItem(1, null);
-                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) blockPos.x + 0.5D, (double) blockPos.y + 0.5D, (double) blockPos.z + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
+                world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, (double) blockPos.x() + 0.5D, (double) blockPos.y() + 0.5D, (double) blockPos.z() + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
             } else if (Block.getLogicClass(b) instanceof BlockLogicTNT tnt) {
                 tnt.ignite(world, new TilePos(blockPos), true);
             }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemFlag.java b/game/core/src/main/java/net/minecraft/core/item/ItemFlag.java
index 7522667ca..1289b5f73 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemFlag.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemFlag.java
@@ -12,6 +12,7 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.helper.UUIDHelper;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -23,14 +24,14 @@ public class ItemFlag extends Item {
 
     @Override
     public @NotNull String getLanguageKey(@NotNull ItemStack selfStack) {
-    	if(hasFlagBeenDrawnOn(selfStack) || doesFlagContainDyes(selfStack)) {
-    		return getKey() + ".modified";
-    	}
+        if (hasFlagBeenDrawnOn(selfStack) || doesFlagContainDyes(selfStack)) {
+            return getKey() + ".modified";
+        }
         return super.getLanguageKey(selfStack);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         // copy flag data to empty flag
         if (world.getBlockId(blockPos) == Blocks.FLAG.id() && player != null && !player.isSneaking()) {
             if (world.getTileEntity(blockPos) instanceof TileEntityFlag flag) {
@@ -47,29 +48,29 @@ public class ItemFlag extends Item {
             }
         }
 
-        if(side == Side.BOTTOM) {
+        if (side == Side.BOTTOM) {
             return false;
         }
 
-        if(!world.getBlockMaterial(blockPos).isSolid()) {
+        if (!world.getBlockMaterial(blockPos).isSolid()) {
             return false;
         }
 
-        if(!world.canPlaceInsideBlock(blockPos)) {
-            blockPos = blockPos.add(side.getDirection());
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
         }
-        if(blockPos.y < 0 || blockPos.y >= world.getHeightBlocks()) {
+        if (blockPos.y() < 0 || blockPos.y() >= world.getHeightBlocks()) {
             return false;
         }
-        if(!Blocks.SIGN_POST_PLANKS_OAK.canPlaceAt(world, blockPos)) {
+        if (!Blocks.SIGN_POST_PLANKS_OAK.canPlaceAt(world, blockPos)) {
             return false;
         }
 
-        world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.FLAG, EnumBlockSoundEffectType.PLACE);
+        world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.FLAG, EnumBlockSoundEffectType.PLACE);
         world.setBlockIdDataNotify(blockPos, Blocks.FLAG.id(), 0);
 
         selfStack.consumeItem(player);
-        if(world.getTileEntity(blockPos) instanceof TileEntityFlag flag) {
+        if (world.getTileEntity(blockPos) instanceof TileEntityFlag flag) {
             CompoundTag flagData = selfStack.getData().getCompoundOrDefault("FlagData", null);
             if (flagData != null) {
                 flag.readAdditionalData(flagData);
@@ -83,32 +84,32 @@ public class ItemFlag extends Item {
     }
 
     public boolean hasFlagBeenDrawnOn(@NotNull ItemStack selfStack) {
-    	CompoundTag flagData = selfStack.getData().getCompound("FlagData");
-    	if(flagData == null) {
-    		return false;
-    	}
-
-    	byte[] colors = flagData.getByteArray("Colors");
-    	if(colors == null) {
-    		return false;
-    	}
-
-    	for(int i=0; i < colors.length; i++) {
-    		if(colors[i] != 0) {
-    			return true;
-    		}
-    	}
-    	
-    	return false;
+        CompoundTag flagData = selfStack.getData().getCompound("FlagData");
+        if (flagData == null) {
+            return false;
+        }
+
+        byte[] colors = flagData.getByteArray("Colors");
+        if (colors == null) {
+            return false;
+        }
+
+        for (int i = 0; i < colors.length; i++) {
+            if (colors[i] != 0) {
+                return true;
+            }
+        }
+
+        return false;
     }
-    
+
     public boolean doesFlagContainDyes(@NotNull ItemStack selfStack) {
-    	CompoundTag flagData = selfStack.getData().getCompound("FlagData");
-    	if(flagData == null) {
-    		return false;
-    	}
-    	
-    	ListTag items = flagData.getList("Items");
-    	return items != null && items.tagCount() > 0;
+        CompoundTag flagData = selfStack.getData().getCompound("FlagData");
+        if (flagData == null) {
+            return false;
+        }
+
+        ListTag items = flagData.getList("Items");
+        return items != null && items.tagCount() > 0;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemJar.java b/game/core/src/main/java/net/minecraft/core/item/ItemJar.java
index 9e2a44396..f1327289c 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemJar.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemJar.java
@@ -5,11 +5,13 @@ import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.animal.MobButterfly;
 import net.minecraft.core.entity.animal.MobFireflyCluster;
 import net.minecraft.core.entity.player.Player;
+import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 
@@ -21,14 +23,14 @@ public class ItemJar extends ItemPlaceable {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (player != null && player.isSneaking()) {
             return super.onUseOnBlock(selfStack, world, player, blockPos, side, xHit, yHit);
         }
         if (player != null) {
             int count = selfStack.stackSize;
             ItemStack used = onUse(selfStack, world, player);
-            if (used != null && used.stackSize != count){
+            if (used != null && used.stackSize != count) {
                 return true;
             }
         }
@@ -40,29 +42,26 @@ public class ItemJar extends ItemPlaceable {
         if (player.isSneaking()) {
             return selfStack;
         }
-        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(player,player.bb.grow(2, 2, 2));
+        List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(player, MathHelper.aabbGrow(player.bb, 2, 2, 2, new AABBd()));
 
-        for(Entity entity : list){
-            if(entity instanceof MobFireflyCluster fireflyCluster) {
+        for (Entity entity : list) {
+            if (entity instanceof MobFireflyCluster fireflyCluster) {
                 MobFireflyCluster.FireflyColor colour = fireflyCluster.getColor();
 
                 boolean didFillJar;
-                if(colour == MobFireflyCluster.FireflyColor.BLUE){
+                if (colour == MobFireflyCluster.FireflyColor.BLUE) {
                     didFillJar = fillJar(player, new ItemStack(Items.LANTERN_FIREFLY_BLUE, 1));
-                }
-                else if(colour == MobFireflyCluster.FireflyColor.ORANGE){
+                } else if (colour == MobFireflyCluster.FireflyColor.ORANGE) {
                     didFillJar = fillJar(player, new ItemStack(Items.LANTERN_FIREFLY_ORANGE, 1));
-                }
-                else if(colour == MobFireflyCluster.FireflyColor.RED){
+                } else if (colour == MobFireflyCluster.FireflyColor.RED) {
                     didFillJar = fillJar(player, new ItemStack(Items.LANTERN_FIREFLY_RED, 1));
-                }
-                else{
+                } else {
                     didFillJar = fillJar(player, new ItemStack(Items.LANTERN_FIREFLY_GREEN, 1));
                 }
 
-                if(!world.isClientSide && didFillJar) {
+                if (!world.isClientSide && didFillJar) {
                     fireflyCluster.setFireflyCount(fireflyCluster.getFireflyCount() - 1);
-                    if(fireflyCluster.getFireflyCount() <= 0) {
+                    if (fireflyCluster.getFireflyCount() <= 0) {
                         fireflyCluster.remove();
                     }
                 }
@@ -73,7 +72,7 @@ public class ItemJar extends ItemPlaceable {
 
                 boolean didFillJar = fillJar(player, new ItemStack(color.jarItem.get(), 1));
 
-                if(!world.isClientSide && didFillJar) {
+                if (!world.isClientSide && didFillJar) {
                     butterfly.remove();
                 }
 
@@ -85,12 +84,12 @@ public class ItemJar extends ItemPlaceable {
 
     public static boolean fillJar(@NotNull Player player, @NotNull ItemStack itemToGive) {
         ItemStack currentItem = player.inventory.getCurrentItem();
-        if(currentItem == null || currentItem.stackSize <= 1) {
+        if (currentItem == null || currentItem.stackSize <= 1) {
             player.inventory.setItem(player.inventory.getCurrentItemIndex(), itemToGive);
         } else {
-        	player.inventory.insertItem(itemToGive, true);
+            player.inventory.insertItem(itemToGive, true);
         }
-        if(itemToGive.stackSize < 1) {
+        if (itemToGive.stackSize < 1) {
             player.swingItem();
             player.inventory.getCurrentItem().consumeItem(player);
             return true;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemLabel.java b/game/core/src/main/java/net/minecraft/core/item/ItemLabel.java
index cdc1befc8..4a3831aa0 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemLabel.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemLabel.java
@@ -6,11 +6,13 @@ import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
@@ -21,44 +23,44 @@ public class ItemLabel extends Item {
         setMaxStackSize(1);
     }
 
-	@Override
-	public @Nullable ItemStack onUse(final @NotNull ItemStack selfStack, final @NotNull World world, final @NotNull Player player) {
-		if(selfStack.hasCustomName()) {
-			return selfStack;
-		}
-		
-		int slot = -1;
+    @Override
+    public @Nullable ItemStack onUse(final @NotNull ItemStack selfStack, final @NotNull World world, final @NotNull Player player) {
+        if (selfStack.hasCustomName()) {
+            return selfStack;
+        }
 
-		// Get inventory slot
-		for(int i = 0; i < player.inventory.mainInventory.length; i++) {
-			if(player.inventory.mainInventory[i] == selfStack) {
-				slot = i;
-				break;
-			}
-		}
+        int slot = -1;
 
-		if(slot != -1) {
-			player.displayLabelEditorScreen(selfStack, slot);
-		}
-		return selfStack;
-	}
+        // Get inventory slot
+        for (int i = 0; i < player.inventory.mainInventory.length; i++) {
+            if (player.inventory.mainInventory[i] == selfStack) {
+                slot = i;
+                break;
+            }
+        }
 
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		String customName = selfStack.getCustomName();
-		if (customName == null) return;
-		blockPos = blockPos.add(direction);
-		AABB box = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1, blockPos.y + 1, blockPos.z + 1);
-		List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
-		for (Entity entity : entities) {
-			if (entity instanceof Player) continue;
-			if (entity instanceof Mob mob && !entity.hadNicknameSet) {
-				if (selfStack.hasCustomColor()) {
-					mob.chatColor = selfStack.getCustomColor();
-				}
-				mob.setNickname(StringUtils.substring(customName, 0, 32));
-				break;
-			}
-		}
-	}
+        if (slot != -1) {
+            player.displayLabelEditorScreen(selfStack, slot);
+        }
+        return selfStack;
+    }
+
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        String customName = selfStack.getCustomName();
+        if (customName == null) return;
+        blockPos = blockPos.add(direction, new TilePos());
+        AABBdc box = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1, blockPos.y() + 1, blockPos.z() + 1);
+        List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
+        for (Entity entity : entities) {
+            if (entity instanceof Player) continue;
+            if (entity instanceof Mob mob && !entity.hadNicknameSet) {
+                if (selfStack.hasCustomColor()) {
+                    mob.chatColor = selfStack.getCustomColor();
+                }
+                mob.setNickname(StringUtils.substring(customName, 0, 32));
+                break;
+            }
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemMap.java b/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
index dc19908f4..1b00dd329 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
@@ -6,7 +6,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntityFlag;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.lang.I18n;
@@ -19,6 +19,7 @@ import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.block.material.MaterialColor;
 import net.minecraft.core.world.pos.ChunkTilePos;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.saveddata.maps.ItemMapSavedData;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -124,7 +125,7 @@ public class ItemMap extends Item implements IComplexItem
 	}
 
 	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
 		if (world.getBlockId(blockPos) == Blocks.FLAG.id()) {
 			if (hasInitialized(selfStack)) {
 				for (byte scale = 0; scale <= ItemMapSavedData.MAX_SCALE; scale++) {
@@ -231,11 +232,11 @@ public class ItemMap extends Item implements IComplexItem
 										height--;
 									}
 								} while (runLoop);
-								if(Blocks.blocksList[id].getMaterial() == Material.water) {
+								if(Blocks.blocksList[id].getMaterial() == Materials.WATER) {
 									int _y = height;
                                     int _blockID = chunk.getBlockId(tempChunkPos.set(_x + blockInChunkX, _y--, _z + blockInChunkZ));
                                     waterDepth++;
-                                    while (_y > 0 && _blockID > 0 && Blocks.blocksList[_blockID].getMaterial() == Material.water) {
+                                    while (_y > 0 && _blockID > 0 && Blocks.blocksList[_blockID].getMaterial() == Materials.WATER) {
                                         _blockID = chunk.getBlockId(tempChunkPos.set(_x + blockInChunkX, _y--, _z + blockInChunkZ));
                                         waterDepth++;
                                     }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemMinecart.java b/game/core/src/main/java/net/minecraft/core/item/ItemMinecart.java
index 0059bf52d..0b0898cc4 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemMinecart.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemMinecart.java
@@ -11,6 +11,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -25,12 +26,12 @@ public class ItemMinecart extends Item {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         Block<?> block = world.getBlock(blockPos);
         if (!Block.hasLogicClass(block, BlockLogicRail.class)) { return false; }
 
         if(!world.isClientSide) {
-            world.entityJoinedWorld(new EntityMinecart(world, (float) blockPos.x + 0.5F, (float) blockPos.y + 0.5F, (float) blockPos.z + 0.5F, this.minecartType));
+            world.entityJoinedWorld(new EntityMinecart(world, (float) blockPos.x() + 0.5F, (float) blockPos.y() + 0.5F, (float) blockPos.z() + 0.5F, this.minecartType));
         }
         if (player == null || player.getGamemode().consumeBlocks()) {
             selfStack.stackSize--;
@@ -39,7 +40,7 @@ public class ItemMinecart extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        onUseOnBlock(selfStack, world, null, blockPos.add(direction), direction.getSide(), 0.5, 0.5);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        onUseOnBlock(selfStack, world, null, blockPos.add(direction, new TilePos()), direction.getSide(), 0.5, 0.5);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemPaintBrush.java b/game/core/src/main/java/net/minecraft/core/item/ItemPaintBrush.java
index 995d2e7be..881ceeb67 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemPaintBrush.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemPaintBrush.java
@@ -16,11 +16,13 @@ import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
@@ -35,7 +37,7 @@ public class ItemPaintBrush extends Item {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         final int id = world.getBlockId(blockPos);
         final Block<?> block = Blocks.getBlock(id);
 
@@ -50,7 +52,7 @@ public class ItemPaintBrush extends Item {
             if (!paintable.canBePainted()) return false;
             final DyeColor color = getColor(selfStack);
             if (color != null) {
-                if (paintable instanceof IPainted && ((IPainted)paintable).getColor(world, blockPos) == color) {
+                if (paintable instanceof IPainted && ((IPainted) paintable).getColor(world, blockPos) == color) {
                     return false;
                 }
                 paintable.setColor(world, blockPos, color);
@@ -63,15 +65,15 @@ public class ItemPaintBrush extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        blockPos = blockPos.add(direction);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
         if (!onUseOnBlock(selfStack, world, null, blockPos, direction.getSide(), 0.5, 0.5)) {
-            AABB box = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1, blockPos.y + 1, blockPos.z + 1);
+            AABBdc box = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1, blockPos.y() + 1, blockPos.z() + 1);
             List<MobSheep> entities = world.getEntitiesWithinAABB(MobSheep.class, box);
             if (!entities.isEmpty()) {
                 MobSheep sheep = entities.get(0);
                 DyeColor woolColor = getColor(selfStack);
-                if(woolColor != null && sheep.getFleeceColor() != woolColor) {
+                if (woolColor != null && sheep.getFleeceColor() != woolColor) {
                     sheep.setFleeceColor(woolColor);
                     consumePaint(selfStack, null);
                 }
@@ -90,9 +92,9 @@ public class ItemPaintBrush extends Item {
 
     @Override
     public boolean useOnEntity(@NotNull ItemStack selfStack, @NotNull Player player, @NotNull Mob mob) {
-        if(mob instanceof MobSheep mobSheep) {
+        if (mob instanceof MobSheep mobSheep) {
             DyeColor woolColor = getColor(selfStack);
-            if(woolColor != null && mobSheep.getFleeceColor() != woolColor) {
+            if (woolColor != null && mobSheep.getFleeceColor() != woolColor) {
                 mobSheep.setFleeceColor(woolColor);
                 consumePaint(selfStack, player);
                 return true;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemPainting.java b/game/core/src/main/java/net/minecraft/core/item/ItemPainting.java
index dc56b1f5b..dfd7bfdfa 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemPainting.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemPainting.java
@@ -6,14 +6,13 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class ItemPainting extends Item {
 
-    public ItemPainting(@NotNull String name, @NotNull String namespaceId, int id)
-    {
+    public ItemPainting(@NotNull String name, @NotNull String namespaceId, int id) {
         super(name, namespaceId, id);
     }
 
@@ -26,7 +25,7 @@ public class ItemPainting extends Item {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (side.isVertical() || player == null) return false;
         int direction = switch (side) {
             case NORTH -> 0;
@@ -35,12 +34,12 @@ public class ItemPainting extends Item {
             case EAST -> 3;
             default -> 0;
         };
-        EntityPainting entity = new EntityPainting(world, blockPos.x, blockPos.y, blockPos.z, direction, player.getSelectedArt().key);
-        if(entity.canStay()) {
-            if(!world.isClientSide) {
+        EntityPainting entity = new EntityPainting(world, blockPos.x(), blockPos.y(), blockPos.z(), direction, player.getSelectedArt().key);
+        if (entity.canStay()) {
+            if (!world.isClientSide) {
                 world.entityJoinedWorld(entity);
             }
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
             selfStack.consumeItem(player);
             return true;
         }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemPebble.java b/game/core/src/main/java/net/minecraft/core/item/ItemPebble.java
index 9be945ce1..e66293138 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemPebble.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemPebble.java
@@ -8,11 +8,13 @@ import net.minecraft.core.entity.projectile.ProjectilePebble;
 import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Random;
 
@@ -27,14 +29,14 @@ public class ItemPebble extends Item implements IDispensable {
     public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
         selfStack.consumeItem(player);
         world.playSoundAtEntity(player, player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
-        if(!world.isClientSide) {
+        if (!world.isClientSide) {
             world.entityJoinedWorld(new ProjectilePebble(world, player));
         }
         return selfStack;
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (player == null) return false;
         int id = world.getBlockId(blockPos);
         int meta = world.getBlockData(blockPos);
@@ -45,20 +47,20 @@ public class ItemPebble extends Item implements IDispensable {
         if (selfStack.stackSize <= 0) {
             return false;
         }
-        if (blockPos.y == world.getHeightBlocks() - 1 && Blocks.OVERLAY_PEBBLES.getMaterial().isSolid()) {
+        if (blockPos.y() == world.getHeightBlocks() - 1 && Blocks.OVERLAY_PEBBLES.getMaterial().isSolid()) {
             return false;
         }
 
         // Check if we're placing "inside" a layer
         if (id == Blocks.OVERLAY_PEBBLES.id() && side == Side.TOP) {
             final int newMeta = meta + 1;
-            if (!world.canPlaceOnSurfaceOfBlock(blockPos.down())) {
+            if (!world.canPlaceOnSurfaceOfBlock(blockPos.down(new TilePos()))) {
                 return false;
             }
 
             if (newMeta < 3) {
                 world.setBlockIdDataNotify(blockPos, Blocks.OVERLAY_PEBBLES.id(), newMeta);
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
@@ -68,7 +70,7 @@ public class ItemPebble extends Item implements IDispensable {
 
         // Offset position
         if (id != 0) {
-            blockPos = blockPos.add(side.getDirection());
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
             id = world.getBlockId(blockPos);
             meta = world.getBlockData(blockPos);
         }
@@ -77,14 +79,14 @@ public class ItemPebble extends Item implements IDispensable {
         if (id == Blocks.OVERLAY_PEBBLES.id()) {
             final int newMeta = meta + 1;
 
-            final AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + (2 * (newMeta + 1)) / 16.0f, blockPos.z + 1f);
-            if (!world.checkIfAABBIsClear(bbBox) || !world.canPlaceOnSurfaceOfBlock(blockPos.down())) {
+            final AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + (2 * (newMeta + 1)) / 16.0f, blockPos.z() + 1f);
+            if (!world.checkIfAABBIsClear(bbBox) || !world.canPlaceOnSurfaceOfBlock(blockPos.down(new TilePos()))) {
                 return false;
             }
 
             if (newMeta < 3) {
                 world.setBlockIdDataNotify(blockPos, Blocks.OVERLAY_PEBBLES.id(), newMeta);
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
@@ -92,10 +94,10 @@ public class ItemPebble extends Item implements IDispensable {
         }
 
         // Regular placement, as all else fails
-        if (world.canBlockIdBePlacedAt(Blocks.OVERLAY_PEBBLES.id(), blockPos, false, side) && world.canPlaceOnSurfaceOfBlock(blockPos.down())) {
+        if (world.canBlockIdBePlacedAt(Blocks.OVERLAY_PEBBLES.id(), blockPos, false, side) && world.canPlaceOnSurfaceOfBlock(blockPos.down(new TilePos()))) {
             if (world.setBlockIdDataNotify(blockPos, Blocks.OVERLAY_PEBBLES.id(), 0)) {
                 Blocks.OVERLAY_PEBBLES.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.OVERLAY_PEBBLES, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
@@ -104,8 +106,8 @@ public class ItemPebble extends Item implements IDispensable {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        ProjectilePebble projectilePebble = new ProjectilePebble(world, blockPos.x + offX, blockPos.y + offY, blockPos.z + offZ);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        ProjectilePebble projectilePebble = new ProjectilePebble(world, blockPos.x() + offX, blockPos.y() + offY, blockPos.z() + offZ);
         projectilePebble.setHeading(direction.getOffsetX() * 0.6, direction.getOffsetY() == 0 ? 0.1 : direction.getOffsetY() * 0.6, direction.getOffsetZ() * 0.6f, 1.1F, 6F);
         world.entityJoinedWorld(projectilePebble);
         selfStack.stackSize -= 1;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemPlaceable.java b/game/core/src/main/java/net/minecraft/core/item/ItemPlaceable.java
index f887baf03..212e44032 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemPlaceable.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemPlaceable.java
@@ -10,58 +10,59 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
 public class ItemPlaceable extends Item {
-	
-	public final @NotNull Block<?> blockToPlace;
-	
-	public ItemPlaceable(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> blockToPlace) {
-		super(name, namespaceId, id);
-		
-		this.blockToPlace = blockToPlace;
-	}
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		if(selfStack.stackSize <= 0) {
-			return false;
-		}
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(side.getDirection());
-		}
-		if(blockPos.y < 0 || blockPos.y >= world.getHeightBlocks()) {
-			return false;
-		}
-		if(world.canBlockIdBePlacedAt(this.blockToPlace.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
-			if(world.setBlockIdNotify(blockPos, this.blockToPlace.id())) {
-				if (player == null) {
+    public final @NotNull Block<?> blockToPlace;
+
+    public ItemPlaceable(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> blockToPlace) {
+        super(name, namespaceId, id);
+
+        this.blockToPlace = blockToPlace;
+    }
+
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (selfStack.stackSize <= 0) {
+            return false;
+        }
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+        }
+        if (blockPos.y() < 0 || blockPos.y() >= world.getHeightBlocks()) {
+            return false;
+        }
+        if (world.canBlockIdBePlacedAt(this.blockToPlace.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
+            if (world.setBlockIdNotify(blockPos, this.blockToPlace.id())) {
+                if (player == null) {
                     this.blockToPlace.onPlacedOnSide(world, blockPos, side, xHit, yHit);
-				} else {
+                } else {
                     this.blockToPlace.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-				}
-				if (this.blockToPlace.isEntityTile && selfStack.getData().containsKey("tileEntityData")) {
-					TileEntity tileEntity = world.getTileEntity(blockPos);
-					if (tileEntity != null) {
-						tileEntity.readAdditionalData(selfStack.getData().getCompound("tileEntityData"));
-					}
-				}
-				world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.blockToPlace, EnumBlockSoundEffectType.PLACE);
-				return true;
-			}
-		}
-		return false;
-	}
+                }
+                if (this.blockToPlace.isEntityTile && selfStack.getData().containsKey("tileEntityData")) {
+                    TileEntity tileEntity = world.getTileEntity(blockPos);
+                    if (tileEntity != null) {
+                        tileEntity.readAdditionalData(selfStack.getData().getCompound("tileEntityData"));
+                    }
+                }
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.blockToPlace, EnumBlockSoundEffectType.PLACE);
+                return true;
+            }
+        }
+        return false;
+    }
 
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		blockPos = blockPos.add(direction);
-		Block<?> b = world.getBlock(blockPos);
-		if (b == null || BlockTags.PLACE_OVERWRITES.appliesTo(b)) {
-			onUseOnBlock(selfStack, world, null, blockPos, direction.getSide(), 0.5, 0.5);
-		}
-	}
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
+        Block<?> b = world.getBlock(blockPos);
+        if (b == null || BlockTags.PLACE_OVERWRITES.appliesTo(b)) {
+            onUseOnBlock(selfStack, world, null, blockPos, direction.getSide(), 0.5, 0.5);
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemRope.java b/game/core/src/main/java/net/minecraft/core/item/ItemRope.java
index ec986bc8f..083e383ca 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemRope.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemRope.java
@@ -7,6 +7,7 @@ import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -16,22 +17,23 @@ public class ItemRope extends ItemPlaceable {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-        if(selfStack.stackSize <= 0) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (selfStack.stackSize <= 0) {
             return false;
         }
+        TilePos bp = new TilePos(blockPos);
         boolean placeOnSide = true;
-        if (world.getBlock(blockPos) == this.blockToPlace && player != null && !player.isSneaking()){
+        if (world.getBlock(bp) == this.blockToPlace && player != null && !player.isSneaking()) {
             placeOnSide = false;
-            TilePos tempPos = new TilePos(blockPos);
-            int _y = blockPos.y;
-            while (_y > 0){
+            TilePos tempPos = new TilePos(bp);
+            int _y = bp.y;
+            while (_y > 0) {
                 _y--;
-                if (world.canBlockIdBePlacedAt(this.blockToPlace.id(), tempPos.set(blockPos.x, _y, blockPos.z), false, side)){
-                    blockPos.y = _y;
+                if (world.canBlockIdBePlacedAt(this.blockToPlace.id(), tempPos.set(bp.x, _y, bp.z), false, side)) {
+                    bp.y = _y;
                     break;
-                } else if (world.getBlock(tempPos.sub(blockPos.x, _y, blockPos.z)) != this.blockToPlace) {
-                    if(side == Side.TOP) {
+                } else if (world.getBlock(tempPos.sub(bp.x, _y, bp.z, new TilePos())) != this.blockToPlace) {
+                    if (side == Side.TOP) {
                         break;
                     }
                     return true;
@@ -39,20 +41,20 @@ public class ItemRope extends ItemPlaceable {
             }
 
         }
-        if(!world.canPlaceInsideBlock(blockPos)) {
-            blockPos = blockPos.add(side.getDirection());
+        if (!world.canPlaceInsideBlock(bp)) {
+            bp = bp.add(side.getDirection(), new TilePos());
         }
-        if(blockPos.y < 0 || blockPos.y >= world.getHeightBlocks()) {
+        if (bp.y < 0 || bp.y >= world.getHeightBlocks()) {
             return false;
         }
-        if(world.canBlockIdBePlacedAt(this.blockToPlace.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
-            if(world.setBlockIdDataNotify(blockPos, this.blockToPlace.id(), placeOnSide ? BlockLogicRope.MASK_ROPE_CONNECT : 0)) {
+        if (world.canBlockIdBePlacedAt(this.blockToPlace.id(), bp, false, side) && selfStack.consumeItem(player)) {
+            if (world.setBlockIdDataNotify(bp, this.blockToPlace.id(), placeOnSide ? BlockLogicRope.MASK_ROPE_CONNECT : 0)) {
                 if (player == null) {
-                    this.blockToPlace.onPlacedOnSide(world, blockPos, side, xHit, yHit);
+                    this.blockToPlace.onPlacedOnSide(world, bp, side, xHit, yHit);
                 } else {
-                    this.blockToPlace.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
+                    this.blockToPlace.onPlacedByMob(world, bp, side, player, xHit, yHit);
                 }
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.blockToPlace, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, bp.x + 0.5F, bp.y + 0.5F, bp.z + 0.5F, this.blockToPlace, EnumBlockSoundEffectType.PLACE);
                 return true;
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemSeeds.java b/game/core/src/main/java/net/minecraft/core/item/ItemSeeds.java
index 5838e868b..a9018839a 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemSeeds.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemSeeds.java
@@ -12,41 +12,42 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
 public class ItemSeeds extends Item {
-	private final @NotNull Block<?> cropsBlock;
+    private final @NotNull Block<?> cropsBlock;
 
-	public ItemSeeds(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> cropsBlock) {
-		super(name, namespaceId, id);
-		this.cropsBlock = cropsBlock;
-	}
+    public ItemSeeds(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> cropsBlock) {
+        super(name, namespaceId, id);
+        this.cropsBlock = cropsBlock;
+    }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(side.getDirection());
-		}
-		if(world.getBlockId(blockPos.down()) == Blocks.FARMLAND_DIRT.id() && world.canPlaceInsideBlock(blockPos)) {
-			if(world.setBlockIdNotify(blockPos, this.cropsBlock.id())) {
-				world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.cropsBlock, EnumBlockSoundEffectType.PLACE);
-				selfStack.consumeItem(player);
-				return true;
-			}
-		}
-		return false;
-	}
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+        }
+        if (world.getBlockId(blockPos.down(new TilePos())) == Blocks.FARMLAND_DIRT.id() && world.canPlaceInsideBlock(blockPos)) {
+            if (world.setBlockIdNotify(blockPos, this.cropsBlock.id())) {
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.cropsBlock, EnumBlockSoundEffectType.PLACE);
+                selfStack.consumeItem(player);
+                return true;
+            }
+        }
+        return false;
+    }
 
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		blockPos = blockPos.add(direction);
-		Block<?> b = world.getBlock(blockPos);
-		boolean isFarmland = Block.hasLogicClass(b, BlockLogicFarmland.class);
-		if (b == null || isFarmland || BlockTags.PLACE_OVERWRITES.appliesTo(b)) {
-			onUseOnBlock(selfStack, world, null, blockPos.add(0, isFarmland ? 1 : 0, 0), direction.getSide(), 0.5, 0.5);
-		}
-	}
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
+        Block<?> b = world.getBlock(blockPos);
+        boolean isFarmland = Block.hasLogicClass(b, BlockLogicFarmland.class);
+        if (b == null || isFarmland || BlockTags.PLACE_OVERWRITES.appliesTo(b)) {
+            onUseOnBlock(selfStack, world, null, blockPos.add(0, isFarmland ? 1 : 0, 0, new TilePos()), direction.getSide(), 0.5, 0.5);
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemSign.java b/game/core/src/main/java/net/minecraft/core/item/ItemSign.java
index dc56c5d7f..4ccbb112d 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemSign.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemSign.java
@@ -9,40 +9,39 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class ItemSign extends Item
-{
+public class ItemSign extends Item {
 
-    public ItemSign(@NotNull String name, @NotNull String namespaceId, int id)
-    {
+    public ItemSign(@NotNull String name, @NotNull String namespaceId, int id) {
         super(name, namespaceId, id);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (player == null || side == Side.BOTTOM || !world.getBlockMaterial(blockPos).isSolid()) {
             return false;
         }
 
-        if(!world.canPlaceInsideBlock(blockPos)) {
-            blockPos.add(side.getDirection());
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
         }
 
-        if (blockPos.y < 0 || blockPos.y >= world.getHeightBlocks() || !Blocks.SIGN_POST_PLANKS_OAK.canPlaceAt(world, blockPos)) {
+        if (blockPos.y() < 0 || blockPos.y() >= world.getHeightBlocks() || !Blocks.SIGN_POST_PLANKS_OAK.canPlaceAt(world, blockPos)) {
             return false;
         }
 
-        if(side == Side.TOP) {
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.SIGN_POST_PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
-            world.setBlockIdDataNotify(blockPos, Blocks.SIGN_POST_PLANKS_OAK.id(), MathHelper.floor((double)(((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
+        if (side == Side.TOP) {
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.SIGN_POST_PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
+            world.setBlockIdDataNotify(blockPos, Blocks.SIGN_POST_PLANKS_OAK.id(), MathHelper.floor((double) (((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
         } else {
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.SIGN_WALL_PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.SIGN_WALL_PLANKS_OAK, EnumBlockSoundEffectType.PLACE);
             world.setBlockIdDataNotify(blockPos, Blocks.SIGN_WALL_PLANKS_OAK.id(), side.getId());
         }
         selfStack.consumeItem(player);
-        if(world.getTileEntity(blockPos) instanceof TileEntitySign sign) {
+        if (world.getTileEntity(blockPos) instanceof TileEntitySign sign) {
             if (selfStack.getData().containsKey("tileEntityData")) {
                 sign.readAdditionalData(selfStack.getData().getCompound("tileEntityData"));
             } else {
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemSignPainted.java b/game/core/src/main/java/net/minecraft/core/item/ItemSignPainted.java
index ef39c0805..8b5907dd1 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemSignPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemSignPainted.java
@@ -9,38 +9,39 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class ItemSignPainted extends ItemSign{
+public class ItemSignPainted extends ItemSign {
     public ItemSignPainted(@NotNull String name, @NotNull String namespaceId, int id) {
         super(name, namespaceId, id);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (player == null || side == Side.BOTTOM || !world.getBlockMaterial(blockPos).isSolid()) {
             return false;
         }
 
-        if(!world.canPlaceInsideBlock(blockPos)) {
-            blockPos = blockPos.add(side.getDirection());
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
         }
 
-        if (blockPos.y < 0 || blockPos.y >= world.getHeightBlocks() || !Blocks.SIGN_POST_PLANKS_OAK_PAINTED.canPlaceAt(world, blockPos)) {
+        if (blockPos.y() < 0 || blockPos.y() >= world.getHeightBlocks() || !Blocks.SIGN_POST_PLANKS_OAK_PAINTED.canPlaceAt(world, blockPos)) {
             return false;
         }
 
-        if(side == Side.TOP) {
-            int direction = MathHelper.floor((double)(((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf;
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.SIGN_POST_PLANKS_OAK_PAINTED, EnumBlockSoundEffectType.PLACE);
+        if (side == Side.TOP) {
+            int direction = MathHelper.floor((double) (((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf;
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.SIGN_POST_PLANKS_OAK_PAINTED, EnumBlockSoundEffectType.PLACE);
             world.setBlockIdDataNotify(blockPos, Blocks.SIGN_POST_PLANKS_OAK_PAINTED.id(), Blocks.SIGN_POST_PLANKS_OAK_PAINTED.getLogic().toMetadata(DyeColor.colorFromItemMeta(selfStack.getMetadata())) | direction);
         } else {
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.SIGN_WALL_PLANKS_OAK_PAINTED, EnumBlockSoundEffectType.PLACE);
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.SIGN_WALL_PLANKS_OAK_PAINTED, EnumBlockSoundEffectType.PLACE);
             world.setBlockIdDataNotify(blockPos, Blocks.SIGN_WALL_PLANKS_OAK_PAINTED.id(), Blocks.SIGN_POST_PLANKS_OAK_PAINTED.getLogic().toMetadata(DyeColor.colorFromItemMeta(selfStack.getMetadata())) | side.getId());
         }
         selfStack.consumeItem(player);
-        if(world.getTileEntity(blockPos) instanceof TileEntitySign sign) {
+        if (world.getTileEntity(blockPos) instanceof TileEntitySign sign) {
             if (selfStack.getData().containsKey("tileEntityData")) {
                 sign.readAdditionalData(selfStack.getData().getCompound("tileEntityData"));
             } else {
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemSnowball.java b/game/core/src/main/java/net/minecraft/core/item/ItemSnowball.java
index b1fa88776..03373e16e 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemSnowball.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemSnowball.java
@@ -5,7 +5,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.entity.projectile.ProjectileSnowball;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -29,8 +29,8 @@ public class ItemSnowball extends Item implements IDispensable {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        ProjectileSnowball snowball = new ProjectileSnowball(world, blockPos.x + offX, blockPos.y + offY, blockPos.z + offZ);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        ProjectileSnowball snowball = new ProjectileSnowball(world, blockPos.x() + offX, blockPos.y() + offY, blockPos.z() + offZ);
         snowball.setHeading(direction.getOffsetX() * 0.6, direction.getOffsetY() == 0 ? 0.1 : direction.getOffsetY() * 0.6, direction.getOffsetZ() * 0.6f, 1.1F, 6F);
         world.entityJoinedWorld(snowball);
         selfStack.stackSize -= 1;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemStatue.java b/game/core/src/main/java/net/minecraft/core/item/ItemStatue.java
index 808e0e342..4e60566c0 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemStatue.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemStatue.java
@@ -9,62 +9,63 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
 public class ItemStatue extends Item {
-	protected final @NotNull Block<?> statueBlockBottom;
-	protected final @NotNull Block<?> statueBlockTop;
+    protected final @NotNull Block<?> statueBlockBottom;
+    protected final @NotNull Block<?> statueBlockTop;
 
-	public ItemStatue(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> statueBlockBottom, @NotNull Block<?> statueBlockTop) {
-		super(name, namespaceId, id);
+    public ItemStatue(@NotNull String name, @NotNull String namespaceId, int id, @NotNull Block<?> statueBlockBottom, @NotNull Block<?> statueBlockTop) {
+        super(name, namespaceId, id);
         this.maxStackSize = 64;
         this.statueBlockBottom = statueBlockBottom;
         this.statueBlockTop = statueBlockTop;
     }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(side.getDirection());
-		}
-		if(!this.statueBlockBottom.canPlaceAt(world, blockPos)) {
-			return false;
-		}
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+        }
+        if (!this.statueBlockBottom.canPlaceAt(world, blockPos)) {
+            return false;
+        }
 
-		world.noNeighborUpdate = true;
-		world.setBlockIdDataNotify(blockPos, this.statueBlockBottom.id(), MathHelper.floor((double)(((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
-		world.setBlockIdDataNotify(blockPos.up(), this.statueBlockTop.id(), MathHelper.floor((double)(((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
-		world.noNeighborUpdate = false;
-		world.notifyBlocksOfNeighborChange(blockPos, this.statueBlockBottom.id());
-		world.notifyBlocksOfNeighborChange(blockPos.up(), this.statueBlockTop.id());
-		world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.statueBlockBottom, EnumBlockSoundEffectType.PLACE);
-		this.statueBlockBottom.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-		this.statueBlockTop.onPlacedByMob(world, blockPos.up(), side, player, xHit, yHit);
-		selfStack.consumeItem(player);
-		return true;
-	}
+        world.noNeighborUpdate = true;
+        world.setBlockIdDataNotify(blockPos, this.statueBlockBottom.id(), MathHelper.floor((double) (((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
+        world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.statueBlockTop.id(), MathHelper.floor((double) (((player.yRot + 180F) * 16F) / 360F) + 0.5D) & 0xf);
+        world.noNeighborUpdate = false;
+        world.notifyBlocksOfNeighborChange(blockPos, this.statueBlockBottom.id());
+        world.notifyBlocksOfNeighborChange(blockPos.up(new TilePos()), this.statueBlockTop.id());
+        world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.statueBlockBottom, EnumBlockSoundEffectType.PLACE);
+        this.statueBlockBottom.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
+        this.statueBlockTop.onPlacedByMob(world, blockPos.up(new TilePos()), side, player, xHit, yHit);
+        selfStack.consumeItem(player);
+        return true;
+    }
 
-	@Override
-	public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(direction);
-		}
-		if(!this.statueBlockBottom.canPlaceAt(world, blockPos)) {
-			return;
-		}
+    @Override
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(direction, new TilePos());
+        }
+        if (!this.statueBlockBottom.canPlaceAt(world, blockPos)) {
+            return;
+        }
 
-		world.noNeighborUpdate = true;
-		world.setBlockIdNotify(blockPos, this.statueBlockBottom.id());
-		world.setBlockIdNotify(blockPos.up(), this.statueBlockTop.id());
-		world.noNeighborUpdate = false;
-		world.notifyBlocksOfNeighborChange(blockPos, this.statueBlockBottom.id());
-		world.notifyBlocksOfNeighborChange(blockPos.up(), this.statueBlockTop.id());
-		world.playBlockSoundEffect(null, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.statueBlockBottom, EnumBlockSoundEffectType.PLACE);
-		this.statueBlockBottom.onPlacedOnSide(world, blockPos, direction.getSide(), 0.5, 0.5);
-		this.statueBlockTop.onPlacedOnSide(world, blockPos.up(), direction.getSide(), 0.5, 0.5);
-		selfStack.consumeItem(null);
-	}
+        world.noNeighborUpdate = true;
+        world.setBlockIdNotify(blockPos, this.statueBlockBottom.id());
+        world.setBlockIdNotify(blockPos.up(new TilePos()), this.statueBlockTop.id());
+        world.noNeighborUpdate = false;
+        world.notifyBlocksOfNeighborChange(blockPos, this.statueBlockBottom.id());
+        world.notifyBlocksOfNeighborChange(blockPos.up(new TilePos()), this.statueBlockTop.id());
+        world.playBlockSoundEffect(null, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.statueBlockBottom, EnumBlockSoundEffectType.PLACE);
+        this.statueBlockBottom.onPlacedOnSide(world, blockPos, direction.getSide(), 0.5, 0.5);
+        this.statueBlockTop.onPlacedOnSide(world, blockPos.up(new TilePos()), direction.getSide(), 0.5, 0.5);
+        selfStack.consumeItem(null);
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemWandNBT.java b/game/core/src/main/java/net/minecraft/core/item/ItemWandNBT.java
index 3047a0911..3e0999e68 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemWandNBT.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemWandNBT.java
@@ -7,7 +7,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -34,7 +34,7 @@ public class ItemWandNBT extends Item{
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         if (player == null) return false;
         TileEntity te = world.getTileEntity(blockPos);
         if (te != null) {
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemWandSpawner.java b/game/core/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
index cb7440cb1..09285a34e 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
@@ -9,7 +9,7 @@ import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.gamemode.Gamemode;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -33,7 +33,7 @@ public class ItemWandSpawner extends Item implements IDispensable
 
             if (rayTraceResult != null){
                 if (!world.isClientSide){
-                    spawnEntity(selfStack, world, rayTraceResult.location.x, rayTraceResult.location.y, rayTraceResult.location.z);
+                    spawnEntity(selfStack, world, rayTraceResult.location.x(), rayTraceResult.location.y(), rayTraceResult.location.z());
                 }
                 return selfStack;
             }
@@ -72,7 +72,7 @@ public class ItemWandSpawner extends Item implements IDispensable
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        spawnEntity(selfStack, world, blockPos.x + offX + direction.getOffsetX() * 0.5, blockPos.y + offY + direction.getOffsetY() * 0.5, blockPos.z + offZ + direction.getOffsetZ() * 0.5);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        spawnEntity(selfStack, world, blockPos.x() + offX + direction.getOffsetX() * 0.5, blockPos.y() + offY + direction.getOffsetY() * 0.5, blockPos.z() + offZ + direction.getOffsetZ() * 0.5);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlock.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlock.java
index 022d2f998..3578ffb7e 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlock.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlock.java
@@ -13,6 +13,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -32,19 +33,19 @@ public class ItemBlock<T extends BlockLogic> extends Item {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-        if(selfStack.stackSize <= 0) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        if (selfStack.stackSize <= 0) {
             return false;
         }
-        if(!world.canPlaceInsideBlock(blockPos)) {
-            blockPos = blockPos.add(side.getDirection());
+        if (!world.canPlaceInsideBlock(blockPos)) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
         }
-        if(blockPos.y < 0 || blockPos.y >= world.getHeightBlocks()) {
+        if (blockPos.y() < 0 || blockPos.y() >= world.getHeightBlocks()) {
             return false;
         }
-        if(world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
+        if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
             int meta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
-            if(world.setBlockIdDataNotify(blockPos, this.block.id(), meta)) {
+            if (world.setBlockIdDataNotify(blockPos, this.block.id(), meta)) {
                 if (player == null) {
                     this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
                 } else {
@@ -56,7 +57,7 @@ public class ItemBlock<T extends BlockLogic> extends Item {
                         tileEntity.readAdditionalData(selfStack.getData().getCompound("tileEntityData"));
                     }
                 }
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
                 return true;
             } else if (player == null || player.getGamemode().consumeBlocks()) {
                 selfStack.stackSize += 1;
@@ -66,16 +67,16 @@ public class ItemBlock<T extends BlockLogic> extends Item {
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        blockPos = blockPos.add(direction);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
         Block<?> b = world.getBlock(blockPos);
         if (b == null || BlockTags.PLACE_OVERWRITES.appliesTo(b)) {
             onUseOnBlock(selfStack, world, null, blockPos, direction.getSide(), 0.5, 0.5);
         }
     }
 
-    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-    	return this.block.getPlacedData(player, selfStack, world, blockPos, side, xHit, yHit);
+    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        return this.block.getPlacedData(player, selfStack, world, blockPos, side, xHit, yHit);
     }
 
     @Override
@@ -84,8 +85,7 @@ public class ItemBlock<T extends BlockLogic> extends Item {
     }
 
     @Override
-    public @NotNull String getKey()
-    {
+    public @NotNull String getKey() {
         return this.block.getKey();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockAlgae.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockAlgae.java
index 98420cb89..4fc96cded 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockAlgae.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockAlgae.java
@@ -13,23 +13,22 @@ import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class ItemBlockAlgae<T extends BlockLogic> extends ItemBlock<T>
-{
+public class ItemBlockAlgae<T extends BlockLogic> extends ItemBlock<T> {
 
-    public ItemBlockAlgae(Block<T> block)
-    {
+    public ItemBlockAlgae(Block<T> block) {
         super(block);
         setMaxDamage(0);
         setHasSubtypes(true);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         return false;
     }
 
@@ -37,21 +36,21 @@ public class ItemBlockAlgae<T extends BlockLogic> extends ItemBlock<T>
     public @Nullable ItemStack onUse(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Player player) {
         double reachDistance = player.getGamemode().getBlockReachDistance();
         HitResult rayCast = player.rayCast(reachDistance, 1f, true, false, false);
-        if(rayCast == null) {
+        if (rayCast == null) {
             return selfStack;
         }
-        if(rayCast instanceof HitResult.Tile hitTile) {
+        if (rayCast instanceof HitResult.Tile hitTile) {
             TilePos blockPos = new TilePos(hitTile.tilePos);
-            if(world.getBlockId(blockPos) == Blocks.FLUID_WATER_STILL.id()) {
+            if (world.getBlockId(blockPos) == Blocks.FLUID_WATER_STILL.id()) {
                 blockPos.y++;
             } else {
                 return selfStack;
             }
 
-            if(world.getBlockId(blockPos) != 0) {
+            if (world.getBlockId(blockPos) != 0) {
                 return selfStack;
             }
-            if(selfStack.consumeItem(player) && world.setBlockIdDataNotify(blockPos, this.block.id(), 0)) {
+            if (selfStack.consumeItem(player) && world.setBlockIdDataNotify(blockPos, this.block.id(), 0)) {
                 this.block.onPlacedByMob(world, blockPos, Side.NONE, player, 0.5, 0.5);
                 world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
                 player.swingItem();
@@ -61,9 +60,9 @@ public class ItemBlockAlgae<T extends BlockLogic> extends ItemBlock<T>
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        blockPos = blockPos.add(direction);
-        TilePos up = blockPos.up();
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
+        TilePos up = blockPos.up(new TilePos());
         Block<?> b = world.getBlock(blockPos);
         Block<?> bAbove = world.getBlock(up);
         if (b == Blocks.FLUID_WATER_STILL && (bAbove == null || bAbove.hasTag(BlockTags.PLACE_OVERWRITES))) {
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLadder.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLadder.java
index b90fe2099..a93cc2f38 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLadder.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLadder.java
@@ -8,66 +8,67 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class ItemBlockLadder<T extends BlockLogicLadder> extends ItemBlock<T> {
 
-	public ItemBlockLadder(@NotNull Block<T> block) {
-		super(block);
-	}
+    public ItemBlockLadder(@NotNull Block<T> block) {
+        super(block);
+    }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		blockPos = new TilePos(blockPos);
-		Block<?> clickedBlock = world.getBlock(blockPos);
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        TilePos bp = new TilePos(blockPos);
+        Block<?> clickedBlock = world.getBlock(bp);
 
-		BlockLogicLadder ladder = this.block.getLogic();
+        BlockLogicLadder ladder = this.block.getLogic();
 
-		if(clickedBlock == this.block && player != null && !player.isSneaking()) {
-			Side clickedLadderSide = ladder.getSideFromMeta(world.getBlockData(blockPos));
-			while(world.getBlock(blockPos) == this.block && ladder.getSideFromMeta(world.getBlockData(blockPos)) == clickedLadderSide) blockPos.y--;
-			int meta = ladder.getMetaForSide(clickedLadderSide);
-			if(ladder.canExistAt(world, new TilePos(blockPos), meta)) {
-				return placeBlock(selfStack, world, blockPos, meta, player, clickedLadderSide, 0.5, 0.5);
-			}
+        if (clickedBlock == this.block && player != null && !player.isSneaking()) {
+            Side clickedLadderSide = ladder.getSideFromMeta(world.getBlockData(bp));
+            while (world.getBlock(bp) == this.block && ladder.getSideFromMeta(world.getBlockData(bp)) == clickedLadderSide)
+                bp.y--;
+            int meta = ladder.getMetaForSide(clickedLadderSide);
+            if (ladder.canExistAt(world, new TilePos(bp), meta)) {
+                return placeBlock(selfStack, world, bp, meta, player, clickedLadderSide, 0.5, 0.5);
+            }
 
-			return false;
-		}
+            return false;
+        }
 
-		if(!world.canPlaceInsideBlock(blockPos)) {
-			blockPos = blockPos.add(side.getDirection());
-		}
+        if (!world.canPlaceInsideBlock(bp)) {
+            bp = bp.add(side.getDirection(), new TilePos());
+        }
 
-		Side sideForPlacement = ladder.getSideForPlacement(world, blockPos, side);
-		if(sideForPlacement == null) {
-			return false;
-		}
+        Side sideForPlacement = ladder.getSideForPlacement(world, bp, side);
+        if (sideForPlacement == null) {
+            return false;
+        }
 
-		int meta = ladder.getMetaForSide(sideForPlacement);
-		if(ladder.canExistAt(world, blockPos, meta)) {
-			return placeBlock(selfStack, world, blockPos, meta, player, sideForPlacement, xHit, yHit);
-		}
+        int meta = ladder.getMetaForSide(sideForPlacement);
+        if (ladder.canExistAt(world, bp, meta)) {
+            return placeBlock(selfStack, world, bp, meta, player, sideForPlacement, xHit, yHit);
+        }
 
-		return false;
-	}
+        return false;
+    }
 
 
-	public boolean placeBlock(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TilePos blockPos, int meta, @Nullable Player player, @NotNull Side side, double xHit, double yHit) {
-		if(world.canPlaceInsideBlock(blockPos) && world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
-			if(world.setBlockIdDataNotify(blockPos, this.block.id(), meta)) {
+    public boolean placeBlock(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TilePos blockPos, int meta, @Nullable Player player, @NotNull Side side, double xHit, double yHit) {
+        if (world.canPlaceInsideBlock(blockPos) && world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side) && selfStack.consumeItem(player)) {
+            if (world.setBlockIdDataNotify(blockPos, this.block.id(), meta)) {
                 if (player == null) {
-					this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
-				} else {
-					this.block.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-				}
-				world.playBlockSoundEffect(player, blockPos.x + 0.5f, blockPos.y + 0.5f, blockPos.z + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
-				return true;
-			}
-		}
-		return false;
-	}
-	
-	
+                    this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
+                } else {
+                    this.block.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
+                }
+                world.playBlockSoundEffect(player, blockPos.x + 0.5f, blockPos.y + 0.5f, blockPos.z + 0.5f, this.block, EnumBlockSoundEffectType.PLACE);
+                return true;
+            }
+        }
+        return false;
+    }
+
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLamp.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLamp.java
index ebc5f7fad..979738bf1 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLamp.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLamp.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -21,7 +21,7 @@ public class ItemBlockLamp<T extends BlockLogic> extends ItemBlock<T>
     }
     
     @Override
-    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
     	return selfStack.getMetadata();
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayer.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayer.java
index f6b8d0d7f..1f4d42ba5 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayer.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayer.java
@@ -7,104 +7,103 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 
-public class ItemBlockLayer<T extends BlockLogicLayerBase> extends ItemBlock<T>
-{
-	public ItemBlockLayer(@NotNull Block<T> block)
-	{
-		super(block);
-	}
+public class ItemBlockLayer<T extends BlockLogicLayerBase> extends ItemBlock<T> {
+    public ItemBlockLayer(@NotNull Block<T> block) {
+        super(block);
+    }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		Block<?> targetBlock = world.getBlock(blockPos);
-		int meta = world.getBlockData(blockPos);
-		if (targetBlock != this.block && targetBlock != null && targetBlock.hasTag(BlockTags.PLACE_OVERWRITES)) {
-			targetBlock = null;
-			meta = 0;
-		}
-        if (selfStack.stackSize <= 0 || blockPos.y == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        Block<?> targetBlock = world.getBlock(blockPos);
+        int meta = world.getBlockData(blockPos);
+        if (targetBlock != this.block && targetBlock != null && targetBlock.hasTag(BlockTags.PLACE_OVERWRITES)) {
+            targetBlock = null;
+            meta = 0;
+        }
+        if (selfStack.stackSize <= 0 || blockPos.y() == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
             return false;
         }
 
         // Check if we're placing "inside" a layer
-		if (targetBlock == this.block && side == Side.TOP) {
-			final BlockLogicLayerBase blockLayer = this.block.getLogic();
-			final int newMeta = meta + 1;
+        if (targetBlock == this.block && side == Side.TOP) {
+            final BlockLogicLayerBase blockLayer = this.block.getLogic();
+            final int newMeta = meta + 1;
 
-			final AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + (2 * (newMeta + 1)) / 16.0f, blockPos.z + 1f);
-			if (!world.checkIfAABBIsClear(bbBox)) {
-				return false;
-			}
+            final AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + (2 * (newMeta + 1)) / 16.0f, blockPos.z() + 1f);
+            if (!world.checkIfAABBIsClear(bbBox)) {
+                return false;
+            }
 
-			if (newMeta < 7) {
-				world.setBlockIdDataNotify(blockPos, this.block.id(), newMeta);
-			} else {
-				if (blockLayer.fullBlock != null) {
-					world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), 0);
-				} else {
-					world.setBlockIdDataNotify(blockPos.up(), this.block.id(), 0);
-				}
-			}
-			world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-			selfStack.consumeItem(player);
-			return true;
+            if (newMeta < 7) {
+                world.setBlockIdDataNotify(blockPos, this.block.id(), newMeta);
+            } else {
+                if (blockLayer.fullBlock != null) {
+                    world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), 0);
+                } else {
+                    world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.block.id(), 0);
+                }
+            }
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+            selfStack.consumeItem(player);
+            return true;
 
-		}
+        }
 
-		// Offset position
-		if (targetBlock != null) {
-			blockPos = blockPos.add(side.getDirection());
-			targetBlock = world.getBlock(blockPos);
-			meta = world.getBlockData(blockPos);
-		}
+        // Offset position
+        if (targetBlock != null) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+            targetBlock = world.getBlock(blockPos);
+            meta = world.getBlockData(blockPos);
+        }
 
-		// Check if the block we're placing into is a layer
-		if (targetBlock == this.block) {
-			final BlockLogicLayerBase blockLayer = this.block.getLogic();
-			final int newMeta = meta + 1;
+        // Check if the block we're placing into is a layer
+        if (targetBlock == this.block) {
+            final BlockLogicLayerBase blockLayer = this.block.getLogic();
+            final int newMeta = meta + 1;
 
-			final AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + (2 * (newMeta + 1)) / 16.0f, blockPos.z + 1f);
-			if (!world.checkIfAABBIsClear(bbBox)) {
-				return false;
-			}
+            final AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + (2 * (newMeta + 1)) / 16.0f, blockPos.z() + 1f);
+            if (!world.checkIfAABBIsClear(bbBox)) {
+                return false;
+            }
 
-			if (newMeta < 7) {
-				world.setBlockIdDataNotify(blockPos, this.block.id(), newMeta);
-			}
-			else {
-				if (blockLayer.fullBlock != null) {
-					world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), 0);
-				} else {
-					world.setBlockIdDataNotify(blockPos.up(), this.block.id(), 0);
-				}
-			}
-			world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-			selfStack.consumeItem(player);
-			return true;
-		}
+            if (newMeta < 7) {
+                world.setBlockIdDataNotify(blockPos, this.block.id(), newMeta);
+            } else {
+                if (blockLayer.fullBlock != null) {
+                    world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), 0);
+                } else {
+                    world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.block.id(), 0);
+                }
+            }
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+            selfStack.consumeItem(player);
+            return true;
+        }
 
-		// Regular placement, as all else fails
-		if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
-			int placeMeta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
-			if (world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
-				if (player == null) {
+        // Regular placement, as all else fails
+        if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
+            int placeMeta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
+            if (world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
+                if (player == null) {
                     this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
-				} else {
+                } else {
                     this.block.onPlacedByMob(world, blockPos, Side.NONE, player, xHit, yHit);
-				}
-				world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-				selfStack.consumeItem(player);
-				return true;
-			}
-		}
-		return false;
+                }
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                selfStack.consumeItem(player);
+                return true;
+            }
+        }
+        return false;
 
-	}
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayerLeaves.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayerLeaves.java
index 87fe4b0be..6398d1648 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayerLeaves.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockLayerLeaves.java
@@ -9,109 +9,107 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class ItemBlockLayerLeaves<T extends BlockLogicLayerLeaves> extends ItemBlock<T>
-{
-	public ItemBlockLayerLeaves(@NotNull Block<T> block)
-	{
-		super(block);
-	}
+public class ItemBlockLayerLeaves<T extends BlockLogicLayerLeaves> extends ItemBlock<T> {
+    public ItemBlockLayerLeaves(@NotNull Block<T> block) {
+        super(block);
+    }
 
-	@Override
-	public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		Block<?> targetBlock = world.getBlock(blockPos);
-		int meta = world.getBlockData(blockPos);
-		if (targetBlock != this.block && targetBlock != null && targetBlock.hasTag(BlockTags.PLACE_OVERWRITES)) {
-			targetBlock = null;
-			meta = 0;
-		}
-        if (selfStack.stackSize <= 0 || blockPos.y == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
+    @Override
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        Block<?> targetBlock = world.getBlock(blockPos);
+        int meta = world.getBlockData(blockPos);
+        if (targetBlock != this.block && targetBlock != null && targetBlock.hasTag(BlockTags.PLACE_OVERWRITES)) {
+            targetBlock = null;
+            meta = 0;
+        }
+        if (selfStack.stackSize <= 0 || blockPos.y() == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
             return false;
         }
 
         // Check if we're placing "inside" a layer
-		if (targetBlock == this.block && side == Side.TOP) {
-			final BlockLogicLayerBase blockLayer = this.block.getLogic();
-			final int newMeta = meta + 1;
+        if (targetBlock == this.block && side == Side.TOP) {
+            final BlockLogicLayerBase blockLayer = this.block.getLogic();
+            final int newMeta = meta + 1;
 
-			final AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + (2 * (newMeta + 1)) / 16.0f, blockPos.z + 1f);
-			if (!world.checkIfAABBIsClear(bbBox)) {
-				return false;
-			}
+            final AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + (2 * (newMeta + 1)) / 16.0f, blockPos.z() + 1f);
+            if (!world.checkIfAABBIsClear(bbBox)) {
+                return false;
+            }
 
-			if ((newMeta & 0b00001111) < 7) {
-				world.setBlockIdDataNotify(blockPos, this.block.id(), BlockLogicLayerLeaves.setPermanent(newMeta, true));
-			}
-			else {
-				if (blockLayer.fullBlock != null) {
-					world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), BlockLogicLeavesBase.setPermanent(0, true));
-				} else {
-					world.setBlockIdDataNotify(blockPos.up(), this.block.id(), BlockLogicLayerLeaves.setPermanent(0, true));
-				}
-			}
-			world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-			selfStack.consumeItem(player);
-			return true;
-		}
+            if ((newMeta & 0b00001111) < 7) {
+                world.setBlockIdDataNotify(blockPos, this.block.id(), BlockLogicLayerLeaves.setPermanent(newMeta, true));
+            } else {
+                if (blockLayer.fullBlock != null) {
+                    world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), BlockLogicLeavesBase.setPermanent(0, true));
+                } else {
+                    world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.block.id(), BlockLogicLayerLeaves.setPermanent(0, true));
+                }
+            }
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+            selfStack.consumeItem(player);
+            return true;
+        }
 
-		// Offset position
-		if (targetBlock != null) {
-			blockPos = blockPos.add(side.getDirection());
-			targetBlock = world.getBlock(blockPos);
-			meta = world.getBlockData(blockPos);
-		}
+        // Offset position
+        if (targetBlock != null) {
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
+            targetBlock = world.getBlock(blockPos);
+            meta = world.getBlockData(blockPos);
+        }
 
-		// Check if the block we're placing into is a layer
-		if (targetBlock == this.block) {
-			final BlockLogicLayerBase blockLayer = this.block.getLogic();
-			final int newMeta = meta + 1;
+        // Check if the block we're placing into is a layer
+        if (targetBlock == this.block) {
+            final BlockLogicLayerBase blockLayer = this.block.getLogic();
+            final int newMeta = meta + 1;
 
-			final AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + (2 * (newMeta + 1)) / 16.0f, blockPos.z + 1f);
-			if (!world.checkIfAABBIsClear(bbBox)) {
-				return false;
-			}
+            final AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + (2 * (newMeta + 1)) / 16.0f, blockPos.z() + 1f);
+            if (!world.checkIfAABBIsClear(bbBox)) {
+                return false;
+            }
 
-			if ((newMeta & 0b00001111) < 7) {
-				world.setBlockIdDataNotify(blockPos, this.block.id(), BlockLogicLayerLeaves.setPermanent(newMeta, true));
-			} else {
-				if (blockLayer.fullBlock != null) {
-					world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), BlockLogicLeavesBase.setPermanent(0, true));
-				}
-				else {
-					world.setBlockIdDataNotify(blockPos.up(), this.block.id(), BlockLogicLayerLeaves.setPermanent(0, true));
-				}
-			}
-			world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-			selfStack.consumeItem(player);
-			return true;
-		}
+            if ((newMeta & 0b00001111) < 7) {
+                world.setBlockIdDataNotify(blockPos, this.block.id(), BlockLogicLayerLeaves.setPermanent(newMeta, true));
+            } else {
+                if (blockLayer.fullBlock != null) {
+                    world.setBlockIdDataNotify(blockPos, blockLayer.fullBlock.id(), BlockLogicLeavesBase.setPermanent(0, true));
+                } else {
+                    world.setBlockIdDataNotify(blockPos.up(new TilePos()), this.block.id(), BlockLogicLayerLeaves.setPermanent(0, true));
+                }
+            }
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+            selfStack.consumeItem(player);
+            return true;
+        }
 
-		// Regular placement, as all else fails
-		if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
-			int placeMeta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
-			if (world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
-				if (player == null) {
+        // Regular placement, as all else fails
+        if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
+            int placeMeta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
+            if (world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
+                if (player == null) {
                     this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
-				} else {
+                } else {
                     this.block.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
-				}
-				world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
-				selfStack.consumeItem(player);
-				return true;
-			}
-		}
-		return false;
+                }
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                selfStack.consumeItem(player);
+                return true;
+            }
+        }
+        return false;
 
-	}
+    }
 
-	@Override
-	public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
-		return BlockLogicLayerLeaves.MASK_PERMANENT;
-	}
+    @Override
+    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
+        return BlockLogicLayerLeaves.MASK_PERMANENT;
+    }
 
 }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockSlab.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockSlab.java
index 7eac3b146..31bce15cd 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockSlab.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockSlab.java
@@ -8,20 +8,21 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.EnumBlockSoundEffectType;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 public class ItemBlockSlab<T extends BlockLogic> extends ItemBlock<T> {
-    public ItemBlockSlab(@NotNull Block<T> block)
-    {
+    public ItemBlockSlab(@NotNull Block<T> block) {
         super(block);
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         int id = world.getBlockId(blockPos);
         int meta = world.getBlockData(blockPos) & 0b11;
         int otherMeta = world.getBlockData(blockPos) & ~0b11;
@@ -29,20 +30,20 @@ public class ItemBlockSlab<T extends BlockLogic> extends ItemBlock<T> {
             id = 0;
             meta = 0;
         }
-        if (selfStack.stackSize <= 0 || blockPos.y == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
+        if (selfStack.stackSize <= 0 || blockPos.y() == world.getHeightBlocks() - 1 && this.block.getMaterial().isSolid()) {
             return false;
         }
 
         // Check if we're placing "inside" a slab
         if (id == this.block.id() && otherMeta == selfStack.getMetadata() && (side == Side.TOP || side == Side.BOTTOM)) {
             if ((side == Side.TOP && meta == 0) || (side == Side.BOTTOM && meta == 2)) {
-                AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + 1f, blockPos.z + 1f);
-                if(!world.checkIfAABBIsClear(bbBox)) {
+                AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + 1f, blockPos.z() + 1f);
+                if (!world.checkIfAABBIsClear(bbBox)) {
                     return false;
                 }
 
                 world.setBlockDataNotify(blockPos, 1 | selfStack.getMetadata());
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
@@ -50,7 +51,7 @@ public class ItemBlockSlab<T extends BlockLogic> extends ItemBlock<T> {
 
         // Offset position
         if (id != 0) {
-            blockPos = blockPos.add(side.getDirection());
+            blockPos = blockPos.add(side.getDirection(), new TilePos());
             id = world.getBlockId(blockPos);
             meta = world.getBlockData(blockPos) & 0b11;
             otherMeta = world.getBlockData(blockPos) & ~0b11;
@@ -59,28 +60,28 @@ public class ItemBlockSlab<T extends BlockLogic> extends ItemBlock<T> {
         // Check if the block we're placing into is a slab
         if (id == this.block.id() && otherMeta == selfStack.getMetadata()) {
             if ((yHit > 0.5f && meta == 0) || (yHit <= 0.5f && meta == 2) || (side == Side.BOTTOM && meta == 0) || (side == Side.TOP && meta == 2)) {
-                AABB bbBox = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1f, blockPos.y + 1f, blockPos.z + 1f);
-                if(!world.checkIfAABBIsClear(bbBox)) {
+                AABBdc bbBox = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1f, blockPos.y() + 1f, blockPos.z() + 1f);
+                if (!world.checkIfAABBIsClear(bbBox)) {
                     return false;
                 }
 
                 world.setBlockDataNotify(blockPos, 1 | selfStack.getMetadata());
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
         }
 
         // Regular placement, as all else fails
-        if(world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
+        if (world.canBlockIdBePlacedAt(this.block.id(), blockPos, false, side)) {
             int placeMeta = getPlacedData(selfStack, world, player, blockPos, side, xHit, yHit);
-            if(world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
+            if (world.setBlockIdDataNotify(blockPos, this.block.id(), placeMeta)) {
                 if (player == null) {
                     this.block.onPlacedOnSide(world, blockPos, side, xHit, yHit);
                 } else {
                     this.block.onPlacedByMob(world, blockPos, side, player, xHit, yHit);
                 }
-                world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
+                world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, this.block, EnumBlockSoundEffectType.PLACE);
                 selfStack.consumeItem(player);
                 return true;
             }
diff --git a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockStairsPainted.java b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockStairsPainted.java
index b509dd2b0..129b7c0b0 100644
--- a/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockStairsPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/item/block/ItemBlockStairsPainted.java
@@ -7,7 +7,7 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public class ItemBlockStairsPainted<T extends BlockLogic> extends ItemBlock<T> {
@@ -18,7 +18,7 @@ public class ItemBlockStairsPainted<T extends BlockLogic> extends ItemBlock<T> {
     }
 
     @Override
-    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public int getPlacedData(@NotNull ItemStack selfStack, @NotNull World world, Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
     	return selfStack.getMetadata();
     }
     
diff --git a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolHoe.java b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolHoe.java
index 09d1c210d..e6d2444eb 100644
--- a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolHoe.java
+++ b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolHoe.java
@@ -14,6 +14,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -32,28 +33,28 @@ public class ItemToolHoe extends ItemTool {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         return till(selfStack, player, world, blockPos, side);
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        till(selfStack, null, world, blockPos.add(direction), direction.getSide());
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        till(selfStack, null, world, blockPos.add(direction, new TilePos()), direction.getSide());
     }
 
-    public boolean till(@NotNull ItemStack selfStack, @Nullable Player player, @NotNull World world, @NotNull TilePos blockPos, @NotNull Side side) {
+    public boolean till(@NotNull ItemStack selfStack, @Nullable Player player, @NotNull World world, @NotNull TilePosc blockPos, @NotNull Side side) {
         int id = world.getBlockId(blockPos);
-        int idAbove = world.getBlockId(blockPos.up());
-        if(side != Side.BOTTOM && idAbove == 0 && (id == Blocks.GRASS.id() || id == Blocks.DIRT.id() || id == Blocks.PATH_DIRT.id() || id == Blocks.GRASS_RETRO.id() || id == Blocks.MUD.id())) {
+        int idAbove = world.getBlockId(blockPos.up(new TilePos()));
+        if (side != Side.BOTTOM && idAbove == 0 && (id == Blocks.GRASS.id() || id == Blocks.DIRT.id() || id == Blocks.PATH_DIRT.id() || id == Blocks.GRASS_RETRO.id() || id == Blocks.MUD.id())) {
             int meta = 0;
-            if(id == Blocks.MUD.id()) {
+            if (id == Blocks.MUD.id()) {
                 meta = 1;
             }
-            world.playBlockSoundEffect(player, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.DIRT, EnumBlockSoundEffectType.MINE);
-            if(!world.isClientSide) {
-                if(id == Blocks.GRASS.id() || id == Blocks.GRASS_RETRO.id() || id == Blocks.GRASS_SCORCHED.id()) {
-                    if(world.rand.nextInt(5) == 0) {
-                        world.dropItem(blockPos.up(), new ItemStack(Items.SEEDS_WHEAT));
+            world.playBlockSoundEffect(player, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.DIRT, EnumBlockSoundEffectType.MINE);
+            if (!world.isClientSide) {
+                if (id == Blocks.GRASS.id() || id == Blocks.GRASS_RETRO.id() || id == Blocks.GRASS_SCORCHED.id()) {
+                    if (world.rand.nextInt(5) == 0) {
+                        world.dropItem(blockPos.up(new TilePos()), new ItemStack(Items.SEEDS_WHEAT));
                     }
                 }
             }
@@ -68,13 +69,13 @@ public class ItemToolHoe extends ItemTool {
 
     @Override
     public boolean onBlockDestroyed(@NotNull ItemStack selfStack, @NotNull World world, @NotNull Mob mob, @NotNull Block<?> removedBlock, @NotNull TilePos blockPos, @NotNull Side side) {
-        if(!world.isClientSide) {
-            if(removedBlock == Blocks.TALLGRASS || removedBlock == Blocks.TALLGRASS_FERN) {
-                if(this.material.isSilkTouch()) {
+        if (!world.isClientSide) {
+            if (removedBlock == Blocks.TALLGRASS || removedBlock == Blocks.TALLGRASS_FERN) {
+                if (this.material.isSilkTouch()) {
                     world.dropItem(blockPos, new ItemStack(removedBlock));
                     selfStack.damageItem(1, mob);
                 } else {
-                    if(world.rand.nextInt(4) == 0) {
+                    if (world.rand.nextInt(4) == 0) {
                         world.dropItem(blockPos, new ItemStack(Items.SEEDS_WHEAT));
                         selfStack.damageItem(1, mob);
                     }
diff --git a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShears.java b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShears.java
index df3adde04..2cac72861 100644
--- a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShears.java
+++ b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShears.java
@@ -11,11 +11,13 @@ import net.minecraft.core.item.material.ToolMaterial;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.List;
 import java.util.Random;
@@ -26,9 +28,9 @@ public class ItemToolShears extends Item {
         setMaxStackSize(1);
         setMaxDamage(material.getDurability());
     }
-    
+
     public void onBlockSheared(@NotNull ItemStack selfStack, @Nullable Mob mob) {
-    	selfStack.damageItem(1, mob);
+        selfStack.damageItem(1, mob);
     }
 
     @Override
@@ -38,19 +40,19 @@ public class ItemToolShears extends Item {
 
     @Override
     public float getStrVsBlock(@NotNull ItemStack selfStack, @NotNull Block<?> block) {
-        if(block == Blocks.COBWEB || Block.hasLogicClass(block, BlockLogicLeavesBase.class)) {
+        if (block == Blocks.COBWEB || Block.hasLogicClass(block, BlockLogicLeavesBase.class)) {
             return 15F;
         }
-        if(block.hasTag(BlockTags.MINEABLE_BY_SHEARS)) {
+        if (block.hasTag(BlockTags.MINEABLE_BY_SHEARS)) {
             return 10f;
         }
         return super.getStrVsBlock(selfStack, block);
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        blockPos = blockPos.add(direction);
-        AABB box = AABB.fromPool(blockPos.x, blockPos.y, blockPos.z, blockPos.x + 1, blockPos.y + 1, blockPos.z + 1);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
+        AABBdc box = new AABBd(blockPos.x(), blockPos.y(), blockPos.z(), blockPos.x() + 1, blockPos.y() + 1, blockPos.z() + 1);
         List<MobSheep> entities = world.getEntitiesWithinAABB(MobSheep.class, box);
         if (!entities.isEmpty()) {
             entities.get(0).onItemInteract(selfStack);
diff --git a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShovel.java b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShovel.java
index cd0d1ab49..584313013 100644
--- a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShovel.java
+++ b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolShovel.java
@@ -13,6 +13,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -29,20 +30,20 @@ public class ItemToolShovel extends ItemTool {
     }
 
     @Override
-    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePos blockPos, @NotNull Side side, double xHit, double yHit) {
+    public boolean onUseOnBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player player, @NotNull TilePosc blockPos, @NotNull Side side, double xHit, double yHit) {
         return shovelBlock(selfStack, world, player, blockPos, side);
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        shovelBlock(selfStack, world, null, blockPos.add(direction), direction.getSide());
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        shovelBlock(selfStack, world, null, blockPos.add(direction, new TilePos()), direction.getSide());
     }
 
-    public boolean shovelBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player entityplayer, @NotNull TilePos blockPos, @NotNull Side side) {
+    public boolean shovelBlock(@NotNull ItemStack selfStack, @NotNull World world, @Nullable Player entityplayer, @NotNull TilePosc blockPos, @NotNull Side side) {
         int blockId = world.getBlockId(blockPos);
-        int blockAbove = world.getBlockId(blockPos.up());
-        if(side != Side.BOTTOM && blockAbove == 0 && (blockId == Blocks.GRASS.id() || blockId == Blocks.DIRT.id() || blockId == Blocks.GRASS_RETRO.id() || blockId == Blocks.FARMLAND_DIRT.id())) {
-            world.playBlockSoundEffect(entityplayer, blockPos.x + 0.5F, blockPos.y + 0.5F, blockPos.z + 0.5F, Blocks.blocksList[blockId], EnumBlockSoundEffectType.PLACE);
+        int blockAbove = world.getBlockId(blockPos.up(new TilePos()));
+        if (side != Side.BOTTOM && blockAbove == 0 && (blockId == Blocks.GRASS.id() || blockId == Blocks.DIRT.id() || blockId == Blocks.GRASS_RETRO.id() || blockId == Blocks.FARMLAND_DIRT.id())) {
+            world.playBlockSoundEffect(entityplayer, blockPos.x() + 0.5F, blockPos.y() + 0.5F, blockPos.z() + 0.5F, Blocks.blocksList[blockId], EnumBlockSoundEffectType.PLACE);
             if (!world.isClientSide) {
                 world.setBlockIdNotify(blockPos, Blocks.PATH_DIRT.id());
                 selfStack.damageItem(1, entityplayer);
diff --git a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolSword.java b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolSword.java
index 2bfbe7bf8..b4c75d12c 100644
--- a/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolSword.java
+++ b/game/core/src/main/java/net/minecraft/core/item/tool/ItemToolSword.java
@@ -13,6 +13,7 @@ import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Random;
@@ -50,8 +51,8 @@ public class ItemToolSword extends Item
     }
 
     @Override
-    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePos blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
-        blockPos = blockPos.add(direction);
+    public void onUseByActivator(@NotNull ItemStack selfStack, @NotNull World world, @NotNull TileEntityActivator activator, @NotNull Random random, @NotNull TilePosc blockPos, @NotNull Direction direction, double offX, double offY, double offZ) {
+        blockPos = blockPos.add(direction, new TilePos());
         Block<?> b = world.getBlock(blockPos);
         if (b == Blocks.PUMPKIN) {
             world.setBlockIdData(blockPos, Blocks.PUMPKIN_CARVED_IDLE.id(), direction.getOpposite().getId());
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/CommandSource.java b/game/core/src/main/java/net/minecraft/core/net/command/CommandSource.java
index b5ba0ba8f..1f720b5b7 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/CommandSource.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/CommandSource.java
@@ -3,9 +3,10 @@ package net.minecraft.core.net.command;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.net.packet.Packet;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3dc;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -31,9 +32,9 @@ public interface CommandSource {
 
     boolean hasAdmin();
 
-    @Nullable Vec3 getCoordinates(boolean offsetHeight);
+    @Nullable Vector3dc getCoordinates(boolean offsetHeight);
 
-    @Nullable Vec3 getBlockCoordinates();
+    @Nullable TilePosc getBlockCoordinates();
 
     boolean messageMayBeMultiline();
 
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeChunkCoordinates.java b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeChunkCoordinates.java
index 15284fa12..8c17b6df2 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeChunkCoordinates.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeChunkCoordinates.java
@@ -11,7 +11,7 @@ import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.helpers.Coordinates2D;
 import net.minecraft.core.net.command.helpers.IntegerCoordinate;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
+import net.minecraft.core.world.pos.TilePosc;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -49,13 +49,13 @@ public class ArgumentTypeChunkCoordinates implements ArgumentType<Coordinates2D>
     @Override
     public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
         String string = builder.getRemaining();
-        Vec3 coordinates = ((CommandSource)context.getSource()).getBlockCoordinates();
+        TilePosc coordinates = ((CommandSource) context.getSource()).getBlockCoordinates();
 
         if (coordinates == null) return builder.buildFuture();
 
         int[] roundedCoordinates = new int[]{
-                MathHelper.floor(coordinates.x / 16.0),
-                MathHelper.floor(coordinates.z / 16.0)
+            MathHelper.floor(coordinates.x() / 16.0),
+            MathHelper.floor(coordinates.z() / 16.0)
         };
 
         if (string.isEmpty()) {
@@ -65,7 +65,8 @@ public class ArgumentTypeChunkCoordinates implements ArgumentType<Coordinates2D>
                 builder.suggest(String.valueOf(roundedCoordinates[0]));
                 builder.suggest(roundedCoordinates[0] + " " + roundedCoordinates[1]);
                 builder.suggest(allCoordinates);
-            } catch (CommandSyntaxException ignored) {}
+            } catch (CommandSyntaxException ignored) {
+            }
         } else {
             String[] strings = string.split(" ");
             String allCoordinates;
@@ -75,7 +76,8 @@ public class ArgumentTypeChunkCoordinates implements ArgumentType<Coordinates2D>
                     this.parse(new StringReader(allCoordinates));
                     builder.suggest(strings[0] + " " + roundedCoordinates[1]);
                     builder.suggest(allCoordinates);
-                } catch (CommandSyntaxException ignored) {}
+                } catch (CommandSyntaxException ignored) {
+                }
             }
         }
         return builder.buildFuture();
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeIntegerCoordinates.java b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeIntegerCoordinates.java
index 98f268447..e278c2f9d 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeIntegerCoordinates.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeIntegerCoordinates.java
@@ -10,8 +10,7 @@ import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.helpers.IntegerCoordinate;
 import net.minecraft.core.net.command.helpers.IntegerCoordinates;
-import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
+import net.minecraft.core.world.pos.TilePosc;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -63,14 +62,14 @@ public class ArgumentTypeIntegerCoordinates implements ArgumentType<IntegerCoord
     @Override
     public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
         String string = builder.getRemaining();
-        Vec3 coordinates = ((CommandSource)context.getSource()).getBlockCoordinates();
+        TilePosc coordinates = ((CommandSource) context.getSource()).getBlockCoordinates();
 
         if (coordinates == null) return builder.buildFuture();
 
         int[] roundedCoordinates = new int[]{
-                MathHelper.floor(coordinates.x),
-                MathHelper.floor(coordinates.y),
-                MathHelper.floor(coordinates.z)
+            coordinates.x(),
+            coordinates.y(),
+            coordinates.z()
         };
 
         if (string.isEmpty()) {
@@ -80,7 +79,8 @@ public class ArgumentTypeIntegerCoordinates implements ArgumentType<IntegerCoord
                 builder.suggest(String.valueOf(roundedCoordinates[0]));
                 builder.suggest(roundedCoordinates[0] + " " + roundedCoordinates[1]);
                 builder.suggest(allCoordinates);
-            } catch (CommandSyntaxException ignored) {}
+            } catch (CommandSyntaxException ignored) {
+            }
         } else {
             String[] strings = string.split(" ");
             String allCoordinates;
@@ -91,14 +91,16 @@ public class ArgumentTypeIntegerCoordinates implements ArgumentType<IntegerCoord
                         this.parse(new StringReader(allCoordinates));
                         builder.suggest(strings[0] + " " + roundedCoordinates[1]);
                         builder.suggest(allCoordinates);
-                    } catch (CommandSyntaxException ignored) {}
+                    } catch (CommandSyntaxException ignored) {
+                    }
                     break;
                 case 2:
                     allCoordinates = strings[0] + " " + strings[1] + " " + roundedCoordinates[2];
                     try {
                         this.parse(new StringReader(allCoordinates));
                         builder.suggest(allCoordinates);
-                    } catch (CommandSyntaxException ignored) {}
+                    } catch (CommandSyntaxException ignored) {
+                    }
                     break;
             }
         }
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVec3.java b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVector3d.java
similarity index 86%
rename from game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVec3.java
rename to game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVector3d.java
index 3baaf8c04..4e7f70156 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVec3.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeVector3d.java
@@ -10,18 +10,18 @@ import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.helpers.DoubleCoordinate;
 import net.minecraft.core.net.command.helpers.DoubleCoordinates;
-import net.minecraft.core.util.phys.Vec3;
+import org.joml.Vector3dc;
 
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
 
-public class ArgumentTypeVec3 implements ArgumentType<DoubleCoordinates> {
+public class ArgumentTypeVector3d implements ArgumentType<DoubleCoordinates> {
     private static final List<String> EXAMPLES = Arrays.asList("~ ~ ~", "0 0 0", "~ ~60 ~", "~-20 ~10 ~-25.5");
 
-    public static ArgumentTypeVec3 vec3d() {
-        return new ArgumentTypeVec3();
+    public static ArgumentTypeVector3d vec3d() {
+        return new ArgumentTypeVector3d();
     }
 
     @Override
@@ -62,16 +62,16 @@ public class ArgumentTypeVec3 implements ArgumentType<DoubleCoordinates> {
     @Override
     public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
         String string = builder.getRemaining();
-        Vec3 coordinates = ((CommandSource) context.getSource()).getCoordinates(true);
+        Vector3dc coordinates = ((CommandSource) context.getSource()).getCoordinates(true);
 
         if (coordinates == null) return builder.buildFuture();
 
         if (string.isEmpty()) {
-            String allCoordinates = coordinates.x + " " + coordinates.y + " " + coordinates.z;
+            String allCoordinates = coordinates.x() + " " + coordinates.y() + " " + coordinates.z();
             try {
                 this.parse(new StringReader(allCoordinates));
-                builder.suggest(String.valueOf(coordinates.x));
-                builder.suggest(coordinates.x + " " + coordinates.y);
+                builder.suggest(String.valueOf(coordinates.x()));
+                builder.suggest(coordinates.x() + " " + coordinates.y());
                 builder.suggest(allCoordinates);
             } catch (CommandSyntaxException ignored) {
             }
@@ -80,16 +80,16 @@ public class ArgumentTypeVec3 implements ArgumentType<DoubleCoordinates> {
             String allCoordinates;
             switch (strings.length) {
                 case 1:
-                    allCoordinates = strings[0] + " " + coordinates.y + " " + coordinates.z;
+                    allCoordinates = strings[0] + " " + coordinates.y() + " " + coordinates.z();
                     try {
                         this.parse(new StringReader(allCoordinates));
-                        builder.suggest(strings[0] + " " + coordinates.y);
+                        builder.suggest(strings[0] + " " + coordinates.y());
                         builder.suggest(allCoordinates);
                     } catch (CommandSyntaxException ignored) {
                     }
                     break;
                 case 2:
-                    allCoordinates = strings[0] + " " + strings[1] + " " + coordinates.z;
+                    allCoordinates = strings[0] + " " + strings[1] + " " + coordinates.z();
                     try {
                         this.parse(new StringReader(allCoordinates));
                         builder.suggest(allCoordinates);
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandBiome.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandBiome.java
index 13864118b..8d1d33804 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandBiome.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandBiome.java
@@ -9,7 +9,6 @@ import net.minecraft.core.data.registry.Registries;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.net.command.CommandManager;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.arguments.ArgumentTypeBiome;
@@ -17,75 +16,76 @@ import net.minecraft.core.net.command.arguments.ArgumentTypeIntegerCoordinates;
 import net.minecraft.core.net.command.helpers.Coordinates2D;
 import net.minecraft.core.net.command.helpers.IntegerCoordinates;
 import net.minecraft.core.world.chunk.Chunk;
-import net.minecraft.core.world.chunk.ChunkSection;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
+import org.joml.Vector3dc;
 
 public class CommandBiome implements CommandManager.CommandRegistry {
     private static final DynamicCommandExceptionType FAILURE = new DynamicCommandExceptionType(arg -> () -> I18n.getInstance().translateKeyAndFormat("command.commands.biome.locate.exception_failure", arg));
 
     public void register(CommandDispatcher<CommandSource> dispatcher) {
         dispatcher.register(ArgumentBuilderLiteral.<CommandSource>literal("biome")
-                .requires(CommandSource::hasAdmin)
-                .then(ArgumentBuilderLiteral.<CommandSource>literal("set")
-                    .then(ArgumentBuilderRequired.<CommandSource, Biome>argument("biome", ArgumentTypeBiome.biome())
-                        .executes(c -> {
-                            Biome biome = c.getArgument("biome", Biome.class);
-                            c.getSource().sendMessage(biome.translationKey);
-                            Vec3 coords = c.getSource().getCoordinates(false);
-                            if (coords != null) {
-                                Chunk chunk = c.getSource().getWorld().getChunkFromBlockCoords(MathHelper.floor(coords.x), MathHelper.floor(coords.z));
-                                for (int s = 0; s < Chunk.CHUNK_SECTIONS; s++) {
-                                    chunk.getSection(s).setSectionBiome(biome);
-                                }
+            .requires(CommandSource::hasAdmin)
+            .then(ArgumentBuilderLiteral.<CommandSource>literal("set")
+                .then(ArgumentBuilderRequired.<CommandSource, Biome>argument("biome", ArgumentTypeBiome.biome())
+                    .executes(c -> {
+                        Biome biome = c.getArgument("biome", Biome.class);
+                        c.getSource().sendMessage(biome.translationKey);
+                        Vector3dc coords = c.getSource().getCoordinates(false);
+                        if (coords != null) {
+                            Chunk chunk = c.getSource().getWorld().getChunkFromBlockCoords(MathHelper.floor(coords.x()), MathHelper.floor(coords.z()));
+                            for (int s = 0; s < Chunk.CHUNK_SECTIONS; s++) {
+                                chunk.getSection(s).setSectionBiome(biome);
                             }
-                            return Command.SINGLE_SUCCESS;
-                        })))
-                .then(ArgumentBuilderLiteral.<CommandSource>literal("get")
-                        .then(ArgumentBuilderRequired.<CommandSource, IntegerCoordinates>argument("position", ArgumentTypeIntegerCoordinates.intCoordinates())
-                                .executes(c -> {
-                                    IntegerCoordinates position = c.getArgument("position", IntegerCoordinates.class);
-                                    Biome biome = c.getSource().getWorld().getBlockBiome(position.getX(c.getSource()), position.getY(c.getSource(), true), position.getZ(c.getSource()));
-                                    c.getSource().sendTranslatableMessage("command.commands.biome.get.success", position.getX(c.getSource()), position.getY(c.getSource(), true), position.getZ(c.getSource()), Registries.BIOMES.getKey(biome));
-                                    return Command.SINGLE_SUCCESS;
-                                })))
-                .then(ArgumentBuilderLiteral.<CommandSource>literal("locate")
-                        .then(ArgumentBuilderRequired.<CommandSource, Biome>argument("biome", ArgumentTypeBiome.biome())
-                                .executes(c -> {
-                                    Biome biome = c.getArgument("biome", Biome.class);
-                                    Coordinates2D biomeLocation = getBiomeCoords(biome, c.getSource());
-                                    if (biomeLocation == null) throw FAILURE.create(Registries.BIOMES.getKey(biome));
-                                    Vec3 sourcePos = c.getSource().getBlockCoordinates();
-                                    if (sourcePos == null) {
-                                        c.getSource().sendTranslatableMessage("command.commands.biome.locate.success", Registries.BIOMES.getKey(biome), biomeLocation.getX(c.getSource()), biomeLocation.getZ(c.getSource()));
-                                    } else {
-                                        int distance = (int)sourcePos.distanceTo(Vec3.fromPool(biomeLocation.getX(c.getSource()), sourcePos.y, biomeLocation.getZ(c.getSource())));
-                                        c.getSource().sendTranslatableMessage(distance == 1 ? "command.commands.biome.locate.success_in_world_single" : "command.commands.biome.locate.success_in_world_multiple", Registries.BIOMES.getKey(biome), biomeLocation.getX(c.getSource()), biomeLocation.getZ(c.getSource()), distance);
-                                    }
-                                    return Command.SINGLE_SUCCESS;
-                                }))));
+                        }
+                        return Command.SINGLE_SUCCESS;
+                    })))
+            .then(ArgumentBuilderLiteral.<CommandSource>literal("get")
+                .then(ArgumentBuilderRequired.<CommandSource, IntegerCoordinates>argument("position", ArgumentTypeIntegerCoordinates.intCoordinates())
+                    .executes(c -> {
+                        IntegerCoordinates position = c.getArgument("position", IntegerCoordinates.class);
+                        Biome biome = c.getSource().getWorld().getBlockBiome(position.getX(c.getSource()), position.getY(c.getSource(), true), position.getZ(c.getSource()));
+                        c.getSource().sendTranslatableMessage("command.commands.biome.get.success", position.getX(c.getSource()), position.getY(c.getSource(), true), position.getZ(c.getSource()), Registries.BIOMES.getKey(biome));
+                        return Command.SINGLE_SUCCESS;
+                    })))
+            .then(ArgumentBuilderLiteral.<CommandSource>literal("locate")
+                .then(ArgumentBuilderRequired.<CommandSource, Biome>argument("biome", ArgumentTypeBiome.biome())
+                    .executes(c -> {
+                        Biome biome = c.getArgument("biome", Biome.class);
+                        Coordinates2D biomeLocation = getBiomeCoords(biome, c.getSource());
+                        if (biomeLocation == null) throw FAILURE.create(Registries.BIOMES.getKey(biome));
+                        TilePosc sourcePos = c.getSource().getBlockCoordinates();
+                        if (sourcePos == null) {
+                            c.getSource().sendTranslatableMessage("command.commands.biome.locate.success", Registries.BIOMES.getKey(biome), biomeLocation.getX(c.getSource()), biomeLocation.getZ(c.getSource()));
+                        } else {
+                            int distance = (int) sourcePos.distance(biomeLocation.getX(c.getSource()), sourcePos.y(), biomeLocation.getZ(c.getSource()));
+                            c.getSource().sendTranslatableMessage(distance == 1 ? "command.commands.biome.locate.success_in_world_single" : "command.commands.biome.locate.success_in_world_multiple", Registries.BIOMES.getKey(biome), biomeLocation.getX(c.getSource()), biomeLocation.getZ(c.getSource()), distance);
+                        }
+                        return Command.SINGLE_SUCCESS;
+                    }))));
     }
 
     private static Coordinates2D getBiomeCoords(Biome biome, CommandSource source) {
         int[] xPattern = new int[]{0, 1, 0, -1};
         int[] zPattern = new int[]{1, 0, -1, 0};
-        Vec3 sourcePos = source.getBlockCoordinates();
-        if (sourcePos == null) sourcePos = Vec3.fromPool(0.0, 0.0, 0.0);
+        TilePosc sourcePos = source.getBlockCoordinates();
+        if (sourcePos == null) sourcePos = new TilePos(0, 0, 0);
         int runLength = 2;
-        int chunkX = (int)(sourcePos.x / 16.0);
-        int y = (int)sourcePos.y;
-        int chunkZ = (int)(sourcePos.z / 16.0);
+        int chunkX = (int) (sourcePos.x() / 16.0);
+        int chunkZ = (int) (sourcePos.z() / 16.0);
         int passes = 1024;
-        if (source.getWorld().getBlockBiome((int)sourcePos.x, y, (int)sourcePos.z) == biome) {
-            return new Coordinates2D((int)sourcePos.x, (int)sourcePos.z);
+        if (source.getWorld().getBlockBiome(sourcePos) == biome) {
+            return new Coordinates2D(sourcePos.x(), sourcePos.z());
         } else {
             --chunkX;
             --chunkZ;
 
-            for(int pass = 0; pass < passes; ++pass) {
-                for(int i = 0; i < 4; ++i) {
-                    for(int j = runLength - 1; j >= 0; --j) {
+            for (int pass = 0; pass < passes; ++pass) {
+                for (int i = 0; i < 4; ++i) {
+                    for (int j = runLength - 1; j >= 0; --j) {
                         chunkX += xPattern[i];
                         chunkZ += zPattern[i];
-                        if (source.getWorld().getBlockBiome(chunkX * 16, y, chunkZ * 16) == biome) {
+                        if (source.getWorld().getBlockBiome(new TilePos(chunkX * 16, sourcePos.y(), chunkZ * 16)) == biome) {
                             return new Coordinates2D(chunkX * 16, chunkZ * 16);
                         }
                     }
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandClone.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandClone.java
index bdc85300d..3e0bd646d 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandClone.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandClone.java
@@ -12,8 +12,6 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.net.command.CommandManager;
 import net.minecraft.core.net.command.util.CommandHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.Dimension;
 import net.minecraft.core.world.World;
 import net.minecraft.core.net.command.CommandSource;
@@ -25,6 +23,8 @@ import net.minecraft.core.net.command.helpers.ClonedBlock;
 import net.minecraft.core.net.command.helpers.IntegerCoordinate;
 import net.minecraft.core.net.command.helpers.IntegerCoordinates;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.primitives.AABBd;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -141,7 +141,7 @@ public class CommandClone implements CommandManager.CommandRegistry {
         int destinationY = destination.getPosition().getY(source, true);
         int destinationZ = destination.getPosition().getZ(source);
 
-        if (cloneMode == CloneMode.NORMAL && AABB.fromPool(minX, minY, minZ, maxX, maxY, maxZ).contains(Vec3.fromPool(destinationX, destinationY, destinationZ)) && start.getWorld() == destination.getWorld()) {
+        if (cloneMode == CloneMode.NORMAL && new AABBd(minX, minY, minZ, maxX, maxY, maxZ).containsPoint(new Vector3d(destinationX, destinationY, destinationZ)) && start.getWorld() == destination.getWorld()) {
             throw INSIDE_CLONED_AREA.create();
         }
 
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandParticle.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandParticle.java
index ae05993a8..d3f132569 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandParticle.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandParticle.java
@@ -12,7 +12,7 @@ import net.minecraft.core.net.command.CommandManager;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.arguments.ArgumentTypeEntity;
 import net.minecraft.core.net.command.arguments.ArgumentTypeParticleId;
-import net.minecraft.core.net.command.arguments.ArgumentTypeVec3;
+import net.minecraft.core.net.command.arguments.ArgumentTypeVector3d;
 import net.minecraft.core.net.command.helpers.DoubleCoordinates;
 import net.minecraft.core.net.command.helpers.EntitySelector;
 import org.jetbrains.annotations.Nullable;
@@ -34,7 +34,7 @@ public class CommandParticle implements CommandManager.CommandRegistry {
                             }
                             return Command.SINGLE_SUCCESS;
                         })
-                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                             .executes(c -> {
                                 String particleId = c.getArgument("particleId", String.class);
                                 DoubleCoordinates pos = c.getArgument("position", DoubleCoordinates.class);
@@ -42,7 +42,7 @@ public class CommandParticle implements CommandManager.CommandRegistry {
 
                                 return Command.SINGLE_SUCCESS;
                             })
-                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("motion", ArgumentTypeVec3.vec3d())
+                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("motion", ArgumentTypeVector3d.vec3d())
                                 .executes(c -> {
                                     String particleId = c.getArgument("particleId", String.class);
                                     DoubleCoordinates pos = c.getArgument("position", DoubleCoordinates.class);
@@ -92,7 +92,7 @@ public class CommandParticle implements CommandManager.CommandRegistry {
 
                                 return Command.SINGLE_SUCCESS;
                             })
-                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("motion", ArgumentTypeVec3.vec3d())
+                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("motion", ArgumentTypeVector3d.vec3d())
                                 .executes(c -> {
                                     String particleId = c.getArgument("particleId", String.class);
                                     DoubleCoordinates motion = c.getArgument("motion", DoubleCoordinates.class);
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandPlaySound.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandPlaySound.java
index 6dbc18a24..531a202b3 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandPlaySound.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandPlaySound.java
@@ -12,12 +12,12 @@ import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.arguments.ArgumentTypeEntity;
 import net.minecraft.core.net.command.arguments.ArgumentTypeSoundCategory;
 import net.minecraft.core.net.command.arguments.ArgumentTypeSoundId;
-import net.minecraft.core.net.command.arguments.ArgumentTypeVec3;
+import net.minecraft.core.net.command.arguments.ArgumentTypeVector3d;
 import net.minecraft.core.net.command.helpers.DoubleCoordinates;
 import net.minecraft.core.net.command.helpers.EntitySelector;
 import net.minecraft.core.sound.SoundCategory;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import org.joml.Vector3dc;
 
 import java.util.List;
 
@@ -40,16 +40,16 @@ public class CommandPlaySound implements CommandManager.CommandRegistry {
                                 }
                                 return 0;
                             })
-                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                            .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                                 .executes(c -> {
                                     String soundId = c.getArgument("soundId", String.class);
                                     SoundCategory category = c.getArgument("type", SoundCategory.class);
                                     DoubleCoordinates coordinates = c.getArgument("position", DoubleCoordinates.class);
 
-                                    Vec3 coords = c.getSource().getCoordinates(true);
-                                    double sourceX = coords == null ? 0 : coords.x;
-                                    double sourceY = coords == null ? 0 : coords.y;
-                                    double sourceZ = coords == null ? 0 : coords.z;
+                                    Vector3dc coords = c.getSource().getCoordinates(true);
+                                    double sourceX = coords == null ? 0 : coords.x();
+                                    double sourceY = coords == null ? 0 : coords.y();
+                                    double sourceZ = coords == null ? 0 : coords.z();
                                     World world = c.getSource().getWorld();
                                     world.playSoundEffect(null, category, coordinates.getX(sourceX), coordinates.getY(sourceY), coordinates.getZ(sourceZ), soundId, 1f, 1f);
                                     return Command.SINGLE_SUCCESS;
@@ -61,10 +61,10 @@ public class CommandPlaySound implements CommandManager.CommandRegistry {
                                         DoubleCoordinates coordinates = c.getArgument("position", DoubleCoordinates.class);
                                         float volume = c.getArgument("volume", Float.class);
 
-                                        Vec3 coords = c.getSource().getCoordinates(true);
-                                        double sourceX = coords == null ? 0 : coords.x;
-                                        double sourceY = coords == null ? 0 : coords.y;
-                                        double sourceZ = coords == null ? 0 : coords.z;
+                                        Vector3dc coords = c.getSource().getCoordinates(true);
+                                        double sourceX = coords == null ? 0 : coords.x();
+                                        double sourceY = coords == null ? 0 : coords.y();
+                                        double sourceZ = coords == null ? 0 : coords.z();
                                         World world = c.getSource().getWorld();
                                         world.playSoundEffect(null, category, coordinates.getX(sourceX), coordinates.getY(sourceY), coordinates.getZ(sourceZ), soundId, volume, 1f);
                                         return Command.SINGLE_SUCCESS;
@@ -77,10 +77,10 @@ public class CommandPlaySound implements CommandManager.CommandRegistry {
                                             float volume = c.getArgument("volume", Float.class);
                                             float pitch = c.getArgument("pitch", Float.class);
 
-                                            Vec3 coords = c.getSource().getCoordinates(true);
-                                            double sourceX = coords == null ? 0 : coords.x;
-                                            double sourceY = coords == null ? 0 : coords.y;
-                                            double sourceZ = coords == null ? 0 : coords.z;
+                                            Vector3dc coords = c.getSource().getCoordinates(true);
+                                            double sourceX = coords == null ? 0 : coords.x();
+                                            double sourceY = coords == null ? 0 : coords.y();
+                                            double sourceZ = coords == null ? 0 : coords.z();
                                             World world = c.getSource().getWorld();
                                             world.playSoundEffect(null, category, coordinates.getX(sourceX), coordinates.getY(sourceY), coordinates.getZ(sourceZ), soundId, volume, pitch);
                                             return Command.SINGLE_SUCCESS;
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandSummon.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandSummon.java
index 895f529c8..1197ab87a 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandSummon.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandSummon.java
@@ -9,14 +9,13 @@ import com.mojang.brigadier.context.CommandContext;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.net.command.CommandManager;
-import net.minecraft.core.util.phys.Vec3;
-import net.minecraft.core.world.World;
 import net.minecraft.core.net.command.util.CommandHelper;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.arguments.ArgumentTypeEntitySummon;
-import net.minecraft.core.net.command.arguments.ArgumentTypeVec3;
+import net.minecraft.core.net.command.arguments.ArgumentTypeVector3d;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.helpers.DoubleCoordinates;
+import org.joml.Vector3dc;
 
 public class CommandSummon implements CommandManager.CommandRegistry {
     public void register(CommandDispatcher<CommandSource> dispatcher) {
@@ -25,16 +24,16 @@ public class CommandSummon implements CommandManager.CommandRegistry {
                 .then(ArgumentBuilderRequired.<CommandSource, Class<? extends Entity>>argument("entity", ArgumentTypeEntitySummon.entity())
                         .executes(c -> {
                             CommandSource source = c.getSource();
-                            Vec3 coordinates = source.getCoordinates(false);
+                            Vector3dc coordinates = source.getCoordinates(false);
                             if (source.getSender() == null || coordinates == null) throw CommandExceptions.notInWorld().create();
 
-                            Entity entity = summonEntityAt(c, coordinates.x, coordinates.y - source.getSender().heightOffset, coordinates.z, 0.0f, 0.0f);
+                            Entity entity = summonEntityAt(c, coordinates.x(), coordinates.y() - source.getSender().heightOffset, coordinates.z(), 0.0f, 0.0f);
 
                             source.sendTranslatableMessage("command.commands.summon.success_single_entity", CommandHelper.getEntityName(entity));
 
                             return Command.SINGLE_SUCCESS;
                         })
-                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                                 .executes(c -> {
                                     CommandSource source = c.getSource();
                                     DoubleCoordinates coordinates = c.getArgument("position", DoubleCoordinates.class);
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandTeleport.java b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandTeleport.java
index 20bfd5712..d1f1e7ad8 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandTeleport.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/commands/CommandTeleport.java
@@ -12,12 +12,11 @@ import net.minecraft.core.net.command.arguments.ArgumentTypeDimension;
 import net.minecraft.core.net.command.util.CommandHelper;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.arguments.ArgumentTypeEntity;
-import net.minecraft.core.net.command.arguments.ArgumentTypeVec3;
+import net.minecraft.core.net.command.arguments.ArgumentTypeVector3d;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.helpers.DoubleCoordinates;
 import net.minecraft.core.net.command.helpers.EntitySelector;
 import net.minecraft.core.world.Dimension;
-import net.minecraft.core.world.PortalHandler;
 
 import java.util.List;
 
@@ -26,7 +25,7 @@ public class CommandTeleport implements CommandManager.CommandRegistry {
         CommandNode<CommandSource> command = dispatcher.register(ArgumentBuilderLiteral.<CommandSource>literal("teleport")
                 .requires(CommandSource::hasAdmin)
                 .then(ArgumentBuilderRequired.<CommandSource, Dimension>argument("dimension", ArgumentTypeDimension.dimension())
-                    .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                    .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                         .executes(c -> {
                             CommandSource source = c.getSource();
                             DoubleCoordinates targetCoordinates = c.getArgument("position", DoubleCoordinates.class);
@@ -56,7 +55,7 @@ public class CommandTeleport implements CommandManager.CommandRegistry {
                         return Command.SINGLE_SUCCESS;
                     })
                 )
-                .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                         .executes(c -> {
                             CommandSource source = c.getSource();
                             DoubleCoordinates targetCoordinates = c.getArgument("position", DoubleCoordinates.class);
@@ -71,7 +70,7 @@ public class CommandTeleport implements CommandManager.CommandRegistry {
                             return Command.SINGLE_SUCCESS;
                         }))
                 .then(ArgumentBuilderRequired.<CommandSource, EntitySelector>argument("entity", ArgumentTypeEntity.entities())
-                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVec3.vec3d())
+                        .then(ArgumentBuilderRequired.<CommandSource, DoubleCoordinates>argument("position", ArgumentTypeVector3d.vec3d())
                                 .executes(c -> {
                                     CommandSource source = c.getSource();
                                     EntitySelector entitySelector = c.getArgument("entity", EntitySelector.class);
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/helpers/Coordinates2D.java b/game/core/src/main/java/net/minecraft/core/net/command/helpers/Coordinates2D.java
index f435adaea..1394462c1 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/helpers/Coordinates2D.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/helpers/Coordinates2D.java
@@ -2,16 +2,17 @@ package net.minecraft.core.net.command.helpers;
 
 import com.mojang.brigadier.exceptions.CommandSyntaxException;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3dc;
 
 public class Coordinates2D {
-    private final IntegerCoordinate x;
-    private final IntegerCoordinate z;
+    private final @NotNull IntegerCoordinate x;
+    private final @NotNull IntegerCoordinate z;
 
-    public Coordinates2D(IntegerCoordinate x, IntegerCoordinate z) {
+    public Coordinates2D(@NotNull IntegerCoordinate x, @NotNull IntegerCoordinate z) {
         this.x = x;
         this.z = z;
     }
@@ -37,7 +38,7 @@ public class Coordinates2D {
     }
 
     public int getX(CommandSource source) throws CommandSyntaxException {
-        Vec3 sourceCoordinates = source.getCoordinates(true);
+        Vector3dc sourceCoordinates = source.getCoordinates(true);
         if (sourceCoordinates == null) {
             if (!this.x.isRelative()) {
                 return this.x.get(0);
@@ -45,11 +46,11 @@ public class Coordinates2D {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.x.get(MathHelper.floor(sourceCoordinates.x / 16.0));
+        return this.x.get(MathHelper.floor(sourceCoordinates.x() / 16.0));
     }
 
     public int getZ(CommandSource source) throws CommandSyntaxException {
-        Vec3 sourceCoordinates = source.getCoordinates(true);
+        Vector3dc sourceCoordinates = source.getCoordinates(true);
         if (sourceCoordinates == null) {
             if (!this.z.isRelative()) {
                 return this.z.get(0);
@@ -57,7 +58,7 @@ public class Coordinates2D {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.z.get(MathHelper.floor(sourceCoordinates.z / 16.0));
+        return this.z.get(MathHelper.floor(sourceCoordinates.z() / 16.0));
     }
 
     public boolean hasRelativeCoordinate() {
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/helpers/DoubleCoordinates.java b/game/core/src/main/java/net/minecraft/core/net/command/helpers/DoubleCoordinates.java
index 3e7ef40a5..632fd6f9e 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/helpers/DoubleCoordinates.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/helpers/DoubleCoordinates.java
@@ -35,7 +35,7 @@ public class DoubleCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.x.get(source.getCoordinates(false).x);
+        return this.x.get(source.getCoordinates(false).x());
     }
 
     public double getY(CommandSource source, boolean offsetHeight) throws CommandSyntaxException {
@@ -46,7 +46,7 @@ public class DoubleCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.y.get(source.getCoordinates(offsetHeight).y);
+        return this.y.get(source.getCoordinates(offsetHeight).y());
     }
 
     public double getZ(CommandSource source) throws CommandSyntaxException {
@@ -57,7 +57,7 @@ public class DoubleCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.z.get(source.getCoordinates(false).z);
+        return this.z.get(source.getCoordinates(false).z());
     }
 
     public boolean hasRelativeCoordinates() {
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelector.java b/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelector.java
index 7d3a2a559..98e19091f 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelector.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelector.java
@@ -5,9 +5,12 @@ import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -29,10 +32,14 @@ public class EntitySelector {
     private final @Nullable String entityId;
     private final @Nullable String playerName;
     private final MinMaxBounds.Doubles distance;
-    private final Function<Vec3, Vec3> position;
-    private final @Nullable AABB aABB;
-
-    public EntitySelector(int maxResults, boolean includesEntities, BiConsumer<Entity, List<? extends Entity>> order, @Nullable Class<? extends Entity> limitToType, boolean typeInverse, boolean currentEntity, Predicate<Entity> predicate, @Nullable String entityId, @Nullable String playerName, MinMaxBounds.Doubles distance, Function<Vec3, Vec3> position, @Nullable AABB aABB) {
+    private final Function<@NotNull Vector3dc, @NotNull Vector3dc> position;
+    private final @Nullable AABBd aabb;
+
+    public EntitySelector(
+        int maxResults, boolean includesEntities, BiConsumer<Entity, List<? extends Entity>> order,
+        @Nullable Class<? extends Entity> limitToType, boolean typeInverse, boolean currentEntity,
+        Predicate<Entity> predicate, @Nullable String entityId, @Nullable String playerName,
+        MinMaxBounds.Doubles distance, @NotNull Function<@NotNull Vector3dc, @NotNull Vector3dc> position, @Nullable AABBdc aabb) {
         this.maxResults = maxResults;
         this.includesEntities = includesEntities;
         this.order = order;
@@ -44,7 +51,7 @@ public class EntitySelector {
         this.playerName = playerName;
         this.distance = distance;
         this.position = position;
-        this.aABB = aABB;
+        this.aabb = aabb == null ? null : new AABBd(aabb);
     }
 
     public List<? extends Entity> get(CommandSource source) throws CommandSyntaxException {
@@ -84,28 +91,28 @@ public class EntitySelector {
             entities = source.getWorld().players;
         }
 
-        Vec3 sourceCoordinates = source.getCoordinates(true); // Should I leave it as true or should I make it false? I don't know
-        Vec3 position;
+        Vector3dc sourceCoordinates = source.getCoordinates(true); // Should I leave it as true or should I make it false? I don't know
+        Vector3dc position;
         if (sourceCoordinates != null) {
             position = this.position.apply(sourceCoordinates);
-            if (this.aABB != null) {
-                this.aABB.minX = this.aABB.minX + position.x;
-                this.aABB.maxX = this.aABB.maxX + position.x;
-                this.aABB.minY = this.aABB.minY + position.y;
-                this.aABB.maxY = this.aABB.maxY + position.y;
-                this.aABB.minZ = this.aABB.minZ + position.z;
-                this.aABB.maxZ = this.aABB.maxZ + position.z;
+            if (this.aabb != null) {
+                this.aabb.minX = this.aabb.minX + position.x();
+                this.aabb.maxX = this.aabb.maxX + position.x();
+                this.aabb.minY = this.aabb.minY + position.y();
+                this.aabb.maxY = this.aabb.maxY + position.y();
+                this.aabb.minZ = this.aabb.minZ + position.z();
+                this.aabb.maxZ = this.aabb.maxZ + position.z();
             }
         } else {
-            position = this.position.apply(Vec3.fromPool(0, 0, 0));
+            position = this.position.apply(new Vector3d());
         }
 
         List<? extends Entity> temp = new ArrayList<>(entities);
         for (Entity entity : entities) {
-            if ((limitToType != null && limitToType.isInstance(entity) == this.typeInverse)
-                || !predicate.test(entity)
-                || !this.distanceContains(entity, position.x, position.y, position.z)
-                || !aABBIntersectsWithAABB(this.aABB, entity.bb)) {
+            if ((this.limitToType != null && this.limitToType.isInstance(entity) == this.typeInverse)
+                || !this.predicate.test(entity)
+                || !this.distanceContains(entity, position.x(), position.y(), position.z())
+                || !aabbIntersectsWithAABB(this.aabb, entity.bb)) {
                 temp.remove(entity);
             }
         }
@@ -117,7 +124,7 @@ public class EntitySelector {
         // Predicate
         List<Entity> listAfterPredicate = new ArrayList<>();
         for (Entity entity : entities) {
-            if (!predicate.test(entity)) continue;
+            if (!this.predicate.test(entity)) continue;
             listAfterPredicate.add(entity);
         }
 
@@ -133,9 +140,9 @@ public class EntitySelector {
         return this.distance.contains(entity.distanceTo(x, y, z));
     }
 
-    private static boolean aABBIntersectsWithAABB(AABB aABB1, AABB aABB2) {
-        if (aABB1 == null) return true;
-        return aABB2 != null && aABB1.intersects(aABB2);
+    private static boolean aabbIntersectsWithAABB(@Nullable AABBdc aabb1, @Nullable AABBdc aabb2) {
+        if (aabb1 == null) return true;
+        return aabb2 != null && aabb1.intersectsAABB((AABBd) aabb2);
     }
 
     public int getMaxResults() {
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelectorParser.java b/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelectorParser.java
index 921213051..b991cf341 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelectorParser.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/helpers/EntitySelectorParser.java
@@ -11,9 +11,12 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.net.command.exceptions.CommandExceptions;
 import net.minecraft.core.net.command.util.CommandHelper;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.util.Collections;
 import java.util.List;
@@ -138,7 +141,7 @@ public class EntitySelectorParser {
         this.suggestions = this::suggestNameOrSelector;
         if (this.reader.canRead() && this.reader.peek() == '@') {
             if (!this.allowSelectors) {
-                throw SELECTORS_NOT_ALLOWED.createWithContext(this.reader);
+                throw this.SELECTORS_NOT_ALLOWED.createWithContext(this.reader);
             }
             this.parseSelector();
         } else {
@@ -183,30 +186,30 @@ public class EntitySelectorParser {
     }
 
     public EntitySelector getSelector() {
-        AABB aABB;
+        AABBdc aabb;
         if (this.deltaX != null || this.deltaY != null || this.deltaZ != null) {
-            aABB = this.createAabb(this.deltaX == null ? 0.0 : this.deltaX, this.deltaY == null ? 0.0 : this.deltaY, this.deltaZ == null ? 0.0 : this.deltaZ);
+            aabb = this.createAABB(this.deltaX == null ? 0.0 : this.deltaX, this.deltaY == null ? 0.0 : this.deltaY, this.deltaZ == null ? 0.0 : this.deltaZ);
         } else if (this.distance.getMax() != null) {
-            double d = (Double) this.distance.getMax();
-            aABB = AABB.fromPool(-d, -d, -d, d + 1.0, d + 1.0, d + 1.0);
+            double d = this.distance.getMax();
+            aabb = new AABBd(-d, -d, -d, d + 1.0, d + 1.0, d + 1.0);
         } else {
-            aABB = null;
+            aabb = null;
         }
-        Function<Vec3, Vec3> position = this.x == null && this.y == null && this.z == null ? vec3 -> vec3 : vec3 -> Vec3.fromPool(this.x == null ? vec3.x : this.x, this.y == null ? vec3.y : this.y, this.z == null ? vec3.z : this.z);
-        return new EntitySelector(this.maxResults, this.includesEntities, this.order, this.limitToType, this.typeInverse, this.currentEntity, this.predicate, this.entityId, this.playerName, this.distance, position, aABB);
+        Function<Vector3dc, Vector3dc> position = this.x == null && this.y == null && this.z == null ? vec3 -> vec3 : vec -> new Vector3d(this.x == null ? vec.x() : this.x, this.y == null ? vec.y() : this.y, this.z == null ? vec.z() : this.z);
+        return new EntitySelector(this.maxResults, this.includesEntities, this.order, this.limitToType, this.typeInverse, this.currentEntity, this.predicate, this.entityId, this.playerName, this.distance, position, aabb);
     }
 
-    private AABB createAabb(double d, double e, double f) {
-        boolean bl = d < 0.0;
-        boolean bl2 = e < 0.0;
-        boolean bl3 = f < 0.0;
-        double g = bl ? d : 0.0;
-        double h = bl2 ? e : 0.0;
-        double i = bl3 ? f : 0.0;
-        double j = (bl ? 0.0 : d) + 1.0;
-        double k = (bl2 ? 0.0 : e) + 1.0;
-        double l = (bl3 ? 0.0 : f) + 1.0;
-        return AABB.fromPool(g, h, i, j, k, l);
+    private @NotNull AABBd createAABB(double deltaX, double deltaY, double deltaZ) {
+        boolean bl = deltaX < 0.0;
+        boolean bl2 = deltaY < 0.0;
+        boolean bl3 = deltaZ < 0.0;
+        double minX = bl ? deltaX : 0.0;
+        double minY = bl2 ? deltaY : 0.0;
+        double minZ = bl3 ? deltaZ : 0.0;
+        double maxX = (bl ? 0.0 : deltaX) + 1.0;
+        double maxY = (bl2 ? 0.0 : deltaY) + 1.0;
+        double maxZ = (bl3 ? 0.0 : deltaZ) + 1.0;
+        return new AABBd(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
     public void addPredicate(Predicate<Entity> predicate) {
@@ -294,7 +297,7 @@ public class EntitySelectorParser {
     private boolean hasGamemodeNotEquals = false;
     private boolean isSorted = false;
     private boolean hasLimit = false;
-    private boolean hasType = false;
+    private final boolean hasType = false;
     private boolean hasNameEquals = false;
     private boolean hasNameNotEquals = false;
     private boolean hasNbt = false;
@@ -380,7 +383,7 @@ public class EntitySelectorParser {
         this.order = order;
     }
 
-    public void setLimitToType(Class<? extends Entity> type) {
+    public void setLimitToType(@Nullable Class<? extends Entity> type) {
         this.limitToType = type;
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/net/command/helpers/IntegerCoordinates.java b/game/core/src/main/java/net/minecraft/core/net/command/helpers/IntegerCoordinates.java
index e207a616c..4aaabfd86 100644
--- a/game/core/src/main/java/net/minecraft/core/net/command/helpers/IntegerCoordinates.java
+++ b/game/core/src/main/java/net/minecraft/core/net/command/helpers/IntegerCoordinates.java
@@ -51,7 +51,7 @@ public class IntegerCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.x.get((int) Math.floor(source.getCoordinates(true).x));
+        return this.x.get((int) Math.floor(source.getCoordinates(true).x()));
     }
 
     public int getY(CommandSource source, boolean offsetHeight) throws CommandSyntaxException {
@@ -62,7 +62,7 @@ public class IntegerCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.y.get((int) Math.floor(source.getCoordinates(offsetHeight).y));
+        return this.y.get((int) Math.floor(source.getCoordinates(offsetHeight).y()));
     }
 
     public int getZ(CommandSource source) throws CommandSyntaxException {
@@ -73,7 +73,7 @@ public class IntegerCoordinates {
                 throw CommandExceptions.notInWorld().create();
             }
         }
-        return this.z.get((int) Math.floor(source.getCoordinates(true).z));
+        return this.z.get((int) Math.floor(source.getCoordinates(true).z()));
     }
 
     public boolean hasRelativeCoordinate() {
diff --git a/game/core/src/main/java/net/minecraft/core/net/handler/PacketHandler.java b/game/core/src/main/java/net/minecraft/core/net/handler/PacketHandler.java
index 6774629b4..308637c87 100644
--- a/game/core/src/main/java/net/minecraft/core/net/handler/PacketHandler.java
+++ b/game/core/src/main/java/net/minecraft/core/net/handler/PacketHandler.java
@@ -1,400 +1,333 @@
 package net.minecraft.core.net.handler;
 
 import net.minecraft.core.net.packet.*;
+import org.jetbrains.annotations.NotNull;
 
-public abstract class PacketHandler
-{
+public abstract class PacketHandler {
 
-    public PacketHandler()
-    {
+    public PacketHandler() {
     }
 
     public abstract boolean isServerHandler();
 
-    public void handleMapChunk(PacketBlockRegionUpdate blockRegionUpdatePacket)
-    {
+    public void handleBlockRegionUpdate(@NotNull PacketBlockRegionUpdate packetBlockRegionUpdate) {
     }
 
-    public void handleInvalidPacket(Packet packet)
-    {
+    public void handleInvalidPacket(@NotNull Packet packet) {
     }
 
-    public void handleErrorMessage(String message, Object[] objects)
-    {
+    public void handleErrorMessage(String message, Object[] objects) {
     }
 
-    public void handleKickDisconnect(PacketDisconnect packet255KickdisconnectPacket)
-    {
-        handleInvalidPacket(packet255KickdisconnectPacket);
+    public void handleDisconnect(@NotNull PacketDisconnect packetDisconnect) {
+        handleInvalidPacket(packetDisconnect);
     }
 
-    public void handleLogin(PacketLogin loginPacket)
-    {
-        handleInvalidPacket(loginPacket);
+    public void handleLogin(@NotNull PacketLogin packetLogin) {
+        handleInvalidPacket(packetLogin);
     }
 
-    public void handlePlayerConfig(PacketPlayerConfig packetPlayerConfig)
-    {
+    public void handlePlayerConfig(@NotNull PacketPlayerConfig packetPlayerConfig) {
         handleInvalidPacket(packetPlayerConfig);
     }
 
-    public void handleFlying(PacketMovePlayer movePlayerPacket)
-    {
-        handleInvalidPacket(movePlayerPacket);
+    public void handleMovePlayer(@NotNull PacketMovePlayer packetMovePlayer) {
+        handleInvalidPacket(packetMovePlayer);
     }
 
-    public void handleMultiBlockChange(PacketChunkBlocksUpdate chunkBlocksUpdatePacket)
-    {
-        handleInvalidPacket(chunkBlocksUpdatePacket);
+    public void handleChunkBlocksUpdate(@NotNull PacketChunkBlocksUpdate packetChunkBlocksUpdate) {
+        handleInvalidPacket(packetChunkBlocksUpdate);
     }
 
-    public void handleBlockDig(PacketPlayerAction playerActionPacket)
-    {
-        handleInvalidPacket(playerActionPacket);
+    public void handlePlayerAction(@NotNull PacketPlayerAction packetPlayerAction) {
+        handleInvalidPacket(packetPlayerAction);
     }
 
-    public void handleBlockUpdate(PacketBlockUpdate blockUpdatePacket)
-    {
-        handleInvalidPacket(blockUpdatePacket);
+    public void handleBlockUpdate(@NotNull PacketBlockUpdate packetBlockUpdate) {
+        handleInvalidPacket(packetBlockUpdate);
     }
 
-    public void handlePreChunk(PacketChunkVisibility chunkVisibilityPacket)
-    {
-        handleInvalidPacket(chunkVisibilityPacket);
+    public void handleChunkVisibility(@NotNull PacketChunkVisibility packetChunkVisibility) {
+        handleInvalidPacket(packetChunkVisibility);
     }
 
-    public void handleNamedEntitySpawn(PacketAddPlayer addPlayerPacket)
-    {
-        handleInvalidPacket(addPlayerPacket);
+    public void handleAddPlayer(@NotNull PacketAddPlayer packetAddPlayer) {
+        handleInvalidPacket(packetAddPlayer);
     }
 
-    public void handleEntity(PacketMoveEntity moveEntityPacket)
-    {
-        handleInvalidPacket(moveEntityPacket);
+    public void handleMoveEntity(@NotNull PacketMoveEntity packetMoveEntity) {
+        handleInvalidPacket(packetMoveEntity);
     }
 
-    public void handleEntityTeleport(PacketTeleportEntity teleportEntityPacket)
-    {
-        handleInvalidPacket(teleportEntityPacket);
+    public void handleTeleportEntity(@NotNull PacketTeleportEntity packetTeleportEntity) {
+        handleInvalidPacket(packetTeleportEntity);
     }
 
-    public void handleEntityFling(PacketEntityFling packetEntityFling) {
+    public void handleEntityFling(@NotNull PacketEntityFling packetEntityFling) {
         handleInvalidPacket(packetEntityFling);
     }
 
-    public void handlePlace(PacketUseOrPlaceItemStack useItemPacket)
-    {
-        handleInvalidPacket(useItemPacket);
+    public void handleUseOrPlaceItem(@NotNull PacketUseOrPlaceItemStack packetUseOrPlaceItemStack) {
+        handleInvalidPacket(packetUseOrPlaceItemStack);
     }
 
-    public void handleBlockItemSwitch(PacketSetCarriedItem setCarriedItemPacket)
-    {
-        handleInvalidPacket(setCarriedItemPacket);
+    public void handleSetCarriedItem(@NotNull PacketSetCarriedItem packetSetCarriedItem) {
+        handleInvalidPacket(packetSetCarriedItem);
     }
 
-    public void handleDestroyEntity(PacketRemoveEntity removeEntityPacket)
-    {
-        handleInvalidPacket(removeEntityPacket);
+    public void handleRemoveEntity(@NotNull PacketRemoveEntity packetRemoveEntity) {
+        handleInvalidPacket(packetRemoveEntity);
     }
 
-    public void handleSetPaintingMotive(PacketSetPaintingArt setPaintingArtPacket)
-    {
-        handleInvalidPacket(setPaintingArtPacket);
+    public void handleSetPaintingArt(@NotNull PacketSetPaintingArt packetSetPaintingArt) {
+        handleInvalidPacket(packetSetPaintingArt);
     }
 
-    public void handlePickupSpawn(PacketAddItemEntity addItemEntityPacket)
-    {
-        handleInvalidPacket(addItemEntityPacket);
+    public void handleAddItemEntity(@NotNull PacketAddItemEntity packetAddItemEntity) {
+        handleInvalidPacket(packetAddItemEntity);
     }
 
-    public void handleCollect(PacketTakeItemEntity takeItemEntityPacket)
-    {
-        handleInvalidPacket(takeItemEntityPacket);
+    public void handleTakeItemEntity(@NotNull PacketTakeItemEntity packetTakeItemEntity) {
+        handleInvalidPacket(packetTakeItemEntity);
     }
 
-    public void handleChat(PacketChat chatPacket)
-    {
-        handleInvalidPacket(chatPacket);
+    public void handleChat(@NotNull PacketChat packetChat) {
+        handleInvalidPacket(packetChat);
     }
 
-    public void handleVehicleSpawn(PacketAddEntity addEntityPacket)
-    {
-        handleInvalidPacket(addEntityPacket);
+    public void handleAddEntity(@NotNull PacketAddEntity packetAddEntity) {
+        handleInvalidPacket(packetAddEntity);
     }
 
-    public void handleAnimation(PacketAnimate animatePacket)
-    {
-        handleInvalidPacket(animatePacket);
+    public void handleAnimation(@NotNull PacketAnimate packetAnimate) {
+        handleInvalidPacket(packetAnimate);
     }
 
-    public void handlePlayerState(PacketUpdatePlayerState updatePlayerStatePacket)
-    {
-        handleInvalidPacket(updatePlayerStatePacket);
+    public void handleUpdatePlayerState(@NotNull PacketUpdatePlayerState packetUpdatePlayerState) {
+        handleInvalidPacket(packetUpdatePlayerState);
     }
 
-    public void handleHandshake(PacketPreLogin preLoginPacket)
-    {
-        handleInvalidPacket(preLoginPacket);
+    public void handleHandshake(@NotNull PacketHandshake packetHandshake) {
+        handleInvalidPacket(packetHandshake);
     }
 
-    public void handleMobSpawn(PacketAddMob addMobPacket)
-    {
-        handleInvalidPacket(addMobPacket);
+    public void handleAddMob(@NotNull PacketAddMob packetAddMob) {
+        handleInvalidPacket(packetAddMob);
     }
 
-    public void handleUpdateTime(PacketSetTime setTimePacket)
-    {
-        handleInvalidPacket(setTimePacket);
+    public void handleSetTime(@NotNull PacketSetTime packetSetTime) {
+        handleInvalidPacket(packetSetTime);
     }
 
-    public void handleSpawnPosition(PacketSetSpawnPosition setSpawnPositionPacket)
-    {
-        handleInvalidPacket(setSpawnPositionPacket);
+    public void handleSetSpawnPosition(@NotNull PacketSetSpawnPosition packetSetSpawnPosition) {
+        handleInvalidPacket(packetSetSpawnPosition);
     }
 
-    public void handleEntityVelocity(PacketSetEntityMotion setEntityMotionPacket)
-    {
-        handleInvalidPacket(setEntityMotionPacket);
+    public void handleSetEntityMotion(@NotNull PacketSetEntityMotion packetSetEntityMotion) {
+        handleInvalidPacket(packetSetEntityMotion);
     }
 
-    public void handleEntityMetadata(PacketSetEntityData setEntityDataPacket)
-    {
-        handleInvalidPacket(setEntityDataPacket);
+    public void handleSetEntityData(@NotNull PacketSetEntityData packetSetEntityData) {
+        handleInvalidPacket(packetSetEntityData);
     }
 
-    public void handleAttachEntity(PacketSetRiding setRidingPacket)
-    {
-        handleInvalidPacket(setRidingPacket);
+    public void handleSetRiding(@NotNull PacketSetRiding packetSetRiding) {
+        handleInvalidPacket(packetSetRiding);
     }
 
-    public void handleUseEntity(PacketInteract interactPacket)
-    {
-        handleInvalidPacket(interactPacket);
+    public void handleEntityInteract(@NotNull PacketEntityInteract packetEntityInteract) {
+        handleInvalidPacket(packetEntityInteract);
     }
 
-    public void handleEntityStatus(PacketEntityEvent enitityEventPacket)
-    {
-        handleInvalidPacket(enitityEventPacket);
+    public void handleEntityEvent(@NotNull PacketEntityEvent packetEntityEvent) {
+        handleInvalidPacket(packetEntityEvent);
     }
 
-    public void handleEntityTagData(PacketEntityTagData entityTagDataPacket)
-    {
-        handleInvalidPacket(entityTagDataPacket);
+    public void handleEntityTagData(@NotNull PacketEntityTagData packetEntityTagData) {
+        handleInvalidPacket(packetEntityTagData);
     }
 
-    public void handleUpdateHealth(PacketSetHealth setHealthPacket)
-    {
-        handleInvalidPacket(setHealthPacket);
+    public void handleSetHealth(@NotNull PacketSetHealth packetSetHealth) {
+        handleInvalidPacket(packetSetHealth);
     }
 
-    public void handleUpdatePlayerProfile(PacketUpdatePlayerProfile updatePlayerProfilePacket)
-    {
-        handleInvalidPacket(updatePlayerProfilePacket);
+    public void handleUpdatePlayerProfile(@NotNull PacketUpdatePlayerProfile packetUpdatePlayerProfile) {
+        handleInvalidPacket(packetUpdatePlayerProfile);
     }
 
-    public void handleRespawn(PacketRespawn respawnPacket)
-    {
-        handleInvalidPacket(respawnPacket);
+    public void handleRespawn(@NotNull PacketRespawn packetRespawn) {
+        handleInvalidPacket(packetRespawn);
     }
 
-    public void handleExplosion(PacketExplosion explosionPacket)
-    {
-        handleInvalidPacket(explosionPacket);
+    public void handleExplosion(@NotNull PacketExplosion packetExplosion) {
+        handleInvalidPacket(packetExplosion);
     }
 
-    public void handleOpenWindow(PacketContainerOpen containerOpenPacket)
-    {
-        handleInvalidPacket(containerOpenPacket);
+    public void handleContainerOpen(@NotNull PacketContainerOpen packetContainerOpen) {
+        handleInvalidPacket(packetContainerOpen);
     }
 
-    public void handleCloseWindow(PacketContainerClose containerClosePacket)
-    {
-        handleInvalidPacket(containerClosePacket);
+    public void handleContainerClose(@NotNull PacketContainerClose packetContainerClose) {
+        handleInvalidPacket(packetContainerClose);
     }
 
-    public void handleWindowClick(PacketContainerClick containerClickPacket)
-    {
-        handleInvalidPacket(containerClickPacket);
+    public void handleContainerClick(@NotNull PacketContainerClick packetContainerClick) {
+        handleInvalidPacket(packetContainerClick);
     }
 
-    public void handleTileEntityData(PacketTileEntityData packetTileEntityData)
-    {
+    public void handleTileEntityData(@NotNull PacketTileEntityData packetTileEntityData) {
         handleInvalidPacket(packetTileEntityData);
     }
 
-    public void handleSetSlot(PacketContainerSetSlot containerSetslotPacket)
-    {
-        handleInvalidPacket(containerSetslotPacket);
+    public void handleContainerSetSlot(@NotNull PacketContainerSetSlot packetContainerSetSlot) {
+        handleInvalidPacket(packetContainerSetSlot);
     }
 
-    public void handleWindowItems(PacketContainerSetContent containerSetContentPacket)
-    {
-        handleInvalidPacket(containerSetContentPacket);
+    public void handleContainerSetContent(@NotNull PacketContainerSetContent packetContainerSetContent) {
+        handleInvalidPacket(packetContainerSetContent);
     }
 
-    public void handleUpdateSign(PacketSignUpdate signUpdatePacket)
-    {
-        handleInvalidPacket(signUpdatePacket);
+    public void handleSignUpdate(@NotNull PacketSignUpdate packetSignUpdate) {
+        handleInvalidPacket(packetSignUpdate);
     }
 
-    public void handleSetMobSpawner(PacketSetMobSpawner setMobSpawnerPacket)
-    {
-        handleInvalidPacket(setMobSpawnerPacket);
+    public void handleSetMobSpawner(@NotNull PacketSetMobSpawner packetSetMobSpawner) {
+        handleInvalidPacket(packetSetMobSpawner);
     }
-    
-    public void handleUpdateProgressbar(PacketContainerSetData containerSetDataPacket)
-    {
-        handleInvalidPacket(containerSetDataPacket);
+
+    public void handleContainerSetData(@NotNull PacketContainerSetData packetContainerSetData) {
+        handleInvalidPacket(packetContainerSetData);
     }
 
-    public void handlePlayerInventory(PacketSetEquippedItem setEquippedItemPacket)
-    {
-        handleInvalidPacket(setEquippedItemPacket);
+    public void handleSetEquippedItem(@NotNull PacketSetEquippedItem packetSetEquippedItem) {
+        handleInvalidPacket(packetSetEquippedItem);
     }
 
-    public void handlePlayerHeldObject(PacketSetHeldObject setHeldObjectPacket) {
-        handleInvalidPacket(setHeldObjectPacket);
+    public void handleSetHeldObject(@NotNull PacketSetHeldObject packetSetHeldObject) {
+        handleInvalidPacket(packetSetHeldObject);
     }
 
-    public void handleTransaction(PacketContainerAck containerAckPacket)
-    {
-        handleInvalidPacket(containerAckPacket);
+    public void handleContainerAck(@NotNull PacketContainerAck packetContainerAck) {
+        handleInvalidPacket(packetContainerAck);
     }
 
-    public void handleEntityPainting(PacketAddPainting addPaintingPacket)
-    {
-        handleInvalidPacket(addPaintingPacket);
+    public void handleAddPainting(@NotNull PacketAddPainting packetAddPainting) {
+        handleInvalidPacket(packetAddPainting);
     }
-    public void handleBoatControl(PacketBoatControl boatControlPacket)
-    {
-        handleInvalidPacket(boatControlPacket);
+
+    public void handleBoatControl(@NotNull PacketBoatControl packetBoatControl) {
+        handleInvalidPacket(packetBoatControl);
     }
 
-    public void handleBlockEvent(PacketBlockEvent blockEventPacket)
-    {
-        handleInvalidPacket(blockEventPacket);
+    public void handleBlockEvent(@NotNull PacketBlockEvent packetBlockEvent) {
+        handleInvalidPacket(packetBlockEvent);
     }
 
-    public void handleStatistic(PacketStatistic statisticPacket)
-    {
-        handleInvalidPacket(statisticPacket);
+    public void handleStatistic(@NotNull PacketStatistic packetStatistic) {
+        handleInvalidPacket(packetStatistic);
     }
 
-    public void handleSleep(PacketSleep sleepPacket)
-    {
-        handleInvalidPacket(sleepPacket);
+    public void handleSleep(@NotNull PacketSleep packetSleep) {
+        handleInvalidPacket(packetSleep);
     }
-    public void handleBed(PacketBedMessage bedMessagePacket)
-    {
-        handleInvalidPacket(bedMessagePacket);
+
+    public void handleBedMessage(@NotNull PacketBedMessage packetBedMessage) {
+        handleInvalidPacket(packetBedMessage);
     }
 
-    public void handleWeather(PacketWeatherEffect weatherEffectPacket)
-    {
-        handleInvalidPacket(weatherEffectPacket);
+    public void handleWeatherEffect(@NotNull PacketWeatherEffect packetWeatherEffect) {
+        handleInvalidPacket(packetWeatherEffect);
     }
 
-    public void handleMapData(PacketMapData mapdataPacket)
-    {
-        handleInvalidPacket(mapdataPacket);
+    public void handleMapData(@NotNull PacketMapData packetMapData) {
+        handleInvalidPacket(packetMapData);
     }
 
-    public void handlePlaySoundEffect(PacketPlaySoundEffect playSoundEffectPacket)
-    {
-        handleInvalidPacket(playSoundEffectPacket);
+    public void handlePlaySoundEffect(@NotNull PacketPlaySound packetPlaySound) {
+        handleInvalidPacket(packetPlaySound);
     }
-    public void handlePlaySoundDirectly(PacketPlaySoundEffectDirect playSoundEffectDirectPacket)
-    {
-        handleInvalidPacket(playSoundEffectDirectPacket);
+
+    public void handlePlaySoundDirectly(@NotNull PacketPlaySoundDirect packetPlaySoundDirect) {
+        handleInvalidPacket(packetPlaySoundDirect);
     }
-    public void handleSpawnParticle(PacketAddParticle addParticlePacket)
-    {
-        handleInvalidPacket(addParticlePacket);
+
+    public void handleAddParticle(@NotNull PacketAddParticle packetAddParticle) {
+        handleInvalidPacket(packetAddParticle);
     }
 
-    public void handleEntityPlayerGamemode(PacketPlayerGamemode playerGamemodePacket)
-    {
-        handleInvalidPacket(playerGamemodePacket);
+    public void handlePlayerGamemode(@NotNull PacketPlayerGamemode packetPlayerGamemode) {
+        handleInvalidPacket(packetPlayerGamemode);
     }
 
-    public void handleUpdateCreativeInventory(PacketUpdateCreativeInventory updateCreativeInventoryPacket)
-    {
-        handleInvalidPacket(updateCreativeInventoryPacket);
+    public void handleUpdateCreativeInventory(@NotNull PacketUpdateCreativeInventory packetUpdateCreativeInventory) {
+        handleInvalidPacket(packetUpdateCreativeInventory);
     }
 
-    public void handleWeatherStatus(PacketWeatherStatus weatherStatusPacket)
-    {
-        handleInvalidPacket(weatherStatusPacket);
+    public void handleWeatherStatus(@NotNull PacketWeatherStatus packetWeatherStatus) {
+        handleInvalidPacket(packetWeatherStatus);
     }
 
-    public void handleOpenGuidebook(PacketGuidebook guidebookPacket)
-    {
-        handleInvalidPacket(guidebookPacket);
+    public void handleGuidebook(@NotNull PacketGuidebook packetGuidebook) {
+        handleInvalidPacket(packetGuidebook);
     }
 
-    public void handleSetHotbarOffset(PacketSetHotbarOffset setHotbarOffsetPacket)
-    {
-        handleInvalidPacket(setHotbarOffsetPacket);
+    public void handleSetHotbarOffset(@NotNull PacketSetHotbarOffset packetSetHotbarOffset) {
+        handleInvalidPacket(packetSetHotbarOffset);
     }
 
-    public void handleEntityNickname(PacketEntityNickname entityNicknamePacket)
-    {
-        handleInvalidPacket(entityNicknamePacket);
+    public void handleEntityNickname(@NotNull PacketEntityNickname packetEntityNickname) {
+        handleInvalidPacket(packetEntityNickname);
     }
 
-    public void handleSendKey(PacketAESSendKey AESSendKeyPacket)
-    {
-        handleInvalidPacket(AESSendKeyPacket);
+    public void handleAESSendKey(@NotNull PacketAESSendKey packetAESSendKey) {
+        handleInvalidPacket(packetAESSendKey);
     }
 
-    public void handleItemName(PacketSetItemName setItemNamePacket)
-    {
-        handleInvalidPacket(setItemNamePacket);
+    public void handleSetItemName(@NotNull PacketSetItemName packetSetItemName) {
+        handleInvalidPacket(packetSetItemName);
     }
-    public void handlePlayerList(PacketPlayerList playerListPacket)
-    {
-        handleInvalidPacket(playerListPacket);
+
+    public void handlePlayerList(@NotNull PacketPlayerList packetPlayerList) {
+        handleInvalidPacket(packetPlayerList);
     }
 
-    public void handleOpenFlagWindow(PacketFlagOpen flagOpenPacket)
-    {
-        handleInvalidPacket(flagOpenPacket);
+    public void handleFlagOpen(@NotNull PacketFlagOpen packetFlagOpen) {
+        handleInvalidPacket(packetFlagOpen);
     }
 
-    public void handlePhotoMode(PacketPhotoMode photoModePacket)
-    {
-        handleInvalidPacket(photoModePacket);
+    public void handlePhotoMode(@NotNull PacketPhotoMode packetPhotoMode) {
+        handleInvalidPacket(packetPhotoMode);
     }
 
-    public void handlePingHandshake(PacketPingHandshake pingHandshakePacket) {
-        handleInvalidPacket(pingHandshakePacket);
+    public void handlePingHandshake(@NotNull PacketPingHandshake packetPingHandshake) {
+        handleInvalidPacket(packetPingHandshake);
     }
 
-    public void handleGameRule(PacketGameRule gameRulePacket) {
-        handleInvalidPacket(gameRulePacket);
+    public void handleGameRule(@NotNull PacketGameRule packetGameRule) {
+        handleInvalidPacket(packetGameRule);
     }
 
-    public void handleSyncedRecipe(PacketRecipeSync recipeSyncPacket) {
-        handleInvalidPacket(recipeSyncPacket);
+    public void handleRecipeSync(@NotNull PacketRecipeSync packetRecipeSync) {
+        handleInvalidPacket(packetRecipeSync);
     }
-    
-    public void handleIds(PacketSyncIDs syncIDsPacket) {
-    	handleInvalidPacket(syncIDsPacket);
+
+    public void handleSyncIDs(@NotNull PacketSyncIDs packetSyncIDs) {
+        handleInvalidPacket(packetSyncIDs);
     }
-    
-    public void handleCustomPayload(PacketCustomPayload customPayloadPacket) {
-    	handleInvalidPacket(customPayloadPacket);
+
+    public void handleCustomPayload(@NotNull PacketCustomPayload packetCustomPayload) {
+        handleInvalidPacket(packetCustomPayload);
     }
 
-    public void handleCommandManagerPacket(PacketCommandManager commandManagerPacket) {
-        handleInvalidPacket(commandManagerPacket);
+    public void handleCommandManager(@NotNull PacketCommandManager packetCommandManager) {
+        handleInvalidPacket(packetCommandManager);
     }
 
-    public void handleRequestCommandManagerPacket(PacketRequestCommandManager requestCommandManagerPacket) {
-        handleInvalidPacket(requestCommandManagerPacket);
+    public void handleRequestCommandManager(@NotNull PacketRequestCommandManager packetRequestCommandManager) {
+        handleInvalidPacket(packetRequestCommandManager);
     }
 
-    public void handleServerIconPacket(PacketServerIcon packetServerIcon) {
+    public void handleServerIcon(@NotNull PacketServerIcon packetServerIcon) {
         handleInvalidPacket(packetServerIcon);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/Packet.java b/game/core/src/main/java/net/minecraft/core/net/packet/Packet.java
index 1a9437e9a..6548d1f21 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/Packet.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/Packet.java
@@ -7,7 +7,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import it.unimi.dsi.fastutil.ints.IntArrayList;
-import it.unimi.dsi.fastutil.ints.IntArrays;
 import it.unimi.dsi.fastutil.ints.IntList;
 import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
 import it.unimi.dsi.fastutil.ints.IntSet;
@@ -26,8 +25,6 @@ import java.io.DataOutputStream;
 import java.io.EOFException;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
 import java.util.UUID;
 
 public abstract class Packet
@@ -257,12 +254,12 @@ public abstract class Packet
     {
         addMapping(0, true, true, PacketKeepAlive.class);
         addMapping(1, true, true, PacketLogin.class);
-        addMapping(2, true, true, PacketPreLogin.class);
+        addMapping(2, true, true, PacketHandshake.class);
         addMapping(3, true, true, PacketChat.class);
         addMapping(4, true, false, PacketSetTime.class);
         addMapping(5, true, false, PacketSetEquippedItem.class);
         addMapping(6, true, false, PacketSetSpawnPosition.class);
-        addMapping(7, false, true, PacketInteract.class);
+        addMapping(7, false, true, PacketEntityInteract.class);
         addMapping(8, true, false, PacketSetHealth.class);
         addMapping(9, true, true, PacketRespawn.class);
         addMapping(10, true, true, PacketMovePlayer.class);
@@ -304,8 +301,8 @@ public abstract class Packet
         addMapping(53, true, false, PacketBlockUpdate.class);
         addMapping(54, true, false, PacketBlockEvent.class);
         addMapping(60, true, false, PacketExplosion.class);
-        addMapping(61, true, false, PacketPlaySoundEffect.class);
-        addMapping(62, true, false, PacketPlaySoundEffectDirect.class);
+        addMapping(61, true, false, PacketPlaySound.class);
+        addMapping(62, true, false, PacketPlaySoundDirect.class);
         addMapping(63, true, false, PacketAddParticle.class);
         addMapping(70, true, false, PacketBedMessage.class);
         addMapping(71, true, false, PacketWeatherEffect.class);
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAESSendKey.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAESSendKey.java
index dd9d8bec9..1f7223e3d 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAESSendKey.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAESSendKey.java
@@ -36,7 +36,7 @@ public class PacketAESSendKey extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleSendKey(this);
+        packetHandler.handleAESSendKey(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddEntity.java
index ab325faa9..89cb4f497 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddEntity.java
@@ -159,7 +159,7 @@ public class PacketAddEntity extends Packet {
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleVehicleSpawn(this);
+        packetHandler.handleAddEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddItemEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddItemEntity.java
index 399e8911b..04fdf3b7e 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddItemEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddItemEntity.java
@@ -69,7 +69,7 @@ public class PacketAddItemEntity extends Packet {
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handlePickupSpawn(this);
+        packetHandler.handleAddItemEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddMob.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddMob.java
index 3a9e44c1f..a3e825f79 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddMob.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddMob.java
@@ -77,7 +77,7 @@ public class PacketAddMob extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleMobSpawn(this);
+        packetHandler.handleAddMob(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPainting.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPainting.java
index 2dc7e674e..474675f35 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPainting.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPainting.java
@@ -62,7 +62,7 @@ public class PacketAddPainting extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityPainting(this);
+        packetHandler.handleAddPainting(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddParticle.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddParticle.java
index 4ff21d59b..530cd9084 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddParticle.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddParticle.java
@@ -113,7 +113,7 @@ public class PacketAddParticle extends Packet{
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleSpawnParticle(this);
+        packetHandler.handleAddParticle(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPlayer.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPlayer.java
index 2c0f39671..65a2c6991 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPlayer.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketAddPlayer.java
@@ -111,7 +111,7 @@ public class PacketAddPlayer extends Packet
     @Override
 	public void handlePacket(final PacketHandler packetHandler)
     {
-        packetHandler.handleNamedEntitySpawn(this);
+        packetHandler.handleAddPlayer(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketBedMessage.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketBedMessage.java
index ae0042483..67f3197aa 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketBedMessage.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketBedMessage.java
@@ -33,7 +33,7 @@ public class PacketBedMessage extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleBed(this);
+        packetHandler.handleBedMessage(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketBlockRegionUpdate.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketBlockRegionUpdate.java
index f3690c8f9..b082ae5f3 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketBlockRegionUpdate.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketBlockRegionUpdate.java
@@ -92,7 +92,7 @@ public class PacketBlockRegionUpdate extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleMapChunk(this);
+        packetHandler.handleBlockRegionUpdate(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkBlocksUpdate.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkBlocksUpdate.java
index b01712ca1..db5d29016 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkBlocksUpdate.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkBlocksUpdate.java
@@ -80,7 +80,7 @@ public class PacketChunkBlocksUpdate extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleMultiBlockChange(this);
+        packetHandler.handleChunkBlocksUpdate(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkVisibility.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkVisibility.java
index fd32cdd10..51a0d66b8 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkVisibility.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketChunkVisibility.java
@@ -44,7 +44,7 @@ public class PacketChunkVisibility extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handlePreChunk(this);
+        packetHandler.handleChunkVisibility(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketCommandManager.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketCommandManager.java
index c705faa82..258302571 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketCommandManager.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketCommandManager.java
@@ -179,7 +179,7 @@ public class PacketCommandManager extends Packet {
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleCommandManagerPacket(this);
+        packetHandler.handleCommandManager(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerAck.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerAck.java
index 1b8ee3986..fae9fde6b 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerAck.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerAck.java
@@ -21,7 +21,7 @@ public class PacketContainerAck extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleTransaction(this);
+        packetHandler.handleContainerAck(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClick.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClick.java
index 01f6267c1..6fb4232e6 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClick.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClick.java
@@ -21,7 +21,7 @@ public class PacketContainerClick extends Packet {
 
 	@Override
 	public void handlePacket(PacketHandler packetHandler) {
-		packetHandler.handleWindowClick(this);
+		packetHandler.handleContainerClick(this);
 	}
 
 	@Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClose.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClose.java
index 051fe3795..ad6dd06da 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClose.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerClose.java
@@ -19,7 +19,7 @@ public class PacketContainerClose extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleCloseWindow(this);
+        packetHandler.handleContainerClose(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerOpen.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerOpen.java
index e3edd7dd7..e90642a5e 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerOpen.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerOpen.java
@@ -38,7 +38,7 @@ public class PacketContainerOpen extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleOpenWindow(this);
+        packetHandler.handleContainerOpen(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetContent.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetContent.java
index 70df42e9f..29378c678 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetContent.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetContent.java
@@ -79,7 +79,7 @@ public class PacketContainerSetContent extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleWindowItems(this);
+        packetHandler.handleContainerSetContent(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetData.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetData.java
index eb223f9eb..a95029e60 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetData.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetData.java
@@ -21,7 +21,7 @@ public class PacketContainerSetData extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleUpdateProgressbar(this);
+        packetHandler.handleContainerSetData(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetSlot.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetSlot.java
index 8628ab476..4d879790a 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetSlot.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketContainerSetSlot.java
@@ -16,7 +16,7 @@ public class PacketContainerSetSlot extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleSetSlot(this);
+        packetHandler.handleContainerSetSlot(this);
     }
     
     public PacketContainerSetSlot(int i, int j, ItemStack itemstack)
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketDisconnect.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketDisconnect.java
index 647248536..e0f0172f1 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketDisconnect.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketDisconnect.java
@@ -43,7 +43,7 @@ public class PacketDisconnect extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleKickDisconnect(this);
+        packetHandler.handleDisconnect(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityEvent.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityEvent.java
index 47a420691..538f2a414 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityEvent.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityEvent.java
@@ -46,7 +46,7 @@ public class PacketEntityEvent extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityStatus(this);
+        packetHandler.handleEntityEvent(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketInteract.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityInteract.java
similarity index 83%
rename from game/core/src/main/java/net/minecraft/core/net/packet/PacketInteract.java
rename to game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityInteract.java
index 1a3fbcb9e..d4739202d 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketInteract.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketEntityInteract.java
@@ -4,7 +4,7 @@ import net.minecraft.core.net.handler.PacketHandler;
 
 import java.io.*;
 
-public class PacketInteract extends Packet
+public class PacketEntityInteract extends Packet
 {
     public static final int ACTION_INTERACT = 0;
     public static final int ACTION_ATTACK = 1;
@@ -13,11 +13,11 @@ public class PacketInteract extends Packet
     public int action;
 
 
-    public PacketInteract()
+    public PacketEntityInteract()
     {
     }
 
-    public PacketInteract(int source, int target, int action)
+    public PacketEntityInteract(int source, int target, int action)
     {
         sourceEntityID = source;
         targetEntityID = target;
@@ -45,7 +45,7 @@ public class PacketInteract extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleUseEntity(this);
+        packetHandler.handleEntityInteract(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketFlagOpen.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketFlagOpen.java
index 83f8257f4..d8fd271d6 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketFlagOpen.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketFlagOpen.java
@@ -47,7 +47,7 @@ public class PacketFlagOpen
     @Override
     public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleOpenFlagWindow(this);
+        packetHandler.handleFlagOpen(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketGuidebook.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketGuidebook.java
index fab8fcd93..decdeafd5 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketGuidebook.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketGuidebook.java
@@ -34,7 +34,7 @@ public class PacketGuidebook extends Packet{
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleOpenGuidebook(this);
+        packetHandler.handleGuidebook(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPreLogin.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketHandshake.java
similarity index 86%
rename from game/core/src/main/java/net/minecraft/core/net/packet/PacketPreLogin.java
rename to game/core/src/main/java/net/minecraft/core/net/packet/PacketHandshake.java
index 5d2c82af7..2dd17cc70 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPreLogin.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketHandshake.java
@@ -4,16 +4,16 @@ import net.minecraft.core.net.handler.PacketHandler;
 
 import java.io.*;
 
-public class PacketPreLogin extends Packet
+public class PacketHandshake extends Packet
 {
     public String username;
 
 
-    public PacketPreLogin()
+    public PacketHandshake()
     {
     }
 
-    public PacketPreLogin(String s)
+    public PacketHandshake(String s)
     {
         username = s;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketMoveEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketMoveEntity.java
index 5039abcd3..6de0bab8e 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketMoveEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketMoveEntity.java
@@ -42,7 +42,7 @@ public class PacketMoveEntity extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntity(this);
+        packetHandler.handleMoveEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketMovePlayer.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketMovePlayer.java
index 4403909a1..0c146122a 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketMovePlayer.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketMovePlayer.java
@@ -26,7 +26,7 @@ public class PacketMovePlayer extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleFlying(this);
+        packetHandler.handleMovePlayer(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffect.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySound.java
similarity index 86%
rename from game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffect.java
rename to game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySound.java
index 8ec862afd..43858b2b0 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffect.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySound.java
@@ -4,14 +4,14 @@ import net.minecraft.core.net.handler.PacketHandler;
 
 import java.io.*;
 
-public class PacketPlaySoundEffect extends Packet
+public class PacketPlaySound extends Packet
 {
 
-    public PacketPlaySoundEffect()
+    public PacketPlaySound()
     {
     }
     
-    public PacketPlaySoundEffect(int soundId, int x, int y, int z, int data)
+    public PacketPlaySound(int soundId, int x, int y, int z, int data)
     {
         soundID = soundId;
         this.x = x;
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffectDirect.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundDirect.java
similarity index 86%
rename from game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffectDirect.java
rename to game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundDirect.java
index ad0db67cc..70b6cbd5a 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundEffectDirect.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlaySoundDirect.java
@@ -7,7 +7,7 @@ import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
-public class PacketPlaySoundEffectDirect extends Packet {
+public class PacketPlaySoundDirect extends Packet {
 	public int soundId;
     public SoundCategory soundType;
     public double x;
@@ -16,11 +16,11 @@ public class PacketPlaySoundEffectDirect extends Packet {
     public float volume;
     public float pitch;
 
-    public PacketPlaySoundEffectDirect()
+    public PacketPlaySoundDirect()
     {
     }
 
-    public PacketPlaySoundEffectDirect(int soundId, SoundCategory soundType, double x, double y, double z, float volume, float pitch)
+    public PacketPlaySoundDirect(int soundId, SoundCategory soundType, double x, double y, double z, float volume, float pitch)
     {
     	this.soundId = soundId;
         this.soundType = soundType;
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerAction.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerAction.java
index 688187e45..bc3288510 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerAction.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerAction.java
@@ -71,7 +71,7 @@ public class PacketPlayerAction extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleBlockDig(this);
+        packetHandler.handlePlayerAction(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerGamemode.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerGamemode.java
index a64162b85..0c1300a96 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerGamemode.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketPlayerGamemode.java
@@ -36,7 +36,7 @@ public class PacketPlayerGamemode extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityPlayerGamemode(this);
+        packetHandler.handlePlayerGamemode(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRecipeSync.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRecipeSync.java
index 7233ea9d2..7b46bd571 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRecipeSync.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRecipeSync.java
@@ -35,7 +35,7 @@ public class PacketRecipeSync extends Packet {
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleSyncedRecipe(this);
+        packetHandler.handleRecipeSync(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRemoveEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRemoveEntity.java
index 1ce01d896..a7fc1766d 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRemoveEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRemoveEntity.java
@@ -33,7 +33,7 @@ public class PacketRemoveEntity extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleDestroyEntity(this);
+        packetHandler.handleRemoveEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRequestCommandManager.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRequestCommandManager.java
index 0edb80462..d2da04920 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketRequestCommandManager.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketRequestCommandManager.java
@@ -36,7 +36,7 @@ public class PacketRequestCommandManager extends Packet {
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleRequestCommandManagerPacket(this);
+        packetHandler.handleRequestCommandManager(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketServerIcon.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketServerIcon.java
index c9a23364d..5116f4138 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketServerIcon.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketServerIcon.java
@@ -31,7 +31,7 @@ public class PacketServerIcon extends Packet {
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleServerIconPacket(this);
+        packetHandler.handleServerIcon(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetCarriedItem.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetCarriedItem.java
index a53b53bb8..294c7afac 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetCarriedItem.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetCarriedItem.java
@@ -33,7 +33,7 @@ public class PacketSetCarriedItem extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleBlockItemSwitch(this);
+        packetHandler.handleSetCarriedItem(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityData.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityData.java
index 2ee5f6360..893385bd9 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityData.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityData.java
@@ -39,7 +39,7 @@ public class PacketSetEntityData extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityMetadata(this);
+        packetHandler.handleSetEntityData(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityMotion.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityMotion.java
index 12a195bf0..4669a52ae 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityMotion.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEntityMotion.java
@@ -73,7 +73,7 @@ public class PacketSetEntityMotion extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityVelocity(this);
+        packetHandler.handleSetEntityMotion(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEquippedItem.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEquippedItem.java
index 87b2b88a5..ffea191a1 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEquippedItem.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetEquippedItem.java
@@ -61,7 +61,7 @@ public class PacketSetEquippedItem extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handlePlayerInventory(this);
+        packetHandler.handleSetEquippedItem(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHealth.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHealth.java
index c4a94a588..1ce43baf1 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHealth.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHealth.java
@@ -35,7 +35,7 @@ public class PacketSetHealth extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleUpdateHealth(this);
+        packetHandler.handleSetHealth(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHeldObject.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHeldObject.java
index a16e7111d..7ebb66973 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHeldObject.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetHeldObject.java
@@ -47,7 +47,7 @@ public class PacketSetHeldObject extends Packet{
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handlePlayerHeldObject(this);
+        packetHandler.handleSetHeldObject(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetItemName.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetItemName.java
index 1e872140b..bc96d316c 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetItemName.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetItemName.java
@@ -30,7 +30,7 @@ public class PacketSetItemName extends Packet{
 
     @Override
     public void handlePacket(PacketHandler packetHandler) {
-        packetHandler.handleItemName(this);
+        packetHandler.handleSetItemName(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetPaintingArt.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetPaintingArt.java
index 603dc4028..580e37967 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetPaintingArt.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetPaintingArt.java
@@ -36,7 +36,7 @@ public class PacketSetPaintingArt
     @Override
     public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleSetPaintingMotive(this);
+        packetHandler.handleSetPaintingArt(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetRiding.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetRiding.java
index d07180c54..7a2abe0d8 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetRiding.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetRiding.java
@@ -67,7 +67,7 @@ public class PacketSetRiding extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleAttachEntity(this);
+        packetHandler.handleSetRiding(this);
     }
 
     public int passengerId;
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetSpawnPosition.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetSpawnPosition.java
index a1769feb8..2104ca556 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetSpawnPosition.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetSpawnPosition.java
@@ -43,7 +43,7 @@ public class PacketSetSpawnPosition extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleSpawnPosition(this);
+        packetHandler.handleSetSpawnPosition(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetTime.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetTime.java
index a590a32e0..ccc5cf02c 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetTime.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSetTime.java
@@ -35,7 +35,7 @@ public class PacketSetTime extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleUpdateTime(this);
+        packetHandler.handleSetTime(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSignUpdate.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSignUpdate.java
index 45d7853c3..91a8c4971 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSignUpdate.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSignUpdate.java
@@ -58,7 +58,7 @@ public class PacketSignUpdate extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleUpdateSign(this);
+        packetHandler.handleSignUpdate(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSyncIDs.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSyncIDs.java
index d37e8f14a..5eee1ac8c 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketSyncIDs.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketSyncIDs.java
@@ -3,9 +3,6 @@ package net.minecraft.core.net.packet;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
 
 import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
@@ -83,7 +80,7 @@ public class PacketSyncIDs extends Packet {
 
 	@Override
 	public void handlePacket(final PacketHandler packetHandler) {
-		packetHandler.handleIds(this);
+		packetHandler.handleSyncIDs(this);
 	}
 
 	@Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketTakeItemEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketTakeItemEntity.java
index be25131d9..6cd71f0c2 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketTakeItemEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketTakeItemEntity.java
@@ -37,7 +37,7 @@ public class PacketTakeItemEntity extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleCollect(this);
+        packetHandler.handleTakeItemEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketTeleportEntity.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketTeleportEntity.java
index 2b0ba07ae..cc171aa8e 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketTeleportEntity.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketTeleportEntity.java
@@ -66,7 +66,7 @@ public class PacketTeleportEntity extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleEntityTeleport(this);
+        packetHandler.handleTeleportEntity(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketUpdatePlayerState.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketUpdatePlayerState.java
index 9d717edfc..596b23723 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketUpdatePlayerState.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketUpdatePlayerState.java
@@ -37,7 +37,7 @@ public class PacketUpdatePlayerState extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handlePlayerState(this);
+        packetHandler.handleUpdatePlayerState(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketUseOrPlaceItemStack.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketUseOrPlaceItemStack.java
index 8f1f04fe5..f13abb824 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketUseOrPlaceItemStack.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketUseOrPlaceItemStack.java
@@ -4,12 +4,9 @@ import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
-import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.net.handler.PacketHandler;
 import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.world.World;
 
 public class PacketUseOrPlaceItemStack extends Packet
 {
@@ -123,7 +120,7 @@ public class PacketUseOrPlaceItemStack extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handlePlace(this);
+        packetHandler.handleUseOrPlaceItem(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/net/packet/PacketWeatherEffect.java b/game/core/src/main/java/net/minecraft/core/net/packet/PacketWeatherEffect.java
index e1ff54c3a..590eda9e3 100644
--- a/game/core/src/main/java/net/minecraft/core/net/packet/PacketWeatherEffect.java
+++ b/game/core/src/main/java/net/minecraft/core/net/packet/PacketWeatherEffect.java
@@ -56,7 +56,7 @@ public class PacketWeatherEffect extends Packet
     @Override
 	public void handlePacket(PacketHandler packetHandler)
     {
-        packetHandler.handleWeather(this);
+        packetHandler.handleWeatherEffect(this);
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuAbstract.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuAbstract.java
index 8b8d52e4e..ecf7d7cfb 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuAbstract.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuAbstract.java
@@ -18,6 +18,7 @@ import net.minecraft.core.player.inventory.container.ContainerInventory;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotResult;
 import net.minecraft.core.util.helper.MathHelper;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
@@ -640,13 +641,13 @@ public abstract class MenuAbstract
      * Slots to move items from when using MOVE_ALL or MOVE_SIMILAR.
      * If the return value is null, MOVE_ALL and MOVE_SIMILAR won't do anything!
      */
-	public abstract IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player);
+	public abstract IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player);
 
 	/**
 	 * Slots to move items to when using any MOVE action.
 	 * If the return value is null, all MOVE actions won't do anything!
 	 */
-	public abstract IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player);
+	public abstract IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player);
 
 	/**
 	 * Pick up all items similar to the one the player is holding.
@@ -760,7 +761,7 @@ public abstract class MenuAbstract
 		}
 	}
 
-	public void onCraftGuiClosed(Player player) {
+	public void onCraftGuiClosed(@NotNull Player player) {
 		ContainerInventory inventory = player.inventory;
 		if(inventory.getHeldItemStack() != null) {
 			ItemStack stack = inventory.getHeldItemStack();
@@ -838,7 +839,7 @@ public abstract class MenuAbstract
 	{
 	}
 
-	public abstract boolean stillValid(Player entityplayer);
+	public abstract boolean stillValid(@NotNull Player player);
 
 	/**
 	 * Merge the given ItemStack into the given slots.
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuActivator.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuActivator.java
index ca13ca28a..ebfbbca85 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuActivator.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuActivator.java
@@ -8,6 +8,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.slot.Slot;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuActivator extends MenuAbstract {
 	public static final int ID_SELECTOR = 0;
@@ -80,12 +81,12 @@ public class MenuActivator extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return activator.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return activator.stillValid(player);
 	}
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= activatorSlotsStart && slot.index < inventorySlotsStart) {
 			return getSlots(activatorSlotsStart, 9, false);
 		}
@@ -107,7 +108,7 @@ public class MenuActivator extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= activatorSlotsStart && slot.index < inventorySlotsStart) {
 			return getSlots(inventorySlotsStart, 36, false);
 		}else {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuContainer.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuContainer.java
index 207c66d2b..2eab6553e 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuContainer.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuContainer.java
@@ -5,6 +5,7 @@ import net.minecraft.core.InventoryAction;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.slot.Slot;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuContainer extends MenuAbstract {
 	
@@ -36,12 +37,12 @@ public class MenuContainer extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return container.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return container.stillValid(player);
 	}
 	
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		int chestSize = numberOfRows * 9;
 		
 		if(slot.index >= 0 && slot.index < chestSize) {
@@ -69,7 +70,7 @@ public class MenuContainer extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		int chestSize = numberOfRows * 9;
 		
 		if(slot.index < chestSize) {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuCrafting.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuCrafting.java
index 143ef1808..6547d228e 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuCrafting.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuCrafting.java
@@ -14,143 +14,134 @@ import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotResult;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
-public class MenuCrafting extends MenuAbstract
-{
-	public final @NotNull ContainerCrafting craftSlots;
-	public final @NotNull Container resultSlots;
-	private final @NotNull World world;
-	private final @NotNull TilePos tilePos;
+public class MenuCrafting extends MenuAbstract {
+    public final @NotNull ContainerCrafting craftSlots;
+    public final @NotNull Container resultSlots;
+    private final @NotNull World world;
+    private final @NotNull TilePos tilePos;
 
-    public MenuCrafting(@NotNull ContainerInventory inventory, @NotNull World world, @NotNull TilePos tilePos)
-    {
-        craftSlots = new ContainerCrafting(this, 3, 3);
-        resultSlots = new ContainerResult();
+    public MenuCrafting(@NotNull ContainerInventory inventory, @NotNull World world, @NotNull TilePosc tilePos) {
+        this.craftSlots = new ContainerCrafting(this, 3, 3);
+        this.resultSlots = new ContainerResult();
         this.world = world;
-        this.tilePos = tilePos;
-        addSlot(new SlotResult(inventory.player, craftSlots, resultSlots, 0, 124, 35));
-        for(int l = 0; l < 3; l++)
-        {
-            for(int k1 = 0; k1 < 3; k1++)
-            {
-                addSlot(new Slot(craftSlots, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
+        this.tilePos = new TilePos(tilePos);
+        addSlot(new SlotResult(inventory.player, this.craftSlots, this.resultSlots, 0, 124, 35));
+        for (int l = 0; l < 3; l++) {
+            for (int k1 = 0; k1 < 3; k1++) {
+                addSlot(new Slot(this.craftSlots, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
             }
 
         }
 
-        for(int i1 = 0; i1 < 3; i1++)
-        {
-            for(int l1 = 0; l1 < 9; l1++)
-            {
+        for (int i1 = 0; i1 < 3; i1++) {
+            for (int l1 = 0; l1 < 9; l1++) {
                 addSlot(new Slot(inventory, l1 + i1 * 9 + 9, 8 + l1 * 18, 84 + i1 * 18));
             }
 
         }
 
-        for(int j1 = 0; j1 < 9; j1++)
-        {
+        for (int j1 = 0; j1 < 9; j1++) {
             addSlot(new Slot(inventory, j1, 8 + j1 * 18, 142));
         }
 
-        slotsChanged(craftSlots);
+        slotsChanged(this.craftSlots);
     }
 
     @Override
-	public void slotsChanged(Container iinventory)
-    {
-		resultSlots.setItem(0, Registries.RECIPES.findMatchingRecipe(craftSlots));
+    public void slotsChanged(Container container) {
+        this.resultSlots.setItem(0, Registries.RECIPES.findMatchingRecipe(this.craftSlots));
     }
 
-	@Override
-	public void onCraftGuiClosed(Player player) {
-		super.onCraftGuiClosed(player);
-		boolean insert = false;
-		for (int i = 0; i < 9; i++) {
-			ItemStack itemstack = craftSlots.getItem(i);
-			if(itemstack != null) {
-				storeOrDropItem(player, itemstack);
-				insert = true;
-			}
-			craftSlots.setItem(i, null);
-		}
-		resultSlots.setItem(0, null);
-		if(insert) {
-			player.world.playSoundAtEntity(null, player, "random.insert", 0.1F, 1.0f);
-		}
-	}
+    @Override
+    public void onCraftGuiClosed(@NotNull Player player) {
+        super.onCraftGuiClosed(player);
+        boolean insert = false;
+        for (int i = 0; i < 9; i++) {
+            ItemStack itemstack = this.craftSlots.getItem(i);
+            if (itemstack != null) {
+                storeOrDropItem(player, itemstack);
+                insert = true;
+            }
+            this.craftSlots.setItem(i, null);
+        }
+        this.resultSlots.setItem(0, null);
+        if (insert) {
+            player.world.playSoundAtEntity(null, player, "random.insert", 0.1F, 1.0f);
+        }
+    }
 
     @Override
-	public boolean stillValid(Player entityplayer)
-    {
-        if(world.getBlockId(tilePos) != Blocks.WORKBENCH.id())
-        {
+    public boolean stillValid(@NotNull Player player) {
+        if (this.world.getBlockId(this.tilePos) != Blocks.WORKBENCH.id()) {
             return false;
         }
-        return entityplayer.distanceToSqr((double) tilePos.x + 0.5D, (double) tilePos.y + 0.5D, (double) tilePos.z + 0.5D) <= 64D;
+        return player.distanceToSqr((double) this.tilePos.x + 0.5D, (double) this.tilePos.y + 0.5D, (double) this.tilePos.z + 0.5D) <= 64D;
     }
-    
+
     /*
      *  0 Craft Result
      *  1 - 9 Crafting (9x)
      *  10 - 36 Main ContainerInventory (27x)
      *  37 - 45 Hotbar (9x)
      */
-    
+
     @Override
-    public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
-    	if(slot.index == 0) {
-    		// Craft Result
-    		return getSlots(0, 1, false);
-    	}
-    	if(slot.index >= 1 && slot.index < 9) {
-    		// Crafting Grid
-    		return getSlots(1, 9, false);
-    	}
-    	if(action == InventoryAction.MOVE_SIMILAR) {
-    		if(slot.index >= 10 && slot.index <= 45) {
-    			// Full ContainerInventory
-    			return getSlots(10, 36, false);
-    		}
-    	}else {
-    		if(slot.index >= 10 && slot.index <= 36) {
-    			// Main ContainerInventory
-    			return getSlots(10, 27, false);
-    		}
-    		if(slot.index >= 37 && slot.index <= 45) {
-    			// Hotbar
-    			return getSlots(37, 9, false);
-    		}
-    	}
-    	return null;
+    public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
+        if (slot.index == 0) {
+            // Craft Result
+            return getSlots(0, 1, false);
+        }
+        if (slot.index >= 1 && slot.index < 9) {
+            // Crafting Grid
+            return getSlots(1, 9, false);
+        }
+        if (action == InventoryAction.MOVE_SIMILAR) {
+            if (slot.index >= 10 && slot.index <= 45) {
+                // Full ContainerInventory
+                return getSlots(10, 36, false);
+            }
+        } else {
+            if (slot.index >= 10 && slot.index <= 36) {
+                // Main ContainerInventory
+                return getSlots(10, 27, false);
+            }
+            if (slot.index >= 37 && slot.index <= 45) {
+                // Hotbar
+                return getSlots(37, 9, false);
+            }
+        }
+        return null;
     }
-    
+
     @Override
-    public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
-    	if(slot.index >= 10 && slot.index <= 45) {
-    		// Full ContainerInventory
-    		if(target == 1) {
-    			return getSlots(1, 9, false); // To Crafting Grid
-    		}
-    		if(slot.index >= 10 && slot.index <= 36) {
-    			// Main ContainerInventory
-    			return getSlots(37, 9, false); // To Hotbar
-    		}
-    		if(slot.index >= 37 && slot.index <= 45) {
-    			// Hotbar
-    			return getSlots(10, 27, false); // To Main ContainerInventory
-    		}
-    	}else {
-    		// Crafting grid or result
-    		if(slot.index == 0) {
-    			// Crafting Result
-    			return getSlots(10, 36, true);
-    		}else {
-    			// Crafting Grid
-    			return getSlots(10, 36, false);
-    		}
-    	}
-    	
-    	return null;
+    public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
+        if (slot.index >= 10 && slot.index <= 45) {
+            // Full ContainerInventory
+            if (target == 1) {
+                return getSlots(1, 9, false); // To Crafting Grid
+            }
+            if (slot.index >= 10 && slot.index <= 36) {
+                // Main ContainerInventory
+                return getSlots(37, 9, false); // To Hotbar
+            }
+            if (slot.index >= 37 && slot.index <= 45) {
+                // Hotbar
+                return getSlots(10, 27, false); // To Main ContainerInventory
+            }
+        } else {
+            // Crafting grid or result
+            if (slot.index == 0) {
+                // Crafting Result
+                return getSlots(10, 36, true);
+            } else {
+                // Crafting Grid
+                return getSlots(10, 36, false);
+            }
+        }
+
+        return null;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFlag.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFlag.java
index 10f7129ae..ca8ba176d 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFlag.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFlag.java
@@ -7,6 +7,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotDye;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuFlag extends MenuAbstract {
 	public TileEntityFlag flag;
@@ -38,7 +39,7 @@ public class MenuFlag extends MenuAbstract {
 	 *  30 -  38 Hotbar
 	 */
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 0 && slot.index <= 2) {
 			// Dye Slots
 			return getSlots(0, 3, false);
@@ -60,7 +61,7 @@ public class MenuFlag extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 0 && slot.index <= 2) {
 			// Dye Slots
 			return getSlots(3, 36, false); // Into ContainerInventory
@@ -69,7 +70,7 @@ public class MenuFlag extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return flag.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return flag.stillValid(player);
 	}
 }
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnace.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnace.java
index f6890db3a..26ce3aa02 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnace.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnace.java
@@ -8,6 +8,7 @@ import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.ContainerInventory;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotFurnace;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuFurnace extends MenuAbstract {
 	public static final int ID_CURRENT_COOK_TIME = 0;
@@ -86,8 +87,8 @@ public class MenuFurnace extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return furnace.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return furnace.stillValid(player);
 	}
 
 	/**
@@ -99,7 +100,7 @@ public class MenuFurnace extends MenuAbstract {
      */
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 0 && slot.index <= 3) return getSlots(slot.index, 1, false);
 
 		if(action == InventoryAction.MOVE_ALL) {
@@ -120,7 +121,7 @@ public class MenuFurnace extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 3 && slot.index <= 39) {
 			// Full ContainerInventory
 			if(action != InventoryAction.MOVE_ALL) {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnaceBlast.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnaceBlast.java
index e23dc5552..833b062c0 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnaceBlast.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuFurnaceBlast.java
@@ -2,13 +2,13 @@ package net.minecraft.core.player.inventory.menu;
 
 import it.unimi.dsi.fastutil.ints.IntList;
 import net.minecraft.core.InventoryAction;
-import net.minecraft.core.block.entity.TileEntityFurnace;
 import net.minecraft.core.block.entity.TileEntityFurnaceBlast;
 import net.minecraft.core.crafting.ContainerListener;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.ContainerInventory;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotFurnace;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuFurnaceBlast extends MenuAbstract {
 	public static final int ID_CURRENT_COOK_TIME = 0;
@@ -89,8 +89,8 @@ public class MenuFurnaceBlast extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(final Player entityplayer) {
-		return this.furnace.stillValid(entityplayer);
+	public boolean stillValid(final @NotNull Player player) {
+		return this.furnace.stillValid(player);
 	}
 
 	/**
@@ -103,7 +103,7 @@ public class MenuFurnaceBlast extends MenuAbstract {
      */
 
 	@Override
-	public IntList getMoveSlots(final InventoryAction action, final Slot slot, final int target, final Player player) {
+	public IntList getMoveSlots(final @NotNull InventoryAction action, final @NotNull Slot slot, final int target, final Player player) {
 		if(slot.index >= 0 && slot.index < 4) return getSlots(slot.index, 1, false);
 
 		if(action == InventoryAction.MOVE_ALL) {
@@ -124,7 +124,7 @@ public class MenuFurnaceBlast extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(final InventoryAction action, final Slot slot, final int target, final Player player) {
+	public IntList getTargetSlots(final @NotNull InventoryAction action, final @NotNull Slot slot, final int target, final Player player) {
 		if(slot.index >= 4 && slot.index < 40) {
 			// Full ContainerInventory
 			if(action != InventoryAction.MOVE_ALL) {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuGuidebook.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuGuidebook.java
index 09a337965..46295eaee 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuGuidebook.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuGuidebook.java
@@ -5,12 +5,13 @@ import net.minecraft.core.InventoryAction;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.player.inventory.slot.Slot;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuGuidebook extends MenuAbstract
 {
 
 	@Override
-	public boolean stillValid(final Player entityplayer)
+	public boolean stillValid(final @NotNull Player player)
 	{
 		return true;
 	}
@@ -21,12 +22,12 @@ public class MenuGuidebook extends MenuAbstract
 	}
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		return null;
 	}
 	
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		return null;
 	}
 	
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java
index c85448158..ef8021653 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java
@@ -13,6 +13,7 @@ import net.minecraft.core.player.inventory.container.ContainerResult;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.SlotArmor;
 import net.minecraft.core.player.inventory.slot.SlotResult;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuInventory extends MenuAbstract {
 
@@ -61,7 +62,7 @@ public class MenuInventory extends MenuAbstract {
 	}
 
 	@Override
-	public void onCraftGuiClosed(Player player) {
+	public void onCraftGuiClosed(@NotNull Player player) {
 		super.onCraftGuiClosed(player);
 		boolean insert = false;
 		for (int i = 0; i < 4; i++) {
@@ -78,7 +79,7 @@ public class MenuInventory extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
+	public boolean stillValid(@NotNull Player player) {
 		return true;
 	}
 
@@ -91,7 +92,7 @@ public class MenuInventory extends MenuAbstract {
 	 */
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index == 0) {
 			// Craft Result
 			return getSlots(0, 1, false);
@@ -123,7 +124,7 @@ public class MenuInventory extends MenuAbstract {
 	}
 	
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 9 && slot.index <= 44) {
 			// Full ContainerInventory
 			if(target == 1) {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrap.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrap.java
index 5f35af980..c4c92412d 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrap.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrap.java
@@ -6,6 +6,7 @@ import net.minecraft.core.block.entity.TileEntityDispenser;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.slot.Slot;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuTrap extends MenuAbstract {
 
@@ -40,12 +41,12 @@ public class MenuTrap extends MenuAbstract {
 	}
 	
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return trap.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return trap.stillValid(player);
 	}
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= dispenserSlotsStart && slot.index < inventorySlotsStart) {
 			return getSlots(dispenserSlotsStart, 9, false);
 		}
@@ -67,7 +68,7 @@ public class MenuTrap extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= dispenserSlotsStart && slot.index < inventorySlotsStart) {
 			return getSlots(inventorySlotsStart, 36, false);
 		}else {
diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrommel.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrommel.java
index cc224e04a..bb4777307 100644
--- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrommel.java
+++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuTrommel.java
@@ -8,6 +8,7 @@ import net.minecraft.core.crafting.ContainerListener;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.player.inventory.container.ContainerInventory;
 import net.minecraft.core.player.inventory.slot.Slot;
+import org.jetbrains.annotations.NotNull;
 
 public class MenuTrommel extends MenuAbstract {
 
@@ -73,8 +74,8 @@ public class MenuTrommel extends MenuAbstract {
 	}
 
 	@Override
-	public boolean stillValid(Player entityplayer) {
-		return trommel.stillValid(entityplayer);
+	public boolean stillValid(@NotNull Player player) {
+		return trommel.stillValid(player);
 	}
 	
 	/*
@@ -85,7 +86,7 @@ public class MenuTrommel extends MenuAbstract {
 	 */
 
 	@Override
-	public IntList getMoveSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getMoveSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 0 && slot.index <= 3) {
 			return getSlots(0, 4, false);
 		}
@@ -112,7 +113,7 @@ public class MenuTrommel extends MenuAbstract {
 	}
 
 	@Override
-	public IntList getTargetSlots(InventoryAction action, Slot slot, int target, Player player) {
+	public IntList getTargetSlots(@NotNull InventoryAction action, @NotNull Slot slot, int target, Player player) {
 		if(slot.index >= 0 && slot.index <= 4) {
 			// Item and Fuel Slots
 			return getSlots(5, 36, false); // Into ContainerInventory
diff --git a/game/core/src/main/java/net/minecraft/core/util/helper/MathHelper.java b/game/core/src/main/java/net/minecraft/core/util/helper/MathHelper.java
index d5a20ef39..473408139 100644
--- a/game/core/src/main/java/net/minecraft/core/util/helper/MathHelper.java
+++ b/game/core/src/main/java/net/minecraft/core/util/helper/MathHelper.java
@@ -1,51 +1,48 @@
 package net.minecraft.core.util.helper;
 
 
+import net.minecraft.core.util.phys.HitResult;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
-public class MathHelper
-{
+public class MathHelper {
 
-    public MathHelper()
-    {
+    public MathHelper() {
     }
 
-    public static float sin(float f)
-    {
-        return SIN_TABLE[(int)(f * 10430.38F) & 0xffff];
+    public static float sin(float f) {
+        return SIN_TABLE[(int) (f * 10430.38F) & 0xffff];
     }
 
-    public static float cos(float f)
-    {
-        return SIN_TABLE[(int)(f * 10430.38F + 16384F) & 0xffff];
+    public static float cos(float f) {
+        return SIN_TABLE[(int) (f * 10430.38F + 16384F) & 0xffff];
     }
 
-    public static float sqrt_float(float f)
-    {
+    public static float sqrt_float(float f) {
         return (float) java.lang.Math.sqrt(f);
     }
 
-    public static float sqrt(double d)
-    {
+    public static float sqrt(double d) {
         return (float) java.lang.Math.sqrt(d);
     }
 
-    public static int floor_float(float f)
-    {
-        int i = (int)f;
-        return f >= (float)i ? i : i - 1;
+    public static int floor_float(float f) {
+        int i = (int) f;
+        return f >= (float) i ? i : i - 1;
     }
 
-    public static int floor(double d)
-    {
-        int truncated = (int)d;
-        return d >= (double)truncated ? truncated : truncated - 1;
+    public static int floor(double d) {
+        int truncated = (int) d;
+        return d >= (double) truncated ? truncated : truncated - 1;
     }
 
-    public static int ceil(double d)
-    {
-        int truncated = (int)d;
-        return d == (double)truncated ? truncated : truncated + 1;
+    public static int ceil(double d) {
+        int truncated = (int) d;
+        return d == (double) truncated ? truncated : truncated + 1;
     }
 
     public static int round(double d) {
@@ -53,116 +50,112 @@ public class MathHelper
         return d <= truncated + 0.5 ? truncated : truncated + 1;
     }
 
-    public static float abs(float f)
-    {
+    public static float abs(float f) {
         return f < 0.0F ? -f : f;
     }
 
-    public static double abs_max(double d, double d1)
-    {
-        if(d < 0.0D)
-        {
+    public static double abs_max(double d, double d1) {
+        if (d < 0.0D) {
             d = -d;
         }
-        if(d1 < 0.0D)
-        {
+        if (d1 < 0.0D) {
             d1 = -d1;
         }
         return Math.max(d, d1);
     }
 
-    public static int bucketInt(int value, int bucket)
-    {
-        if(value < 0)
-        {
+    public static int bucketInt(int value, int bucket) {
+        if (value < 0) {
             return -((-value - 1) / bucket) - 1;
-        }
-        else
-        {
+        } else {
             return value / bucket;
         }
     }
-    
+
     public static double clamp(double value, double min, double max) {
-    	if(value > max) return max;
+        if (value > max) return max;
         return Math.max(value, min);
     }
-    
+
     public static float clamp(float value, float min, float max) {
-    	if(value > max) return max;
+        if (value > max) return max;
         return Math.max(value, min);
     }
-    
+
     public static int clamp(int value, int min, int max) {
-    	if(value > max) return max;
+        if (value > max) return max;
         return Math.max(value, min);
     }
 
     public static byte clamp(byte value, byte min, byte max) {
-        if(value > max) return max;
+        if (value > max) return max;
         return (byte) Math.max(value, min);
     }
 
     public static float lerp(float a, float b, float amount) {
         return a + ((b - a) * amount);
     }
+
     public static double lerp(double a, double b, double amount) {
         return a + ((b - a) * amount);
     }
 
     public static float unlerp(float a, float b, float value) {
-        return (value - a)/(b - a);
+        return (value - a) / (b - a);
     }
+
     public static double unlerp(double a, double b, double value) {
-        return (value - a)/(b - a);
-    }
-	
-	public static float getInterpolate(float[] array, float index) {
-		int index0 = (int) index;
-		if(index0 == index) {
-			return array[index0];
-		}
-		
-		int index1 = index0 + 1;
-		
-		float val0 = array[index0];
-		float val1 = array[index1];
-		
-		return MathHelper.lerp(val0, val1, index - index0);
-	}
-
-    public static boolean stringNullOrLengthZero(@Nullable String s)
-    {
+        return (value - a) / (b - a);
+    }
+
+    public static float getInterpolate(float[] array, float index) {
+        int index0 = (int) index;
+        if (index0 == index) {
+            return array[index0];
+        }
+
+        int index1 = index0 + 1;
+
+        float val0 = array[index0];
+        float val1 = array[index1];
+
+        return MathHelper.lerp(val0, val1, index - index0);
+    }
+
+    public static boolean stringNullOrLengthZero(@Nullable String s) {
         return s == null || s.isEmpty();
     }
-    public static int ceilInt(int num, int denom){
-        return (int) Math.ceil(((float)num/denom));
+
+    public static int ceilInt(int num, int denom) {
+        return (int) Math.ceil(((float) num / denom));
     }
 
     /**
      * @param rotation value in degrees
      * @return rotation bounded to the range [-180, 180) degrees
      */
-    public static double normalizeRotation(double rotation){
+    public static double normalizeRotation(double rotation) {
         double rotNorm = unsignedMod(rotation, 360);
         if (rotNorm < 180) return rotNorm;
         return rotNorm - 360;
     }
+
     /**
      * @param rotation value in degrees
      * @return rotation bounded to the range [-180, 180) degrees
      */
-    public static float normalizeRotation(float rotation){
+    public static float normalizeRotation(float rotation) {
         float rotNorm = (float) unsignedMod(rotation, 360);
         if (rotNorm < 180) return rotNorm;
         return rotNorm - 360;
     }
 
-    public static double deltaAngle(double a, double b){
-        return unsignedMod((a - b + 180), 360) -180;
+    public static double deltaAngle(double a, double b) {
+        return unsignedMod((a - b + 180), 360) - 180;
     }
-    public static double unsignedMod(double value, double n){
-        return value - Math.floor(value/n) * n;
+
+    public static double unsignedMod(double value, double n) {
+        return value - Math.floor(value / n) * n;
     }
 
     /**
@@ -195,28 +188,296 @@ public class MathHelper
 
     private static final float[] SIN_TABLE;
 
-    public static final float PI = (float)Math.PI;
+    public static final float PI = (float) Math.PI;
 
-    public static float toRadians(float angleDegrees){
+    public static float toRadians(float angleDegrees) {
         return angleDegrees * DEG_TO_RAD;
     }
 
-    public static float toDegrees(float angleRadians){
+    public static float toDegrees(float angleRadians) {
         return angleRadians * RAD_TO_DEG;
     }
 
-    public static final float DEG_TO_RAD = (float)Math.toRadians(1);
-    public static final float RAD_TO_DEG = (float)Math.toDegrees(1);
+    public static final float DEG_TO_RAD = (float) Math.toRadians(1);
+    public static final float RAD_TO_DEG = (float) Math.toDegrees(1);
 
-    public static int maxAbs(int a, int b)
-    {
+    public static int maxAbs(int a, int b) {
         return Math.abs(a) > Math.abs(b) ? a : b;
     }
 
+    public static @Nullable Vector3d vecClipX(@NotNull Vector3dc self, @NotNull Vector3dc other, double d, @NotNull Vector3d dest) {
+        double diffX = other.x() - self.x();
+        double diffY = other.y() - self.y();
+        double diffZ = other.z() - self.z();
+        if (diffX * diffX < 1E-007D) {
+            return null;
+        }
+        double d4 = (d - self.x()) / diffX;
+        if (d4 < 0.0D || d4 > 1.0D) {
+            return null;
+        } else {
+            return dest.set(self.x() + diffX * d4, self.y() + diffY * d4, self.z() + diffZ * d4);
+        }
+    }
+
+    public static @Nullable Vector3d vecClipY(@NotNull Vector3dc self, @NotNull Vector3dc other, double d, @NotNull Vector3d dest) {
+        double diffX = other.x() - self.x();
+        double diffY = other.y() - self.y();
+        double diffZ = other.z() - self.z();
+        if (diffY * diffY < 1.0000000116860974E-007D) {
+            return null;
+        }
+        double d4 = (d - self.y()) / diffY;
+        if (d4 < 0.0D || d4 > 1.0D) {
+            return null;
+        } else {
+            return dest.set(self.x() + diffX * d4, self.y() + diffY * d4, self.z() + diffZ * d4);
+        }
+    }
+
+    public static @Nullable Vector3d vecClipZ(@NotNull Vector3dc self, @NotNull Vector3dc other, double d, @NotNull Vector3d dest) {
+        double diffX = other.x() - self.x();
+        double diffY = other.y() - self.y();
+        double diffZ = other.z() - self.z();
+        if (diffZ * diffZ < 1.0000000116860974E-007D) {
+            return null;
+        }
+        double d4 = (d - self.z()) / diffZ;
+        if (d4 < 0.0D || d4 > 1.0D) {
+            return null;
+        } else {
+            return dest.set(self.x() + diffX * d4, self.y() + diffY * d4, self.z() + diffZ * d4);
+        }
+    }
+
+    public static double getAABBSize(@NotNull AABBdc self) {
+        double dx = self.maxX() - self.minX();
+        double dy = self.maxY() - self.minY();
+        double dz = self.maxZ() - self.minZ();
+        return (dx + dy + dz) / 3D;
+    }
+
+    public static @NotNull AABBd aabbExpand(@NotNull AABBdc self, double stretchX, double stretchY, double stretchZ, @NotNull AABBd dest) {
+        double minX = self.minX();
+        double minY = self.minY();
+        double minZ = self.minZ();
+        double maxX = self.maxX();
+        double maxY = self.maxY();
+        double maxZ = self.maxZ();
+        if (stretchX < 0.0D) {
+            minX += stretchX;
+        }
+        if (stretchX > 0.0D) {
+            maxX += stretchX;
+        }
+        if (stretchY < 0.0D) {
+            minY += stretchY;
+        }
+        if (stretchY > 0.0D) {
+            maxY += stretchY;
+        }
+        if (stretchZ < 0.0D) {
+            minZ += stretchZ;
+        }
+        if (stretchZ > 0.0D) {
+            maxZ += stretchZ;
+        }
+        return dest.setMin(minX, minY, minZ).setMax(maxX, maxY, maxZ);
+    }
+
+    public static @NotNull AABBd aabbShrink(@NotNull AABBdc self, final double shrinkX, final double shrinkY, final double shrinkZ, @NotNull AABBd dest) {
+        double minX = self.minX();
+        double minY = self.minY();
+        double minZ = self.minZ();
+        double maxX = self.maxX();
+        double maxY = self.maxY();
+        double maxZ = self.maxZ();
+        if (shrinkX < 0.0) {
+            minX -= shrinkX;
+        }
+        if (shrinkX > 0.0) {
+            maxX -= shrinkX;
+        }
+        if (shrinkY < 0.0) {
+            minY -= shrinkY;
+        }
+        if (shrinkY > 0.0) {
+            maxY -= shrinkY;
+        }
+        if (shrinkZ < 0.0) {
+            minZ -= shrinkZ;
+        }
+        if (shrinkZ > 0.0) {
+            maxZ -= shrinkZ;
+        }
+        return dest.setMin(minX, minY, minZ).setMax(maxX, maxY, maxZ);
+    }
+
+    public static @NotNull AABBd aabbGrow(@NotNull AABBdc self, double x, double y, double z, @NotNull AABBd dest) {
+        double minX = self.minX() - x;
+        double minY = self.minY() - y;
+        double minZ = self.minZ() - z;
+        double maxX = self.maxX() + x;
+        double maxY = self.maxY() + y;
+        double maxZ = self.maxZ() + z;
+        return dest.setMin(minX, minY, minZ).setMax(maxX, maxY, maxZ);
+    }
+
+    public static @NotNull AABBd aabbInsetBoundingBox(@NotNull AABBdc self, double x, double y, double z, @NotNull AABBd dest) {
+        double minX = self.minX() + x;
+        double minY = self.minY() + y;
+        double minZ = self.minZ() + z;
+        double maxX = self.maxX() - x;
+        double maxY = self.maxY() - y;
+        double maxZ = self.maxZ() - z;
+        return dest.setMin(minX, minY, minZ).setMax(maxX, maxY, maxZ);
+    }
+
+    public static double aabbClipXCollide(@NotNull AABBdc self, @NotNull AABBdc other, double d) {
+        if (other.maxY() <= self.minY() || other.minY() >= self.maxY()) {
+            return d;
+        }
+        if (other.maxZ() <= self.minZ() || other.minZ() >= self.maxZ()) {
+            return d;
+        }
+        if (d > 0.0D && other.maxX() <= self.minX()) {
+            double d1 = self.minX() - other.maxX();
+            if (d1 < d) {
+                d = d1;
+            }
+        }
+        if (d < 0.0D && other.minX() >= self.maxX()) {
+            double d2 = self.maxX() - other.minX();
+            if (d2 > d) {
+                d = d2;
+            }
+        }
+        return d;
+    }
+
+    public static double aabbClipYCollide(@NotNull AABBdc self, @NotNull AABBdc aabb, double d) {
+        if (aabb.maxX() <= self.minX() || aabb.minX() >= self.maxX()) {
+            return d;
+        }
+        if (aabb.maxZ() <= self.minZ() || aabb.minZ() >= self.maxZ()) {
+            return d;
+        }
+        if (d > 0.0D && aabb.maxY() <= self.minY()) {
+            double d1 = self.minY() - aabb.maxY();
+            if (d1 < d) {
+                d = d1;
+            }
+        }
+        if (d < 0.0D && aabb.minY() >= self.maxY()) {
+            double d2 = self.maxY() - aabb.minY();
+            if (d2 > d) {
+                d = d2;
+            }
+        }
+        return d;
+    }
+
+    public static double aabbClipZCollide(@NotNull AABBdc self, @NotNull AABBdc aabb, double d) {
+        if (aabb.maxX() <= self.minX() || aabb.minX() >= self.maxX()) {
+            return d;
+        }
+        if (aabb.maxY() <= self.minY() || aabb.minY() >= self.maxY()) {
+            return d;
+        }
+        if (d > 0.0D && aabb.maxZ() <= self.minZ()) {
+            double d1 = self.minZ() - aabb.maxZ();
+            if (d1 < d) {
+                d = d1;
+            }
+        }
+        if (d < 0.0D && aabb.minZ() >= self.maxZ()) {
+            double d2 = self.maxZ() - aabb.minZ();
+            if (d2 > d) {
+                d = d2;
+            }
+        }
+        return d;
+    }
+
+    public static @Nullable HitResult.Clip aabbClip(@NotNull AABBdc self, @NotNull Vector3dc start, @NotNull Vector3dc end) {
+        Vector3dc vMinX = vecClipX(start, end, self.minX(), new Vector3d());
+        Vector3dc vMaxX = vecClipX(start, end, self.maxX(), new Vector3d());
+        Vector3dc vMinY = vecClipY(start, end, self.minY(), new Vector3d());
+        Vector3dc vMaxY = vecClipY(start, end, self.maxY(), new Vector3d());
+        Vector3dc vMinZ = vecClipZ(start, end, self.minZ(), new Vector3d());
+        Vector3dc vMaxZ = vecClipZ(start, end, self.maxZ(), new Vector3d());
+
+        if (!aabbContainsX(self, vMinX)) vMinX = null;
+        if (!aabbContainsX(self, vMaxX)) vMaxX = null;
+        if (!aabbContainsY(self, vMinY)) vMinY = null;
+        if (!aabbContainsY(self, vMaxY)) vMaxY = null;
+        if (!aabbContainsZ(self, vMinZ)) vMinZ = null;
+        if (!aabbContainsZ(self, vMaxZ)) vMaxZ = null;
+
+        Vector3dc clipPos = null;
+//        if (vMinX != null && (clipPos == null || start.VEC3_distanceToSquared(vMinX) < start.VEC3_distanceToSquared(clipPos))) {
+//            clipPos = vMinX;
+//        }
+        if (vMinX != null) {
+            clipPos = vMinX;
+        }
+        if (vMaxX != null && (clipPos == null || start.distanceSquared(vMaxX) < start.distanceSquared(clipPos))) {
+            clipPos = vMaxX;
+        }
+        if (vMinY != null && (clipPos == null || start.distanceSquared(vMinY) < start.distanceSquared(clipPos))) {
+            clipPos = vMinY;
+        }
+        if (vMaxY != null && (clipPos == null || start.distanceSquared(vMaxY) < start.distanceSquared(clipPos))) {
+            clipPos = vMaxY;
+        }
+        if (vMinZ != null && (clipPos == null || start.distanceSquared(vMinZ) < start.distanceSquared(clipPos))) {
+            clipPos = vMinZ;
+        }
+        if (vMaxZ != null && (clipPos == null || start.distanceSquared(vMaxZ) < start.distanceSquared(clipPos))) {
+            clipPos = vMaxZ;
+        }
+
+        if (clipPos == null) return null;
+
+        Side side = Side.NONE;
+        if (clipPos == vMinX) side = Side.WEST;
+        if (clipPos == vMaxX) side = Side.EAST;
+        if (clipPos == vMinY) side = Side.BOTTOM;
+        if (clipPos == vMaxY) side = Side.TOP;
+        if (clipPos == vMinZ) side = Side.NORTH;
+        if (clipPos == vMaxZ) side = Side.SOUTH;
+
+        return new HitResult.Clip(side, clipPos);
+    }
+
+    private static boolean aabbContainsX(@NotNull AABBdc self, @Nullable Vector3dc vec3) {
+        if (vec3 == null) {
+            return false;
+        } else {
+            return vec3.y() >= self.minY() && vec3.y() <= self.maxY() && vec3.z() >= self.minZ() && vec3.z() <= self.maxZ();
+        }
+    }
+
+    private static boolean aabbContainsY(@NotNull AABBdc self, @Nullable Vector3dc vec3) {
+        if (vec3 == null) {
+            return false;
+        } else {
+            return vec3.x() >= self.minX() && vec3.x() <= self.maxX() && vec3.z() >= self.minZ() && vec3.z() <= self.maxZ();
+        }
+    }
+
+    private static boolean aabbContainsZ(@NotNull AABBdc self, @Nullable Vector3dc vec3) {
+        if (vec3 == null) {
+            return false;
+        } else {
+            return vec3.x() >= self.minX() && vec3.x() <= self.maxX() && vec3.y() >= self.minY() && vec3.y() <= self.maxY();
+        }
+    }
+
     static {
         SIN_TABLE = new float[0x10000];
-        for(int i = 0; i < 0x10000; i++) {
-            SIN_TABLE[i] = (float) Math.sin(((double)i * Math.PI * 2D) / 65536D);
+        for (int i = 0; i < 0x10000; i++) {
+            SIN_TABLE[i] = (float) Math.sin(((double) i * Math.PI * 2D) / 65536D);
         }
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/util/linalg/Matrix4.java b/game/core/src/main/java/net/minecraft/core/util/linalg/Matrix4.java
deleted file mode 100644
index e8439f723..000000000
--- a/game/core/src/main/java/net/minecraft/core/util/linalg/Matrix4.java
+++ /dev/null
@@ -1,342 +0,0 @@
-package net.minecraft.core.util.linalg;
-
-import net.minecraft.core.util.pool.ObjectPool;
-import net.minecraft.core.util.pool.Poolable;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.Objects;
-
-public class Matrix4
-    implements Poolable<Matrix4>
-{
-    private static final @NotNull ObjectPool<Matrix4> POOL = new ObjectPool<>(Matrix4::new);
-
-    /**
-     * The first column of the matrix.
-     */
-    public final @NotNull Vector4 x;
-
-    /**
-     * The second column of the matrix.
-     */
-    public final @NotNull Vector4 y;
-
-    /**
-     * The third column of the matrix.
-     */
-    public final @NotNull Vector4 z;
-
-    /**
-     * The fourth column of the matrix.
-     */
-    public final @NotNull Vector4 w;
-
-    /**
-     * Produces a pooled matrix with the given values.
-     */
-    public static @NotNull Matrix4 fromPool(
-        final double c0r0, final double c1r0, final double c2r0, final double c3r0,
-        final double c0r1, final double c1r1, final double c2r1, final double c3r1,
-        final double c0r2, final double c1r2, final double c2r2, final double c3r2,
-        final double c0r3, final double c1r3, final double c2r3, final double c3r3
-    ) {
-        return Matrix4.POOL.get().set(
-            c0r0, c1r0, c2r0, c3r0,
-            c0r1, c1r1, c2r1, c3r1,
-            c0r2, c1r2, c2r2, c3r2,
-            c0r3, c1r3, c2r3, c3r3
-        );
-    }
-
-    /**
-     * Produces the 4x4 identity matrix.
-     */
-    public static @NotNull Matrix4 identity() {
-        return Matrix4.fromPool(
-            1.0, 0.0, 0.0, 0.0,
-            0.0, 1.0, 0.0, 0.0,
-            0.0, 0.0, 1.0, 0.0,
-            0.0, 0.0, 0.0, 1.0
-        );
-    }
-
-    /**
-     * Calculates a perspective projection matrix with the given attributes; angles are given in radians.
-     */
-    public static @NotNull Matrix4 perspective(final double fovy, final double aspect, final double near, final double far) {
-        assert fovy > 0.0;
-        assert Math.abs(aspect) != 0.0;
-        assert near > 0.0;
-        assert far > 0.0;
-        assert near != far;
-
-        final double f = 1.0 / Math.tan(fovy / 2.0);
-
-        return Matrix4.fromPool(
-            f / aspect, 0.0, 0.0, 0.0,
-            0.0, f, 0.0, 0.0,
-            0.0, 0.0, (far + near) / (near - far), (2.0 * far * near) / (near - far),
-            0.0, 0.0, -1.0, 0.0
-        );
-    }
-
-    /**
-     * Calculates an orthographic projection matrix with the given attributes.
-     */
-    public static @NotNull Matrix4 ortho(final double left, final double right, final double bottom, final double top, final double near, final double far) {
-        return Matrix4.fromPool(
-            2.0 / (right - left), 0.0, 0.0, (right + left) / (left - right),
-            0.0, 2.0 / (top - bottom), 0.0, (top + bottom) / (bottom - top),
-            0.0, 0.0, -2.0 / (far - near), (far + near) / (near - far),
-            0.0, 0.0, 0.0, 1.0
-        );
-    }
-
-    private Matrix4() {
-        this.x = Vector4.fromPool(0.0, 0.0, 0.0, 0.0).copyUnpooled();
-        this.y = Vector4.fromPool(0.0, 0.0, 0.0, 0.0).copyUnpooled();
-        this.z = Vector4.fromPool(0.0, 0.0, 0.0, 0.0).copyUnpooled();
-        this.w = Vector4.fromPool(0.0, 0.0, 0.0, 0.0).copyUnpooled();
-    }
-
-    @Override
-    public @NotNull ObjectPool<Matrix4> getPool() {
-        return Matrix4.POOL;
-    }
-
-    @Override
-    public void set(final @NotNull Matrix4 other) {
-        this.x.set(other.x);
-        this.y.set(other.y);
-        this.z.set(other.z);
-        this.w.set(other.w);
-    }
-
-    /**
-     * Sets the values of this matrix.
-     */
-    public @NotNull Matrix4 set(
-        final double c0r0, final double c1r0, final double c2r0, final double c3r0,
-        final double c0r1, final double c1r1, final double c2r1, final double c3r1,
-        final double c0r2, final double c1r2, final double c2r2, final double c3r2,
-        final double c0r3, final double c1r3, final double c2r3, final double c3r3
-    ) {
-        this.x.set(c0r0, c0r1, c0r2, c0r3);
-        this.y.set(c1r0, c1r1, c1r2, c1r3);
-        this.z.set(c2r0, c2r1, c2r2, c2r3);
-        this.w.set(c3r0, c3r1, c3r2, c3r3);
-
-        return this;
-    }
-
-    /**
-     * Translates this matrix by a given vector.
-     */
-    public @NotNull Matrix4 translate(final double x, final double y, final double z) {
-        return this.copyPooled().translateInPlace(x, y, z);
-    }
-
-    /**
-     * Translates this matrix by a given vector, modifying it in place.
-     */
-    public @NotNull Matrix4 translateInPlace(final double x, final double y, final double z) {
-        final @NotNull Matrix4 translationMatrix = Matrix4.fromPool(
-            1.0, 0.0, 0.0, x,
-            0.0, 1.0, 0.0, y,
-            0.0, 0.0, 1.0, z,
-            0.0, 0.0, 0.0, 1.0
-        );
-
-        return this.multInPlace(translationMatrix);
-    }
-
-    /**
-     * Scales this matrix by a given amount on all axes.
-     */
-    public @NotNull Matrix4 scale(final double scale) {
-        return this.copyPooled().scaleInPlace(scale);
-    }
-
-    /**
-     * Scales this matrix by a given amount on all axes, modifying it in place.
-     */
-    public @NotNull Matrix4 scaleInPlace(final double scale) {
-        return this.scaleInPlace(scale, scale, scale);
-    }
-
-    /**
-     * Scales this matrix by a given amount on each axis.
-     */
-    public @NotNull Matrix4 scale(final double x, final double y, final double z) {
-        return this.copyPooled().scaleInPlace(x, y, z);
-    }
-
-    /**
-     * Scales this matrix by a given amount on each axis, modifying it in place.
-     */
-    public @NotNull Matrix4 scaleInPlace(final double x, final double y, final double z) {
-        final @NotNull Matrix4 scaleMatrix = Matrix4.fromPool(
-            x, 0.0, 0.0, 0.0,
-            0.0, y, 0.0, 0.0,
-            0.0, 0.0, z, 0.0,
-            0.0, 0.0, 0.0, 1.0
-        );
-
-        return this.multInPlace(scaleMatrix);
-    }
-
-    /**
-     * Rotates this matrix on the X axis by the given angle.
-     */
-    public @NotNull Matrix4 rotX(final double radians) {
-        return this.copyPooled().rotXInPlace(radians);
-    }
-
-    /**
-     * Rotates this matrix on the X axis by the given angle, modifying it in place.
-     */
-    public @NotNull Matrix4 rotXInPlace(final double radians) {
-        final double sin = Math.sin(radians);
-        final double cos = Math.cos(radians);
-
-        final @NotNull Matrix4 rotMatrix = Matrix4.fromPool(
-            1.0, 0.0, 0.0, 0.0,
-            0.0, cos, -sin, 0.0,
-            0.0, sin, cos, 0.0,
-            0.0, 0.0, 0.0, 1.0
-        );
-
-        return this.multInPlace(rotMatrix);
-    }
-
-    /**
-     * Rotates this matrix on the Y axis by the given angle.
-     */
-    public @NotNull Matrix4 rotY(final double radians) {
-        return this.copyPooled().rotYInPlace(radians);
-    }
-
-    /**
-     * Rotates this matrix on the Y axis by the given angle, modifying it in place.
-     */
-    public @NotNull Matrix4 rotYInPlace(final double radians) {
-        final double sin = Math.sin(radians);
-        final double cos = Math.cos(radians);
-
-        final @NotNull Matrix4 rotMatrix = Matrix4.fromPool(
-            cos, 0.0, sin, 0.0,
-            0.0, 1.0, 0.0, 0.0,
-            -sin, 0.0, cos, 0.0,
-            0.0, 0.0, 0.0, 1.0
-        );
-
-        return this.multInPlace(rotMatrix);
-    }
-
-    /**
-     * Rotates this matrix on the Z axis by the given angle.
-     */
-    public @NotNull Matrix4 rotZ(final double radians) {
-        return this.copyPooled().rotZInPlace(radians);
-    }
-
-    /**
-     * Rotates this matrix on the Z axis by the given angle, modifying it in place.
-     */
-    public @NotNull Matrix4 rotZInPlace(final double radians) {
-        final double sin = Math.sin(radians);
-        final double cos = Math.sin(radians);
-
-        final @NotNull Matrix4 rotMatrix = Matrix4.fromPool(
-            cos, -sin, 0.0, 0.0,
-            sin, cos, 0.0, 0.0,
-            0.0, 0.0, 1.0, 0.0,
-            0.0, 0.0, 0.0, 1.0
-        );
-
-        return this.multInPlace(rotMatrix);
-    }
-
-    /**
-     * Multiplies this matrix by the given matrix.
-     */
-    public @NotNull Matrix4 mult(final @NotNull Matrix4 other) {
-        return this.copyPooled().multInPlace(other);
-    }
-
-    /**
-     * Multiplies this matrix by the given matrix, modifying it in place.
-     */
-    public @NotNull Matrix4 multInPlace(final @NotNull Matrix4 other) {
-        this.x.set(
-            this.x.x * other.x.x + this.y.x * other.x.y + this.z.x * other.x.z + this.w.x * other.x.w,
-            this.x.y * other.x.x + this.y.y * other.x.y + this.z.y * other.x.z + this.w.y * other.x.w,
-            this.x.z * other.x.x + this.y.z * other.x.y + this.z.z * other.x.z + this.w.z * other.x.w,
-            this.x.w * other.x.x + this.y.w * other.x.y + this.z.w * other.x.z + this.w.w * other.x.w
-        );
-        this.y.set(
-            this.x.x * other.y.x + this.y.x * other.y.y + this.z.x * other.y.z + this.w.x * other.y.w,
-            this.x.y * other.y.x + this.y.y * other.y.y + this.z.y * other.y.z + this.w.y * other.y.w,
-            this.x.z * other.y.x + this.y.z * other.y.y + this.z.z * other.y.z + this.w.z * other.y.w,
-            this.x.w * other.y.x + this.y.w * other.y.y + this.z.w * other.y.z + this.w.w * other.y.w
-        );
-        this.z.set(
-            this.x.x * other.z.x + this.y.x * other.z.y + this.z.x * other.z.z + this.w.x * other.z.w,
-            this.x.y * other.z.x + this.y.y * other.z.y + this.z.y * other.z.z + this.w.y * other.z.w,
-            this.x.z * other.z.x + this.y.z * other.z.y + this.z.z * other.z.z + this.w.z * other.z.w,
-            this.x.w * other.z.x + this.y.w * other.z.y + this.z.w * other.z.z + this.w.w * other.z.w
-        );
-        this.w.set(
-            this.x.x * other.w.x + this.y.x * other.w.y + this.z.x * other.w.z + this.w.x * other.w.w,
-            this.x.y * other.w.x + this.y.y * other.w.y + this.z.y * other.w.z + this.w.y * other.w.w,
-            this.x.z * other.w.x + this.y.z * other.w.y + this.z.z * other.w.z + this.w.z * other.w.w,
-            this.x.w * other.w.x + this.y.w * other.w.y + this.z.w * other.w.z + this.w.w * other.w.w
-        );
-
-        return this;
-    }
-
-    /**
-     * Transforms the given vector by this matrix.
-     */
-    public @NotNull Vector4 transform(final @NotNull Vector4 vec) {
-        return this.x.mult(vec.x).addInPlace(this.y.mult(vec.y)).addInPlace(this.z.mult(vec.z)).addInPlace(this.w.mult(vec.w));
-    }
-
-    /**
-     * Transforms the given vector by this matrix.
-     */
-    public @NotNull Vector3 transform(final @NotNull Vector3 vec) {
-        return this.transform(vec.extend(1.0)).truncate();
-    }
-
-    /**
-     * Returns the matrix as a column-major array.
-     */
-    public double @NotNull [] asArray() {
-        return new double[] {
-            this.x.x, this.x.y, this.x.z, this.x.w,
-            this.y.x, this.y.y, this.y.z, this.y.w,
-            this.z.x, this.z.y, this.z.z, this.z.w,
-            this.w.x, this.w.y, this.w.z, this.w.w
-        };
-    }
-
-    @Override
-    public boolean equals(final Object object) {
-        if (this == object) return true;
-        if (object == null || getClass() != object.getClass()) return false;
-        final Matrix4 matrix4 = (Matrix4) object;
-        return Objects.equals(this.x, matrix4.x) && Objects.equals(this.y, matrix4.y) && Objects.equals(this.z, matrix4.z) && Objects.equals(this.w, matrix4.w);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(this.x, this.y, this.z, this.w);
-    }
-
-    @Override
-    public String toString() {
-        return "[ " + this.x + ", " + this.y + ", " + this.z + ", " + this.w + " ]";
-    }
-}
diff --git a/game/core/src/main/java/net/minecraft/core/util/linalg/Vector3.java b/game/core/src/main/java/net/minecraft/core/util/linalg/Vector3.java
deleted file mode 100644
index 0bd7d5a16..000000000
--- a/game/core/src/main/java/net/minecraft/core/util/linalg/Vector3.java
+++ /dev/null
@@ -1,404 +0,0 @@
-package net.minecraft.core.util.linalg;
-
-import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.pool.ObjectPool;
-import net.minecraft.core.util.pool.Poolable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.Objects;
-
-public class Vector3
-    implements Poolable<Vector3>
-{
-    private static final @NotNull ObjectPool<Vector3> POOL = new ObjectPool<>(Vector3::new);
-
-    /**
-     * The X component of this vector.
-     */
-    public double x;
-
-    /**
-     * The Y component of this vector.
-     */
-    public double y;
-
-    /**
-     * The Z component of this vector.
-     */
-    public double z;
-
-    /**
-     * Produces a pooled vector with the given components.
-     */
-    public static @NotNull Vector3 fromPool(final double x, final double y, final double z) {
-        return Vector3.POOL.get().set(x, y, z);
-    }
-
-    /**
-     * Produces a pooled unit vector on the X axis.
-     */
-    public static @NotNull Vector3 unitX() {
-        return Vector3.fromPool(1.0, 0.0, 0.0);
-    }
-
-    /**
-     * Produces a pooled unit vector on the Y axis.
-     */
-    public static @NotNull Vector3 unitY() {
-        return Vector3.fromPool(0.0, 1.0, 0.0);
-    }
-
-    /**
-     * Produces a pooled unit vector on the Z axis.
-     */
-    public static @NotNull Vector3 unitZ() {
-        return Vector3.fromPool(0.0, 0.0, 1.0);
-    }
-
-    private Vector3() {
-        this.x = 0.0;
-        this.y = 0.0;
-        this.z = 0.0;
-    }
-
-    @Override
-    public @NotNull ObjectPool<Vector3> getPool() {
-        return Vector3.POOL;
-    }
-
-    @Override
-    public void set(final @NotNull Vector3 other) {
-        this.x = other.x;
-        this.y = other.y;
-        this.z = other.z;
-    }
-
-    /**
-     * Sets the values of this vector.
-     */
-    public @NotNull Vector3 set(final double x, final double y, final double z) {
-        this.x = x;
-        this.y = y;
-        this.z = z;
-
-        return this;
-    }
-
-    /**
-     * Extends this three-dimensional vector into a four-dimensional vector.
-     */
-    public @NotNull Vector4 extend(final double w) {
-        return Vector4.fromPool(this.x, this.y, this.z, w);
-    }
-
-    /**
-     * Calculates the cross product of this and another vector.
-     */
-    public @NotNull Vector3 cross(final @NotNull Vector3 other) {
-        return Vector3.fromPool(
-            (this.y * other.z) - (this.z * other.y),
-            (this.z * other.x) - (this.x * other.z),
-            (this.x * other.y) - (this.y * other.x)
-        );
-    }
-
-    /**
-     * Performs the unary negation operation.
-     */
-    public @NotNull Vector3 neg() {
-        return this.copyPooled().negInPlace();
-    }
-
-    /**
-     * Performs the unary negation operation, modifying this vector in place.
-     */
-    public @NotNull Vector3 negInPlace() {
-        this.x = -this.x;
-        this.y = -this.y;
-        this.z = -this.z;
-
-        return this;
-    }
-
-    /**
-     * Adds another vector to this vector.
-     */
-    public @NotNull Vector3 add(final @NotNull Vector3 other) {
-        return this.copyPooled().addInPlace(other);
-    }
-
-    /**
-     * Adds another vector to this vector, modifying it in place.
-     */
-    public @NotNull Vector3 addInPlace(final @NotNull Vector3 other) {
-        this.x += other.x;
-        this.y += other.y;
-        this.z += other.z;
-
-        return this;
-    }
-
-    /**
-     * Subtracts another vector from this vector.
-     */
-    public @NotNull Vector3 sub(final @NotNull Vector3 other) {
-        return this.copyPooled().subInPlace(other);
-    }
-
-    /**
-     * Subtracts another vector from this vector, modifying it in place.
-     */
-    public @NotNull Vector3 subInPlace(final @NotNull Vector3 other) {
-        this.x -= other.x;
-        this.y -= other.y;
-        this.z -= other.z;
-
-        return this;
-    }
-
-    /**
-     * Returns this vector as an array.
-     */
-    public double @NotNull [] asArray() {
-        return new double[] { this.x, this.y, this.z };
-    }
-
-    /**
-     * Multiplies this vector by a scalar value.
-     */
-    public @NotNull Vector3 mult(final double value) {
-        return this.copyPooled().multInPlace(value);
-    }
-
-    /**
-     * Multiplies this vector by a scalar value, modifying it in place.
-     */
-    public @NotNull Vector3 multInPlace(final double value) {
-        this.x *= value;
-        this.y *= value;
-        this.z *= value;
-
-        return this;
-    }
-
-    /**
-     * Divides this vector by a scalar value.
-     */
-    public @NotNull Vector3 div(final double value) {
-        return this.copyPooled().divInPlace(value);
-    }
-
-    /**
-     * Divides this vector by a scalar value, modifying it in place.
-     */
-    public @NotNull Vector3 divInPlace(final double value) {
-        this.x /= value;
-        this.y /= value;
-        this.z /= value;
-
-        return this;
-    }
-
-    /**
-     * Calculates the dot product of this and another vector.
-     */
-    public double dot(final @NotNull Vector3 other) {
-        return this.x * other.x + this.y * other.y + this.z * other.z;
-    }
-
-    /**
-     * Calculates the squared magnitude of this vector.
-     * <p>
-     * This does not perform a square root operation, and so can be used to more efficiently compare the magnitudes
-     * of two vectors.
-     */
-    public double squaredMagnitude() {
-        return this.dot(this);
-    }
-
-    /**
-     * Calculates the magnitude of this vector.
-     */
-    public double magnitude() {
-        return Math.sqrt(this.squaredMagnitude());
-    }
-
-    /**
-     * Calculates the angle between this and another vector in radians.
-     */
-    public double angle(final @NotNull Vector3 other) {
-        return Math.atan2(this.cross(other).magnitude(), this.dot(other));
-    }
-
-    /**
-     * Returns a vector with the same direction, but a magnitude of 1.
-     */
-    public @NotNull Vector3 normalize() {
-        return this.normalize(1.0);
-    }
-
-    /**
-     * Returns a vector with the same direction and a given magnitude.
-     */
-    public @NotNull Vector3 normalize(final double magnitude) {
-        return this.mult(magnitude / this.magnitude());
-    }
-
-    /**
-     * Returns the squared distance between two vectors.
-     * <p>
-     * This does not perform a square root operation, and so can be used to more efficiently compare the distances
-     * of vectors.
-     */
-    public double squaredDistance(final @NotNull Vector3 other) {
-        return other.sub(this).squaredMagnitude();
-    }
-
-    /**
-     * Returns the distance between two vectors.
-     */
-    public double distance(final @NotNull Vector3 other) {
-        return Math.sqrt(this.squaredDistance(other));
-    }
-
-    /**
-     * Linearly interpolates towards another vector by the specified amount.
-     */
-    public @NotNull Vector3 lerp(final @NotNull Vector3 other, final double amount) {
-        return Vector3.fromPool(
-            this.x + (other.x - this.x) * amount,
-            this.y + (other.y - this.y) * amount,
-            this.z + (other.z - this.z) * amount
-        );
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the X axis.
-     * @param other The end-point of the line segment.
-     * @param x The X-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector3 clipX(final @NotNull Vector3 other, final double x) {
-        final @NotNull Vector3 delta = other.sub(this);
-        if (delta.x * delta.x < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (x - this.x) - delta.x;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector3.fromPool(this.x + delta.x * percentage, this.y + delta.y * percentage, this.z + delta.z * percentage);
-        }
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the Y axis.
-     * @param other The end-point of the line segment.
-     * @param y The Y-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector3 clipY(final @NotNull Vector3 other, final double y) {
-        final @NotNull Vector3 delta = other.sub(this);
-        if (delta.y * delta.y < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (y - this.y) - delta.y;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector3.fromPool(this.x + delta.x * percentage, this.y + delta.y * percentage, this.z + delta.z * percentage);
-        }
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the Z axis.
-     * @param other The end-point of the line segment.
-     * @param z The Z-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector3 clipZ(final @NotNull Vector3 other, final double z) {
-        final @NotNull Vector3 delta = other.sub(this);
-        if (delta.z * delta.z < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (z - this.z) - delta.z;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector3.fromPool(this.x + delta.x * percentage, this.y + delta.y * percentage, this.z + delta.z * percentage);
-        }
-    }
-
-    /**
-     * Rotates the vector by the given angle in radians around the X axis.
-     */
-    public @NotNull Vector3 rotX(final float radians) {
-        final float cos = MathHelper.cos(radians);
-        final float sin = MathHelper.sin(radians);
-
-        return Vector3.fromPool(
-            this.x,
-            this.y * cos + this.z * sin,
-            this.z * cos - this.y * sin
-        );
-    }
-
-    /**
-     * Rotates the vector by the given angle in radians around the Y axis.
-     */
-    public @NotNull Vector3 rotY(final float radians) {
-        final float cos = MathHelper.cos(radians);
-        final float sin = MathHelper.sin(radians);
-
-        return Vector3.fromPool(
-            this.x * cos + this.z * sin,
-            this.y,
-            this.z * cos - this.x * sin
-        );
-    }
-
-    /**
-     * Rotates the vector by the given angle in radians around the Z axis.
-     */
-    public @NotNull Vector3 rotZ(final float radians) {
-        final float cos = MathHelper.cos(radians);
-        final float sin = MathHelper.sin(radians);
-
-        return Vector3.fromPool(
-           this.x * cos + this.y * sin,
-           this.y * cos - this.x * sin,
-           this.z
-        );
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (obj instanceof Vector3) {
-            final @NotNull Vector3 other = (Vector3) obj;
-
-            return this.x == other.x && this.y == other.y && this.z == other.z;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(this.x, this.y, this.z);
-    }
-
-    @Override
-    public @NotNull String toString() {
-        return "[ " + this.x + ", " + this.y + ", " + this.z + " ]";
-    }
-}
diff --git a/game/core/src/main/java/net/minecraft/core/util/linalg/Vector4.java b/game/core/src/main/java/net/minecraft/core/util/linalg/Vector4.java
deleted file mode 100644
index b57beeb8e..000000000
--- a/game/core/src/main/java/net/minecraft/core/util/linalg/Vector4.java
+++ /dev/null
@@ -1,412 +0,0 @@
-package net.minecraft.core.util.linalg;
-
-import net.minecraft.core.util.pool.ObjectPool;
-import net.minecraft.core.util.pool.Poolable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.Objects;
-
-public class Vector4
-    implements Poolable<Vector4>
-{
-    private static final @NotNull ObjectPool<Vector4> POOL = new ObjectPool<>(Vector4::new);
-
-    /**
-     * The X component of this vector.
-     */
-    public double x;
-
-    /**
-     * The Y component of this vector.
-     */
-    public double y;
-
-    /**
-     * The Z component of this vector.
-     */
-    public double z;
-
-    /**
-     * The W component of this vector.
-     */
-    public double w;
-
-    /**
-     * Produces a pooled vector with the given components.
-     */
-    public static @NotNull Vector4 fromPool(final double x, final double y, final double z, final double w) {
-        return Vector4.POOL.get().set(x, y, z, w);
-    }
-
-    /**
-     * Produces a pooled unit vector on the X axis.
-     */
-    public static @NotNull Vector4 unitX() {
-        return Vector4.fromPool(1.0, 0.0, 0.0, 0.0);
-    }
-
-    /**
-     * Produces a pooled unit vector on the Y axis.
-     */
-    public static @NotNull Vector4 unitY() {
-        return Vector4.fromPool(0.0, 1.0, 0.0, 0.0);
-    }
-
-    /**
-     * Produces a pooled unit vector on the Z axis.
-     */
-    public static @NotNull Vector4 unitZ() {
-        return Vector4.fromPool(0.0, 0.0, 1.0, 0.0);
-    }
-
-    /**
-     * Produces a pooled unit vector on the W axis.
-     */
-    public static @NotNull Vector4 unitW() {
-        return Vector4.fromPool(0.0, 0.0, 0.0, 1.0);
-    }
-
-    private Vector4() {
-        this.x = 0.0;
-        this.y = 0.0;
-        this.z = 0.0;
-        this.w = 0.0;
-    }
-
-    @Override
-    public @NotNull ObjectPool<Vector4> getPool() {
-        return Vector4.POOL;
-    }
-
-    @Override
-    public void set(final @NotNull Vector4 other) {
-        this.x = other.x;
-        this.y = other.y;
-        this.z = other.z;
-        this.w = other.w;
-    }
-
-    /**
-     * Sets the values of the vector.
-     */
-    public @NotNull Vector4 set(final double x, final double y, final double z, final double w) {
-        this.x = x;
-        this.y = y;
-        this.z = z;
-        this.w = w;
-
-        return this;
-    }
-
-    /**
-     * Truncates this four-dimensional vector into a three-dimensional vector.
-     */
-    public @NotNull Vector3 truncate() {
-        return Vector3.fromPool(this.x, this.y, this.z);
-    }
-
-    /**
-     * Performs the unary negation operation.
-     */
-    public @NotNull Vector4 neg() {
-        return this.copyPooled().negInPlace();
-    }
-
-    /**
-     * Performs the unary negation operation, modifying this vector in place.
-     */
-    public @NotNull Vector4 negInPlace() {
-        this.x = -this.x;
-        this.y = -this.y;
-        this.z = -this.z;
-        this.w = -this.w;
-
-        return this;
-    }
-
-    /**
-     * Adds another vector to this vector.
-     */
-    public @NotNull Vector4 add(final @NotNull Vector4 other) {
-        return this.copyPooled().addInPlace(other);
-    }
-
-    /**
-     * Adds another vector to this vector, modifying it in place.
-     */
-    public @NotNull Vector4 addInPlace(final @NotNull Vector4 other) {
-        this.x += other.x;
-        this.y += other.y;
-        this.z += other.z;
-        this.w += other.w;
-
-        return this;
-    }
-
-    /**
-     * Subtracts another vector from this vector.
-     */
-    public @NotNull Vector4 sub(final @NotNull Vector4 other) {
-        return this.copyPooled().subInPlace(other);
-    }
-
-    /**
-     * Subtracts another vector from this vector, modifying it in place.
-     */
-    public @NotNull Vector4 subInPlace(final @NotNull Vector4 other) {
-        this.x -= other.x;
-        this.y -= other.y;
-        this.z -= other.z;
-        this.w -= other.w;
-
-        return this;
-    }
-
-    /**
-     * Returns this vector as an array.
-     */
-    public double @NotNull [] asArray() {
-        return new double[] { this.x, this.y, this.z, this.w };
-    }
-
-    /**
-     * Multiplies this vector by a scalar value.
-     */
-    public @NotNull Vector4 mult(final double value) {
-        return this.copyPooled().multInPlace(value);
-    }
-
-    /**
-     * Multiplies this vector by a scalar value, modifying it in place.
-     */
-    public @NotNull Vector4 multInPlace(final double value) {
-        this.x *= value;
-        this.y *= value;
-        this.z *= value;
-        this.w *= value;
-
-        return this;
-    }
-
-    /**
-     * Divides this vector by a scalar value.
-     */
-    public @NotNull Vector4 div(final double value) {
-        return this.copyPooled().divInPlace(value);
-    }
-
-    /**
-     * Divides this vector by a scalar value, modifying it in place.
-     */
-    public @NotNull Vector4 divInPlace(final double value) {
-        this.x /= value;
-        this.y /= value;
-        this.z /= value;
-        this.w /= value;
-
-        return this;
-    }
-
-    /**
-     * Calculates the dot product of this and another vector.
-     */
-    public double dot(final @NotNull Vector4 other) {
-        return this.x * other.x + this.y * other.y + this.z * other.z + this.w * other.w;
-    }
-
-    /**
-     * Calculates the squared magnitude of this vector.
-     * <p>
-     * This does not perform a square root operation, and so can be used to more efficiently compare the magnitudes
-     * of two vectors.
-     */
-    public double squaredMagnitude() {
-        return this.dot(this);
-    }
-
-    /**
-     * Calculates the magnitude of this vector.
-     */
-    public double magnitude() {
-        return Math.sqrt(this.squaredMagnitude());
-    }
-
-    /**
-     * Calculates the angle between this and another vector in radians.
-     */
-    public double angle(final @NotNull Vector4 other) {
-        return Math.acos(this.dot(other)) / (this.magnitude() * other.magnitude());
-    }
-
-    /**
-     * Returns a vector with the same direction, but a magnitude of 1.
-     */
-    public @NotNull Vector4 normalize() {
-        return this.normalize(1.0);
-    }
-
-    /**
-     * Returns a vector with the same direction and a given magnitude.
-     */
-    public @NotNull Vector4 normalize(final double magnitude) {
-        return this.mult(magnitude / this.magnitude());
-    }
-
-    /**
-     * Returns the squared distance between two vectors.
-     * <p>
-     * This does not perform a square root operation, and so can be used to more efficiently compare the distances
-     * of vectors.
-     */
-    public double squaredDistance(final @NotNull Vector4 other) {
-        return other.sub(this).squaredMagnitude();
-    }
-
-    /**
-     * Returns the distance between two vectors.
-     */
-    public double distance(final @NotNull Vector4 other) {
-        return Math.sqrt(this.squaredDistance(other));
-    }
-
-    /**
-     * Linearly interpolates towards another vector by the specified amount.
-     */
-    public @NotNull Vector3 lerp(final @NotNull Vector3 other, final double amount) {
-        return Vector3.fromPool(
-            this.x + (other.x - this.x) * amount,
-            this.y + (other.y - this.y) * amount,
-            this.z + (other.z - this.z) * amount
-        );
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the X axis.
-     * @param other The end-point of the line segment.
-     * @param x The X-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector4 clipX(final @NotNull Vector4 other, final double x) {
-        final @NotNull Vector4 delta = other.sub(this);
-        if (delta.x * delta.x < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (x - this.x) - delta.x;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector4.fromPool(
-                this.x + delta.x * percentage,
-                this.y + delta.y * percentage,
-                this.z + delta.z * percentage,
-                this.w + delta.w * percentage
-            );
-        }
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the Y axis.
-     * @param other The end-point of the line segment.
-     * @param y The Y-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector4 clipY(final @NotNull Vector4 other, final double y) {
-        final @NotNull Vector4 delta = other.sub(this);
-        if (delta.y * delta.y < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (y - this.y) - delta.y;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector4.fromPool(
-                this.x + delta.x * percentage,
-                this.y + delta.y * percentage,
-                this.z + delta.z * percentage,
-                this.w + delta.w * percentage
-            );
-        }
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the Z axis.
-     * @param other The end-point of the line segment.
-     * @param z The Z-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector4 clipZ(final @NotNull Vector4 other, final double z) {
-        final @NotNull Vector4 delta = other.sub(this);
-        if (delta.z * delta.z < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (z - this.z) - delta.z;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector4.fromPool(
-                this.x + delta.x * percentage,
-                this.y + delta.y * percentage,
-                this.z + delta.z * percentage,
-                this.w + delta.w * percentage
-            );
-        }
-    }
-
-    /**
-     * Calculates the intersection between a line segment defined by this and another vector, and a plane perpendicular
-     * to the W axis.
-     * @param other The end-point of the line segment.
-     * @param w The W-axis position of the plane.
-     * @return The intersection point, or null if no point exists.
-     */
-    public @Nullable Vector4 clipW(final @NotNull Vector4 other, final double w) {
-        final @NotNull Vector4 delta = other.sub(this);
-        if (delta.w * delta.w < 1.0E-7D) {
-            return null;
-        }
-
-        final double percentage = (w - this.w) - delta.w;
-
-        if (percentage < 0.0 || percentage > 1.0) {
-            return null;
-        } else {
-            return Vector4.fromPool(
-                this.x + delta.x * percentage,
-                this.y + delta.y * percentage,
-                this.z + delta.z * percentage,
-                this.w + delta.w * percentage
-            );
-        }
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (obj instanceof Vector4) {
-            final @NotNull Vector4 other = (Vector4) obj;
-
-            return this.x == other.x && this.y == other.y && this.z == other.z && this.w == other.w;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(this.x, this.y, this.z, this.w);
-    }
-
-    @Override
-    public String toString() {
-        return "[ " + this.x + ", " + this.y + ", " + this.z + ", " + this.w + " ]";
-    }
-}
diff --git a/game/core/src/main/java/net/minecraft/core/util/phys/AABB.java b/game/core/src/main/java/net/minecraft/core/util/phys/AABB.java
index 9a3dc1d94..87413e3df 100644
--- a/game/core/src/main/java/net/minecraft/core/util/phys/AABB.java
+++ b/game/core/src/main/java/net/minecraft/core/util/phys/AABB.java
@@ -4,10 +4,11 @@ import net.minecraft.core.util.Into;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.util.pool.ObjectPool;
 import net.minecraft.core.util.pool.Poolable;
-import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
 
+@Deprecated
 public class AABB implements Poolable<AABB> {
     private static final @NotNull ObjectPool<AABB> POOL = new ObjectPool<>(new ObjectPool.PooledObjectFactory<AABB>() {
         @Override
@@ -24,27 +25,23 @@ public class AABB implements Poolable<AABB> {
     public double maxZ;
 
     @Deprecated
-    public static AABB getPermanentBB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
-    {
+    public static AABB getPermanentBB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
         return new AABB(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
     @Deprecated
-    public static void deinitializePool()
-    {
+    public static void deinitializePool() {
         AABB.POOL.free();
     }
 
     @Deprecated
-    public static void initializePool()
-    {
+    public static void initializePool() {
         AABB.POOL.reset();
     }
 
     @Deprecated
     public static AABB getTemporaryBB(double minX, double minY, double minZ, double maxX,
-                                      double maxY, double maxZ)
-    {
+                                      double maxY, double maxZ) {
         return AABB.POOL.get().set(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
@@ -55,8 +52,7 @@ public class AABB implements Poolable<AABB> {
         return AABB.POOL.get().set(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
-    private AABB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
-    {
+    private AABB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
         this.minX = minX;
         this.minY = minY;
         this.minZ = minZ;
@@ -80,8 +76,7 @@ public class AABB implements Poolable<AABB> {
         this.maxZ = other.maxZ;
     }
 
-    public AABB set(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
-    {
+    public AABB set(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
         this.minX = minX;
         this.minY = minY;
         this.minZ = minZ;
@@ -91,138 +86,108 @@ public class AABB implements Poolable<AABB> {
         return this;
     }
 
-    public AABB expand(double stretchX, double stretchY, double stretchZ)
-    {
+    public AABB expand(double stretchX, double stretchY, double stretchZ) {
         double minX = this.minX;
         double minY = this.minY;
         double minZ = this.minZ;
         double maxX = this.maxX;
         double maxY = this.maxY;
         double maxZ = this.maxZ;
-        if(stretchX < 0.0D)
-        {
+        if (stretchX < 0.0D) {
             minX += stretchX;
         }
-        if(stretchX > 0.0D)
-        {
+        if (stretchX > 0.0D) {
             maxX += stretchX;
         }
-        if(stretchY < 0.0D)
-        {
+        if (stretchY < 0.0D) {
             minY += stretchY;
         }
-        if(stretchY > 0.0D)
-        {
+        if (stretchY > 0.0D) {
             maxY += stretchY;
         }
-        if(stretchZ < 0.0D)
-        {
+        if (stretchZ < 0.0D) {
             minZ += stretchZ;
         }
-        if(stretchZ > 0.0D)
-        {
+        if (stretchZ > 0.0D) {
             maxZ += stretchZ;
         }
         return fromPool(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
-    public @NotNull AABB grow(double d, double d1, double d2)
-    {
-        double d3 = minX - d;
-        double d4 = minY - d1;
-        double d5 = minZ - d2;
-        double d6 = maxX + d;
-        double d7 = maxY + d1;
-        double d8 = maxZ + d2;
+    public @NotNull AABB grow(double d, double d1, double d2) {
+        double d3 = this.minX - d;
+        double d4 = this.minY - d1;
+        double d5 = this.minZ - d2;
+        double d6 = this.maxX + d;
+        double d7 = this.maxY + d1;
+        double d8 = this.maxZ + d2;
         return fromPool(d3, d4, d5, d6, d7, d8);
     }
 
-    public AABB cloneMove(double offX, double offY, double offZ)
-    {
-        return fromPool(minX + offX, minY + offY, minZ + offZ, maxX + offX, maxY + offY, maxZ + offZ);
+    public AABB cloneMove(double offX, double offY, double offZ) {
+        return fromPool(this.minX + offX, this.minY + offY, this.minZ + offZ, this.maxX + offX, this.maxY + offY, this.maxZ + offZ);
     }
 
-    public double clipXCollide(AABB aabb, double d)
-    {
-        if(aabb.maxY <= minY || aabb.minY >= maxY)
-        {
+    public double clipXCollide(AABB aabb, double d) {
+        if (aabb.maxY <= this.minY || aabb.minY >= this.maxY) {
             return d;
         }
-        if(aabb.maxZ <= minZ || aabb.minZ >= maxZ)
-        {
+        if (aabb.maxZ <= this.minZ || aabb.minZ >= this.maxZ) {
             return d;
         }
-        if(d > 0.0D && aabb.maxX <= minX)
-        {
-            double d1 = minX - aabb.maxX;
-            if(d1 < d)
-            {
+        if (d > 0.0D && aabb.maxX <= this.minX) {
+            double d1 = this.minX - aabb.maxX;
+            if (d1 < d) {
                 d = d1;
             }
         }
-        if(d < 0.0D && aabb.minX >= maxX)
-        {
-            double d2 = maxX - aabb.minX;
-            if(d2 > d)
-            {
+        if (d < 0.0D && aabb.minX >= this.maxX) {
+            double d2 = this.maxX - aabb.minX;
+            if (d2 > d) {
                 d = d2;
             }
         }
         return d;
     }
 
-    public double clipYCollide(AABB aabb, double d)
-    {
-        if(aabb.maxX <= minX || aabb.minX >= maxX)
-        {
+    public double clipYCollide(AABB aabb, double d) {
+        if (aabb.maxX <= this.minX || aabb.minX >= this.maxX) {
             return d;
         }
-        if(aabb.maxZ <= minZ || aabb.minZ >= maxZ)
-        {
+        if (aabb.maxZ <= this.minZ || aabb.minZ >= this.maxZ) {
             return d;
         }
-        if(d > 0.0D && aabb.maxY <= minY)
-        {
-            double d1 = minY - aabb.maxY;
-            if(d1 < d)
-            {
+        if (d > 0.0D && aabb.maxY <= this.minY) {
+            double d1 = this.minY - aabb.maxY;
+            if (d1 < d) {
                 d = d1;
             }
         }
-        if(d < 0.0D && aabb.minY >= maxY)
-        {
-            double d2 = maxY - aabb.minY;
-            if(d2 > d)
-            {
+        if (d < 0.0D && aabb.minY >= this.maxY) {
+            double d2 = this.maxY - aabb.minY;
+            if (d2 > d) {
                 d = d2;
             }
         }
         return d;
     }
 
-    public double clipZCollide(AABB aabb, double d)
-    {
-        if(aabb.maxX <= minX || aabb.minX >= maxX)
-        {
+    public double clipZCollide(AABB aabb, double d) {
+        if (aabb.maxX <= this.minX || aabb.minX >= this.maxX) {
             return d;
         }
-        if(aabb.maxY <= minY || aabb.minY >= maxY)
-        {
+        if (aabb.maxY <= this.minY || aabb.minY >= this.maxY) {
             return d;
         }
-        if(d > 0.0D && aabb.maxZ <= minZ)
-        {
-            double d1 = minZ - aabb.maxZ;
-            if(d1 < d)
-            {
+        if (d > 0.0D && aabb.maxZ <= this.minZ) {
+            double d1 = this.minZ - aabb.maxZ;
+            if (d1 < d) {
                 d = d1;
             }
         }
-        if(d < 0.0D && aabb.minZ >= maxZ)
-        {
-            double d2 = maxZ - aabb.minZ;
-            if(d2 > d)
-            {
+        if (d < 0.0D && aabb.minZ >= this.maxZ) {
+            double d2 = this.maxZ - aabb.minZ;
+            if (d2 > d) {
                 d = d2;
             }
         }
@@ -232,6 +197,7 @@ public class AABB implements Poolable<AABB> {
     public boolean intersects(AABB aabb) {
         return aabb.maxX > this.minX && aabb.minX < this.maxX && aabb.maxY > this.minY && aabb.minY < this.maxY && aabb.maxZ > this.minZ && aabb.minZ < this.maxZ;
     }
+
     public boolean intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
         return maxX > this.minX && minX < this.maxX && maxY > this.minY && minY < this.maxY && maxZ > this.minZ && minZ < this.maxZ;
     }
@@ -240,14 +206,13 @@ public class AABB implements Poolable<AABB> {
         return aabb.maxX >= this.minX && aabb.minX <= this.maxX && aabb.maxY >= this.minY && aabb.minY <= this.maxY && aabb.maxZ >= this.minZ && aabb.minZ <= this.maxZ;
     }
 
-    public @NotNull AABB move(double offX, double offY, double offZ)
-    {
-        minX += offX;
-        minY += offY;
-        minZ += offZ;
-        maxX += offX;
-        maxY += offY;
-        maxZ += offZ;
+    public @NotNull AABB move(double offX, double offY, double offZ) {
+        this.minX += offX;
+        this.minY += offY;
+        this.minZ += offZ;
+        this.maxX += offX;
+        this.maxY += offY;
+        this.maxZ += offZ;
         return this;
     }
 
@@ -256,26 +221,23 @@ public class AABB implements Poolable<AABB> {
         return this.move(vec.x, vec.y, vec.z);
     }
 
-    public boolean contains(Vec3 vec3)
-    {
-        if(vec3.x <= minX || vec3.x >= maxX)
-        {
+    public boolean contains(Vec3 vec3) {
+        if (vec3.x <= this.minX || vec3.x >= this.maxX) {
             return false;
         }
-        if(vec3.y <= minY || vec3.y >= maxY)
-        {
+        if (vec3.y <= this.minY || vec3.y >= this.maxY) {
             return false;
         }
-        return vec3.z > minZ && vec3.z < maxZ;
+        return vec3.z > this.minZ && vec3.z < this.maxZ;
     }
 
-    public double getSize()
-    {
-        double d = maxX - minX;
-        double d1 = maxY - minY;
-        double d2 = maxZ - minZ;
+    public double getSize() {
+        double d = this.maxX - this.minX;
+        double d1 = this.maxY - this.minY;
+        double d2 = this.maxZ - this.minZ;
         return (d + d1 + d2) / 3D;
     }
+
     public AABB shrink(final double n, final double n2, final double n3) {
         double minX = this.minX;
         double minY = this.minY;
@@ -304,110 +266,107 @@ public class AABB implements Poolable<AABB> {
         return fromPool(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
-    public AABB getInsetBoundingBox(double d, double d1, double d2)
-    {
-        double d3 = minX + d;
-        double d4 = minY + d1;
-        double d5 = minZ + d2;
-        double d6 = maxX - d;
-        double d7 = maxY - d1;
-        double d8 = maxZ - d2;
+    public AABB getInsetBoundingBox(double d, double d1, double d2) {
+        double d3 = this.minX + d;
+        double d4 = this.minY + d1;
+        double d5 = this.minZ + d2;
+        double d6 = this.maxX - d;
+        double d7 = this.maxY - d1;
+        double d8 = this.maxZ - d2;
         return fromPool(d3, d4, d5, d6, d7, d8);
     }
 
     @Deprecated
-    public @NotNull AABB copy()
-    {
-        return fromPool(minX, minY, minZ, maxX, maxY, maxZ);
+    public @NotNull AABB copy() {
+        return fromPool(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ);
     }
 
     @Deprecated
     public AABB copyPermanent() {
-        return fromPool(minX, minY, minZ, maxX, maxY, maxZ).copyUnpooled();
-    }
-
-	public @Nullable HitResult.Clip clip(@NotNull Vec3 start, @NotNull Vec3 end) {
-		Vec3 vMinX = start.clipX(end, minX);
-		Vec3 vMaxX = start.clipX(end, maxX);
-		Vec3 vMinY = start.clipY(end, minY);
-		Vec3 vMaxY = start.clipY(end, maxY);
-		Vec3 vMinZ = start.clipZ(end, minZ);
-		Vec3 vMaxZ = start.clipZ(end, maxZ);
-		
-		if(!containsX(vMinX)) vMinX = null;
-		if(!containsX(vMaxX)) vMaxX = null;
-		if(!containsY(vMinY)) vMinY = null;
-		if(!containsY(vMaxY)) vMaxY = null;
-		if(!containsZ(vMinZ)) vMinZ = null;
-		if(!containsZ(vMaxZ)) vMaxZ = null;
-		
-		Vec3 clipPos = null;
-		if(vMinX != null && (clipPos == null || start.distanceToSquared(vMinX) < start.distanceToSquared(clipPos))) clipPos = vMinX;
-		if(vMaxX != null && (clipPos == null || start.distanceToSquared(vMaxX) < start.distanceToSquared(clipPos))) clipPos = vMaxX;
-		if(vMinY != null && (clipPos == null || start.distanceToSquared(vMinY) < start.distanceToSquared(clipPos))) clipPos = vMinY;
-		if(vMaxY != null && (clipPos == null || start.distanceToSquared(vMaxY) < start.distanceToSquared(clipPos))) clipPos = vMaxY;
-		if(vMinZ != null && (clipPos == null || start.distanceToSquared(vMinZ) < start.distanceToSquared(clipPos))) clipPos = vMinZ;
-		if(vMaxZ != null && (clipPos == null || start.distanceToSquared(vMaxZ) < start.distanceToSquared(clipPos))) clipPos = vMaxZ;
-		
-		if(clipPos == null) return null;
-		
-		Side side = Side.NONE;
-		if(clipPos == vMinX) side = Side.WEST;
-		if(clipPos == vMaxX) side = Side.EAST;
-		if(clipPos == vMinY) side = Side.BOTTOM;
-		if(clipPos == vMaxY) side = Side.TOP;
-		if(clipPos == vMinZ) side = Side.NORTH;
-		if(clipPos == vMaxZ) side = Side.SOUTH;
-
-        return new HitResult.Clip(side, clipPos);
-	}
-
-    private boolean containsX(Vec3 vec3)
-    {
-        if(vec3 == null)
-        {
+        return fromPool(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ).copyUnpooled();
+    }
+
+    public @Nullable HitResult.Clip clip(@NotNull Vec3 start, @NotNull Vec3 end) {
+        Vec3 vMinX = start.clipX(end, this.minX);
+        Vec3 vMaxX = start.clipX(end, this.maxX);
+        Vec3 vMinY = start.clipY(end, this.minY);
+        Vec3 vMaxY = start.clipY(end, this.maxY);
+        Vec3 vMinZ = start.clipZ(end, this.minZ);
+        Vec3 vMaxZ = start.clipZ(end, this.maxZ);
+
+        if (!containsX(vMinX)) vMinX = null;
+        if (!containsX(vMaxX)) vMaxX = null;
+        if (!containsY(vMinY)) vMinY = null;
+        if (!containsY(vMaxY)) vMaxY = null;
+        if (!containsZ(vMinZ)) vMinZ = null;
+        if (!containsZ(vMaxZ)) vMaxZ = null;
+
+        Vec3 clipPos = null;
+        if (vMinX != null && (clipPos == null || start.distanceToSquared(vMinX) < start.distanceToSquared(clipPos)))
+            clipPos = vMinX;
+        if (vMaxX != null && (clipPos == null || start.distanceToSquared(vMaxX) < start.distanceToSquared(clipPos)))
+            clipPos = vMaxX;
+        if (vMinY != null && (clipPos == null || start.distanceToSquared(vMinY) < start.distanceToSquared(clipPos)))
+            clipPos = vMinY;
+        if (vMaxY != null && (clipPos == null || start.distanceToSquared(vMaxY) < start.distanceToSquared(clipPos)))
+            clipPos = vMaxY;
+        if (vMinZ != null && (clipPos == null || start.distanceToSquared(vMinZ) < start.distanceToSquared(clipPos)))
+            clipPos = vMinZ;
+        if (vMaxZ != null && (clipPos == null || start.distanceToSquared(vMaxZ) < start.distanceToSquared(clipPos)))
+            clipPos = vMaxZ;
+
+        if (clipPos == null) return null;
+
+        Side side = Side.NONE;
+        if (clipPos == vMinX) side = Side.WEST;
+        if (clipPos == vMaxX) side = Side.EAST;
+        if (clipPos == vMinY) side = Side.BOTTOM;
+        if (clipPos == vMaxY) side = Side.TOP;
+        if (clipPos == vMinZ) side = Side.NORTH;
+        if (clipPos == vMaxZ) side = Side.SOUTH;
+
+        return new HitResult.Clip(side, clipPos.asJomlVec());
+    }
+
+    private boolean containsX(Vec3 vec3) {
+        if (vec3 == null) {
             return false;
-        } else
-        {
-            return vec3.y >= minY && vec3.y <= maxY && vec3.z >= minZ && vec3.z <= maxZ;
+        } else {
+            return vec3.y >= this.minY && vec3.y <= this.maxY && vec3.z >= this.minZ && vec3.z <= this.maxZ;
         }
     }
 
-    private boolean containsY(Vec3 vec3)
-    {
-        if(vec3 == null)
-        {
+    private boolean containsY(Vec3 vec3) {
+        if (vec3 == null) {
             return false;
-        } else
-        {
-            return vec3.x >= minX && vec3.x <= maxX && vec3.z >= minZ && vec3.z <= maxZ;
+        } else {
+            return vec3.x >= this.minX && vec3.x <= this.maxX && vec3.z >= this.minZ && vec3.z <= this.maxZ;
         }
     }
 
-    private boolean containsZ(Vec3 vec3)
-    {
-        if(vec3 == null)
-        {
+    private boolean containsZ(Vec3 vec3) {
+        if (vec3 == null) {
             return false;
-        } else
-        {
-            return vec3.x >= minX && vec3.x <= maxX && vec3.y >= minY && vec3.y <= maxY;
+        } else {
+            return vec3.x >= this.minX && vec3.x <= this.maxX && vec3.y >= this.minY && vec3.y <= this.maxY;
         }
     }
 
-    public void setBB(AABB aabb)
-    {
-        minX = aabb.minX;
-        minY = aabb.minY;
-        minZ = aabb.minZ;
-        maxX = aabb.maxX;
-        maxY = aabb.maxY;
-        maxZ = aabb.maxZ;
+    public void setBB(AABB aabb) {
+        this.minX = aabb.minX;
+        this.minY = aabb.minY;
+        this.minZ = aabb.minZ;
+        this.maxX = aabb.maxX;
+        this.maxY = aabb.maxY;
+        this.maxZ = aabb.maxZ;
     }
 
     @Override
-	public String toString()
-    {
-        return "box[" + minX + ", " + minY + ", " + minZ + " -> " + maxX + ", " + maxY + ", " + maxZ + "]";
+    public String toString() {
+        return "box[" + this.minX + ", " + this.minY + ", " + this.minZ + " -> " + this.maxX + ", " + this.maxY + ", " + this.maxZ + "]";
+    }
+
+    public @NotNull AABBd asJomlAABB() {
+        return new AABBd(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/util/phys/HitResult.java b/game/core/src/main/java/net/minecraft/core/util/phys/HitResult.java
index 6426bc226..d019aefe3 100644
--- a/game/core/src/main/java/net/minecraft/core/util/phys/HitResult.java
+++ b/game/core/src/main/java/net/minecraft/core/util/phys/HitResult.java
@@ -2,18 +2,25 @@ package net.minecraft.core.util.phys;
 
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 public sealed class HitResult permits HitResult.Tile, HitResult.Entity, HitResult.Clip {
-    public final @NotNull Vec3 location;
+    public final @NotNull Vector3dc location;
 
-    public HitResult(@NotNull Vec3 location) {
-        this.location = location.copyPooled();
+    public HitResult(double x, double y, double z) {
+        this.location = new Vector3d(x, y, z);
+    }
+
+    public HitResult(@NotNull Vector3dc location) {
+        this.location = new Vector3d(location);
     }
     public double distanceToSquared(final @NotNull net.minecraft.core.entity.Entity entity) {
-        final double diffX = this.location.x - entity.x;
-        final double diffY = this.location.y - entity.y;
-        final double diffZ = this.location.z - entity.z;
+        final double diffX = this.location.x() - entity.x;
+        final double diffY = this.location.y() - entity.y;
+        final double diffZ = this.location.z() - entity.z;
         return diffX * diffX + diffY * diffY + diffZ * diffZ;
     }
     public double distanceTo(final @NotNull net.minecraft.core.entity.Entity entity) {
@@ -21,10 +28,10 @@ public sealed class HitResult permits HitResult.Tile, HitResult.Entity, HitResul
     }
 
     public final static class Tile extends HitResult {
-        public final @NotNull TilePos tilePos;
+        public final @NotNull TilePosc tilePos;
         public final @NotNull Side side;
-        public Tile(@NotNull TilePos tilePos, @NotNull Side side, @NotNull Vec3 vec3) {
-            super(vec3);
+        public Tile(@NotNull TilePosc tilePos, @NotNull Side side, @NotNull Vector3dc location) {
+            super(location);
             this.tilePos = new TilePos(tilePos);
             this.side = side;
         }
@@ -33,15 +40,15 @@ public sealed class HitResult permits HitResult.Tile, HitResult.Entity, HitResul
     public final static class Entity extends HitResult {
         public final @NotNull net.minecraft.core.entity.Entity entity;
         public Entity(@NotNull net.minecraft.core.entity.Entity entity) {
-            super(Vec3.fromPool(entity.x, entity.y, entity.z));
+            super(entity.x, entity.y, entity.z);
             this.entity = entity;
         }
     }
 
     public final static class Clip extends HitResult {
         public final @NotNull Side side;
-        public Clip( @NotNull Side side, @NotNull Vec3 vec3) {
-            super(vec3);
+        public Clip( @NotNull Side side, @NotNull Vector3dc location) {
+            super(location);
             this.side = side;
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/util/phys/Vec3.java b/game/core/src/main/java/net/minecraft/core/util/phys/Vec3.java
index 58964147c..101f6128a 100644
--- a/game/core/src/main/java/net/minecraft/core/util/phys/Vec3.java
+++ b/game/core/src/main/java/net/minecraft/core/util/phys/Vec3.java
@@ -6,10 +6,11 @@ import net.minecraft.core.util.pool.Poolable;
 import org.jetbrains.annotations.NotNull;
 import net.minecraft.core.util.pool.ObjectPool;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
 
+@Deprecated
 public class Vec3
-    implements Poolable<Vec3>, Into<Vec3>
-{
+    implements Poolable<Vec3>, Into<Vec3> {
     private static final @NotNull ObjectPool<Vec3> POOL = new ObjectPool<>(new ObjectPool.PooledObjectFactory<Vec3>() {
         @Override
         public @NotNull Vec3 createDefault() {
@@ -22,26 +23,22 @@ public class Vec3
     public double z;
 
     @Deprecated
-    public static Vec3 getPermanentVec3(double x, double y, double z)
-    {
+    public static Vec3 getPermanentVec3(double x, double y, double z) {
         return new Vec3(x, y, z);
     }
 
     @Deprecated
-    public static void deinitializePool()
-    {
+    public static void deinitializePool() {
         Vec3.POOL.free();
     }
 
     @Deprecated
-    public static void initializePool()
-    {
+    public static void initializePool() {
         Vec3.POOL.reset();
     }
 
     @Deprecated
-    public static Vec3 getTempVec3(double x, double y, double z)
-    {
+    public static Vec3 getTempVec3(double x, double y, double z) {
         return Vec3.POOL.get().set(x, y, z);
     }
 
@@ -55,13 +52,13 @@ public class Vec3
     }
 
     private Vec3(double x, double y, double z) {
-        if(x == -0D) {
+        if (x == -0D) {
             x = 0.0D;
         }
-        if(y == -0D) {
+        if (y == -0D) {
             y = 0.0D;
         }
-        if(z == -0D) {
+        if (z == -0D) {
             z = 0.0D;
         }
         this.x = x;
@@ -86,144 +83,122 @@ public class Vec3
         this.z = other.z;
     }
 
-    public Vec3 set(double x, double y, double z)
-    {
+    public Vec3 set(double x, double y, double z) {
         this.x = x;
         this.y = y;
         this.z = z;
         return this;
     }
 
-    public Vec3 vectorTo(Vec3 vec3)
-    {
-        return fromPool(vec3.x - x, vec3.y - y, vec3.z - z);
+    public Vec3 vectorTo(Vec3 vec3) {
+        return fromPool(vec3.x - this.x, vec3.y - this.y, vec3.z - this.z);
     }
 
-    public Vec3 normalize()
-    {
-        double d = MathHelper.sqrt(x * x + y * y + z * z);
-        if(d < 0.0001D)
-        {
+    public Vec3 normalize() {
+        double d = MathHelper.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
+        if (d < 0.0001D) {
             return fromPool(0.0D, 0.0D, 0.0D);
-        } else
-        {
-            return scale(1/d);
+        } else {
+            return scale(1 / d);
         }
     }
+
     public double dotProduct(final Vec3 vec3) {
         return this.x * vec3.x + this.y * vec3.y + this.z * vec3.z;
     }
-    public Vec3 crossProduct(Vec3 vec3)
-    {
-        return fromPool(y * vec3.z - z * vec3.y, z * vec3.x - x * vec3.z, x * vec3.y - y * vec3.x);
+
+    public Vec3 crossProduct(Vec3 vec3) {
+        return fromPool(this.y * vec3.z - this.z * vec3.y, this.z * vec3.x - this.x * vec3.z, this.x * vec3.y - this.y * vec3.x);
     }
 
-    public @NotNull Vec3 add(double x, double y, double z)
-    {
+    public @NotNull Vec3 add(double x, double y, double z) {
         return fromPool(this.x + x, this.y + y, this.z + z);
     }
 
-    public Vec3 scale(double scalar){
+    public Vec3 scale(double scalar) {
         return fromPool(this.x * scalar, this.y * scalar, this.z * scalar);
     }
 
-    public double distanceTo(Vec3 vec3)
-    {
-        double diffX = vec3.x - x;
-        double diffY = vec3.y - y;
-        double diffZ = vec3.z - z;
+    public double distanceTo(Vec3 vec3) {
+        double diffX = vec3.x - this.x;
+        double diffY = vec3.y - this.y;
+        double diffZ = vec3.z - this.z;
         return MathHelper.sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ);
     }
 
-    public double distanceToSquared(Vec3 vec3)
-    {
-        double diffX = vec3.x - x;
-        double diffY = vec3.y - y;
-        double diffZ = vec3.z - z;
+    public double distanceToSquared(Vec3 vec3) {
+        double diffX = vec3.x - this.x;
+        double diffY = vec3.y - this.y;
+        double diffZ = vec3.z - this.z;
         return diffX * diffX + diffY * diffY + diffZ * diffZ;
     }
 
-    public double distanceToSquared(double x, double y, double z)
-    {
+    public double distanceToSquared(double x, double y, double z) {
         double diffX = x - this.x;
         double diffY = y - this.y;
         double diffZ = z - this.z;
         return diffX * diffX + diffY * diffY + diffZ * diffZ;
     }
 
-    public double length()
-    {
-        return MathHelper.sqrt(x * x + y * y + z * z);
+    public double length() {
+        return MathHelper.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
     }
 
-    public @Nullable Vec3 clipX(@NotNull Vec3 vec3, double d)
-    {
-        double diffX = vec3.x - x;
-        double diffY = vec3.y - y;
-        double diffZ = vec3.z - z;
-        if(diffX * diffX < 1E-007D)
-        {
+    public @Nullable Vec3 clipX(@NotNull Vec3 vec3, double d) {
+        double diffX = vec3.x - this.x;
+        double diffY = vec3.y - this.y;
+        double diffZ = vec3.z - this.z;
+        if (diffX * diffX < 1E-007D) {
             return null;
         }
-        double d4 = (d - x) / diffX;
-        if(d4 < 0.0D || d4 > 1.0D)
-        {
+        double d4 = (d - this.x) / diffX;
+        if (d4 < 0.0D || d4 > 1.0D) {
             return null;
-        } else
-        {
-            return fromPool(x + diffX * d4, y + diffY * d4, z + diffZ * d4);
+        } else {
+            return fromPool(this.x + diffX * d4, this.y + diffY * d4, this.z + diffZ * d4);
         }
     }
 
-    public Vec3 clipY(Vec3 vec3, double d)
-    {
-        double diffX = vec3.x - x;
-        double diffY = vec3.y - y;
-        double diffZ = vec3.z - z;
-        if(diffY * diffY < 1.0000000116860974E-007D)
-        {
+    public Vec3 clipY(Vec3 vec3, double d) {
+        double diffX = vec3.x - this.x;
+        double diffY = vec3.y - this.y;
+        double diffZ = vec3.z - this.z;
+        if (diffY * diffY < 1.0000000116860974E-007D) {
             return null;
         }
-        double d4 = (d - y) / diffY;
-        if(d4 < 0.0D || d4 > 1.0D)
-        {
+        double d4 = (d - this.y) / diffY;
+        if (d4 < 0.0D || d4 > 1.0D) {
             return null;
-        } else
-        {
-            return fromPool(x + diffX * d4, y + diffY * d4, z + diffZ * d4);
+        } else {
+            return fromPool(this.x + diffX * d4, this.y + diffY * d4, this.z + diffZ * d4);
         }
     }
 
-    public Vec3 clipZ(Vec3 vec3, double d)
-    {
-        double diffX = vec3.x - x;
-        double diffY = vec3.y - y;
-        double diffZ = vec3.z - z;
-        if(diffZ * diffZ < 1.0000000116860974E-007D)
-        {
+    public Vec3 clipZ(Vec3 vec3, double d) {
+        double diffX = vec3.x - this.x;
+        double diffY = vec3.y - this.y;
+        double diffZ = vec3.z - this.z;
+        if (diffZ * diffZ < 1.0000000116860974E-007D) {
             return null;
         }
-        double d4 = (d - z) / diffZ;
-        if(d4 < 0.0D || d4 > 1.0D)
-        {
+        double d4 = (d - this.z) / diffZ;
+        if (d4 < 0.0D || d4 > 1.0D) {
             return null;
-        } else
-        {
-            return fromPool(x + diffX * d4, y + diffY * d4, z + diffZ * d4);
+        } else {
+            return fromPool(this.x + diffX * d4, this.y + diffY * d4, this.z + diffZ * d4);
         }
     }
 
     @Override
-	public String toString()
-    {
-        return "(" + x + ", " + y + ", " + z + ")";
+    public String toString() {
+        return "(" + this.x + ", " + this.y + ", " + this.z + ")";
     }
 
     public Vec3 lerp(final Vec3 vec3, final double progress) {
         return fromPool(this.x + (vec3.x - this.x) * progress, this.y + (vec3.y - this.y) * progress, this.z + (vec3.z - this.z) * progress);
     }
-    public void rotateAroundX(float radians)
-    {
+
+    public void rotateAroundX(float radians) {
         final float cos = MathHelper.cos(radians);
         final float sin = MathHelper.sin(radians);
         final double x = this.x;
@@ -234,8 +209,7 @@ public class Vec3
         this.z = z;
     }
 
-    public void rotateAroundY(float radians)
-    {
+    public void rotateAroundY(float radians) {
         final float cos = MathHelper.cos(radians);
         final float sin = MathHelper.sin(radians);
         final double x = this.x * cos + this.z * sin;
@@ -245,6 +219,7 @@ public class Vec3
         this.y = y;
         this.z = z;
     }
+
     public void rotateAroundZ(final float radians) {
         final float cos = MathHelper.cos(radians);
         final float sin = MathHelper.sin(radians);
@@ -255,4 +230,8 @@ public class Vec3
         this.y = y;
         this.z = z;
     }
+
+    public @NotNull Vector3d asJomlVec() {
+        return new Vector3d(this.x, this.y, this.z);
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/BlocksContainer.java b/game/core/src/main/java/net/minecraft/core/world/BlocksContainer.java
index a54b89b08..295b1be1a 100644
--- a/game/core/src/main/java/net/minecraft/core/world/BlocksContainer.java
+++ b/game/core/src/main/java/net/minecraft/core/world/BlocksContainer.java
@@ -4,10 +4,12 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.SeasonManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -35,8 +37,8 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public boolean setBlockId(final @NotNull TilePos tilePos, final int id) {
-        this.blockEntryMap.put(tilePos, new BlockEntry(id, 0, null));
+    public boolean setBlockId(final @NotNull TilePosc tilePos, final int id) {
+        this.blockEntryMap.put(new TilePos(tilePos), new BlockEntry(id, 0, null));
         return true;
     }
 
@@ -51,49 +53,49 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public boolean setBlockData(final @NotNull TilePos tilePos, final int data) {
+    public boolean setBlockData(final @NotNull TilePosc tilePos, final int data) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             entry.data = data;
         } else {
-            this.blockEntryMap.put(tilePos, new BlockEntry(this.world.getBlockId(tilePos), data, this.world.getTileEntity(tilePos)));
+            this.blockEntryMap.put(new TilePos(tilePos), new BlockEntry(this.world.getBlockId(tilePos), data, this.world.getTileEntity(tilePos)));
         }
 
         return true;
     }
 
     @Override
-    public boolean setBlockIdData(final @NotNull TilePos tilePos, final int id, final int data) {
-        this.blockEntryMap.put(tilePos, new BlockEntry(id, data, null));
+    public boolean setBlockIdData(final @NotNull TilePosc tilePos, final int id, final int data) {
+        this.blockEntryMap.put(new TilePos(tilePos), new BlockEntry(id, data, null));
         return true;
     }
 
     @Override
-    public void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos, final int value) {
+    public void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos, final int value) {
         // Do nothing
     }
 
     @Override
-    public void setTileEntity(final @NotNull TilePos tilePos, final @NotNull TileEntity tileEntity) {
+    public void setTileEntity(final @NotNull TilePosc tilePos, final @NotNull TileEntity tileEntity) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             entry.tileEntity = tileEntity;
         } else {
-            this.blockEntryMap.put(tilePos, new BlockEntry(this.world.getBlockId(tilePos), this.world.getBlockData(tilePos), tileEntity));
+            this.blockEntryMap.put(new TilePos(tilePos), new BlockEntry(this.world.getBlockId(tilePos), this.world.getBlockData(tilePos), tileEntity));
         }
     }
 
     @Override
-    public void removeTileEntity(final @NotNull TilePos tilePos) {
+    public void removeTileEntity(final @NotNull TilePosc tilePos) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             entry.tileEntity = null;
         } else {
-            this.blockEntryMap.put(tilePos, new BlockEntry(this.world.getBlockId(tilePos), this.world.getBlockData(tilePos), null));
+            this.blockEntryMap.put(new TilePos(tilePos), new BlockEntry(this.world.getBlockId(tilePos), this.world.getBlockData(tilePos), null));
         }
     }
 
-    public @Nullable BlockEntry getEntry(final @NotNull TilePos tilePos) {
+    public @Nullable BlockEntry getEntry(final @NotNull TilePosc tilePos) {
         return this.blockEntryMap.get(tilePos);
     }
 
@@ -111,7 +113,7 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public int getBlockId(final @NotNull TilePos tilePos) {
+    public int getBlockId(final @NotNull TilePosc tilePos) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             return entry.id;
@@ -121,12 +123,12 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public @Nullable Block<?> getBlock(final @NotNull TilePos tilePos) {
+    public @Nullable Block<?> getBlock(final @NotNull TilePosc tilePos) {
         return Blocks.getBlock(this.getBlockId(tilePos));
     }
 
     @Override
-    public @Nullable TileEntity getTileEntity(final @NotNull TilePos tilePos) {
+    public @Nullable TileEntity getTileEntity(final @NotNull TilePosc tilePos) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             return entry.tileEntity;
@@ -136,7 +138,7 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public float getBrightness(final @NotNull TilePos tilePos, final int lightEmission) {
+    public float getBrightness(final @NotNull TilePosc tilePos, final int lightEmission) {
         if (this.lightRefEntity != null) {
             return this.lightRefEntity.getBrightness(1.0f);
         }
@@ -145,7 +147,7 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public int getLightmapCoord(final @NotNull TilePos tilePos, final int lightEmission) {
+    public int getLightmapCoord(final @NotNull TilePosc tilePos, final int lightEmission) {
         if (this.lightRefEntity != null) {
             return this.lightRefEntity.getLightmap(1.0f);
         }
@@ -159,12 +161,12 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public float getLightBrightness(final @NotNull TilePos tilePos) {
+    public float getLightBrightness(final @NotNull TilePosc tilePos) {
         return this.world.getLightBrightness(tilePos);
     }
 
     @Override
-    public int getBlockData(final @NotNull TilePos tilePos) {
+    public int getBlockData(final @NotNull TilePosc tilePos) {
         final @Nullable BlockEntry entry = this.getEntry(tilePos);
         if (entry != null) {
             return entry.data;
@@ -174,39 +176,39 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public @NotNull Material getBlockMaterial(final @NotNull TilePos tilePos) {
+    public @NotNull Material getBlockMaterial(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block == null) {
-            return Material.air;
+            return Materials.AIR;
         } else {
             return block.getMaterial();
         }
     }
 
     @Override
-    public boolean isBlockOpaqueCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockOpaqueCube(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         return block != null && block.isSolidRender();
     }
 
     @Override
-    public boolean isBlockNormalCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockNormalCube(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
-        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos.x, tilePos.y, tilePos.z);
+        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos);
     }
 
     @Override
-    public double getBlockTemperature(final @NotNull TilePos tilePos) {
+    public double getBlockTemperature(final @NotNull TilePosc tilePos) {
         return this.world.getBlockTemperature(tilePos);
     }
 
     @Override
-    public double getBlockHumidity(final @NotNull TilePos tilePos) {
+    public double getBlockHumidity(final @NotNull TilePosc tilePos) {
         return this.world.getBlockHumidity(tilePos);
     }
 
     @Override
-    public double getBlockVariety(final @NotNull TilePos tilePos) {
+    public double getBlockVariety(final @NotNull TilePosc tilePos) {
         return this.world.getBlockVariety(tilePos);
     }
 
@@ -216,12 +218,12 @@ public class BlocksContainer implements MutableWorldSource {
     }
 
     @Override
-    public @NotNull Biome getBlockBiome(final @NotNull TilePos tilePos) {
+    public @NotNull Biome getBlockBiome(final @NotNull TilePosc tilePos) {
         return this.world.getBlockBiome(tilePos);
     }
 
     @Override
-    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos) {
+    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos) {
         return this.world.getSavedLightValue(lightLayer, tilePos);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/world/Explosion.java b/game/core/src/main/java/net/minecraft/core/world/Explosion.java
index e74c5c8be..6677a4c1c 100644
--- a/game/core/src/main/java/net/minecraft/core/world/Explosion.java
+++ b/game/core/src/main/java/net/minecraft/core/world/Explosion.java
@@ -10,100 +10,103 @@ import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.chunk.ChunkPosition;
 import net.minecraft.core.util.helper.DamageType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.*;
 
 public class Explosion {
 
-	public boolean isFlaming;
-	protected Random ExplosionRNG;
-	protected World worldObj;
-	public double explosionX;
-	public double explosionY;
-	public double explosionZ;
-	public Entity exploder;
-	public float explosionSize;
-	public Set<ChunkPosition> destroyedBlockPositions;
-	public boolean destroyBlocks;
-
-	public Explosion(World world, Entity entity, double x, double y, double z, float explosionSize) {
-		isFlaming = false;
-		ExplosionRNG = new Random();
-		destroyedBlockPositions = new HashSet<>();
-		worldObj = world;
-		exploder = entity;
-		this.explosionSize = explosionSize;
-		explosionX = x;
-		explosionY = y;
-		explosionZ = z;
-		destroyBlocks = true;
-		if(!world.getGameRuleValue(GameRules.MOB_GRIEFING)) {
-		    destroyBlocks = entity == null || entity instanceof Player;
-		}
-	}
-
-	public void explode() {
-	    calculateBlocksToDestroy();
-	    
-		damageEntities();
-		
-		if(destroyBlocks && isFlaming) createFire();
-	}
+    protected final @NotNull World world;
+    public final @Nullable Entity exploder;
+    public boolean isFlaming;
+    protected Random ExplosionRNG;
+    public double explosionX;
+    public double explosionY;
+    public double explosionZ;
+    public float explosionSize;
+    public Set<ChunkPosition> destroyedBlockPositions;
+    public boolean destroyBlocks;
+
+    public Explosion(@NotNull World world, @Nullable Entity exploder, double x, double y, double z, float explosionSize) {
+        this.isFlaming = false;
+        this.ExplosionRNG = new Random();
+        this.destroyedBlockPositions = new HashSet<>();
+        this.world = world;
+        this.exploder = exploder;
+        this.explosionSize = explosionSize;
+        this.explosionX = x;
+        this.explosionY = y;
+        this.explosionZ = z;
+        this.destroyBlocks = true;
+        if (!world.getGameRuleValue(GameRules.MOB_GRIEFING)) {
+            this.destroyBlocks = exploder == null || exploder instanceof Player;
+        }
+    }
+
+    public void explode() {
+        calculateBlocksToDestroy();
+
+        damageEntities();
+
+        if (this.destroyBlocks && this.isFlaming) createFire();
+    }
 
     public void addEffects(boolean particles) {
-    	if(!worldObj.isClientSide) {
-    		worldObj.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, explosionX, explosionY, explosionZ, "random.explode", 4F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);	
-    	}
-        List<ChunkPosition> arraylist = new ArrayList<>(destroyedBlockPositions);
+        if (!this.world.isClientSide) {
+            this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, this.explosionX, this.explosionY, this.explosionZ, "random.explode", 4F, (1.0F + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F) * 0.7F);
+        }
+        List<ChunkPosition> arraylist = new ArrayList<>(this.destroyedBlockPositions);
         for (int i = arraylist.size() - 1; i >= 0; i--) {
             ChunkPosition chunkposition = arraylist.get(i);
-            
+
             int x = chunkposition.x;
             int y = chunkposition.y;
             int z = chunkposition.z;
-            
-            TileEntity tileEntity = worldObj.getTileEntity(x, y, z);
-            if(particles) {
-                double xPos = (double) x + worldObj.rand.nextFloat();
-                double yPos = (double) y + worldObj.rand.nextFloat();
-                double zPos = (double) z + worldObj.rand.nextFloat();
-                double d3 = xPos - explosionX;
-                double d4 = yPos - explosionY;
-                double d5 = zPos - explosionZ;
+
+            TileEntity tileEntity = this.world.getTileEntity(x, y, z);
+            if (particles) {
+                double xPos = (double) x + this.world.rand.nextFloat();
+                double yPos = (double) y + this.world.rand.nextFloat();
+                double zPos = (double) z + this.world.rand.nextFloat();
+                double d3 = xPos - this.explosionX;
+                double d4 = yPos - this.explosionY;
+                double d5 = zPos - this.explosionZ;
                 double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
                 d3 /= d6;
                 d4 /= d6;
                 d5 /= d6;
-                double d7 = 0.5D / (d6 / (double) explosionSize + 0.1D);
-                d7 *= worldObj.rand.nextFloat() * worldObj.rand.nextFloat() + 0.3F;
+                double d7 = 0.5D / (d6 / (double) this.explosionSize + 0.1D);
+                d7 *= this.world.rand.nextFloat() * this.world.rand.nextFloat() + 0.3F;
                 d3 *= d7;
                 d4 *= d7;
                 d5 *= d7;
-                worldObj.spawnParticle("explode", (xPos + explosionX) / 2D, (yPos + explosionY) / 2D, (zPos + explosionZ) / 2D, d3, d4, d5, 0);
-                worldObj.spawnParticle("smoke", xPos, yPos, zPos, d3, d4, d5, 0);
+                this.world.spawnParticle("explode", (xPos + this.explosionX) / 2D, (yPos + this.explosionY) / 2D, (zPos + this.explosionZ) / 2D, d3, d4, d5, 0);
+                this.world.spawnParticle("smoke", xPos, yPos, zPos, d3, d4, d5, 0);
             }
-            if (destroyBlocks) {
-                Block<?> block = worldObj.getBlock(x, y, z);
-                if(block != null)
-                {
-                    block.dropBlockWithCause(worldObj, EnumDropCause.EXPLOSION, x, y, z, worldObj.getBlockMetadata(x, y, z), tileEntity, null);
-                    worldObj.setBlockWithNotify(x, y, z, 0);
-                    block.onBlockDestroyedByExplosion(worldObj, x, y, z);
+            if (this.destroyBlocks) {
+                Block<?> block = this.world.getBlock(x, y, z);
+                if (block != null) {
+                    block.dropBlockWithCause(this.world, EnumDropCause.EXPLOSION, x, y, z, this.world.getBlockMetadata(x, y, z), tileEntity, null);
+                    this.world.setBlockWithNotify(x, y, z, 0);
+                    block.onBlockDestroyedByExplosion(this.world, x, y, z);
                 }
             }
         }
     }
-	
-	protected void calculateBlocksToDestroy() {
+
+    protected void calculateBlocksToDestroy() {
         int i = 16;
         for (int j = 0; j < i; j++) {
             for (int l = 0; l < i; l++) {
-                label0: for (int j1 = 0; j1 < i; j1++) {
-                    if(j != 0 && j != i - 1 && l != 0 && l != i - 1 && j1 != 0 && j1 != i - 1) {
+                label0:
+                for (int j1 = 0; j1 < i; j1++) {
+                    if (j != 0 && j != i - 1 && l != 0 && l != i - 1 && j1 != 0 && j1 != i - 1) {
                         continue;
                     }
                     double d = ((float) j / ((float) i - 1.0F)) * 2.0F - 1.0F;
@@ -113,24 +116,24 @@ public class Explosion {
                     d /= d3;
                     d1 /= d3;
                     d2 /= d3;
-                    float f1 = explosionSize * (0.7F + worldObj.rand.nextFloat() * 0.6F);
-                    double d5 = explosionX;
-                    double d7 = explosionY;
-                    double d9 = explosionZ;
+                    float f1 = this.explosionSize * (0.7F + this.world.rand.nextFloat() * 0.6F);
+                    double d5 = this.explosionX;
+                    double d7 = this.explosionY;
+                    double d9 = this.explosionZ;
                     float f2 = 0.3F;
-                    while(true) {
-                        if(f1 <= 0.0F) {
+                    while (true) {
+                        if (f1 <= 0.0F) {
                             continue label0;
                         }
                         int j4 = MathHelper.floor(d5);
                         int k4 = MathHelper.floor(d7);
                         int l4 = MathHelper.floor(d9);
-                        int i5 = worldObj.getBlockId(j4, k4, l4);
-                        if(i5 > 0) {
-                            f1 -= (Blocks.blocksList[i5].getBlastResistance(exploder) + 0.3F) * f2;
+                        int i5 = this.world.getBlockId(j4, k4, l4);
+                        if (i5 > 0) {
+                            f1 -= (Blocks.blocksList[i5].getBlastResistance(this.exploder) + 0.3F) * f2;
                         }
-                        if(f1 > 0.0F) {
-                            destroyedBlockPositions.add(new ChunkPosition(j4, k4, l4));
+                        if (f1 > 0.0F) {
+                            this.destroyedBlockPositions.add(new ChunkPosition(j4, k4, l4));
                         }
                         d5 += d * (double) f2;
                         d7 += d1 * (double) f2;
@@ -140,33 +143,33 @@ public class Explosion {
                 }
             }
         }
-	}
-	
-	protected void damageEntities() {
-        float explosionSize2 = explosionSize * 2.0f;
-        
-        int x1 = MathHelper.floor(explosionX - (double) explosionSize2 - 1.0D);
-        int x2 = MathHelper.floor(explosionX + (double) explosionSize2 + 1.0D);
-        int y1 = MathHelper.floor(explosionY - (double) explosionSize2 - 1.0D);
-        int y2 = MathHelper.floor(explosionY + (double) explosionSize2 + 1.0D);
-        int z1 = MathHelper.floor(explosionZ - (double) explosionSize2 - 1.0D);
-        int z2 = MathHelper.floor(explosionZ + (double) explosionSize2 + 1.0D);
-        
-        List<Entity> list = new ArrayList<>(worldObj.getEntitiesWithinAABBExcludingEntity(exploder, AABB.fromPool(x1, y1, z1, x2, y2, z2)));
-        Vec3 vec3 = Vec3.fromPool(explosionX, explosionY, explosionZ);
+    }
+
+    protected void damageEntities() {
+        float explosionSize2 = this.explosionSize * 2.0f;
+
+        int x1 = MathHelper.floor(this.explosionX - (double) explosionSize2 - 1.0D);
+        int x2 = MathHelper.floor(this.explosionX + (double) explosionSize2 + 1.0D);
+        int y1 = MathHelper.floor(this.explosionY - (double) explosionSize2 - 1.0D);
+        int y2 = MathHelper.floor(this.explosionY + (double) explosionSize2 + 1.0D);
+        int z1 = MathHelper.floor(this.explosionZ - (double) explosionSize2 - 1.0D);
+        int z2 = MathHelper.floor(this.explosionZ + (double) explosionSize2 + 1.0D);
+
+        List<Entity> list = new ArrayList<>(this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, new AABBd(x1, y1, z1, x2, y2, z2)));
+        Vector3dc vec3 = new Vector3d(this.explosionX, this.explosionY, this.explosionZ);
         for (Entity entity : list) {
-            double d4 = entity.distanceTo(explosionX, explosionY, explosionZ) / (double) explosionSize2;
+            double d4 = entity.distanceTo(this.explosionX, this.explosionY, this.explosionZ) / (double) explosionSize2;
             if (d4 <= 1.0D) {
-                double xComp = entity.x - explosionX;
-                double yComp = entity.y - explosionY;
-                double zComp = entity.z - explosionZ;
+                double xComp = entity.x - this.explosionX;
+                double yComp = entity.y - this.explosionY;
+                double zComp = entity.z - this.explosionZ;
                 double distance = MathHelper.sqrt(xComp * xComp + yComp * yComp + zComp * zComp);
                 xComp /= distance;
                 yComp /= distance;
                 zComp /= distance;
-                double d12 = worldObj.getSeenPercent(vec3, entity.bb);
+                double d12 = this.world.getSeenPercent(vec3, entity.bb);
                 double d13 = (1.0D - d4) * d12;
-                entity.hurt(exploder, (int) (((d13 * d13 + d13) / 2D) * 8D * (double) explosionSize2 + 1.0D), DamageType.BLAST);
+                entity.hurt(this.exploder, (int) (((d13 * d13 + d13) / 2D) * 8D * (double) explosionSize2 + 1.0D), DamageType.BLAST);
                 double flingForce = d13 * 2;
                 if (entity instanceof IArmorWearing) {
                     float proc = 1 - (((IArmorWearing<?>) entity).getTotalProtectionAmount(DamageType.BLAST) / 2f);
@@ -175,20 +178,20 @@ public class Explosion {
                 entity.fling(xComp * flingForce, yComp * flingForce, zComp * flingForce, 1);
             }
         }
-	}
-
-	protected void createFire() {
-        List<ChunkPosition> arraylist = new ArrayList<>(destroyedBlockPositions);
-		for (int l2 = arraylist.size() - 1; l2 >= 0; l2--) {
-			ChunkPosition chunkposition = arraylist.get(l2);
-			
-			int x1 = chunkposition.x;
-			int y1 = chunkposition.y;
-			int z1 = chunkposition.z;
-			
-			if(worldObj.getBlockId(x1, y1, z1) == 0 && Blocks.solid[worldObj.getBlockId(x1, y1 - 1, z1)] && ExplosionRNG.nextInt(3) == 0) {
-				worldObj.setBlockWithNotify(x1, y1, z1, Blocks.FIRE.id());
-			}
-		}
-	}
+    }
+
+    protected void createFire() {
+        List<ChunkPosition> arraylist = new ArrayList<>(this.destroyedBlockPositions);
+        for (int l2 = arraylist.size() - 1; l2 >= 0; l2--) {
+            ChunkPosition chunkposition = arraylist.get(l2);
+
+            int x1 = chunkposition.x;
+            int y1 = chunkposition.y;
+            int z1 = chunkposition.z;
+
+            if (this.world.getBlockId(x1, y1, z1) == 0 && Blocks.solid[this.world.getBlockId(x1, y1 - 1, z1)] && this.ExplosionRNG.nextInt(3) == 0) {
+                this.world.setBlockWithNotify(x1, y1, z1, Blocks.FIRE.id());
+            }
+        }
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/ExplosionCannonball.java b/game/core/src/main/java/net/minecraft/core/world/ExplosionCannonball.java
index c64ed88a3..305cbeb04 100644
--- a/game/core/src/main/java/net/minecraft/core/world/ExplosionCannonball.java
+++ b/game/core/src/main/java/net/minecraft/core/world/ExplosionCannonball.java
@@ -1,6 +1,7 @@
 package net.minecraft.core.world;
 
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.IArmorWearing;
 import net.minecraft.core.enums.EnumDropCause;
@@ -8,105 +9,95 @@ import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.chunk.ChunkPosition;
 import net.minecraft.core.util.helper.DamageType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
 
 import java.util.*;
 
-public class ExplosionCannonball extends Explosion{
+public class ExplosionCannonball extends Explosion {
 
-    public ExplosionCannonball(World world, Entity entity, double d, double d1, double d2, float f)
-    {
-        super(world, entity, d, d1, d2, f);
+    public ExplosionCannonball(@NotNull World world, @Nullable Entity exploder, double x, double y, double z, float explosionSize) {
+        super(world, exploder, x, y, z, explosionSize);
     }
 
     @Override
-	public void explode()
-    {
+    public void explode() {
         int i = 16;
-        for(int j = 0; j < i; j++)
-        {
-            for(int l = 0; l < i; l++)
-            {
+        for (int j = 0; j < i; j++) {
+            for (int l = 0; l < i; l++) {
                 label0:
-                for(int j1 = 0; j1 < i; j1++)
-                {
-                    if(j != 0 && j != i - 1 && l != 0 && l != i - 1 && j1 != 0 && j1 != i - 1)
-                    {
+                for (int j1 = 0; j1 < i; j1++) {
+                    if (j != 0 && j != i - 1 && l != 0 && l != i - 1 && j1 != 0 && j1 != i - 1) {
                         continue;
                     }
-                    double d = ((float)j / ((float)i - 1.0F)) * 2.0F - 1.0F;
-                    double d1 = ((float)l / ((float)i - 1.0F)) * 2.0F - 1.0F;
-                    double d2 = ((float)j1 / ((float)i - 1.0F)) * 2.0F - 1.0F;
+                    double d = ((float) j / ((float) i - 1.0F)) * 2.0F - 1.0F;
+                    double d1 = ((float) l / ((float) i - 1.0F)) * 2.0F - 1.0F;
+                    double d2 = ((float) j1 / ((float) i - 1.0F)) * 2.0F - 1.0F;
                     double d3 = java.lang.Math.sqrt(d * d + d1 * d1 + d2 * d2);
                     d /= d3;
                     d1 /= d3;
                     d2 /= d3;
-                    float f1 = explosionSize * (0.7F + worldObj.rand.nextFloat() * 0.6F);
-                    double d5 = explosionX;
-                    double d7 = explosionY;
-                    double d9 = explosionZ;
+                    float f1 = this.explosionSize * (0.7F + this.world.rand.nextFloat() * 0.6F);
+                    double d5 = this.explosionX;
+                    double d7 = this.explosionY;
+                    double d9 = this.explosionZ;
                     float f2 = 0.3F;
-                    do
-                    {
-                        if(f1 <= 0.0F)
-                        {
+                    do {
+                        if (f1 <= 0.0F) {
                             continue label0;
                         }
                         int j4 = MathHelper.floor(d5);
                         int k4 = MathHelper.floor(d7);
                         int l4 = MathHelper.floor(d9);
-                        int i5 = worldObj.getBlockId(j4, k4, l4);
-                        if(i5 > 0)
-                        {
-                            f1 -= (Blocks.blocksList[i5].getBlastResistance(exploder) + 0.3F) * f2;
+                        int i5 = this.world.getBlockId(j4, k4, l4);
+                        if (i5 > 0) {
+                            f1 -= (Blocks.blocksList[i5].getBlastResistance(this.exploder) + 0.3F) * f2;
                         }
-                        if(f1 > 0.0F)
-                        {
-                            destroyedBlockPositions.add(new ChunkPosition(j4, k4, l4));
+                        if (f1 > 0.0F) {
+                            this.destroyedBlockPositions.add(new ChunkPosition(j4, k4, l4));
                         }
-                        d5 += d * (double)f2;
-                        d7 += d1 * (double)f2;
-                        d9 += d2 * (double)f2;
+                        d5 += d * (double) f2;
+                        d7 += d1 * (double) f2;
+                        d9 += d2 * (double) f2;
                         f1 -= f2 * 0.75F;
-                    } while(true);
+                    } while (true);
                 }
 
             }
 
         }
 
-        explosionSize *= 2.0F;
-        int k = MathHelper.floor(explosionX - (double)explosionSize - 1.0D);
-        int i1 = MathHelper.floor(explosionX + (double)explosionSize + 1.0D);
-        int k1 = MathHelper.floor(explosionY - (double)explosionSize - 1.0D);
-        int l1 = MathHelper.floor(explosionY + (double)explosionSize + 1.0D);
-        int i2 = MathHelper.floor(explosionZ - (double)explosionSize - 1.0D);
-        int j2 = MathHelper.floor(explosionZ + (double)explosionSize + 1.0D);
-//        List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(exploder, AABB.getBoundingBoxFromPool(k, k1, i2, i1, l1, j2));
-        List<Entity> list = worldObj.getEntitiesWithinAABB(Entity.class, AABB.fromPool(k, k1, i2, i1, l1, j2)); // Cannon balls can explode their owners
-        Vec3 vec3 = Vec3.fromPool(explosionX, explosionY, explosionZ);
-        for(int k2 = 0; k2 < list.size(); k2++)
-        {
+        this.explosionSize *= 2.0F;
+        int minX = MathHelper.floor(this.explosionX - (double) this.explosionSize - 1.0D);
+        int maxX = MathHelper.floor(this.explosionX + (double) this.explosionSize + 1.0D);
+        int minY = MathHelper.floor(this.explosionY - (double) this.explosionSize - 1.0D);
+        int maxY = MathHelper.floor(this.explosionY + (double) this.explosionSize + 1.0D);
+        int minZ = MathHelper.floor(this.explosionZ - (double) this.explosionSize - 1.0D);
+        int maxZ = MathHelper.floor(this.explosionZ + (double) this.explosionSize + 1.0D);
+//        List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(exploder, AABB.getBoundingBoxFromPool(minX, minY, minZ, maxX, maxY, maxZ));
+        List<Entity> list = this.world.getEntitiesWithinAABB(Entity.class, new AABBd(minX, minY, minZ, maxX, maxY, maxZ)); // Cannon balls can explode their owners
+        Vector3dc vec3 = new Vector3d(this.explosionX, this.explosionY, this.explosionZ);
+        for (int k2 = 0; k2 < list.size(); k2++) {
             Entity entity = list.get(k2);
-            double d4 = entity.distanceTo(explosionX, explosionY, explosionZ) / (double)explosionSize;
-            if(d4 <= 1.0D)
-            {
-                double xComp = entity.x - explosionX;
-                double yComp = entity.y - explosionY;
-                double zComp = entity.z - explosionZ;
+            double d4 = entity.distanceTo(this.explosionX, this.explosionY, this.explosionZ) / (double) this.explosionSize;
+            if (d4 <= 1.0D) {
+                double xComp = entity.x - this.explosionX;
+                double yComp = entity.y - this.explosionY;
+                double zComp = entity.z - this.explosionZ;
                 double d11 = MathHelper.sqrt(xComp * xComp + yComp * yComp + zComp * zComp);
                 xComp *= 2.5;
                 yComp /= d11;
                 yComp += 0.5f;
                 zComp *= 2.5;
-                double d12 = worldObj.getSeenPercent(vec3, entity.bb);
+                double d12 = this.world.getSeenPercent(vec3, entity.bb);
                 double flingForce = (1.0D - d4) * d12;
-                entity.hurt(exploder, (int)(((flingForce * flingForce + flingForce) / 2D) * 8D * (double)explosionSize + 1.0D), DamageType.BLAST);
-                if (entity instanceof IArmorWearing && entity != exploder) {
+                entity.hurt(this.exploder, (int) (((flingForce * flingForce + flingForce) / 2D) * 8D * (double) this.explosionSize + 1.0D), DamageType.BLAST);
+                if (entity instanceof IArmorWearing && entity != this.exploder) {
                     float proc = 1 - (((IArmorWearing<?>) entity).getTotalProtectionAmount(DamageType.BLAST) / 2f);
                     flingForce *= proc;
                 }
@@ -114,20 +105,17 @@ public class ExplosionCannonball extends Explosion{
             }
         }
 
-        ArrayList<ChunkPosition> arraylist = new ArrayList<>(destroyedBlockPositions);
-        if(isFlaming)
-        {
-            for(int l2 = arraylist.size() - 1; l2 >= 0; l2--)
-            {
+        ArrayList<ChunkPosition> arraylist = new ArrayList<>(this.destroyedBlockPositions);
+        if (this.isFlaming) {
+            for (int l2 = arraylist.size() - 1; l2 >= 0; l2--) {
                 ChunkPosition chunkposition = arraylist.get(l2);
                 int i3 = chunkposition.x;
                 int j3 = chunkposition.y;
                 int k3 = chunkposition.z;
-                int l3 = worldObj.getBlockId(i3, j3, k3);
-                int i4 = worldObj.getBlockId(i3, j3 - 1, k3);
-                if(l3 == 0 && Blocks.solid[i4] && ExplosionRNG.nextInt(3) == 0)
-                {
-                    worldObj.setBlockWithNotify(i3, j3, k3, Blocks.FIRE.id());
+                int l3 = this.world.getBlockId(i3, j3, k3);
+                int i4 = this.world.getBlockId(i3, j3 - 1, k3);
+                if (l3 == 0 && Blocks.solid[i4] && this.ExplosionRNG.nextInt(3) == 0) {
+                    this.world.setBlockWithNotify(i3, j3, k3, Blocks.FIRE.id());
                 }
             }
 
@@ -135,50 +123,46 @@ public class ExplosionCannonball extends Explosion{
     }
 
     @Override
-	public void addEffects(boolean flag)
-    {
-    	if(!worldObj.isClientSide) {
-    		worldObj.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, explosionX, explosionY, explosionZ, "random.explode", 4F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);	
-    	}
-        ArrayList<ChunkPosition> arraylist = new ArrayList<>(destroyedBlockPositions);
-        for(int i = arraylist.size() - 1; i >= 0; i--)
-        {
+    public void addEffects(boolean particles) {
+        if (!this.world.isClientSide) {
+            this.world.playSoundEffect(null, SoundCategory.WORLD_SOUNDS, this.explosionX, this.explosionY, this.explosionZ, "random.explode", 4F, (1.0F + (this.world.rand.nextFloat() - this.world.rand.nextFloat()) * 0.2F) * 0.7F);
+        }
+        ArrayList<ChunkPosition> arraylist = new ArrayList<>(this.destroyedBlockPositions);
+        for (int i = arraylist.size() - 1; i >= 0; i--) {
             ChunkPosition chunkposition = arraylist.get(i);
             int x = chunkposition.x;
             int y = chunkposition.y;
             int z = chunkposition.z;
-            Block<?> block = worldObj.getBlock(x, y, z);
-            TileEntity tileEntity = worldObj.getTileEntity(x, y, z);
-            if(flag)
-            {
-                double d = (double)x + worldObj.rand.nextFloat();
-                double d1 = (double)y + worldObj.rand.nextFloat();
-                double d2 = (double)z + worldObj.rand.nextFloat();
-                double d3 = d - explosionX;
-                double d4 = d1 - explosionY;
-                double d5 = d2 - explosionZ;
+            Block<?> block = this.world.getBlock(x, y, z);
+            TileEntity tileEntity = this.world.getTileEntity(x, y, z);
+            if (particles) {
+                double d = (double) x + this.world.rand.nextFloat();
+                double d1 = (double) y + this.world.rand.nextFloat();
+                double d2 = (double) z + this.world.rand.nextFloat();
+                double d3 = d - this.explosionX;
+                double d4 = d1 - this.explosionY;
+                double d5 = d2 - this.explosionZ;
                 double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
                 d3 /= d6;
                 d4 /= d6;
                 d5 /= d6;
-                double d7 = 0.5D / (d6 / (double)explosionSize + 0.1D);
-                d7 *= worldObj.rand.nextFloat() * worldObj.rand.nextFloat() + 0.3F;
+                double d7 = 0.5D / (d6 / (double) this.explosionSize + 0.1D);
+                d7 *= this.world.rand.nextFloat() * this.world.rand.nextFloat() + 0.3F;
                 d3 *= d7;
                 d4 *= d7;
                 d5 *= d7;
-                worldObj.spawnParticle("explode", (d + explosionX) / 2D, (d1 + explosionY) / 2D, (d2 + explosionZ) / 2D, d3, d4, d5, 0 );
-                worldObj.spawnParticle("smoke", d, d1, d2, d3, d4, d5, 0);
+                this.world.spawnParticle("explode", (d + this.explosionX) / 2D, (d1 + this.explosionY) / 2D, (d2 + this.explosionZ) / 2D, d3, d4, d5, 0);
+                this.world.spawnParticle("smoke", d, d1, d2, d3, d4, d5, 0);
             }
-            if(block != null && (block == Blocks.GLASS
-                    ||  block.getMaterial() == Material.topSnow
-                    ||  block.getMaterial() == Material.plant
-                    ||  block.getMaterial() == Material.web
-                    ||  block.getMaterial() == Material.decoration
-                    ||  block.getMaterial() == Material.ice))
-            {
-                block.dropBlockWithCause(worldObj, EnumDropCause.EXPLOSION, x, y, z, worldObj.getBlockMetadata(x, y, z), tileEntity, null);
-                worldObj.setBlockWithNotify(x, y, z, 0);
-                block.onBlockDestroyedByExplosion(worldObj, x, y, z);
+            if (block != null && (block == Blocks.GLASS
+                || block.getMaterial() == Materials.TOP_SNOW
+                || block.getMaterial() == Materials.PLANT
+                || block.getMaterial() == Materials.WEB
+                || block.getMaterial() == Materials.DECORATION
+                || block.getMaterial() == Materials.ICE)) {
+                block.dropBlockWithCause(this.world, EnumDropCause.EXPLOSION, x, y, z, this.world.getBlockMetadata(x, y, z), tileEntity, null);
+                this.world.setBlockWithNotify(x, y, z, 0);
+                block.onBlockDestroyedByExplosion(this.world, x, y, z);
             }
         }
 
diff --git a/game/core/src/main/java/net/minecraft/core/world/MutableWorldSource.java b/game/core/src/main/java/net/minecraft/core/world/MutableWorldSource.java
index 0d8597a8a..f6a4a168a 100644
--- a/game/core/src/main/java/net/minecraft/core/world/MutableWorldSource.java
+++ b/game/core/src/main/java/net/minecraft/core/world/MutableWorldSource.java
@@ -3,54 +3,55 @@ package net.minecraft.core.world;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import org.jetbrains.annotations.NotNull;
 
 public interface MutableWorldSource
     extends WorldSource {
 
-    boolean setBlockId(final @NotNull TilePos tilePos, final int id);
+    boolean setBlockId(final @NotNull TilePosc tilePos, final int id);
 
     @Deprecated
     default boolean setBlock(final int x, final int y, final int z, final int id) {
         return this.setBlockId(new TilePos(x, y, z), id);
     }
 
-    boolean setBlockData(final @NotNull TilePos tilePos, final int data);
+    boolean setBlockData(final @NotNull TilePosc tilePos, final int data);
 
     @Deprecated
     default boolean setBlockMetadata(final int x, final int y, final int z, final int data) {
         return this.setBlockData(new TilePos(x, y, z), data);
     }
 
-    boolean setBlockIdData(final @NotNull TilePos tilePos, final int id, final int data);
+    boolean setBlockIdData(final @NotNull TilePosc tilePos, final int id, final int data);
 
     @Deprecated
     default boolean setBlockAndMetadata(final int x, final int y, final int z, final int id, final int data) {
         return this.setBlockIdData(new TilePos(x, y, z), id, data);
     }
 
-    void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos, final int value);
+    void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos, final int value);
 
     @Deprecated
     default void setLightValue(final @NotNull LightLayer lightLayer, final int x, final int y, final int z, final int value) {
         this.setLightValue(lightLayer, new TilePos(x, y, z), value);
     }
 
-    void setTileEntity(final @NotNull TilePos tilePos, final @NotNull TileEntity tileEntity);
+    void setTileEntity(final @NotNull TilePosc tilePos, final @NotNull TileEntity tileEntity);
 
     @Deprecated
     default void setTileEntity(final int x, final int y, final int z, final @NotNull TileEntity tileEntity) {
         this.setTileEntity(new TilePos(x, y, z), tileEntity);
     }
 
-    void removeTileEntity(final @NotNull TilePos tilePos);
+    void removeTileEntity(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default void removeBlockTileEntity(final int x, final int y, final int z) {
         this.removeTileEntity(new TilePos(x, y, z));
     }
 
-    default void replaceTileEntity(final @NotNull TilePos tilePos, final @NotNull TileEntity tileEntity) {
+    default void replaceTileEntity(final @NotNull TilePosc tilePos, final @NotNull TileEntity tileEntity) {
         this.removeTileEntity(tilePos);
         this.setTileEntity(tilePos, tileEntity);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/SpawnerMobs.java b/game/core/src/main/java/net/minecraft/core/world/SpawnerMobs.java
index 0ccd839a6..835fe200c 100644
--- a/game/core/src/main/java/net/minecraft/core/world/SpawnerMobs.java
+++ b/game/core/src/main/java/net/minecraft/core/world/SpawnerMobs.java
@@ -3,9 +3,8 @@ package net.minecraft.core.world;
 import com.mojang.logging.LogUtils;
 import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
 import net.minecraft.core.block.BlockLogicBed;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.data.gamerule.GameRules;
-import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.SpawnListEntry;
@@ -16,116 +15,108 @@ import net.minecraft.core.entity.monster.MobZombie;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.enums.MobCategory;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.chunk.Chunk;
-import net.minecraft.core.world.chunk.ChunkCoordinate;
-import net.minecraft.core.world.chunk.ChunkCoordinates;
-import net.minecraft.core.world.chunk.ChunkPosition;
 import net.minecraft.core.world.config.spawning.SpawnerConfig;
 import net.minecraft.core.world.pathfinder.Node;
 import net.minecraft.core.world.pathfinder.Path;
 import net.minecraft.core.world.pathfinder.PathFinder;
-import net.minecraft.core.world.pos.ChunkPos;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.*;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
 import org.slf4j.Logger;
 
-import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-public final class SpawnerMobs
-{
-    private static final Logger LOGGER = LogUtils.getLogger();
-    private static final Set<ChunkPos> ELIGIBLE_CHUNKS_FOR_SPAWNING = new ObjectOpenHashSet<>();
-    private static final Class<? extends Mob>[] NIGHT_SPAWN_ENTITIES;
-
-    static
-    {
+
+public final class SpawnerMobs {
+    private static final @NotNull Logger LOGGER = LogUtils.getLogger();
+    private static final @NotNull Set<@NotNull ChunkPos> ELIGIBLE_CHUNKS_FOR_SPAWNING = new ObjectOpenHashSet<>();
+    private static final @NotNull Class<? extends Mob>[] NIGHT_SPAWN_ENTITIES;
+
+    static {
         NIGHT_SPAWN_ENTITIES = new Class[] {
             MobSpider.class, MobZombie.class, MobSkeleton.class, MobZombieArmored.class
         };
     }
 
-    public SpawnerMobs()
-    {
-    }
-
-    private static ChunkPosition getRandomSpawningPointInChunk(World world, int chunkX, int chunkZ)
-    {
-        int newX = (chunkX * 16) + world.rand.nextInt(16);
-        int newY = world.rand.nextInt(world.getHeightBlocks());
-        int newZ = (chunkZ * 16) + world.rand.nextInt(16);
-        return new ChunkPosition(newX, newY, newZ);
+    private static @NotNull TilePosc getRandomSpawningPointInChunk(final @NotNull World world, final @NotNull ChunkPosc chunkPos) {
+        return new TilePos(
+            chunkPos,
+            new ChunkTilePos(
+                world.rand.nextInt(Chunk.CHUNK_SIZE_X),
+                world.rand.nextInt(world.getHeightBlocks()),
+                world.rand.nextInt(Chunk.CHUNK_SIZE_Z)
+            )
+        );
     }
 
-    public static int performSpawning(World world, SpawnerConfig spawnerConfig)
-    {
-        if(!spawnerConfig.canHostileSpawn(world) && !spawnerConfig.canPassiveSpawn(world)) { return 0; }
+    public static int performSpawning(final @NotNull World world, final @NotNull SpawnerConfig spawnerConfig) {
+        if (!spawnerConfig.canHostileSpawn(world) && !spawnerConfig.canPassiveSpawn(world)) {
+            return 0;
+        }
         ELIGIBLE_CHUNKS_FOR_SPAWNING.clear();
 
         for (int i = 0, playersSize = world.players.size(); i < playersSize; i++) {
-            Player player = world.players.get(i);
-            final int playerChunkX = MathHelper.floor(player.x / (double) Chunk.CHUNK_SIZE_X);
-            final int playerChunkZ = MathHelper.floor(player.z / (double) Chunk.CHUNK_SIZE_Z);
+            final @NotNull Player player = world.players.get(i);
+            final @NotNull ChunkPosc playerChunk = new ChunkPos(player);
             final byte spawnRadius = 8;
 
-            for (int dx = -spawnRadius; dx <= spawnRadius; ++dx) {
-                for (int dz = -spawnRadius; dz <= spawnRadius; ++dz) {
-                    if (world.isChunkLoaded(dx + playerChunkX, dz + playerChunkZ)) {
-                        ELIGIBLE_CHUNKS_FOR_SPAWNING.add(new ChunkPos(dx + playerChunkX, dz + playerChunkZ));
+            final @NotNull ChunkPos d = new ChunkPos();
+            for (d.x = -spawnRadius; d.x <= spawnRadius; d.x++) {
+                for (d.z = -spawnRadius; d.z <= spawnRadius; d.z++) {
+                    final @NotNull ChunkPos pos = new ChunkPos();
+                    if (world.isChunkLoaded(playerChunk.add(d.x, d.z, pos))) {
+                        ELIGIBLE_CHUNKS_FOR_SPAWNING.add(pos);
                     }
                 }
             }
         }
 
         int totalSpawned = 0;
-        final TilePos spawnPoint = world.getSpawnPoint();
-        final ChunkPos[] spawnChunks = new ChunkPos[3 * 3];
+        final @NotNull TilePos spawnPoint = world.getSpawnPoint();
+        final @NotNull ChunkPos @NotNull [] spawnChunks = new ChunkPos[3 * 3];
         for (int x = 0; x < 3; x++) {
             for (int z = 0; z < 3; z++) {
-                spawnChunks[x * 3 + z] = new ChunkPos((spawnPoint.x & 0xF) + (x - 1), (spawnPoint.z & 0xF) + (z - 1));
+                spawnChunks[x * 3 + z] = new ChunkPos(spawnPoint).add(x - 1, z - 1);
             }
         }
 
-
-        for (MobCategory creatureType : MobCategory.values()) {
-
+        for (final @NotNull MobCategory creatureType : MobCategory.values()) {
             if (creatureType.isPeaceful() && !spawnerConfig.canPassiveSpawn(world)) continue;
             if (!creatureType.isPeaceful() && !spawnerConfig.canHostileSpawn(world)) continue;
             if (world.countEntities(creatureType.getBaseClass()) > ((creatureType.getMaxCreaturesPerChunk() * ELIGIBLE_CHUNKS_FOR_SPAWNING.size()) / 256))
                 continue;
 
-            chunkLoop: for (ChunkPos chunk : ELIGIBLE_CHUNKS_FOR_SPAWNING) {
+            chunkLoop:
+            for (final @NotNull ChunkPos chunk : ELIGIBLE_CHUNKS_FOR_SPAWNING) {
                 boolean checkSpawnDist = false;
-                for (ChunkPos c : spawnChunks){
-                    if (c.equals(chunk)){
+                for (final @NotNull ChunkPos c : spawnChunks) {
+                    if (c.equals(chunk)) {
                         checkSpawnDist = true;
                         break;
                     }
                 }
 
-                if (!world.isChunkLoaded(chunk.x, chunk.z)) continue;
+                if (!world.isChunkLoaded(chunk)) continue;
 
-                final int blockX = chunk.x * Chunk.CHUNK_SIZE_X;
-                final int blockZ = chunk.z * Chunk.CHUNK_SIZE_Z;
-                final Biome biome = world.getBlockBiome(blockX, world.getHeightBlocks() - 1, blockZ);
-                final List<SpawnListEntry> spawnableList = biome.getSpawnableList(creatureType);
+                final @NotNull TilePos blockPos = new TilePos(chunk).add(0, world.getHeightBlocks() - 1, 0);
+                final @NotNull Biome biome = world.getBlockBiome(blockPos);
+                final @NotNull List<@NotNull SpawnListEntry> spawnableList = biome.getSpawnableList(creatureType);
 
-                if (spawnableList == null) continue;
                 if (spawnableList.isEmpty()) continue;
 
                 int totalSpawnRarity = 0;
 
-                SpawnListEntry spawnListEntry;
-                for (SpawnListEntry listEntry : spawnableList) {
+                for (final @NotNull SpawnListEntry listEntry : spawnableList) {
                     totalSpawnRarity += listEntry.spawnFrequency;
                 }
 
                 int calculatedSpawnChance = world.rand.nextInt(totalSpawnRarity);
-                spawnListEntry = spawnableList.get(0);
+                @NotNull SpawnListEntry spawnListEntry = spawnableList.get(0);
 
-                for (SpawnListEntry listEntry : spawnableList) {
+                for (final SpawnListEntry listEntry : spawnableList) {
                     calculatedSpawnChance -= listEntry.spawnFrequency;
                     if (calculatedSpawnChance < 0) {
                         spawnListEntry = listEntry;
@@ -133,33 +124,30 @@ public final class SpawnerMobs
                     }
                 }
 
-                EntityDispatcher.EntityDispatcherEntry<?> entry = EntityDispatcher.getInstance().entryForClass(spawnListEntry.entityClass);
+                final @Nullable EntityDispatcher.EntityDispatcherEntry<?> entry = EntityDispatcher.getInstance().entryForClass(spawnListEntry.entityClass);
                 if (entry == null || !spawnerConfig.canMobSpawn(entry.namespaceID)) continue;
 
-                final ChunkPosition pos = getRandomSpawningPointInChunk(world, chunk.x, chunk.z);
-                final int x = pos.x;
-                final int y = pos.y;
-                final int z = pos.z;
-                if (world.isBlockNormalCube(x, y, z) || world.getBlockMaterial(x, y, z) != creatureType.getSpawnMaterial())
+                final @NotNull TilePosc mobSpawnPos = getRandomSpawningPointInChunk(world, chunk);
+                if (world.isBlockNormalCube(mobSpawnPos) || world.getBlockMaterial(mobSpawnPos) != creatureType.getSpawnMaterial())
                     continue;
 
                 int countSpawned = 0;
 
                 final byte range = 6;
 
+                final @NotNull TilePos iPos = new TilePos();
                 for (int i = 0; i < 3; i++) {
-                    int ix = x;
-                    int iy = y;
-                    int iz = z;
+                    iPos.set(mobSpawnPos);
                     for (int spawnAttempt = 0; spawnAttempt < 4; ++spawnAttempt) {
-                        ix += world.rand.nextInt(range) - world.rand.nextInt(range);
-                        iy += world.rand.nextInt(2) - world.rand.nextInt(2);
-                        iz += world.rand.nextInt(range) - world.rand.nextInt(range);
-                        if (!world.isBlockLoaded(ix, iy, iz) || !canCreatureTypeSpawnAtLocation(creatureType, world, ix, iy, iz)) continue;
-
-                        final double dx = ix + 0.5D;
-                        final double dy = iy;
-                        final double dz = iz + 0.5D;
+                        iPos.x += world.rand.nextInt(range) - world.rand.nextInt(range);
+                        iPos.y += world.rand.nextInt(2) - world.rand.nextInt(2);
+                        iPos.z += world.rand.nextInt(range) - world.rand.nextInt(range);
+                        if (!world.isBlockLoaded(iPos) || !canCreatureTypeSpawnAtLocation(creatureType, world, iPos))
+                            continue;
+
+                        final double dx = iPos.x + 0.5D;
+                        final double dy = iPos.y;
+                        final double dz = iPos.z + 0.5D;
                         if (world.getClosestPlayer(dx, dy, dz, 24.0D) != null) continue;
 
                         // Forbid mob spawning in a 24 block radius around spawn
@@ -171,11 +159,14 @@ public final class SpawnerMobs
                             if (spawnDistanceSquared < 576.0F) continue;
                         }
 
-                        Mob mobToSpawn;
+                        final @Nullable Mob mobToSpawn;
                         try {
                             mobToSpawn = (Mob) EntityDispatcher.getInstance().createEntityInWorld(spawnListEntry.entityClass, world);
-                        } catch (Exception e) {
-                            LOGGER.error("Error spawning entity class '{}' class missing default constructor for World! Skipping spawn attempt!", spawnListEntry.entityClass.getSimpleName(), e);
+                        } catch (final Exception e) {
+                            LOGGER.error("Error spawning entity class '{}'! Skipping spawn attempt!", spawnListEntry.entityClass.getSimpleName(), e);
+                            return totalSpawned;
+                        }
+                        if (mobToSpawn == null) {
                             return totalSpawned;
                         }
 
@@ -197,18 +188,15 @@ public final class SpawnerMobs
         return totalSpawned;
     }
 
-    private static boolean canCreatureTypeSpawnAtLocation(MobCategory mobCategory, World world, int x, int y, int z)
-    {
-        if(mobCategory.getSpawnMaterial() == Material.water)
-        {
-            return world.getBlockMaterial(x, y, z).isLiquid() && !world.isBlockNormalCube(x, y + 1, z);
-        } else
-        {
-            return world.isBlockNormalCube(x, y - 1, z) && !world.isBlockNormalCube(x, y, z) && !world.getBlockMaterial(x, y, z).isLiquid();
+    private static boolean canCreatureTypeSpawnAtLocation(final @NotNull MobCategory mobCategory, final @NotNull World world, final @NotNull TilePosc tilePos) {
+        if (mobCategory.getSpawnMaterial() == Materials.WATER) {
+            return world.getBlockMaterial(tilePos).isLiquid() && !world.isBlockNormalCube(tilePos.up(new TilePos())) && world.getBlockData(tilePos) == 0;
+        } else {
+            return world.isBlockNormalCube(tilePos.down(new TilePos())) && !world.isBlockNormalCube(tilePos) && !world.getBlockMaterial(tilePos).isLiquid();
         }
     }
 
-    public static boolean isUnsafeToSleep(World world, Player player) {
+    public static boolean isUnsafeToSleep(final @NotNull World world, final @NotNull Player player) {
         if (!world.getGameRuleValue(GameRules.DO_NIGHTMARES)) {
             return false;
         }
@@ -220,59 +208,63 @@ public final class SpawnerMobs
             return false;
         }
 
-        Class<? extends Mob>[] entityClasses = NIGHT_SPAWN_ENTITIES;
+        final @NotNull Class<? extends Mob>[] entityClasses = NIGHT_SPAWN_ENTITIES;
         if (entityClasses != null && entityClasses.length != 0) {
-            boolean willSpawnEntity = false;
-            PathFinder pathFinder = new PathFinder(world);
+            final boolean willSpawnEntity = false;
+            final @NotNull PathFinder pathFinder = new PathFinder(world);
 
             // Make 20 attempts to find a path
             int i = 0;
             while (i < 20 && !willSpawnEntity) {
                 // Get a random location for the path start
-                int x = MathHelper.floor(player.x) + world.rand.nextInt(32) - world.rand.nextInt(32);
-                int z = MathHelper.floor(player.z) + world.rand.nextInt(32) - world.rand.nextInt(32);
-                int y = MathHelper.floor(player.y) + world.rand.nextInt(16) - world.rand.nextInt(16);
-                y = MathHelper.clamp(y, 1, world.getHeightBlocks());
-
-                int spawnY = y;
+                final @NotNull TilePosc initSpawnPos = new TilePos(
+                    MathHelper.floor(player.x) + world.rand.nextInt(32) - world.rand.nextInt(32),
+                    MathHelper.clamp(MathHelper.floor(player.y) + world.rand.nextInt(16) - world.rand.nextInt(16), 1, world.getHeightBlocks()),
+                    MathHelper.floor(player.z) + world.rand.nextInt(32) - world.rand.nextInt(32)
+                );
 
                 // Ensure we have enough space
-                while (spawnY > 2 && !world.isBlockNormalCube(x, spawnY - 1, z)) {
-                    spawnY--;
+                final @NotNull TilePos spawnPos = new TilePos(initSpawnPos.x(), initSpawnPos.y() - 1, initSpawnPos.z());
+                while (spawnPos.y > 2 && !world.isBlockNormalCube(spawnPos)) {
+                    spawnPos.y--;
                 }
 
                 // Make sure we're allowed to spawn in this Y coordinate
                 while (
-                        !canCreatureTypeSpawnAtLocation(MobCategory.monster, world, x, spawnY, z) &&
-                        spawnY < y + 16 &&
-                        spawnY < world.getHeightBlocks()
+                    !canCreatureTypeSpawnAtLocation(MobCategory.MONSTER, world, spawnPos) &&
+                        spawnPos.y < initSpawnPos.y() + 16 &&
+                        spawnPos.y < world.getHeightBlocks()
                 ) {
-                    spawnY++;
+                    spawnPos.y++;
                 }
 
-                if (spawnY < y + 16) {
-                    float entityX = x + 0.5f;
-                    float entityY = spawnY;
-                    float entityZ = z + 0.5f;
+                if (spawnPos.y < initSpawnPos.y() + 16) {
+                    final float entityX = spawnPos.x + 0.5f;
+                    final float entityY = spawnPos.y;
+                    final float entityZ = spawnPos.z + 0.5f;
 
-                    Mob entity;
-                    Class<? extends Mob> eClass = entityClasses[world.rand.nextInt(entityClasses.length)];
+                    final @Nullable Mob entity;
+                    final @NotNull Class<? extends Mob> eClass = entityClasses[world.rand.nextInt(entityClasses.length)];
                     try {
                         entity = EntityDispatcher.getInstance().createEntityInWorld(eClass, world);
-                    } catch (Exception e) {
+                    } catch (final Exception e) {
                         LOGGER.error("Exception instancing class '{}'!", eClass.getSimpleName(), e);
-                        return false;
+                        continue;
+                    }
+                    if (entity == null) {
+                        continue;
                     }
 
                     entity.moveTo(entityX, entityY, entityZ, world.rand.nextFloat() * 360.0f, 0.0f);
-                    if(entity.canSpawnHere())
-                    {
-                        Path pathEntity = pathFinder.findPath(entity, player, 32.0f);
-                        if(pathEntity != null && pathEntity.length > 1)
-                        {
-                            Node pathPoint = pathEntity.last();
-                            boolean isCollisionFree = world.checkBlockCollisionBetweenPoints(Vec3.fromPool(player.x, player.y + 1.5f, player.z), Vec3.fromPool(pathPoint.x, pathPoint.y + 1.5f, pathPoint.z)) == null;
-                            if(Math.abs(pathPoint.x + 0.5f - player.x) < 1.5 && Math.abs(pathPoint.z + 0.5f - player.z) < 1.5 && Math.abs(pathPoint.y + 0.5f - player.y) < 1.5 && isCollisionFree) {
+                    if (entity.canSpawnHere()) {
+                        final @Nullable Path entityPath = pathFinder.findPath(entity, player, 32.0f);
+                        if (entityPath != null && entityPath.length > 1) {
+                            final @Nullable Node pathPoint = entityPath.last();
+                            if (pathPoint == null) {
+                                continue;
+                            }
+                            final boolean isCollisionFree = world.checkBlockCollisionBetweenPoints(new Vector3d(player.x, player.y + 1.5f, player.z), new Vector3d(pathPoint.x, pathPoint.y + 1.5f, pathPoint.z)) == null;
+                            if (Math.abs(pathPoint.x + 0.5f - player.x) < 1.5 && Math.abs(pathPoint.z + 0.5f - player.z) < 1.5 && Math.abs(pathPoint.y + 0.5f - player.y) < 1.5 && isCollisionFree) {
                                 return true;
                             }
                         }
@@ -286,107 +278,101 @@ public final class SpawnerMobs
         return false;
     }
 
-	public static boolean performSleepSpawning(World world, List<Player> list)
-    {
-        if (!world.getGameRuleValue(GameRules.DO_NIGHTMARES))
-        {
+    public static boolean performSleepSpawning(final @NotNull World world, final @NotNull List<@NotNull Player> list) {
+        if (!world.getGameRuleValue(GameRules.DO_NIGHTMARES)) {
             return false;
         }
-		boolean spawnedEntity = false;
-		PathFinder pathFinder = new PathFinder(world);
+        boolean spawnedEntity = false;
+        final @NotNull PathFinder pathFinder = new PathFinder(world);
 
         // For each player in the player list
-		for (Player player : list)
-        {
+        for (final @NotNull Player player : list) {
             // Ignore conditions where monsters shouldn't spawn
-			if (!player.isPlayerSleeping())
-            {
+            if (!player.isPlayerSleeping()) {
                 continue;
             }
-            if (player.getGamemode().isPlayerInvulnerable())
-            {
+            if (player.getGamemode().isPlayerInvulnerable()) {
                 continue;
             }
 
-			Class<? extends Mob>[] entityClasses = NIGHT_SPAWN_ENTITIES;
-			if (entityClasses != null && entityClasses.length != 0)
-            {
-				boolean spawnedEntityForPlayer = false;
+            final @NotNull Class<? extends Mob>[] entityClasses = NIGHT_SPAWN_ENTITIES;
+            if (entityClasses != null && entityClasses.length != 0) {
+                boolean spawnedEntityForPlayer = false;
 
                 // Make 20 attempts to spawn a monster that can path
-				int i = 0;
-				while (i < 20 && !spawnedEntityForPlayer)
-                {
-                    // Get a random location for the monster to spawn
-					int x = MathHelper.floor(player.x) + world.rand.nextInt(32) - world.rand.nextInt(32);
-					int z = MathHelper.floor(player.z) + world.rand.nextInt(32) - world.rand.nextInt(32);
-					int y = MathHelper.floor(player.y) + world.rand.nextInt(16) - world.rand.nextInt(16);
-					y = MathHelper.clamp(y, 1, world.getHeightBlocks());
-					
-					int spawnY = y;
-
-                    // Ensure we spawn in an acceptable space
-					while(spawnY > 2 && !world.isBlockNormalCube(x, spawnY - 1, z))
-                    {
-                        spawnY--;
+                int i = 0;
+                while (i < 20 && !spawnedEntityForPlayer) {
+                    // Get a random location for the path start
+                    final @NotNull TilePosc initSpawnPos = new TilePos(
+                        MathHelper.floor(player.x) + world.rand.nextInt(32) - world.rand.nextInt(32),
+                        MathHelper.clamp(MathHelper.floor(player.y) + world.rand.nextInt(16) - world.rand.nextInt(16), 1, world.getHeightBlocks()),
+                        MathHelper.floor(player.z) + world.rand.nextInt(32) - world.rand.nextInt(32)
+                    );
+
+                    // Ensure we have enough space
+                    final @NotNull TilePos spawnPos = new TilePos(initSpawnPos.x(), initSpawnPos.y() - 1, initSpawnPos.z());
+                    while (spawnPos.y > 2 && !world.isBlockNormalCube(spawnPos)) {
+                        spawnPos.y--;
                     }
 
                     // Make sure we're allowed to spawn in this Y coordinate
-					while(
-                            !canCreatureTypeSpawnAtLocation(MobCategory.monster, world, x, spawnY, z) &&
-                            spawnY < y + 16 &&
-                            spawnY < world.getHeightBlocks()
-                    )
-                    {
-                        spawnY++;
+                    while (
+                        !canCreatureTypeSpawnAtLocation(MobCategory.MONSTER, world, spawnPos) &&
+                            spawnPos.y < initSpawnPos.y() + 16 &&
+                            spawnPos.y < world.getHeightBlocks()
+                    ) {
+                        spawnPos.y++;
                     }
 
-                    if (spawnY < y + 16) {
-						float entityX = x + 0.5f;
-						float entityY = spawnY;
-						float entityZ = z + 0.5f;
-
-						Mob entity;
-                        Class<? extends Mob> eClass= entityClasses[world.rand.nextInt(entityClasses.length)];
-						try
-                        {
-							entity = EntityDispatcher.getInstance().createEntityInWorld(eClass, world);
-						}
-                        catch (Exception e)
-                        {
+                    if (spawnPos.y < initSpawnPos.y() + 16) {
+                        final float entityX = spawnPos.x + 0.5f;
+                        final float entityY = spawnPos.y;
+                        final float entityZ = spawnPos.z + 0.5f;
+
+                        final @Nullable Mob entity;
+                        final @NotNull Class<? extends Mob> eClass = entityClasses[world.rand.nextInt(entityClasses.length)];
+                        try {
+                            entity = EntityDispatcher.getInstance().createEntityInWorld(eClass, world);
+                        } catch (final Exception e) {
                             LOGGER.error("Exception instancing class '{}'!", eClass.getSimpleName(), e);
-							return spawnedEntity;
-						}
-
-						entity.moveTo(entityX, entityY, entityZ, world.rand.nextFloat() * 360.0f, 0.0f);
-						if(entity.canSpawnHere())
-                        {
-							Path pathEntity = pathFinder.findPath(entity, player, 32.0f);
-							if(pathEntity != null && pathEntity.length > 1)
-                            {
-								Node pathPoint = pathEntity.last();
-                                boolean isCollisionFree = world.checkBlockCollisionBetweenPoints(Vec3.fromPool(player.x, player.y + 1.5f, player.z), Vec3.fromPool(pathPoint.x, pathPoint.y + 1.5f, pathPoint.z)) == null;
-								if(Math.abs(pathPoint.x + 0.5f - player.x) < 1.5 && Math.abs(pathPoint.z + 0.5f - player.z) < 1.5 && Math.abs(pathPoint.y + 0.5f - player.y) < 1.5 && isCollisionFree) {
-									TilePos emptyPos = BlockLogicBed.getNearestEmptyTilePos(world, new TilePos(player), 1);
-									if(emptyPos == null) {
-										emptyPos = new TilePos(x, spawnY + 1, z);
-									}
-									entity.moveTo(emptyPos.x + 0.5f, emptyPos.y, emptyPos.z + 0.5f, 0.0f, 0.0f);
-									entity.spawnInit();
-									world.entityJoinedWorld(entity);
-									player.wakeUpPlayer(true, false);
-									world.playBlockEvent(null, LevelListener.EVENT_BLOCK_BREAK, (int) player.x, (int) player.y - 1, (int) player.z, world.getBlockId((int) player.x, (int) player.y - 1, (int) player.z));
-									entity.playLivingSound();
-									spawnedEntity = true;
-									spawnedEntityForPlayer = true;
-								}
-							}
-						}
-					}
+                            continue;
+                        }
+                        if (entity == null) {
+                            continue;
+                        }
+
+                        entity.moveTo(entityX, entityY, entityZ, world.rand.nextFloat() * 360.0f, 0.0f);
+                        if (entity.canSpawnHere()) {
+                            final @Nullable Path pathEntity = pathFinder.findPath(entity, player, 32.0f);
+                            if (pathEntity != null && pathEntity.length > 1) {
+                                final @Nullable Node pathPoint = pathEntity.last();
+                                if (pathPoint == null) {
+                                    continue;
+                                }
+
+                                final boolean isCollisionFree = world.checkBlockCollisionBetweenPoints(new Vector3d(player.x, player.y + 1.5f, player.z), new Vector3d(pathPoint.x, pathPoint.y + 1.5f, pathPoint.z)) == null;
+                                if (Math.abs(pathPoint.x + 0.5f - player.x) < 1.5 && Math.abs(pathPoint.z + 0.5f - player.z) < 1.5 && Math.abs(pathPoint.y + 0.5f - player.y) < 1.5 && isCollisionFree) {
+                                    TilePos emptyPos = BlockLogicBed.getNearestEmptyTilePos(world, new TilePos(player), 1);
+                                    if (emptyPos == null) {
+                                        emptyPos = spawnPos.up(new TilePos());
+                                    }
+                                    entity.moveTo(emptyPos.x + 0.5f, emptyPos.y, emptyPos.z + 0.5f, 0.0f, 0.0f);
+                                    entity.spawnInit();
+                                    world.entityJoinedWorld(entity);
+                                    player.wakeUpPlayer(true, false);
+                                    final @NotNull TilePos playerDown = new TilePos(player).down();
+                                    world.playBlockEvent(null, playerDown, LevelListener.EVENT_BLOCK_BREAK, world.getBlockId(playerDown));
+                                    entity.playLivingSound();
+                                    spawnedEntity = true;
+                                    spawnedEntityForPlayer = true;
+                                }
+                            }
+                        }
+                    }
                     i++;
-				}
-			}
-		}
-		return spawnedEntity;
-	}
+                }
+            }
+        }
+        return spawnedEntity;
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/World.java b/game/core/src/main/java/net/minecraft/core/world/World.java
index 1f744bec9..b1373963b 100644
--- a/game/core/src/main/java/net/minecraft/core/world/World.java
+++ b/game/core/src/main/java/net/minecraft/core/world/World.java
@@ -9,6 +9,7 @@ import com.mojang.logging.LogUtils;
 import it.unimi.dsi.fastutil.objects.ObjectArrayList;
 import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
 import net.minecraft.core.block.entity.TileEntity;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.support.ISupport;
 import net.minecraft.core.block.support.PartialSupport;
 import net.minecraft.core.current.wire.WireHandler;
@@ -20,6 +21,7 @@ import net.minecraft.core.Global;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.net.command.CommandManager;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.NextTickListEntry;
 import net.minecraft.core.block.Block;
@@ -36,8 +38,6 @@ import net.minecraft.core.sound.BlockSound;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
-import net.minecraft.core.util.phys.AABB;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.biome.provider.BiomeProvider;
@@ -54,7 +54,9 @@ import net.minecraft.core.world.lighting.LightingEngineLegacy;
 import net.minecraft.core.world.pathfinder.Path;
 import net.minecraft.core.world.pathfinder.PathFinder;
 import net.minecraft.core.world.pos.ChunkPos;
+import net.minecraft.core.world.pos.ChunkTilePos;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.save.DimensionData;
 import net.minecraft.core.world.save.LevelData;
 import net.minecraft.core.world.save.LevelStorage;
@@ -69,6 +71,10 @@ import net.minecraft.core.world.weather.WeatherManager;
 import net.minecraft.core.world.weather.Weathers;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.slf4j.Logger;
 
 public class World implements MutableWorldSource {
@@ -89,10 +95,11 @@ public class World implements MutableWorldSource {
     public final @NotNull List<@NotNull Entity> entities = new ObjectArrayList<>();
     private final @NotNull List<@NotNull Entity> entitiesToRemove = new ObjectArrayList<>();
     private final @NotNull TreeSet<@NotNull NextTickListEntry> tickNextTickList = new TreeSet<>();
+    private final @NotNull Set<@NotNull NextTickListEntry> tickNextTickSet = new HashSet<>();
     public final @NotNull List<@NotNull TileEntity> tileEntityList = new ObjectArrayList<>();
     public final @NotNull List<@NotNull Player> players = new ObjectArrayList<>();
     public final @NotNull List<@NotNull Entity> weatherEffects = new ObjectArrayList<>();
-    public final @NotNull List<@NotNull AABB> collidingBoundingBoxes = new ObjectArrayList<>();
+    public final @NotNull List<@NotNull AABBdc> collidingBoundingBoxes = new ObjectArrayList<>();
     public final @NotNull List<@NotNull LevelListener> listeners = new ObjectArrayList<>();
     private final @NotNull Set<@NotNull ChunkCoordinate> positionsToUpdate = new ObjectOpenHashSet<>();
     private final @NotNull List<@NotNull Entity> entityBuffer = new ObjectArrayList<>();
@@ -126,7 +133,7 @@ public class World implements MutableWorldSource {
     public int sleepPercent = 100;
     private long runtime = 0;
     public int dayCountLastTick;
-    
+
     public BiomeProvider biomeProvider;
     public AuroraProvider auroraProvider;
     public SeasonManager seasonManager;
@@ -136,27 +143,21 @@ public class World implements MutableWorldSource {
     private final @NotNull WireHandler wireHandler;
 
     //Usually called when a world is loaded or generated (Singleplayer & Server)
-    public World(LevelStorage saveHandler, String name, long seed, Dimension dimension, WorldType worldType)
-    {
+    public World(LevelStorage saveHandler, String name, long seed, Dimension dimension, WorldType worldType) {
         this.saveHandler = saveHandler;
         this.savedDataStorage = new SavedDataStorage(saveHandler);
         this.levelData = saveHandler.getLevelData();
 
-        this.isNewWorld = levelData == null;
+        this.isNewWorld = this.levelData == null;
 
         // Attempt to determine the correct dimension for this world
-        if(dimension != null)
-        {
+        if (dimension != null) {
             // Provided dimension
             this.dimension = dimension;
-        }
-        else if(levelData != null)
-        {
+        } else if (this.levelData != null) {
             // Dimension from level data
-            this.dimension = Dimension.getDimensionList().get(levelData.getDimension());
-        }
-        else
-        {
+            this.dimension = Dimension.getDimensionList().get(this.levelData.getDimension());
+        } else {
             // Default dimension
             this.dimension = Dimension.getDimensionList().get(0);
         }
@@ -164,54 +165,44 @@ public class World implements MutableWorldSource {
         this.dimensionData = saveHandler.getDimensionData(this.dimension.id);
 
         // Attempt to determine the correct world type for this world
-        if (worldType != null)
-        {
+        if (worldType != null) {
             // Provided world type
             this.worldType = worldType;
-        }
-        else if (dimensionData != null)
-        {
+        } else if (this.dimensionData != null) {
             // World type from dimension data
-            this.worldType = dimensionData.getWorldType();
-        }
-        else
-        {
+            this.worldType = this.dimensionData.getWorldType();
+        } else {
             // Default world type
             this.worldType = this.dimension.defaultWorldType;
         }
 
         boolean isNewWorld = false;
-        if(levelData == null)
-        {
-            levelData = new LevelData(seed, name);
+        if (this.levelData == null) {
+            this.levelData = new LevelData(seed, name);
             isNewWorld = true;
         }
 
-        if (dimensionData == null)
-        {
-            dimensionData = new DimensionData(this.worldType);
-            weatherManager = new WeatherManager(this);
-        }
-        else
-        {
-            weatherManager = new WeatherManager(this,
-                dimensionData.getCurrentWeather(),
-                dimensionData.getNextWeather(),
-                dimensionData.getWeatherDuration(),
-                dimensionData.getWeatherPower()
+        if (this.dimensionData == null) {
+            this.dimensionData = new DimensionData(this.worldType);
+            this.weatherManager = new WeatherManager(this);
+        } else {
+            this.weatherManager = new WeatherManager(this,
+                this.dimensionData.getCurrentWeather(),
+                this.dimensionData.getNextWeather(),
+                this.dimensionData.getWeatherDuration(),
+                this.dimensionData.getWeatherPower()
             );
         }
 
-        chunkProvider = createChunkProvider();
+        this.chunkProvider = createChunkProvider();
 
-        auroraProvider = new AuroraProvider(this, this.levelData.getRandomSeed());
+        this.auroraProvider = new AuroraProvider(this, this.levelData.getRandomSeed());
 
-        seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
+        this.seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
 
-        biomeProvider = this.worldType.createBiomeProvider(this);
-        
-        if(isNewWorld)
-        {
+        this.biomeProvider = this.worldType.createBiomeProvider(this);
+
+        if (isNewWorld) {
             this.worldType.onWorldCreation(this);
             getInitialSpawnLocation();
         }
@@ -224,42 +215,38 @@ public class World implements MutableWorldSource {
     }
 
     //Usually called when going through portals
-    public World(World world, Dimension dimension)
-    {
-        lockTimestamp = world.lockTimestamp;
-        saveHandler = world.saveHandler;
+    public World(World world, Dimension dimension) {
+        this.lockTimestamp = world.lockTimestamp;
+        this.saveHandler = world.saveHandler;
 
-        levelData = new LevelData(world.levelData);
+        this.levelData = new LevelData(world.levelData);
 
-        dimensionData = world.saveHandler.getDimensionData(dimension.id);
-        if (dimensionData == null)
-        {
-            dimensionData = new DimensionData(dimension.defaultWorldType);
-            weatherManager = new WeatherManager(this);
-        }
-        else
-        {
-            weatherManager = new WeatherManager(this,
-                dimensionData.getCurrentWeather(),
-                dimensionData.getNextWeather(),
-                dimensionData.getWeatherDuration(),
-                dimensionData.getWeatherPower()
+        this.dimensionData = world.saveHandler.getDimensionData(dimension.id);
+        if (this.dimensionData == null) {
+            this.dimensionData = new DimensionData(dimension.defaultWorldType);
+            this.weatherManager = new WeatherManager(this);
+        } else {
+            this.weatherManager = new WeatherManager(this,
+                this.dimensionData.getCurrentWeather(),
+                this.dimensionData.getNextWeather(),
+                this.dimensionData.getWeatherDuration(),
+                this.dimensionData.getWeatherPower()
             );
         }
 
         // Set up info from dimension data
-        worldType = dimensionData.getWorldType();
+        this.worldType = this.dimensionData.getWorldType();
 
-        savedDataStorage = new SavedDataStorage(saveHandler);
+        this.savedDataStorage = new SavedDataStorage(this.saveHandler);
         this.dimension = dimension;
-        chunkProvider = createChunkProvider();
-        seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
+        this.chunkProvider = createChunkProvider();
+        this.seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
 
-        biomeProvider = this.worldType.createBiomeProvider(this);
+        this.biomeProvider = this.worldType.createBiomeProvider(this);
 
         updateSkyBrightness();
 
-        auroraProvider = new AuroraProvider(this, this.getRandomSeed());
+        this.auroraProvider = new AuroraProvider(this, this.getRandomSeed());
 
         this.commandManager = new CommandManager(isServer);
         this.commandManager.init();
@@ -268,23 +255,22 @@ public class World implements MutableWorldSource {
     }
 
     //Usually called when joining a server
-    public World(LevelStorage saveHandler, String name, Dimension dimension, WorldType worldType, long seed)
-    {
+    public World(LevelStorage saveHandler, String name, Dimension dimension, WorldType worldType, long seed) {
         this.saveHandler = saveHandler;
-        levelData = new LevelData(seed, name);
+        this.levelData = new LevelData(seed, name);
         this.dimension = dimension;
-        dimensionData = new DimensionData(worldType);
+        this.dimensionData = new DimensionData(worldType);
         this.worldType = worldType;
-        savedDataStorage = new SavedDataStorage(saveHandler);
-        chunkProvider = createChunkProvider();
-        seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
+        this.savedDataStorage = new SavedDataStorage(saveHandler);
+        this.chunkProvider = createChunkProvider();
+        this.seasonManager = SeasonManager.fromConfig(this, this.worldType.getSeasonConfig());
         updateSkyBrightness();
 
         this.weatherManager = new WeatherManager(this);
 
-        auroraProvider = new AuroraProvider(this, this.levelData.getRandomSeed());
+        this.auroraProvider = new AuroraProvider(this, this.levelData.getRandomSeed());
 
-        biomeProvider = this.worldType.createBiomeProvider(this);
+        this.biomeProvider = this.worldType.createBiomeProvider(this);
 
         this.commandManager = new CommandManager(isServer);
         this.commandManager.init();
@@ -292,17 +278,16 @@ public class World implements MutableWorldSource {
         this.wireHandler = new WireHandler(this);
     }
 
-    public World(){
+    public World() {
         this.wireHandler = new WireHandler(this);
     }
 
-    public <T> T getGameRuleValue(GameRule<T> gameRule)
-    {
-        return levelData.getGameRules().getValue(gameRule);
+    public <T> T getGameRuleValue(GameRule<T> gameRule) {
+        return this.levelData.getGameRules().getValue(gameRule);
     }
 
     public SpawnerConfig getSpawnerConfig() {
-        return levelData.getSpawnerConfig();
+        return this.levelData.getSpawnerConfig();
     }
 
     @Override
@@ -310,177 +295,161 @@ public class World implements MutableWorldSource {
         return Chunk.CHUNK_SECTIONS * ChunkSection.SECTION_SIZE_Y;
     }
 
-    public BiomeProvider getBiomeProvider()
-    {
-        return biomeProvider;
+    public BiomeProvider getBiomeProvider() {
+        return this.biomeProvider;
     }
 
     public CommandManager getCommandManager() {
-        return commandManager;
+        return this.commandManager;
     }
 
     public @NotNull WireHandler getWireHandler() {
         return this.wireHandler;
     }
 
-    protected IChunkProvider createChunkProvider()
-    {
-        IChunkLoader chunkLoader = saveHandler.getChunkLoader(dimension);
+    protected IChunkProvider createChunkProvider() {
+        IChunkLoader chunkLoader = this.saveHandler.getChunkLoader(this.dimension);
         return accessor.createChunkProvider(this, chunkLoader);
     }
 
-    protected void getInitialSpawnLocation()
-    {
-        findingSpawnPoint = true;
+    protected void getInitialSpawnLocation() {
+        this.findingSpawnPoint = true;
         getWorldType().getInitialSpawnLocation(this);
-        findingSpawnPoint = false;
+        this.findingSpawnPoint = false;
     }
 
-    public void getRespawnLocation()
-    {
+    public void getRespawnLocation() {
         getWorldType().getRespawnLocation(this);
     }
 
-    public int getTopBlock(int x, int z)
-    {
-        int y = levelData.getSpawnY() - 1;
-        while (!isAirBlock(x, y + 1, z))
-        {
+    public int getTopBlock(int x, int z) {
+        int y = this.levelData.getSpawnY() - 1;
+        while (!isAirBlock(x, y + 1, z)) {
             y++;
         }
         return getBlockId(x, y, z);
     }
 
-    public void spawnPlayerWithLoadedChunks(Player player, boolean respawning)
-    {
-        try
-        {
+    public void spawnPlayerWithLoadedChunks(Player player, boolean respawning) {
+        try {
             if (!respawning) {
-                PlayerIO playerIO = saveHandler.getPlayerFileData();
+                PlayerIO playerIO = this.saveHandler.getPlayerFileData();
                 if (playerIO != null) {
                     playerIO.load(player);
                 }
             }
-            int chunkX = MathHelper.floor_float((int)player.x) / Chunk.CHUNK_SIZE_X;
-            int chunkZ = MathHelper.floor_float((int)player.z) / Chunk.CHUNK_SIZE_Z;
-            chunkProvider.setCurrentChunkOver(chunkX, chunkZ);
+            int chunkX = MathHelper.floor_float((int) player.x) / Chunk.CHUNK_SIZE_X;
+            int chunkZ = MathHelper.floor_float((int) player.z) / Chunk.CHUNK_SIZE_Z;
+            this.chunkProvider.setCurrentChunkOver(chunkX, chunkZ);
             entityJoinedWorld(player);
-        }
-        catch(Exception e)
-        {
+        } catch (Exception e) {
             LOGGER.error("Failed to spawn player with loaded chunks!", e);
         }
     }
 
-    public void saveWorld(boolean saveImmediately, ProgressListener progressUpdate, boolean saveLevelData)
-    {
-        if(!chunkProvider.canSave())
-        {
+    public void saveWorld(boolean saveImmediately, ProgressListener progressUpdate, boolean saveLevelData) {
+        if (!this.chunkProvider.canSave()) {
             return;
         }
 
-        if (saveLevelData){
-            if(progressUpdate != null)
-            {
+        if (saveLevelData) {
+            if (progressUpdate != null) {
                 progressUpdate.progressStart("Saving level data");
             }
 
             saveWorldData();
         }
-        
-        if(progressUpdate != null)
-        {
+
+        if (progressUpdate != null) {
             progressUpdate.progressStage("Saving chunks");
         }
-        chunkProvider.saveChunks(saveImmediately, progressUpdate);
+        this.chunkProvider.saveChunks(saveImmediately, progressUpdate);
 
-        if(progressUpdate != null)
-        {
+        if (progressUpdate != null) {
             progressUpdate.progressStop();
         }
     }
 
-    private void saveWorldData()
-    {
+    private void saveWorldData() {
         checkSessionLock();
-        saveHandler.saveLevelDataAndPlayerData(levelData, players);
-        saveHandler.saveDimensionData(this.dimension.id, dimensionData);
-        savedDataStorage.save();
+        this.saveHandler.saveLevelDataAndPlayerData(this.levelData, this.players);
+        this.saveHandler.saveDimensionData(this.dimension.id, this.dimensionData);
+        this.savedDataStorage.save();
     }
 
     public boolean pauseScreenSave(int i) {
-        if(!this.chunkProvider.canSave()) {
+        if (!this.chunkProvider.canSave()) {
             return true;
         }
-        if(i == 0) {
+        if (i == 0) {
             saveWorldData();
         }
         return this.chunkProvider.saveChunks(false, null);
     }
 
-    public @Nullable Weather getCurrentWeather()
-    {
-        return (weatherManager == null) ? null : weatherManager.getCurrentWeather();
+    public @Nullable Weather getCurrentWeather() {
+        return (this.weatherManager == null) ? null : this.weatherManager.getCurrentWeather();
     }
 
     @Override
-    public int getBlockId(final @NotNull TilePos tilePos) {
+    public int getBlockId(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return 0;
         } else {
-            return this.getChunk(tilePos).getBlockId(tilePos.toChunkTilePos());
+            return this.getChunk(tilePos).getBlockId(new ChunkTilePos(tilePos));
         }
     }
 
     @Override
-    public @Nullable Block<?> getBlock(final @NotNull TilePos tilePos) {
+    public @Nullable Block<?> getBlock(final @NotNull TilePosc tilePos) {
         return Blocks.getBlock(this.getBlockId(tilePos));
     }
 
     @Override
-    public double getBlockTemperature(final @NotNull TilePos tilePos) {
-        if (tilePos.x < MIN_BLOCK_X || tilePos.z < MIN_BLOCK_Z || tilePos.x > MAX_BLOCK_X || tilePos.z > MAX_BLOCK_Z) {
+    public double getBlockTemperature(final @NotNull TilePosc tilePos) {
+        if (tilePos.x() < MIN_BLOCK_X || tilePos.z() < MIN_BLOCK_Z || tilePos.x() > MAX_BLOCK_X || tilePos.z() > MAX_BLOCK_Z) {
             return 0;
         } else {
-            final int chunkX = Math.floorDiv(tilePos.x, Chunk.CHUNK_SIZE_X);
-            final int chunkZ = Math.floorDiv(tilePos.z, Chunk.CHUNK_SIZE_Z);
+            final int chunkX = Math.floorDiv(tilePos.x(), Chunk.CHUNK_SIZE_X);
+            final int chunkZ = Math.floorDiv(tilePos.z(), Chunk.CHUNK_SIZE_Z);
             double temperature = Double.NEGATIVE_INFINITY;
             @Nullable Chunk chunk = null;
 
             if (this.isChunkLoaded(chunkX, chunkZ)) {
                 chunk = this.getChunkFromChunkCoords(chunkX, chunkZ);
-                temperature = chunk.getBlockTemperature(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+                temperature = chunk.getBlockTemperature(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
             }
 
             if (temperature == Double.NEGATIVE_INFINITY) {
-                temperature = getBiomeProvider().getTemperature(tilePos.x, tilePos.z);
+                temperature = getBiomeProvider().getTemperature(tilePos.x(), tilePos.z());
                 if (chunk != null) {
-                    chunk.setBlockTemperature(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1), temperature);
+                    chunk.setBlockTemperature(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1), temperature);
                 }
             }
 
             return temperature;
         }
     }
+
     @Override
-    public double getBlockHumidity(final @NotNull TilePos tilePos) {
-        if (tilePos.x < MIN_BLOCK_X || tilePos.z < MIN_BLOCK_Z || tilePos.x > MAX_BLOCK_X || tilePos.z > MAX_BLOCK_Z) {
+    public double getBlockHumidity(final @NotNull TilePosc tilePos) {
+        if (tilePos.x() < MIN_BLOCK_X || tilePos.z() < MIN_BLOCK_Z || tilePos.x() > MAX_BLOCK_X || tilePos.z() > MAX_BLOCK_Z) {
             return 0;
         } else {
-            final int chunkX = Math.floorDiv(tilePos.x, Chunk.CHUNK_SIZE_X);
-            final int chunkZ = Math.floorDiv(tilePos.z, Chunk.CHUNK_SIZE_Z);
+            final int chunkX = Math.floorDiv(tilePos.x(), Chunk.CHUNK_SIZE_X);
+            final int chunkZ = Math.floorDiv(tilePos.z(), Chunk.CHUNK_SIZE_Z);
             double humidity = Double.NEGATIVE_INFINITY;
             @Nullable Chunk chunk = null;
 
             if (this.isChunkLoaded(chunkX, chunkZ)) {
                 chunk = this.getChunkFromChunkCoords(chunkX, chunkZ);
-                humidity = chunk.getBlockHumidity(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+                humidity = chunk.getBlockHumidity(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
             }
 
             if (humidity == Double.NEGATIVE_INFINITY) {
-                humidity = this.getBiomeProvider().getHumidity(tilePos.x, tilePos.z);
+                humidity = this.getBiomeProvider().getHumidity(tilePos.x(), tilePos.z());
                 if (chunk != null) {
-                    chunk.setBlockHumidity(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1), humidity);
+                    chunk.setBlockHumidity(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1), humidity);
                 }
             }
 
@@ -494,24 +463,24 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public double getBlockVariety(final @NotNull TilePos tilePos) {
-        if (tilePos.x < MIN_BLOCK_X || tilePos.z < MIN_BLOCK_Z || tilePos.x > MAX_BLOCK_X || tilePos.z > MAX_BLOCK_Z) {
+    public double getBlockVariety(final @NotNull TilePosc tilePos) {
+        if (tilePos.x() < MIN_BLOCK_X || tilePos.z() < MIN_BLOCK_Z || tilePos.x() > MAX_BLOCK_X || tilePos.z() > MAX_BLOCK_Z) {
             return 0;
         } else {
-            final int chunkX = Math.floorDiv(tilePos.x, Chunk.CHUNK_SIZE_X);
-            final int chunkZ = Math.floorDiv(tilePos.z, Chunk.CHUNK_SIZE_Z);
+            final int chunkX = Math.floorDiv(tilePos.x(), Chunk.CHUNK_SIZE_X);
+            final int chunkZ = Math.floorDiv(tilePos.z(), Chunk.CHUNK_SIZE_Z);
             double variety = Double.NEGATIVE_INFINITY;
             @Nullable Chunk chunk = null;
 
             if (this.isChunkLoaded(chunkX, chunkZ)) {
                 chunk = this.getChunkFromChunkCoords(chunkX, chunkZ);
-                variety = chunk.getBlockVariety(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+                variety = chunk.getBlockVariety(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
             }
 
             if (variety == Double.NEGATIVE_INFINITY) {
-                variety = this.getBiomeProvider().getVariety(tilePos.x, tilePos.z);
+                variety = this.getBiomeProvider().getVariety(tilePos.x(), tilePos.z());
                 if (chunk != null) {
-                    chunk.setBlockVariety(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.z & (Chunk.CHUNK_SIZE_Z - 1), variety);
+                    chunk.setBlockVariety(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1), variety);
                 }
             }
 
@@ -520,25 +489,24 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public @NotNull Biome getBlockBiome(final @NotNull TilePos tilePos)
-    {
+    public @NotNull Biome getBlockBiome(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return Biomes.OVERWORLD_PLAINS;
         } else {
-            final int chunkX = Math.floorDiv(tilePos.x, Chunk.CHUNK_SIZE_X);
-            final int chunkZ = Math.floorDiv(tilePos.z, Chunk.CHUNK_SIZE_Z);
+            final int chunkX = Math.floorDiv(tilePos.x(), Chunk.CHUNK_SIZE_X);
+            final int chunkZ = Math.floorDiv(tilePos.z(), Chunk.CHUNK_SIZE_Z);
             @Nullable Biome biome = null;
             @Nullable Chunk chunk = null;
 
             if (this.isChunkLoaded(chunkX, chunkZ)) {
                 chunk = this.getChunkFromChunkCoords(chunkX, chunkZ);
-                biome = chunk.getBlockBiome(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+                biome = chunk.getBlockBiome(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
             }
 
             if (biome == null) {
-                biome = this.getBiomeProvider().getBiome(tilePos.x, tilePos.y, tilePos.z);
+                biome = this.getBiomeProvider().getBiome(tilePos.x(), tilePos.y(), tilePos.z());
                 if (chunk != null) {
-                    chunk.setBlockBiome(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1), biome);
+                    chunk.setBlockBiome(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1), biome);
                 }
             }
 
@@ -548,12 +516,11 @@ public class World implements MutableWorldSource {
         }
     }
 
-    public boolean getBlockLitInteriorSurface(final @NotNull TilePos tilePos)
-    {
+    public boolean getBlockLitInteriorSurface(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return true;
         } else {
-            return Block.getIsLitInteriorSurface(this, tilePos.x, tilePos.y, tilePos.z);
+            return Block.getIsLitInteriorSurface(this, tilePos);
         }
     }
 
@@ -562,7 +529,7 @@ public class World implements MutableWorldSource {
         return this.getBlockLitInteriorSurface(new TilePos(x, y, z));
     }
 
-    public boolean isAirBlock(final @NotNull TilePos tilePos) {
+    public boolean isAirBlock(final @NotNull TilePosc tilePos) {
         return this.getBlockId(tilePos) == 0;
     }
 
@@ -571,11 +538,11 @@ public class World implements MutableWorldSource {
         return this.isAirBlock(new TilePos(x, y, z));
     }
 
-    public boolean isBlockLoaded(final @NotNull TilePos tilePos) {
+    public boolean isBlockLoaded(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return false;
         } else {
-            return this.isChunkLoaded(tilePos.toChunkPos());
+            return this.isChunkLoaded(new ChunkPos(tilePos));
         }
     }
 
@@ -584,8 +551,8 @@ public class World implements MutableWorldSource {
         return this.isBlockLoaded(new TilePos(x, y, z));
     }
 
-    public boolean areBlocksLoaded(final @NotNull TilePos tilePos, final int range) {
-        return this.areBlocksLoaded(tilePos.sub(range, range, range), tilePos.add(range, range, range));
+    public boolean areBlocksLoaded(final @NotNull TilePosc tilePos, final int range) {
+        return this.areBlocksLoaded(tilePos.sub(range, range, range, new TilePos()), tilePos.add(range, range, range, new TilePos()));
     }
 
     @Deprecated
@@ -593,11 +560,11 @@ public class World implements MutableWorldSource {
         return this.areBlocksLoaded(new TilePos(x, y, z), range);
     }
 
-    public boolean areBlocksLoaded(final @NotNull TilePos min, final @NotNull TilePos max) {
-        int minX = Math.min(min.x, max.x);
-        int minZ = Math.min(min.z, max.z);
-        int maxX = Math.max(min.x, max.x);
-        int maxZ = Math.max(min.z, max.z);
+    public boolean areBlocksLoaded(final @NotNull TilePosc min, final @NotNull TilePosc max) {
+        int minX = Math.min(min.x(), max.x());
+        int minZ = Math.min(min.z(), max.z());
+        int maxX = Math.max(min.x(), max.x());
+        int maxZ = Math.max(min.z(), max.z());
 
         minX >>= 4;
         minZ >>= 4;
@@ -631,8 +598,8 @@ public class World implements MutableWorldSource {
         return this.isChunkLoaded(new ChunkPos(x, z));
     }
 
-    public @NotNull Chunk getChunk(final @NotNull TilePos tilePos) {
-        return this.getChunk(tilePos.toChunkPos());
+    public @NotNull Chunk getChunk(final @NotNull TilePosc tilePos) {
+        return this.getChunk(new ChunkPos(tilePos));
     }
 
     @Deprecated
@@ -654,15 +621,15 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public boolean setBlockIdData(final @NotNull TilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdData(final @NotNull TilePosc tilePos, final int id, final int data) {
         if (!tilePos.inBounds(this)) {
             return false;
         } else {
-            return this.getChunk(tilePos).setBlockIdData(tilePos.toChunkTilePos(), id, data);
+            return this.getChunk(tilePos).setBlockIdData(new ChunkTilePos(tilePos), id, data);
         }
     }
 
-    public boolean setBlockIdRaw(final @NotNull TilePos tilePos, final int id) {
+    public boolean setBlockIdRaw(final @NotNull TilePosc tilePos, final int id) {
         return this.setBlockIdDataRaw(tilePos, id, this.getBlockData(tilePos));
     }
 
@@ -671,11 +638,11 @@ public class World implements MutableWorldSource {
         return this.setBlockIdRaw(new TilePos(x, y, z), id);
     }
 
-    public boolean setBlockIdDataRaw(final @NotNull TilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdDataRaw(final @NotNull TilePosc tilePos, final int id, final int data) {
         if (!tilePos.inBounds(this)) {
             return false;
         } else {
-            return this.getChunk(tilePos).setBlockIdDataRaw(tilePos.toChunkTilePos(), id, data);
+            return this.getChunk(tilePos).setBlockIdDataRaw(new ChunkTilePos(tilePos), id, data);
         }
     }
 
@@ -685,34 +652,34 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public boolean setBlockId(@NotNull final TilePos tilePos, final int id) {
+    public boolean setBlockId(final @NotNull TilePosc tilePos, final int id) {
         if (!tilePos.inBounds(this)) {
             return false;
         } else {
-            return this.getChunk(tilePos).setBlockId(tilePos.toChunkTilePos(), id);
+            return this.getChunk(tilePos).setBlockId(new ChunkTilePos(tilePos), id);
         }
     }
 
     @Override
-    public @NotNull Material getBlockMaterial(@NotNull final TilePos tilePos) {
+    public @NotNull Material getBlockMaterial(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block == null) {
-            return Material.air;
+            return Materials.AIR;
         } else {
             return block.getMaterial();
         }
     }
 
     @Override
-    public int getBlockData(final @NotNull TilePos tilePos) {
+    public int getBlockData(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return 0;
         } else {
-            return this.getChunk(tilePos).getBlockData(tilePos.toChunkTilePos());
+            return this.getChunk(tilePos).getBlockData(new ChunkTilePos(tilePos));
         }
     }
 
-    public boolean setBlockDataNotify(final @NotNull TilePos tilePos, final int data) {
+    public boolean setBlockDataNotify(final @NotNull TilePosc tilePos, final int data) {
         if (this.setBlockData(tilePos, data)) {
             this.markBlockNeedsUpdate(tilePos);
 
@@ -732,16 +699,16 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public boolean setBlockData(final @NotNull TilePos tilePos, final int data) {
+    public boolean setBlockData(final @NotNull TilePosc tilePos, final int data) {
         if (!tilePos.inBounds(this)) {
             return false;
         } else {
-            this.getChunk(tilePos).setBlockData(tilePos.toChunkTilePos(), data);
+            this.getChunk(tilePos).setBlockData(new ChunkTilePos(tilePos), data);
             return true;
         }
     }
 
-    public boolean setBlockIdNotify(final @NotNull TilePos tilePos, final int id) {
+    public boolean setBlockIdNotify(final @NotNull TilePosc tilePos, final int id) {
         if (this.setBlockId(tilePos, id)) {
             this.notifyBlockChange(tilePos, id);
             return true;
@@ -755,7 +722,7 @@ public class World implements MutableWorldSource {
         return this.setBlockIdNotify(new TilePos(x, y, z), id);
     }
 
-    public boolean setBlockIdDataNotify(final @NotNull TilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdDataNotify(final @NotNull TilePosc tilePos, final int id, final int data) {
         if (this.setBlockIdData(tilePos, id, data)) {
             this.notifyBlockChange(tilePos, id);
             return true;
@@ -769,9 +736,9 @@ public class World implements MutableWorldSource {
         return this.setBlockIdDataNotify(new TilePos(x, y, z), id, data);
     }
 
-    public void markBlockNeedsUpdate(final @NotNull TilePos tilePos) {
+    public void markBlockNeedsUpdate(final @NotNull TilePosc tilePos) {
         for (final @NotNull LevelListener listener : this.listeners) {
-            listener.blockChanged(tilePos.x, tilePos.y, tilePos.z);
+            listener.blockChanged(tilePos.x(), tilePos.y(), tilePos.z());
         }
     }
 
@@ -780,7 +747,7 @@ public class World implements MutableWorldSource {
         this.markBlockNeedsUpdate(new TilePos(x, y, z));
     }
 
-    public void notifyBlockChange(final @NotNull TilePos tilePos, final int id) {
+    public void notifyBlockChange(final @NotNull TilePosc tilePos, final int id) {
         this.markBlockNeedsUpdate(tilePos);
         this.notifyBlocksOfNeighborChange(tilePos, id);
     }
@@ -794,9 +761,9 @@ public class World implements MutableWorldSource {
         this.markBlocksDirty(new TilePos(x, Math.min(y0, y1), z), new TilePos(x, Math.max(y0, y1), z));
     }
 
-    public void markBlockDirty(final @NotNull TilePos tilePos) {
+    public void markBlockDirty(final @NotNull TilePosc tilePos) {
         for (final @NotNull LevelListener listener : this.listeners) {
-            listener.setBlocksDirty(tilePos.x, tilePos.y, tilePos.z, tilePos.x, tilePos.y, tilePos.z);
+            listener.setBlocksDirty(tilePos.x(), tilePos.y(), tilePos.z(), tilePos.x(), tilePos.y(), tilePos.z());
         }
     }
 
@@ -805,15 +772,15 @@ public class World implements MutableWorldSource {
         this.markBlockDirty(new TilePos(x, y, z));
     }
 
-    public void markBlocksDirty(final @NotNull TilePos min, final @NotNull TilePos max) {
+    public void markBlocksDirty(final @NotNull TilePosc min, final @NotNull TilePosc max) {
         for (final @NotNull LevelListener listener : this.listeners) {
             listener.setBlocksDirty(
-                Math.min(min.x, max.x),
-                Math.min(min.y, max.y),
-                Math.min(min.z, max.z),
-                Math.max(min.x, max.x),
-                Math.max(min.y, max.y),
-                Math.max(min.z, max.z)
+                Math.min(min.x(), max.x()),
+                Math.min(min.y(), max.y()),
+                Math.min(min.z(), max.z()),
+                Math.max(min.x(), max.x()),
+                Math.max(min.y(), max.y()),
+                Math.max(min.z(), max.z())
             );
         }
     }
@@ -823,13 +790,14 @@ public class World implements MutableWorldSource {
         this.markBlocksDirty(new TilePos(minX, minY, minZ), new TilePos(maxX, maxY, maxZ));
     }
 
-    public void notifyBlocksOfNeighborChange(final @NotNull TilePos tilePos, final int id) {
-        this.notifyBlockOfNeighborChange(tilePos.west(), id);
-        this.notifyBlockOfNeighborChange(tilePos.east(), id);
-        this.notifyBlockOfNeighborChange(tilePos.down(), id);
-        this.notifyBlockOfNeighborChange(tilePos.up(), id);
-        this.notifyBlockOfNeighborChange(tilePos.north(), id);
-        this.notifyBlockOfNeighborChange(tilePos.south(), id);
+    public void notifyBlocksOfNeighborChange(final @NotNull TilePosc tilePos, final int id) {
+        TilePos queryPos = new TilePos();
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.WEST, queryPos), id);
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.EAST, queryPos), id);
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.DOWN, queryPos), id);
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.UP, queryPos), id);
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.NORTH, queryPos), id);
+        this.notifyBlockOfNeighborChange(tilePos.add(Direction.SOUTH, queryPos), id);
     }
 
     @Deprecated
@@ -837,18 +805,18 @@ public class World implements MutableWorldSource {
         this.notifyBlocksOfNeighborChange(new TilePos(x, y, z), id);
     }
 
-    private void notifyBlockOfNeighborChange(final @NotNull TilePos tilePos, final int id) {
+    private void notifyBlockOfNeighborChange(final @NotNull TilePosc tilePos, final int id) {
         if (this.noNeighborUpdate || this.isClientSide) {
             return;
         }
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block != null) {
-            block.onNeighborBlockChange(this, tilePos.x, tilePos.y, tilePos.z, id);
+            block.onNeighborChanged(this, tilePos, id);
         }
     }
 
-    public boolean canBlockSeeSky(final @NotNull TilePos tilePos) {
-        return this.getChunk(tilePos).canBlockSeeSky(tilePos.toChunkTilePos());
+    public boolean canBlockSeeSky(final @NotNull TilePosc tilePos) {
+        return this.getChunk(tilePos).canBlockSeeSky(new ChunkTilePos(tilePos));
     }
 
     @Deprecated
@@ -856,11 +824,11 @@ public class World implements MutableWorldSource {
         return this.canBlockSeeSky(new TilePos(x, y, z));
     }
 
-    public int getFullBlockLightValue(final @NotNull TilePos tilePos) {
-        if (tilePos.y < 0) {
+    public int getFullBlockLightValue(final @NotNull TilePosc tilePos) {
+        if (tilePos.y() < 0) {
             return 0;
         } else {
-            return this.getChunk(tilePos).getRawBrightness(new TilePos(tilePos.x, Math.min(tilePos.y, this.getHeightBlocks() - 1), tilePos.z).toChunkTilePos(), 0);
+            return this.getChunk(tilePos).getRawBrightness(new ChunkTilePos(new TilePos(tilePos.x(), Math.min(tilePos.y(), this.getHeightBlocks() - 1), tilePos.z())), 0);
         }
     }
 
@@ -869,7 +837,7 @@ public class World implements MutableWorldSource {
         return this.getFullBlockLightValue(new TilePos(x, y, z));
     }
 
-    public int getBlockLightValue(final @NotNull TilePos tilePos) {
+    public int getBlockLightValue(final @NotNull TilePosc tilePos) {
         return this.getBlockLightValue_do(tilePos, true);
     }
 
@@ -878,30 +846,31 @@ public class World implements MutableWorldSource {
         return this.getBlockLightValue(new TilePos(x, y, z));
     }
 
-    private int getBlockLightValue_do(final @NotNull TilePos tilePos, final boolean first) {
-        if (tilePos.x < MIN_BLOCK_X || tilePos.z < MIN_BLOCK_Z || tilePos.x > MAX_BLOCK_X || tilePos.z > MAX_BLOCK_Z) {
+    private int getBlockLightValue_do(final @NotNull TilePosc tilePos, final boolean first) {
+        if (!tilePos.inBounds(this)) {
             return MAX_BRIGHTNESS;
         }
 
         if (first) {
             if (this.getBlockLitInteriorSurface(tilePos)) {
-                final int lightUp = this.getBlockLightValue_do(tilePos.up(), false);
-                final int lightEast = this.getBlockLightValue_do(tilePos.east(), false);
-                final int lightWest = this.getBlockLightValue_do(tilePos.west(), false);
-                final int lightSouth = this.getBlockLightValue_do(tilePos.south(), false);
-                final int lightNorth = this.getBlockLightValue_do(tilePos.north(), false);
+                TilePos queryPos = new TilePos();
+                final int lightUp = this.getBlockLightValue_do(tilePos.add(Direction.UP, queryPos), false);
+                final int lightEast = this.getBlockLightValue_do(tilePos.add(Direction.EAST, queryPos), false);
+                final int lightWest = this.getBlockLightValue_do(tilePos.add(Direction.WEST, queryPos), false);
+                final int lightSouth = this.getBlockLightValue_do(tilePos.add(Direction.SOUTH, queryPos), false);
+                final int lightNorth = this.getBlockLightValue_do(tilePos.add(Direction.NORTH, queryPos), false);
                 return Math.max(lightUp, Math.max(lightEast, Math.max(lightWest, Math.max(lightSouth, lightNorth))));
             }
         }
 
-        if (tilePos.y < 0) {
+        if (tilePos.y() < 0) {
             return 0;
         }
-        return this.getChunk(tilePos).getRawBrightness(new TilePos(tilePos.x, Math.min(tilePos.y, this.getHeightBlocks() - 1), tilePos.z).toChunkTilePos(), this.skyDarken);
+        return this.getChunk(tilePos).getRawBrightness(new ChunkTilePos(new TilePos(tilePos.x(), Math.min(tilePos.y(), this.getHeightBlocks() - 1), tilePos.z())), this.skyDarken);
     }
 
-    public boolean canLoadedBlockSeeSky(final @NotNull TilePos tilePos) {
-        if (tilePos.y >= this.getHeightBlocks()) {
+    public boolean canLoadedBlockSeeSky(final @NotNull TilePosc tilePos) {
+        if (tilePos.y() >= this.getHeightBlocks()) {
             return true;
         } else if (!tilePos.inBounds(this)) {
             return false;
@@ -909,7 +878,7 @@ public class World implements MutableWorldSource {
             return false;
         }
 
-        return this.getChunk(tilePos).canBlockSeeSky(tilePos.toChunkTilePos());
+        return this.getChunk(tilePos).canBlockSeeSky(new ChunkTilePos(tilePos));
     }
 
     @Deprecated
@@ -921,9 +890,9 @@ public class World implements MutableWorldSource {
         if (x < World.MIN_BLOCK_X || z < World.MIN_BLOCK_Z || x > World.MAX_BLOCK_X || z > World.MAX_BLOCK_Z) {
             return 0;
         }
-        final @NotNull TilePos tilePos = new TilePos(x, 0, z);
 
-        if (!this.isBlockLoaded(new TilePos(x, 0, z))) {
+        final @NotNull TilePos tilePos = new TilePos(x, 0, z);
+        if (!this.isBlockLoaded(tilePos)) {
             return 0;
         } else {
             return this.getChunk(tilePos).getHeightValue(x & (Chunk.CHUNK_SIZE_X - 1), z & (Chunk.CHUNK_SIZE_Z - 1));
@@ -931,13 +900,13 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos) {
+    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return lightLayer.defaultLightLevel;
         } else if (!this.isBlockLoaded(tilePos)) {
             return 0;
         } else {
-            return this.getChunk(tilePos).getBrightness(lightLayer, tilePos.toChunkTilePos());
+            return this.getChunk(tilePos).getBrightness(lightLayer, new ChunkTilePos(tilePos));
         }
     }
 
@@ -947,40 +916,41 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos, final int value) {
+    public void setLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos, final int value) {
         if (tilePos.inBounds(this) && this.isBlockLoaded(tilePos)) {
-            this.getChunk(tilePos).setBrightness(lightLayer, tilePos.toChunkTilePos(), value);
+            this.getChunk(tilePos).setBrightness(lightLayer, new ChunkTilePos(tilePos), value);
             for (final @NotNull LevelListener listener : this.listeners) {
-                listener.blockChanged(tilePos.x, tilePos.y, tilePos.z);
+                listener.blockChanged(tilePos.x(), tilePos.y(), tilePos.z());
             }
         }
     }
 
     @Override
-    public float getBrightness(final @NotNull TilePos tilePos, final int lightEmission) {
+    public float getBrightness(final @NotNull TilePosc tilePos, final int lightEmission) {
         final int lightValue = this.getBlockLightValue(tilePos);
         return this.worldType.getBrightnessRamp()[Math.max(lightValue, lightEmission)];
     }
 
     @Override
-    public int getLightmapCoord(final @NotNull TilePos tilePos, final int lightEmission) {
+    public int getLightmapCoord(final @NotNull TilePosc tilePos, final int lightEmission) {
         int skyLight = this.getSavedLightValue(LightLayer.Sky, tilePos);
         int blockLight = Math.max(this.getSavedLightValue(LightLayer.Block, tilePos), lightEmission);
 
         if (this.getBlockLitInteriorSurface(tilePos)) {
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.up()));
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.down()));
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.east()));
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.west()));
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.south()));
-            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.north()));
-
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.up()));
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.down()));
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.east()));
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.west()));
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.south()));
-            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.north()));
+            TilePos queryPos = new TilePos();
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.UP, queryPos)));
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.DOWN, queryPos)));
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.EAST, queryPos)));
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.WEST, queryPos)));
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.SOUTH, queryPos)));
+            skyLight = Math.max(skyLight, this.getSavedLightValue(LightLayer.Sky, tilePos.add(Direction.NORTH, queryPos)));
+
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.UP, queryPos)));
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.DOWN, queryPos)));
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.EAST, queryPos)));
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.WEST, queryPos)));
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.SOUTH, queryPos)));
+            blockLight = Math.max(blockLight, this.getSavedLightValue(LightLayer.Block, tilePos.add(Direction.NORTH, queryPos)));
         }
 
         return this.getLightmapCoord(skyLight, blockLight);
@@ -992,7 +962,7 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public float getLightBrightness(final @NotNull TilePos tilePos) {
+    public float getLightBrightness(final @NotNull TilePosc tilePos) {
         return this.worldType.getBrightnessRamp()[this.getBlockLightValue(tilePos)];
     }
 
@@ -1000,56 +970,43 @@ public class World implements MutableWorldSource {
         return this.skyDarken < 4;
     }
 
-    public @Nullable HitResult checkBlockCollisionBetweenPoints(Vec3 start, Vec3 end)
-    {
+    public @Nullable HitResult checkBlockCollisionBetweenPoints(@NotNull Vector3dc start, @NotNull Vector3dc end) {
         return checkBlockCollisionBetweenPoints(start, end, false, false, false);
     }
 
 
-    public @Nullable HitResult checkBlockCollisionBetweenPoints(Vec3 start, Vec3 end, boolean shouldCollideWithFluids)
-    {
+    public @Nullable HitResult checkBlockCollisionBetweenPoints(@NotNull Vector3dc start, @NotNull Vector3dc end, boolean shouldCollideWithFluids) {
         return checkBlockCollisionBetweenPoints(start, end, shouldCollideWithFluids, false, false);
     }
 
-    public @Nullable HitResult checkBlockCollisionBetweenPoints(Vec3 start, Vec3 end, boolean shouldCollideWithFluids, boolean ignoreNonColliderBlocks, boolean useSelectorBoxes)
-    {
-        if(Double.isNaN(start.x) || Double.isNaN(start.y) || Double.isNaN(start.z))
-        {
+    public @Nullable HitResult checkBlockCollisionBetweenPoints(@NotNull Vector3dc start, @NotNull Vector3dc end, boolean shouldCollideWithFluids, boolean ignoreNonColliderBlocks, boolean useSelectorBoxes) {
+        if (!start.isFinite()) {
             return null;
         }
-        if(Double.isNaN(end.x) || Double.isNaN(end.y) || Double.isNaN(end.z))
-        {
+        if (!end.isFinite()) {
             return null;
         }
-        int blockEndX = MathHelper.floor(end.x);
-        int blockEndY = MathHelper.floor(end.y);
-        int blockEndZ = MathHelper.floor(end.z);
-        int blockStartX = MathHelper.floor(start.x);
-        int blockStartY = MathHelper.floor(start.y);
-        int blockStartZ = MathHelper.floor(start.z);
-        int id = getBlockId(blockStartX, blockStartY, blockStartZ);
-        int meta = getBlockMetadata(blockStartX, blockStartY, blockStartZ);
+        Vector3d start2 = new Vector3d(start);
+        Vector3d end2 = new Vector3d(end);
+        TilePos blockEnd = new TilePos(end2);
+        TilePos blockStart = new TilePos(start2);
+        int id = getBlockId(blockStart);
+        int meta = getBlockData(blockStart);
         Block<?> block = Blocks.blocksList[id];
-        if(
-            (
-                !ignoreNonColliderBlocks ||
-                    (block == null) ||
-                    ((useSelectorBoxes ? block.getSelectedBoundingBoxFromPool(this, blockStartX, blockStartY, blockStartZ) : block.getCollisionBoundingBoxFromPool(this, blockStartX, blockStartY, blockStartZ)) != null)) && (id > 0) && (block.canCollideCheck(meta, shouldCollideWithFluids)))
-        {
-            HitResult hitResult = block.collisionRayTrace(this, blockStartX, blockStartY, blockStartZ, start, end, useSelectorBoxes);
-            if(hitResult != null)
-            {
+        if (
+            (!ignoreNonColliderBlocks ||
+                (block == null) ||
+                ((useSelectorBoxes ? block.getSelectionAABB(this, blockStart) : block.getCollisionAABB(this, blockStart)) != null)) && (id > 0) && (block != null && block.canCollideCheck(meta, shouldCollideWithFluids))) {
+            HitResult hitResult = block.collisionRayTrace(this, blockStart, start2, end2, useSelectorBoxes);
+            if (hitResult != null) {
                 return hitResult;
             }
         }
-        for(int l1 = 200; l1-- >= 0;)
-        {
-            if(Double.isNaN(start.x) || Double.isNaN(start.y) || Double.isNaN(start.z))
-            {
+        for (int l1 = 200; l1-- >= 0; ) {
+            if (!start2.isFinite()) {
                 return null;
             }
-            if(blockStartX == blockEndX && blockStartY == blockEndY && blockStartZ == blockEndZ)
-            {
+            if (blockStart.equals(blockEnd)) {
                 return null;
             }
             boolean flag2 = true;
@@ -1058,123 +1015,93 @@ public class World implements MutableWorldSource {
             double d = 999D;
             double d1 = 999D;
             double d2 = 999D;
-            if(blockEndX > blockStartX)
-            {
-                d = (double)blockStartX + 1.0D;
-            } else
-            if(blockEndX < blockStartX)
-            {
-                d = (double)blockStartX + 0.0D;
-            } else
-            {
+            if (blockEnd.x > blockStart.x) {
+                d = (double) blockStart.x + 1.0D;
+            } else if (blockEnd.x < blockStart.x) {
+                d = (double) blockStart.x + 0.0D;
+            } else {
                 flag2 = false;
             }
-            if(blockEndY > blockStartY)
-            {
-                d1 = (double)blockStartY + 1.0D;
-            } else
-            if(blockEndY < blockStartY)
-            {
-                d1 = (double)blockStartY + 0.0D;
-            } else
-            {
+            if (blockEnd.y > blockStart.y) {
+                d1 = (double) blockStart.y + 1.0D;
+            } else if (blockEnd.y < blockStart.y) {
+                d1 = (double) blockStart.y + 0.0D;
+            } else {
                 flag3 = false;
             }
-            if(blockEndZ > blockStartZ)
-            {
-                d2 = (double)blockStartZ + 1.0D;
-            } else
-            if(blockEndZ < blockStartZ)
-            {
-                d2 = (double)blockStartZ + 0.0D;
-            } else
-            {
+            if (blockEnd.z > blockStart.z) {
+                d2 = (double) blockStart.z + 1.0D;
+            } else if (blockEnd.z < blockStart.z) {
+                d2 = (double) blockStart.z + 0.0D;
+            } else {
                 flag4 = false;
             }
             double d3 = 999D;
             double d4 = 999D;
             double d5 = 999D;
-            double d6 = end.x - start.x;
-            double d7 = end.y - start.y;
-            double d8 = end.z - start.z;
-            if(flag2)
-            {
-                d3 = (d - start.x) / d6;
+            double d6 = end2.x - start2.x;
+            double d7 = end2.y - start2.y;
+            double d8 = end2.z - start2.z;
+            if (flag2) {
+                d3 = (d - start2.x) / d6;
             }
-            if(flag3)
-            {
-                d4 = (d1 - start.y) / d7;
+            if (flag3) {
+                d4 = (d1 - start2.y) / d7;
             }
-            if(flag4)
-            {
-                d5 = (d2 - start.z) / d8;
+            if (flag4) {
+                d5 = (d2 - start2.z) / d8;
             }
             byte byte0 = 0;
-            if(d3 < d4 && d3 < d5)
-            {
-                if(blockEndX > blockStartX)
-                {
+            if (d3 < d4 && d3 < d5) {
+                if (blockEnd.x > blockStart.x) {
                     byte0 = 4;
-                } else
-                {
+                } else {
                     byte0 = 5;
                 }
-                start.x = d;
-                start.y += d7 * d3;
-                start.z += d8 * d3;
-            } else
-            if(d4 < d5)
-            {
-                if(blockEndY > blockStartY)
-                {
+                start2.x = d;
+                start2.y += d7 * d3;
+                start2.z += d8 * d3;
+            } else if (d4 < d5) {
+                if (blockEnd.y > blockStart.y) {
                     byte0 = 0;
-                } else
-                {
+                } else {
                     byte0 = 1;
                 }
-                start.x += d6 * d4;
-                start.y = d1;
-                start.z += d8 * d4;
-            } else
-            {
-                if(blockEndZ > blockStartZ)
-                {
+                start2.x += d6 * d4;
+                start2.y = d1;
+                start2.z += d8 * d4;
+            } else {
+                if (blockEnd.z > blockStart.z) {
                     byte0 = 2;
-                } else
-                {
+                } else {
                     byte0 = 3;
                 }
-                start.x += d6 * d5;
-                start.y += d7 * d5;
-                start.z = d2;
-            }
-            Vec3 vec32 = Vec3.fromPool(start.x, start.y, start.z);
-            blockStartX = (int)(vec32.x = MathHelper.floor(start.x));
-            if(byte0 == 5)
-            {
-                blockStartX--;
-                vec32.x++;
-            }
-            blockStartY = (int)(vec32.y = MathHelper.floor(start.y));
-            if(byte0 == 1)
-            {
-                blockStartY--;
-                vec32.y++;
-            }
-            blockStartZ = (int)(vec32.z = MathHelper.floor(start.z));
-            if(byte0 == 3)
-            {
-                blockStartZ--;
-                vec32.z++;
-            }
-            Block<?> block1 = getBlock(blockStartX, blockStartY, blockStartZ);
-            int metadata1 = getBlockMetadata(blockStartX, blockStartY, blockStartZ);
-            if(
-                (!ignoreNonColliderBlocks || (block1 == null) || ((useSelectorBoxes ? block1.getSelectedBoundingBoxFromPool(this, blockStartX, blockStartY, blockStartZ) : block1.getCollisionBoundingBoxFromPool(this, blockStartX, blockStartY, blockStartZ)) != null)) && (block1 != null) && block1.canCollideCheck(metadata1, shouldCollideWithFluids))
-            {
-                HitResult hitResult = block1.collisionRayTrace(this, blockStartX, blockStartY, blockStartZ, start, end, useSelectorBoxes);
-                if(hitResult != null)
-                {
+                start2.x += d6 * d5;
+                start2.y += d7 * d5;
+                start2.z = d2;
+            }
+            Vector3d startCopy = new Vector3d(start2);
+            blockStart.x = (int) (startCopy.x = MathHelper.floor(start2.x()));
+            if (byte0 == 5) {
+                blockStart.x--;
+                startCopy.x++;
+            }
+            blockStart.y = (int) (startCopy.y = MathHelper.floor(start2.y()));
+            if (byte0 == 1) {
+                blockStart.y--;
+                startCopy.y++;
+            }
+            blockStart.z = (int) (startCopy.z = MathHelper.floor(start2.z()));
+            if (byte0 == 3) {
+                blockStart.z--;
+                startCopy.z++;
+            }
+            Block<?> block1 = getBlock(blockStart);
+            int metadata1 = getBlockData(blockStart);
+            if (
+                (!ignoreNonColliderBlocks || (block1 == null) || ((useSelectorBoxes ? block1.getSelectionAABB(this, blockStart) : block1.getCollisionAABB(this, blockStart)) != null)) && (block1 != null) && block1.canCollideCheck(metadata1, shouldCollideWithFluids)) {
+                HitResult hitResult = block1.collisionRayTrace(this, blockStart, start2, end2, useSelectorBoxes);
+                if (hitResult != null) {
                     return hitResult;
                 }
             }
@@ -1182,39 +1109,31 @@ public class World implements MutableWorldSource {
 
         return null;
     }
-    
-    public void playSoundAtEntity(@Nullable Entity player, @NotNull Entity entity, String soundPath, float volume, float pitch)
-    {
-        for (LevelListener listener : listeners)
-        {
+
+    public void playSoundAtEntity(@Nullable Entity player, @NotNull Entity entity, String soundPath, float volume, float pitch) {
+        for (LevelListener listener : this.listeners) {
             listener.playSound(player, soundPath, SoundCategory.ENTITY_SOUNDS, entity.x, entity.y - (double) entity.heightOffset, entity.z, volume, pitch);
         }
 
     }
-    
+
     public void playSoundEffect(@Nullable Entity player, SoundCategory category, double x, double y, double z, String soundPath,
-                                float volume, float pitch)
-    {
-        for (LevelListener listener : listeners)
-        {
+                                float volume, float pitch) {
+        for (LevelListener listener : this.listeners) {
             listener.playSound(player, soundPath, category, x, y, z, volume, pitch);
         }
     }
-    
-    public void playBlockSoundEffect(@Nullable Entity player, double x, double y, double z, Block<?> block, EnumBlockSoundEffectType soundType)
-    {
+
+    public void playBlockSoundEffect(@Nullable Entity player, double x, double y, double z, Block<?> block, EnumBlockSoundEffectType soundType) {
         if (block == null) return;
 
         BlockSound sound = block.getSound();
         if (sound == null) return;
 
         String name;
-        if (soundType == EnumBlockSoundEffectType.MINE)
-        {
+        if (soundType == EnumBlockSoundEffectType.MINE) {
             name = sound.getBreakSoundName();
-        }
-        else
-        {
+        } else {
             name = sound.getStepSoundName();
         }
 
@@ -1222,7 +1141,7 @@ public class World implements MutableWorldSource {
     }
 
     public void playRecord(final @Nullable String soundPath, final @Nullable String author, final @NotNull TilePos tilePos) {
-        for (final @NotNull LevelListener listener : listeners) {
+        for (final @NotNull LevelListener listener : this.listeners) {
             listener.playStreamingMusic(soundPath, author, tilePos.x, tilePos.y, tilePos.z);
         }
     }
@@ -1260,7 +1179,7 @@ public class World implements MutableWorldSource {
         return true;
     }
 
-    public void addRainbow(final int rainbowTicks){
+    public void addRainbow(final int rainbowTicks) {
         this.rainbowTicks = this.startingRainbowTicks = rainbowTicks;
     }
 
@@ -1268,99 +1187,83 @@ public class World implements MutableWorldSource {
         int i = MathHelper.floor(entity.x / Chunk.CHUNK_SIZE_X);
         int j = MathHelper.floor(entity.z / Chunk.CHUNK_SIZE_Z);
         boolean flag = entity instanceof Player;
-        if(flag || isChunkLoaded(i, j))
-        {
-            if(entity instanceof Player)
-            {
-                Player entityplayer = (Player)entity;
-                players.add(entityplayer);
+        if (flag || isChunkLoaded(i, j)) {
+            if (entity instanceof Player entityplayer) {
+                this.players.add(entityplayer);
                 updateEnoughPlayersSleepingFlag(null);
             }
 
             getChunkFromChunkCoords(i, j).addEntity(entity);
-            entities.add(entity);
+            this.entities.add(entity);
             obtainEntitySkin(entity);
             return true;
-        } else
-        {
+        } else {
             return false;
         }
     }
 
-    protected void obtainEntitySkin(Entity entity)
-    {
-        for(int i = 0; i < listeners.size(); i++)
-        {
-            listeners.get(i).entityAdded(entity);
+    protected void obtainEntitySkin(Entity entity) {
+        for (int i = 0; i < this.listeners.size(); i++) {
+            this.listeners.get(i).entityAdded(entity);
         }
 
     }
 
-    protected void releaseEntitySkin(Entity entity)
-    {
-        for(int i = 0; i < listeners.size(); i++)
-        {
-            listeners.get(i).entityRemoved(entity);
+    protected void releaseEntitySkin(Entity entity) {
+        for (int i = 0; i < this.listeners.size(); i++) {
+            this.listeners.get(i).entityRemoved(entity);
         }
 
     }
 
-    public void setEntityDead(Entity entity)
-    {
-        if(entity.passenger != null)
-        {
+    public void setEntityDead(Entity entity) {
+        if (entity.passenger != null) {
             entity.passenger.startRiding(null);
         }
-        if(entity.vehicle != null)
-        {
+        if (entity.vehicle != null) {
             entity.startRiding(null);
         }
         entity.remove();
-        if(entity instanceof Player)
-        {
-            players.remove((Player)entity);
+        if (entity instanceof Player) {
+            this.players.remove((Player) entity);
             updateEnoughPlayersSleepingFlag(null);
         }
     }
-    
-    public void removePlayer(Entity entity)
-    {
+
+    public void removePlayer(Entity entity) {
         entity.remove();
-        if(entity instanceof Player)
-        {
-            players.remove((Player)entity);
+        if (entity instanceof Player) {
+            this.players.remove((Player) entity);
             updateEnoughPlayersSleepingFlag(null);
         }
         int i = entity.chunkCoordX;
         int j = entity.chunkCoordZ;
-        if(entity.addedToChunk && isChunkLoaded(i, j))
-        {
+        if (entity.addedToChunk && isChunkLoaded(i, j)) {
             getChunkFromChunkCoords(i, j).removeEntity(entity);
         }
-        entities.remove(entity);
+        this.entities.remove(entity);
         releaseEntitySkin(entity);
     }
 
-    public void addListener(LevelListener iworldaccess)
-    {
-        listeners.add(iworldaccess);
+    public void addListener(@NotNull LevelListener levelListener) {
+        this.listeners.add(levelListener);
     }
 
-    public void removeListener(LevelListener iworldaccess)
-    {
-        listeners.remove(iworldaccess);
+    public void removeListener(@NotNull LevelListener levelListener) {
+        this.listeners.remove(levelListener);
     }
-    public @NotNull List<AABB> getCubes(Entity entity, AABB aabb) {
+
+    public @NotNull List<@NotNull AABBdc> getCubes(@NotNull Entity entity, @NotNull AABBdc aabb) {
         TilePos d = new TilePos(entity);
-        collidingBoundingBoxes.clear();
-        if (!d.inBounds(this)) return collidingBoundingBoxes;
+        this.collidingBoundingBoxes.clear();
+        if (!d.inBounds(this)) return this.collidingBoundingBoxes;
 
-        int minX = MathHelper.floor(aabb.minX);
-        int maxX = MathHelper.floor(aabb.maxX + 1.0D);
-        int minY = MathHelper.floor(aabb.minY);
-        int maxY = MathHelper.floor(aabb.maxY + 1.0D);
-        int minZ = MathHelper.floor(aabb.minZ);
-        int maxZ = MathHelper.floor(aabb.maxZ + 1.0D);
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ() + 1.0D);
 
         ChunkPos p = new ChunkPos(0, 0);
         int cMinX = minX >> 4;
@@ -1369,20 +1272,20 @@ public class World implements MutableWorldSource {
         int cMaxZ = maxZ >> 4;
         for (p.x = cMinX; p.x <= cMaxX; p.x++) {
             for (p.z = cMinZ; p.z <= cMaxZ; p.z++) {
-                if (!chunkProvider.isChunkLoaded(p)) {
-                    return collidingBoundingBoxes;
+                if (!this.chunkProvider.isChunkLoaded(p)) {
+                    return this.collidingBoundingBoxes;
                 }
             }
         }
 
-        for(d.x = minX - 1; d.x <= maxX; d.x++) {
-            for(d.z = minZ - 1; d.z <= maxZ; d.z++) {
-                for(d.y = minY - 1; d.y <= maxY; d.y++) {
+        for (d.x = minX - 1; d.x <= maxX; d.x++) {
+            for (d.z = minZ - 1; d.z <= maxZ; d.z++) {
+                for (d.y = minY - 1; d.y <= maxY; d.y++) {
                     Block<?> block = getBlock(d);
-                    if(block != null) {
+                    if (block != null) {
                         int metadata = getBlockData(d);
                         if (block.collidesWithEntity(entity, this, d) && entity.collidesWithBlock(block, metadata)) {
-                            block.getCollisionAABBs(this, d, aabb, collidingBoundingBoxes);
+                            block.getCollisionAABBs(this, d, aabb, this.collidingBoundingBoxes);
                         }
                     }
                 }
@@ -1390,42 +1293,37 @@ public class World implements MutableWorldSource {
         }
 
         double radius = 0.25D;
-        List<Entity> entities = getEntitiesWithinAABBExcludingEntity(entity, aabb.grow(radius, radius, radius));
+        List<Entity> entities = getEntitiesWithinAABBExcludingEntity(entity, MathHelper.aabbGrow(aabb, radius, radius, radius, new AABBd()));
         for (Entity e : entities) {
-            AABB entityBB = e.getBb();
-            if (entityBB != null && entityBB.intersects(aabb)) {
-                collidingBoundingBoxes.add(entityBB);
-            }
-        }
-
-        return collidingBoundingBoxes;
-    }
-
-    public List<AABB> getCollidingSolidBlockBoundingBoxes(Entity entity, AABB axisalignedbb)
-    {
-        collidingBoundingBoxes.clear();
-        int minX = MathHelper.floor(axisalignedbb.minX);
-        int maxX = MathHelper.floor(axisalignedbb.maxX + 1.0D);
-        int minY = MathHelper.floor(axisalignedbb.minY);
-        int maxY = MathHelper.floor(axisalignedbb.maxY + 1.0D);
-        int minZ = MathHelper.floor(axisalignedbb.minZ);
-        int maxZ = MathHelper.floor(axisalignedbb.maxZ + 1.0D);
-        for(int dx = minX - 1; dx <= maxX; dx++)
-        {
-            for(int dz = minZ - 1; dz <= maxZ; dz++)
-            {
-                if(!isBlockLoaded(dx, 64, dz))
-                {
+            AABBdc entityBB = e.getCollisionAABB();
+            if (entityBB != null && entityBB.intersectsAABB((AABBd) aabb)) {
+                this.collidingBoundingBoxes.add(entityBB);
+            }
+        }
+
+        return this.collidingBoundingBoxes;
+    }
+
+    public @NotNull List<@NotNull AABBdc> getCollidingSolidBlockBoundingBoxes(@Nullable Entity entity, @NotNull AABBdc aabb) {
+        this.collidingBoundingBoxes.clear();
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ() + 1.0D);
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = minX - 1; tilePos.x <= maxX; tilePos.x++) {
+            for (tilePos.z = minZ - 1; tilePos.z <= maxZ; tilePos.z++) {
+                if (!isBlockLoaded(tilePos.x, 64, tilePos.z)) {
                     continue;
                 }
-                for(int dy = minY - 1; dy <= maxY; dy++)
-                {
-                    Block<?> block = Blocks.blocksList[getBlockId(dx, dy, dz)];
-                    if(block != null && block.isSolidRender())
-                    {
+                for (tilePos.y = minY - 1; tilePos.y <= maxY; tilePos.y++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block != null && block.isSolidRender()) {
                         // ignore mesh blocks if entity is instance of an item
-                        if(!(entity instanceof EntityItem && (block.id() == Blocks.MESH.id() || block.id() == Blocks.SPIKES.id() || block.id() == Blocks.MOBSPAWNER.id())))
-                            block.getCollidingBoundingBoxes(this, dx, dy, dz, axisalignedbb, collidingBoundingBoxes);
+                        if (!(entity instanceof EntityItem && (block.id() == Blocks.MESH.id() || block.id() == Blocks.SPIKES.id() || block.id() == Blocks.MOBSPAWNER.id())))
+                            block.getCollisionAABBs(this, tilePos, aabb, this.collidingBoundingBoxes);
                     }
                 }
 
@@ -1434,245 +1332,203 @@ public class World implements MutableWorldSource {
         }
 
         double d = 0.25D;
-        List<Entity> list = getEntitiesWithinAABBExcludingEntity(entity, axisalignedbb.grow(d, d, d));
-        for(int j2 = 0; j2 < list.size(); j2++)
-        {
-            AABB aabb = list.get(j2).getBb();
-            if(aabb != null && aabb.intersects(axisalignedbb))
-            {
-                collidingBoundingBoxes.add(aabb);
-            }
-        }
-
-        return collidingBoundingBoxes;
-    }
-	
-	public float getAmbientBrightness(float partialTicks) {
-		float angle = getCelestialAngle(partialTicks);
-		float bright = 1.0F - (MathHelper.cos(angle * MathHelper.PI * 2.0F) * 2.0F + 0.2F);
-		bright = 1.0f - MathHelper.clamp(bright, 0.0f, 1.0f);
-		
-		Weather weather = weatherManager.getCurrentWeather();
-		if(weather != null) {
-			// TODO Unhardcode somehow
-			if(weather == Weathers.OVERWORLD_RAIN) {
-				float power = weatherManager.getWeatherIntensity() * weatherManager.getWeatherPower();
-				bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));	
-			}
-			if(weather == Weathers.OVERWORLD_STORM) {
-				float power = weatherManager.getWeatherIntensity() * weatherManager.getWeatherPower();
-				bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));
-				bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));
-			}
-		}
-		
-		return bright * 0.8f + 0.2f;
-	}
-
-    public float getCelestialAngle(float partialTick)
-    {
-    	if(!getGameRuleValue(GameRules.DO_DAY_CYCLE)) {
-    		partialTick = 1.0f;
-    	}
-        return worldType.getCelestialAngle(this, levelData.getWorldTime(), partialTick);
-    }
-
-
-    public int findTopSolidBlock(int x, int z)
-    {
+        List<Entity> list = getEntitiesWithinAABBExcludingEntity(entity, MathHelper.aabbGrow(aabb, d, d, d, new AABBd()));
+        for (int j2 = 0; j2 < list.size(); j2++) {
+            AABBdc collisionBB = list.get(j2).getCollisionAABB();
+            if (collisionBB != null && collisionBB.intersectsAABB((AABBd) aabb)) {
+                this.collidingBoundingBoxes.add(collisionBB);
+            }
+        }
+
+        return this.collidingBoundingBoxes;
+    }
+
+    public float getAmbientBrightness(float partialTicks) {
+        float angle = getCelestialAngle(partialTicks);
+        float bright = 1.0F - (MathHelper.cos(angle * MathHelper.PI * 2.0F) * 2.0F + 0.2F);
+        bright = 1.0f - MathHelper.clamp(bright, 0.0f, 1.0f);
+
+        Weather weather = this.weatherManager.getCurrentWeather();
+        if (weather != null) {
+            // TODO Unhardcode somehow
+            if (weather == Weathers.OVERWORLD_RAIN) {
+                float power = this.weatherManager.getWeatherIntensity() * this.weatherManager.getWeatherPower();
+                bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));
+            }
+            if (weather == Weathers.OVERWORLD_STORM) {
+                float power = this.weatherManager.getWeatherIntensity() * this.weatherManager.getWeatherPower();
+                bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));
+                bright = (float) (bright * (1.0 - (power * 5.0f) / 16.0));
+            }
+        }
+
+        return bright * 0.8f + 0.2f;
+    }
+
+    public float getCelestialAngle(float partialTick) {
+        if (!getGameRuleValue(GameRules.DO_DAY_CYCLE)) {
+            partialTick = 1.0f;
+        }
+        return this.worldType.getCelestialAngle(this, this.levelData.getWorldTime(), partialTick);
+    }
+
+
+    public int findTopSolidBlock(int x, int z) {
         Chunk chunk = getChunkFromBlockCoords(x, z);
         int y = getHeightBlocks() - 1;
         x &= (Chunk.CHUNK_SIZE_X - 1);
         z &= (Chunk.CHUNK_SIZE_Z - 1);
-        while(y > 0)
-        {
+        while (y > 0) {
             int id = chunk.getBlockID(x, y, z);
-            Material material = id != 0 ? Blocks.blocksList[id].getMaterial() : Material.air;
-            if(!material.blocksMotion() && !material.isLiquid())
-            {
+            Material material = id != 0 ? Blocks.blocksList[id].getMaterial() : Materials.AIR;
+            if (!material.blocksMotion() && !material.isLiquid()) {
                 y--;
-            }
-            else
-            {
+            } else {
                 return y + 1;
             }
         }
         return -1;
     }
-    
-    public int findTopSolidNonLiquidBlock(int x, int z)
-    {
+
+    public int findTopSolidNonLiquidBlock(int x, int z) {
         Chunk chunk = getChunkFromBlockCoords(x, z);
         int y = getHeightBlocks() - 1;
         x &= (Chunk.CHUNK_SIZE_X - 1);
         z &= (Chunk.CHUNK_SIZE_Z - 1);
-        while(y > 0)
-        {
+        while (y > 0) {
             Block<?> block = Blocks.getBlock(chunk.getBlockID(x, y, z));
-            Material material = block != null ? block.getMaterial() : Material.air;
-            if(!material.blocksMotion())
-            {
+            Material material = block != null ? block.getMaterial() : Materials.AIR;
+            if (!material.blocksMotion()) {
                 y--;
-            } else
-            {
+            } else {
                 return y + 1;
             }
         }
         return -1;
     }
 
-    public float getStarBrightness(float partialTick)
-    {
+    public float getStarBrightness(float partialTick) {
         float f1 = getCelestialAngle(partialTick);
         float f2 = 1.0F - (MathHelper.cos(f1 * MathHelper.PI * 2.0F) * 2.0F + 0.75F);
-        if(f2 < 0.0F)
-        {
+        if (f2 < 0.0F) {
             f2 = 0.0F;
         }
-        if(f2 > 1.0F)
-        {
+        if (f2 > 1.0F) {
             f2 = 1.0F;
         }
         return f2 * f2 * 0.5F;
     }
 
-    public final void scheduleBlockUpdate(final @NotNull TilePos tilePos, final int id, final long delay) {
-        this.scheduleBlockUpdate(tilePos, id, delay, false);
-    }
-
     @Deprecated
     public final void scheduleBlockUpdate(final int x, final int y, final int z, final int id, final long delay) {
         this.scheduleBlockUpdate(new TilePos(x, y, z), id, delay);
     }
 
-    public void scheduleBlockUpdate(final @NotNull TilePos tilePos, final int id, final long delay, final boolean loaded) {
-        NextTickListEntry entry = new NextTickListEntry(tilePos.x, tilePos.y, tilePos.z, id, getWorldTime());
-        entry.loaded = loaded;
+    public void scheduleBlockUpdate(final @NotNull TilePosc tilePos, final int id, final long delay) {
+        NextTickListEntry entry = new NextTickListEntry(tilePos, id);
         final byte radius = 8;
 
-        if(scheduledUpdatesAreImmediate && !immediatelyUpdatedPositions.contains(entry)) {
-            if(entry.loaded || areBlocksLoaded(entry.x - radius, entry.y - radius, entry.z - radius, entry.x + radius, entry.y + radius, entry.z + radius)) {
-                int id1 = getBlockId(entry.x, entry.y, entry.z);
-                if(id1 == entry.blockId && id1 > 0) {
-                    immediatelyUpdatedPositions.add(entry);
-                    Blocks.blocksList[id1].updateTick(this, entry.x, entry.y, entry.z, rand, false);
+        if (this.scheduledUpdatesAreImmediate && !this.immediatelyUpdatedPositions.contains(entry)) {
+            if (areBlocksLoaded(entry.tilePos.x - radius, entry.tilePos.y - radius, entry.tilePos.z - radius, entry.tilePos.x() + radius, entry.tilePos.y() + radius, entry.tilePos.z() + radius)) {
+                final @NotNull Block<?> block = this.getBlock(entry.tilePos);
+                if (block != null && block.id() == entry.blockId) {
+                    this.immediatelyUpdatedPositions.add(entry);
+                    block.updateTick(this, entry.tilePos, this.rand, false);
                 }
             }
             return;
         }
-        if(entry.loaded || areBlocksLoaded(tilePos, radius)) {
-            if(id > 0) {
-                entry.setDelay(delay);
+        if (areBlocksLoaded(tilePos, radius)) {
+            if (id > 0) {
+                entry.setDelay(delay + runtime);
             }
-            if(!tickNextTickList.contains(entry)) {
-                tickNextTickList.add(entry);
-                final @NotNull Chunk chunk = Objects.requireNonNull(this.getChunk(tilePos));
-                chunk.addTick(entry);
+            if (!this.tickNextTickSet.contains(entry)) {
+                this.tickNextTickSet.add(entry);
+                this.tickNextTickList.add(entry);
             }
         }
     }
 
-    @Deprecated
-    public final void scheduleBlockUpdate(final int x, final int y, final int z, final int id, final long delay, final boolean loaded) {
-        this.scheduleBlockUpdate(new TilePos(x, y, z), id, delay, loaded);
-    }
-
-    public void updateEntities()
-    {
-        for(int i = 0; i < weatherEffects.size(); i++)
-        {
-            Entity entity = weatherEffects.get(i);
+    public void updateEntities() {
+        for (int i = 0; i < this.weatherEffects.size(); i++) {
+            Entity entity = this.weatherEffects.get(i);
             entity.tick();
-            if(entity.removed)
-            {
-                weatherEffects.remove(i--);
+            if (entity.removed) {
+                this.weatherEffects.remove(i--);
             }
         }
 
-        entities.removeAll(entitiesToRemove);
-        for(int j = 0; j < entitiesToRemove.size(); j++)
-        {
-            Entity entity1 = entitiesToRemove.get(j);
+        this.entities.removeAll(this.entitiesToRemove);
+        for (int j = 0; j < this.entitiesToRemove.size(); j++) {
+            Entity entity1 = this.entitiesToRemove.get(j);
             int i1 = entity1.chunkCoordX;
             int k1 = entity1.chunkCoordZ;
-            if(entity1.addedToChunk && isChunkLoaded(i1, k1))
-            {
+            if (entity1.addedToChunk && isChunkLoaded(i1, k1)) {
                 getChunkFromChunkCoords(i1, k1).removeEntity(entity1);
             }
         }
 
-        for(int k = 0; k < entitiesToRemove.size(); k++)
-        {
-            releaseEntitySkin(entitiesToRemove.get(k));
+        for (int k = 0; k < this.entitiesToRemove.size(); k++) {
+            releaseEntitySkin(this.entitiesToRemove.get(k));
         }
 
-        entitiesToRemove.clear();
-        for(int l = 0; l < entities.size(); l++)
-        {
-            Entity entity2 = entities.get(l);
-            if(entity2.vehicle != null)
-            {
-                if(!entity2.vehicle.isRemoved() && entity2.vehicle.getPassenger() == entity2)
-                {
+        this.entitiesToRemove.clear();
+        for (int l = 0; l < this.entities.size(); l++) {
+            Entity entity2 = this.entities.get(l);
+            if (entity2.vehicle != null) {
+                if (!entity2.vehicle.isRemoved() && entity2.vehicle.getPassenger() == entity2) {
                     continue;
                 }
                 entity2.vehicle.setPassenger(null);
                 entity2.vehicle = null;
             }
-            if(!entity2.removed)
-            {
+            if (!entity2.removed) {
                 updateEntity(entity2);
             }
-            if(!entity2.removed)
-            {
+            if (!entity2.removed) {
                 continue;
             }
             int j1 = entity2.chunkCoordX;
             int l1 = entity2.chunkCoordZ;
-            if(entity2.addedToChunk && isChunkLoaded(j1, l1))
-            {
+            if (entity2.addedToChunk && isChunkLoaded(j1, l1)) {
                 getChunkFromChunkCoords(j1, l1).removeEntity(entity2);
             }
-            entities.remove(l--);
+            this.entities.remove(l--);
             releaseEntitySkin(entity2);
         }
 
-        updatingTileEntities = true;
-        for (int i = tileEntityList.size() - 1; i >= 0; i--) {
-            TileEntity tileEntity = tileEntityList.get(i);
+        this.updatingTileEntities = true;
+        for (int i = this.tileEntityList.size() - 1; i >= 0; i--) {
+            TileEntity tileEntity = this.tileEntityList.get(i);
             if (!tileEntity.isInvalid() && isBlockLoaded(tileEntity.x, tileEntity.y, tileEntity.z)) {
                 tileEntity.tick();
             }
             if (tileEntity.isInvalid()) {
-                tileEntityList.remove(i);
+                this.tileEntityList.remove(i);
                 Chunk chunk = getChunkFromChunkCoords(Math.floorDiv(tileEntity.x, Chunk.CHUNK_SIZE_X), Math.floorDiv(tileEntity.z, Chunk.CHUNK_SIZE_Z));
                 if (chunk != null) {
                     chunk.removeTileEntity(tileEntity);
                 }
             }
         }
-        updatingTileEntities = false;
+        this.updatingTileEntities = false;
     }
 
-    public void addAllBlockEntities(Collection<TileEntity> blockEntities)
-    {
-        tileEntityList.addAll(blockEntities);
+    public void addAllBlockEntities(Collection<TileEntity> blockEntities) {
+        this.tileEntityList.addAll(blockEntities);
     }
 
-    public void updateEntity(Entity entity)
-    {
+    public void updateEntity(Entity entity) {
         updateEntityWithOptionalForce(entity, true);
     }
 
-    public void updateEntityWithOptionalForce(Entity entity, boolean flag)
-    {
+    public void updateEntityWithOptionalForce(Entity entity, boolean flag) {
         int i = MathHelper.floor(entity.x);
         int j = MathHelper.floor(entity.z);
         byte byte0 = 32;
-        if(flag && !areBlocksLoaded(i - byte0, 0, j - byte0, i + byte0, getHeightBlocks() - 1, j + byte0))
-        {
+        if (flag && !areBlocksLoaded(i - byte0, 0, j - byte0, i + byte0, getHeightBlocks() - 1, j + byte0)) {
             //try to despawn if entity wanders into nonexistant chunk
-            if(entity instanceof Mob) {
+            if (entity instanceof Mob) {
                 ((Mob) entity).tryToDespawn();
             }
             return;
@@ -1682,205 +1538,177 @@ public class World implements MutableWorldSource {
         entity.zo = entity.z;
         entity.yRotO = entity.yRot;
         entity.xRotO = entity.xRot;
-        if(flag && entity.addedToChunk)
-        {
-            if(entity.vehicle != null)
-            {
+        if (flag && entity.addedToChunk) {
+            if (entity.vehicle != null) {
                 entity.rideTick();
-            } else
-            {
+            } else {
                 entity.tick();
             }
         }
-        if(Double.isNaN(entity.x) || Double.isInfinite(entity.x))
-        {
+        if (Double.isNaN(entity.x) || Double.isInfinite(entity.x)) {
             entity.x = entity.xo;
         }
-        if(Double.isNaN(entity.y) || Double.isInfinite(entity.y))
-        {
+        if (Double.isNaN(entity.y) || Double.isInfinite(entity.y)) {
             entity.y = entity.yo;
         }
-        if(Double.isNaN(entity.z) || Double.isInfinite(entity.z))
-        {
+        if (Double.isNaN(entity.z) || Double.isInfinite(entity.z)) {
             entity.z = entity.zo;
         }
-        if(Double.isNaN(entity.xRot) || Double.isInfinite(entity.xRot))
-        {
+        if (Double.isNaN(entity.xRot) || Double.isInfinite(entity.xRot)) {
             entity.xRot = entity.xRotO;
         }
-        if(Double.isNaN(entity.yRot) || Double.isInfinite(entity.yRot))
-        {
+        if (Double.isNaN(entity.yRot) || Double.isInfinite(entity.yRot)) {
             entity.yRot = entity.yRotO;
         }
         int k = MathHelper.floor(entity.x / Chunk.CHUNK_SIZE_X);
         int l = MathHelper.floor(entity.y / 16D);
         int i1 = MathHelper.floor(entity.z / Chunk.CHUNK_SIZE_Z);
-        if(!entity.addedToChunk || entity.chunkCoordX != k || entity.chunkCoordY != l || entity.chunkCoordZ != i1)
-        {
-            if(entity.addedToChunk && isChunkLoaded(entity.chunkCoordX, entity.chunkCoordZ))
-            {
+        if (!entity.addedToChunk || entity.chunkCoordX != k || entity.chunkCoordY != l || entity.chunkCoordZ != i1) {
+            if (entity.addedToChunk && isChunkLoaded(entity.chunkCoordX, entity.chunkCoordZ)) {
                 getChunkFromChunkCoords(entity.chunkCoordX, entity.chunkCoordZ).removeEntityAtIndex(entity, entity.chunkCoordY);
             }
-            if(isChunkLoaded(k, i1))
-            {
+            if (isChunkLoaded(k, i1)) {
                 entity.addedToChunk = true;
                 getChunkFromChunkCoords(k, i1).addEntity(entity);
-            } else
-            {
+            } else {
                 entity.addedToChunk = false;
             }
         }
-        if(flag && entity.addedToChunk && entity.passenger != null)
-        {
-            if(entity.passenger.removed || entity.passenger.vehicle != entity)
-            {
+        if (flag && entity.addedToChunk && entity.passenger != null) {
+            if (entity.passenger.removed || entity.passenger.vehicle != entity) {
                 entity.passenger.vehicle = null;
                 entity.passenger = null;
-            } else
-            {
+            } else {
                 updateEntity(entity.passenger);
             }
         }
     }
 
-    public boolean checkIfAABBIsClear(AABB axisalignedbb)
-    {
-        if (axisalignedbb == null) return true;
-        List<Entity> list = getEntitiesWithinAABBExcludingEntity(null, axisalignedbb);
-        for(int i = 0; i < list.size(); i++)
-        {
+    public boolean checkIfAABBIsClear(@NotNull AABBdc aabb) {
+        List<Entity> list = getEntitiesWithinAABBExcludingEntity(null, aabb);
+        for (int i = 0; i < list.size(); i++) {
             Entity entity = list.get(i);
             if (entity instanceof MobFireflyCluster) continue;
-            if(!entity.removed && entity.blocksBuilding)
-            {
+            if (!entity.removed && entity.blocksBuilding) {
                 return false;
             }
         }
 
         return true;
     }
-    
-	public boolean getIsAnySolidGround(AABB boundingBox) {
-		int minX = MathHelper.floor(boundingBox.minX);
-		int maxX = MathHelper.floor(boundingBox.maxX);
-		int minY = MathHelper.floor(boundingBox.minY);
-		int maxY = MathHelper.floor(boundingBox.maxY);
-		int minZ = MathHelper.floor(boundingBox.minZ);
-		int maxZ = MathHelper.floor(boundingBox.maxZ);
-		
-		for(int x = minX; x <= maxX; x++) {
-			for(int y = minY; y <= maxY; y++) {
-				for(int z = minZ; z <= maxZ; z++) {
+
+    public boolean getIsAnySolidGround(@NotNull AABBdc aabb) {
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX());
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY());
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ());
+
+        for (int x = minX; x <= maxX; x++) {
+            for (int y = minY; y <= maxY; y++) {
+                for (int z = minZ; z <= maxZ; z++) {
                     Block<?> block = Blocks.blocksList[getBlockId(x, y, z)];
-					if(block != null) {
-						return true;
-					}
-				}
-			}
-		}
-		
-		List<Entity> entities = getEntitiesWithinAABBExcludingEntity(null, boundingBox);
+                    if (block != null) {
+                        return true;
+                    }
+                }
+            }
+        }
+
+        List<Entity> entities = getEntitiesWithinAABBExcludingEntity(null, aabb);
 
         for (Entity entity : entities) {
-            AABB aabb = entity.getBb();
-            if (aabb != null && aabb.intersects(boundingBox)) {
-                collidingBoundingBoxes.add(aabb);
+            AABBdc collisionAABB = entity.getCollisionAABB();
+            if (collisionAABB != null && collisionAABB.intersectsAABB((AABBd) aabb)) {
+                this.collidingBoundingBoxes.add(collisionAABB);
             }
         }
-		
-		return false;
-	}
+
+        return false;
+    }
 
 
-	public boolean getIsAnyLiquid(AABB boundingBox) {
-		int minX = MathHelper.floor(boundingBox.minX);
-		int maxX = MathHelper.floor(boundingBox.maxX);
-		int minY = MathHelper.floor(boundingBox.minY);
-		int maxY = MathHelper.floor(boundingBox.maxY);
-		int minZ = MathHelper.floor(boundingBox.minZ);
-		int maxZ = MathHelper.floor(boundingBox.maxZ);
+    public boolean getIsAnyLiquid(@NotNull AABBdc aabb) {
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX());
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY());
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ());
 
-		for(int x = minX; x <= maxX; x++) {
-			for(int y = minY; y <= maxY; y++) {
-				for(int z = minZ; z <= maxZ; z++) {
-                    Block<?> block = Blocks.blocksList[getBlockId(x, y, z)];
-					if(block != null && block.getMaterial().isLiquid()) {
-						return true;
-					}
-				}
-			}
-		}
-
-		return false;
-	}
-
-    public boolean isBoundingBoxBurning(AABB aabb)
-    {
-        return isMaterialInBB(aabb, Material.fire, Material.lava);
-    }
-
-    public boolean handleMaterialAcceleration(AABB aabb, Material material, Entity entity, boolean addVelocity)
-    {
-        int i = MathHelper.floor(aabb.minX);
-        int j = MathHelper.floor(aabb.maxX + 1.0D);
-        int k = MathHelper.floor(aabb.minY);
-        int l = MathHelper.floor(aabb.maxY + 1.0D);
-        int i1 = MathHelper.floor(aabb.minZ);
-        int j1 = MathHelper.floor(aabb.maxZ + 1.0D);
-        if(!areBlocksLoaded(i, k, i1, j, l, j1))
-        {
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = minX; tilePos.x <= maxX; tilePos.x++) {
+            for (tilePos.y = minY; tilePos.y <= maxY; tilePos.y++) {
+                for (tilePos.z = minZ; tilePos.z <= maxZ; tilePos.z++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block != null && block.getMaterial().isLiquid()) {
+                        return true;
+                    }
+                }
+            }
+        }
+
+        return false;
+    }
+
+    public boolean isBoundingBoxBurning(@NotNull AABBdc aabb) {
+        return isMaterialInBB(aabb, Materials.FIRE, Materials.LAVA);
+    }
+
+    public boolean handleMaterialAcceleration(@NotNull AABBdc aabb, @NotNull Material material, @NotNull Entity entity, boolean addVelocity) {
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ() + 1.0D);
+        if (!areBlocksLoaded(minX, minY, minZ, maxX, maxY, maxZ)) {
             return false;
         }
         boolean flag = false;
-        Vec3 vec3 = Vec3.fromPool(0.0D, 0.0D, 0.0D);
-        for(int k1 = i; k1 < j; k1++)
-        {
-            for(int l1 = k; l1 < l; l1++)
-            {
-                for(int i2 = i1; i2 < j1; i2++)
-                {
-                    Block<?> block = Blocks.blocksList[getBlockId(k1, l1, i2)];
-                    if(block == null || !isMaterialInBB(aabb, material))
-                    {
+        TilePos tilePos = new TilePos(0, 0, 0);
+        Vector3d velDir = new Vector3d();
+        for (tilePos.x = minX; tilePos.x < maxX; tilePos.x++) {
+            for (tilePos.y = minY; tilePos.y < maxY; tilePos.y++) {
+                for (tilePos.z = minZ; tilePos.z < maxZ; tilePos.z++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block == null || !isMaterialInBB(aabb, material)) {
                         continue;
                     }
                     flag = true;
-                    block.handleEntityInside(this, k1, l1, i2, entity, vec3);
+                    block.onEntityInside(this, tilePos, entity, velDir);
                 }
 
             }
 
         }
 
-        if(vec3.length() > 0.0D && addVelocity)
-        {
-            vec3 = vec3.normalize();
+        if (velDir.length() > 0.0D && addVelocity) {
+            velDir.normalize();
             double d = 0.014D;
-            entity.xd += vec3.x * d;
-            entity.yd += vec3.y * d;
-            entity.zd += vec3.z * d;
+            entity.xd += velDir.x * d;
+            entity.yd += velDir.y * d;
+            entity.zd += velDir.z * d;
         }
         return flag;
     }
 
-    public boolean isMaterialInBB(AABB aabb, Material ... materials)
-    {
-        int minX_i = MathHelper.floor(aabb.minX);
-        int maxX_i = MathHelper.floor(aabb.maxX + 1.0D);
-        int minY_i = MathHelper.floor(aabb.minY);
-        int maxY_i = MathHelper.floor(aabb.maxY + 1.0D);
-        int minZ_i = MathHelper.floor(aabb.minZ);
-        int maxZ_i = MathHelper.floor(aabb.maxZ + 1.0D);
-        for(int _x = minX_i; _x < maxX_i; _x++)
-        {
-            for(int _y = minY_i; _y < maxY_i; _y++)
-            {
-                for(int _z = minZ_i; _z < maxZ_i; _z++)
-                {
-                    Block<?> block = Blocks.blocksList[getBlockId(_x, _y, _z)];
-                    if(block != null) {
+    public boolean isMaterialInBB(@NotNull AABBdc aabb, @NotNull Material @NotNull ... materials) {
+        int minX_i = MathHelper.floor(aabb.minX());
+        int maxX_i = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY_i = MathHelper.floor(aabb.minY());
+        int maxY_i = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ_i = MathHelper.floor(aabb.minZ());
+        int maxZ_i = MathHelper.floor(aabb.maxZ() + 1.0D);
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = minX_i; tilePos.x < maxX_i; tilePos.x++) {
+            for (tilePos.y = minY_i; tilePos.y < maxY_i; tilePos.y++) {
+                for (tilePos.z = minZ_i; tilePos.z < maxZ_i; tilePos.z++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block != null) {
                         boolean isMaterial = false;
-                        for (Material m : materials){
+                        for (Material m : materials) {
                             if (block.getMaterial() == m) {
                                 isMaterial = true;
                                 break;
@@ -1888,7 +1716,7 @@ public class World implements MutableWorldSource {
                         }
                         if (!isMaterial) continue;
 
-                        if (aabb.intersects(block.getBlockBoundsFromState(this, _x, _y, _z).move(_x, _y, _z))){
+                        if (aabb.intersectsAABB(block.getBoundsFromState(this, tilePos).translate(tilePos.x, tilePos.y, tilePos.z, new AABBd()))) {
                             return true;
                         }
 
@@ -1900,28 +1728,24 @@ public class World implements MutableWorldSource {
         return false;
     }
 
-    public boolean isMaterialInBB(AABB aabb, Material material)
-    {
-        int minX_i = MathHelper.floor(aabb.minX);
-        int maxX_i = MathHelper.floor(aabb.maxX + 1.0D);
-        int minY_i = MathHelper.floor(aabb.minY);
-        int maxY_i = MathHelper.floor(aabb.maxY + 1.0D);
-        int minZ_i = MathHelper.floor(aabb.minZ);
-        int maxZ_i = MathHelper.floor(aabb.maxZ + 1.0D);
-        for(int _x = minX_i; _x < maxX_i; _x++)
-        {
-            for(int _y = minY_i; _y < maxY_i; _y++)
-            {
-                for(int _z = minZ_i; _z < maxZ_i; _z++)
-                {
-                    Block<?> block = Blocks.blocksList[getBlockId(_x, _y, _z)];
-                    if(block != null) {
+    public boolean isMaterialInBB(@NotNull AABBdc aabb, @NotNull Material material) {
+        int minX_i = MathHelper.floor(aabb.minX());
+        int maxX_i = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY_i = MathHelper.floor(aabb.minY());
+        int maxY_i = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ_i = MathHelper.floor(aabb.minZ());
+        int maxZ_i = MathHelper.floor(aabb.maxZ() + 1.0D);
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = minX_i; tilePos.x < maxX_i; tilePos.x++) {
+            for (tilePos.y = minY_i; tilePos.y < maxY_i; tilePos.y++) {
+                for (tilePos.z = minZ_i; tilePos.z < maxZ_i; tilePos.z++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block != null) {
                         if (block.getMaterial() != material) continue;
 
-                        if (aabb.intersects(block.getBlockBoundsFromState(this, _x, _y, _z).move(_x, _y, _z))){
+                        if (aabb.intersectsAABB(block.getBoundsFromState(this, tilePos).translate(tilePos.x, tilePos.y, tilePos.z, new AABBd()))) {
                             return true;
                         }
-
                     }
                 }
             }
@@ -1930,33 +1754,27 @@ public class World implements MutableWorldSource {
         return false;
     }
 
-    public boolean isAABBInMaterial(AABB aabb, Material material)
-    {
-        int i = MathHelper.floor(aabb.minX);
-        int j = MathHelper.floor(aabb.maxX + 1.0D);
-        int k = MathHelper.floor(aabb.minY);
-        int l = MathHelper.floor(aabb.maxY + 1.0D);
-        int i1 = MathHelper.floor(aabb.minZ);
-        int j1 = MathHelper.floor(aabb.maxZ + 1.0D);
-        for(int k1 = i; k1 < j; k1++)
-        {
-            for(int l1 = k; l1 < l; l1++)
-            {
-                for(int i2 = i1; i2 < j1; i2++)
-                {
-                    Block<?> block = Blocks.blocksList[getBlockId(k1, l1, i2)];
-                    if(block == null || block.getMaterial() != material)
-                    {
+    public boolean isAABBInMaterial(@NotNull AABBdc aabb, @NotNull Material material) {
+        int minX = MathHelper.floor(aabb.minX());
+        int maxX = MathHelper.floor(aabb.maxX() + 1.0D);
+        int minY = MathHelper.floor(aabb.minY());
+        int maxY = MathHelper.floor(aabb.maxY() + 1.0D);
+        int minZ = MathHelper.floor(aabb.minZ());
+        int maxZ = MathHelper.floor(aabb.maxZ() + 1.0D);
+        TilePos tilePos = new TilePos(0, 0, 0);
+        for (tilePos.x = minX; tilePos.x < maxX; tilePos.x++) {
+            for (tilePos.y = minY; tilePos.y < maxY; tilePos.y++) {
+                for (tilePos.z = minZ; tilePos.z < maxZ; tilePos.z++) {
+                    Block<?> block = getBlock(tilePos);
+                    if (block == null || block.getMaterial() != material) {
                         continue;
                     }
-                    int j2 = getBlockMetadata(k1, l1, i2);
-                    double d = l1 + 1;
-                    if(j2 < 8)
-                    {
-                        d = (double)(l1 + 1) - (double)j2 / 8D;
+                    int j2 = getBlockData(tilePos);
+                    double d = tilePos.y + 1;
+                    if (j2 < 8) {
+                        d = (double) (tilePos.y + 1) - (double) j2 / 8D;
                     }
-                    if(d >= aabb.minY)
-                    {
+                    if (d >= aabb.minY()) {
                         return true;
                     }
                 }
@@ -1968,15 +1786,13 @@ public class World implements MutableWorldSource {
         return false;
     }
 
-    public Explosion createExplosion(Entity entity, double x, double y, double z, float explosionSize)
-    {
+    public Explosion createExplosion(Entity entity, double x, double y, double z, float explosionSize) {
         return createExplosion(entity, x, y, z, explosionSize, false, false);
     }
 
-    public Explosion createExplosion(Entity entity, double x, double y, double z, float explosionSize, boolean flaming, boolean isCannonBall)
-    {
+    public Explosion createExplosion(Entity entity, double x, double y, double z, float explosionSize, boolean flaming, boolean isCannonBall) {
         Explosion explosion;
-        if(!isCannonBall)
+        if (!isCannonBall)
             explosion = new Explosion(this, entity, x, y, z, explosionSize);
         else
             explosion = new ExplosionCannonball(this, entity, x, y, z, explosionSize);
@@ -1986,24 +1802,20 @@ public class World implements MutableWorldSource {
         return explosion;
     }
 
-    public float getSeenPercent(Vec3 vec3, AABB aabb)
-    {
-        double d = 1.0D / ((aabb.maxX - aabb.minX) * 2D + 1.0D);
-        double d1 = 1.0D / ((aabb.maxY - aabb.minY) * 2D + 1.0D);
-        double d2 = 1.0D / ((aabb.maxZ - aabb.minZ) * 2D + 1.0D);
+    public float getSeenPercent(@NotNull Vector3dc eyePos, @NotNull AABBdc aabb) {
+        double d = 1.0D / ((aabb.maxX() - aabb.minX()) * 2D + 1.0D);
+        double d1 = 1.0D / ((aabb.maxY() - aabb.minY()) * 2D + 1.0D);
+        double d2 = 1.0D / ((aabb.maxZ() - aabb.minZ()) * 2D + 1.0D);
         int i = 0;
         int j = 0;
-        for(float f = 0.0F; f <= 1.0F; f = (float)((double)f + d))
-        {
-            for(float f1 = 0.0F; f1 <= 1.0F; f1 = (float)((double)f1 + d1))
-            {
-                for(float f2 = 0.0F; f2 <= 1.0F; f2 = (float)((double)f2 + d2))
-                {
-                    double d3 = aabb.minX + (aabb.maxX - aabb.minX) * (double)f;
-                    double d4 = aabb.minY + (aabb.maxY - aabb.minY) * (double)f1;
-                    double d5 = aabb.minZ + (aabb.maxZ - aabb.minZ) * (double)f2;
-                    if(checkBlockCollisionBetweenPoints(Vec3.fromPool(d3, d4, d5), vec3) == null)
-                    {
+        Vector3d entCheckPos = new Vector3d();
+        for (float f = 0.0F; f <= 1.0F; f = (float) ((double) f + d)) {
+            for (float f1 = 0.0F; f1 <= 1.0F; f1 = (float) ((double) f1 + d1)) {
+                for (float f2 = 0.0F; f2 <= 1.0F; f2 = (float) ((double) f2 + d2)) {
+                    double x = aabb.minX() + (aabb.maxX() - aabb.minX()) * (double) f;
+                    double y = aabb.minY() + (aabb.maxY() - aabb.minY()) * (double) f1;
+                    double z = aabb.minZ() + (aabb.maxZ() - aabb.minZ()) * (double) f2;
+                    if (checkBlockCollisionBetweenPoints(eyePos, entCheckPos.set(x, y, z)) == null) {
                         i++;
                     }
                     j++;
@@ -2013,11 +1825,11 @@ public class World implements MutableWorldSource {
 
         }
 
-        return (float)i / (float)j;
+        return (float) i / (float) j;
     }
 
     public void onBlockHit(final @NotNull Player player, final @NotNull TilePos tilePos, final @NotNull Side side) {
-        final @NotNull TilePos offsetPos = tilePos.add(side.getDirection());
+        final @NotNull TilePos offsetPos = tilePos.add(side.getDirection(), new TilePos());
         final @Nullable Block<?> block = this.getBlock(offsetPos);
 
         if (block == Blocks.FIRE || block == Blocks.FIRE_COLD) {
@@ -2031,13 +1843,10 @@ public class World implements MutableWorldSource {
         this.onBlockHit(player, new TilePos(x, y, z), side);
     }
 
-    public @Nullable Entity getEntityByID(int id)
-    {
-        for(int i = 0; i < entities.size(); i++)
-        {
-            Entity entity = entities.get(i);
-            if(entity.id == id)
-            {
+    public @Nullable Entity getEntityByID(int id) {
+        for (int i = 0; i < this.entities.size(); i++) {
+            Entity entity = this.entities.get(i);
+            if (entity.id == id) {
                 return entity;
             }
         }
@@ -2045,33 +1854,31 @@ public class World implements MutableWorldSource {
         return null;
     }
 
-    public String getNumLoadedEntitiesString()
-    {
-        return "All: " + entities.size();
+    public String getNumLoadedEntitiesString() {
+        return "All: " + this.entities.size();
     }
 
-    public String getChunkProviderInfoString()
-    {
-        return chunkProvider.getInfoString();
+    public String getChunkProviderInfoString() {
+        return this.chunkProvider.getInfoString();
     }
 
     @Override
-    public @Nullable TileEntity getTileEntity(final @NotNull TilePos tilePos) {
+    public @Nullable TileEntity getTileEntity(final @NotNull TilePosc tilePos) {
         final @NotNull Chunk chunk = this.getChunk(tilePos);
-        return chunk.getTileEntity(tilePos.toChunkTilePos());
+        return chunk.getTileEntity(new ChunkTilePos(tilePos));
     }
 
     @Override
-    public void setTileEntity(final @NotNull TilePos tilePos, final @NotNull TileEntity tileEntity) {
+    public void setTileEntity(final @NotNull TilePosc tilePos, final @NotNull TileEntity tileEntity) {
         if (!tileEntity.isInvalid()) {
-            if (this.getChunk(tilePos).setTileEntity(tilePos.toChunkTilePos(), tileEntity) && !this.tileEntityList.contains(tileEntity)) {
+            if (this.getChunk(tilePos).setTileEntity(new ChunkTilePos(tilePos), tileEntity) && !this.tileEntityList.contains(tileEntity)) {
                 this.tileEntityList.add(tileEntity);
             }
         }
     }
 
     @Override
-    public void removeTileEntity(final @NotNull TilePos tilePos) {
+    public void removeTileEntity(final @NotNull TilePosc tilePos) {
         final @Nullable TileEntity tileEntity = this.getTileEntity(tilePos);
 
         if (tileEntity != null && this.updatingTileEntities) {
@@ -2086,7 +1893,7 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public boolean isBlockOpaqueCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockOpaqueCube(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         return block != null && block.isSolidRender();
     }
@@ -2116,13 +1923,13 @@ public class World implements MutableWorldSource {
     }
 
     @Override
-    public boolean isBlockNormalCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockNormalCube(final @NotNull TilePosc tilePos) {
         // Determines if you suffocate in a block, among other things.
         final @Nullable Block<?> block = this.getBlock(tilePos);
-        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos.x, tilePos.y, tilePos.z);
+        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos);
     }
 
-    public boolean canPlaceInsideBlock(final @NotNull TilePos tilePos) {
+    public boolean canPlaceInsideBlock(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         return block == null || block.hasTag(BlockTags.PLACE_OVERWRITES);
     }
@@ -2132,8 +1939,7 @@ public class World implements MutableWorldSource {
         return this.canPlaceInsideBlock(new TilePos(x, y, z));
     }
 
-    public void onUnload()
-    {
+    public void onUnload() {
         // Unloads all entities
         try {
             updateEntities();
@@ -2141,8 +1947,8 @@ public class World implements MutableWorldSource {
             LOGGER.error("Unhandled exception while unloading all entities!", t);
             throw t;
         } finally {
-            entities.clear();
-            entitiesToRemove.clear();
+            this.entities.clear();
+            this.entitiesToRemove.clear();
         }
     }
 
@@ -2150,13 +1956,11 @@ public class World implements MutableWorldSource {
         this.chunkProvider.close();
     }
 
-    public void saveWorldIndirectly(ProgressListener iprogressupdate)
-    {
+    public void saveWorldIndirectly(ProgressListener iprogressupdate) {
         saveWorld(true, iprogressupdate, true);
     }
 
-    public boolean updatingLighting()
-    {
+    public boolean updatingLighting() {
         return this.lightingEngine.updatingLighting();
     }
 
@@ -2177,7 +1981,7 @@ public class World implements MutableWorldSource {
     }
 
     public LightingEngine getLightingEngine() {
-        return lightingEngine;
+        return this.lightingEngine;
     }
 
     @Deprecated
@@ -2185,168 +1989,156 @@ public class World implements MutableWorldSource {
         this.scheduleLightingUpdate(lightLayer, new TilePos(minX, minY, minZ), new TilePos(maxX, maxY, maxZ));
     }
 
-    public void updateSkyBrightness()
-    {
-        int i = worldType.getSkyDarken(this, getWorldTime(), 1.0F);
-        if(i != skyDarken)
-        {
-            skyDarken = i;
+    public void updateSkyBrightness() {
+        int i = this.worldType.getSkyDarken(this, getWorldTime(), 1.0F);
+        if (i != this.skyDarken) {
+            this.skyDarken = i;
         }
     }
 
     public void allChanged(boolean lightChanged, boolean seasonChanged) {
-		for(int i= 0; i < listeners.size(); i++) {
-            listeners.get(i).allChanged(lightChanged, seasonChanged);
-		}
+        for (int i = 0; i < this.listeners.size(); i++) {
+            this.listeners.get(i).allChanged(lightChanged, seasonChanged);
+        }
     }
 
-    protected void updateSleepingPlayers()
-    {
-        if(areEnoughPlayersFullyAsleep())
-        {
+    protected void updateSleepingPlayers() {
+        if (areEnoughPlayersFullyAsleep()) {
             boolean wasInterrupted = false;
-            if(getSpawnerConfig().canHostileSpawn(this) && getPlayersRequiredToSkipNight() <= 1)
-            {
-                wasInterrupted = SpawnerMobs.performSleepSpawning(this, players);
-            }
-            if(!wasInterrupted)
-            {
-                long timePlusOneDay = levelData.getWorldTime() + Global.DAY_LENGTH_TICKS;
-                levelData.setWorldTime(timePlusOneDay - timePlusOneDay % Global.DAY_LENGTH_TICKS + worldType.getSunriseTick(this) + DAY_LENGTH_TICKS / 24);
-                
+            if (getSpawnerConfig().canHostileSpawn(this) && getPlayersRequiredToSkipNight() <= 1) {
+                wasInterrupted = SpawnerMobs.performSleepSpawning(this, this.players);
+            }
+            if (!wasInterrupted) {
+                long timePlusOneDay = this.levelData.getWorldTime() + Global.DAY_LENGTH_TICKS;
+                this.levelData.setWorldTime(timePlusOneDay - timePlusOneDay % Global.DAY_LENGTH_TICKS + this.worldType.getSunriseTick(this) + DAY_LENGTH_TICKS / 24);
+
                 wakeUpAllPlayers();
             }
         }
     }
 
-	public void tick() {
+    public void tick() {
         Debug.push("misc");
-        immediatelyUpdatedPositions.clear();
+        this.immediatelyUpdatedPositions.clear();
         Debug.change("weather");
-        weatherManager.tick();
+        this.weatherManager.tick();
         Debug.change("misc");
         updateSleepingPlayers();
         Debug.change("spawning");
         // TODO mob spawning seems to be the cause of many lag spikes, specifically the checks for is a mob is allowed to spawn at a certain xyz position seem to be the worst offenders
         SpawnerMobs.performSpawning(this, getSpawnerConfig());
         Debug.change("chunk");
-        chunkProvider.tick();
+        this.chunkProvider.tick();
 
         Debug.change("autosave");
         int autosaveTimeInSeconds = Global.accessor.getAutosaveTimer();
         int autosaveTimeInTicks = (autosaveTimeInSeconds * 20);
 
         AUTOSAVE = autosaveTimeInTicks != 0;
-        if(AUTOSAVE && runtime % (long) autosaveTimeInTicks == 0L) {
+        if (AUTOSAVE && this.runtime % (long) autosaveTimeInTicks == 0L) {
             saveWorld(false, null, true);
         }
 
         Debug.change("misc");
-        if(getGameRuleValue(GameRules.DO_DAY_CYCLE)) {
-            levelData.setWorldTime(levelData.getWorldTime() + 1L);
+        if (getGameRuleValue(GameRules.DO_DAY_CYCLE)) {
+            this.levelData.setWorldTime(this.levelData.getWorldTime() + 1L);
         }
 
-        runtime++;
+        this.runtime++;
 
         tickPendingTicks(false);
         Debug.change("blocks&cavesSounds");
         updateBlocksAndPlayCaveSounds();
         Debug.change("season&light");
         updateSeasonAndLight();
-        if(rainbowTicks > 0)
-        {
-            rainbowTicks--;
+        if (this.rainbowTicks > 0) {
+            this.rainbowTicks--;
         }
         Debug.pop();
-	}
+    }
 
-	public void updateSeasonAndLight() {
-		boolean seasonChanged = false;
-		boolean lightChanged = false;
+    public void updateSeasonAndLight() {
+        boolean seasonChanged = false;
+        boolean lightChanged = false;
 
-		int currentDayCount = ((int) (levelData.getWorldTime() / Global.DAY_LENGTH_TICKS));
-		if(currentDayCount != dayCountLastTick) {
-			dayCountLastTick = currentDayCount;
-            if (!isClientSide){
-                dayCanHaveRainbow = rand.nextInt(3) == 0;
+        int currentDayCount = ((int) (this.levelData.getWorldTime() / Global.DAY_LENGTH_TICKS));
+        if (currentDayCount != this.dayCountLastTick) {
+            this.dayCountLastTick = currentDayCount;
+            if (!this.isClientSide) {
+                this.dayCanHaveRainbow = this.rand.nextInt(3) == 0;
             } else {
-                dayCanHaveRainbow = true;
-            }
-			seasonChanged = true;
-		}
-
-		int currentSkyDarken = worldType.getSkyDarken(this, getWorldTime(), 1.0f);
-		if(currentSkyDarken != skyDarken) {
-			skyDarken = currentSkyDarken;
-			lightChanged = true;
-		}
-
-		if(seasonChanged || lightChanged) {
-			allChanged(lightChanged, seasonChanged);
-		}
-	}
-
-    protected void updateBlocksAndPlayCaveSounds()
-    {
-        positionsToUpdate.clear();
-        for(int i = 0; i < players.size(); i++)
-        {
-            Player entityplayer = players.get(i);
+                this.dayCanHaveRainbow = true;
+            }
+            seasonChanged = true;
+        }
+
+        int currentSkyDarken = this.worldType.getSkyDarken(this, getWorldTime(), 1.0f);
+        if (currentSkyDarken != this.skyDarken) {
+            this.skyDarken = currentSkyDarken;
+            lightChanged = true;
+        }
+
+        if (seasonChanged || lightChanged) {
+            allChanged(lightChanged, seasonChanged);
+        }
+    }
+
+    protected void updateBlocksAndPlayCaveSounds() {
+        this.positionsToUpdate.clear();
+        for (int i = 0; i < this.players.size(); i++) {
+            Player entityplayer = this.players.get(i);
             int playerChunkX = MathHelper.floor(entityplayer.x / Chunk.CHUNK_SIZE_X);
             int playerChunkZ = MathHelper.floor(entityplayer.z / Chunk.CHUNK_SIZE_Z);
             byte radius = 9;
-            for(int x = -radius; x <= radius; x++)
-            {
-                for(int z = -radius; z <= radius; z++)
-                {
-                    positionsToUpdate.add(new ChunkCoordinate(x + playerChunkX, z + playerChunkZ));
+            for (int x = -radius; x <= radius; x++) {
+                for (int z = -radius; z <= radius; z++) {
+                    this.positionsToUpdate.add(new ChunkCoordinate(x + playerChunkX, z + playerChunkZ));
                 }
             }
         }
 
-        if(caveSoundCounter > 0)
-        {
-            caveSoundCounter--;
+        if (this.caveSoundCounter > 0) {
+            this.caveSoundCounter--;
         }
         final int randomTicks = getGameRuleValue(GameRules.RANDOM_TICK_SPEED);
-        for (ChunkCoordinate coordinate : positionsToUpdate) {
+        for (ChunkCoordinate coordinate : this.positionsToUpdate) {
             int chunkBlockX = coordinate.x * Chunk.CHUNK_SIZE_X;
             int chunkBlockZ = coordinate.z * Chunk.CHUNK_SIZE_Z;
             if (!isChunkLoaded(coordinate.x, coordinate.z)) {
                 continue;
             }
             Chunk chunk = getChunkFromChunkCoords(coordinate.x, coordinate.z);
-            updateLCG = updateLCG * 3 + 0x3c6ef35f;
-            int randVal = updateLCG >> 2;
+            this.updateLCG = this.updateLCG * 3 + 0x3c6ef35f;
+            int randVal = this.updateLCG >> 2;
             int blockX = randVal & (Chunk.CHUNK_SIZE_X - 1);
             int blockZ = (randVal / (Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X)) & (Chunk.CHUNK_SIZE_Z - 1);
 
-            if (caveSoundCounter == 0) {
+            if (this.caveSoundCounter == 0) {
                 int blockY = (randVal / (HEIGHT_BLOCKS * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X)) & (HEIGHT_BLOCKS - 1);
                 int id = chunk.getBlockID(blockX, blockY, blockZ);
                 blockX += chunkBlockX;
                 blockZ += chunkBlockZ;
-                if (id == 0 && getFullBlockLightValue(blockX, blockY, blockZ) <= rand.nextInt(8) && getSavedLightValue(LightLayer.Sky, blockX, blockY, blockZ) <= 0) {
+                if (id == 0 && getFullBlockLightValue(blockX, blockY, blockZ) <= this.rand.nextInt(8) && getSavedLightValue(LightLayer.Sky, blockX, blockY, blockZ) <= 0) {
                     Player closestPlayer = getClosestPlayer((double) blockX + 0.5D, (double) blockY + 0.5D, (double) blockZ + 0.5D, 8D);
                     if (closestPlayer != null && closestPlayer.distanceToSqr((double) blockX + 0.5D, (double) blockY + 0.5D, (double) blockZ + 0.5D) > 4D) {
-                        playSoundEffect(null, SoundCategory.CAVE_SOUNDS, (double) blockX + 0.5D, (double) blockY + 0.5D, (double) blockZ + 0.5D, "ambient.cave.cave", 0.7F, 0.8F + rand.nextFloat() * 0.2F);
-                        caveSoundCounter = rand.nextInt(12000) + 6000;
+                        playSoundEffect(null, SoundCategory.CAVE_SOUNDS, (double) blockX + 0.5D, (double) blockY + 0.5D, (double) blockZ + 0.5D, "ambient.cave.cave", 0.7F, 0.8F + this.rand.nextFloat() * 0.2F);
+                        this.caveSoundCounter = this.rand.nextInt(12000) + 6000;
                     }
                 }
             }
 
             if (getCurrentWeather() != null) {
-                updateLCG = updateLCG * 3 + 0x3c6ef35f;
-                randVal = updateLCG >> 2;
+                this.updateLCG = this.updateLCG * 3 + 0x3c6ef35f;
+                randVal = this.updateLCG >> 2;
                 int weatherBlockX = randVal & (Chunk.CHUNK_SIZE_X - 1);
                 int weatherBlockZ = (randVal / (Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X)) & (Chunk.CHUNK_SIZE_Z - 1);
-                getCurrentWeather().doEnvironmentUpdate(this, rand, chunkBlockX + weatherBlockX, chunkBlockZ + weatherBlockZ);
+                getCurrentWeather().doEnvironmentUpdate(this, this.rand, chunkBlockX + weatherBlockX, chunkBlockZ + weatherBlockZ);
             }
 
             for (int s = 0; s < Chunk.CHUNK_SECTIONS; s++) {
                 for (int i = 0; i < randomTicks; i++) {
-                    updateLCG = updateLCG * 3 + 0x3c6ef35f;
-                    int iRandVal = updateLCG >> 2;
+                    this.updateLCG = this.updateLCG * 3 + 0x3c6ef35f;
+                    int iRandVal = this.updateLCG >> 2;
                     int iBlockX = iRandVal & (Chunk.CHUNK_SIZE_X - 1);
                     int iBlockZ = (iRandVal / (Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X)) & (Chunk.CHUNK_SIZE_Z - 1);
                     int iBlockY = (iRandVal / (ChunkSection.SECTION_SIZE_Y * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X)) & (ChunkSection.SECTION_SIZE_Y - 1) + s * ChunkSection.SECTION_SIZE_Y;
@@ -2362,57 +2154,48 @@ public class World implements MutableWorldSource {
 
     public boolean tickPendingTicks(final boolean all) {
         int count = this.tickNextTickList.size();
-        if(count > MAX_SCHEDULED_TICKS_IN_TICK)
-        {
+        if (count != this.tickNextTickSet.size()) {
+            throw new IllegalStateException("TickNextTick lists out of sync");
+        }
+        if (count > MAX_SCHEDULED_TICKS_IN_TICK) {
             count = MAX_SCHEDULED_TICKS_IN_TICK;
         }
 
-        for (int i = 0; i < count; i++)
-        {
+        for (int i = 0; i < count; i++) {
             final @NotNull NextTickListEntry entry = this.tickNextTickList.first();
-            if(!all && entry.getEndTime() > this.getWorldTime())
-            {
+            if (!all && entry.delay > runtime) {
                 break;
             }
-            if (!entry.loaded) {
-                this.tickNextTickList.remove(entry);
-            }
+            this.tickNextTickList.remove(entry);
+            this.tickNextTickSet.remove(entry);
             final byte radius = 8;
-            if(!this.areBlocksLoaded(entry.x - radius, entry.y - radius, entry.z - radius, entry.x + radius, entry.y + radius, entry.z + radius)) {
-                if (entry.loaded) { // Re-insert loaded tick with appropriate delay
-                    entry.creationTime = this.getWorldTime();
-                }
+            if (!this.areBlocksLoaded(entry.tilePos.x - radius, entry.tilePos.y - radius, entry.tilePos.z - radius, entry.tilePos.x + radius, entry.tilePos.y + radius, entry.tilePos.z + radius)) {
                 continue;
             }
-            if (entry.loaded) {
-                this.tickNextTickList.remove(entry);
-            }
-            final @NotNull Chunk chunk = Objects.requireNonNull(this.getChunkFromBlockCoords(entry.x, entry.z));
-            chunk.dropTick(entry);
-            final @Nullable Block<?> block = this.getBlock(entry.x, entry.y, entry.z);
-            if(block != null && block.id() == entry.blockId)
-            {
-                block.updateTick(this, entry.x, entry.y, entry.z, this.rand, false);
+            final @Nullable Block<?> block = this.getBlock(entry.tilePos);
+            if (block != null && block.id() == entry.blockId) {
+                block.updateTick(this, entry.tilePos, this.rand, false);
             }
         }
 
-        return !tickNextTickList.isEmpty();
+        return !this.tickNextTickList.isEmpty();
     }
 
     public void randomDisplayUpdates(final @NotNull TilePos tilePos) {
         final int radius = 16;
         final @NotNull Random random = new Random();
 
-        for(int i = 0; i < ANIMATION_TICKS_PER_TICK; i++) {
-            final @NotNull TilePos randomPos = tilePos.add(
+        TilePos randomPos = new TilePos();
+        for (int i = 0; i < ANIMATION_TICKS_PER_TICK; i++) {
+            tilePos.add(
                 this.rand.nextInt(radius) - this.rand.nextInt(radius),
                 this.rand.nextInt(radius) - this.rand.nextInt(radius),
-                this.rand.nextInt(radius) - this.rand.nextInt(radius)
-            );
+                this.rand.nextInt(radius) - this.rand.nextInt(radius),
+                randomPos);
 
             final @Nullable Block<?> block = this.getBlock(randomPos);
             if (block != null) {
-                block.animationTick(this, randomPos.x, randomPos.y, randomPos.z, random);
+                block.animationTick(this, randomPos, random);
             }
         }
     }
@@ -2422,40 +2205,32 @@ public class World implements MutableWorldSource {
         this.randomDisplayUpdates(new TilePos(x, y, z));
     }
 
-    public List<Entity> getEntitiesWithinAABBExcludingEntity(Entity entity, AABB aabb)
-    {
-        entityBuffer.clear();
-        int minX = MathHelper.floor((aabb.minX - 2D) / Chunk.CHUNK_SIZE_X);
-        int maxX = MathHelper.floor((aabb.maxX + 2D) / Chunk.CHUNK_SIZE_X);
-        int minZ = MathHelper.floor((aabb.minZ - 2D) / Chunk.CHUNK_SIZE_Z);
-        int maxZ = MathHelper.floor((aabb.maxZ + 2D) / Chunk.CHUNK_SIZE_Z);
-        for(int x = minX; x <= maxX; x++)
-        {
-            for(int z = minZ; z <= maxZ; z++)
-            {
-                if(isChunkLoaded(x, z))
-                {
-                    getChunkFromChunkCoords(x, z).getEntitiesWithin(entity, aabb, entityBuffer);
+    public @NotNull List<@NotNull Entity> getEntitiesWithinAABBExcludingEntity(@Nullable Entity entity, @NotNull AABBdc aabb) {
+        this.entityBuffer.clear();
+        int minX = MathHelper.floor((aabb.minX() - 2D) / Chunk.CHUNK_SIZE_X);
+        int maxX = MathHelper.floor((aabb.maxX() + 2D) / Chunk.CHUNK_SIZE_X);
+        int minZ = MathHelper.floor((aabb.minZ() - 2D) / Chunk.CHUNK_SIZE_Z);
+        int maxZ = MathHelper.floor((aabb.maxZ() + 2D) / Chunk.CHUNK_SIZE_Z);
+        for (int x = minX; x <= maxX; x++) {
+            for (int z = minZ; z <= maxZ; z++) {
+                if (isChunkLoaded(x, z)) {
+                    getChunkFromChunkCoords(x, z).getEntitiesWithin(entity, aabb, this.entityBuffer);
                 }
             }
         }
 
-        return entityBuffer;
+        return this.entityBuffer;
     }
 
-    public <T extends Entity> @NotNull List<@NotNull T> getEntitiesWithinAABB(Class<T> ofClass, AABB aabb)
-    {
-        int minX = MathHelper.floor((aabb.minX - 2D) / Chunk.CHUNK_SIZE_X);
-        int maxX = MathHelper.floor((aabb.maxX + 2D) / Chunk.CHUNK_SIZE_X);
-        int minZ = MathHelper.floor((aabb.minZ - 2D) / Chunk.CHUNK_SIZE_Z);
-        int maxZ = MathHelper.floor((aabb.maxZ + 2D) / Chunk.CHUNK_SIZE_Z);
+    public <T extends Entity> @NotNull List<@NotNull T> getEntitiesWithinAABB(@NotNull Class<T> ofClass, @NotNull AABBdc aabb) {
+        int minX = MathHelper.floor((aabb.minX() - 2D) / Chunk.CHUNK_SIZE_X);
+        int maxX = MathHelper.floor((aabb.maxX() + 2D) / Chunk.CHUNK_SIZE_X);
+        int minZ = MathHelper.floor((aabb.minZ() - 2D) / Chunk.CHUNK_SIZE_Z);
+        int maxZ = MathHelper.floor((aabb.maxZ() + 2D) / Chunk.CHUNK_SIZE_Z);
         List<@NotNull T> entities = new ArrayList<>();
-        for(int x = minX; x <= maxX; x++)
-        {
-            for(int z = minZ; z <= maxZ; z++)
-            {
-                if(isChunkLoaded(x, z))
-                {
+        for (int x = minX; x <= maxX; x++) {
+            for (int z = minZ; z <= maxZ; z++) {
+                if (isChunkLoaded(x, z)) {
                     getChunkFromChunkCoords(x, z).getEntitiesWithin(ofClass, aabb, entities);
                 }
             }
@@ -2465,14 +2240,12 @@ public class World implements MutableWorldSource {
         return entities;
     }
 
-    public List<Entity> getLoadedEntityList()
-    {
-        return entities;
+    public @NotNull List<@NotNull Entity> getLoadedEntityList() {
+        return this.entities;
     }
 
-    public List<TileEntity> getLoadedTileEntityList()
-    {
-        return tileEntityList;
+    public @NotNull List<@NotNull TileEntity> getLoadedTileEntityList() {
+        return this.tileEntityList;
     }
 
     public void updateTileEntityChunkAndSendToPlayer(final @NotNull TilePos tilePos, final @NotNull TileEntity tileEntity) {
@@ -2490,11 +2263,10 @@ public class World implements MutableWorldSource {
         this.updateTileEntityChunkAndSendToPlayer(new TilePos(x, y, z), tileEntity);
     }
 
-    public int countEntities(Class<?> clazz)
-    {
+    public int countEntities(Class<?> clazz) {
         int i = 0;
-        for (int j = 0, entitiesSize = entities.size(); j < entitiesSize; j++) {
-            Entity entity = entities.get(j);
+        for (int j = 0, entitiesSize = this.entities.size(); j < entitiesSize; j++) {
+            Entity entity = this.entities.get(j);
             if (clazz.isAssignableFrom(entity.getClass())) {
                 i++;
             }
@@ -2503,9 +2275,8 @@ public class World implements MutableWorldSource {
         return i;
     }
 
-    public void addLoadedEntities(List<Entity> list)
-    {
-        entities.addAll(list);
+    public void addLoadedEntities(List<Entity> list) {
+        this.entities.addAll(list);
         for (int i = 0, listSize = list.size(); i < listSize; i++) {
             Entity entity = list.get(i);
             obtainEntitySkin(entity);
@@ -2513,19 +2284,17 @@ public class World implements MutableWorldSource {
 
     }
 
-    public void unloadEntities(List<Entity> list)
-    {
-        entitiesToRemove.addAll(list);
+    public void unloadEntities(List<Entity> list) {
+        this.entitiesToRemove.addAll(list);
     }
 
-    public void dropOldChunks()
-    {
+    public void dropOldChunks() {
         // TODO chunkProvider#tick should be renamed, current name is extremely misleading as its called "tick" whilst not even being remotely connected to the actual tick system
-        while(chunkProvider.tick());
+        while (this.chunkProvider.tick()) ;
     }
 
-    public boolean canBlockIdBePlacedAt(final int id, final @NotNull TilePos tilePos, final boolean ignoreCollision, final @NotNull Side side) {
-        if (tilePos.y < 0 || tilePos.y >= this.getHeightBlocks()) {
+    public boolean canBlockIdBePlacedAt(final int id, final @NotNull TilePosc tilePos, final boolean ignoreCollision, final @NotNull Side side) {
+        if (tilePos.y() < 0 || tilePos.y() >= this.getHeightBlocks()) {
             return false;
         }
 
@@ -2535,11 +2304,11 @@ public class World implements MutableWorldSource {
             return false;
         }
 
-        final @Nullable AABB bb;
+        final @Nullable AABBdc bb;
         if (ignoreCollision) {
             bb = null;
         } else {
-            bb = newBlock.getCollisionBoundingBoxFromPool(this, tilePos.x, tilePos.y, tilePos.z);
+            bb = newBlock.getCollisionAABB(this, tilePos);
         }
 
         if (bb != null && !this.checkIfAABBIsClear(bb)) {
@@ -2547,7 +2316,7 @@ public class World implements MutableWorldSource {
         }
 
         if (currentBlock == null || currentBlock.hasTag(BlockTags.PLACE_OVERWRITES)) {
-            return newBlock.canPlaceBlockOnSide(this, tilePos.x, tilePos.y, tilePos.z, side);
+            return newBlock.canPlaceOnSide(this, tilePos, side);
         } else {
             return false;
         }
@@ -2558,12 +2327,11 @@ public class World implements MutableWorldSource {
         return this.canBlockIdBePlacedAt(id, new TilePos(x, y, z), ignoreCollision, side);
     }
 
-    public @Nullable Path getPathToEntity(Entity entity, Entity entityToTravelTo, float distance)
-    {
+    public @Nullable Path getPathToEntity(Entity entity, Entity entityToTravelTo, float distance) {
         int x1 = MathHelper.floor(entity.x);
         int y2 = MathHelper.floor(entity.y);
         int z1 = MathHelper.floor(entity.z);
-        int radius = (int)(distance + 16F);
+        int radius = (int) (distance + 16F);
         int xMin = x1 - radius;
         int yMin = y2 - radius;
         int zMin = z1 - radius;
@@ -2577,8 +2345,8 @@ public class World implements MutableWorldSource {
     public @Nullable Path getEntityPathToTilePos(final @NotNull Entity entity, final @NotNull TilePos tilePos, final float distance) {
         final @NotNull TilePos entityPos = new TilePos(entity);
         final int cacheRadius = (int) (distance + 8F);
-        final @NotNull TilePos cacheMin = entityPos.sub(cacheRadius, cacheRadius, cacheRadius);
-        final @NotNull TilePos cacheMax = entityPos.add(cacheRadius, cacheRadius, cacheRadius);
+        final @NotNull TilePos cacheMin = entityPos.sub(cacheRadius, cacheRadius, cacheRadius, new TilePos());
+        final @NotNull TilePos cacheMax = entityPos.add(cacheRadius, cacheRadius, cacheRadius, new TilePos());
 
         final @NotNull ChunkCache cache = new ChunkCache(this, cacheMin, cacheMax, false);
         if (!cache.allLoaded()) return null;
@@ -2590,9 +2358,9 @@ public class World implements MutableWorldSource {
         return this.getEntityPathToTilePos(entity, new TilePos(x, y, z), distance);
     }
 
-    public boolean hasDirectSignal(final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean hasDirectSignal(final @NotNull TilePosc tilePos, final @NotNull Side side) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
-        return block != null && block.getDirectSignal(this, tilePos.x, tilePos.y, tilePos.z, side);
+        return block != null && block.isEmittingDirectSignal(this, tilePos, side);
     }
 
     @Deprecated
@@ -2600,9 +2368,10 @@ public class World implements MutableWorldSource {
         return this.hasDirectSignal(new TilePos(x, y, z), side);
     }
 
-    public boolean hasDirectSignal(final @NotNull TilePos tilePos) {
+    public boolean hasDirectSignal(final @NotNull TilePosc tilePos) {
+        TilePos queryPos = new TilePos();
         for (final @NotNull Side side : Side.sides) {
-            if (this.hasDirectSignal(tilePos.add(side.getDirection()), side)) {
+            if (this.hasDirectSignal(tilePos.add(side.getDirection(), queryPos), side)) {
                 return true;
             }
         }
@@ -2615,7 +2384,7 @@ public class World implements MutableWorldSource {
         return this.hasDirectSignal(new TilePos(x, y, z));
     }
 
-    public boolean hasSignal(final @NotNull TilePos tilePos, final @NotNull Side side) {
+    public boolean hasSignal(final @NotNull TilePosc tilePos, final @NotNull Side side) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (this.isBlockNormalCube(tilePos) && block != Blocks.BLOCK_REDSTONE && block != Blocks.PUMPKIN_REDSTONE && block != Blocks.MATCHER_ACTIVE) {
             return this.hasDirectSignal(tilePos);
@@ -2625,9 +2394,9 @@ public class World implements MutableWorldSource {
         }
 
         if (block == Blocks.PUMPKIN_REDSTONE) {
-            return this.pumpkinHasDirectSignal(tilePos) || block.getSignal(this, tilePos.x, tilePos.y, tilePos.z, side);
+            return this.pumpkinHasDirectSignal(tilePos) || block.isEmittingSignal(this, tilePos, side);
         } else {
-            return block.getSignal(this, tilePos.x, tilePos.y, tilePos.z, side);
+            return block.isEmittingSignal(this, tilePos, side);
         }
     }
 
@@ -2637,12 +2406,12 @@ public class World implements MutableWorldSource {
     }
 
     // Special version of hasDirectSignal that excludes the front side of the redstone lantern.
-    private boolean pumpkinHasDirectSignal(final @NotNull TilePos tilePos) {
+    private boolean pumpkinHasDirectSignal(final @NotNull TilePosc tilePos) {
         for (final @NotNull Side side : Side.sides) {
             if (Side.getSideById(this.getBlockData(tilePos)) == side) {
                 continue;
             }
-            if (this.hasDirectSignal(tilePos.add(side.getDirection()), side)) {
+            if (this.hasDirectSignal(tilePos.add(side.getDirection(), new TilePos()), side)) {
                 return true;
             }
         }
@@ -2650,9 +2419,9 @@ public class World implements MutableWorldSource {
         return false;
     }
 
-    public boolean hasNeighborSignal(final @NotNull TilePos tilePos) {
+    public boolean hasNeighborSignal(final @NotNull TilePosc tilePos) {
         for (final @NotNull Side side : Side.sides) {
-            if (this.hasSignal(tilePos.add(side.getDirection()), side)) {
+            if (this.hasSignal(tilePos.add(side.getDirection(), new TilePos()), side)) {
                 return true;
             }
         }
@@ -2665,21 +2434,19 @@ public class World implements MutableWorldSource {
         return this.hasNeighborSignal(new TilePos(x, y, z));
     }
 
-    public Player getClosestPlayerToEntity(Entity entity, double radius)
-    {
+    public Player getClosestPlayerToEntity(Entity entity, double radius) {
         return getClosestPlayer(entity.x, entity.y, entity.z, radius);
     }
 
     /**
      * @param radius Radius around the point to search for a player, a radius less than 0 denotes searching for the closest player with 0 regard for radius
      */
-    public Player getClosestPlayer(double x, double y, double z, double radius)
-    {
+    public Player getClosestPlayer(double x, double y, double z, double radius) {
         double closestDistance = Double.POSITIVE_INFINITY;
         Player entityplayer = null;
         if (radius < 0) {
 
-            for (Player entityPlayer1 : players) {
+            for (Player entityPlayer1 : this.players) {
                 double currentDistance = entityPlayer1.distanceToSqr(x, y, z);
                 if ((currentDistance < closestDistance)) {
                     closestDistance = currentDistance;
@@ -2688,7 +2455,7 @@ public class World implements MutableWorldSource {
             }
         } else {
             double rSquared = radius * radius;
-            for (Player entityPlayer1 : players) {
+            for (Player entityPlayer1 : this.players) {
                 double currentDistance = entityPlayer1.distanceToSqr(x, y, z);
                 if (currentDistance < rSquared && (currentDistance < closestDistance)) {
                     closestDistance = currentDistance;
@@ -2700,10 +2467,8 @@ public class World implements MutableWorldSource {
     }
 
 
-
-    public Player getPlayerEntityByName(String s)
-    {
-        for (Player player : players) {
+    public Player getPlayerEntityByName(String s) {
+        for (Player player : this.players) {
             if (s.equals(player.username)) {
                 return player;
             }
@@ -2712,8 +2477,7 @@ public class World implements MutableWorldSource {
         return null;
     }
 
-    public Player getPlayerEntityByUUID(@Nullable final UUID uuid)
-    {
+    public Player getPlayerEntityByUUID(@Nullable final UUID uuid) {
         for (final Player player : this.players) {
             if (player.uuid.equals(uuid)) {
                 return player;
@@ -2723,8 +2487,7 @@ public class World implements MutableWorldSource {
         return null;
     }
 
-    public void setChunkData(int x, int y, int z, int width, int height, int length, byte[] data)
-    {
+    public void setChunkData(int x, int y, int z, int width, int height, int length, byte[] data) {
         int minChunkX = Math.floorDiv(x, Chunk.CHUNK_SIZE_X);
         int minChunkZ = Math.floorDiv(z, Chunk.CHUNK_SIZE_Z);
         int maxChunkX = Math.floorDiv((x + width) - 1, Chunk.CHUNK_SIZE_X);
@@ -2732,36 +2495,28 @@ public class World implements MutableWorldSource {
         int startIndex = 0;
         int minY = y;
         int maxY = y + height;
-        if(minY < 0)
-        {
+        if (minY < 0) {
             minY = 0;
         }
-        if(maxY > getHeightBlocks())
-        {
+        if (maxY > getHeightBlocks()) {
             maxY = getHeightBlocks();
         }
-        for(int chunkX = minChunkX; chunkX <= maxChunkX; chunkX++)
-        {
+        for (int chunkX = minChunkX; chunkX <= maxChunkX; chunkX++) {
             int minX = x - chunkX * Chunk.CHUNK_SIZE_X;
             int maxX = (x + width) - chunkX * Chunk.CHUNK_SIZE_X;
-            if(minX < 0)
-            {
+            if (minX < 0) {
                 minX = 0;
             }
-            if(maxX > Chunk.CHUNK_SIZE_X)
-            {
+            if (maxX > Chunk.CHUNK_SIZE_X) {
                 maxX = Chunk.CHUNK_SIZE_X;
             }
-            for(int chunkZ = minChunkZ; chunkZ <= maxChunkZ; chunkZ++)
-            {
+            for (int chunkZ = minChunkZ; chunkZ <= maxChunkZ; chunkZ++) {
                 int minZ = z - chunkZ * Chunk.CHUNK_SIZE_Z;
                 int maxZ = (z + length) - chunkZ * Chunk.CHUNK_SIZE_Z;
-                if(minZ < 0)
-                {
+                if (minZ < 0) {
                     minZ = 0;
                 }
-                if(maxZ > Chunk.CHUNK_SIZE_Z)
-                {
+                if (maxZ > Chunk.CHUNK_SIZE_Z) {
                     maxZ = Chunk.CHUNK_SIZE_Z;
                 }
                 startIndex = getChunkFromChunkCoords(chunkX, chunkZ).setChunkData(data, minX, minY, minZ, maxX, maxY, maxZ, startIndex);
@@ -2771,9 +2526,8 @@ public class World implements MutableWorldSource {
         }
 
     }
-    
-    public byte[] getChunkData(int x, int y, int z, int xSize, int ySize, int zSize)
-    {
+
+    public byte[] getChunkData(int x, int y, int z, int xSize, int ySize, int zSize) {
         byte[] data = new byte[xSize * ySize * zSize * 8];
         int minChunkX = Math.floorDiv(x, Chunk.CHUNK_SIZE_X);
         int minChunkZ = Math.floorDiv(z, Chunk.CHUNK_SIZE_Z);
@@ -2782,125 +2536,104 @@ public class World implements MutableWorldSource {
         int startIndex = 0;
         int minY = y;
         int maxY = y + ySize;
-        if(minY < 0)
-        {
+        if (minY < 0) {
             minY = 0;
         }
-        if(maxY > getHeightBlocks())
-        {
+        if (maxY > getHeightBlocks()) {
             maxY = getHeightBlocks();
         }
-        for(int chunkX = minChunkX; chunkX <= maxChunkX; chunkX++)
-        {
+        for (int chunkX = minChunkX; chunkX <= maxChunkX; chunkX++) {
             int minX = x - chunkX * Chunk.CHUNK_SIZE_X;
             int maxX = (x + xSize) - chunkX * Chunk.CHUNK_SIZE_X;
-            if(minX < 0)
-            {
+            if (minX < 0) {
                 minX = 0;
             }
-            if(maxX > Chunk.CHUNK_SIZE_X)
-            {
+            if (maxX > Chunk.CHUNK_SIZE_X) {
                 maxX = Chunk.CHUNK_SIZE_X;
             }
-            for(int chunkZ = minChunkZ; chunkZ <= maxChunkZ; chunkZ++)
-            {
+            for (int chunkZ = minChunkZ; chunkZ <= maxChunkZ; chunkZ++) {
                 int minZ = z - chunkZ * Chunk.CHUNK_SIZE_Z;
                 int maxZ = (z + zSize) - chunkZ * Chunk.CHUNK_SIZE_Z;
-                if(minZ < 0)
-                {
+                if (minZ < 0) {
                     minZ = 0;
                 }
-                if(maxZ > Chunk.CHUNK_SIZE_Z)
-                {
+                if (maxZ > Chunk.CHUNK_SIZE_Z) {
                     maxZ = Chunk.CHUNK_SIZE_Z;
                 }
                 startIndex = getChunkFromChunkCoords(chunkX, chunkZ).getChunkData(data, minX, minY, minZ, maxX, maxY, maxZ, startIndex);
             }
 
         }
-        
+
         return data;
     }
 
-    public void sendQuittingDisconnectingPacket()
-    {
+    public void sendQuittingDisconnectingPacket() {
     }
 
-    public void checkSessionLock()
-    {
-        saveHandler.checkSessionLock();
+    public void checkSessionLock() {
+        this.saveHandler.checkSessionLock();
     }
 
-    public void setWorldTime(long l)
-    {
-        levelData.setWorldTime(l);
+    public void setWorldTime(long l) {
+        this.levelData.setWorldTime(l);
     }
-    
+
     public void setWorldTimeUpdateTicks(final long ticks) {
-        final long currentTime = this.levelData.getWorldTime();
-        final long newTime = ticks;
+        final long delta = ticks - this.levelData.getWorldTime();
 
-        for (final @NotNull NextTickListEntry entry : this.tickNextTickList) {
-            final long ticksRemaining = entry.getEndTime() - currentTime;
-            entry.creationTime = newTime;
-            entry.delay = ticksRemaining;
+        for (final @NotNull NextTickListEntry entry : this.tickNextTickSet) {
+            entry.delay += delta;
         }
 
         this.setWorldTime(ticks);
     }
 
-    public long getRandomSeed()
-    {
-        return levelData.getRandomSeed();
+    public long getRandomSeed() {
+        return this.levelData.getRandomSeed();
     }
 
-    public long getWorldTime()
-    {
-        return levelData.getWorldTime();
+    public long getWorldTime() {
+        return this.levelData.getWorldTime();
     }
 
     public Difficulty getDifficulty() {
-        return levelData.getDifficulty();
+        return this.levelData.getDifficulty();
     }
 
     public void setDifficulty(Difficulty difficulty, boolean overrideLock) {
-        levelData.setDifficulty(difficulty, overrideLock);
+        this.levelData.setDifficulty(difficulty, overrideLock);
     }
+
     public void setDifficulty(int difficulty, boolean overrideLock) {
-        levelData.setDifficulty(difficulty, overrideLock);
+        this.levelData.setDifficulty(difficulty, overrideLock);
     }
 
-    public TilePos getSpawnPoint()
-    {
-        return new TilePos(levelData.getSpawnX(), levelData.getSpawnY(), levelData.getSpawnZ());
+    public @NotNull TilePos getSpawnPoint() {
+        return new TilePos(this.levelData.getSpawnX(), this.levelData.getSpawnY(), this.levelData.getSpawnZ());
     }
 
-    public void setSpawnPoint(ChunkCoordinates chunkcoordinates)
-    {
-        levelData.setSpawn(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z);
+    public void setSpawnPoint(ChunkCoordinates chunkcoordinates) {
+        this.levelData.setSpawn(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z);
     }
 
-    public void joinEntityInSurroundings(Entity entity)
-    {
+    public void joinEntityInSurroundings(Entity entity) {
         int i = MathHelper.floor(entity.x / Chunk.CHUNK_SIZE_X);
         int j = MathHelper.floor(entity.z / Chunk.CHUNK_SIZE_Z);
         byte byte0 = 2;
-        for(int k = i - byte0; k <= i + byte0; k++)
-        {
-            for(int l = j - byte0; l <= j + byte0; l++)
-            {
+        for (int k = i - byte0; k <= i + byte0; k++) {
+            for (int l = j - byte0; l <= j + byte0; l++) {
                 getChunkFromChunkCoords(k, l);
             }
 
         }
 
-        if(!entities.contains(entity))
-        {
-            entities.add(entity);
+        if (!this.entities.contains(entity)) {
+            this.entities.add(entity);
         }
     }
 
-    public boolean canMineBlock(final @NotNull Player player, final @NotNull TilePos tilePos) {
+    public boolean canMineBlock(final @NotNull Player player, final @NotNull TilePosc tilePos) {
         return true;
     }
 
@@ -2909,75 +2642,63 @@ public class World implements MutableWorldSource {
         return this.canMineBlock(player, new TilePos(x, y, z));
     }
 
-    public void sendTrackedEntityStatusUpdatePacket(Entity entityId, byte entityStatus)
-    {
+    public void sendTrackedEntityStatusUpdatePacket(Entity entityId, byte entityStatus) {
     }
 
-    public void sendTrackedEntityStatusUpdatePacket(Entity entityId, byte entityStatus, float attackedAtYaw)
-    {
+    public void sendTrackedEntityStatusUpdatePacket(Entity entityId, byte entityStatus, float attackedAtYaw) {
     }
 
     public void sendTrackedEntityDataPacket(Entity entity) {
 
     }
 
-    public void updateEntityList()
-    {
-        entities.removeAll(entitiesToRemove);
-        for(int i = 0; i < entitiesToRemove.size(); i++)
-        {
-            Entity entity = entitiesToRemove.get(i);
+    public void updateEntityList() {
+        this.entities.removeAll(this.entitiesToRemove);
+        for (int i = 0; i < this.entitiesToRemove.size(); i++) {
+            Entity entity = this.entitiesToRemove.get(i);
             int cX = entity.chunkCoordX;
             int cZ = entity.chunkCoordZ;
-            if(entity.addedToChunk && isChunkLoaded(cX, cZ))
-            {
+            if (entity.addedToChunk && isChunkLoaded(cX, cZ)) {
                 getChunkFromChunkCoords(cX, cZ).removeEntity(entity);
             }
         }
 
-        for(int j = 0; j < entitiesToRemove.size(); j++)
-        {
-            releaseEntitySkin(entitiesToRemove.get(j));
+        for (int j = 0; j < this.entitiesToRemove.size(); j++) {
+            releaseEntitySkin(this.entitiesToRemove.get(j));
         }
 
-        entitiesToRemove.clear();
-        for(int i = 0; i < entities.size(); i++)
-        {
-            Entity entity = entities.get(i);
-            if(entity.vehicle != null)
-            {
-                if(!entity.vehicle.isRemoved() && entity.vehicle.getPassenger() == entity)
-                {
+        this.entitiesToRemove.clear();
+        for (int i = 0; i < this.entities.size(); i++) {
+            Entity entity = this.entities.get(i);
+            if (entity.vehicle != null) {
+                if (!entity.vehicle.isRemoved() && entity.vehicle.getPassenger() == entity) {
                     continue;
                 }
                 entity.vehicle.setPassenger(null);
                 entity.vehicle = null;
             }
-            if(!entity.removed)
-            {
+            if (!entity.removed) {
                 continue;
             }
             int cX = entity.chunkCoordX;
             int cZ = entity.chunkCoordZ;
-            if(entity.addedToChunk && isChunkLoaded(cX, cZ))
-            {
+            if (entity.addedToChunk && isChunkLoaded(cX, cZ)) {
                 getChunkFromChunkCoords(cX, cZ).removeEntity(entity);
             }
-            entities.remove(i--);
+            this.entities.remove(i--);
             releaseEntitySkin(entity);
         }
 
     }
 
-    public IChunkProvider getChunkProvider()
-    {
-        return chunkProvider;
+    public IChunkProvider getChunkProvider() {
+        return this.chunkProvider;
     }
 
-    public void triggerEvent(final @NotNull TilePos tilePos, final int index, final int data) {
+    public void triggerEvent(final @NotNull TilePosc tilePos, final int index, final int data) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block != null) {
-            block.triggerEvent(this, tilePos.x, tilePos.y, tilePos.z, index, data);
+            block.triggerEvent(this, tilePos.x(), tilePos.y(), tilePos.z(), index, data);
         }
     }
 
@@ -2985,69 +2706,61 @@ public class World implements MutableWorldSource {
     public final void triggerEvent(final int x, final int y, final int z, final int index, final int data) {
         this.triggerEvent(new TilePos(x, y, z), index, data);
     }
-    
-    public LevelStorage getSaveHandler()
-    {
-        return saveHandler;
+
+    public LevelStorage getSaveHandler() {
+        return this.saveHandler;
     }
 
-    public LevelData getLevelData()
-    {
-        return levelData;
+    public LevelData getLevelData() {
+        return this.levelData;
     }
 
-    public void updateEnoughPlayersSleepingFlag(Player player)
-    {
-        enoughPlayersSleeping = false;
-        if(!players.isEmpty()) {
+    public void updateEnoughPlayersSleepingFlag(Player player) {
+        this.enoughPlayersSleeping = false;
+        if (!this.players.isEmpty()) {
             int playersSleeping = 0;
             int req = getPlayersRequiredToSkipNight();
-            for(Player p : players)
-                if(p.isPlayerSleeping()) playersSleeping++;
-            if(playersSleeping >= req) {
-                enoughPlayersSleeping = true;
+            for (Player p : this.players)
+                if (p.isPlayerSleeping()) playersSleeping++;
+            if (playersSleeping >= req) {
+                this.enoughPlayersSleeping = true;
             }
         }
     }
-    
-    public int getPlayersRequiredToSkipNight()
-    {
-        return (int) (players.size() * (sleepPercent / 100.0));
+
+    public int getPlayersRequiredToSkipNight() {
+        return (int) (this.players.size() * (this.sleepPercent / 100.0));
     }
 
-    protected void wakeUpAllPlayers()
-    {
-        enoughPlayersSleeping = false;
-        for (Player entityplayer : players) {
+    protected void wakeUpAllPlayers() {
+        this.enoughPlayersSleeping = false;
+        for (Player entityplayer : this.players) {
             if (entityplayer.isPlayerSleeping()) {
                 entityplayer.wakeUpPlayer(false, false);
             }
         }
         final @Nullable Weather currentWeather = getCurrentWeather();
-        if (currentWeather instanceof IPrecipitation && ((IPrecipitation) currentWeather).spawnRainParticles())
-        {
-            weatherManager.overrideWeather(worldType.getDefaultWeather());
+        if (currentWeather instanceof IPrecipitation && ((IPrecipitation) currentWeather).spawnRainParticles()) {
+            this.weatherManager.overrideWeather(this.worldType.getDefaultWeather());
         }
     }
 
-    public boolean areEnoughPlayersFullyAsleep()
-    {
-        if(enoughPlayersSleeping && !isClientSide)
-        {
+    public boolean areEnoughPlayersFullyAsleep() {
+        if (this.enoughPlayersSleeping && !this.isClientSide) {
             int fullyAsleep = 0;
-            for(Player player : players) if(player.isPlayerFullyAsleep()) fullyAsleep++;
+            for (Player player : this.players) if (player.isPlayerFullyAsleep()) fullyAsleep++;
             return fullyAsleep >= getPlayersRequiredToSkipNight() && fullyAsleep > 0;
         } else {
             return false;
         }
     }
 
-    public boolean isBlockBeingRainedOn(final @NotNull TilePos tilePos) {
+    public boolean isBlockBeingRainedOn(final @NotNull TilePosc tilePos) {
         if (
             this.getCurrentWeather() == null ||
-            !(this.getCurrentWeather() instanceof IPrecipitation) ||
-            !this.canBlockSeeSky(tilePos) ||
-            this.getHeightValue(tilePos.x, tilePos.z) > tilePos.y
+                !(this.getCurrentWeather() instanceof IPrecipitation) ||
+                !this.canBlockSeeSky(tilePos) ||
+                this.getHeightValue(tilePos.x(), tilePos.z()) > tilePos.y()
         ) {
             return false;
         }
@@ -3067,22 +2780,19 @@ public class World implements MutableWorldSource {
         return this.isBlockBeingRainedOn(new TilePos(x, y, z));
     }
 
-    public void setSavedData(String id, SavedData savedData)
-    {
-        savedDataStorage.set(id, savedData);
+    public void setSavedData(String id, SavedData savedData) {
+        this.savedDataStorage.set(id, savedData);
     }
 
-    public SavedData getSavedData(Class<? extends SavedData> saveDataClass, String id)
-    {
-        return savedDataStorage.load(saveDataClass, id);
+    public SavedData getSavedData(Class<? extends SavedData> saveDataClass, String id) {
+        return this.savedDataStorage.load(saveDataClass, id);
     }
 
-    public int getUniqueDataId(String s)
-    {
-        return savedDataStorage.getFreeMetadataFor(s);
+    public int getUniqueDataId(String s) {
+        return this.savedDataStorage.getFreeMetadataFor(s);
     }
 
-    public void playBlockEvent(final @NotNull TilePos tilePos, final int id, final int data) {
+    public void playBlockEvent(final @NotNull TilePosc tilePos, final int id, final int data) {
         this.playBlockEvent(null, tilePos, id, data);
     }
 
@@ -3091,9 +2801,9 @@ public class World implements MutableWorldSource {
         this.playBlockEvent(new TilePos(x, y, z), id, data);
     }
 
-    public void playBlockEvent(final @Nullable Player player, final @NotNull TilePos tilePos, final int id, final int data) {
+    public void playBlockEvent(final @Nullable Player player, final @NotNull TilePosc tilePos, final int id, final int data) {
         for (final @NotNull LevelListener listener : this.listeners) {
-            listener.levelEvent(player, id, tilePos.x, tilePos.y, tilePos.z, data);
+            listener.levelEvent(player, id, tilePos.x(), tilePos.y(), tilePos.z(), data);
         }
     }
 
@@ -3101,19 +2811,18 @@ public class World implements MutableWorldSource {
     public final void playBlockEvent(final @Nullable Player player, final int id, final int x, final int y, final int z, final int data) {
         this.playBlockEvent(player, new TilePos(x, y, z), id, data);
     }
-    
-    public @NotNull WorldType getWorldType()
-    {
-        return worldType;
+
+    public @NotNull WorldType getWorldType() {
+        return this.worldType;
     }
 
-    public @NotNull EntityItem dropItem(final @NotNull TilePos tilePos, final @NotNull ItemStack itemStack) {
+    public @NotNull EntityItem dropItem(final @NotNull TilePosc tilePos, final @NotNull ItemStack itemStack) {
         final float radius = 0.7f;
         final double x = (this.rand.nextFloat() * radius) + (1.0F - radius) * 0.5D;
         final double y = (this.rand.nextFloat() * radius) + (1.0F - radius) * 0.5D;
         final double z = (this.rand.nextFloat() * radius) + (1.0F - radius) * 0.5D;
 
-        final @NotNull EntityItem item = new EntityItem(this, tilePos.x + x, tilePos.y + y, tilePos.z + z, itemStack);
+        final @NotNull EntityItem item = new EntityItem(this, tilePos.x() + x, tilePos.y() + y, tilePos.z() + z, itemStack);
         item.pickupDelay = 10;
         this.entityJoinedWorld(item);
         return item;
@@ -3124,8 +2833,8 @@ public class World implements MutableWorldSource {
         return this.dropItem(new TilePos(x, y, z), itemStack);
     }
 
-    public void sendGlobalMessage(String message){
-        for (Player player : players){
+    public void sendGlobalMessage(String message) {
+        for (Player player : this.players) {
             player.sendMessage(message);
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/WorldSource.java b/game/core/src/main/java/net/minecraft/core/world/WorldSource.java
index 67969e846..3294d86ed 100644
--- a/game/core/src/main/java/net/minecraft/core/world/WorldSource.java
+++ b/game/core/src/main/java/net/minecraft/core/world/WorldSource.java
@@ -7,6 +7,7 @@ import net.minecraft.core.block.material.Material;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.SeasonManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -14,28 +15,28 @@ import org.jetbrains.annotations.Nullable;
 public interface WorldSource {
     int getHeightBlocks();
 
-    int getBlockId(final @NotNull TilePos tilePos);
+    int getBlockId(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default int getBlockId(final int x, final int y, final int z) {
         return this.getBlockId(new TilePos(x, y, z));
     }
 
-    @Nullable Block<?> getBlock(final @NotNull TilePos tilePos);
+    @Nullable Block<?> getBlock(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @Nullable Block<?> getBlock(final int x, final int y, final int z) {
         return this.getBlock(new TilePos(x, y, z));
     }
 
-    @Nullable TileEntity getTileEntity(final @NotNull TilePos tilePos);
+    @Nullable TileEntity getTileEntity(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @Nullable TileEntity getTileEntity(final int x, final int y, final int z) {
         return this.getTileEntity(new TilePos(x, y, z));
     }
 
-    default <T> @Nullable T getBlockLogic(final @NotNull TilePos tilePos, final @NotNull Class<T> logicClass) {
+    default <T> @Nullable T getBlockLogic(final @NotNull TilePosc tilePos, final @NotNull Class<T> logicClass) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block == null) {
             return null;
@@ -54,14 +55,14 @@ public interface WorldSource {
         return this.getBlockLogic(new TilePos(x, y, z), logicClass);
     }
 
-    float getBrightness(final @NotNull TilePos tilePos, final int lightEmission);
+    float getBrightness(final @NotNull TilePosc tilePos, final int lightEmission);
 
     @Deprecated
     default float getBrightness(final int x, final int y, final int z, final int lightEmission) {
         return this.getBrightness(new TilePos(x, y, z), lightEmission);
     }
 
-    int getLightmapCoord(final @NotNull TilePos tilePos, final int lightEmission);
+    int getLightmapCoord(final @NotNull TilePosc tilePos, final int lightEmission);
 
     @Deprecated
     default int getLightmapCoord(final int x, final int y, final int z, final int lightEmission) {
@@ -70,56 +71,56 @@ public interface WorldSource {
 
     int getLightmapCoord(int skyLight, int blockLight);
 
-    float getLightBrightness(final @NotNull TilePos tilePos);
+    float getLightBrightness(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default float getLightBrightness(final int x, final int y, final int z) {
         return this.getLightBrightness(new TilePos(x, y, z));
     }
 
-    int getBlockData(final @NotNull TilePos tilePos);
+    int getBlockData(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default int getBlockMetadata(final int x, final int y, final int z) {
         return this.getBlockData(new TilePos(x, y, z));
     }
 
-    @NotNull Material getBlockMaterial(final @NotNull TilePos tilePos);
+    @NotNull Material getBlockMaterial(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @NotNull Material getBlockMaterial(final int x, final int y, final int z) {
         return this.getBlockMaterial(new TilePos(x, y, z));
     }
 
-    boolean isBlockOpaqueCube(final @NotNull TilePos tilePos);
+    boolean isBlockOpaqueCube(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean isBlockOpaqueCube(final int x, final int y, final int z) {
         return this.isBlockOpaqueCube(new TilePos(x, y, z));
     }
 
-    boolean isBlockNormalCube(final @NotNull TilePos tilePos);
+    boolean isBlockNormalCube(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default boolean isBlockNormalCube(final int x, final int y, final int z) {
         return this.isBlockNormalCube(new TilePos(x, y, z));
     }
 
-    double getBlockTemperature(final @NotNull TilePos tilePos);
+    double getBlockTemperature(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default double getBlockTemperature(final int x, final int z) {
         return this.getBlockTemperature(new TilePos(x, 0, z));
     }
 
-    double getBlockHumidity(final @NotNull TilePos tilePos);
+    double getBlockHumidity(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default double getBlockHumidity(final int x, final int z) {
         return this.getBlockHumidity(new TilePos(x, 0, z));
     }
 
-    double getBlockVariety(final @NotNull TilePos tilePos);
+    double getBlockVariety(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default double getBlockVariety(final int x, final int z) {
@@ -128,14 +129,14 @@ public interface WorldSource {
 
     @NotNull SeasonManager getSeasonManager();
 
-    @NotNull Biome getBlockBiome(final @NotNull TilePos tilePos);
+    @NotNull Biome getBlockBiome(final @NotNull TilePosc tilePos);
 
     @Deprecated
     default @Nullable Biome getBlockBiome(final int x, final int y, final int z) {
         return this.getBlockBiome(new TilePos(x, y, z));
     }
 
-    int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos);
+    int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos);
 
     @Deprecated
     default int getSavedLightValue(final @NotNull LightLayer layer, final int x, final int y, final int z) {
diff --git a/game/core/src/main/java/net/minecraft/core/world/biome/Biome.java b/game/core/src/main/java/net/minecraft/core/world/biome/Biome.java
index 821817428..ad5ca9ffa 100644
--- a/game/core/src/main/java/net/minecraft/core/world/biome/Biome.java
+++ b/game/core/src/main/java/net/minecraft/core/world/biome/Biome.java
@@ -15,6 +15,7 @@ import net.minecraft.core.world.generate.feature.WorldFeature;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTree;
 import net.minecraft.core.world.generate.feature.tree.WorldFeatureTreeFancy;
 import net.minecraft.core.world.weather.Weather;
+import org.jetbrains.annotations.NotNull;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -27,10 +28,10 @@ public class Biome
     public short topBlock;
     public short fillerBlock;
     public Weather[] blockedWeathers = new Weather[0];
-    protected List<SpawnListEntry> spawnableMonsterList;
-    protected List<SpawnListEntry> spawnableCreatureList;
-    protected List<SpawnListEntry> spawnableWaterCreatureList;
-    protected List<SpawnListEntry> spawnableAmbientCreatureList;
+    protected @NotNull List<@NotNull SpawnListEntry> spawnableMonsterList = new ArrayList<>();
+    protected @NotNull List<@NotNull SpawnListEntry> spawnableCreatureList = new ArrayList<>();
+    protected @NotNull List<@NotNull SpawnListEntry> spawnableWaterCreatureList = new ArrayList<>();
+    protected @NotNull List<@NotNull SpawnListEntry> spawnableAmbientCreatureList = new ArrayList<>();
     private boolean hasSurfaceSnow = false;
     
     public Biome(String key)
@@ -38,10 +39,6 @@ public class Biome
     	this.translationKey = "biome." + key; 
         topBlock = (short) Blocks.GRASS.id();
         fillerBlock = (short)Blocks.DIRT.id();
-        spawnableMonsterList = new ArrayList<>();
-        spawnableCreatureList = new ArrayList<>();
-        spawnableWaterCreatureList = new ArrayList<>();
-        spawnableAmbientCreatureList = new ArrayList<>();
         spawnableMonsterList.add(new SpawnListEntry(MobSpider.class, 10));
         spawnableMonsterList.add(new SpawnListEntry(MobZombie.class, 10));
         spawnableMonsterList.add(new SpawnListEntry(MobZombieArmored.class, 2));
@@ -90,20 +87,14 @@ public class Biome
         return java.awt.Color.getHSBColor(0.6222222F - temperature * 0.125F, 0.5F + temperature * 0.1F, 1.0F).getRGB();
     }
 
-    public List<SpawnListEntry> getSpawnableList(MobCategory creatureType)
+    public @NotNull List<@NotNull SpawnListEntry> getSpawnableList(final @NotNull MobCategory creatureType)
     {
-        switch (creatureType){
-            case monster:
-                return spawnableMonsterList;
-            case creature:
-                return spawnableCreatureList;
-            case waterCreature:
-                return spawnableWaterCreatureList;
-            case ambientCreature:
-                return spawnableAmbientCreatureList;
-            default:
-                return null;
-        }
+        return switch (creatureType) {
+            case MONSTER -> spawnableMonsterList;
+            case CREATURE -> spawnableCreatureList;
+            case WATER_CREATURE -> spawnableWaterCreatureList;
+            case AMBIENT -> spawnableAmbientCreatureList;
+        };
     }
     
     public boolean hasSurfaceSnow()
diff --git a/game/core/src/main/java/net/minecraft/core/world/biome/provider/BiomeProvider.java b/game/core/src/main/java/net/minecraft/core/world/biome/provider/BiomeProvider.java
index ef6d83e51..42d548ae5 100644
--- a/game/core/src/main/java/net/minecraft/core/world/biome/provider/BiomeProvider.java
+++ b/game/core/src/main/java/net/minecraft/core/world/biome/provider/BiomeProvider.java
@@ -7,42 +7,36 @@ import net.minecraft.core.data.registry.Registries;
 import net.minecraft.core.world.biome.Biome;
 import org.slf4j.Logger;
 
-public abstract class BiomeProvider
-{
+public abstract class BiomeProvider {
     private static final Logger LOGGER = LogUtils.getLogger();
-    public Biome getBiome(final int x, final int y, final int z)
-    {
+
+    public Biome getBiome(final int x, final int y, final int z) {
         final Biome[] out = getBiomes(null, x, y, z, 1, 1, 1);
         return out[0];
     }
 
-    public double getTemperature(final int x, final int z)
-    {
+    public double getTemperature(final int x, final int z) {
         final double[] out = getTemperatures(null, x, z, 1, 1);
         return out[0];
     }
 
-    public double getHumidity(final int x, final int z)
-    {
+    public double getHumidity(final int x, final int z) {
         final double[] out = getHumidities(null, x, z, 1, 1);
         return out[0];
     }
 
-    public double getVariety(final int x, final int z)
-    {
+    public double getVariety(final int x, final int z) {
         final double[] out = getVarieties(null, x, z, 1, 1);
         return out[0];
     }
 
 
-    public double getBiomeness(final int x, final int y, final int z)
-    {
+    public double getBiomeness(final int x, final int y, final int z) {
         final double[] out = getBiomenesses(null, x, y, z, 1, 1, 1);
         return out[0];
     }
 
-    public Biome[] getBiomes(final Biome[] biomes, final int x, final int y, final int z, final int xSize, final int ySize, final int zSize)
-    {
+    public Biome[] getBiomes(final Biome[] biomes, final int x, final int y, final int z, final int xSize, final int ySize, final int zSize) {
         return getBiomes(biomes, null, null, null, x, y, z, xSize, ySize, zSize);
     }
 
@@ -51,14 +45,14 @@ public abstract class BiomeProvider
     public abstract double[] getTemperatures(double[] temperatures, int x, int z, int xSize, int zSize);
 
     public abstract double[] getHumidities(double[] humidities, int x, int z, int xSize, int zSize);
+
     public abstract double[] getVarieties(double[] varieties, int x, int z, int xSize, int zSize);
 
     public abstract double[] getBiomenesses(double[] biomenesses, int x, int y, int z, int xSize, int ySize, int zSize);
 
     public abstract Biome lookupBiome(double temperature, double humidity, double altitude, double variety);
 
-    protected void generateBiomeDistributionStats()
-    {
+    protected void generateBiomeDistributionStats() {
         int lastReport = 0;
         final int sizeChunks = 2048;
         int chunksSampled = 0;
@@ -68,13 +62,10 @@ public abstract class BiomeProvider
 
         LOGGER.info("Sampling " + sizeChunks * sizeChunks + " chunks for biome test...");
 
-        for (int x = -sizeChunks / 2; x < sizeChunks / 2; x++)
-        {
-            for (int z = -sizeChunks / 2; z < sizeChunks / 2; z++)
-            {
-                final int pctg = (int) (chunksSampled / (float)(sizeChunks * sizeChunks) * 100);
-                if (pctg != lastReport)
-                {
+        for (int x = -sizeChunks / 2; x < sizeChunks / 2; x++) {
+            for (int z = -sizeChunks / 2; z < sizeChunks / 2; z++) {
+                final int pctg = (int) (chunksSampled / (float) (sizeChunks * sizeChunks) * 100);
+                if (pctg != lastReport) {
                     LOGGER.info("{}% complete...", pctg);
                     lastReport = pctg;
                 }
@@ -90,16 +81,12 @@ public abstract class BiomeProvider
         LOGGER.info("    Average temperature: {}", String.format("%.2f", tempAcc / (float) (sizeChunks * sizeChunks)));
         LOGGER.info("    Average humidity: {}", String.format("%.2f", humAcc / (float) (sizeChunks * sizeChunks)));
         LOGGER.info("    Biome distribution:");
-        for (final Biome biome : Registries.BIOMES)
-        {
+        for (final Biome biome : Registries.BIOMES) {
             float pctg;
-            if (biomeOccurrenceMap.containsKey(biome))
-            {
+            if (biomeOccurrenceMap.containsKey(biome)) {
                 pctg = biomeOccurrenceMap.getInt(biome) / (float) (sizeChunks * sizeChunks);
                 pctg *= 100;
-            }
-            else
-            {
+            } else {
                 pctg = 0.0f;
             }
             LOGGER.info("        {}: {}%", Registries.BIOMES.getKey(biome), String.format("%.2f", pctg));
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/Chunk.java b/game/core/src/main/java/net/minecraft/core/world/chunk/Chunk.java
index 384d6a824..f32271393 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/Chunk.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/Chunk.java
@@ -9,21 +9,23 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.pos.ChunkPos;
+import net.minecraft.core.world.pos.ChunkPosc;
+import net.minecraft.core.world.pos.ChunkSectionTilePos;
 import net.minecraft.core.world.pos.ChunkTilePos;
+import net.minecraft.core.world.pos.ChunkTilePosc;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 import org.slf4j.Logger;
 
 import java.util.*;
 
-public class Chunk
-{
+public class Chunk {
     private static final Logger LOGGER = LogUtils.getLogger();
     public static final int CHUNK_SIZE_X = 16;
     public static final int CHUNK_SIZE_Z = 16;
@@ -47,9 +49,9 @@ public class Chunk
     public long lastSaveTime = 0L;
     protected final @NotNull ChunkSection @NotNull [] sections = new ChunkSection[CHUNK_SECTIONS];
 
-    public Chunk(final @NotNull World world, final @NotNull ChunkPos pos) {
+    public Chunk(final @NotNull World world, final @NotNull ChunkPosc pos) {
         this.world = world;
-        this.pos = pos;
+        this.pos = new ChunkPos(pos);
 
         for (int i = 0; i < this.sections.length; i++) {
             this.sections[i] = new ChunkSection(this, i);
@@ -61,8 +63,8 @@ public class Chunk
         this(world, new ChunkPos(x, z));
     }
 
-    public static int makeBlockIndex(final @NotNull ChunkTilePos chunkTilePos) {
-        return (chunkTilePos.y * CHUNK_SIZE_Z * CHUNK_SIZE_X) + (chunkTilePos.z * CHUNK_SIZE_X) + chunkTilePos.x;
+    public static int makeBlockIndex(final @NotNull ChunkTilePosc chunkTilePos) {
+        return (chunkTilePos.y() * CHUNK_SIZE_Z * CHUNK_SIZE_X) + (chunkTilePos.z() * CHUNK_SIZE_X) + chunkTilePos.x();
     }
 
     @Deprecated
@@ -75,7 +77,7 @@ public class Chunk
         return this.sections[index];
     }
 
-    public @Nullable ChunkSection getSection(final @NotNull ChunkTilePos chunkTilePos) {
+    public @Nullable ChunkSection getSection(final @NotNull ChunkTilePosc chunkTilePos) {
         return this.getSection(chunkTilePos.getSectionIndex());
     }
 
@@ -85,7 +87,7 @@ public class Chunk
         Arrays.fill(this.variety, Double.NEGATIVE_INFINITY);
     }
 
-    public boolean isAtLocation(final @NotNull ChunkPos chunkPos) {
+    public boolean isAtLocation(final @NotNull ChunkPosc chunkPos) {
         return this.pos.equals(chunkPos);
     }
 
@@ -102,25 +104,10 @@ public class Chunk
         this.heightMap[z * CHUNK_SIZE_X + x] = (short) y;
     }
 
-    public void addTick(final @NotNull NextTickListEntry entry) {
-        final @NotNull NextTickListEntry cloned = entry.clone();
-        cloned.x = cloned.x & (CHUNK_SIZE_X - 1);
-        cloned.z = cloned.z & (CHUNK_SIZE_Z - 1);
-        final int pos = NextTickListEntry.compressChunkCoord((short) entry.x, (short) entry.y, (short) entry.z);
-        this.tickList.put(pos, cloned);
-    }
-
-    public void dropTick(final @NotNull NextTickListEntry entry) {
-        final int pos = NextTickListEntry.compressChunkCoord((short) entry.x, (short) entry.y, (short) entry.z);
-        this.tickList.remove(pos);
-    }
-
     public void recalcHeightmapOnly() {
         int acc = 0;
-        for(int x = 0; x < CHUNK_SIZE_X; x++)
-        {
-            for(int z = 0; z < CHUNK_SIZE_Z; z++)
-            {
+        for (int x = 0; x < CHUNK_SIZE_X; x++) {
+            for (int z = 0; z < CHUNK_SIZE_Z; z++) {
                 int y = CHUNK_SECTIONS * ChunkSection.SECTION_SIZE_Y - 1;
                 while (y > 0 && Blocks.lightBlock[getBlockID(x, y - 1, z)] == 0) {
                     y--;
@@ -130,37 +117,34 @@ public class Chunk
             }
         }
 
-        isModified = true;
-        averageBlockHeight = acc / (CHUNK_SIZE_X * CHUNK_SIZE_Z);
+        this.isModified = true;
+        this.averageBlockHeight = acc / (CHUNK_SIZE_X * CHUNK_SIZE_Z);
     }
 
-    public void recalcHeightmapAndLightmap()
-    {
+    public void recalcHeightmapAndLightmap() {
         recalcHeightmapOnly();
 
         // Generate skylight map
-        if (!world.worldType.hasCeiling()) {
-            for(int x = 0; x < CHUNK_SIZE_X; x++)
-            {
-                for(int z = 0; z < CHUNK_SIZE_Z; z++)
-                {
+        if (!this.world.worldType.hasCeiling()) {
+            for (int x = 0; x < CHUNK_SIZE_X; x++) {
+                for (int z = 0; z < CHUNK_SIZE_Z; z++) {
                     int skyLightValue = 15;
                     int lightY = (CHUNK_SECTIONS * ChunkSection.SECTION_SIZE_Y) - 1;
                     do {
                         skyLightValue -= Blocks.lightBlock[getBlockID(x, lightY, z) & 0x3fff];
-                        if(skyLightValue > 0) {
+                        if (skyLightValue > 0) {
                             setBrightness(LightLayer.Sky, x, lightY, z, skyLightValue);
                         }
-                    } while(--lightY > 0 && skyLightValue > 0);
+                    } while (--lightY > 0 && skyLightValue > 0);
                 }
             }
         }
-        isModified = true;
+        this.isModified = true;
     }
 
     public void checkForLightGaps() {
-        for(int x = 0; x < CHUNK_SIZE_X; x++) {
-            for(int z = 0; z < CHUNK_SIZE_Z; z++) {
+        for (int x = 0; x < CHUNK_SIZE_X; x++) {
+            for (int z = 0; z < CHUNK_SIZE_Z; z++) {
                 lightGaps(x, z);
             }
         }
@@ -176,28 +160,26 @@ public class Chunk
         lightGap(worldX, worldZ + 1, y);
     }
 
-    private void lightGap(int x, int z, int y)
-    {
-        int blockHeight = world.getHeightValue(x, z);
-        if(blockHeight > y)
-        {
-            world.scheduleLightingUpdate(LightLayer.Sky, x, y, z, x, blockHeight, z);
-            isModified = true;
-        }
-        else if(blockHeight < y)
-        {
-            world.scheduleLightingUpdate(LightLayer.Sky, x, blockHeight, z, x, y, z);
-            isModified = true;
+    private void lightGap(int x, int z, int y) {
+        int blockHeight = this.world.getHeightValue(x, z);
+        if (blockHeight > y) {
+            this.world.scheduleLightingUpdate(LightLayer.Sky, x, y, z, x, blockHeight, z);
+            this.isModified = true;
+        } else if (blockHeight < y) {
+            this.world.scheduleLightingUpdate(LightLayer.Sky, x, blockHeight, z, x, y, z);
+            this.isModified = true;
         }
     }
 
-    private void recalcHeight(final @NotNull ChunkTilePos tilePos) {
-        final int heightValue = this.getHeightValue(tilePos.x, tilePos.z);
-        final @NotNull ChunkTilePos iPos = new ChunkTilePos(tilePos.x, heightValue, tilePos.z);
-        if(tilePos.y > heightValue) {
-            iPos.y = tilePos.y;
+    private void recalcHeight(final @NotNull ChunkTilePosc tilePos) {
+        final int heightValue = this.getHeightValue(tilePos.x(), tilePos.z());
+        final @NotNull ChunkTilePos iPos = new ChunkTilePos(tilePos.x(), heightValue, tilePos.z());
+        if (tilePos.y() > heightValue) {
+            iPos.y = tilePos.y();
+        }
+        ChunkTilePos queryPos = new ChunkTilePos();
+        for (; iPos.y > 0 && Blocks.lightBlock[this.getBlockId(iPos.down(queryPos)) & 0x3fff] == 0; iPos.y--) {
         }
-        for (; iPos.y > 0 && Blocks.lightBlock[this.getBlockId(iPos.down()) & 0x3fff] == 0; iPos.y--) { }
 
         if (iPos.y == heightValue) {
             return;
@@ -207,7 +189,7 @@ public class Chunk
         this.setHeightValue(iPos.x, iPos.z, iPos.y);
 
         final @NotNull TilePos worldPos = new TilePos(this.pos, tilePos);
-        if(iPos.y < heightValue) {
+        if (iPos.y < heightValue) {
             for (int dy = iPos.y; dy < heightValue; dy++) {
                 this.setBrightness(LightLayer.Sky, iPos.x, dy, iPos.z, World.MAX_BRIGHTNESS);
             }
@@ -223,31 +205,32 @@ public class Chunk
         while (iPos.y > 0 && lightValue > 0) {
             iPos.y--;
             int lightBlock = Blocks.lightBlock[this.getBlockId(iPos)];
-            if(lightBlock == 0) {
+            if (lightBlock == 0) {
                 lightBlock = 1;
             }
             lightValue -= lightBlock;
-            if(lightValue < 0) {
+            if (lightValue < 0) {
                 lightValue = 0;
             }
             this.setBrightness(LightLayer.Sky, iPos, lightValue);
         }
 
-        for(; iPos.y > 0 && Blocks.lightBlock[this.getBlockId(iPos.down())] == 0; iPos.y--) { }
+        for (; iPos.y > 0 && Blocks.lightBlock[this.getBlockId(iPos.down(queryPos))] == 0; iPos.y--) {
+        }
 
-        if(iPos.y != lightY) {
+        if (iPos.y != lightY) {
             this.world.scheduleLightingUpdate(LightLayer.Sky, new TilePos(worldPos.x - 1, iPos.y, worldPos.z - 1), new TilePos(worldPos.x + 1, lightY, worldPos.z + 1));
         }
 
         this.isModified = true;
     }
 
-    public int getBlockId(final @NotNull ChunkTilePos tilePos) {
+    public int getBlockId(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return 0;
         }
 
-        return Objects.requireNonNull(this.getSection(tilePos)).getBlockId(tilePos.toChunkSectionTilePos());
+        return Objects.requireNonNull(this.getSection(tilePos)).getBlockId(new ChunkSectionTilePos(tilePos));
     }
 
     @Deprecated
@@ -255,15 +238,15 @@ public class Chunk
         return this.getBlockId(new ChunkTilePos(x, y, z));
     }
 
-    public @Nullable Block<?> getBlock(final @NotNull ChunkTilePos tilePos) {
+    public @Nullable Block<?> getBlock(final @NotNull ChunkTilePosc tilePos) {
         return Blocks.getBlock(this.getBlockId(tilePos));
     }
 
-    public boolean setBlockIdDataRaw(final @NotNull ChunkTilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdDataRaw(final @NotNull ChunkTilePosc tilePos, final int id, final int data) {
         return this.setBlockIdData(tilePos, id, data, true);
     }
 
-    public boolean setBlockIdData(final @NotNull ChunkTilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdData(final @NotNull ChunkTilePosc tilePos, final int id, final int data) {
         return this.setBlockIdData(tilePos, id, data, false);
     }
 
@@ -273,16 +256,16 @@ public class Chunk
         return this.setBlockIdDataRaw(new ChunkTilePos(x, y, z), id, data);
     }
 
-    private boolean setBlockIdData(final @NotNull ChunkTilePos tilePos, final int id, final int data, final boolean raw) {
+    private boolean setBlockIdData(final @NotNull ChunkTilePosc tilePos, final int id, final int data, final boolean raw) {
         if (!tilePos.inBounds()) {
             return false;
         }
 
         final @NotNull ChunkSection section = Objects.requireNonNull(this.getSection(tilePos));
-        final int heightValue = this.getHeightValue(tilePos.x, tilePos.z);
+        final int heightValue = this.getHeightValue(tilePos.x(), tilePos.z());
 
-        final int currentId = section.getBlockId(tilePos.toChunkSectionTilePos());
-        final int currentData = section.getData(tilePos.toChunkSectionTilePos());
+        final int currentId = section.getBlockId(new ChunkSectionTilePos(tilePos));
+        final int currentData = section.getData(new ChunkSectionTilePos(tilePos));
 
         final @Nullable Block<?> currentBlock = Blocks.getBlock(currentId);
         final @Nullable Block<?> newBlock = Blocks.getBlock(id);
@@ -291,8 +274,8 @@ public class Chunk
             return false;
         }
 
-        section.setBlockId(tilePos.toChunkSectionTilePos(), id);
-        section.setData(tilePos.toChunkSectionTilePos(), data);
+        section.setBlockId(new ChunkSectionTilePos(tilePos), id);
+        section.setData(new ChunkSectionTilePos(tilePos), data);
 
         final @NotNull TilePos worldPos = new TilePos(this.pos, tilePos);
         if (!raw && currentBlock != null && !this.world.isClientSide) {
@@ -301,17 +284,17 @@ public class Chunk
 
         if (!this.world.getWorldType().hasCeiling()) {
             if (Blocks.lightBlock[id & 0x3FFF] != 0) {
-                if (tilePos.y >= heightValue) {
-                    this.recalcHeight(tilePos.up());
+                if (tilePos.y() >= heightValue) {
+                    this.recalcHeight(tilePos.up(new ChunkTilePos()));
                 }
-            } else if (tilePos.y == heightValue - 1) {
+            } else if (tilePos.y() == heightValue - 1) {
                 this.recalcHeight(tilePos);
             }
             this.world.scheduleLightingUpdate(LightLayer.Sky, worldPos);
         }
 
         this.world.scheduleLightingUpdate(LightLayer.Block, worldPos);
-        this.lightGaps(tilePos.x, tilePos.z);
+        this.lightGaps(tilePos.x(), tilePos.z());
 
         if (!raw && newBlock != null) {
             newBlock.onPlacedByWorld(this.world, worldPos);
@@ -326,7 +309,7 @@ public class Chunk
         return this.setBlockIdData(new ChunkTilePos(x, y, z), id, data);
     }
 
-    public boolean setBlockId(final @NotNull ChunkTilePos tilePos, final int id) {
+    public boolean setBlockId(final @NotNull ChunkTilePosc tilePos, final int id) {
         return this.setBlockIdData(tilePos, id, 0);
     }
 
@@ -335,12 +318,12 @@ public class Chunk
         return this.setBlockId(new ChunkTilePos(x, y, z), id);
     }
 
-    public int getBlockData(final @NotNull ChunkTilePos tilePos) {
+    public int getBlockData(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return 0;
         }
 
-        return Objects.requireNonNull(this.getSection(tilePos)).getData(tilePos.toChunkSectionTilePos());
+        return Objects.requireNonNull(this.getSection(tilePos)).getData(new ChunkSectionTilePos(tilePos));
     }
 
     @Deprecated
@@ -348,12 +331,12 @@ public class Chunk
         return this.getBlockData(new ChunkTilePos(x, y, z));
     }
 
-    public boolean setBlockData(final @NotNull ChunkTilePos tilePos, final int value) {
+    public boolean setBlockData(final @NotNull ChunkTilePosc tilePos, final int value) {
         if (!tilePos.inBounds()) {
             return false;
         }
 
-        Objects.requireNonNull(this.getSection(tilePos)).setData(tilePos.toChunkSectionTilePos(), value);
+        Objects.requireNonNull(this.getSection(tilePos)).setData(new ChunkSectionTilePos(tilePos), value);
         this.isModified = true;
 
         return true;
@@ -364,12 +347,12 @@ public class Chunk
         this.setBlockData(new ChunkTilePos(x, y, z), value);
     }
 
-    public @Nullable Biome getBlockBiome(final @NotNull ChunkTilePos tilePos) {
+    public @Nullable Biome getBlockBiome(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return null;
         }
 
-        return Objects.requireNonNull(this.getSection(tilePos)).getBiome(tilePos.toChunkSectionTilePos());
+        return Objects.requireNonNull(this.getSection(tilePos)).getBiome(new ChunkSectionTilePos(tilePos));
     }
 
     @Deprecated
@@ -377,12 +360,12 @@ public class Chunk
         return this.getBlockBiome(new ChunkTilePos(x, y, z));
     }
 
-    public boolean setBlockBiome(final @NotNull ChunkTilePos tilePos, final @NotNull Biome biome) {
+    public boolean setBlockBiome(final @NotNull ChunkTilePosc tilePos, final @NotNull Biome biome) {
         if (!tilePos.inBounds()) {
             return false;
         }
 
-        Objects.requireNonNull(this.getSection(tilePos)).setBiome(tilePos.toChunkSectionTilePos(), biome);
+        Objects.requireNonNull(this.getSection(tilePos)).setBiome(new ChunkSectionTilePos(tilePos), biome);
         this.isModified = true;
 
         return true;
@@ -393,12 +376,12 @@ public class Chunk
         return this.setBlockBiome(new ChunkTilePos(x, y, z), biome);
     }
 
-    public double getBlockTemperature(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockTemperature(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return Double.NEGATIVE_INFINITY;
         }
 
-        return this.temperature[tilePos.x * CHUNK_SIZE_Z + tilePos.z];
+        return this.temperature[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()];
     }
 
     @Deprecated
@@ -406,12 +389,12 @@ public class Chunk
         return this.getBlockTemperature(new ChunkTilePos(x, 0, z));
     }
 
-    public void setBlockTemperature(final @NotNull ChunkTilePos tilePos, final double temperature) {
+    public void setBlockTemperature(final @NotNull ChunkTilePosc tilePos, final double temperature) {
         if (!tilePos.inBounds()) {
             return;
         }
 
-        this.temperature[tilePos.x * CHUNK_SIZE_Z + tilePos.z] = temperature;
+        this.temperature[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()] = temperature;
         this.isModified = true;
     }
 
@@ -425,12 +408,12 @@ public class Chunk
         return true;
     }
 
-    public double getBlockHumidity(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockHumidity(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return Double.NEGATIVE_INFINITY;
         }
 
-        return this.humidity[tilePos.x * CHUNK_SIZE_Z + tilePos.z];
+        return this.humidity[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()];
     }
 
     @Deprecated
@@ -438,12 +421,12 @@ public class Chunk
         return this.getBlockHumidity(new ChunkTilePos(x, 0, z));
     }
 
-    public void setBlockHumidity(final @NotNull ChunkTilePos tilePos, final double humidity) {
+    public void setBlockHumidity(final @NotNull ChunkTilePosc tilePos, final double humidity) {
         if (!tilePos.inBounds()) {
             return;
         }
 
-        this.humidity[tilePos.x * CHUNK_SIZE_Z + tilePos.z] = humidity;
+        this.humidity[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()] = humidity;
         this.isModified = true;
     }
 
@@ -457,12 +440,12 @@ public class Chunk
         return true;
     }
 
-    public double getBlockVariety(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockVariety(final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return Double.NEGATIVE_INFINITY;
         }
 
-        return this.variety[tilePos.x * CHUNK_SIZE_Z + tilePos.z];
+        return this.variety[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()];
     }
 
     @Deprecated
@@ -470,12 +453,12 @@ public class Chunk
         return this.getBlockVariety(new ChunkTilePos(x, 0, z));
     }
 
-    public void setBlockVariety(final @NotNull ChunkTilePos tilePos, final double variety) {
+    public void setBlockVariety(final @NotNull ChunkTilePosc tilePos, final double variety) {
         if (!tilePos.inBounds()) {
             return;
         }
 
-        this.variety[tilePos.x * CHUNK_SIZE_Z + tilePos.z] = variety;
+        this.variety[tilePos.x() * CHUNK_SIZE_Z + tilePos.z()] = variety;
         this.isModified = true;
     }
 
@@ -489,12 +472,12 @@ public class Chunk
         return true;
     }
 
-    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePos tilePos) {
+    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePosc tilePos) {
         if (!tilePos.inBounds()) {
             return 0;
         }
 
-        return Objects.requireNonNull(this.getSection(tilePos)).getBrightness(lightLayer, tilePos.toChunkSectionTilePos());
+        return Objects.requireNonNull(this.getSection(tilePos)).getBrightness(lightLayer, new ChunkSectionTilePos(tilePos));
     }
 
     @Deprecated
@@ -502,12 +485,12 @@ public class Chunk
         return this.getBrightness(lightLayer, new ChunkTilePos(x, y, z));
     }
 
-    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePos tilePos, final int value) {
+    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePosc tilePos, final int value) {
         if (!tilePos.inBounds()) {
             return;
         }
 
-        Objects.requireNonNull(this.getSection(tilePos)).setBrightness(lightLayer, tilePos.toChunkSectionTilePos(), value);
+        Objects.requireNonNull(this.getSection(tilePos)).setBrightness(lightLayer, new ChunkSectionTilePos(tilePos), value);
         this.isModified = true;
     }
 
@@ -516,12 +499,12 @@ public class Chunk
         this.setBrightness(lightLayer, new ChunkTilePos(x, y, z), value);
     }
 
-    public int getRawBrightness(final @NotNull ChunkTilePos tilePos, final int subtractedSkyLight) {
+    public int getRawBrightness(final @NotNull ChunkTilePosc tilePos, final int subtractedSkyLight) {
         if (!tilePos.inBounds()) {
             return 0;
         }
 
-        final int lightValue = Objects.requireNonNull(this.getSection(tilePos)).getRawBrightness(tilePos.toChunkSectionTilePos(), subtractedSkyLight);
+        final int lightValue = Objects.requireNonNull(this.getSection(tilePos)).getRawBrightness(new ChunkSectionTilePos(tilePos), subtractedSkyLight);
         if (lightValue > 0) {
             Chunk.isLit = true;
         }
@@ -535,11 +518,10 @@ public class Chunk
     }
 
     public void addEntity(final @NotNull Entity entity) {
-        hasEntities = true;
-        isModified = true;
+        this.hasEntities = true;
+        this.isModified = true;
         final @NotNull ChunkPos entityChunkPos = new ChunkPos(entity);
-        if(!entityChunkPos.equals(this.pos))
-        {
+        if (!entityChunkPos.equals(this.pos)) {
             LOGGER.warn("Wrong location! {}", entity);
             Thread.dumpStack();
         }
@@ -551,19 +533,17 @@ public class Chunk
         getSection(section).addEntity(entity);
     }
 
-    public void removeEntity(Entity entity)
-    {
+    public void removeEntity(@NotNull Entity entity) {
         removeEntityAtIndex(entity, entity.chunkCoordY);
     }
 
-    public void removeEntityAtIndex(Entity entity, int index)
-    {
+    public void removeEntityAtIndex(@NotNull Entity entity, int index) {
         index = MathHelper.clamp(index, 0, CHUNK_SECTIONS - 1);
         getSection(index).removeEntity(entity);
     }
 
-    public boolean canBlockSeeSky(final @NotNull ChunkTilePos tilePos) {
-        return tilePos.y >= this.getHeightValue(tilePos.x, tilePos.z);
+    public boolean canBlockSeeSky(final @NotNull ChunkTilePosc tilePos) {
+        return tilePos.y() >= this.getHeightValue(tilePos.x(), tilePos.z());
     }
 
     @Deprecated
@@ -571,7 +551,7 @@ public class Chunk
         return this.canBlockSeeSky(new ChunkTilePos(x, y, z));
     }
 
-    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePos tilePos) {
+    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePosc tilePos) {
         @Nullable TileEntity tileEntity = this.tileEntityMap.get(tilePos);
 
         if (tileEntity == null) {
@@ -579,7 +559,7 @@ public class Chunk
             if (block == null || !block.isEntityTile) {
                 return null;
             } else {
-                block.onBlockPlacedByWorld(this.world, this.pos.x * CHUNK_SIZE_X + tilePos.x, tilePos.y, this.pos.z * CHUNK_SIZE_Z + tilePos.z);
+                block.onBlockPlacedByWorld(this.world, this.pos.x * CHUNK_SIZE_X + tilePos.x(), tilePos.y(), this.pos.z * CHUNK_SIZE_Z + tilePos.z());
                 tileEntity = this.tileEntityMap.get(tilePos);
             }
         }
@@ -600,8 +580,8 @@ public class Chunk
     public void addTileEntity(final @NotNull TileEntity tileEntity) {
         final @NotNull TilePos tilePos = new TilePos(tileEntity.x, tileEntity.y, tileEntity.z);
 
-        this.setTileEntity(tilePos.toChunkTilePos(), tileEntity);
-        if(this.isLoaded) {
+        this.setTileEntity(new ChunkTilePos(tilePos), tileEntity);
+        if (this.isLoaded) {
             this.world.tileEntityList.add(tileEntity);
         }
     }
@@ -609,7 +589,7 @@ public class Chunk
     /**
      * @return True if the specified tile entity was set
      */
-    public boolean setTileEntity(final @NotNull ChunkTilePos tilePos, final @NotNull TileEntity tileEntity) {
+    public boolean setTileEntity(final @NotNull ChunkTilePosc tilePos, final @NotNull TileEntity tileEntity) {
         final @NotNull TilePos worldPos = new TilePos(this.pos, tilePos);
 
         tileEntity.worldObj = this.world;
@@ -623,7 +603,7 @@ public class Chunk
             Thread.dumpStack();
         } else {
             tileEntity.validate();
-            final @Nullable TileEntity previous = this.tileEntityMap.put(tilePos, tileEntity);
+            final @Nullable TileEntity previous = this.tileEntityMap.put(new ChunkTilePos(tilePos), tileEntity);
             if (previous != null) {
                 previous.invalidate();
             }
@@ -642,7 +622,7 @@ public class Chunk
         return this.setTileEntity(new ChunkTilePos(x, y, z), tileEntity);
     }
 
-    public void removeTileEntity(final @NotNull ChunkTilePos tilePos) {
+    public void removeTileEntity(final @NotNull ChunkTilePosc tilePos) {
         if (this.isLoaded) {
             final @Nullable TileEntity tileEntity = this.tileEntityMap.remove(tilePos);
             if (tileEntity != null) {
@@ -656,8 +636,8 @@ public class Chunk
         this.removeTileEntity(new ChunkTilePos(x, y, z));
     }
 
-    public void removeTileEntity(TileEntity tileEntity) {
-        if (this.isLoaded && tileEntity != null && tileEntityMap.containsValue(tileEntity)) {
+    public void removeTileEntity(@Nullable TileEntity tileEntity) {
+        if (this.isLoaded && tileEntity != null && this.tileEntityMap.containsValue(tileEntity)) {
             final @NotNull ChunkTilePos tilePos = new ChunkTilePos(tileEntity.x, tileEntity.y, tileEntity.z);
             this.tileEntityMap.remove(tilePos);
             tileEntity.invalidate();
@@ -665,109 +645,74 @@ public class Chunk
     }
 
     public void onLoad() {
-        isLoaded = true;
-        world.addAllBlockEntities(tileEntityMap.values());
+        this.isLoaded = true;
+        this.world.addAllBlockEntities(this.tileEntityMap.values());
 
-        for (ChunkSection section : sections) {
-            section.onLoad(world);
-        }
-
-        // Perform time correction on delayed ticks
-        if (this.ticksOnUnload >= 0) {
-            final long oldTime = this.ticksOnUnload;
-            final long newTime = this.world.getWorldTime();
-            for (final @NotNull NextTickListEntry entry : this.tickList.values()) {
-                final long ticksRemaining = entry.getEndTime() - oldTime;
-                entry.creationTime = newTime;
-                entry.delay = ticksRemaining;
-            }
-        }
-
-        this.scheduleLoadedUpdates();
-    }
-
-    private void scheduleLoadedUpdates() {
-        final @NotNull Int2ObjectMap<NextTickListEntry> oldTickList = this.tickList;
-        this.tickList = new Int2ObjectArrayMap<>();
-
-        final @NotNull TilePos worldPos = new TilePos(this.pos, new ChunkTilePos(0, 0, 0));
-        for (final @NotNull NextTickListEntry entry : oldTickList.values()) {
-            final @NotNull TilePos entryPos = new TilePos(entry.x, entry.y, entry.z);
-            this.world.scheduleBlockUpdate(worldPos.add(entryPos), entry.blockId, entry.delay, true);
+        for (ChunkSection section : this.sections) {
+            section.onLoad(this.world);
         }
     }
 
     public void onUnload() {
-        isLoaded = false;
+        this.isLoaded = false;
         TileEntity tileentity;
-        for(Iterator<TileEntity> iterator = tileEntityMap.values().iterator(); iterator.hasNext(); tileentity.invalidate())
-        {
+        for (Iterator<TileEntity> iterator = this.tileEntityMap.values().iterator(); iterator.hasNext(); tileentity.invalidate()) {
             tileentity = iterator.next();
         }
 
-        for (ChunkSection section : sections) {
-            section.onUnload(world);
+        for (ChunkSection section : this.sections) {
+            section.onUnload(this.world);
         }
     }
 
-    public void setChunkModified()
-    {
-        isModified = true;
+    public void setChunkModified() {
+        this.isModified = true;
     }
 
-    public void getEntitiesWithin(Entity toExclude, AABB aabb, List<Entity> entities)
-    {
-        int minSection = Math.max(0, MathHelper.floor((aabb.minY - 2D) / 16D));
-        int maxSection = Math.min(MathHelper.floor((aabb.maxY + 2D) / 16D), CHUNK_SECTIONS - 1);
-        for(int section = minSection; section <= maxSection; section++) {
+    public void getEntitiesWithin(@Nullable Entity toExclude, @NotNull AABBdc aabb, @NotNull List<@NotNull Entity> entities) {
+        int minSection = Math.max(0, MathHelper.floor((aabb.minY() - 2D) / 16D));
+        int maxSection = Math.min(MathHelper.floor((aabb.maxY() + 2D) / 16D), CHUNK_SECTIONS - 1);
+        for (int section = minSection; section <= maxSection; section++) {
             getSection(section).getEntitiesWithin(toExclude, aabb, entities);
         }
     }
 
-    public <T extends Entity> void getEntitiesWithin(Class<T> ofClass, AABB aabb, List<@NotNull T> entities)
-    {
-        int minSection = Math.max(0, MathHelper.floor((aabb.minY - 2D) / 16D));
-        int maxSection = Math.min(MathHelper.floor((aabb.maxY + 2D) / 16D), CHUNK_SECTIONS - 1);
-        for(int section = minSection; section <= maxSection; section++) {
+    public <T extends Entity> void getEntitiesWithin(@NotNull Class<T> ofClass, @NotNull AABBdc aabb, @NotNull List<@NotNull T> entities) {
+        int minSection = Math.max(0, MathHelper.floor((aabb.minY() - 2D) / 16D));
+        int maxSection = Math.min(MathHelper.floor((aabb.maxY() + 2D) / 16D), CHUNK_SECTIONS - 1);
+        for (int section = minSection; section <= maxSection; section++) {
             getSection(section).getEntitiesWithin(ofClass, aabb, entities);
         }
     }
 
-    public boolean needsSaving(boolean saveImmediately)
-    {
-        if(neverSave)
-        {
+    public boolean needsSaving(boolean saveImmediately) {
+        if (this.neverSave) {
             return false;
         }
-        if(saveImmediately)
-        {
-            if(hasEntities && world.getWorldTime() != lastSaveTime)
-            {
+        if (saveImmediately) {
+            if (this.hasEntities && this.world.getWorldTime() != this.lastSaveTime) {
                 return true;
             }
-        }
-        else if(hasEntities && world.getWorldTime() >= lastSaveTime + 600L)
-        {
+        } else if (this.hasEntities && this.world.getWorldTime() >= this.lastSaveTime + 600L) {
             return true;
         }
-        return isModified;
+        return this.isModified;
     }
 
-    public int setChunkData(byte[] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ,
-            int startIndex)
-    {
+    public int setChunkData(byte @NotNull [] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ,
+                            int startIndex) {
         int minSectionY = minY / ChunkSection.SECTION_SIZE_Y;
         int maxSectionY = (int) Math.ceil((double) maxY / (double) ChunkSection.SECTION_SIZE_Y);
 
         for (int sectionY = minSectionY; sectionY <= maxSectionY; sectionY++) {
-            if (sectionY < 0 || sectionY >= sections.length) continue;
+            if (sectionY < 0 || sectionY >= this.sections.length) continue;
 
             int minYSection = minY - (sectionY * ChunkSection.SECTION_SIZE_Y);
             int maxYSection = maxY - (sectionY * ChunkSection.SECTION_SIZE_Y);
             if (minYSection < 0) minYSection = 0;
             if (maxYSection > ChunkSection.SECTION_SIZE_Y) maxYSection = ChunkSection.SECTION_SIZE_Y;
 
-            startIndex = sections[sectionY].setChunkSectionData(data, minX, minYSection, minZ, maxX, maxYSection, maxZ, startIndex);
+            startIndex = this.sections[sectionY].setChunkSectionData(data, minX, minYSection, minZ, maxX, maxYSection, maxZ, startIndex);
         }
 
         recalcHeightmapOnly();
@@ -775,80 +720,76 @@ public class Chunk
         // Read temperature array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                temperature[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
+                this.temperature[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
             }
         }
 
         // Read humidity array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                humidity[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
+                this.humidity[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
             }
         }
 
         // Read variety array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                variety[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
+                this.variety[x * CHUNK_SIZE_Z + z] = (double) (data[startIndex++] & 0xff) / 255D;
             }
         }
 
         return startIndex;
     }
-    
-    public int getChunkData(byte[] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex)
-    {
+
+    public int getChunkData(byte @NotNull [] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex) {
         int minSectionY = minY / ChunkSection.SECTION_SIZE_Y;
         int maxSectionY = (int) Math.ceil((double) maxY / (double) ChunkSection.SECTION_SIZE_Y);
 
         for (int sectionY = minSectionY; sectionY <= maxSectionY; sectionY++) {
-            if (sectionY < 0 || sectionY >= sections.length) continue;
+            if (sectionY < 0 || sectionY >= this.sections.length) continue;
 
             int minYSection = minY - (sectionY * ChunkSection.SECTION_SIZE_Y);
             int maxYSection = maxY - (sectionY * ChunkSection.SECTION_SIZE_Y);
             if (minYSection < 0) minYSection = 0;
             if (maxYSection > ChunkSection.SECTION_SIZE_Y) maxYSection = ChunkSection.SECTION_SIZE_Y;
 
-            startIndex = sections[sectionY].getChunkSectionData(data, minX, minYSection, minZ, maxX, maxYSection, maxZ, startIndex);
+            startIndex = this.sections[sectionY].getChunkSectionData(data, minX, minYSection, minZ, maxX, maxYSection, maxZ, startIndex);
         }
 
         // Write temperature array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                data[startIndex++] = (byte) (temperature[x * CHUNK_SIZE_Z + z] * 255D);
+                data[startIndex++] = (byte) (this.temperature[x * CHUNK_SIZE_Z + z] * 255D);
             }
         }
 
         // Write humidity array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                data[startIndex++] = (byte) (humidity[x * CHUNK_SIZE_Z + z] * 255D);
+                data[startIndex++] = (byte) (this.humidity[x * CHUNK_SIZE_Z + z] * 255D);
             }
         }
 
         // Write variety array
         for (int x = minX; x < maxX; x++) {
             for (int z = minZ; z < maxZ; z++) {
-                data[startIndex++] = (byte) (variety[x * CHUNK_SIZE_Z + z] * 255D);
+                data[startIndex++] = (byte) (this.variety[x * CHUNK_SIZE_Z + z] * 255D);
             }
         }
 
         return startIndex;
     }
 
-    public @NotNull Random getChunkRandom(long xor)
-    {
-        return new Random(world.getRandomSeed() + (this.pos.x * this.pos.x * 0x4c1906L) + (this.pos.x * 0x5ac0dbL) + (this.pos.z * this.pos.z * 0x4307a7L) + (this.pos.z * 0x5f24fL) ^ xor);
+    public @NotNull Random getChunkRandom(long xor) {
+        return new Random(this.world.getRandomSeed() + (this.pos.x * this.pos.x * 0x4c1906L) + (this.pos.x * 0x5ac0dbL) + (this.pos.z * this.pos.z * 0x4307a7L) + (this.pos.z * 0x5f24fL) ^ xor);
     }
 
-    public boolean isChunkEmpty()
-    {
+    public boolean isChunkEmpty() {
         return false;
     }
 
-    public void fixMissingBlocks()
-    {
-        for (ChunkSection section : sections) {
+    public void fixMissingBlocks() {
+        for (ChunkSection section : this.sections) {
             if (section != null && section.blocks != null) {
                 MissingBlockFixer.fixMissingBlocks(section.blocks);
             }
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkCache.java b/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkCache.java
index cdf186f65..e2c46382c 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkCache.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkCache.java
@@ -4,19 +4,20 @@ import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.pos.ChunkPos;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.core.world.season.SeasonManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 public class ChunkCache
-    implements WorldSource
-{
+    implements WorldSource {
     private final @NotNull ChunkPos origin;
     private final @NotNull Chunk @NotNull [] @NotNull [] chunkArray;
     private final @NotNull World world;
@@ -26,9 +27,9 @@ public class ChunkCache
 
     public ChunkCache(final @NotNull World world, final @NotNull TilePos min, final @NotNull TilePos max, boolean priority) {
         this.world = world;
-        this.origin = min.toChunkPos();
+        this.origin = new ChunkPos(min);
 
-        final @NotNull ChunkPos chunkMax = max.toChunkPos();
+        final @NotNull ChunkPos chunkMax = new ChunkPos(max);
         this.widthX = (chunkMax.x - this.origin.x) + 1;
         this.widthZ = (chunkMax.z - this.origin.z) + 1;
         this.chunkArray = new Chunk[this.widthX][this.widthZ];
@@ -59,32 +60,32 @@ public class ChunkCache
     }
 
     @Override
-    public int getBlockId(final @NotNull TilePos tilePos) {
-        if (tilePos.y < 0 || tilePos.y >= this.getHeightBlocks()) {
+    public int getBlockId(final @NotNull TilePosc tilePos) {
+        if (tilePos.y() < 0 || tilePos.y() >= this.getHeightBlocks()) {
             return 0;
         }
 
-        final @NotNull ChunkPos cachePos = tilePos.toChunkPos().sub(this.origin);
+        final @NotNull ChunkPos cachePos = new ChunkPos(tilePos).sub(this.origin.x, this.origin.z, new ChunkPos());
         if (cachePos.x < 0 || cachePos.x >= this.chunkArray.length || cachePos.z < 0 || cachePos.z >= this.chunkArray[cachePos.x].length) {
             return 0;
         }
 
         final @NotNull Chunk chunk = this.chunkArray[cachePos.x][cachePos.z];
-        return chunk.getBlockID(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+        return chunk.getBlockID(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
     }
 
     @Override
-    public @Nullable Block<?> getBlock(final @NotNull TilePos tilePos) {
+    public @Nullable Block<?> getBlock(final @NotNull TilePosc tilePos) {
         return Blocks.getBlock(this.getBlockId(tilePos));
     }
 
     @Override
-    public @Nullable TileEntity getTileEntity(final @NotNull TilePos tilePos) {
-        final @NotNull ChunkPos cachePos = tilePos.toChunkPos().sub(this.origin);
-        return this.chunkArray[cachePos.x][cachePos.z].getTileEntity(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+    public @Nullable TileEntity getTileEntity(final @NotNull TilePosc tilePos) {
+        final @NotNull ChunkPos cachePos = new ChunkPos(tilePos).sub(this.origin.x, this.origin.z, new ChunkPos());
+        return this.chunkArray[cachePos.x][cachePos.z].getTileEntity(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
     }
 
-    public boolean getBlockLitInteriorSurface(final @NotNull TilePos tilePos) {
+    public boolean getBlockLitInteriorSurface(final @NotNull TilePosc tilePos) {
         if (!tilePos.inBounds(this)) {
             return true;
         } else {
@@ -98,30 +99,31 @@ public class ChunkCache
     }
 
     @Override
-    public float getBrightness(final @NotNull TilePos tilePos, final int lightEmission) {
+    public float getBrightness(final @NotNull TilePosc tilePos, final int lightEmission) {
         final int lightValue = this.getBlockLightValue(tilePos);
         return this.world.getWorldType().getBrightnessRamp()[Math.max(lightValue, lightEmission)];
     }
 
     @Override
-    public int getLightmapCoord(final @NotNull TilePos tilePos, final int lightEmission) {
+    public int getLightmapCoord(final @NotNull TilePosc tilePos, final int lightEmission) {
         int skyLight = this.world.getSavedLightValue(LightLayer.Sky, tilePos);
         int blockLight = Math.max(this.world.getSavedLightValue(LightLayer.Block, tilePos), lightEmission);
 
+        TilePos queryPos = new TilePos();
         if (this.getBlockLitInteriorSurface(tilePos)) {
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.up()));
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.down()));
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.east()));
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.west()));
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.south()));
-            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.north()));
-
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.up()));
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.down()));
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.east()));
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.west()));
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.south()));
-            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.north()));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.up(queryPos)));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.down(queryPos)));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.east(queryPos)));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.west(queryPos)));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.south(queryPos)));
+            skyLight = Math.max(skyLight, this.world.getSavedLightValue(LightLayer.Sky, tilePos.north(queryPos)));
+
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.up(queryPos)));
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.down(queryPos)));
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.east(queryPos)));
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.west(queryPos)));
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.south(queryPos)));
+            blockLight = Math.max(blockLight, this.world.getSavedLightValue(LightLayer.Block, tilePos.north(queryPos)));
         }
 
         return this.getLightmapCoord(skyLight, blockLight);
@@ -133,11 +135,11 @@ public class ChunkCache
     }
 
     @Override
-    public float getLightBrightness(final @NotNull TilePos tilePos) {
+    public float getLightBrightness(final @NotNull TilePosc tilePos) {
         return this.world.worldType.getBrightnessRamp()[this.getBlockLightValue(tilePos)];
     }
 
-    public int getBlockLightValue(final @NotNull TilePos tilePos) {
+    public int getBlockLightValue(final @NotNull TilePosc tilePos) {
         return this.getBlockLightValue_do(tilePos, true);
     }
 
@@ -147,83 +149,83 @@ public class ChunkCache
     }
 
     @Deprecated
-    private int getBlockLightValue_do(final @NotNull TilePos tilePos, final boolean first) {
-        if (tilePos.x < World.MIN_BLOCK_X || tilePos.z < World.MIN_BLOCK_Z || tilePos.x >= World.MAX_BLOCK_X || tilePos.z > World.MAX_BLOCK_Z) {
+    private int getBlockLightValue_do(final @NotNull TilePosc tilePos, final boolean first) {
+        if (tilePos.x() < World.MIN_BLOCK_X || tilePos.z() < World.MIN_BLOCK_Z || tilePos.x() >= World.MAX_BLOCK_X || tilePos.z() > World.MAX_BLOCK_Z) {
             return 15;
         }
 
-        if(first) {
-            if (this.getBlockLitInteriorSurface(tilePos))
-            {
-                final int lightUp = this.getBlockLightValue_do(tilePos.up(), false);
-                final int lightEast = this.getBlockLightValue_do(tilePos.east(), false);
-                final int lightWest = this.getBlockLightValue_do(tilePos.west(), false);
-                final int lightSouth = this.getBlockLightValue_do(tilePos.south(), false);
-                final int lightNorth = this.getBlockLightValue_do(tilePos.north(), false);
+        if (first) {
+            TilePos queryPos = new TilePos();
+            if (this.getBlockLitInteriorSurface(tilePos)) {
+                final int lightUp = this.getBlockLightValue_do(tilePos.up(queryPos), false);
+                final int lightEast = this.getBlockLightValue_do(tilePos.east(queryPos), false);
+                final int lightWest = this.getBlockLightValue_do(tilePos.west(queryPos), false);
+                final int lightSouth = this.getBlockLightValue_do(tilePos.south(queryPos), false);
+                final int lightNorth = this.getBlockLightValue_do(tilePos.north(queryPos), false);
                 return Math.max(lightUp, Math.max(lightEast, Math.max(lightWest, Math.max(lightSouth, lightNorth))));
             }
         }
 
-        if (tilePos.y < 0) {
+        if (tilePos.y() < 0) {
             return 0;
         }
 
-        if (tilePos.y >= this.getHeightBlocks()) {
+        if (tilePos.y() >= this.getHeightBlocks()) {
             int brightness = 15 - this.world.skyDarken;
-            if(brightness < 0) {
+            if (brightness < 0) {
                 brightness = 0;
             }
             return brightness;
         } else {
-            final @NotNull ChunkPos cachePos = tilePos.toChunkPos().sub(this.origin);
-            return this.chunkArray[cachePos.x][cachePos.z].getRawBrightness(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1), this.world.skyDarken);
+            final @NotNull ChunkPos cachePos = new ChunkPos(tilePos).sub(this.origin.x, this.origin.z, new ChunkPos());
+            return this.chunkArray[cachePos.x][cachePos.z].getRawBrightness(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1), this.world.skyDarken);
         }
     }
 
     @Override
-    public int getBlockData(final @NotNull TilePos tilePos) {
-        if (tilePos.y < 0 || tilePos.y >= this.getHeightBlocks()) {
+    public int getBlockData(final @NotNull TilePosc tilePos) {
+        if (tilePos.y() < 0 || tilePos.y() >= this.getHeightBlocks()) {
             return 0;
         } else {
-            final @NotNull ChunkPos cachePos = tilePos.toChunkPos().sub(this.origin);
-            return this.chunkArray[cachePos.x][cachePos.z].getBlockMetadata(tilePos.x & (Chunk.CHUNK_SIZE_X - 1), tilePos.y, tilePos.z & (Chunk.CHUNK_SIZE_Z - 1));
+            final @NotNull ChunkPos cachePos = new ChunkPos(tilePos).sub(this.origin.x, this.origin.z, new ChunkPos());
+            return this.chunkArray[cachePos.x][cachePos.z].getBlockMetadata(tilePos.x() & (Chunk.CHUNK_SIZE_X - 1), tilePos.y(), tilePos.z() & (Chunk.CHUNK_SIZE_Z - 1));
         }
     }
 
     @Override
-    public @NotNull Material getBlockMaterial(final @NotNull TilePos tilePos) {
+    public @NotNull Material getBlockMaterial(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         if (block == null) {
-            return Material.air;
+            return Materials.AIR;
         } else {
             return block.getMaterial();
         }
     }
 
     @Override
-    public boolean isBlockOpaqueCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockOpaqueCube(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
         return block != null && block.isSolidRender();
     }
 
     @Override
-    public boolean isBlockNormalCube(final @NotNull TilePos tilePos) {
+    public boolean isBlockNormalCube(final @NotNull TilePosc tilePos) {
         final @Nullable Block<?> block = this.getBlock(tilePos);
-        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos.x, tilePos.y, tilePos.z);
+        return block != null && block.getMaterial().isSolidBlocking() && block.renderAsNormalBlockOnCondition(this, tilePos);
     }
 
     @Override
-    public double getBlockTemperature(final @NotNull TilePos tilePos) {
+    public double getBlockTemperature(final @NotNull TilePosc tilePos) {
         return this.world.getBlockTemperature(tilePos);
     }
 
     @Override
-    public double getBlockHumidity(final @NotNull TilePos tilePos) {
+    public double getBlockHumidity(final @NotNull TilePosc tilePos) {
         return this.world.getBlockHumidity(tilePos);
     }
 
     @Override
-    public double getBlockVariety(final @NotNull TilePos tilePos) {
+    public double getBlockVariety(final @NotNull TilePosc tilePos) {
         return this.world.getBlockVariety(tilePos);
     }
 
@@ -233,12 +235,12 @@ public class ChunkCache
     }
 
     @Override
-    public @NotNull Biome getBlockBiome(final @NotNull TilePos tilePos) {
+    public @NotNull Biome getBlockBiome(final @NotNull TilePosc tilePos) {
         return this.world.getBlockBiome(tilePos);
     }
 
     @Override
-    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePos tilePos) {
+    public int getSavedLightValue(final @NotNull LightLayer lightLayer, final @NotNull TilePosc tilePos) {
         return this.world.getSavedLightValue(lightLayer, tilePos);
     }
 
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkSection.java b/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkSection.java
index 59e047386..fc844e0c7 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkSection.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/ChunkSection.java
@@ -4,14 +4,16 @@ import net.minecraft.core.block.Blocks;
 import net.minecraft.core.data.registry.Registries;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.enums.LightLayer;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.world.data.ChunkNibbleArray;
 import net.minecraft.core.world.data.ChunkUnsignedByteArray;
 import net.minecraft.core.world.pos.ChunkSectionTilePos;
+import net.minecraft.core.world.pos.ChunkSectionTilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 
 import java.nio.ByteBuffer;
 import java.nio.ShortBuffer;
@@ -41,11 +43,11 @@ public class ChunkSection {
         this.data = new ChunkUnsignedByteArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
         this.skylightMap = new ChunkNibbleArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
         this.blocklightMap = new ChunkNibbleArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
-        Arrays.fill(this.biome, (byte)-1);
+        Arrays.fill(this.biome, (byte) -1);
     }
 
-    public static int makeBlockIndex(final @NotNull ChunkSectionTilePos sectionPos) {
-        return (sectionPos.y * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X) + (sectionPos.z * Chunk.CHUNK_SIZE_X) + sectionPos.x;
+    public static int makeBlockIndex(final @NotNull ChunkSectionTilePosc sectionPos) {
+        return (sectionPos.y() * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X) + (sectionPos.z() * Chunk.CHUNK_SIZE_X) + sectionPos.x();
     }
 
     @Deprecated
@@ -53,8 +55,8 @@ public class ChunkSection {
         return ChunkSection.makeBlockIndex(new ChunkSectionTilePos(x, y, z));
     }
 
-    public static int makeBiomeIndex(final @NotNull ChunkSectionTilePos sectionPos) {
-        return ((sectionPos.y >> 3) * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X) + (sectionPos.z * Chunk.CHUNK_SIZE_X) + sectionPos.x;
+    public static int makeBiomeIndex(final @NotNull ChunkSectionTilePosc sectionPos) {
+        return ((sectionPos.y() >> 3) * Chunk.CHUNK_SIZE_Z * Chunk.CHUNK_SIZE_X) + (sectionPos.z() * Chunk.CHUNK_SIZE_X) + sectionPos.x();
     }
 
     @Deprecated
@@ -62,7 +64,7 @@ public class ChunkSection {
         return ChunkSection.makeBiomeIndex(new ChunkSectionTilePos(x, y, z));
     }
 
-    public int getBlockId(final @NotNull ChunkSectionTilePos sectionPos) {
+    public int getBlockId(final @NotNull ChunkSectionTilePosc sectionPos) {
         if (!sectionPos.inBounds() || this.blocks == null) {
             return 0;
         }
@@ -75,7 +77,7 @@ public class ChunkSection {
         return this.getBlockId(new ChunkSectionTilePos(x, y, z));
     }
 
-    public void setBlockId(final @NotNull ChunkSectionTilePos sectionPos, final int id) {
+    public void setBlockId(final @NotNull ChunkSectionTilePosc sectionPos, final int id) {
         assert id == 0 || Blocks.getBlock(id) != null;
 
         if (!sectionPos.inBounds() || (this.blocks == null && id == 0)) {
@@ -92,11 +94,11 @@ public class ChunkSection {
         this.setBlockId(new ChunkSectionTilePos(x, y, z), id);
     }
 
-    public int getData(final @NotNull ChunkSectionTilePos sectionPos) {
+    public int getData(final @NotNull ChunkSectionTilePosc sectionPos) {
         if (!sectionPos.inBounds() || this.blocks == null || this.data == null) {
             return 0;
         }
-        return this.data.get(sectionPos.x, sectionPos.y, sectionPos.z);
+        return this.data.get(sectionPos.x(), sectionPos.y(), sectionPos.z());
     }
 
     @Deprecated
@@ -104,14 +106,14 @@ public class ChunkSection {
         return this.getData(new ChunkSectionTilePos(x, y, z));
     }
 
-    public void setData(final @NotNull ChunkSectionTilePos sectionPos, final int data) {
+    public void setData(final @NotNull ChunkSectionTilePosc sectionPos, final int data) {
         if (!sectionPos.inBounds() || this.blocks == null) {
             return;
         } else if (this.data == null) {
             this.data = new ChunkUnsignedByteArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
         }
 
-        this.data.set(sectionPos.x, sectionPos.y, sectionPos.z, data);
+        this.data.set(sectionPos.x(), sectionPos.y(), sectionPos.z(), data);
     }
 
     @Deprecated
@@ -119,7 +121,7 @@ public class ChunkSection {
         this.setData(new ChunkSectionTilePos(x, y, z), data);
     }
 
-    public @Nullable Biome getBiome(final @NotNull ChunkSectionTilePos sectionPos) {
+    public @Nullable Biome getBiome(final @NotNull ChunkSectionTilePosc sectionPos) {
         if (!sectionPos.inBounds()) {
             return null;
         }
@@ -143,7 +145,7 @@ public class ChunkSection {
         Arrays.fill(this.biome, (byte) biomeId);
     }
 
-    public void setBiome(final @NotNull ChunkSectionTilePos sectionPos, final @NotNull Biome biome) {
+    public void setBiome(final @NotNull ChunkSectionTilePosc sectionPos, final @NotNull Biome biome) {
         if (!sectionPos.inBounds()) {
             return;
         }
@@ -156,7 +158,7 @@ public class ChunkSection {
         this.setBiome(new ChunkSectionTilePos(x, y, z), biome);
     }
 
-    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkSectionTilePos sectionPos) {
+    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkSectionTilePosc sectionPos) {
         if (!sectionPos.inBounds()) {
             return 0;
         }
@@ -167,14 +169,14 @@ public class ChunkSection {
                     return 0;
                 }
 
-                return this.skylightMap.get(sectionPos.x, sectionPos.y, sectionPos.z);
+                return this.skylightMap.get(sectionPos.x(), sectionPos.y(), sectionPos.z());
             }
             case Block -> {
                 if (this.blocklightMap == null) {
                     return 0;
                 }
 
-                return this.blocklightMap.get(sectionPos.x, sectionPos.y, sectionPos.z);
+                return this.blocklightMap.get(sectionPos.x(), sectionPos.y(), sectionPos.z());
             }
             default -> {
                 return 0;
@@ -187,7 +189,7 @@ public class ChunkSection {
         return this.getBrightness(lightLayer, new ChunkSectionTilePos(x, y, z));
     }
 
-    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkSectionTilePos sectionPos, final int brightness) {
+    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkSectionTilePosc sectionPos, final int brightness) {
         if (!sectionPos.inBounds()) {
             return;
         }
@@ -198,14 +200,14 @@ public class ChunkSection {
                     this.skylightMap = new ChunkNibbleArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
                 }
 
-                this.skylightMap.set(sectionPos.x, sectionPos.y, sectionPos.z, brightness);
+                this.skylightMap.set(sectionPos.x(), sectionPos.y(), sectionPos.z(), brightness);
             }
             case Block -> {
                 if (this.blocklightMap == null) {
                     this.blocklightMap = new ChunkNibbleArray(Chunk.CHUNK_SIZE_X, SECTION_SIZE_Y, Chunk.CHUNK_SIZE_Z);
                 }
 
-                this.blocklightMap.set(sectionPos.x, sectionPos.y, sectionPos.z, brightness);
+                this.blocklightMap.set(sectionPos.x(), sectionPos.y(), sectionPos.z(), brightness);
             }
         }
     }
@@ -215,7 +217,7 @@ public class ChunkSection {
         this.setBrightness(lightLayer, new ChunkSectionTilePos(x, y, z), brightness);
     }
 
-    public int getRawBrightness(final @NotNull ChunkSectionTilePos sectionPos, final int subtractedSkyLight) {
+    public int getRawBrightness(final @NotNull ChunkSectionTilePosc sectionPos, final int subtractedSkyLight) {
         if (!sectionPos.inBounds()) {
             return 0;
         }
@@ -236,17 +238,17 @@ public class ChunkSection {
         this.entities.remove(entity);
     }
 
-    public void getEntitiesWithin(final @Nullable Entity toExclude, final @NotNull AABB aabb, final @NotNull List<@NotNull Entity> entities) {
+    public void getEntitiesWithin(final @Nullable Entity toExclude, final @NotNull AABBdc aabb, final @NotNull List<@NotNull Entity> entities) {
         for (final @NotNull Entity e : this.entities) {
-            if (e != toExclude && e.bb.intersects(aabb)) {
+            if (e != toExclude && e.bb.intersectsAABB((AABBd) aabb)) {
                 entities.add(e);
             }
         }
     }
 
-    public <T extends Entity> void getEntitiesWithin(Class<T> ofClass, AABB aabb, List<@NotNull T> entities) {
+    public <T extends Entity> void getEntitiesWithin(@NotNull Class<T> ofClass, @NotNull AABBdc aabb, @NotNull List<@NotNull T> entities) {
         for (Entity e : this.entities) {
-            if (ofClass.isAssignableFrom(e.getClass()) && e.bb.intersects(aabb)) {
+            if (ofClass.isAssignableFrom(e.getClass()) && e.bb.intersectsAABB((AABBd) aabb)) {
                 //noinspection unchecked
                 entities.add((T) e);
             }
@@ -261,19 +263,19 @@ public class ChunkSection {
         world.unloadEntities(this.entities);
     }
 
-    public int setChunkSectionData(byte[] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex) {
+    public int setChunkSectionData(byte @NotNull [] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex) {
         int xSize = maxX - minX;
         int ySize = maxY - minY;
         int zSize = maxZ - minZ;
 
         // Read blocks
         if (data[startIndex++] == 1) {
-            if (blocks == null) {
-                blocks = new short[Chunk.CHUNK_SIZE_X * SECTION_SIZE_Y * Chunk.CHUNK_SIZE_Z];
+            if (this.blocks == null) {
+                this.blocks = new short[Chunk.CHUNK_SIZE_X * SECTION_SIZE_Y * Chunk.CHUNK_SIZE_Z];
             }
 
-            ByteBuffer bb = ByteBuffer.allocate(blocks.length * 2);
-            bb.asShortBuffer().put(blocks);
+            ByteBuffer bb = ByteBuffer.allocate(this.blocks.length * 2);
+            bb.asShortBuffer().put(this.blocks);
 
             for (int cy = minY; cy < maxY; cy++) {
                 for (int cz = minZ; cz < maxZ; cz++) {
@@ -283,7 +285,7 @@ public class ChunkSection {
                 }
             }
 
-            ShortBuffer.wrap(blocks).put(bb.asShortBuffer());
+            ShortBuffer.wrap(this.blocks).put(bb.asShortBuffer());
 
 //            System.out.println("Wrote block array for x: " + chunk.xPosition + " y: " + yPosition + " z: " + chunk.zPosition);
         }
@@ -351,7 +353,7 @@ public class ChunkSection {
         return startIndex;
     }
 
-    public int getChunkSectionData(byte[] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex) {
+    public int getChunkSectionData(byte @NotNull [] data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int startIndex) {
         int xSize = maxX - minX;
         int ySize = maxY - minY;
         int zSize = maxZ - minZ;
@@ -359,16 +361,16 @@ public class ChunkSection {
         // Create buffer to turn short IDs into bytes
         ByteBuffer bb = null;
         if (this.blocks != null) {
-            bb = ByteBuffer.allocate(blocks.length * 2);
-            bb.asShortBuffer().put(blocks);
+            bb = ByteBuffer.allocate(this.blocks.length * 2);
+            bb.asShortBuffer().put(this.blocks);
         }
 
         if (xSize * ySize * zSize == Chunk.CHUNK_SIZE_X * SECTION_SIZE_Y * Chunk.CHUNK_SIZE_Z) {
             // Write blocks
             if (this.blocks != null) {
                 data[startIndex++] = 1;
-                System.arraycopy(bb.array(), 0, data, startIndex, blocks.length * 2);
-                startIndex += blocks.length * 2;
+                System.arraycopy(bb.array(), 0, data, startIndex, this.blocks.length * 2);
+                startIndex += this.blocks.length * 2;
             } else {
                 data[startIndex++] = 0;
             }
@@ -410,7 +412,7 @@ public class ChunkSection {
             }
         } else {
             // Write blocks
-            if (blocks != null) {
+            if (this.blocks != null) {
                 data[startIndex++] = 1;
                 for (int cy = minY; cy < maxY; cy++) {
                     for (int cz = minZ; cz < maxZ; cz++) {
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/DisplayChunk.java b/game/core/src/main/java/net/minecraft/core/world/chunk/DisplayChunk.java
index d71e185b7..125eebb7a 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/DisplayChunk.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/DisplayChunk.java
@@ -4,7 +4,7 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.ChunkPos;
-import net.minecraft.core.world.pos.ChunkTilePos;
+import net.minecraft.core.world.pos.ChunkTilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -26,8 +26,8 @@ public class DisplayChunk extends EmptyChunk{
     }
 
     @Override
-    public int getBlockId(final @NotNull ChunkTilePos tilePos) {
-        if (tilePos.x == displayBlockPosX && tilePos.y == displayBlockPosY && tilePos.z == displayBlockPosZ) {
+    public int getBlockId(final @NotNull ChunkTilePosc tilePos) {
+        if (tilePos.x() == displayBlockPosX && tilePos.y() == displayBlockPosY && tilePos.z() == displayBlockPosZ) {
             return displayBlockId;
         }
 
@@ -35,8 +35,8 @@ public class DisplayChunk extends EmptyChunk{
     }
 
     @Override
-    public int getBlockData(final @NotNull ChunkTilePos tilePos) {
-        if (tilePos.x == displayBlockPosX && tilePos.y == displayBlockPosY && tilePos.z == displayBlockPosZ) {
+    public int getBlockData(final @NotNull ChunkTilePosc tilePos) {
+        if (tilePos.x() == displayBlockPosX && tilePos.y() == displayBlockPosY && tilePos.z() == displayBlockPosZ) {
             return displayBlockMeta;
         }
 
@@ -44,33 +44,33 @@ public class DisplayChunk extends EmptyChunk{
     }
 
     @Override
-    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePos tilePos) {
+    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePosc tilePos) {
         return 15;
     }
 
     @Override
-    public boolean setTileEntity(final @NotNull ChunkTilePos tilePos, final @NotNull TileEntity tileEntity) {
-        if (tilePos.x == displayBlockPosX && tilePos.y == displayBlockPosY && tilePos.z == displayBlockPosZ) {
+    public boolean setTileEntity(final @NotNull ChunkTilePosc tilePos, final @NotNull TileEntity tileEntity) {
+        if (tilePos.x() == displayBlockPosX && tilePos.y() == displayBlockPosY && tilePos.z() == displayBlockPosZ) {
             displayTileEntity = tileEntity;
             displayTileEntity.worldObj = this.world;
-            displayTileEntity.x = tilePos.x;
-            displayTileEntity.y = tilePos.y;
-            displayTileEntity.z = tilePos.z;
+            displayTileEntity.x = tilePos.x();
+            displayTileEntity.y = tilePos.y();
+            displayTileEntity.z = tilePos.z();
         }
 
         return true;
     }
 
     @Override
-    public void removeTileEntity(final @NotNull ChunkTilePos tilePos) {
-        if (tilePos.x == displayBlockPosX && tilePos.y == displayBlockPosY && tilePos.z == displayBlockPosZ) {
+    public void removeTileEntity(final @NotNull ChunkTilePosc tilePos) {
+        if (tilePos.x() == displayBlockPosX && tilePos.y() == displayBlockPosY && tilePos.z() == displayBlockPosZ) {
             displayTileEntity = null;
         }
     }
 
     @Override
-    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePos tilePos) {
-        if (tilePos.x == displayBlockPosX && tilePos.y == displayBlockPosY && tilePos.z == displayBlockPosZ) {
+    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePosc tilePos) {
+        if (tilePos.x() == displayBlockPosX && tilePos.y() == displayBlockPosY && tilePos.z() == displayBlockPosZ) {
             return displayTileEntity;
         }
 
@@ -88,17 +88,17 @@ public class DisplayChunk extends EmptyChunk{
     }
 
     @Override
-    public double getBlockHumidity(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockHumidity(final @NotNull ChunkTilePosc tilePos) {
         return 0.5;
     }
 
     @Override
-    public double getBlockTemperature(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockTemperature(final @NotNull ChunkTilePosc tilePos) {
         return 0.5;
     }
 
     @Override
-    public double getBlockVariety(final @NotNull ChunkTilePos tilePos) {
+    public double getBlockVariety(final @NotNull ChunkTilePosc tilePos) {
         return 0.5;
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/EmptyChunk.java b/game/core/src/main/java/net/minecraft/core/world/chunk/EmptyChunk.java
index f235c6aab..3b5134788 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/EmptyChunk.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/EmptyChunk.java
@@ -2,13 +2,13 @@ package net.minecraft.core.world.chunk;
 
 import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.Entity;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.ChunkPos;
-import net.minecraft.core.world.pos.ChunkTilePos;
+import net.minecraft.core.world.pos.ChunkTilePosc;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.Arrays;
 import java.util.List;
@@ -38,40 +38,40 @@ public class EmptyChunk extends Chunk {
     public void recalcHeightmapAndLightmap() { }
 
     @Override
-    public int getBlockId(final @NotNull ChunkTilePos tilePos) {
+    public int getBlockId(final @NotNull ChunkTilePosc tilePos) {
         return 0;
     }
 
     @Override
-    public boolean setBlockIdData(final @NotNull ChunkTilePos tilePos, final int id, final int data) {
+    public boolean setBlockIdData(final @NotNull ChunkTilePosc tilePos, final int id, final int data) {
         return true;
     }
 
     @Override
-    public boolean setBlockId(final @NotNull ChunkTilePos tilePos, final int id) {
+    public boolean setBlockId(final @NotNull ChunkTilePosc tilePos, final int id) {
         return true;
     }
 
     @Override
-    public int getBlockData(final @NotNull ChunkTilePos tilePos) {
+    public int getBlockData(final @NotNull ChunkTilePosc tilePos) {
         return 0;
     }
 
     @Override
-    public boolean setBlockData(final @NotNull ChunkTilePos tilePos, final int value) {
+    public boolean setBlockData(final @NotNull ChunkTilePosc tilePos, final int value) {
         return true;
     }
 
     @Override
-    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePos tilePos) {
+    public int getBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePosc tilePos) {
         return 0;
     }
 
     @Override
-    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePos tilePos, final int value) { }
+    public void setBrightness(final @NotNull LightLayer lightLayer, final @NotNull ChunkTilePosc tilePos, final int value) { }
 
     @Override
-    public int getRawBrightness(final @NotNull ChunkTilePos tilePos, final int subtractedSkyLight) {
+    public int getRawBrightness(final @NotNull ChunkTilePosc tilePos, final int subtractedSkyLight) {
         return 0;
     }
 
@@ -85,12 +85,12 @@ public class EmptyChunk extends Chunk {
     public void removeEntityAtIndex(final @NotNull Entity entity, final int index) { }
 
     @Override
-    public boolean canBlockSeeSky(final @NotNull ChunkTilePos tilePos) {
+    public boolean canBlockSeeSky(final @NotNull ChunkTilePosc tilePos) {
         return false;
     }
 
     @Override
-    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePos tilePos) {
+    public @Nullable TileEntity getTileEntity(final @NotNull ChunkTilePosc tilePos) {
         return null;
     }
 
@@ -98,12 +98,12 @@ public class EmptyChunk extends Chunk {
     public void addTileEntity(final @NotNull TileEntity tileEntity) { }
 
     @Override
-    public boolean setTileEntity(final @NotNull ChunkTilePos tilePos, final @NotNull TileEntity tileEntity) {
+    public boolean setTileEntity(final @NotNull ChunkTilePosc tilePos, final @NotNull TileEntity tileEntity) {
         return false;
     }
 
     @Override
-    public void removeTileEntity(final @NotNull ChunkTilePos tilePos) { }
+    public void removeTileEntity(final @NotNull ChunkTilePosc tilePos) { }
 
     @Override
     public void onLoad() { }
@@ -115,10 +115,10 @@ public class EmptyChunk extends Chunk {
     public void setChunkModified() { }
 
     @Override
-    public void getEntitiesWithin(final Entity toExclude, final AABB aabb, final List<Entity> entities) { }
+    public void getEntitiesWithin(final @Nullable Entity toExclude, final @NotNull AABBdc aabb, final @NotNull List<@NotNull Entity> entities) { }
 
     @Override
-    public <T extends Entity> void getEntitiesWithin(final Class<T> ofClass, final AABB aabb, final List<@NotNull T> entities) { }
+    public <T extends Entity> void getEntitiesWithin(final @NotNull Class<T> ofClass, final @NotNull AABBdc aabb, final @NotNull List<T> entities) { }
 
     @Override
     public boolean needsSaving(final boolean saveImmediately) {
@@ -126,7 +126,7 @@ public class EmptyChunk extends Chunk {
     }
 
     @Override
-    public int setChunkData(final byte[] data, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ,
+    public int setChunkData(final byte @NotNull [] data, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ,
                             final int startIndex) {
         final int dx = maxX - minX;
         final int dy = maxY - minY;
@@ -136,7 +136,7 @@ public class EmptyChunk extends Chunk {
     }
 
     @Override
-    public int getChunkData(final byte[] data, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ,
+    public int getChunkData(final byte @NotNull [] data, final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ,
                             final int startIndex) {
         final int dx = maxX - minX;
         final int dy = maxY - minY;
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/provider/ChunkProviderThreaded.java b/game/core/src/main/java/net/minecraft/core/world/chunk/provider/ChunkProviderThreaded.java
index 6b8a1395c..7696e8930 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/provider/ChunkProviderThreaded.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/provider/ChunkProviderThreaded.java
@@ -2,7 +2,6 @@ package net.minecraft.core.world.chunk.provider;
 
 import com.mojang.logging.LogUtils;
 import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
-import it.unimi.dsi.fastutil.objects.ObjectArrayList;
 import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.world.ProgressListener;
@@ -18,8 +17,6 @@ import org.slf4j.Logger;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -238,22 +235,15 @@ public class ChunkProviderThreaded implements IChunkProvider {
         ChunkPos pos = chunk.pos;
         if (!chunk.isTerrainPopulated && isChunkValid(pos)) {
             synchronized (this.loadedChunks) {
-                ChunkPos northPos       = pos.add( 0, -1);
-                ChunkPos northEastPos   = pos.add( 1, -1);
-                ChunkPos eastPos        = pos.add( 1,  0);
-                ChunkPos southEastPos   = pos.add( 1,  1);
-                ChunkPos southPos       = pos.add( 0,  1);
-                ChunkPos southWestPos   = pos.add(-1,  1);
-                ChunkPos westPos        = pos.add(-1,  0);
-                ChunkPos northWestPos   = pos.add(-1, -1);
-                boolean northLoaded     = this.loadedChunks.containsKey(northPos);
-                boolean northEastLoaded = this.loadedChunks.containsKey(northEastPos);
-                boolean eastLoaded      = this.loadedChunks.containsKey(eastPos);
-                boolean southEastLoaded = this.loadedChunks.containsKey(southEastPos);
-                boolean southLoaded     = this.loadedChunks.containsKey(southPos);
-                boolean southWestLoaded = this.loadedChunks.containsKey(southWestPos);
-                boolean westLoaded      = this.loadedChunks.containsKey(westPos);
-                boolean northWestLoaded = this.loadedChunks.containsKey(northWestPos);
+                ChunkPos queryPos = new ChunkPos();
+                boolean northLoaded = this.loadedChunks.containsKey(pos.add(0, -1, queryPos));
+                boolean northEastLoaded = this.loadedChunks.containsKey(pos.add(1, -1, queryPos));
+                boolean eastLoaded = this.loadedChunks.containsKey(pos.add(1, 0, queryPos));
+                boolean southEastLoaded = this.loadedChunks.containsKey(pos.add(1, 1, queryPos));
+                boolean southLoaded = this.loadedChunks.containsKey(pos.add(0, 1, queryPos));
+                boolean southWestLoaded = this.loadedChunks.containsKey(pos.add(-1, 1, queryPos));
+                boolean westLoaded = this.loadedChunks.containsKey(pos.add(-1, 0, queryPos));
+                boolean northWestLoaded = this.loadedChunks.containsKey(pos.add(-1, -1, queryPos));
                 if (northLoaded && northEastLoaded && eastLoaded && southEastLoaded && southLoaded && southWestLoaded && westLoaded && northWestLoaded) {
                     decorate(chunk);
                     return true;
@@ -264,31 +254,24 @@ public class ChunkProviderThreaded implements IChunkProvider {
     }
 
     protected void checkForNeighborDecorations(@NotNull ChunkPos chunkPos) {
-        ChunkPos northPos       = chunkPos.add( 0, -1);
-        ChunkPos northEastPos   = chunkPos.add( 1, -1);
-        ChunkPos eastPos        = chunkPos.add( 1,  0);
-        ChunkPos southEastPos   = chunkPos.add( 1,  1);
-        ChunkPos southPos       = chunkPos.add( 0,  1);
-        ChunkPos southWestPos   = chunkPos.add(-1,  1);
-        ChunkPos westPos        = chunkPos.add(-1,  0);
-        ChunkPos northWestPos   = chunkPos.add(-1, -1);
+        ChunkPos queryPos = new ChunkPos();
         synchronized (this.positionsToCheckIfCanDecorate) {
             Chunk c;
-            c = this.loadedChunks.get(northPos);
+            c = this.loadedChunks.get(chunkPos.add(0, -1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(northEastPos);
+            c = this.loadedChunks.get(chunkPos.add(1, -1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(eastPos);
+            c = this.loadedChunks.get(chunkPos.add(1, 0, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(southEastPos);
+            c = this.loadedChunks.get(chunkPos.add(1, 1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(southPos);
+            c = this.loadedChunks.get(chunkPos.add(0, 1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(southWestPos);
+            c = this.loadedChunks.get(chunkPos.add(-1, 1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(westPos);
+            c = this.loadedChunks.get(chunkPos.add(-1, 0, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
-            c = this.loadedChunks.get(northWestPos);
+            c = this.loadedChunks.get(chunkPos.add(-1, -1, queryPos));
             if (c != null && !c.isTerrainPopulated) this.positionsToCheckIfCanDecorate.add(c);
         }
     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/reader/ChunkReaderVersion3.java b/game/core/src/main/java/net/minecraft/core/world/chunk/reader/ChunkReaderVersion3.java
index ba5d71691..e4e790f6a 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/reader/ChunkReaderVersion3.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/reader/ChunkReaderVersion3.java
@@ -191,16 +191,6 @@ public class ChunkReaderVersion3
         }
 
         final @NotNull Int2ObjectMap<NextTickListEntry> entries = new Int2ObjectArrayMap<>();
-        for (final @NotNull Tag<?> tag : ticksTag) {
-            if (tag instanceof CompoundTag) {
-                final @NotNull CompoundTag tickTag = (CompoundTag) tag;
-                final @Nullable NextTickListEntry entry = NextTickListEntry.deserialize(tickTag);
-                if (entry != null) {
-                    final int compressed = NextTickListEntry.compressChunkCoord((short) entry.x, (short) entry.y, (short) entry.z);
-                    entries.put(compressed, entry);
-                }
-            }
-        }
 
         return entries;
     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/chunk/writer/ChunkWriter.java b/game/core/src/main/java/net/minecraft/core/world/chunk/writer/ChunkWriter.java
index d671296c8..6298ae49a 100644
--- a/game/core/src/main/java/net/minecraft/core/world/chunk/writer/ChunkWriter.java
+++ b/game/core/src/main/java/net/minecraft/core/world/chunk/writer/ChunkWriter.java
@@ -123,9 +123,6 @@ public class ChunkWriter
 
     public void putTickList(final @NotNull Int2ObjectMap<NextTickListEntry> entries) {
         final @NotNull ListTag ticksTag = new ListTag();
-        for (final @NotNull NextTickListEntry entry : entries.values()) {
-            ticksTag.addTag(NextTickListEntry.serialize(entry));
-        }
 
         this.tag.putList("TicksList", ticksTag);
     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/ChunkDecoratorOverworld.java b/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/ChunkDecoratorOverworld.java
index 829bebe08..58afeae82 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/ChunkDecoratorOverworld.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/ChunkDecoratorOverworld.java
@@ -10,7 +10,7 @@ import net.minecraft.core.block.BlockLogicOreLapis;
 import net.minecraft.core.block.BlockLogicOreRedstone;
 import net.minecraft.core.block.BlockLogicSand;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.type.WorldTypes;
@@ -79,10 +79,10 @@ public class ChunkDecoratorOverworld
                             int negZId = this.world.getBlockId(x + dx, topBlock - 1, z + dz - 1);
                             int negYId = this.world.getBlockId(x + dx, topBlock - 2, z + dz);
                             if (
-                                posXId != 0 && (Blocks.blocksList[posXId].getMaterial().isSolid() || Blocks.blocksList[posXId].getMaterial() == Material.water) &&
-                                    negXId != 0 && (Blocks.blocksList[negXId].getMaterial().isSolid() || Blocks.blocksList[negXId].getMaterial() == Material.water) &&
-                                    posZId != 0 && (Blocks.blocksList[posZId].getMaterial().isSolid() || Blocks.blocksList[posZId].getMaterial() == Material.water) &&
-                                    negZId != 0 && (Blocks.blocksList[negZId].getMaterial().isSolid() || Blocks.blocksList[negZId].getMaterial() == Material.water) &&
+                                posXId != 0 && (Blocks.blocksList[posXId].getMaterial().isSolid() || Blocks.blocksList[posXId].getMaterial() == Materials.WATER) &&
+                                    negXId != 0 && (Blocks.blocksList[negXId].getMaterial().isSolid() || Blocks.blocksList[negXId].getMaterial() == Materials.WATER) &&
+                                    posZId != 0 && (Blocks.blocksList[posZId].getMaterial().isSolid() || Blocks.blocksList[posZId].getMaterial() == Materials.WATER) &&
+                                    negZId != 0 && (Blocks.blocksList[negZId].getMaterial().isSolid() || Blocks.blocksList[negZId].getMaterial() == Materials.WATER) &&
                                     negYId != 0 && Blocks.blocksList[negYId].getMaterial().isSolid()
                             ) {
                                 this.world.setBlock(x + dx, topBlock - 1, z + dz, Blocks.FLUID_WATER_STILL.id());
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/retro/ChunkDecoratorOverworldRetro.java b/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/retro/ChunkDecoratorOverworldRetro.java
index 2522b96fe..ab9769f6e 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/retro/ChunkDecoratorOverworldRetro.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/chunk/perlin/overworld/retro/ChunkDecoratorOverworldRetro.java
@@ -7,7 +7,7 @@ import net.minecraft.core.block.BlockLogicOreIron;
 import net.minecraft.core.block.BlockLogicOreRedstone;
 import net.minecraft.core.block.BlockLogicSand;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.generate.chunk.ChunkDecorator;
@@ -189,10 +189,10 @@ public class ChunkDecoratorOverworldRetro
         for (int l10 = k + 8; l10 < k + 8 + 16; l10++) {
             for (int k15 = l + 8; k15 < l + 8 + 16; k15++) {
                 int i18 = this.world.findTopSolidBlock(l10, k15);
-                if (this.snowCovered && i18 > minY && i18 <= maxY && this.world.getBlockId(l10, i18, k15) == 0 && this.world.getBlockMaterial(l10, i18 - 1, k15).blocksMotion() && this.world.getBlockMaterial(l10, i18 - 1, k15) != Material.ice) {
+                if (this.snowCovered && i18 > minY && i18 <= maxY && this.world.getBlockId(l10, i18, k15) == 0 && this.world.getBlockMaterial(l10, i18 - 1, k15).blocksMotion() && this.world.getBlockMaterial(l10, i18 - 1, k15) != Materials.ICE) {
                     this.world.setBlockWithNotify(l10, i18, k15, Blocks.LAYER_SNOW.id());
                 }
-                if (this.snowCovered && this.world.getBlockMaterial(l10, this.world.getWorldType().getOceanY() - 1, k15) == Material.water) {
+                if (this.snowCovered && this.world.getBlockMaterial(l10, this.world.getWorldType().getOceanY() - 1, k15) == Materials.WATER) {
                     this.world.setBlockWithNotify(l10, this.world.getWorldType().getOceanY() - 1, k15, Blocks.ICE.id());
                 }
             }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureAlgae.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureAlgae.java
index 678b53444..63244bdcc 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureAlgae.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureAlgae.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 
 import java.util.Random;
@@ -18,7 +18,7 @@ public class WorldFeatureAlgae extends WorldFeature
             int j1 = (y);
             int k1 = (z + random.nextInt(8)) - random.nextInt(8);
             if((world.getBlockId(i1, j1, k1) == Blocks.FLUID_WATER_STILL.id()) &&
-                    world.getBlockMaterial(i1, j1+1, k1) == Material.air)
+                    world.getBlockMaterial(i1, j1+1, k1) == Materials.AIR)
             {
                 world.setBlock(i1, j1+1, k1, Blocks.ALGAE.id());
             }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureClay.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureClay.java
index 16486fda5..0e9bdb017 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureClay.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureClay.java
@@ -2,7 +2,7 @@ package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
 
@@ -28,7 +28,7 @@ public class WorldFeatureClay extends WorldFeature
     @Override
 	public boolean place(World world, Random random, int x, int y, int z)
     {
-        if(world.getBlockMaterial(x, y, z) != Material.water)
+        if(world.getBlockMaterial(x, y, z) != Materials.WATER)
         {
             return false;
         }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureDungeon.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureDungeon.java
index f69886b97..3e7b5eeac 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureDungeon.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureDungeon.java
@@ -16,69 +16,60 @@ import org.jetbrains.annotations.Nullable;
 
 import java.util.Random;
 
-public class WorldFeatureDungeon extends WorldFeature
-{
-	public int blockIdWalls;
-	public int blockIdFloor;
-	public @Nullable String mobOverride;
+public class WorldFeatureDungeon extends WorldFeature {
+    public int blockIdWalls;
+    public int blockIdFloor;
+    public @Nullable String mobOverride;
     public WeightedRandomBag<WeightedRandomLootObject> chestLoot;
     public WeightedRandomBag<String> spawnerMonsters;
 
     @MethodParametersAnnotation(names = {"blockIdWalls", "blockIdFloor", "mobOverrideDispatcherId"})
-    public WorldFeatureDungeon(int blockIdWalls, int blockIdFloor, @Nullable String mobOverride)
-    {
-    	this.blockIdWalls = blockIdWalls;
-    	this.blockIdFloor = blockIdFloor;
-    	this.mobOverride = mobOverride;
+    public WorldFeatureDungeon(int blockIdWalls, int blockIdFloor, @Nullable String mobOverride) {
+        this.blockIdWalls = blockIdWalls;
+        this.blockIdFloor = blockIdFloor;
+        this.mobOverride = mobOverride;
         this.chestLoot = new WeightedRandomBag<>();
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.SADDLE.getDefaultStack()), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.INGOT_IRON.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_BREAD.getDefaultStack()), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.WHEAT.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.GUNPOWDER.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.STRING.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.BUCKET.getDefaultStack()), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_APPLE_GOLD.getDefaultStack()), 1);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.DUST_REDSTONE.getDefaultStack(), 1, 4), 50);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.SADDLE.getDefaultStack()), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.INGOT_IRON.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_BREAD.getDefaultStack()), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.WHEAT.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.GUNPOWDER.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.STRING.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.BUCKET.getDefaultStack()), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_APPLE_GOLD.getDefaultStack()), 1);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.DUST_REDSTONE.getDefaultStack(), 1, 4), 50);
         for (int i = 0; i < 9; i++) {
-            chestLoot.addEntry(new WeightedRandomLootObject(new ItemStack(Item.itemsList[Items.RECORD_13.id + i]), 1), 1);
+            this.chestLoot.addEntry(new WeightedRandomLootObject(new ItemStack(Item.itemsList[Items.RECORD_13.id + i]), 1), 1);
         }
-        chestLoot.addEntry(new WeightedRandomLootObject(Blocks.SAPLING_CACAO.getDefaultStack()), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Blocks.SPONGE_DRY.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.BONE.getDefaultStack(), 1, 4), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_APPLE.getDefaultStack()), 100);
-        chestLoot.addEntry(new WeightedRandomLootObject(null),239);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Blocks.SAPLING_CACAO.getDefaultStack()), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Blocks.SPONGE_DRY.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.BONE.getDefaultStack(), 1, 4), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(Items.FOOD_APPLE.getDefaultStack()), 100);
+        this.chestLoot.addEntry(new WeightedRandomLootObject(null), 239);
 
         this.spawnerMonsters = new WeightedRandomBag<>();
-        spawnerMonsters.addEntry("Skeleton", 1);
-        spawnerMonsters.addEntry("Zombie", 2);
-        spawnerMonsters.addEntry("Spider", 1);
+        this.spawnerMonsters.addEntry("Skeleton", 1);
+        this.spawnerMonsters.addEntry("Zombie", 2);
+        this.spawnerMonsters.addEntry("Spider", 1);
     }
 
     @Override
-	public boolean place(World world, Random random, int x, int y, int z)
-    {
+    public boolean place(World world, Random random, int x, int y, int z) {
         byte height = 3;
         int width = random.nextInt(2) + 2;
         int length = random.nextInt(2) + 2;
         int j1 = 0;
-        for(int k1 = x - width - 1; k1 <= x + width + 1; k1++)
-        {
-            for(int j2 = y - 1; j2 <= y + height + 1; j2++)
-            {
-                for(int i3 = z - length - 1; i3 <= z + length + 1; i3++)
-                {
+        for (int k1 = x - width - 1; k1 <= x + width + 1; k1++) {
+            for (int j2 = y - 1; j2 <= y + height + 1; j2++) {
+                for (int i3 = z - length - 1; i3 <= z + length + 1; i3++) {
                     Material material = world.getBlockMaterial(k1, j2, i3);
-                    if(j2 == y - 1 && !material.isSolid())
-                    {
+                    if (j2 == y - 1 && !material.isSolid()) {
                         return false;
                     }
-                    if(j2 == y + height + 1 && !material.isSolid())
-                    {
+                    if (j2 == y + height + 1 && !material.isSolid()) {
                         return false;
                     }
-                    if((k1 == x - width - 1 || k1 == x + width + 1 || i3 == z - length - 1 || i3 == z + length + 1) && j2 == y && world.isAirBlock(k1, j2, i3) && world.isAirBlock(k1, j2 + 1, i3))
-                    {
+                    if ((k1 == x - width - 1 || k1 == x + width + 1 || i3 == z - length - 1 || i3 == z + length + 1) && j2 == y && world.isAirBlock(k1, j2, i3) && world.isAirBlock(k1, j2 + 1, i3)) {
                         j1++;
                     }
                 }
@@ -87,34 +78,26 @@ public class WorldFeatureDungeon extends WorldFeature
 
         }
 
-        if(j1 < 1 || j1 > 5)
-        {
+        if (j1 < 1 || j1 > 5) {
             return false;
         }
-        for(int l1 = x - width - 1; l1 <= x + width + 1; l1++)
-        {
-            for(int k2 = y + height; k2 >= y - 1; k2--)
-            {
-                for(int j3 = z - length - 1; j3 <= z + length + 1; j3++)
-                {
-                    if(l1 == x - width - 1 || k2 == y - 1 || j3 == z - length - 1 || l1 == x + width + 1 || k2 == y + height + 1 || j3 == z + length + 1)
-                    {
-                        if(k2 >= 0 && !world.getBlockMaterial(l1, k2 - 1, j3).isSolid())
-                        {
+        for (int l1 = x - width - 1; l1 <= x + width + 1; l1++) {
+            for (int k2 = y + height; k2 >= y - 1; k2--) {
+                for (int j3 = z - length - 1; j3 <= z + length + 1; j3++) {
+                    if (l1 == x - width - 1 || k2 == y - 1 || j3 == z - length - 1 || l1 == x + width + 1 || k2 == y + height + 1 || j3 == z + length + 1) {
+                        if (k2 >= 0 && !world.getBlockMaterial(l1, k2 - 1, j3).isSolid()) {
                             world.setBlockWithNotify(l1, k2, j3, 0);
                             continue;
                         }
-                        if(!world.getBlockMaterial(l1, k2, j3).isSolid())
-                        {
+                        if (!world.getBlockMaterial(l1, k2, j3).isSolid()) {
                             continue;
                         }
                         if (k2 == y - 1 && random.nextInt(4) != 0) {
-                            world.setBlockWithNotify(l1, k2, j3, blockIdFloor);
+                            world.setBlockWithNotify(l1, k2, j3, this.blockIdFloor);
                         } else {
-                            world.setBlockWithNotify(l1, k2, j3, blockIdWalls);
+                            world.setBlockWithNotify(l1, k2, j3, this.blockIdWalls);
                         }
-                    } else
-                    {
+                    } else {
                         world.setBlockWithNotify(l1, k2, j3, 0);
                     }
                 }
@@ -123,75 +106,63 @@ public class WorldFeatureDungeon extends WorldFeature
 
         }
 
-        for(int i2 = 0; i2 < 2; i2++)
-        {
+        for (int i2 = 0; i2 < 2; i2++) {
             label0:
-            for(int l2 = 0; l2 < 3; l2++)
-            {
+            for (int l2 = 0; l2 < 3; l2++) {
                 int k3 = (x + random.nextInt(width * 2 + 1)) - width;
                 int l3 = y;
                 int i4 = (z + random.nextInt(length * 2 + 1)) - length;
-                if(!world.isAirBlock(k3, l3, i4))
-                {
+                if (!world.isAirBlock(k3, l3, i4)) {
                     continue;
                 }
                 int j4 = 0;
-                if(world.getBlockMaterial(k3 - 1, l3, i4).isSolid())
-                {
+                if (world.getBlockMaterial(k3 - 1, l3, i4).isSolid()) {
                     j4++;
                 }
-                if(world.getBlockMaterial(k3 + 1, l3, i4).isSolid())
-                {
+                if (world.getBlockMaterial(k3 + 1, l3, i4).isSolid()) {
                     j4++;
                 }
-                if(world.getBlockMaterial(k3, l3, i4 - 1).isSolid())
-                {
+                if (world.getBlockMaterial(k3, l3, i4 - 1).isSolid()) {
                     j4++;
                 }
-                if(world.getBlockMaterial(k3, l3, i4 + 1).isSolid())
-                {
+                if (world.getBlockMaterial(k3, l3, i4 + 1).isSolid()) {
                     j4++;
                 }
-                if(j4 != 1)
-                {
+                if (j4 != 1) {
                     continue;
                 }
                 world.setBlockWithNotify(k3, l3, i4, Blocks.CHEST_PLANKS_OAK.id());
                 BlockLogicChest.setDefaultDirection(world, new TilePos(k3, l3, i4));
-                TileEntityChest tileentitychest = (TileEntityChest)world.getTileEntity(k3, l3, i4);
+                TileEntityChest tileentitychest = (TileEntityChest) world.getTileEntity(k3, l3, i4);
                 int k4 = 0;
-                do
-                {
-                    if(k4 >= 8)
-                    {
+                do {
+                    if (k4 >= 8) {
                         break label0;
                     }
                     ItemStack itemstack = pickCheckLootItem(random);
-                    if(itemstack != null)
-                    {
+                    if (itemstack != null) {
                         tileentitychest.setItem(random.nextInt(tileentitychest.getContainerSize()), itemstack);
                     }
                     k4++;
-                } while(true);
+                } while (true);
             }
 
         }
 
         world.setBlockWithNotify(x, y, z, Blocks.MOBSPAWNER.id());
-        TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getTileEntity(x, y, z);
-        tileentitymobspawner.setMobId(pickMobSpawner(random));
+        if (world.getTileEntity(x, y, z) instanceof TileEntityMobSpawner spawner) {
+            spawner.setMobId(pickMobSpawner(random));
+        }
         return true;
     }
 
-    private ItemStack pickCheckLootItem(Random random)
-    {
-        return chestLoot.getRandom(random).getItemStack(random);
+    private ItemStack pickCheckLootItem(Random random) {
+        return this.chestLoot.getRandom(random).getItemStack(random);
     }
 
-    private String pickMobSpawner(Random random)
-    {
-    	if (mobOverride != null) return mobOverride;
+    private String pickMobSpawner(Random random) {
+        if (this.mobOverride != null) return this.mobOverride;
 
-        return spawnerMonsters.getRandom(random);
+        return this.spawnerMonsters.getRandom(random);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLabyrinth.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLabyrinth.java
index f93de58ab..ba9b554b7 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLabyrinth.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLabyrinth.java
@@ -8,6 +8,7 @@ import net.minecraft.core.block.entity.TileEntityChest;
 import net.minecraft.core.block.entity.TileEntityDispenser;
 import net.minecraft.core.block.entity.TileEntityMobSpawner;
 import net.minecraft.core.block.entity.TileEntityStatue;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.block.tag.BlockTags;
 import net.minecraft.core.enums.HumanArmorShape;
 import net.minecraft.core.item.IArmorItem;
@@ -17,7 +18,6 @@ import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.biome.Biome;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.biome.Biomes;
 import net.minecraft.core.world.pos.TilePos;
 import org.jetbrains.annotations.Nullable;
@@ -273,11 +273,11 @@ public class WorldFeatureLabyrinth extends WorldFeature
             return true;
         }
         return BlockTags.CAVES_CUT_THROUGH.appliesTo(world.getBlock(x, y, z)) ||
-                world.getBlockMaterial(x, y, z) == Material.grass ||
-                world.getBlockMaterial(x, y, z) == Material.dirt ||
+                world.getBlockMaterial(x, y, z) == Materials.GRASS ||
+                world.getBlockMaterial(x, y, z) == Materials.DIRT ||
                 world.getBlockMaterial(x, y, z).isStone() ||
-                world.getBlockMaterial(x, y, z) == Material.sand ||
-                world.getBlockMaterial(x, y, z) == Material.moss;
+                world.getBlockMaterial(x, y, z) == Materials.SAND ||
+                world.getBlockMaterial(x, y, z) == Materials.MOSS;
     }
 
     private void generateCorridor(World world, Random random, int blockX, int blockY, int blockZ, int rot, int corridorIteration){
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLake.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLake.java
index 85462cd05..cc3538cc8 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLake.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureLake.java
@@ -1,6 +1,7 @@
 package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.enums.LightLayer;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.world.World;
@@ -118,7 +119,7 @@ public class WorldFeatureLake extends WorldFeature
 
         }
 
-        if(Blocks.blocksList[liquidId].getMaterial() == Material.lava)
+        if(Blocks.blocksList[liquidId].getMaterial() == Materials.LAVA)
         {
             for(int dx = 0; dx < 16; dx++)
             {
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeaturePumice.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeaturePumice.java
index 759a6fc2c..d0e2e3746 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeaturePumice.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeaturePumice.java
@@ -2,7 +2,7 @@ package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.World;
 
@@ -26,7 +26,7 @@ public class WorldFeaturePumice extends WorldFeature{
     @Override
     public boolean place(World world, Random random, int x, int y, int z)
     {
-        if(world.getBlockMaterial(x, y, z) != Material.lava || world.getBlockId(x, y + 1, z) != 0)
+        if(world.getBlockMaterial(x, y, z) != Materials.LAVA || world.getBlockId(x, y + 1, z) != 0)
         {
             return false;
         }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCane.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCane.java
index 26491dc96..87a76fc66 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCane.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCane.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 
 import java.util.Random;
@@ -21,7 +21,7 @@ public class WorldFeatureSugarCane extends WorldFeature
             int i1 = (x + random.nextInt(4)) - random.nextInt(4);
             int j1 = y;
             int k1 = (z + random.nextInt(4)) - random.nextInt(4);
-            if(!world.isAirBlock(i1, j1, k1) || world.getBlockMaterial(i1 - 1, j1 - 1, k1) != Material.water && world.getBlockMaterial(i1 + 1, j1 - 1, k1) != Material.water && world.getBlockMaterial(i1, j1 - 1, k1 - 1) != Material.water && world.getBlockMaterial(i1, j1 - 1, k1 + 1) != Material.water)
+            if(!world.isAirBlock(i1, j1, k1) || world.getBlockMaterial(i1 - 1, j1 - 1, k1) != Materials.WATER && world.getBlockMaterial(i1 + 1, j1 - 1, k1) != Materials.WATER && world.getBlockMaterial(i1, j1 - 1, k1 - 1) != Materials.WATER && world.getBlockMaterial(i1, j1 - 1, k1 + 1) != Materials.WATER)
             {
                 continue;
             }
diff --git a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCaneTall.java b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCaneTall.java
index ad169f975..b4a282cd9 100644
--- a/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCaneTall.java
+++ b/game/core/src/main/java/net/minecraft/core/world/generate/feature/WorldFeatureSugarCaneTall.java
@@ -1,7 +1,7 @@
 package net.minecraft.core.world.generate.feature;
 
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.World;
 
 import java.util.Random;
@@ -21,7 +21,7 @@ public class WorldFeatureSugarCaneTall extends WorldFeature
             int i1 = (x + random.nextInt(4)) - random.nextInt(4);
             int j1 = y;
             int k1 = (z + random.nextInt(4)) - random.nextInt(4);
-            if(!world.isAirBlock(i1, j1, k1) || world.getBlockMaterial(i1 - 1, j1 - 1, k1) != Material.water && world.getBlockMaterial(i1 + 1, j1 - 1, k1) != Material.water && world.getBlockMaterial(i1, j1 - 1, k1 - 1) != Material.water && world.getBlockMaterial(i1, j1 - 1, k1 + 1) != Material.water)
+            if(!world.isAirBlock(i1, j1, k1) || world.getBlockMaterial(i1 - 1, j1 - 1, k1) != Materials.WATER && world.getBlockMaterial(i1 + 1, j1 - 1, k1) != Materials.WATER && world.getBlockMaterial(i1, j1 - 1, k1 - 1) != Materials.WATER && world.getBlockMaterial(i1, j1 - 1, k1 + 1) != Materials.WATER)
             {
                 continue;
             }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pathfinder/Path.java b/game/core/src/main/java/net/minecraft/core/world/pathfinder/Path.java
index 2b349dafd..905f8d446 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pathfinder/Path.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pathfinder/Path.java
@@ -1,47 +1,41 @@
 package net.minecraft.core.world.pathfinder;
 
 import net.minecraft.core.entity.Entity;
-import net.minecraft.core.util.phys.Vec3;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
-public class Path
-{
+public class Path {
     private final Node[] nodes;
     public final int length;
     private int index;
 
-    public Path(Node[] nodes)
-    {
+    public Path(Node[] nodes) {
         this.nodes = nodes;
-        length = nodes.length;
+        this.length = nodes.length;
     }
 
-    public void next()
-    {
-        index++;
+    public void next() {
+        this.index++;
     }
 
-    public boolean isDone()
-    {
-        return index >= nodes.length;
+    public boolean isDone() {
+        return this.index >= this.nodes.length;
     }
 
-    public Node last()
-    {
-        if(length > 0)
-        {
-            return nodes[length - 1];
-        }
-        else
-        {
+    public Node last() {
+        if (this.length > 0) {
+            return this.nodes[this.length - 1];
+        } else {
             return null;
         }
     }
 
-    public Vec3 getPos(Entity entity)
-    {
-        double x = (double) nodes[index].x + (double)(int)(entity.bbWidth + 2.0F) * 0.5D;
-        double y = nodes[index].y;
-        double z = (double) nodes[index].z + (double)(int)(entity.bbWidth + 2.0F) * 0.5D;
-        return Vec3.fromPool(x, y, z);
+    public @Nullable Vector3dc getPos(@NotNull Entity entity) {
+        double x = (double) this.nodes[this.index].x + (double) (int) (entity.bbWidth + 2.0F) * 0.5D;
+        double y = this.nodes[this.index].y;
+        double z = (double) this.nodes[this.index].z + (double) (int) (entity.bbWidth + 2.0F) * 0.5D;
+        return new Vector3d(x, y, z);
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pathfinder/PathFinder.java b/game/core/src/main/java/net/minecraft/core/world/pathfinder/PathFinder.java
index fdc7611ee..4448dc7ea 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pathfinder/PathFinder.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pathfinder/PathFinder.java
@@ -1,16 +1,14 @@
 package net.minecraft.core.world.pathfinder;
 
-import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
-import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.BlockLogicDoor;
 import net.minecraft.core.block.BlockLogicTrapDoor;
 import net.minecraft.core.block.Blocks;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.block.material.Material;
-import net.minecraft.core.entity.Mob;
 import net.minecraft.core.entity.monster.MobCreeper;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.world.WorldSource;
@@ -222,11 +220,11 @@ public class PathFinder
                     {
                         return 0;
                     }
-                    if(material == Material.water)
+                    if(material == Materials.WATER)
                     {
                         return -1;
                     }
-                    if(material == Material.lava)
+                    if(material == Materials.LAVA)
                     {
                         return -2;
                     }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPos.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPos.java
index ef403fab2..3d556c9ae 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPos.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPos.java
@@ -1,31 +1,44 @@
 package net.minecraft.core.world.pos;
 
 import net.minecraft.core.entity.Entity;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
+import net.minecraft.core.world.World;
+import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.chunk.Chunk;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Vector2ic;
 
-public final class ChunkPos
-    implements Pos2i<ChunkPos> {
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+public final class ChunkPos implements Externalizable, Cloneable, ChunkPosc {
     public int x;
     public int z;
 
+    public ChunkPos() {
+        this.x = 0;
+        this.z = 0;
+    }
+
     public ChunkPos(final int x, final int z) {
         this.x = x;
         this.z = z;
     }
 
-    public ChunkPos(final @NotNull TilePos tilePos) {
+    public ChunkPos(final @NotNull TilePosc tilePos) {
         this(
-            Math.floorDiv(tilePos.x, Chunk.CHUNK_SIZE_X),
-            Math.floorDiv(tilePos.z, Chunk.CHUNK_SIZE_Z)
+            Math.floorDiv(tilePos.x(), Chunk.CHUNK_SIZE_X),
+            Math.floorDiv(tilePos.z(), Chunk.CHUNK_SIZE_Z)
         );
     }
 
-    public ChunkPos(final @NotNull ChunkPos chunkPos) {
+    public ChunkPos(final @NotNull ChunkPosc chunkPos) {
         this(
-            chunkPos.x,
-            chunkPos.z
+            chunkPos.x(),
+            chunkPos.z()
         );
     }
 
@@ -46,25 +59,125 @@ public final class ChunkPos
         return this.z;
     }
 
-    public @NotNull ChunkPos add(final int x, final int z) {
-        return new ChunkPos(this.x + x, this.z + z);
+    @Override
+    public @NotNull ChunkPos add(int x, int z, @NotNull ChunkPos dest) {
+        return dest.set(this.x + x, this.z + z);
+    }
+
+    @Override
+    public @NotNull ChunkPos add(@NotNull Vector2ic v, @NotNull ChunkPos dest) {
+        return add(v.x(), v.y(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkPos add(@NotNull Direction dir, @NotNull ChunkPos dest) {
+        return add(dir.getOffsetX(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkPos add(int x, int z) {
+        return add(x, z, this);
+    }
+
+    public @NotNull ChunkPos add(@NotNull Vector2ic v) {
+        return add(v, this);
+    }
+
+    public @NotNull ChunkPos add(@NotNull Direction dir) {
+        return add(dir, this);
+    }
+
+    @Override
+    public @NotNull ChunkPos sub(int x, int z, @NotNull ChunkPos dest) {
+        return dest.set(this.x - x, this.z - z);
+    }
+
+    @Override
+    public @NotNull ChunkPos sub(@NotNull Vector2ic v, @NotNull ChunkPos dest) {
+        return sub(v.x(), v.y(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkPos sub(@NotNull Direction dir, @NotNull ChunkPos dest) {
+        return sub(dir.getOffsetX(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkPos sub(int x, int z) {
+        return sub(x, z, this);
+    }
+
+    public @NotNull ChunkPos sub(@NotNull Vector2ic v) {
+        return sub(v, this);
     }
 
-    public @NotNull TilePos toTilePos(final @NotNull ChunkTilePos chunkTilePos) {
-        return new TilePos(this, chunkTilePos);
+    public @NotNull ChunkPos sub(@NotNull Direction dir) {
+        return sub(dir, this);
+    }
+
+    @Override
+    public double distance(@NotNull ChunkPosc pos) {
+        int dx = this.x - pos.x();
+        int dz = this.z - pos.z();
+        return org.joml.Math.sqrt(dx * dx + dz * dz);
+    }
+
+    @Override
+    public double distanceSquared(@NotNull ChunkPosc pos) {
+        int dx = this.x - pos.x();
+        int dz = this.z - pos.z();
+        return dx * dx + dz * dz;
+    }
+
+    @Override
+    public boolean inBounds(@NotNull WorldSource source) {
+        return
+            this.x >= Math.floorDiv(World.MIN_BLOCK_X, Chunk.CHUNK_SIZE_X) &&
+                this.z >= Math.floorDiv(World.MIN_BLOCK_Z, Chunk.CHUNK_SIZE_Z) &&
+                this.x <= Math.floorDiv(World.MAX_BLOCK_X, Chunk.CHUNK_SIZE_X) &&
+                this.z <= Math.floorDiv(World.MAX_BLOCK_Z, Chunk.CHUNK_SIZE_Z);
+    }
+
+    @Override
+    public boolean equals(int x, int z) {
+        return this.x == x && this.z == z;
+    }
+
+
+    public @NotNull ChunkPos set(int x, int z) {
+        this.x = x;
+        this.z = z;
+        return this;
+    }
+
+    public @NotNull ChunkPos set(@NotNull TilePosc pos) {
+        return set(Math.floorDiv(pos.x(), Chunk.CHUNK_SIZE_X), Math.floorDiv(pos.z(), Chunk.CHUNK_SIZE_Z));
     }
 
     @Override
     public boolean equals(final Object obj) {
-        if (!(obj instanceof final @NotNull ChunkPos other)) {
-            return false;
-        } else {
+        if (obj instanceof final @NotNull ChunkPos other) {
             return this.x == other.x && this.z == other.z;
         }
+        return false;
     }
 
     @Override
     public int hashCode() {
         return MathHelper.cantor(this.x, this.z);
     }
+
+    @Override
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(this.x);
+        out.writeInt(this.z);
+    }
+
+    @Override
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        set(in.readInt(), in.readInt());
+    }
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPosc.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPosc.java
new file mode 100644
index 000000000..d70ca71b0
--- /dev/null
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkPosc.java
@@ -0,0 +1,35 @@
+package net.minecraft.core.world.pos;
+
+import net.minecraft.core.util.helper.Direction;
+import net.minecraft.core.world.WorldSource;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector2ic;
+
+/**
+ * Chunk coordinate in world
+ */
+public interface ChunkPosc {
+    int x();
+
+    int z();
+
+    @NotNull ChunkPos add(int x, int z, @NotNull ChunkPos dest);
+
+    @NotNull ChunkPos add(@NotNull Vector2ic v, @NotNull ChunkPos dest);
+
+    @NotNull ChunkPos add(@NotNull Direction dir, @NotNull ChunkPos dest);
+
+    @NotNull ChunkPos sub(int x, int z, @NotNull ChunkPos dest);
+
+    @NotNull ChunkPos sub(@NotNull Vector2ic v, @NotNull ChunkPos dest);
+
+    @NotNull ChunkPos sub(@NotNull Direction dir, @NotNull ChunkPos dest);
+
+    double distance(@NotNull ChunkPosc pos);
+
+    double distanceSquared(@NotNull ChunkPosc pos);
+
+    boolean inBounds(@NotNull WorldSource source);
+
+    boolean equals(int x, int z);
+}
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePos.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePos.java
index 75ca95dc9..9fd7f0933 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePos.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePos.java
@@ -1,18 +1,31 @@
 package net.minecraft.core.world.pos;
 
 import net.minecraft.core.entity.Entity;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.chunk.ChunkSection;
 import org.jetbrains.annotations.NotNull;
+import org.joml.Math;
+import org.joml.Vector3dc;
+import org.joml.Vector3ic;
 
-public class ChunkSectionTilePos
-    implements Pos3i<ChunkSectionTilePos> {
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+public class ChunkSectionTilePos implements Externalizable, Cloneable, ChunkSectionTilePosc {
     public int x;
     public int y;
     public int z;
 
+    public ChunkSectionTilePos() {
+        this.x = 0;
+        this.y = 0;
+        this.z = 0;
+    }
+
     public ChunkSectionTilePos(final int x, final int y, final int z) {
         this.x = Integer.remainderUnsigned(x, Chunk.CHUNK_SIZE_X);
         this.y = Integer.remainderUnsigned(y, ChunkSection.SECTION_SIZE_Y);
@@ -27,16 +40,16 @@ public class ChunkSectionTilePos
         this(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
     }
 
-    public ChunkSectionTilePos(final @NotNull ChunkTilePos tilePos) {
-        this(tilePos.x, tilePos.y, tilePos.z);
+    public ChunkSectionTilePos(final @NotNull ChunkTilePosc tilePos) {
+        this(tilePos.x(), tilePos.y(), tilePos.z());
     }
 
-    public ChunkSectionTilePos(final @NotNull TilePos tilePos) {
-        this(tilePos.x, tilePos.y, tilePos.z);
+    public ChunkSectionTilePos(final @NotNull TilePosc tilePos) {
+        this(tilePos.x(), tilePos.y(), tilePos.z());
     }
 
-    public ChunkSectionTilePos(final @NotNull Vec3 vec) {
-        this(vec.x, vec.y, vec.z);
+    public ChunkSectionTilePos(final @NotNull Vector3dc vec) {
+        this(vec.x(), vec.y(), vec.z());
     }
 
     public ChunkSectionTilePos(final @NotNull Entity entity) {
@@ -58,30 +71,123 @@ public class ChunkSectionTilePos
         return this.z;
     }
 
+    public @NotNull ChunkSectionTilePos set(final int x, final int y, final int z) {
+        this.x = Integer.remainderUnsigned(x, Chunk.CHUNK_SIZE_X);
+        this.y = Integer.remainderUnsigned(y, ChunkSection.SECTION_SIZE_Y);
+        this.z = Integer.remainderUnsigned(z, Chunk.CHUNK_SIZE_Z);
+        return this;
+    }
+
+    public @NotNull ChunkSectionTilePos set(final @NotNull ChunkTilePosc pos) {
+        return set(pos.x(), pos.y(), pos.z());
+    }
+
     @Override
-    public @NotNull ChunkSectionTilePos add(final int x, final int y, final int z) {
-        return new ChunkSectionTilePos(this.x + x, this.y + y, this.z + z);
+    public @NotNull ChunkSectionTilePos add(int x, int y, int z, @NotNull ChunkSectionTilePos dest) {
+        return dest.set(this.x + x, this.y + y, this.z + z);
     }
 
-    public @NotNull ChunkTilePos toChunkTilePos(final int sectionIndex) {
-        return new ChunkTilePos(this.x, this.y + sectionIndex * ChunkSection.SECTION_SIZE_Y, this.z);
+    @Override
+    public @NotNull ChunkSectionTilePos add(@NotNull Vector3ic v, @NotNull ChunkSectionTilePos dest) {
+        return add(v.x(), v.y(), v.z(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkSectionTilePos add(@NotNull Direction dir, @NotNull ChunkSectionTilePos dest) {
+        return add(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkSectionTilePos add(int x, int y, int z) {
+        return add(x, y, z, this);
+    }
+
+    public @NotNull ChunkSectionTilePos add(@NotNull Vector3ic v) {
+        return add(v.x(), v.y(), v.z(), this);
+    }
+
+    public @NotNull ChunkSectionTilePos add(@NotNull Direction dir) {
+        return add(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), this);
+    }
+
+    @Override
+    public @NotNull ChunkSectionTilePos sub(int x, int y, int z, @NotNull ChunkSectionTilePos dest) {
+        return dest.set(this.x - x, this.y - y, this.z - z);
+    }
+
+    @Override
+    public @NotNull ChunkSectionTilePos sub(@NotNull Vector3ic v, @NotNull ChunkSectionTilePos dest) {
+        return sub(v.x(), v.y(), v.z(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkSectionTilePos sub(@NotNull Direction dir, @NotNull ChunkSectionTilePos dest) {
+        return sub(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkSectionTilePos sub(int x, int y, int z) {
+        return sub(x, y, z, this);
+    }
+
+    public @NotNull ChunkSectionTilePos sub(@NotNull Vector3ic v) {
+        return sub(v.x(), v.y(), v.z(), this);
+    }
+
+    public @NotNull ChunkSectionTilePos sub(@NotNull Direction dir) {
+        return sub(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), this);
+    }
+
+    @Override
+    public double distance(@NotNull ChunkSectionTilePosc pos) {
+        int dx = this.x - pos.x();
+        int dy = this.y - pos.y();
+        int dz = this.z - pos.z();
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+    }
+
+    @Override
+    public double distanceSquared(@NotNull ChunkSectionTilePosc pos) {
+        int dx = this.x - pos.x();
+        int dy = this.y - pos.y();
+        int dz = this.z - pos.z();
+        return dx * dx + dy * dy + dz * dz;
     }
 
     public boolean inBounds() {
         return this.x >= 0 && this.x < Chunk.CHUNK_SIZE_X && this.y >= 0 && this.y < ChunkSection.SECTION_SIZE_Y && this.z >= 0 && this.z < Chunk.CHUNK_SIZE_Z;
     }
 
+    @Override
+    public boolean equals(int x, int y, int z) {
+        return this.x == x && this.y == y && this.z == z;
+    }
+
     @Override
     public boolean equals(final Object obj) {
-        if (!(obj instanceof final @NotNull ChunkSectionTilePos other)) {
-            return false;
-        } else {
+        if (obj instanceof final @NotNull ChunkSectionTilePos other) {
             return this.x == other.x && this.y == other.y && this.z == other.z;
         }
+        return false;
     }
 
     @Override
     public int hashCode() {
         return MathHelper.cantor(MathHelper.cantor(this.x, this.y), this.z);
     }
+
+    @Override
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(this.x);
+        out.writeInt(this.y);
+        out.writeInt(this.z);
+    }
+
+    @Override
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        set(in.readInt(), in.readInt(), in.readInt());
+    }
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePosc.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePosc.java
new file mode 100644
index 000000000..a6ad12d5e
--- /dev/null
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkSectionTilePosc.java
@@ -0,0 +1,37 @@
+package net.minecraft.core.world.pos;
+
+import net.minecraft.core.util.helper.Direction;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3ic;
+
+/**
+ * Tile pos relative to a chunk section
+ */
+public interface ChunkSectionTilePosc {
+
+    int x();
+
+    int y();
+
+    int z();
+
+    @NotNull ChunkSectionTilePos add(int x, int y, int z, @NotNull ChunkSectionTilePos dest);
+
+    @NotNull ChunkSectionTilePos add(@NotNull Vector3ic v, @NotNull ChunkSectionTilePos dest);
+
+    @NotNull ChunkSectionTilePos add(@NotNull Direction dir, @NotNull ChunkSectionTilePos dest);
+
+    @NotNull ChunkSectionTilePos sub(int x, int y, int z, @NotNull ChunkSectionTilePos dest);
+
+    @NotNull ChunkSectionTilePos sub(@NotNull Vector3ic v, @NotNull ChunkSectionTilePos dest);
+
+    @NotNull ChunkSectionTilePos sub(@NotNull Direction dir, @NotNull ChunkSectionTilePos dest);
+
+    double distance(@NotNull ChunkSectionTilePosc pos);
+
+    double distanceSquared(@NotNull ChunkSectionTilePosc pos);
+
+    boolean inBounds();
+
+    boolean equals(int x, int y, int z);
+}
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePos.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePos.java
index 48c5289ae..97182c78c 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePos.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePos.java
@@ -1,19 +1,31 @@
 package net.minecraft.core.world.pos;
 
 import net.minecraft.core.entity.Entity;
+import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.chunk.ChunkSection;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Math;
+import org.joml.Vector3ic;
 
-public class ChunkTilePos
-    implements Pos3i<ChunkTilePos> {
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+public class ChunkTilePos implements Externalizable, Cloneable, ChunkTilePosc {
     public int x;
     public int y;
     public int z;
 
+    public ChunkTilePos() {
+        this.x = 0;
+        this.y = 0;
+        this.z = 0;
+    }
+
     public ChunkTilePos(final int x, final int y, final int z) {
         this.x = Integer.remainderUnsigned(x, Chunk.CHUNK_SIZE_X);
         this.y = y;
@@ -28,12 +40,12 @@ public class ChunkTilePos
         this(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
     }
 
-    public ChunkTilePos(final @NotNull TilePos tilePos) {
-        this(tilePos.x, tilePos.y, tilePos.z);
+    public ChunkTilePos(final @NotNull TilePosc tilePos) {
+        this(tilePos.x(), tilePos.y(), tilePos.z());
     }
 
-    public ChunkTilePos(final @NotNull Vec3 vec) {
-        this(vec.x, vec.y, vec.z);
+    public ChunkTilePos(final @NotNull ChunkTilePosc tilePos) {
+        this(tilePos.x(), tilePos.y(), tilePos.z());
     }
 
     public ChunkTilePos(final @NotNull Entity entity) {
@@ -55,48 +67,161 @@ public class ChunkTilePos
         return this.z;
     }
 
-    public @NotNull ChunkTilePos add(final int x, final int y, final int z) {
-        return new ChunkTilePos(this.x + x, this.y + y, this.z + z);
-    }
-
-    /**
-     * Modifies the position of the tile pos, probably unsafe unless you know modifications will not cause unintended side effects
-     * @return self
-     */
     public @NotNull ChunkTilePos set(final int x, final int y, final int z) {
-        this.x = x;
+        this.x = Integer.remainderUnsigned(x, Chunk.CHUNK_SIZE_X);
         this.y = y;
-        this.z = z;
+        this.z = Integer.remainderUnsigned(z, Chunk.CHUNK_SIZE_Z);
         return this;
     }
 
-    public @NotNull TilePos toTilePos(final @NotNull ChunkPos chunkPos) {
-        return new TilePos(chunkPos, this);
+    public @NotNull ChunkTilePos set(@NotNull ChunkTilePosc pos) {
+        return set(pos.x(), pos.y(), pos.z());
+    }
+
+    public @NotNull ChunkTilePos set(@NotNull TilePosc pos) {
+        return set(pos.x(), pos.y(), pos.z());
+    }
+
+    @Override
+    public @NotNull ChunkTilePos add(int x, int y, int z, @NotNull ChunkTilePos dest) {
+        return dest.set(this.x + x, this.y + y, this.z + z);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos add(@NotNull Vector3ic v, @NotNull ChunkTilePos dest) {
+        return add(v.x(), v.y(), v.z(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos add(@NotNull Direction dir, @NotNull ChunkTilePos dest) {
+        return add(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkTilePos add(int x, int y, int z) {
+        return add(x, y, z, this);
+    }
+
+    public @NotNull ChunkTilePos add(@NotNull Vector3ic v) {
+        return add(v.x(), v.y(), v.z(), this);
+    }
+
+    public @NotNull ChunkTilePos add(@NotNull Direction dir) {
+        return add(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), this);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos sub(int x, int y, int z, @NotNull ChunkTilePos dest) {
+        return dest.set(this.x - x, this.y - y, this.z - z);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos sub(@NotNull Vector3ic v, @NotNull ChunkTilePos dest) {
+        return sub(v.x(), v.y(), v.z(), dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos sub(@NotNull Direction dir, @NotNull ChunkTilePos dest) {
+        return sub(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull ChunkTilePos sub(int x, int y, int z) {
+        return sub(x, y, z, this);
+    }
+
+    public @NotNull ChunkTilePos sub(@NotNull Vector3ic v) {
+        return sub(v.x(), v.y(), v.z(), this);
     }
 
-    public @NotNull ChunkSectionTilePos toChunkSectionTilePos() {
-        return new ChunkSectionTilePos(this);
+    public @NotNull ChunkTilePos sub(@NotNull Direction dir) {
+        return sub(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), this);
+    }
+
+    @Override
+    public double distance(@NotNull ChunkTilePosc pos) {
+        int dx = pos.x() - this.x;
+        int dy = pos.y() - this.y;
+        int dz = pos.z() - this.z;
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+    }
+
+    @Override
+    public double distanceSquared(@NotNull ChunkTilePosc pos) {
+        int dx = pos.x() - this.x;
+        int dy = pos.y() - this.y;
+        int dz = pos.z() - this.z;
+        return dx * dx + dy * dy + dz * dz;
     }
 
     public boolean inBounds() {
         return this.x >= 0 && this.x < Chunk.CHUNK_SIZE_X && this.y >= 0 && this.y < Chunk.CHUNK_SECTIONS * ChunkSection.SECTION_SIZE_Y && this.z >= 0 && this.z < Chunk.CHUNK_SIZE_Z;
     }
 
+    @Override
+    public boolean equals(int x, int y, int z) {
+        return false;
+    }
+
+    @Override
+    public @NotNull ChunkTilePos up(@NotNull ChunkTilePos dest) {
+        return add(Direction.UP, dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos down(@NotNull ChunkTilePos dest) {
+        return add(Direction.DOWN, dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos north(@NotNull ChunkTilePos dest) {
+        return add(Direction.NORTH, dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos south(@NotNull ChunkTilePos dest) {
+        return add(Direction.SOUTH, dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos west(@NotNull ChunkTilePos dest) {
+        return add(Direction.WEST, dest);
+    }
+
+    @Override
+    public @NotNull ChunkTilePos east(@NotNull ChunkTilePos dest) {
+        return add(Direction.EAST, dest);
+    }
+
     public int getSectionIndex() {
         return this.y / ChunkSection.SECTION_SIZE_Y;
     }
 
     @Override
     public boolean equals(final @Nullable Object obj) {
-        if (!(obj instanceof final @NotNull ChunkTilePos other)) {
-            return false;
-        } else {
+        if (obj instanceof final @NotNull ChunkTilePos other) {
             return this.x == other.x && this.y == other.y && this.z == other.z;
         }
+        return false;
     }
 
     @Override
     public int hashCode() {
         return MathHelper.cantor(MathHelper.cantor(this.x, this.y), this.z);
     }
+
+    @Override
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(this.x);
+        out.writeInt(this.y);
+        out.writeInt(this.z);
+    }
+
+    @Override
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        set(in.readInt(), in.readInt(), in.readInt());
+    }
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePosc.java b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePosc.java
new file mode 100644
index 000000000..d002a421c
--- /dev/null
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/ChunkTilePosc.java
@@ -0,0 +1,51 @@
+package net.minecraft.core.world.pos;
+
+import net.minecraft.core.util.helper.Direction;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3ic;
+
+/**
+ * Tile pos relative to a chunk
+ */
+public interface ChunkTilePosc {
+
+    int x();
+
+    int y();
+
+    int z();
+
+    @NotNull ChunkTilePos add(int x, int y, int z, @NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos add(@NotNull Vector3ic v, @NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos add(@NotNull Direction dir, @NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos sub(int x, int y, int z, @NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos sub(@NotNull Vector3ic v, @NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos sub(@NotNull Direction dir, @NotNull ChunkTilePos dest);
+
+    double distance(@NotNull ChunkTilePosc pos);
+
+    double distanceSquared(@NotNull ChunkTilePosc pos);
+
+    int getSectionIndex();
+
+    boolean inBounds();
+
+    boolean equals(int x, int y, int z);
+
+    @NotNull ChunkTilePos up(@NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos down(@NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos north(@NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos south(@NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos west(@NotNull ChunkTilePos dest);
+
+    @NotNull ChunkTilePos east(@NotNull ChunkTilePos dest);
+}
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/Pos2i.java b/game/core/src/main/java/net/minecraft/core/world/pos/Pos2i.java
deleted file mode 100644
index 57f454d2d..000000000
--- a/game/core/src/main/java/net/minecraft/core/world/pos/Pos2i.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.minecraft.core.world.pos;
-
-import net.minecraft.core.util.helper.Direction;
-import org.jetbrains.annotations.NotNull;
-
-public interface Pos2i<T extends Pos2i<T>> {
-    int x();
-    int z();
-
-    @NotNull T add(final int x, final int z);
-
-    default @NotNull T add(final @NotNull T other) {
-        return this.add(other.x(), other.z());
-    }
-
-    default @NotNull T add(final @NotNull Direction direction, final int distance) {
-        return this.add(direction.getOffsetX() * distance, direction.getOffsetZ() * distance);
-    }
-
-    default @NotNull T add(final @NotNull Direction direction) {
-        return this.add(direction, 1);
-    }
-
-    default @NotNull T north() {
-        return this.add(Direction.NORTH);
-    }
-
-    default @NotNull T east() {
-        return this.add(Direction.EAST);
-    }
-
-    default @NotNull T south() {
-        return this.add(Direction.SOUTH);
-    }
-
-    default @NotNull T west() {
-        return this.add(Direction.WEST);
-    }
-
-    default @NotNull T sub(final int x, final int z) {
-        return this.add(-x, -z);
-    }
-
-    default @NotNull T sub(final @NotNull T other) {
-        return this.sub(other.x(), other.z());
-    }
-}
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/Pos3i.java b/game/core/src/main/java/net/minecraft/core/world/pos/Pos3i.java
deleted file mode 100644
index 008483e3f..000000000
--- a/game/core/src/main/java/net/minecraft/core/world/pos/Pos3i.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package net.minecraft.core.world.pos;
-
-import net.minecraft.core.entity.Entity;
-import net.minecraft.core.util.Into;
-import net.minecraft.core.util.helper.Direction;
-import net.minecraft.core.util.phys.Vec3;
-import org.jetbrains.annotations.NotNull;
-
-public interface Pos3i<T extends Pos3i<T>>
-    extends Into<Vec3> {
-    @Override
-    default @NotNull Vec3 into() {
-        return Vec3.fromPool(this.x(), this.y(), this.z());
-    }
-
-    int x();
-
-    int y();
-
-    int z();
-
-    @NotNull T add(final int x, final int y, final int z);
-
-    default @NotNull T add(final @NotNull T other) {
-        return this.add(other.x(), other.y(), other.z());
-    }
-
-    default @NotNull T add(final @NotNull Direction direction, final int distance) {
-        return this.add(direction.getOffsetX() * distance, direction.getOffsetY() * distance, direction.getOffsetZ() * distance);
-    }
-
-    default @NotNull T add(final @NotNull Direction direction) {
-        return this.add(direction, 1);
-    }
-
-    default @NotNull T north() {
-        return this.add(Direction.NORTH);
-    }
-
-    default @NotNull T east() {
-        return this.add(Direction.EAST);
-    }
-
-    default @NotNull T south() {
-        return this.add(Direction.SOUTH);
-    }
-
-    default @NotNull T west() {
-        return this.add(Direction.WEST);
-    }
-
-    default @NotNull T up() {
-        return this.add(Direction.UP);
-    }
-
-    default @NotNull T down() {
-        return this.add(Direction.DOWN);
-    }
-
-    default @NotNull T sub(final int x, final int y, final int z) {
-        return this.add(-x, -y, -z);
-    }
-
-    default @NotNull T sub(final @NotNull T other) {
-        return this.sub(other.x(), other.y(), other.z());
-    }
-
-    default @NotNull T sub(final @NotNull Direction direction, final int distance) {
-        return this.add(direction, -distance);
-    }
-
-    default @NotNull T sub(final @NotNull Direction direction) {
-        return this.sub(direction, 1);
-    }
-
-    default double distToSq(final @NotNull Pos3i<?> pos) {
-        return distToSq(pos.x(), pos.y(), pos.z());
-    }
-
-    default double distToSq(final @NotNull Vec3 pos) {
-        return distToSq(pos.x, pos.y, pos.z);
-    }
-
-    default double distToSq(final @NotNull Entity entity) {
-        return distToSq(entity.x, entity.y, entity.z);
-    }
-
-    default double distToSq(final int x, final int y, final int z) {
-        double dx = x() - x;
-        double dy = y() - y;
-        double dz = z() - z;
-        return dx * dx + dy * dy + dz * dz;
-    }
-
-    default double distToSq(final float x, final float y, final float z) {
-        double dx = x() - x;
-        double dy = y() - y;
-        double dz = z() - z;
-        return dx * dx + dy * dy + dz * dz;
-    }
-
-    default double distToSq(final double x, final double y, final double z) {
-        double dx = x() - x;
-        double dy = y() - y;
-        double dz = z() - z;
-        return dx * dx + dy * dy + dz * dz;
-    }
-
-    default double distTo(final @NotNull Pos3i<?> pos) {
-        return Math.sqrt(distTo(pos));
-    }
-
-    default double distTo(final @NotNull Vec3 pos) {
-        return Math.sqrt(distTo(pos));
-    }
-
-    default double distTo(final @NotNull Entity entity) {
-        return Math.sqrt(distTo(entity));
-    }
-
-    default double distTo(final int x, final int y, final int z) {
-        return Math.sqrt(distTo(x, y, z));
-    }
-
-    default double distTo(final float x, final float y, final float z) {
-        return Math.sqrt(distTo(x, y, z));
-    }
-
-    default double distTo(final double x, final double y, final double z) {
-        return Math.sqrt(distTo(x, y, z));
-    }
-}
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/TilePos.java b/game/core/src/main/java/net/minecraft/core/world/pos/TilePos.java
index 69c70f02a..b6b2f5a2e 100644
--- a/game/core/src/main/java/net/minecraft/core/world/pos/TilePos.java
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/TilePos.java
@@ -3,27 +3,40 @@ package net.minecraft.core.world.pos;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.WorldSource;
 import net.minecraft.core.world.chunk.Chunk;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Math;
+import org.joml.Vector3dc;
+import org.joml.Vector3fc;
+import org.joml.Vector3ic;
 
-public final class TilePos
-    implements Pos3i<TilePos> {
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+public final class TilePos implements Externalizable, Cloneable, TilePosc {
     public int x;
     public int y;
     public int z;
 
+    public TilePos() {
+        this.x = 0;
+        this.y = 0;
+        this.z = 0;
+    }
+
     public TilePos(final int x, final int y, final int z) {
         this.x = x;
         this.y = y;
         this.z = z;
     }
 
-    public TilePos(final @NotNull TilePos tilePos) {
-        this(tilePos.x, tilePos.y, tilePos.z);
+    public TilePos(final @NotNull TilePosc tilePos) {
+        this(tilePos.x(), tilePos.y(), tilePos.z());
     }
 
     public TilePos(final float x, final float y, final float z) {
@@ -34,12 +47,24 @@ public final class TilePos
         this(MathHelper.floor(x), MathHelper.floor(y), MathHelper.floor(z));
     }
 
-    public TilePos(final @NotNull ChunkPos chunkPos, final @NotNull ChunkTilePos chunkTilePos) {
-        this(chunkPos.x * Chunk.CHUNK_SIZE_X + chunkTilePos.x, chunkTilePos.y, chunkPos.z * Chunk.CHUNK_SIZE_Z + chunkTilePos.z);
+    public TilePos(final @NotNull ChunkPosc chunkPos) {
+        this(chunkPos.x() * Chunk.CHUNK_SIZE_X, 0, chunkPos.z() * Chunk.CHUNK_SIZE_Z);
+    }
+
+    public TilePos(final @NotNull ChunkPosc chunkPos, final @NotNull ChunkTilePosc chunkTilePos) {
+        this(chunkPos.x() * Chunk.CHUNK_SIZE_X + chunkTilePos.x(), chunkTilePos.y(), chunkPos.z() * Chunk.CHUNK_SIZE_Z + chunkTilePos.z());
+    }
+
+    public TilePos(final @NotNull Vector3dc vec) {
+        this(vec.x(), vec.y(), vec.z());
+    }
+
+    public TilePos(final @NotNull Vector3fc vec) {
+        this(vec.x(), vec.y(), vec.z());
     }
 
-    public TilePos(final @NotNull Vec3 vec) {
-        this(vec.x, vec.y, vec.z);
+    public TilePos(final @NotNull Vector3ic vec) {
+        this(vec.x(), vec.y(), vec.z());
     }
 
     public TilePos(final @NotNull Entity entity) {
@@ -61,14 +86,6 @@ public final class TilePos
         return this.z;
     }
 
-    public @NotNull TilePos add(final int x, final int y, final int z) {
-        return new TilePos(this.x + x, this.y + y, this.z + z);
-    }
-
-    /**
-     * Modifies the position of the tile pos, probably unsafe unless you know modifications will not cause unintended side effects
-     * @return self
-     */
     public @NotNull TilePos set(final int x, final int y, final int z) {
         this.x = x;
         this.y = y;
@@ -76,14 +93,156 @@ public final class TilePos
         return this;
     }
 
-    public @NotNull ChunkPos toChunkPos() {
-        return new ChunkPos(this);
+    public @NotNull TilePos set(final @NotNull TilePosc pos) {
+        this.x = pos.x();
+        this.y = pos.y();
+        this.z = pos.z();
+        return this;
+    }
+
+    @Override
+    public @NotNull TilePos add(int x, int y, int z, @NotNull TilePos dest) {
+        return dest.set(this.x + x, this.y + y, this.z + z);
+    }
+
+    @Override
+    public @NotNull TilePos add(@NotNull Vector3ic v, @NotNull TilePos dest) {
+        return add(v.x(), v.y(), v.z(), dest);
+    }
+
+    @Override
+    public @NotNull TilePos add(@NotNull Direction dir, @NotNull TilePos dest) {
+        return add(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull TilePos add(int x, int y, int z) {
+        return add(x, y, z, this);
+    }
+
+    public @NotNull TilePos add(@NotNull Vector3ic v) {
+        return add(v, this);
+    }
+
+    public @NotNull TilePos add(@NotNull Direction dir) {
+        return add(dir, this);
+    }
+
+    @Override
+    public @NotNull TilePos sub(int x, int y, int z, @NotNull TilePos dest) {
+        return dest.set(this.x - x, this.y - y, this.z - z);
     }
 
-    public @NotNull ChunkTilePos toChunkTilePos() {
-        return new ChunkTilePos(this);
+    @Override
+    public @NotNull TilePos sub(@NotNull Vector3ic v, @NotNull TilePos dest) {
+        return sub(v.x(), v.y(), v.z(), dest);
     }
 
+    @Override
+    public @NotNull TilePos sub(@NotNull Direction dir, @NotNull TilePos dest) {
+        return sub(dir.getOffsetX(), dir.getOffsetY(), dir.getOffsetZ(), dest);
+    }
+
+    public @NotNull TilePos sub(int x, int y, int z) {
+        return sub(x, y, z, this);
+    }
+
+    public @NotNull TilePos sub(@NotNull Vector3ic v) {
+        return sub(v, this);
+    }
+
+    public @NotNull TilePos sub(@NotNull Direction dir) {
+        return sub(dir, this);
+    }
+
+    @Override
+    public double distance(@NotNull TilePosc pos) {
+        return distance(pos.x(), pos.y(), pos.z());
+    }
+
+    @Override
+    public double distance(@NotNull Vector3fc v) {
+        return distance(v.x(), v.y(), v.z());
+    }
+
+    @Override
+    public double distance(@NotNull Vector3dc v) {
+        return distance(v.x(), v.y(), v.z());
+    }
+
+    @Override
+    public double distance(@NotNull Entity e) {
+        return distance(e.x, e.y, e.z);
+    }
+
+    @Override
+    public double distance(int x, int y, int z) {
+        int dx = this.x - x;
+        int dy = this.y - y;
+        int dz = this.z - z;
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+    }
+
+    @Override
+    public double distance(float x, float y, float z) {
+        float dx = this.x - x;
+        float dy = this.y - y;
+        float dz = this.z - z;
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+    }
+
+    @Override
+    public double distance(double x, double y, double z) {
+        double dx = this.x - x;
+        double dy = this.y - y;
+        double dz = this.z - z;
+        return Math.sqrt(dx * dx + dy * dy + dz * dz);
+    }
+
+    @Override
+    public double distanceSquared(@NotNull TilePosc pos) {
+        return distanceSquared(pos.x(), pos.y(), pos.z());
+    }
+
+    @Override
+    public double distanceSquared(@NotNull Vector3fc v) {
+        return distanceSquared(v.x(), v.y(), v.z());
+    }
+
+    @Override
+    public double distanceSquared(@NotNull Vector3dc v) {
+        return distanceSquared(v.x(), v.y(), v.z());
+    }
+
+    @Override
+    public double distanceSquared(@NotNull Entity e) {
+        return distanceSquared(e.x, e.y, e.z);
+    }
+
+    @Override
+    public double distanceSquared(int x, int y, int z) {
+        int dx = this.x - x;
+        int dy = this.y - y;
+        int dz = this.z - z;
+        return dx * dx + dy * dy + dz * dz;
+    }
+
+    @Override
+    public double distanceSquared(float x, float y, float z) {
+        float dx = this.x - x;
+        float dy = this.y - y;
+        float dz = this.z - z;
+        return dx * dx + dy * dy + dz * dz;
+    }
+
+    @Override
+    public double distanceSquared(double x, double y, double z) {
+        double dx = this.x - x;
+        double dy = this.y - y;
+        double dz = this.z - z;
+        return dx * dx + dy * dy + dz * dz;
+    }
+
+    @Override
     public boolean inBounds(final @NotNull WorldSource source) {
         return
             this.x >= World.MIN_BLOCK_X &&
@@ -94,13 +253,71 @@ public final class TilePos
                 this.z <= World.MAX_BLOCK_Z;
     }
 
+    @Override
+    public boolean equals(int x, int y, int z) {
+        return this.x == x && this.y == y && this.z == z;
+    }
+
+    @Override
+    public @NotNull TilePos up(@NotNull TilePos dest) {
+        return add(Direction.UP, dest);
+    }
+
+    public @NotNull TilePos up() {
+        return this.add(Direction.UP);
+    }
+
+    @Override
+    public @NotNull TilePos down(@NotNull TilePos dest) {
+        return add(Direction.DOWN, dest);
+    }
+
+    public @NotNull TilePos down() {
+        return this.add(Direction.DOWN);
+    }
+
+    @Override
+    public @NotNull TilePos north(@NotNull TilePos dest) {
+        return add(Direction.NORTH, dest);
+    }
+
+    public @NotNull TilePos north() {
+        return this.add(Direction.NORTH);
+    }
+
+    @Override
+    public @NotNull TilePos south(@NotNull TilePos dest) {
+        return add(Direction.SOUTH, dest);
+    }
+
+    public @NotNull TilePos south() {
+        return this.add(Direction.SOUTH);
+    }
+
+    @Override
+    public @NotNull TilePos west(@NotNull TilePos dest) {
+        return add(Direction.WEST, dest);
+    }
+
+    public @NotNull TilePos west() {
+        return this.add(Direction.WEST);
+    }
+
+    @Override
+    public @NotNull TilePos east(@NotNull TilePos dest) {
+        return add(Direction.EAST, dest);
+    }
+
+    public @NotNull TilePos east() {
+        return this.add(Direction.EAST);
+    }
+
     @Override
     public boolean equals(final @Nullable Object obj) {
-        if (!(obj instanceof final @NotNull TilePos other)) {
-            return false;
-        } else {
+        if (obj instanceof final @NotNull TilePos other) {
             return this.x == other.x && this.y == other.y && this.z == other.z;
         }
+        return false;
     }
 
     @Override
@@ -110,10 +327,23 @@ public final class TilePos
 
     @Override
     public String toString() {
-        return "TilePos{" +
-            "x=" + x +
-            ", y=" + y +
-            ", z=" + z +
-            '}';
+        return "(" + this.x + " " + this.y + " " + this.z + ")";
+    }
+
+    @Override
+    public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(this.x);
+        out.writeInt(this.y);
+        out.writeInt(this.z);
+    }
+
+    @Override
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+        set(in.readInt(), in.readInt(), in.readInt());
+    }
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
     }
 }
diff --git a/game/core/src/main/java/net/minecraft/core/world/pos/TilePosc.java b/game/core/src/main/java/net/minecraft/core/world/pos/TilePosc.java
new file mode 100644
index 000000000..e5c2fc578
--- /dev/null
+++ b/game/core/src/main/java/net/minecraft/core/world/pos/TilePosc.java
@@ -0,0 +1,80 @@
+package net.minecraft.core.world.pos;
+
+import net.minecraft.core.entity.Entity;
+import net.minecraft.core.util.helper.Direction;
+import net.minecraft.core.world.WorldSource;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3dc;
+import org.joml.Vector3fc;
+import org.joml.Vector3ic;
+
+/**
+ * Tile pos relative to the world
+ */
+public interface TilePosc {
+    int x();
+
+    int y();
+
+    int z();
+
+    @NotNull TilePos add(int x, int y, int z, @NotNull TilePos dest);
+
+    @NotNull TilePos add(@NotNull Vector3ic v, @NotNull TilePos dest);
+
+    @NotNull TilePos add(@NotNull Direction dir, @NotNull TilePos dest);
+
+    @NotNull TilePos sub(int x, int y, int z, @NotNull TilePos dest);
+
+    @NotNull TilePos sub(@NotNull Vector3ic v, @NotNull TilePos dest);
+
+    @NotNull TilePos sub(@NotNull Direction dir, @NotNull TilePos dest);
+
+    double distance(@NotNull TilePosc pos);
+
+    double distance(@NotNull Vector3fc v);
+
+    double distance(@NotNull Vector3dc v);
+
+    double distance(@NotNull Entity e);
+
+    double distance(int x, int y, int z);
+
+    double distance(float x, float y, float z);
+
+    double distance(double x, double y, double z);
+
+    double distanceSquared(@NotNull TilePosc pos);
+
+    double distanceSquared(@NotNull Vector3fc v);
+
+    double distanceSquared(@NotNull Vector3dc v);
+
+    double distanceSquared(@NotNull Entity e);
+
+    double distanceSquared(int x, int y, int z);
+
+    double distanceSquared(float x, float y, float z);
+
+    double distanceSquared(double x, double y, double z);
+
+    boolean inBounds(final @NotNull WorldSource source);
+
+    boolean equals(int x, int y, int z);
+
+    @NotNull TilePos up(@NotNull TilePos dest);
+
+    @NotNull TilePos down(@NotNull TilePos dest);
+
+    @NotNull TilePos north(@NotNull TilePos dest);
+
+    @NotNull TilePos south(@NotNull TilePos dest);
+
+    @NotNull TilePos west(@NotNull TilePos dest);
+
+    @NotNull TilePos east(@NotNull TilePos dest);
+
+    default boolean equals(final @NotNull TilePosc tilePos) {
+        return this.x() == tilePos.x() && this.y() == tilePos.y() && this.z() == tilePos.z();
+    }
+}
diff --git a/game/core/src/main/java/net/minecraft/core/world/weather/WeatherStorm.java b/game/core/src/main/java/net/minecraft/core/world/weather/WeatherStorm.java
index 6121096ba..d65abcd87 100644
--- a/game/core/src/main/java/net/minecraft/core/world/weather/WeatherStorm.java
+++ b/game/core/src/main/java/net/minecraft/core/world/weather/WeatherStorm.java
@@ -4,9 +4,9 @@ import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.EntityLightning;
 import net.minecraft.core.entity.Mob;
 import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import org.jetbrains.annotations.NotNull;
+import org.joml.primitives.AABBd;
 
 import java.util.List;
 import java.util.Random;
@@ -66,7 +66,7 @@ public class WeatherStorm extends WeatherRain {
         weight += checkY;
         weight += material.getConductivity();
 
-        final @NotNull List<@NotNull Mob> entityList = world.getEntitiesWithinAABB(Mob.class, AABB.fromPool(checkX, checkY, checkZ, checkX + 1, checkY + 1, checkZ + 1));
+        final @NotNull List<@NotNull Mob> entityList = world.getEntitiesWithinAABB(Mob.class, new AABBd(checkX, checkY, checkZ, checkX + 1, checkY + 1, checkZ + 1));
         if (!entityList.isEmpty()) {
             weight += 4; // :)
         }
diff --git a/game/server/src/main/java/net/minecraft/server/entity/player/PlayerServer.java b/game/server/src/main/java/net/minecraft/server/entity/player/PlayerServer.java
index e296a9216..3fbab845a 100644
--- a/game/server/src/main/java/net/minecraft/server/entity/player/PlayerServer.java
+++ b/game/server/src/main/java/net/minecraft/server/entity/player/PlayerServer.java
@@ -23,6 +23,7 @@ import net.minecraft.core.world.IVehicle;
 import net.minecraft.core.world.chunk.Chunk;
 import net.minecraft.core.world.chunk.ChunkSection;
 import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.server.entity.EntityTrackerImpl;
 import net.minecraft.server.net.handler.PacketHandlerServer;
 import net.minecraft.core.net.packet.*;
@@ -31,14 +32,13 @@ import net.minecraft.core.player.gamemode.Gamemode;
 import net.minecraft.core.player.inventory.slot.SlotResult;
 import net.minecraft.core.util.helper.AES;
 import net.minecraft.core.util.helper.DamageType;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.world.World;
 import net.minecraft.server.world.WorldServer;
 import net.minecraft.core.world.chunk.ChunkCoordinate;
-import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.server.MinecraftServer;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.joml.primitives.AABBdc;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -115,7 +115,7 @@ public class PlayerServer extends Player implements ContainerListener {
     }
 
     @Override
-	public AABB getBb()
+	public @Nullable AABBdc getCollisionAABB()
     {
         if (noPhysics)
         {
@@ -123,7 +123,7 @@ public class PlayerServer extends Player implements ContainerListener {
         }
         else
         {
-            return super.getBb();
+            return super.getCollisionAABB();
         }
     }
 
@@ -490,7 +490,7 @@ public class PlayerServer extends Player implements ContainerListener {
     }
 
     @Override
-	public void displayWorkbenchScreen(@NotNull TilePos tilePos)
+	public void displayWorkbenchScreen(@NotNull TilePosc tilePos)
     {
         getNextWindowId();
         playerNetServerHandler.sendPacket(new PacketContainerOpen(currentWindowId, PacketContainerOpen.TYPE_CRAFTING, "Crafting", 9));
diff --git a/game/server/src/main/java/net/minecraft/server/net/command/ConsoleCommandSource.java b/game/server/src/main/java/net/minecraft/server/net/command/ConsoleCommandSource.java
index 2d3a259a6..018cb51b8 100644
--- a/game/server/src/main/java/net/minecraft/server/net/command/ConsoleCommandSource.java
+++ b/game/server/src/main/java/net/minecraft/server/net/command/ConsoleCommandSource.java
@@ -7,11 +7,12 @@ import net.minecraft.core.net.packet.PacketChat;
 import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.util.helper.AES;
 import net.minecraft.core.util.helper.LoggedPrintStream;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.server.entity.player.PlayerServer;
 import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3dc;
 import org.slf4j.Logger;
 
 import java.util.ArrayList;
@@ -67,12 +68,12 @@ public class ConsoleCommandSource implements CommandSource, IServerCommandSource
     }
 
     @Override
-    public @Nullable Vec3 getCoordinates(boolean offsetHeight) {
+    public @Nullable Vector3dc getCoordinates(boolean offsetHeight) {
         return null;
     }
 
     @Override
-    public @Nullable Vec3 getBlockCoordinates() {
+    public @Nullable TilePosc getBlockCoordinates() {
         return null;
     }
 
diff --git a/game/server/src/main/java/net/minecraft/server/net/command/ServerCommandSource.java b/game/server/src/main/java/net/minecraft/server/net/command/ServerCommandSource.java
index 2f3b13fad..d22bdf7ce 100644
--- a/game/server/src/main/java/net/minecraft/server/net/command/ServerCommandSource.java
+++ b/game/server/src/main/java/net/minecraft/server/net/command/ServerCommandSource.java
@@ -5,12 +5,15 @@ import net.minecraft.core.net.command.CommandSource;
 import net.minecraft.core.net.packet.PacketChat;
 import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.util.helper.AES;
-import net.minecraft.core.util.helper.MathHelper;
-import net.minecraft.core.util.phys.Vec3;
 import net.minecraft.core.world.World;
+import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.server.entity.player.PlayerServer;
 import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -29,7 +32,7 @@ public class ServerCommandSource implements CommandSource, IServerCommandSource
     @Override
     public Collection<String> getPlayerUsernames() {
         List<String> list = new ArrayList<>();
-        for (Player player : server.playerList.playerEntities) {
+        for (Player player : this.server.playerList.playerEntities) {
             list.add(player.username);
         }
         return list;
@@ -38,7 +41,7 @@ public class ServerCommandSource implements CommandSource, IServerCommandSource
     @Override
     public Collection<String> getPlayerNicknames() {
         List<String> list = new ArrayList<>();
-        for (Player player : server.playerList.playerEntities) {
+        for (Player player : this.server.playerList.playerEntities) {
             list.add(player.nickname);
         }
         return list;
@@ -65,16 +68,17 @@ public class ServerCommandSource implements CommandSource, IServerCommandSource
     }
 
     @Override
-    public @NotNull Vec3 getCoordinates(boolean offsetHeight) {
-        Vec3 position = this.getSender().getPosition(1.0f, false);
-        if (offsetHeight) return position.add(0.0f, -this.getSender().heightOffset, 0.0f);
+    public @Nullable Vector3dc getCoordinates(boolean offsetHeight) {
+        Vector3dc position = this.getSender().getPosition(1.0f, false);
+        if (offsetHeight) return position.add(0.0f, -this.getSender().heightOffset, 0.0f, new Vector3d());
         return position;
     }
 
     @Override
-    public @NotNull Vec3 getBlockCoordinates() {
-        Vec3 coordinates = this.getCoordinates(true);
-        return Vec3.fromPool(MathHelper.floor(coordinates.x), MathHelper.floor(coordinates.y), MathHelper.floor(coordinates.z));
+    public @Nullable TilePosc getBlockCoordinates() {
+        Vector3dc coordinates = this.getCoordinates(true);
+        assert coordinates != null;
+        return new TilePos(coordinates);
     }
 
     @Override
diff --git a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerLogin.java b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerLogin.java
index cf67bfa41..24883401e 100644
--- a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerLogin.java
+++ b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerLogin.java
@@ -19,8 +19,8 @@ import net.minecraft.core.util.helper.AES;
 import net.minecraft.core.util.helper.RSA;
 import net.minecraft.core.util.helper.RestHandler;
 import net.minecraft.server.world.WorldServer;
-import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.server.MinecraftServer;
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.Logger;
 
 import java.io.BufferedReader;
@@ -97,26 +97,26 @@ public class PacketHandlerLogin extends PacketHandler
     }
 
     @Override
-	public void handleHandshake(PacketPreLogin preLoginPacket)
+	public void handleHandshake(@NotNull PacketHandshake packetHandshake)
     {
         if (mcServer.onlineMode)
         {
             serverId = Long.toHexString(rand.nextLong());
-            netManager.addToSendQueue(new PacketPreLogin(serverId));
+            netManager.addToSendQueue(new PacketHandshake(serverId));
         }
         else
         {
-            netManager.addToSendQueue(new PacketPreLogin("-"));
+            netManager.addToSendQueue(new PacketHandshake("-"));
         }
     }
 
     @Override
-	public void handleLogin(PacketLogin loginPacket)
+	public void handleLogin(@NotNull PacketLogin packetLogin)
     {
-        username = loginPacket.username;
-        if (loginPacket.playerEntityIdAndProtocolVersion != Global.MP_PROTOCOL_VERSION)
+        username = packetLogin.username;
+        if (packetLogin.playerEntityIdAndProtocolVersion != Global.MP_PROTOCOL_VERSION)
         {
-            if (loginPacket.playerEntityIdAndProtocolVersion > Global.MP_PROTOCOL_VERSION)
+            if (packetLogin.playerEntityIdAndProtocolVersion > Global.MP_PROTOCOL_VERSION)
             {
                 kickUser("Outdated server!");
             }
@@ -128,7 +128,7 @@ public class PacketHandlerLogin extends PacketHandler
         }
         if (!mcServer.onlineMode)
         {
-            doLogin(loginPacket);
+            doLogin(packetLogin);
         }
         else
         {
@@ -137,13 +137,13 @@ public class PacketHandlerLogin extends PacketHandler
                     try
                     {
                         String s = PacketHandlerLogin.getServerId(this);
-                        URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(loginPacket.username, "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
+                        URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(packetLogin.username, "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
                         BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
                         String s1 = bufferedreader.readLine();
                         bufferedreader.close();
                         if(s1.equals("YES"))
                         {
-                            PacketHandlerLogin.setLoginPacket(this, loginPacket);
+                            PacketHandlerLogin.setLoginPacket(this, packetLogin);
                         } else
                         {
                             this.kickUser("Failed to verify username!");
@@ -239,9 +239,9 @@ public class PacketHandlerLogin extends PacketHandler
     }
 
     @Override
-    public void handlePingHandshake(PacketPingHandshake pingHandshakePacket) {
+    public void handlePingHandshake(@NotNull PacketPingHandshake packetPingHandshake) {
         StringBuilder msg = new StringBuilder();
-        switch (pingHandshakePacket.pingHostString) {
+        switch (packetPingHandshake.pingHostString) {
             case "MC|PingHost":
                 msg
                     .append("§1").append('\0')
@@ -252,7 +252,7 @@ public class PacketHandlerLogin extends PacketHandler
                     .append(0);
                 break;
             case "BTAPingHost":
-                switch (pingHandshakePacket.payload) {
+                switch (packetPingHandshake.payload) {
                     case 0x02: {
                         msg
                             .append("§1").append('\0')
@@ -306,7 +306,7 @@ public class PacketHandlerLogin extends PacketHandler
     }
 
     @Override
-	public void handleInvalidPacket(Packet packet)
+	public void handleInvalidPacket(@NotNull Packet packet)
     {
         if (kickMessage != null) {
             kickUser(kickMessage);
diff --git a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java
index a65f02189..6a56aba7f 100644
--- a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java
+++ b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java
@@ -9,7 +9,6 @@ import net.minecraft.core.block.entity.TileEntityFlag;
 import net.minecraft.core.block.entity.TileEntityMobSpawner;
 import net.minecraft.core.block.entity.TileEntitySign;
 import net.minecraft.core.entity.Entity;
-import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.entity.vehicle.EntityBoat;
 import net.minecraft.core.enums.ArtType;
 import net.minecraft.core.enums.EnumSignPicture;
@@ -21,7 +20,6 @@ import net.minecraft.core.net.ICommandListener;
 import net.minecraft.core.net.NetworkManager;
 import net.minecraft.core.net.command.TextFormatting;
 import net.minecraft.core.player.inventory.container.ContainerInventory;
-import net.minecraft.core.util.collection.NamespaceID;
 import net.minecraft.core.world.World;
 import net.minecraft.core.world.pos.TilePos;
 import net.minecraft.server.net.command.ServerCommandSource;
@@ -36,66 +34,76 @@ import net.minecraft.core.util.helper.ChatAllowedCharacters;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.RestHandler;
-import net.minecraft.core.util.phys.AABB;
 import net.minecraft.core.util.phys.HitResult;
-import net.minecraft.core.util.phys.Vec3;
-import net.minecraft.core.world.chunk.ChunkCoordinates;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.server.entity.player.PlayerServer;
 import net.minecraft.server.player.PlayerListBox;
 import net.minecraft.server.world.WorldServer;
+import org.jetbrains.annotations.NotNull;
+import org.joml.Vector3d;
+import org.joml.Vector3dc;
+import org.joml.primitives.AABBd;
+import org.joml.primitives.AABBdc;
 import org.slf4j.Logger;
 
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 
 public class PacketHandlerServer extends PacketHandler
-        implements ICommandListener
-{
-
-    public PacketHandlerServer(MinecraftServer minecraftserver, NetworkManager networkManager, PlayerServer player)
-    {
-        connectionClosed = false;
-        hasMoved = true;
-        guiIdMap = new Int2ShortArrayMap();
-        mcServer = minecraftserver;
-        netManager = networkManager;
+    implements ICommandListener {
+    public static Logger LOGGER = LogUtils.getLogger();
+    public NetworkManager netManager;
+    public boolean connectionClosed;
+    private final MinecraftServer mcServer;
+    private PlayerServer playerEntity;
+    private int field_15_f;
+    private int field_22004_g;
+    private int playerInAirTime;
+    private double lastPosX;
+    private double lastPosY;
+    private double lastPosZ;
+    private boolean hasMoved;
+    private final Int2ShortMap guiIdMap;
+
+
+    public PacketHandlerServer(MinecraftServer minecraftserver, NetworkManager networkManager, PlayerServer player) {
+        this.connectionClosed = false;
+        this.hasMoved = true;
+        this.guiIdMap = new Int2ShortArrayMap();
+        this.mcServer = minecraftserver;
+        this.netManager = networkManager;
         networkManager.setNetHandler(this);
-        playerEntity = player;
+        this.playerEntity = player;
         player.playerNetServerHandler = this;
     }
 
-    public void handlePackets()
-    {
-        netManager.processReadPackets();
-        if (field_15_f - field_22004_g > 20)
-        {
+    public void handlePackets() {
+        this.netManager.processReadPackets();
+        if (this.field_15_f - this.field_22004_g > 20) {
             sendPacket(new PacketKeepAlive());
         }
     }
 
     public boolean canInteract() {
-        return playerEntity.canInteract();
+        return this.playerEntity.canInteract();
     }
 
-    public void kickPlayer(String s)
-    {
-        playerEntity.func_30002_A();
+    public void kickPlayer(String s) {
+        this.playerEntity.func_30002_A();
         sendPacket(new PacketDisconnect(s));
-        netManager.serverShutdown();
-        mcServer.playerList.sendPacketToAllPlayers(new PacketChat(playerEntity.getDisplayName() + TextFormatting.YELLOW + " was kicked from the game."));
-        mcServer.playerList.updatePlayerProfile(playerEntity.username, playerEntity.nickname, playerEntity.uuid, playerEntity.score, playerEntity.chatColor, false, playerEntity.isOperator());
-        mcServer.playerList.playerLoggedOut(playerEntity);
-        connectionClosed = true;
-        if (MinecraftServer.statsStatus)
-        {
-            RestHandler.post("https://api.betterthanadventure.net/stats?serverToken=" + MinecraftServer.statsToken + "&count=" + mcServer.playerList.playerEntities.size());
+        this.netManager.serverShutdown();
+        this.mcServer.playerList.sendPacketToAllPlayers(new PacketChat(this.playerEntity.getDisplayName() + TextFormatting.YELLOW + " was kicked from the game."));
+        this.mcServer.playerList.updatePlayerProfile(this.playerEntity.username, this.playerEntity.nickname, this.playerEntity.uuid, this.playerEntity.score, this.playerEntity.chatColor, false, this.playerEntity.isOperator());
+        this.mcServer.playerList.playerLoggedOut(this.playerEntity);
+        this.connectionClosed = true;
+        if (MinecraftServer.statsStatus) {
+            RestHandler.post("https://api.betterthanadventure.net/stats?serverToken=" + MinecraftServer.statsToken + "&count=" + this.mcServer.playerList.playerEntities.size());
         }
         PlayerListBox.updateList();
     }
 
     @Override
-    public void handleSetMobSpawner(PacketSetMobSpawner packet) {
+    public void handleSetMobSpawner(@NotNull PacketSetMobSpawner packet) {
         WorldServer world = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
         if (this.playerEntity.getGamemode() == Gamemode.creative && world.isBlockLoaded(packet.tilePos)) {
             TileEntity tileentity = world.getTileEntity(packet.tilePos);
@@ -108,165 +116,151 @@ public class PacketHandlerServer extends PacketHandler
     }
 
     @Override
-    public void handlePlayerConfig(PacketPlayerConfig packetPlayerConfig) {
-        if (playerEntity.playerConfig.config != packetPlayerConfig.config) {
-            playerEntity.playerConfig.config = packetPlayerConfig.config;
-            packetPlayerConfig.entityId = playerEntity.id;
-            mcServer.playerList.sendPacketToAllPlayersInDimension(packetPlayerConfig, playerEntity.dimension);
+    public void handlePlayerConfig(@NotNull PacketPlayerConfig packetPlayerConfig) {
+        if (this.playerEntity.playerConfig.config != packetPlayerConfig.config) {
+            this.playerEntity.playerConfig.config = packetPlayerConfig.config;
+            packetPlayerConfig.entityId = this.playerEntity.id;
+            this.mcServer.playerList.sendPacketToAllPlayersInDimension(packetPlayerConfig, this.playerEntity.dimension);
         }
     }
 
     @Override
-    public void handleFlying(PacketMovePlayer packet)
-    {
-        if (!playerEntity.isAlive()) return;
-        WorldServer worldserver = mcServer.getDimensionWorld(playerEntity.dimension);
-
-        if (!hasMoved)
-        {
-            double dx = packet.x - playerEntity.x;
-            double dy = packet.y - playerEntity.y;
-            double dz = packet.z - playerEntity.z;
+    public void handleMovePlayer(@NotNull PacketMovePlayer packetMovePlayer) {
+        if (!this.playerEntity.isAlive()) return;
+        WorldServer worldserver = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
+
+        if (!this.hasMoved) {
+            double dx = packetMovePlayer.x - this.playerEntity.x;
+            double dy = packetMovePlayer.y - this.playerEntity.y;
+            double dz = packetMovePlayer.z - this.playerEntity.z;
             if (dx * dx > 0.01D || dy * dy > 0.01D || dz * dz > 0.01D) {
-                hasMoved = true;
+                this.hasMoved = true;
             }
         }
-        if (!hasMoved) return;
+        if (!this.hasMoved) return;
         // Set rotation
-        float yRot = playerEntity.yRot;
-        float xRot = playerEntity.xRot;
-        if (packet.hasRotation)
-        {
-            yRot = MathHelper.normalizeRotation(packet.yaw);
-            xRot = MathHelper.normalizeRotation(packet.pitch);
+        float yRot = this.playerEntity.yRot;
+        float xRot = this.playerEntity.xRot;
+        if (packetMovePlayer.hasRotation) {
+            yRot = MathHelper.normalizeRotation(packetMovePlayer.yaw);
+            xRot = MathHelper.normalizeRotation(packetMovePlayer.pitch);
         }
 
         // No moving when sleeping or sitting in a static vehicle
-        boolean sleeping = playerEntity.isPlayerSleeping();
-        boolean sitting = playerEntity.vehicle != null && !(playerEntity.vehicle instanceof Entity);
-        if (sleeping || sitting)
-        {
-            if (sitting) playerEntity.vehicle.positionRider();
-            playerEntity.onUpdateEntity();
+        boolean sleeping = this.playerEntity.isPlayerSleeping();
+        boolean sitting = this.playerEntity.vehicle != null && !(this.playerEntity.vehicle instanceof Entity);
+        if (sleeping || sitting) {
+            if (sitting) this.playerEntity.vehicle.positionRider();
+            this.playerEntity.onUpdateEntity();
             // onUpdateEntity updates the lastPos*
-            playerEntity.absMoveTo(lastPosX, lastPosY, lastPosZ, playerEntity.yRot, playerEntity.xRot);
-            worldserver.updateEntity(playerEntity);
+            this.playerEntity.absMoveTo(this.lastPosX, this.lastPosY, this.lastPosZ, this.playerEntity.yRot, this.playerEntity.xRot);
+            worldserver.updateEntity(this.playerEntity);
             return;
         }
 
         // In a entity vehicle
-        if (playerEntity.vehicle instanceof Entity)
-        {
-            playerEntity.vehicle.positionRider();
+        if (this.playerEntity.vehicle instanceof Entity) {
+            this.playerEntity.vehicle.positionRider();
             double xd = 0.0D;
             double zd = 0.0D;
-            if (packet.hasPosition && packet.y == -999D)
-            {
-                xd = packet.x;
-                zd = packet.z;
+            if (packetMovePlayer.hasPosition && packetMovePlayer.y == -999D) {
+                xd = packetMovePlayer.x;
+                zd = packetMovePlayer.z;
             }
-            playerEntity.onGround = packet.onGround;
-            playerEntity.onUpdateEntity();
-            playerEntity.move(xd, 0.0D, zd);
-            playerEntity.absMoveTo(playerEntity.x, playerEntity.y, playerEntity.z, yRot, xRot);
-            playerEntity.xd = xd;
-            playerEntity.zd = zd;
+            this.playerEntity.onGround = packetMovePlayer.onGround;
+            this.playerEntity.onUpdateEntity();
+            this.playerEntity.move(xd, 0.0D, zd);
+            this.playerEntity.absMoveTo(this.playerEntity.x, this.playerEntity.y, this.playerEntity.z, yRot, xRot);
+            this.playerEntity.xd = xd;
+            this.playerEntity.zd = zd;
             // TODO: Is this needing? It does allow for fast-tick exploits.
             // Update: Removing it breaks boats, so keep it for now
-            worldserver.updateEntityWithOptionalForce(((Entity) playerEntity.vehicle), false);
-            playerEntity.vehicle.positionRider();
-            mcServer.playerList.onPlayerMoved(playerEntity);
+            worldserver.updateEntityWithOptionalForce(((Entity) this.playerEntity.vehicle), false);
+            this.playerEntity.vehicle.positionRider();
+            this.mcServer.playerList.onPlayerMoved(this.playerEntity);
             return;
         }
 
         // Not sitting, sleeping, or riding. Move them normally
-        lastPosX = playerEntity.x;
-        lastPosY = playerEntity.y;
-        lastPosZ = playerEntity.z;
-        double newPosX = playerEntity.x;
-        double newPosY = playerEntity.y;
-        double oldPosY = playerEntity.y;
-        double newPosZ = playerEntity.z;
-        if (packet.hasPosition && packet.y == -999D)
-        {
-            packet.hasPosition = false;
-        }
-        if (packet.hasPosition)
-        {
-            newPosX = packet.x;
-            newPosY = packet.y;
-            newPosZ = packet.z;
+        this.lastPosX = this.playerEntity.x;
+        this.lastPosY = this.playerEntity.y;
+        this.lastPosZ = this.playerEntity.z;
+        double newPosX = this.playerEntity.x;
+        double newPosY = this.playerEntity.y;
+        double oldPosY = this.playerEntity.y;
+        double newPosZ = this.playerEntity.z;
+        if (packetMovePlayer.hasPosition && packetMovePlayer.y == -999D) {
+            packetMovePlayer.hasPosition = false;
+        }
+        if (packetMovePlayer.hasPosition) {
+            newPosX = packetMovePlayer.x;
+            newPosY = packetMovePlayer.y;
+            newPosZ = packetMovePlayer.z;
             // Lag back the player if they attempt to move to an illegal position
-            if (Math.abs(packet.x) > World.MAX_BLOCK_X || Math.abs(packet.z) > World.MAX_BLOCK_Z || Double.isNaN(packet.x) || Double.isNaN(packet.y) || Double.isNaN(packet.z))
-            {
+            if (Math.abs(packetMovePlayer.x) > World.MAX_BLOCK_X || Math.abs(packetMovePlayer.z) > World.MAX_BLOCK_Z || Double.isNaN(packetMovePlayer.x) || Double.isNaN(packetMovePlayer.y) || Double.isNaN(packetMovePlayer.z)) {
                 //kickPlayer("Illegal position");
-                LOGGER.warn("{} tried to move to an illegal position", playerEntity.username);
-                teleport(lastPosX, lastPosY, lastPosZ);
+                LOGGER.warn("{} tried to move to an illegal position", this.playerEntity.username);
+                teleport(this.lastPosX, this.lastPosY, this.lastPosZ);
                 return;
             }
         }
         // TODO: THIS IS VERY BAD! Fix ASAP!
-        playerEntity.onUpdateEntity();
-        playerEntity.ySlideOffset = 0.0F;
-        playerEntity.absMoveTo(lastPosX, lastPosY, lastPosZ, yRot, xRot);
-        if (!hasMoved)
-        {
+        this.playerEntity.onUpdateEntity();
+        this.playerEntity.ySlideOffset = 0.0F;
+        this.playerEntity.absMoveTo(this.lastPosX, this.lastPosY, this.lastPosZ, yRot, xRot);
+        if (!this.hasMoved) {
             return;
         }
-        double dx = newPosX - playerEntity.x;
-        double dy = newPosY - playerEntity.y;
-        double dz = newPosZ - playerEntity.z;
+        double dx = newPosX - this.playerEntity.x;
+        double dy = newPosY - this.playerEntity.y;
+        double dz = newPosZ - this.playerEntity.z;
         double velSquared = dx * dx + dy * dy + dz * dz;
         // Lag back the player if they move too quickly
-        if (velSquared > 100D)
-        {
+        if (velSquared > 100D) {
             // This doesn't mean they are necessarily hacking, it's easy to do by hitting the vanilla speed limit
-            LOGGER.warn("{} moved too quickly!", playerEntity.username);
-            teleport(lastPosX, lastPosY, lastPosZ);
+            LOGGER.warn("{} moved too quickly!", this.playerEntity.username);
+            teleport(this.lastPosX, this.lastPosY, this.lastPosZ);
             //kickPlayer("You moved too quickly :( (Hacking?)");
             return;
         }
         // Time to trying and move like they did
         float bb_expand = 0.0625F;
-        boolean insideBlockOld = worldserver.getCubes(playerEntity, playerEntity.bb.copyPooled().getInsetBoundingBox(bb_expand, bb_expand, bb_expand)).isEmpty();
-        playerEntity.move(dx, dy, dz);
+        boolean insideBlockOld = worldserver.getCubes(this.playerEntity, MathHelper.aabbInsetBoundingBox(this.playerEntity.bb, bb_expand, bb_expand, bb_expand, new AABBd())).isEmpty();
+        this.playerEntity.move(dx, dy, dz);
         // Get the difference in intended move and actual move
-        dx = newPosX - playerEntity.x;
-        double ndy = Math.max(newPosY - playerEntity.y, -0.0784);
-        dz = newPosZ - playerEntity.z;
+        dx = newPosX - this.playerEntity.x;
+        double ndy = Math.max(newPosY - this.playerEntity.y, -0.0784);
+        dz = newPosZ - this.playerEntity.z;
         velSquared = dx * dx + ndy * ndy + dz * dz;
         boolean movedWrong = false;
         // TODO: Check if the player is flying instead of if they can fly, this information should be synced as in BTA flying is more than just no gravity
-        if (playerEntity.pushTime < 0.1f && !playerEntity.getGamemode().canPlayerFly() && velSquared > 0.0625D && !playerEntity.isPlayerSleeping())
-        {
+        if (this.playerEntity.pushTime < 0.1f && !this.playerEntity.getGamemode().canPlayerFly() && velSquared > 0.0625D && !this.playerEntity.isPlayerSleeping()) {
             movedWrong = true;
-            LOGGER.warn("{} moved wrongly!", playerEntity.username);
+            LOGGER.warn("{} moved wrongly!", this.playerEntity.username);
             LOGGER.warn("Got position {}, {}, {}", newPosX, newPosY, newPosZ);
-            LOGGER.warn("Expected {}, {}, {}", playerEntity.x, playerEntity.y, playerEntity.z);
+            LOGGER.warn("Expected {}, {}, {}", this.playerEntity.x, this.playerEntity.y, this.playerEntity.z);
         }
-        playerEntity.absMoveTo(newPosX, newPosY, newPosZ, yRot, xRot);
-        boolean insideBlockNew = worldserver.getCubes(playerEntity, playerEntity.bb.copyPooled().getInsetBoundingBox(bb_expand, bb_expand, bb_expand)).isEmpty();
-        if (playerEntity.pushTime < 0.1f && !playerEntity.getGamemode().canPlayerFly() && insideBlockOld && (movedWrong || !insideBlockNew) && !playerEntity.isPlayerSleeping())
-        {
+        this.playerEntity.absMoveTo(newPosX, newPosY, newPosZ, yRot, xRot);
+        boolean insideBlockNew = worldserver.getCubes(this.playerEntity, MathHelper.aabbInsetBoundingBox(this.playerEntity.bb, bb_expand, bb_expand, bb_expand, new AABBd())).isEmpty();
+        if (this.playerEntity.pushTime < 0.1f && !this.playerEntity.getGamemode().canPlayerFly() && insideBlockOld && (movedWrong || !insideBlockNew) && !this.playerEntity.isPlayerSleeping()) {
             // If the player:
             // - Is inside a block and wasn't on the last tick
             // - Moved wrongly
             // - And is not sleeping or flying
             // Bounce them back
-            teleport(lastPosX, lastPosY, lastPosZ);
+            teleport(this.lastPosX, this.lastPosY, this.lastPosZ);
             return;
         }
 
         // Falling and ground collision
-        AABB aabb = playerEntity.bb.copyPooled().grow(bb_expand, bb_expand, bb_expand).expand(0.0D, -0.55D, 0.0D);
-        if (!playerEntity.getGamemode().canPlayerFly() && !mcServer.allowFlight && !worldserver.getIsAnySolidGround(aabb))
-        {
+        AABBd aabb = MathHelper.aabbGrow(this.playerEntity.bb, bb_expand, bb_expand, bb_expand, new AABBd());
+        MathHelper.aabbExpand(aabb, 0.0D, -0.55D, 0.0D, aabb);
+        if (!this.playerEntity.getGamemode().canPlayerFly() && !this.mcServer.allowFlight && !worldserver.getIsAnySolidGround(aabb)) {
             // Don't tick fly counter if they are falling
-            if (dy > -0.03125D)
-            {
-                playerInAirTime++;
-                if (playerInAirTime > 100) {
-                    LOGGER.warn(playerEntity.username + " was kicked for floating too long!");
+            if (dy > -0.03125D) {
+                this.playerInAirTime++;
+                if (this.playerInAirTime > 100) {
+                    LOGGER.warn(this.playerEntity.username + " was kicked for floating too long!");
                     kickPlayer("Flying is not enabled on this server");
                     return;
                 }
@@ -276,113 +270,108 @@ public class PacketHandlerServer extends PacketHandler
                     teleportAndRotate(lastPosX, lastPosY, lastPosZ, yRot, xRot);
                 }*/
             }
-        }
-        else
-        {
-            playerInAirTime = 0;
+        } else {
+            this.playerInAirTime = 0;
         }
         // TODO: Should we really trust the client to tell the server if they are on the ground?
-        playerEntity.onGround = packet.onGround;
-        mcServer.playerList.onPlayerMoved(playerEntity);
-        playerEntity.handleFalling(playerEntity.y - oldPosY, packet.onGround);
-    }
-
-	public void teleport(double x, double y, double z) {
-		hasMoved = false;
-		lastPosX = x;
-		lastPosY = y;
-		lastPosZ = z;
-		playerEntity.absMoveTo(x, y, z, playerEntity.yRot, playerEntity.xRot);
-		playerEntity.playerNetServerHandler.sendPacket(new PacketMovePlayer.Pos(x, y, z, false));
-	}
-
-	public void teleportAndRotate(double x, double y, double z, float yaw, float pitch) {
-		hasMoved = false;
-		lastPosX = x;
-		lastPosY = y;
-		lastPosZ = z;
-		playerEntity.absMoveTo(x, y, z, yaw, pitch);
-		playerEntity.playerNetServerHandler.sendPacket(new PacketMovePlayer.PosRot(x, y, z, yaw, pitch, false));
-	}
+        this.playerEntity.onGround = packetMovePlayer.onGround;
+        this.mcServer.playerList.onPlayerMoved(this.playerEntity);
+        this.playerEntity.handleFalling(this.playerEntity.y - oldPosY, packetMovePlayer.onGround);
+    }
+
+    public void teleport(double x, double y, double z) {
+        this.hasMoved = false;
+        this.lastPosX = x;
+        this.lastPosY = y;
+        this.lastPosZ = z;
+        this.playerEntity.absMoveTo(x, y, z, this.playerEntity.yRot, this.playerEntity.xRot);
+        this.playerEntity.playerNetServerHandler.sendPacket(new PacketMovePlayer.Pos(x, y, z, false));
+    }
+
+    public void teleportAndRotate(double x, double y, double z, float yaw, float pitch) {
+        this.hasMoved = false;
+        this.lastPosX = x;
+        this.lastPosY = y;
+        this.lastPosZ = z;
+        this.playerEntity.absMoveTo(x, y, z, yaw, pitch);
+        this.playerEntity.playerNetServerHandler.sendPacket(new PacketMovePlayer.PosRot(x, y, z, yaw, pitch, false));
+    }
 
     @Override
-    public void handleBlockDig(PacketPlayerAction playerActionPacket) {
-        final int x = playerActionPacket.xPosition;
-        final int y = playerActionPacket.yPosition;
-        final int z = playerActionPacket.zPosition;
-
-        if (!canInteract() || playerEntity.getHeldObject() != null /*Forbid digging while holding object*/) return;
-        WorldServer world = mcServer.getDimensionWorld(playerEntity.dimension);
-        switch (playerActionPacket.action) {
+    public void handlePlayerAction(@NotNull PacketPlayerAction packetPlayerAction) {
+        final int x = packetPlayerAction.xPosition;
+        final int y = packetPlayerAction.yPosition;
+        final int z = packetPlayerAction.zPosition;
+
+        if (!canInteract() || this.playerEntity.getHeldObject() != null /*Forbid digging while holding object*/) return;
+        WorldServer world = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
+        switch (packetPlayerAction.action) {
             case PacketPlayerAction.ACTION_DROP_ITEM_SINGLE:
                 // Drop single item
-                playerEntity.dropCurrentItem(false);
+                this.playerEntity.dropCurrentItem(false);
                 return;
             case PacketPlayerAction.ACTION_DROP_ITEM_STACK:
                 // Drop full stack
-                playerEntity.dropCurrentItem(true);
+                this.playerEntity.dropCurrentItem(true);
                 return;
             case PacketPlayerAction.ACTION_PICK_BLOCK:
                 // Pick Block
-                playerEntity.pickBlock(x, y, z, false);
+                this.playerEntity.pickBlock(x, y, z, false);
                 return;
             case PacketPlayerAction.ACTION_PICK_BLOCK_FULLY:
                 // Pick Block Fully
-                playerEntity.pickBlock(x, y, z, true);
+                this.playerEntity.pickBlock(x, y, z, true);
                 return;
         }
 
         // Check player distance
-        double playerDistX = playerEntity.x - (x + 0.5);
-        double playerDistY = playerEntity.y - (y + 0.5);
-        double playerDistZ = playerEntity.z - (z + 0.5);
+        double playerDistX = this.playerEntity.x - (x + 0.5);
+        double playerDistY = this.playerEntity.y - (y + 0.5);
+        double playerDistZ = this.playerEntity.z - (z + 0.5);
         double playerDist = playerDistX * playerDistX + playerDistY * playerDistY + playerDistZ * playerDistZ;
-        if(playerDist > 44.0) {
+        if (playerDist > 44.0) {
             return;
         }
 
         // Check spawn protection
-        boolean ignoreSpawnProtection = mcServer.spawnProtectionRange <= 0 || world.dimension.id != 0 || mcServer.playerList.isOp(playerEntity.uuid);
+        boolean ignoreSpawnProtection = this.mcServer.spawnProtectionRange <= 0 || world.dimension.id != 0 || this.mcServer.playerList.isOp(this.playerEntity.uuid);
         TilePos spawnPos = world.getSpawnPoint();
         int spawnDistX = (int) MathHelper.abs(x - spawnPos.x);
         int spawnDistZ = (int) MathHelper.abs(z - spawnPos.z);
         int distanceFromSpawn = Math.max(spawnDistX, spawnDistZ);
-        if(distanceFromSpawn <= mcServer.spawnProtectionRange && !ignoreSpawnProtection) {
-            playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, world));
+        if (distanceFromSpawn <= this.mcServer.spawnProtectionRange && !ignoreSpawnProtection) {
+            this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, world));
             return;
         }
 
         // handles spawn protection
-        if(playerActionPacket.action == PacketPlayerAction.ACTION_DIG_START) {
+        if (packetPlayerAction.action == PacketPlayerAction.ACTION_DIG_START) {
             // Start Mining
-            playerEntity.playerController.startMining(x, y, z, playerActionPacket.side);
-        } else if(playerActionPacket.action == PacketPlayerAction.ACTION_DIG_CONTINUED) {
+            this.playerEntity.playerController.startMining(x, y, z, packetPlayerAction.side);
+        } else if (packetPlayerAction.action == PacketPlayerAction.ACTION_DIG_CONTINUED) {
             // Hit Block
-            playerEntity.playerController.hitBlock(x, y, z, playerActionPacket.side, playerActionPacket.xHit, playerActionPacket.yHit);
-        } else if(playerActionPacket.action == PacketPlayerAction.ACTION_DIG_COMPLETE) {
+            this.playerEntity.playerController.hitBlock(x, y, z, packetPlayerAction.side, packetPlayerAction.xHit, packetPlayerAction.yHit);
+        } else if (packetPlayerAction.action == PacketPlayerAction.ACTION_DIG_COMPLETE) {
             // Block Destroy
-            if(!playerEntity.playerController.destroyBlock(x, y, z, playerActionPacket.side)) {
-                playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, world));
+            if (!this.playerEntity.playerController.destroyBlock(x, y, z, packetPlayerAction.side)) {
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, world));
             }
         }
     }
 
-    public void handleSendInitialPlayerList()
-    {
-        for (PlayerServer playerServer : mcServer.playerList.playerEntities)
-        {
+    public void handleSendInitialPlayerList() {
+        for (PlayerServer playerServer : this.mcServer.playerList.playerEntities) {
             sendPacket(new PacketUpdatePlayerProfile(playerServer.username, playerServer.nickname, playerServer.uuid, playerServer.score, playerServer.chatColor, true, playerServer.isOperator()));
         }
         PlayerListBox.updateList();
     }
 
     @Override
-    public void handlePlace(PacketUseOrPlaceItemStack packet)
-    {
+    public void handleUseOrPlaceItem(@NotNull PacketUseOrPlaceItemStack packet) {
         if (!canInteract()) return;
-        WorldServer worldserver = mcServer.getDimensionWorld(playerEntity.dimension);
-        ItemStack itemstack = playerEntity.inventory.getCurrentItem();
-        boolean ignoreSpawnProtection = mcServer.spawnProtectionRange <= 0 || worldserver.dimension.id != 0 || mcServer.playerList.isOp(playerEntity.uuid);
+        WorldServer worldserver = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
+        ItemStack itemstack = this.playerEntity.inventory.getCurrentItem();
+        boolean ignoreSpawnProtection = this.mcServer.spawnProtectionRange <= 0 || worldserver.dimension.id != 0 || this.mcServer.playerList.isOp(this.playerEntity.uuid);
         switch (packet.type) {
             case PacketUseOrPlaceItemStack.TYPE_USE_OR_PLACE_ON_TILE: {
                 int x = packet.xPosition;
@@ -394,27 +383,24 @@ public class PacketHandlerServer extends PacketHandler
                 TilePos chunkcoordinates = worldserver.getSpawnPoint();
                 int i1 = (int) MathHelper.abs(x - chunkcoordinates.x);
                 int j1 = (int) MathHelper.abs(z - chunkcoordinates.z);
-                if (i1 > j1)
-                {
+                if (i1 > j1) {
                     j1 = i1;
                 }
-                if (hasMoved && playerEntity.distanceToSqr((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D) < 64D && (j1 > mcServer.spawnProtectionRange || ignoreSpawnProtection))
-                {
-                    playerEntity.playerController.useOrPlaceItemStackOnTile(playerEntity, worldserver, itemstack, x, y, z, direction.getSide(), xPlaced, yPlaced);
+                if (this.hasMoved && this.playerEntity.distanceToSqr((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D) < 64D && (j1 > this.mcServer.spawnProtectionRange || ignoreSpawnProtection)) {
+                    this.playerEntity.playerController.useOrPlaceItemStackOnTile(this.playerEntity, worldserver, itemstack, x, y, z, direction.getSide(), xPlaced, yPlaced);
                 }
-                playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
                 x += direction.getOffsetX();
                 y += direction.getOffsetY();
                 z += direction.getOffsetZ();
-                playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
                 break;
             }
             case PacketUseOrPlaceItemStack.TYPE_USE_ON_NOTHING: {
-                if (itemstack == null)
-                {
+                if (itemstack == null) {
                     return;
                 }
-                playerEntity.playerController.useItemStackOnNothing(playerEntity, worldserver, itemstack);
+                this.playerEntity.playerController.useItemStackOnNothing(this.playerEntity, worldserver, itemstack);
                 break;
             }
             case PacketUseOrPlaceItemStack.TYPE_PLACE_ONLY: {
@@ -427,358 +413,297 @@ public class PacketHandlerServer extends PacketHandler
                 TilePos chunkcoordinates = worldserver.getSpawnPoint();
                 int i1 = (int) MathHelper.abs(x - chunkcoordinates.x);
                 int j1 = (int) MathHelper.abs(z - chunkcoordinates.z);
-                if (i1 > j1)
-                {
+                if (i1 > j1) {
                     j1 = i1;
                 }
-                if (hasMoved && playerEntity.distanceToSqr((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D) < 64D && (j1 > mcServer.spawnProtectionRange || ignoreSpawnProtection))
-                {
-                    playerEntity.playerController.placeItemStackOnTile(playerEntity, worldserver, itemstack, x, y, z, direction.getSide(), xPlaced, yPlaced);
+                if (this.hasMoved && this.playerEntity.distanceToSqr((double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D) < 64D && (j1 > this.mcServer.spawnProtectionRange || ignoreSpawnProtection)) {
+                    this.playerEntity.playerController.placeItemStackOnTile(this.playerEntity, worldserver, itemstack, x, y, z, direction.getSide(), xPlaced, yPlaced);
                 }
-                playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
                 x += direction.getOffsetX();
                 y += direction.getOffsetY();
                 z += direction.getOffsetZ();
-                playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketBlockUpdate(x, y, z, worldserver));
                 break;
             }
         }
-        itemstack = playerEntity.inventory.getCurrentItem();
-        if (itemstack != null && itemstack.stackSize <= 0)
-        {
-            playerEntity.inventory.mainInventory[playerEntity.inventory.getCurrentItemIndex()] = null;
+        itemstack = this.playerEntity.inventory.getCurrentItem();
+        if (itemstack != null && itemstack.stackSize <= 0) {
+            this.playerEntity.inventory.mainInventory[this.playerEntity.inventory.getCurrentItemIndex()] = null;
         }
-        playerEntity.isChangingQuantityOnly = true;
-        playerEntity.inventory.mainInventory[playerEntity.inventory.getCurrentItemIndex()] = ItemStack.copyItemStack(playerEntity.inventory.mainInventory[playerEntity.inventory.getCurrentItemIndex()]);
-        Slot slot = playerEntity.craftingInventory.getSlotFor(playerEntity.inventory, playerEntity.inventory.getCurrentItemIndex());
-        playerEntity.craftingInventory.broadcastChanges();
-        playerEntity.isChangingQuantityOnly = false;
+        this.playerEntity.isChangingQuantityOnly = true;
+        this.playerEntity.inventory.mainInventory[this.playerEntity.inventory.getCurrentItemIndex()] = ItemStack.copyItemStack(this.playerEntity.inventory.mainInventory[this.playerEntity.inventory.getCurrentItemIndex()]);
+        Slot slot = this.playerEntity.craftingInventory.getSlotFor(this.playerEntity.inventory, this.playerEntity.inventory.getCurrentItemIndex());
+        this.playerEntity.craftingInventory.broadcastChanges();
+        this.playerEntity.isChangingQuantityOnly = false;
         if (slot == null) {
-            LOGGER.warn("Couldn't find slot for index '{}' in {}'s inventory while they were in the {} container!", playerEntity.inventory.getCurrentItemIndex(), playerEntity.username, playerEntity.craftingInventory.getClass().getSimpleName());
+            LOGGER.warn("Couldn't find slot for index '{}' in {}'s inventory while they were in the {} container!", this.playerEntity.inventory.getCurrentItemIndex(), this.playerEntity.username, this.playerEntity.craftingInventory.getClass().getSimpleName());
             return;
         }
-        if (!ItemStack.areItemStacksEqual(playerEntity.inventory.getCurrentItem(), packet.itemStack))
-        {
-            sendPacket(new PacketContainerSetSlot(playerEntity.craftingInventory.containerId, slot.index, playerEntity.inventory.getCurrentItem()));
+        if (!ItemStack.areItemStacksEqual(this.playerEntity.inventory.getCurrentItem(), packet.itemStack)) {
+            sendPacket(new PacketContainerSetSlot(this.playerEntity.craftingInventory.containerId, slot.index, this.playerEntity.inventory.getCurrentItem()));
         }
     }
 
     @Override
-    public void handleErrorMessage(String message, Object[] objects)
-    {
-        LOGGER.info(playerEntity.username + " lost connection: " + message);
-        mcServer.playerList.sendPacketToAllPlayers(new PacketChat(playerEntity.getDisplayName() + TextFormatting.YELLOW + " left the game."));
-        mcServer.playerList.updatePlayerProfile(playerEntity.username, playerEntity.nickname, playerEntity.uuid, playerEntity.score, playerEntity.chatColor, false, playerEntity.isOperator());
-        mcServer.playerList.playerLoggedOut(playerEntity);
-        connectionClosed = true;
-        if (MinecraftServer.statsStatus)
-        {
-            RestHandler.post("https://api.betterthanadventure.net/stats?serverToken=" + MinecraftServer.statsToken + "&count=" + mcServer.playerList.playerEntities.size());
+    public void handleErrorMessage(String message, Object[] objects) {
+        LOGGER.info(this.playerEntity.username + " lost connection: " + message);
+        this.mcServer.playerList.sendPacketToAllPlayers(new PacketChat(this.playerEntity.getDisplayName() + TextFormatting.YELLOW + " left the game."));
+        this.mcServer.playerList.updatePlayerProfile(this.playerEntity.username, this.playerEntity.nickname, this.playerEntity.uuid, this.playerEntity.score, this.playerEntity.chatColor, false, this.playerEntity.isOperator());
+        this.mcServer.playerList.playerLoggedOut(this.playerEntity);
+        this.connectionClosed = true;
+        if (MinecraftServer.statsStatus) {
+            RestHandler.post("https://api.betterthanadventure.net/stats?serverToken=" + MinecraftServer.statsToken + "&count=" + this.mcServer.playerList.playerEntities.size());
         }
         PlayerListBox.updateList();
     }
 
     @Override
-    public void handleInvalidPacket(Packet packet)
-    {
+    public void handleInvalidPacket(@NotNull Packet packet) {
         LOGGER.warn("{} wasn't prepared to deal with a {}", getClass(), packet.getClass());
         kickPlayer("Protocol error, unexpected packet");
     }
 
-    public void sendPacket(Packet packet)
-    {
-        netManager.addToSendQueue(packet);
-        field_22004_g = field_15_f;
+    public void sendPacket(Packet packet) {
+        this.netManager.addToSendQueue(packet);
+        this.field_22004_g = this.field_15_f;
     }
 
     @Override
-    public void handleBlockItemSwitch(PacketSetCarriedItem setCarriedItemPacket)
-    {
-        if (setCarriedItemPacket.id < 0 || setCarriedItemPacket.id > ContainerInventory.playerMainInventorySize())
-        {
-            LOGGER.warn("{} tried to set an invalid carried item", playerEntity.username);
-        }
-        else
-        {
-            playerEntity.inventory.setCurrentItemIndex(setCarriedItemPacket.id, false);
-            if (setCarriedItemPacket.id != playerEntity.inventory.getCurrentItemIndex()) { // If client tried to set current item while locked then send a packet back attempting to resync them
-                sendPacket(new PacketSetCarriedItem(setCarriedItemPacket.id));
+    public void handleSetCarriedItem(@NotNull PacketSetCarriedItem packetSetCarriedItem) {
+        if (packetSetCarriedItem.id < 0 || packetSetCarriedItem.id > ContainerInventory.playerMainInventorySize()) {
+            LOGGER.warn("{} tried to set an invalid carried item", this.playerEntity.username);
+        } else {
+            this.playerEntity.inventory.setCurrentItemIndex(packetSetCarriedItem.id, false);
+            if (packetSetCarriedItem.id != this.playerEntity.inventory.getCurrentItemIndex()) { // If client tried to set current item while locked then send a packet back attempting to resync them
+                sendPacket(new PacketSetCarriedItem(packetSetCarriedItem.id));
             }
         }
     }
 
-	@Override
-	public void handleChat(PacketChat packet) {
-		String message;
-		if(packet.encrypted) {
-			try {
-				message = AES.decrypt(packet.message, AES.keyChain.get(playerEntity.username));
-			}catch (Exception e) {
-				throw new RuntimeException(PacketChat.ENCRYPTION_ERROR_MESSAGE, e);
-			}
-		}else {
-			message = packet.message;
-		}
-		
-		if(message.length() > 256) {
-			message = message.substring(0, 255);
-		}
-		
-		message = message.trim();
+    @Override
+    public void handleChat(@NotNull PacketChat packet) {
+        String message;
+        if (packet.encrypted) {
+            try {
+                message = AES.decrypt(packet.message, AES.keyChain.get(this.playerEntity.username));
+            } catch (Exception e) {
+                throw new RuntimeException(PacketChat.ENCRYPTION_ERROR_MESSAGE, e);
+            }
+        } else {
+            message = packet.message;
+        }
+
+        if (message.length() > 256) {
+            message = message.substring(0, 255);
+        }
+
+        message = message.trim();
 //		message = message.replace('§', '$');
-		
-		for(int i = 0; i < message.length(); i++) {
-			char c = message.charAt(i);
-			if(ChatAllowedCharacters.ALLOWED_CHARACTERS.indexOf(c) < 0) {
-				sendPacket(new PacketChat(String.valueOf(TextFormatting.GRAY) + TextFormatting.ITALIC + "[SERVER] Illegal characters in chat message."));
-				return;
-			}
-		}
-		
-		if(message.startsWith("/")) {
-			handleSlashCommand(message);
-		}else {
-			message = ChatEmotes.process(message);
-			message = "<" + playerEntity.getDisplayName() + TextFormatting.RESET + "> " + TextFormatting.WHITE + message;
-			LOGGER.info(message);
-			mcServer.playerList.sendEncryptedChatToAllPlayers(message);
-		}
-	}
-
-    private void handleSlashCommand(String s)
-    {
-        ServerCommandSource serverCommandSource = new ServerCommandSource(mcServer, playerEntity);
+
+        for (int i = 0; i < message.length(); i++) {
+            char c = message.charAt(i);
+            if (ChatAllowedCharacters.ALLOWED_CHARACTERS.indexOf(c) < 0) {
+                sendPacket(new PacketChat(String.valueOf(TextFormatting.GRAY) + TextFormatting.ITALIC + "[SERVER] Illegal characters in chat message."));
+                return;
+            }
+        }
+
+        if (message.startsWith("/")) {
+            handleSlashCommand(message);
+        } else {
+            message = ChatEmotes.process(message);
+            message = "<" + this.playerEntity.getDisplayName() + TextFormatting.RESET + "> " + TextFormatting.WHITE + message;
+            LOGGER.info(message);
+            this.mcServer.playerList.sendEncryptedChatToAllPlayers(message);
+        }
+    }
+
+    private void handleSlashCommand(String s) {
+        ServerCommandSource serverCommandSource = new ServerCommandSource(this.mcServer, this.playerEntity);
         try {
-            playerEntity.world.getCommandManager().execute(s.substring(1), serverCommandSource);
+            this.playerEntity.world.getCommandManager().execute(s.substring(1), serverCommandSource);
         } catch (CommandSyntaxException e) {
-            playerEntity.playerNetServerHandler.sendPacket(new PacketChat(TextFormatting.RED + e.getMessage(), AES.keyChain.get(playerEntity.username)));
+            this.playerEntity.playerNetServerHandler.sendPacket(new PacketChat(TextFormatting.RED + e.getMessage(), AES.keyChain.get(this.playerEntity.username)));
         }
     }
 
     @Override
-    public void handleAnimation(PacketAnimate packet)
-    {
-        if (!playerEntity.isAlive()) return;
-        if (packet.animate == 1)
-        {
-            playerEntity.swingItem();
+    public void handleAnimation(@NotNull PacketAnimate packet) {
+        if (!this.playerEntity.isAlive()) return;
+        if (packet.animate == 1) {
+            this.playerEntity.swingItem();
         }
     }
 
     @Override
-    public void handlePlayerState(PacketUpdatePlayerState updatePlayerStatePacket)
-    {
-        if (!playerEntity.isAlive()) return;
-        if (updatePlayerStatePacket.state == PacketUpdatePlayerState.STATE_SNEAK)
-        {
-            playerEntity.setSneaking(true);
-            if (playerEntity.vehicle != null) {
-                playerEntity.vehicle.ejectRider();
+    public void handleUpdatePlayerState(@NotNull PacketUpdatePlayerState packetUpdatePlayerState) {
+        if (!this.playerEntity.isAlive()) return;
+        if (packetUpdatePlayerState.state == PacketUpdatePlayerState.STATE_SNEAK) {
+            this.playerEntity.setSneaking(true);
+            if (this.playerEntity.vehicle != null) {
+                this.playerEntity.vehicle.ejectRider();
             }
-        }
-        else if (updatePlayerStatePacket.state == PacketUpdatePlayerState.STATE_UN_SNEAK)
-        {
-            playerEntity.setSneaking(false);
-        }
-        else if (updatePlayerStatePacket.state == PacketUpdatePlayerState.STATE_LEAVE_BED)
-        {
-            playerEntity.wakeUpPlayer(false, true);
-            hasMoved = false;
+        } else if (packetUpdatePlayerState.state == PacketUpdatePlayerState.STATE_UN_SNEAK) {
+            this.playerEntity.setSneaking(false);
+        } else if (packetUpdatePlayerState.state == PacketUpdatePlayerState.STATE_LEAVE_BED) {
+            this.playerEntity.wakeUpPlayer(false, true);
+            this.hasMoved = false;
         }
     }
+
     @Override
-    public void handleBoatControl(PacketBoatControl boatControlPacket)
-    {
-        if (!canInteract() || Double.isNaN(boatControlPacket.targetXD) || Double.isNaN(boatControlPacket.targetZD)) return;
-        if (playerEntity.vehicle != null && playerEntity.vehicle instanceof EntityBoat) {
-            EntityBoat boat = (EntityBoat) playerEntity.vehicle;
-            boat.handleControlDirect(boatControlPacket.targetXD, boatControlPacket.targetZD, boatControlPacket.targetYRot);
-            boatControlPacket.entityId = boat.id;
-            mcServer.playerList.sendPacketToOtherPlayersAroundPoint(playerEntity,boat.x, boat.y, boat.z, 128, boat.world.dimension.id, boatControlPacket);
+    public void handleBoatControl(@NotNull PacketBoatControl packetBoatControl) {
+        if (!canInteract() || Double.isNaN(packetBoatControl.targetXD) || Double.isNaN(packetBoatControl.targetZD))
+            return;
+        if (this.playerEntity.vehicle != null && this.playerEntity.vehicle instanceof EntityBoat boat) {
+            boat.handleControlDirect(packetBoatControl.targetXD, packetBoatControl.targetZD, packetBoatControl.targetYRot);
+            packetBoatControl.entityId = boat.id;
+            this.mcServer.playerList.sendPacketToOtherPlayersAroundPoint(this.playerEntity, boat.x, boat.y, boat.z, 128, boat.world.dimension.id, packetBoatControl);
         }
     }
 
     @Override
-    public void handleKickDisconnect(PacketDisconnect packet)
-    {
-        netManager.networkShutdown("disconnect.quitting", new Object[0]);
+    public void handleDisconnect(@NotNull PacketDisconnect packetDisconnect) {
+        this.netManager.networkShutdown("disconnect.quitting", new Object[0]);
     }
 
-    public int getNumChunkDataPackets()
-    {
-        return netManager.getNumChunkDataPackets();
+    public int getNumChunkDataPackets() {
+        return this.netManager.getNumChunkDataPackets();
     }
 
     @Override
-    public void logInfo(String s)
-    {
+    public void logInfo(String s) {
         sendPacket(new PacketChat("\2477" + s));
     }
 
     @Override
-    public String getUsername()
-    {
-        return playerEntity.username;
+    public String getUsername() {
+        return this.playerEntity.username;
     }
 
     @Override
-    public void handleUseEntity(PacketInteract interactPacket)
-    {
-        if (!playerEntity.getGamemode().canInteract() || !playerEntity.isAlive()) return;
-        WorldServer worldserver = mcServer.getDimensionWorld(playerEntity.dimension);
-        Entity targetEntity = worldserver.getEntityFromId(interactPacket.targetEntityID);
-        if (targetEntity != null && playerEntity.distanceToSqr(targetEntity) < 36D)
-        {
-            boolean canAttack = playerEntity.canEntityBeSeen(targetEntity);
-
-            if (!canAttack)
-            {
-                float f1 = MathHelper.cos(-playerEntity.yRot * 0.01745329F - MathHelper.PI);
-                float f2 = MathHelper.sin(-playerEntity.yRot * 0.01745329F - MathHelper.PI);
-                float f3 = -MathHelper.cos(-playerEntity.xRot * 0.01745329F);
-                float f4 = MathHelper.sin(-playerEntity.xRot * 0.01745329F);
-
-                Vec3 viewVector = Vec3.fromPool(f2 * f3, f4, f1 * f3);
-
-                viewVector.x *= 8;
-                viewVector.y *= 8;
-                viewVector.z *= 8;
-                viewVector.x += playerEntity.x;
-                viewVector.y += playerEntity.y;
-                viewVector.z += playerEntity.z;
-
-                Vec3 playerViewPos = Vec3.fromPool(playerEntity.x, playerEntity.y + playerEntity.getHeadHeight(), playerEntity.z);
-
-                HitResult movingObjectPosition = targetEntity.bb.clip(playerViewPos, viewVector);
+    public void handleEntityInteract(@NotNull PacketEntityInteract packetEntityInteract) {
+        if (!this.playerEntity.getGamemode().canInteract() || !this.playerEntity.isAlive()) return;
+        WorldServer worldserver = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
+        Entity targetEntity = worldserver.getEntityFromId(packetEntityInteract.targetEntityID);
+        if (targetEntity != null && this.playerEntity.distanceToSqr(targetEntity) < 36D) {
+            boolean canAttack = this.playerEntity.canEntityBeSeen(targetEntity);
+
+            if (!canAttack) {
+                float f1 = MathHelper.cos(-this.playerEntity.yRot * 0.01745329F - MathHelper.PI);
+                float f2 = MathHelper.sin(-this.playerEntity.yRot * 0.01745329F - MathHelper.PI);
+                float f3 = -MathHelper.cos(-this.playerEntity.xRot * 0.01745329F);
+                float f4 = MathHelper.sin(-this.playerEntity.xRot * 0.01745329F);
+
+                Vector3d viewVector = new Vector3d(f2 * f3, f4, f1 * f3);
+
+                viewVector.mul(8);
+                viewVector.add(this.playerEntity.x, this.playerEntity.y, this.playerEntity.z);
+
+                Vector3dc playerViewPos = new Vector3d(this.playerEntity.x, this.playerEntity.y + this.playerEntity.getHeadHeight(), this.playerEntity.z);
+
+                HitResult movingObjectPosition = MathHelper.aabbClip(targetEntity.bb, playerViewPos, viewVector);
 
                 canAttack = movingObjectPosition != null && worldserver.checkBlockCollisionBetweenPoints(playerViewPos, movingObjectPosition.location) == null;
             }
-            if (canAttack)
-            {
-                if (interactPacket.action == PacketInteract.ACTION_INTERACT)
-                {
-                    playerEntity.useCurrentItemOnEntity(targetEntity);
-                }
-                else if (interactPacket.action == PacketInteract.ACTION_ATTACK)
-                {
-                    playerEntity.attackTargetEntityWithCurrentItem(targetEntity);
+            if (canAttack) {
+                if (packetEntityInteract.action == PacketEntityInteract.ACTION_INTERACT) {
+                    this.playerEntity.useCurrentItemOnEntity(targetEntity);
+                } else if (packetEntityInteract.action == PacketEntityInteract.ACTION_ATTACK) {
+                    this.playerEntity.attackTargetEntityWithCurrentItem(targetEntity);
                 }
             }
         }
     }
 
     @Override
-    public void handleOpenGuidebook(PacketGuidebook packet)
-    {
-        playerEntity.displayGUIGuidebook();
+    public void handleGuidebook(@NotNull PacketGuidebook packet) {
+        this.playerEntity.displayGUIGuidebook();
     }
 
     @Override
-    public void handleRespawn(PacketRespawn packet)
-    {
-        if (playerEntity.getHealth() <= 0) {
-            playerEntity = mcServer.playerList.recreatePlayerEntity(playerEntity, 0);
+    public void handleRespawn(@NotNull PacketRespawn packet) {
+        if (this.playerEntity.getHealth() <= 0) {
+            this.playerEntity = this.mcServer.playerList.recreatePlayerEntity(this.playerEntity, 0);
         }
     }
 
     @Override
-    public void handleCloseWindow(PacketContainerClose containerClosePacket)
-    {
-        playerEntity.closeCraftingGui();
+    public void handleContainerClose(@NotNull PacketContainerClose packetContainerClose) {
+        this.playerEntity.closeCraftingGui();
     }
 
     @Override
-    public void handleWindowClick(PacketContainerClick containerClickPacket)
-    {
-        if (playerEntity.craftingInventory.containerId == containerClickPacket.window_Id && playerEntity.craftingInventory.isSynched(playerEntity))
-        {
-            ItemStack itemstack = playerEntity.craftingInventory.clicked(containerClickPacket.action, containerClickPacket.args, playerEntity);
-            if (ItemStack.areItemStacksEqual(containerClickPacket.itemStack, itemstack))
-            {
-                playerEntity.playerNetServerHandler.sendPacket(new PacketContainerAck(containerClickPacket.window_Id, containerClickPacket.actionId, true));
-                playerEntity.isChangingQuantityOnly = true;
-                playerEntity.craftingInventory.broadcastChanges();
-                playerEntity.updateHeldItem();
-                playerEntity.isChangingQuantityOnly = false;
-            }
-            else
-            {
-                guiIdMap.put(playerEntity.craftingInventory.containerId, containerClickPacket.actionId);
-                playerEntity.playerNetServerHandler.sendPacket(new PacketContainerAck(containerClickPacket.window_Id, containerClickPacket.actionId, false));
-                playerEntity.craftingInventory.setSynched(playerEntity, false);
+    public void handleContainerClick(@NotNull PacketContainerClick packetContainerClick) {
+        if (this.playerEntity.craftingInventory.containerId == packetContainerClick.window_Id && this.playerEntity.craftingInventory.isSynched(this.playerEntity)) {
+            ItemStack itemstack = this.playerEntity.craftingInventory.clicked(packetContainerClick.action, packetContainerClick.args, this.playerEntity);
+            if (ItemStack.areItemStacksEqual(packetContainerClick.itemStack, itemstack)) {
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketContainerAck(packetContainerClick.window_Id, packetContainerClick.actionId, true));
+                this.playerEntity.isChangingQuantityOnly = true;
+                this.playerEntity.craftingInventory.broadcastChanges();
+                this.playerEntity.updateHeldItem();
+                this.playerEntity.isChangingQuantityOnly = false;
+            } else {
+                this.guiIdMap.put(this.playerEntity.craftingInventory.containerId, packetContainerClick.actionId);
+                this.playerEntity.playerNetServerHandler.sendPacket(new PacketContainerAck(packetContainerClick.window_Id, packetContainerClick.actionId, false));
+                this.playerEntity.craftingInventory.setSynched(this.playerEntity, false);
                 ArrayList<ItemStack> arraylist = new ArrayList<>();
-                for (int i = 0; i < playerEntity.craftingInventory.slots.size(); i++)
-                {
-                    arraylist.add(playerEntity.craftingInventory.slots.get(i).getItemStack());
+                for (int i = 0; i < this.playerEntity.craftingInventory.slots.size(); i++) {
+                    arraylist.add(this.playerEntity.craftingInventory.slots.get(i).getItemStack());
                 }
 
-                playerEntity.updateCraftingInventory(playerEntity.craftingInventory, arraylist);
+                this.playerEntity.updateCraftingInventory(this.playerEntity.craftingInventory, arraylist);
             }
         }
     }
 
     @Override
-    public void handleTransaction(PacketContainerAck packet)
-    {
-        Short short1 = guiIdMap.get(playerEntity.craftingInventory.containerId);
-        if (short1 != null && packet.shortWindowId == short1 && playerEntity.craftingInventory.containerId == packet.windowId && !playerEntity.craftingInventory.isSynched(playerEntity))
-        {
-            playerEntity.craftingInventory.setSynched(playerEntity, true);
+    public void handleContainerAck(@NotNull PacketContainerAck packet) {
+        short short1 = this.guiIdMap.get(this.playerEntity.craftingInventory.containerId);
+        if (packet.shortWindowId == short1 && this.playerEntity.craftingInventory.containerId == packet.windowId && !this.playerEntity.craftingInventory.isSynched(this.playerEntity)) {
+            this.playerEntity.craftingInventory.setSynched(this.playerEntity, true);
         }
     }
 
     @Override
-    public void handleUpdateSign(PacketSignUpdate signUpdatePacket)
-    {
-        if (!playerEntity.getGamemode().canInteract() || !playerEntity.isAlive()) return;
-        WorldServer worldserver = mcServer.getDimensionWorld(playerEntity.dimension);
-        if (worldserver.isBlockLoaded(signUpdatePacket.xPosition, signUpdatePacket.yPosition, signUpdatePacket.zPosition))
-        {
-            TileEntity tileEntity = worldserver.getTileEntity(signUpdatePacket.xPosition, signUpdatePacket.yPosition, signUpdatePacket.zPosition);
-            if (tileEntity instanceof TileEntitySign)
-            {
-                TileEntitySign sign = (TileEntitySign) tileEntity;
-                if (!sign.isEditableBy(playerEntity))
-                {
-                    LOGGER.warn("Player {} just tried to change non-editable sign", playerEntity.username);
+    public void handleSignUpdate(@NotNull PacketSignUpdate packetSignUpdate) {
+        if (!this.playerEntity.getGamemode().canInteract() || !this.playerEntity.isAlive()) return;
+        WorldServer worldserver = this.mcServer.getDimensionWorld(this.playerEntity.dimension);
+        if (worldserver.isBlockLoaded(packetSignUpdate.xPosition, packetSignUpdate.yPosition, packetSignUpdate.zPosition)) {
+            TileEntity tileEntity = worldserver.getTileEntity(packetSignUpdate.xPosition, packetSignUpdate.yPosition, packetSignUpdate.zPosition);
+            if (tileEntity instanceof TileEntitySign sign) {
+                if (!sign.isEditableBy(this.playerEntity)) {
+                    LOGGER.warn("Player {} just tried to change non-editable sign", this.playerEntity.username);
                     return;
                 }
             }
-            for (int i = 0; i < 4; i++)
-            {
+            for (int i = 0; i < 4; i++) {
                 boolean isLineValid = true;
-                if (signUpdatePacket.signLines[i].length() > 15)
-                {
+                if (packetSignUpdate.signLines[i].length() > 15) {
                     isLineValid = false;
-                }
-                else
-                {
-                    signUpdatePacket.signLines[i] = signUpdatePacket.signLines[i].replaceAll("§", "$");
-                    for (int l = 0; l < signUpdatePacket.signLines[i].length(); l++)
-                    {
-                        if (ChatAllowedCharacters.ALLOWED_CHARACTERS.indexOf(signUpdatePacket.signLines[i].charAt(l)) < 0)
-                        {
+                } else {
+                    packetSignUpdate.signLines[i] = packetSignUpdate.signLines[i].replaceAll("§", "$");
+                    for (int l = 0; l < packetSignUpdate.signLines[i].length(); l++) {
+                        if (ChatAllowedCharacters.ALLOWED_CHARACTERS.indexOf(packetSignUpdate.signLines[i].charAt(l)) < 0) {
                             isLineValid = false;
                             break;
                         }
                     }
                 }
-                if (!isLineValid)
-                {
-                    signUpdatePacket.signLines[i] = "!?";
+                if (!isLineValid) {
+                    packetSignUpdate.signLines[i] = "!?";
                 }
             }
 
-            if (tileEntity instanceof TileEntitySign)
-            {
-                int x = signUpdatePacket.xPosition;
-                int y = signUpdatePacket.yPosition;
-                int z = signUpdatePacket.zPosition;
-                TileEntitySign sign = (TileEntitySign) tileEntity;
-                System.arraycopy(signUpdatePacket.signLines, 0, sign.signText, 0, 4);
+            if (tileEntity instanceof TileEntitySign sign) {
+                int x = packetSignUpdate.xPosition;
+                int y = packetSignUpdate.yPosition;
+                int z = packetSignUpdate.zPosition;
+                System.arraycopy(packetSignUpdate.signLines, 0, sign.signText, 0, 4);
 
-                sign.setColor(TextFormatting.FORMATTINGS[signUpdatePacket.color]);
-                sign.setPicture(EnumSignPicture.values()[signUpdatePacket.picture]);
+                sign.setColor(TextFormatting.FORMATTINGS[packetSignUpdate.color]);
+                sign.setPicture(EnumSignPicture.values()[packetSignUpdate.picture]);
 
                 sign.setChanged();
                 worldserver.markBlockNeedsUpdate(x, y, z);
@@ -787,85 +712,79 @@ public class PacketHandlerServer extends PacketHandler
     }
 
     @Override
-    public void handleUpdateCreativeInventory(PacketUpdateCreativeInventory packet)
-    {
-        if (playerEntity.craftingInventory.containerId == packet.windowId && playerEntity.craftingInventory instanceof MenuInventoryCreative)
-        {
-            ((MenuInventoryCreative) playerEntity.craftingInventory).setInventoryStatus(packet.page, packet.searchText);
+    public void handleUpdateCreativeInventory(@NotNull PacketUpdateCreativeInventory packet) {
+        if (this.playerEntity.craftingInventory.containerId == packet.windowId && this.playerEntity.craftingInventory instanceof MenuInventoryCreative) {
+            ((MenuInventoryCreative) this.playerEntity.craftingInventory).setInventoryStatus(packet.page, packet.searchText);
         }
     }
 
     @Override
-    public void handleSetHotbarOffset(PacketSetHotbarOffset packet)
-    {
+    public void handleSetHotbarOffset(@NotNull PacketSetHotbarOffset packet) {
 
-        playerEntity.inventory.setHotbarOffset(packet.hotbarOffset, false);
-        if (packet.hotbarOffset != playerEntity.inventory.getHotbarOffset()) { // If player tries to set hotbar offset while locked resync the clients offset
+        this.playerEntity.inventory.setHotbarOffset(packet.hotbarOffset, false);
+        if (packet.hotbarOffset != this.playerEntity.inventory.getHotbarOffset()) { // If player tries to set hotbar offset while locked resync the clients offset
             sendPacket(new PacketSetHotbarOffset(packet.hotbarOffset));
         }
     }
-    
+
     @Override
-    public void handleItemName(PacketSetItemName packet)
-    {
+    public void handleSetItemName(@NotNull PacketSetItemName packet) {
         String name = packet.name;
         if (name.length() > 16) name = packet.name.substring(0, 16);
-        playerEntity.inventory.getItem(packet.slot).setCustomName(name);
+        this.playerEntity.inventory.getItem(packet.slot).setCustomName(name);
     }
 
     @Override
-    public void handleSetPaintingMotive(PacketSetPaintingArt setPaintingArtPacket)
-    {
-        playerEntity.setSelectedArt(ArtType.values.get(setPaintingArtPacket.motive));
+    public void handleSetPaintingArt(@NotNull PacketSetPaintingArt packetSetPaintingArt) {
+        this.playerEntity.setSelectedArt(ArtType.values.get(packetSetPaintingArt.motive));
     }
-    
+
     @Override
-    public void handleCustomPayload(PacketCustomPayload customPayloadPacket) {
-    	if(PacketCustomPayload.CHANNEL_ROTATION_LOCK.equals(customPayloadPacket.channel)) {
-    		if(customPayloadPacket.data.length == 4) {
-        		playerEntity.rotationLock = Direction.getDirectionById(customPayloadPacket.data[0]);
-        		playerEntity.rotationLockHorizontal = Direction.getDirectionById(customPayloadPacket.data[1]);
-        		playerEntity.rotationLockVertical = Direction.getDirectionById(customPayloadPacket.data[2]);
-        		playerEntity.placementModeOverride = PlacementMode.get(customPayloadPacket.data[3]);
-    		}
-    	}else if(PacketCustomPayload.CHANNEL_FLAG.equals(customPayloadPacket.channel)) {
-    		if(customPayloadPacket.data.length == 1 + (TileEntityFlag.CANVAS_WIDTH * TileEntityFlag.CANVAS_HEIGHT) && playerEntity.craftingInventory instanceof MenuFlag) {
-    			MenuFlag menuFlag = (MenuFlag) playerEntity.craftingInventory;
-    			TileEntityFlag flag = menuFlag.flag;
-
-    			if(flag.owner == null || flag.owner.equals(playerEntity.uuid)) {
-                    flag.owner = playerEntity.uuid;
-
-                    byte header = customPayloadPacket.data[0];
+    public void handleCustomPayload(@NotNull PacketCustomPayload packetCustomPayload) {
+        if (PacketCustomPayload.CHANNEL_ROTATION_LOCK.equals(packetCustomPayload.channel)) {
+            if (packetCustomPayload.data.length == 4) {
+                this.playerEntity.rotationLock = Direction.getDirectionById(packetCustomPayload.data[0]);
+                this.playerEntity.rotationLockHorizontal = Direction.getDirectionById(packetCustomPayload.data[1]);
+                this.playerEntity.rotationLockVertical = Direction.getDirectionById(packetCustomPayload.data[2]);
+                this.playerEntity.placementModeOverride = PlacementMode.get(packetCustomPayload.data[3]);
+            }
+        } else if (PacketCustomPayload.CHANNEL_FLAG.equals(packetCustomPayload.channel)) {
+            if (packetCustomPayload.data.length == 1 + (TileEntityFlag.CANVAS_WIDTH * TileEntityFlag.CANVAS_HEIGHT) && this.playerEntity.craftingInventory instanceof MenuFlag menuFlag) {
+                TileEntityFlag flag = menuFlag.flag;
+
+                if (flag.owner == null || flag.owner.equals(this.playerEntity.uuid)) {
+                    flag.owner = this.playerEntity.uuid;
+
+                    byte header = packetCustomPayload.data[0];
 
                     boolean flipped = (header & 0b0000_0001) != 0;
 
-        			System.arraycopy(customPayloadPacket.data, 1, flag.flagColors, 0, TileEntityFlag.CANVAS_WIDTH * TileEntityFlag.CANVAS_HEIGHT);
+                    System.arraycopy(packetCustomPayload.data, 1, flag.flagColors, 0, TileEntityFlag.CANVAS_WIDTH * TileEntityFlag.CANVAS_HEIGHT);
                     flag.setFlipped(flipped);
 
-        			playerEntity.world.markBlockNeedsUpdate(flag.x, flag.y, flag.z);
-    			}else {
-                    LOGGER.warn("Player '{}' tried editing a flag that belongs to '{}'!", playerEntity.username, flag.owner);
-
-    				// Let the client know that the flag design has been rejected
-    				playerEntity.world.markBlockNeedsUpdate(flag.x, flag.y, flag.z);
-    			}
-    		}
-    	} else if (PacketCustomPayload.CHANNEL_WAND_MONSTER.equals(customPayloadPacket.channel)) {
-            if (playerEntity.getHeldItem() != null && playerEntity.getHeldItem().getItem() == Items.WAND_MONSTER_SPAWNER){
-                String id = new String(customPayloadPacket.data, StandardCharsets.UTF_8);
-                playerEntity.getHeldItem().getData().putString("monster", id);
+                    this.playerEntity.world.markBlockNeedsUpdate(flag.x, flag.y, flag.z);
+                } else {
+                    LOGGER.warn("Player '{}' tried editing a flag that belongs to '{}'!", this.playerEntity.username, flag.owner);
+
+                    // Let the client know that the flag design has been rejected
+                    this.playerEntity.world.markBlockNeedsUpdate(flag.x, flag.y, flag.z);
+                }
+            }
+        } else if (PacketCustomPayload.CHANNEL_WAND_MONSTER.equals(packetCustomPayload.channel)) {
+            if (this.playerEntity.getHeldItem() != null && this.playerEntity.getHeldItem().getItem() == Items.WAND_MONSTER_SPAWNER) {
+                String id = new String(packetCustomPayload.data, StandardCharsets.UTF_8);
+                this.playerEntity.getHeldItem().getData().putString("monster", id);
             }
         }
     }
 
     @Override
-    public void handleRequestCommandManagerPacket(PacketRequestCommandManager packet) {
+    public void handleRequestCommandManager(@NotNull PacketRequestCommandManager packet) {
         sendPacket(
             new PacketCommandManager(
-                this.mcServer.getDimensionWorld(playerEntity.dimension)
+                this.mcServer.getDimensionWorld(this.playerEntity.dimension)
                     .getCommandManager().getDispatcher(),
-                new ServerCommandSource(this.mcServer, playerEntity),
+                new ServerCommandSource(this.mcServer, this.playerEntity),
                 packet.text,
                 packet.cursor
             )
@@ -873,24 +792,9 @@ public class PacketHandlerServer extends PacketHandler
     }
 
     @Override
-    public boolean isServerHandler()
-    {
+    public boolean isServerHandler() {
         return true;
     }
 
 
-    public static Logger LOGGER = LogUtils.getLogger();
-    public NetworkManager netManager;
-    public boolean connectionClosed;
-    private final MinecraftServer mcServer;
-    private PlayerServer playerEntity;
-    private int field_15_f;
-    private int field_22004_g;
-    private int playerInAirTime;
-    private double lastPosX;
-    private double lastPosY;
-    private double lastPosZ;
-    private boolean hasMoved;
-    private final Int2ShortMap guiIdMap;
-
 }
diff --git a/game/server/src/main/java/net/minecraft/server/world/WorldManager.java b/game/server/src/main/java/net/minecraft/server/world/WorldManager.java
index a149730de..ff8482d2e 100644
--- a/game/server/src/main/java/net/minecraft/server/world/WorldManager.java
+++ b/game/server/src/main/java/net/minecraft/server/world/WorldManager.java
@@ -8,8 +8,8 @@ import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityItem;
 import net.minecraft.core.entity.player.Player;
-import net.minecraft.core.net.packet.PacketPlaySoundEffect;
-import net.minecraft.core.net.packet.PacketPlaySoundEffectDirect;
+import net.minecraft.core.net.packet.PacketPlaySound;
+import net.minecraft.core.net.packet.PacketPlaySoundDirect;
 import net.minecraft.core.sound.SoundTypes;
 import net.minecraft.core.sound.SoundCategory;
 import net.minecraft.core.world.LevelListener;
@@ -78,7 +78,7 @@ public class WorldManager
 			}
 			return;
 		}
-		PacketPlaySoundEffectDirect packet = new PacketPlaySoundEffectDirect(soundId, soundType, x, y, z, volume, pitch);
+		PacketPlaySoundDirect packet = new PacketPlaySoundDirect(soundId, soundType, x, y, z, volume, pitch);
 		float range = 16.0f;
 		if(volume > 1.0f) {
 			range *= volume;
@@ -120,6 +120,6 @@ public class WorldManager
     @Override
 	public void levelEvent(@Nullable Player player, int id, int x, int y, int z, int data)
     {
-        mcServer.playerList.sendPacketToOtherPlayersAroundPoint(player, x, y, z, 64D, worldServer.dimension.id, new PacketPlaySoundEffect(id, x, y, z, data));
+        mcServer.playerList.sendPacketToOtherPlayersAroundPoint(player, x, y, z, 64D, worldServer.dimension.id, new PacketPlaySound(id, x, y, z, data));
     }
 }
diff --git a/game/server/src/main/java/net/minecraft/server/world/WorldServer.java b/game/server/src/main/java/net/minecraft/server/world/WorldServer.java
index c38d8f486..0de63e586 100644
--- a/game/server/src/main/java/net/minecraft/server/world/WorldServer.java
+++ b/game/server/src/main/java/net/minecraft/server/world/WorldServer.java
@@ -15,7 +15,7 @@ import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.net.packet.*;
 import net.minecraft.core.world.chunk.IChunkLoader;
 import net.minecraft.core.world.chunk.provider.IChunkProvider;
-import net.minecraft.core.world.pos.TilePos;
+import net.minecraft.core.world.pos.TilePosc;
 import net.minecraft.server.world.chunk.provider.ChunkProviderServer;
 import net.minecraft.core.world.save.LevelStorage;
 import net.minecraft.core.world.type.WorldType;
@@ -63,10 +63,10 @@ public class WorldServer extends World
     }
 
     @Override
-    public boolean canMineBlock(final @NotNull Player player, final @NotNull TilePos tilePos) {
+    public boolean canMineBlock(final @NotNull Player player, final @NotNull TilePosc tilePos) {
         if (this.mcServer.spawnProtectionRange <= 0 || this.mcServer.playerList.isOp(player.uuid)) return super.canMineBlock(player, tilePos);
-        final int dx = (int)MathHelper.abs(tilePos.x - this.levelData.getSpawnX());
-        final int dz = (int)MathHelper.abs(tilePos.z - this.levelData.getSpawnZ());
+        final int dx = (int)MathHelper.abs(tilePos.x() - this.levelData.getSpawnX());
+        final int dz = (int)MathHelper.abs(tilePos.z() - this.levelData.getSpawnZ());
         return Math.max(dx, dz) > this.mcServer.spawnProtectionRange;
     }
 
@@ -209,9 +209,9 @@ public class WorldServer extends World
     }
 
     @Override
-    public void triggerEvent(final @NotNull TilePos tilePos, final int index, final int data) {
+    public void triggerEvent(final @NotNull TilePosc tilePos, final int index, final int data) {
         super.triggerEvent(tilePos, index, data);
-        mcServer.playerList.sendPacketToPlayersAroundPoint(tilePos.x, tilePos.y, tilePos.z, 64.0, dimension.id, new PacketBlockEvent(tilePos.x, tilePos.y, tilePos.z, index, data));
+        mcServer.playerList.sendPacketToPlayersAroundPoint(tilePos.x(), tilePos.y(), tilePos.z(), 64.0, dimension.id, new PacketBlockEvent(tilePos.x(), tilePos.y(), tilePos.z(), index, data));
     }
 
     public void checkLock()
diff --git a/util/logging/src/main/java/com/mojang/logging/LogUtils.java b/util/logging/src/main/java/com/mojang/logging/LogUtils.java
index 7747d8292..44820a5ec 100644
--- a/util/logging/src/main/java/com/mojang/logging/LogUtils.java
+++ b/util/logging/src/main/java/com/mojang/logging/LogUtils.java
@@ -4,6 +4,7 @@
 
 package com.mojang.logging;
 
+import org.jetbrains.annotations.NotNull;
 import org.slf4j.MarkerFactory;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
@@ -67,7 +68,7 @@ public class LogUtils
         return new ToString();
     }
     
-    public static CategorizedLogger getLogger() {
+    public static @NotNull CategorizedLogger getLogger() {
         return new CategorizedLogger(LoggerFactory.getLogger(getCallerClass().getSimpleName()));
     }
 
diff --git a/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/BTAComplexChunk.java b/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/BTAComplexChunk.java
index cde883a99..e177ad065 100644
--- a/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/BTAComplexChunk.java
+++ b/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/BTAComplexChunk.java
@@ -2,8 +2,8 @@ package org.useless.seedviewer.bta;
 
 import net.minecraft.core.block.Block;
 import net.minecraft.core.block.Blocks;
-import net.minecraft.core.block.material.Material;
 import net.minecraft.core.block.material.MaterialColor;
+import net.minecraft.core.block.material.Materials;
 import net.minecraft.core.world.biome.provider.BiomeProvider;
 import net.minecraft.core.world.pos.ChunkTilePos;
 import org.jetbrains.annotations.NotNull;
@@ -46,7 +46,7 @@ public class BTAComplexChunk implements ViewerChunk {
             if (y < 0) break;
             Block<?> b = Blocks.getBlock(this.chunk.getBlockId(new ChunkTilePos(pos.x, y, pos.z)));
             if (b == null) break;
-            if (b.getMaterial() != Material.water) break;
+            if (b.getMaterial() != Materials.WATER) break;
             depth++;
         }
         return depth;
diff --git a/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/chunk/provider/ChunkProviderSeedViewer.java b/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/chunk/provider/ChunkProviderSeedViewer.java
index 1d954c3a1..d94f0c391 100644
--- a/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/chunk/provider/ChunkProviderSeedViewer.java
+++ b/util/seed-viewer/src/main/java/org/useless/seedviewer/bta/chunk/provider/ChunkProviderSeedViewer.java
@@ -62,18 +62,19 @@ public class ChunkProviderSeedViewer
         } else {
             return;
         }
+        ChunkPos queryPos = new ChunkPos();
         this.chunks[index] = newChunk;
-        if (!this.chunks[index].isTerrainPopulated && isChunkLoaded(chunkPos.add(1, 1)) && isChunkLoaded(chunkPos.add(0, 1)) && isChunkLoaded(chunkPos.add(1, 0))) {
+        if (!this.chunks[index].isTerrainPopulated && isChunkLoaded(chunkPos.add(1, 1, queryPos)) && isChunkLoaded(chunkPos.add(0, 1, queryPos)) && isChunkLoaded(chunkPos.add(1, 0, queryPos))) {
             populate(chunkPos);
         }
-        if (isChunkLoaded(chunkPos.add(-1, 0)) && !provideChunk(chunkPos.add(-1, 0), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, 1)) && isChunkLoaded(chunkPos.add(0, 1)) && isChunkLoaded(chunkPos.add(-1, 0))) {
-            populate(chunkPos.add(-1, 0));
+        if (isChunkLoaded(chunkPos.add(-1, 0, queryPos)) && !provideChunk(chunkPos.add(-1, 0, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, 1, queryPos)) && isChunkLoaded(chunkPos.add(0, 1, queryPos)) && isChunkLoaded(chunkPos.add(-1, 0, queryPos))) {
+            populate(chunkPos.add(-1, 0, queryPos));
         }
-        if (isChunkLoaded(chunkPos.add(0, -1)) && !provideChunk(chunkPos.add(0, -1), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(1, -1)) && isChunkLoaded(chunkPos.add(0, -1)) && isChunkLoaded(chunkPos.add(1, 0))) {
-            populate(chunkPos.add(0, -1));
+        if (isChunkLoaded(chunkPos.add(0, -1, queryPos)) && !provideChunk(chunkPos.add(0, -1, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(1, -1, queryPos)) && isChunkLoaded(chunkPos.add(0, -1, queryPos)) && isChunkLoaded(chunkPos.add(1, 0, queryPos))) {
+            populate(chunkPos.add(0, -1, queryPos));
         }
-        if (isChunkLoaded(chunkPos.add(-1, -1)) && !provideChunk(chunkPos.add(-1, -1), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, -1)) && isChunkLoaded(chunkPos.add(0, -1)) && isChunkLoaded(chunkPos.add(-1, 0))) {
-            populate(chunkPos.add(-1, -1));
+        if (isChunkLoaded(chunkPos.add(-1, -1, queryPos)) && !provideChunk(chunkPos.add(-1, -1, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, -1, queryPos)) && isChunkLoaded(chunkPos.add(0, -1, queryPos)) && isChunkLoaded(chunkPos.add(-1, 0, queryPos))) {
+            populate(chunkPos.add(-1, -1, queryPos));
         }
     }
 
@@ -121,20 +122,21 @@ public class ChunkProviderSeedViewer
                     chunk = this.blankChunk;
                 }
             }
+            ChunkPos queryPos = new ChunkPos();
             this.chunks[index] = chunk;
             chunk.checkForLightGaps();
             chunk.onLoad();
-            if (!chunk.isTerrainPopulated && isChunkLoaded(chunkPos.add(1, 1)) && isChunkLoaded(chunkPos.add(0, 1)) && isChunkLoaded(chunkPos.add(1, 0))) {
+            if (!chunk.isTerrainPopulated && isChunkLoaded(chunkPos.add(1, 1, queryPos)) && isChunkLoaded(chunkPos.add(0, 1, queryPos)) && isChunkLoaded(chunkPos.add(1, 0, queryPos))) {
                 populate(chunkPos);
             }
-            if (isChunkLoaded(chunkPos.add(-1, 0)) && !provideChunk(chunkPos.add(-1, 0), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, 1)) && isChunkLoaded(chunkPos.add(0, 1)) && isChunkLoaded(chunkPos.add(-1, 0))) {
-                populate(chunkPos.add(-1, 0));
+            if (isChunkLoaded(chunkPos.add(-1, 0, queryPos)) && !provideChunk(chunkPos.add(-1, 0, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, 1, queryPos)) && isChunkLoaded(chunkPos.add(0, 1, queryPos)) && isChunkLoaded(chunkPos.add(-1, 0, queryPos))) {
+                populate(chunkPos.add(-1, 0, queryPos));
             }
-            if (isChunkLoaded(chunkPos.add(0, -1)) && !provideChunk(chunkPos.add(0, -1), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(1, -1)) && isChunkLoaded(chunkPos.add(0, -1)) && isChunkLoaded(chunkPos.add(1, 0))) {
-                populate(chunkPos.add(0, -1));
+            if (isChunkLoaded(chunkPos.add(0, -1, queryPos)) && !provideChunk(chunkPos.add(0, -1, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(1, -1, queryPos)) && isChunkLoaded(chunkPos.add(0, -1, queryPos)) && isChunkLoaded(chunkPos.add(1, 0, queryPos))) {
+                populate(chunkPos.add(0, -1, queryPos));
             }
-            if (isChunkLoaded(chunkPos.add(-1, -1)) && !provideChunk(chunkPos.add(-1, -1), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, -1)) && isChunkLoaded(chunkPos.add(0, -1)) && isChunkLoaded(chunkPos.add(-1, 0))) {
-                populate(chunkPos.add(-1, -1));
+            if (isChunkLoaded(chunkPos.add(-1, -1, queryPos)) && !provideChunk(chunkPos.add(-1, -1, queryPos), true).isTerrainPopulated && isChunkLoaded(chunkPos.add(-1, -1, queryPos)) && isChunkLoaded(chunkPos.add(0, -1, queryPos)) && isChunkLoaded(chunkPos.add(-1, 0, queryPos))) {
+                populate(chunkPos.add(-1, -1, queryPos));
             }
             if (this.world.getCurrentWeather() != null) {
                 this.world.getCurrentWeather().doChunkLoadEffect(this.world, chunk);
