diff --git a/build.gradle b/build.gradle index bc66428..9cc0b04 100644 --- a/build.gradle +++ b/build.gradle @@ -3,4 +3,4 @@ plugins { id 'com.gtnewhorizons.gtnhconvention' } -version = "1.5.3" +version = "1.5.4" diff --git a/dependencies.gradle b/dependencies.gradle index b470f13..c1053f4 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,4 +35,5 @@ */ dependencies { runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev") + implementation name: "+Mycelium-1.5.10-dev" } diff --git a/libs/+Mycelium-1.5.10-dev.jar b/libs/+Mycelium-1.5.10-dev.jar new file mode 100644 index 0000000..9d4b494 Binary files /dev/null and b/libs/+Mycelium-1.5.10-dev.jar differ diff --git a/repositories.gradle b/repositories.gradle index 7e002f2..cbefb1d 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,5 +1,7 @@ // Add any additional repositories for your dependencies here. repositories { - + flatDir { + dirs 'libs' + } } diff --git a/src/main/java/mods/tesseract/worleycaves/Main.java b/src/main/java/mods/tesseract/worleycaves/Main.java index e94beb8..e2edc96 100644 --- a/src/main/java/mods/tesseract/worleycaves/Main.java +++ b/src/main/java/mods/tesseract/worleycaves/Main.java @@ -11,7 +11,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@Mod(modid = "worleycaves", name = "Worley Caves", version = "1.5.3", acceptableRemoteVersions = "*") +@Mod(modid = "worleycaves", name = "Worley Caves", version = "1.5.4", acceptableRemoteVersions = "*", dependencies = "required-after:mycelium@[1.5.10,)") public class Main { public static final Logger LOGGER = LogManager.getLogger("worleycaves"); diff --git a/src/main/java/mods/tesseract/worleycaves/util/BlockPos.java b/src/main/java/mods/tesseract/worleycaves/util/BlockPos.java deleted file mode 100644 index 5c93755..0000000 --- a/src/main/java/mods/tesseract/worleycaves/util/BlockPos.java +++ /dev/null @@ -1,27 +0,0 @@ -package mods.tesseract.worleycaves.util; - -public class BlockPos { - - public final int x; - public final int y; - public final int z; - - public BlockPos(int x, int y, int z) { - this.x = x; - this.y = y; - this.z = z; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof BlockPos pos) { - return pos.x == x && pos.y == y && pos.z == z; - } - return false; - } - - @Override - public int hashCode() { - return x + 31 * (y + 31 * z); - } -} diff --git a/src/main/java/mods/tesseract/worleycaves/world/ChunkPrimer.java b/src/main/java/mods/tesseract/worleycaves/world/ChunkPrimer.java deleted file mode 100644 index cc7ba80..0000000 --- a/src/main/java/mods/tesseract/worleycaves/world/ChunkPrimer.java +++ /dev/null @@ -1,50 +0,0 @@ -package mods.tesseract.worleycaves.world; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; - -public class ChunkPrimer { - private static final Block DEFAULT_STATE = Blocks.air; - public final Block[] data; - - public ChunkPrimer(Block[] data) { - this.data = data; - } - - public Block getBlockState(int x, int y, int z) - { - Block block = this.data[getBlockIndex(x, y, z)]; - return block == null ? DEFAULT_STATE : block; - } - - public void setBlockState(int x, int y, int z, Block block) - { - this.data[getBlockIndex(x, y, z)] = block; - } - - private static int getBlockIndex(int x, int y, int z) - { - return x << 12 | z << 8 | y; - } - - /** - * Counting down from the highest block in the sky, find the first non-air block for the given location - * (actually, looks like mostly checks x, z+1? And actually checks only the very top sky block of actual x, z) - */ - public int findGroundBlockIdx(int x, int z) - { - int i = (x << 12 | z << 8) + 256 - 1; - - for (int j = 255; j >= 0; --j) - { - Block block = this.data[i + j]; - - if (block != null && block != DEFAULT_STATE) - { - return j; - } - } - - return 0; - } -} diff --git a/src/main/java/mods/tesseract/worleycaves/world/WorleyCaveGenerator.java b/src/main/java/mods/tesseract/worleycaves/world/WorleyCaveGenerator.java index eae4888..cf4f9f5 100644 --- a/src/main/java/mods/tesseract/worleycaves/world/WorleyCaveGenerator.java +++ b/src/main/java/mods/tesseract/worleycaves/world/WorleyCaveGenerator.java @@ -1,9 +1,10 @@ package mods.tesseract.worleycaves.world; +import mods.tesseract.mycelium.util.BlockPos; +import mods.tesseract.mycelium.world.ChunkPrimer; import mods.tesseract.worleycaves.Main; import mods.tesseract.worleycaves.config.Configs; -import mods.tesseract.worleycaves.util.BlockPos; import mods.tesseract.worleycaves.util.FastNoise; import mods.tesseract.worleycaves.util.WorleyUtil; import net.minecraft.block.Block;