--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -1,3 +1,4 @@
+// mc-dev import
 package net.minecraft.world.level.chunk.storage;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -57,8 +58,8 @@
         } else {
             this.externalFileDir = path1;
             this.offsets = this.header.asIntBuffer();
-            this.offsets.limit(1024);
-            this.header.position(4096);
+            ((java.nio.Buffer) this.offsets).limit(1024); // CraftBukkit - decompile error
+            ((java.nio.Buffer) this.header).position(4096); // CraftBukkit - decompile error
             this.timestamps = this.header.asIntBuffer();
             if (flag) {
                 this.file = FileChannel.open(path, StandardOpenOption.CREATE, StandardOpenOption.READ, StandardOpenOption.WRITE, StandardOpenOption.DSYNC);
@@ -67,7 +68,7 @@
             }
 
             this.usedSectors.force(0, 2);
-            this.header.position(0);
+            ((java.nio.Buffer) this.header).position(0); // CraftBukkit - decompile error
             int i = this.file.read(this.header, 0L);
 
             if (i != -1) {
@@ -122,7 +123,7 @@
             ByteBuffer bytebuffer = ByteBuffer.allocate(l);
 
             this.file.read(bytebuffer, (long) (j * 4096));
-            bytebuffer.flip();
+            ((java.nio.Buffer) bytebuffer).flip(); // CraftBukkit - decompile error
             if (bytebuffer.remaining() < 5) {
                 RegionFile.LOGGER.error("Chunk {} header is truncated: expected {} but read {}", new Object[]{chunkcoordintpair, l, bytebuffer.remaining()});
                 return null;
@@ -224,7 +225,7 @@
 
             try {
                 this.file.read(bytebuffer, (long) (j * 4096));
-                bytebuffer.flip();
+                ((java.nio.Buffer) bytebuffer).flip(); // CraftBukkit - decompile error
                 if (bytebuffer.remaining() != 5) {
                     return false;
                 } else {
@@ -327,7 +328,7 @@
 
         bytebuffer.putInt(1);
         bytebuffer.put((byte) (this.version.getId() | 128));
-        bytebuffer.flip();
+        ((java.nio.Buffer) bytebuffer).flip(); // CraftBukkit - decompile error
         return bytebuffer;
     }
 
@@ -336,7 +337,7 @@
         FileChannel filechannel = FileChannel.open(path1, StandardOpenOption.CREATE, StandardOpenOption.WRITE);
 
         try {
-            bytebuffer.position(5);
+            ((java.nio.Buffer) bytebuffer).position(5); // CraftBukkit - decompile error
             filechannel.write(bytebuffer);
         } catch (Throwable throwable) {
             if (filechannel != null) {
@@ -360,7 +361,7 @@
     }
 
     private void writeHeader() throws IOException {
-        this.header.position(0);
+        ((java.nio.Buffer) this.header).position(0); // CraftBukkit - decompile error
         this.file.write(this.header, 0L);
     }
 
@@ -396,7 +397,7 @@
         if (i != j) {
             ByteBuffer bytebuffer = RegionFile.PADDING_BUFFER.duplicate();
 
-            bytebuffer.position(0);
+            ((java.nio.Buffer) bytebuffer).position(0); // CraftBukkit - decompile error
             this.file.write(bytebuffer, (long) (j - 1));
         }
 
