diff --git a/src/main/java/baritone/chunk/WorldProvider.java b/src/main/java/baritone/chunk/WorldProvider.java
index 709ddff8..275b6ac1 100644
--- a/src/main/java/baritone/chunk/WorldProvider.java
+++ b/src/main/java/baritone/chunk/WorldProvider.java
@@ -18,8 +18,8 @@
package baritone.chunk;
import baritone.Baritone;
-import baritone.launch.mixins.accessor.IAnvilChunkLoader;
-import baritone.launch.mixins.accessor.IChunkProviderServer;
+import baritone.utils.accessor.IAnvilChunkLoader;
+import baritone.utils.accessor.IChunkProviderServer;
import baritone.utils.Helper;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.server.integrated.IntegratedServer;
diff --git a/src/main/java/baritone/launch/mixins/MixinAnvilChunkLoader.java b/src/main/java/baritone/launch/mixins/MixinAnvilChunkLoader.java
new file mode 100644
index 00000000..96f38b87
--- /dev/null
+++ b/src/main/java/baritone/launch/mixins/MixinAnvilChunkLoader.java
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Baritone.
+ *
+ * Baritone is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Baritone is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Baritone. If not, see .
+ */
+
+package baritone.launch.mixins;
+
+import baritone.utils.accessor.IAnvilChunkLoader;
+import net.minecraft.world.chunk.storage.AnvilChunkLoader;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+
+import java.io.File;
+
+/**
+ * @author Brady
+ * @since 9/4/2018
+ */
+@Mixin(AnvilChunkLoader.class)
+public class MixinAnvilChunkLoader implements IAnvilChunkLoader {
+
+ @Shadow @Final private File chunkSaveLocation;
+
+ @Override
+ public File getChunkSaveLocation() {
+ return this.chunkSaveLocation;
+ }
+}
diff --git a/src/main/java/baritone/launch/mixins/MixinChunkProviderServer.java b/src/main/java/baritone/launch/mixins/MixinChunkProviderServer.java
new file mode 100644
index 00000000..9a454d01
--- /dev/null
+++ b/src/main/java/baritone/launch/mixins/MixinChunkProviderServer.java
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Baritone.
+ *
+ * Baritone is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Baritone is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Baritone. If not, see .
+ */
+
+package baritone.launch.mixins;
+
+import baritone.utils.accessor.IChunkProviderServer;
+import net.minecraft.world.chunk.storage.IChunkLoader;
+import net.minecraft.world.gen.ChunkProviderServer;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+
+/**
+ * @author Brady
+ * @since 9/4/2018
+ */
+@Mixin(ChunkProviderServer.class)
+public class MixinChunkProviderServer implements IChunkProviderServer {
+
+ @Shadow @Final private IChunkLoader chunkLoader;
+
+ @Override
+ public IChunkLoader getChunkLoader() {
+ return this.chunkLoader;
+ }
+}
diff --git a/src/main/java/baritone/launch/mixins/accessor/IAnvilChunkLoader.java b/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java
similarity index 74%
rename from src/main/java/baritone/launch/mixins/accessor/IAnvilChunkLoader.java
rename to src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java
index 3972ff32..900e3fb4 100644
--- a/src/main/java/baritone/launch/mixins/accessor/IAnvilChunkLoader.java
+++ b/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java
@@ -15,11 +15,7 @@
* along with Baritone. If not, see .
*/
-package baritone.launch.mixins.accessor;
-
-import net.minecraft.world.chunk.storage.AnvilChunkLoader;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
+package baritone.utils.accessor;
import java.io.File;
@@ -27,8 +23,7 @@ import java.io.File;
* @author Brady
* @since 8/4/2018 11:36 AM
*/
-@Mixin(AnvilChunkLoader.class)
public interface IAnvilChunkLoader {
- @Accessor File getChunkSaveLocation();
+ File getChunkSaveLocation();
}
diff --git a/src/main/java/baritone/launch/mixins/accessor/IChunkProviderServer.java b/src/main/java/baritone/utils/accessor/IChunkProviderServer.java
similarity index 76%
rename from src/main/java/baritone/launch/mixins/accessor/IChunkProviderServer.java
rename to src/main/java/baritone/utils/accessor/IChunkProviderServer.java
index 460014fc..bb3dcb5e 100644
--- a/src/main/java/baritone/launch/mixins/accessor/IChunkProviderServer.java
+++ b/src/main/java/baritone/utils/accessor/IChunkProviderServer.java
@@ -15,19 +15,15 @@
* along with Baritone. If not, see .
*/
-package baritone.launch.mixins.accessor;
+package baritone.utils.accessor;
import net.minecraft.world.chunk.storage.IChunkLoader;
-import net.minecraft.world.gen.ChunkProviderServer;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
/**
* @author Brady
* @since 8/4/2018 11:33 AM
*/
-@Mixin(ChunkProviderServer.class)
public interface IChunkProviderServer {
- @Accessor IChunkLoader getChunkLoader();
+ IChunkLoader getChunkLoader();
}
diff --git a/src/main/resources/mixins.baritone.json b/src/main/resources/mixins.baritone.json
index c0b5d3bb..989c9355 100755
--- a/src/main/resources/mixins.baritone.json
+++ b/src/main/resources/mixins.baritone.json
@@ -8,7 +8,9 @@
"maxShiftBy": 2
},
"client": [
+ "MixinAnvilChunkLoader",
"MixinBlockPos",
+ "MixinChunkProviderServer",
"MixinEntity",
"MixinEntityPlayerSP",
"MixinEntityRenderer",
@@ -20,9 +22,6 @@
"MixinMinecraft",
"MixinNetHandlerPlayClient",
"MixinNetworkManager",
- "MixinWorldClient",
-
- "accessor.IAnvilChunkLoader",
- "accessor.IChunkProviderServer"
+ "MixinWorldClient"
]
}
\ No newline at end of file