diff --git a/build.gradle b/build.gradle index ef99b56..2619c88 100644 --- a/build.gradle +++ b/build.gradle @@ -68,14 +68,14 @@ run { dependencies { implementation('com.github.KaptainWutax:MathUtils:5531c4a87b0f1bb85d1dab2bdd18ce375400626a') { transitive = false } implementation('com.github.KaptainWutax:SeedUtils:b6a383113ce5d8d09a59e91b28ff064fb97c0709') { transitive = false } - implementation('com.github.KaptainWutax:MCUtils:ada314031f913553ed23f3fc466082418e95b3bb') { transitive = false } - implementation('com.github.KaptainWutax:NoiseUtils:4e17e706b685f717782e0bc270c31ea99816b4ec') { transitive = false } + implementation('com.github.KaptainWutax:MCUtils:96545bc961eb5d51e18ec2b0cf6c5ce731899b0c') { transitive = false } + implementation('com.github.KaptainWutax:NoiseUtils:49d64c336a099086c627d2391760134ebd81292f') { transitive = false } - implementation('com.github.KaptainWutax:BiomeUtils:1499dca90e2c029249c4af5a842380240dcecee0') { transitive = false } - implementation('com.github.KaptainWutax:TerrainUtils:208176943c050d13aac11896995890eec81c6d2c') { transitive = false } - implementation('com.github.KaptainWutax:FeatureUtils:778372168e5a187c343f6864363e0e5c9a4c172d') { transitive = false } + implementation('com.github.KaptainWutax:BiomeUtils:c0aa2f0e4974c2b4bc23e38f2ce503983ce4564d') { transitive = false } + implementation('com.github.KaptainWutax:TerrainUtils:5e0c4033bb97b5d5d6849fffe826fc32f05ec116') { transitive = false } + implementation('com.github.KaptainWutax:FeatureUtils:993693c27a1d4b9c417746119952d1b1bc4ba81b') { transitive = false } - testImplementation('com.github.KaptainWutax:ChunkRandomReversal:3fc82aab792d811fb296dcc28fe7177ac80c31f0') {transitive = false} + testImplementation('com.github.KaptainWutax:ChunkRandomReversal:6b76fb5cf2cd438de56e6a46cea2a83985831834') { transitive = false } implementation('com.seedfinding:latticg:1.05') implementation('com.google.code.gson:gson:2.8.6') diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf..05679dc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/kaptainwutax/minemap/config/IconsConfig.java b/src/main/java/kaptainwutax/minemap/config/IconsConfig.java index d72e3bf..6ae512e 100644 --- a/src/main/java/kaptainwutax/minemap/config/IconsConfig.java +++ b/src/main/java/kaptainwutax/minemap/config/IconsConfig.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.Expose; import kaptainwutax.featureutils.decorator.EndGateway; import kaptainwutax.featureutils.misc.SlimeChunk; +import kaptainwutax.featureutils.misc.SpawnPoint; import kaptainwutax.featureutils.structure.*; import kaptainwutax.minemap.feature.*; import kaptainwutax.minemap.init.Logger; diff --git a/src/main/java/kaptainwutax/minemap/feature/SpawnPoint.java b/src/main/java/kaptainwutax/minemap/feature/SpawnPoint.java deleted file mode 100644 index 0a5b06f..0000000 --- a/src/main/java/kaptainwutax/minemap/feature/SpawnPoint.java +++ /dev/null @@ -1,70 +0,0 @@ -package kaptainwutax.minemap.feature; - -import kaptainwutax.biomeutils.source.BiomeSource; -import kaptainwutax.biomeutils.source.OverworldBiomeSource; -import kaptainwutax.featureutils.Feature; -import kaptainwutax.mcutils.rand.ChunkRand; -import kaptainwutax.mcutils.state.Dimension; -import kaptainwutax.mcutils.util.pos.BPos; -import kaptainwutax.terrainutils.TerrainGenerator; -import kaptainwutax.terrainutils.terrain.OverworldTerrainGenerator; - -public class SpawnPoint extends Feature { - - public SpawnPoint() { - super(new Config(), null); - } - - public static String name() { - return "spawn"; - } - - @Override - public String getName() { - return name(); - } - - @Override - public boolean canStart(SpawnPoint.Data data, long structureSeed, ChunkRand rand) { - throw new UnsupportedOperationException("Spawn depends on biomes!"); - } - - @Override - public boolean canSpawn(SpawnPoint.Data data, BiomeSource source) { - if (source instanceof OverworldBiomeSource) { - Context context=this.getContext(source.getWorldSeed()); - if (context.getGenerator()!=null){ - BPos spawn=new kaptainwutax.featureutils.misc.SpawnPoint((OverworldTerrainGenerator) context.getGenerator()).getSpawnPoint(); - return data.blockX == spawn.getX() && data.blockZ == spawn.getZ(); - } - } - - return false; - } - - @Override - public boolean canGenerate(Data data, TerrainGenerator generator) { - return true; - } - - @Override - public Dimension getValidDimension() { - return Dimension.OVERWORLD; - } - -// public BPos get(BiomeSource source) { -// return source instanceof OverworldBiomeSource ? ((OverworldBiomeSource) source).getSpawnPoint() : null; -// } - - public static class Data extends Feature.Data { - public final int blockX; - public final int blockZ; - - public Data(SpawnPoint feature, int blockX, int blockZ) { - super(feature, blockX >> 4, blockZ >> 4); - this.blockX = blockX; - this.blockZ = blockZ; - } - } - -} diff --git a/src/main/java/kaptainwutax/minemap/init/Features.java b/src/main/java/kaptainwutax/minemap/init/Features.java index b137f92..8bc6d8c 100644 --- a/src/main/java/kaptainwutax/minemap/init/Features.java +++ b/src/main/java/kaptainwutax/minemap/init/Features.java @@ -3,6 +3,7 @@ import kaptainwutax.featureutils.Feature; import kaptainwutax.featureutils.decorator.EndGateway; import kaptainwutax.featureutils.misc.SlimeChunk; +import kaptainwutax.featureutils.misc.SpawnPoint; import kaptainwutax.featureutils.structure.*; import kaptainwutax.mcutils.version.MCVersion; import kaptainwutax.minemap.feature.*; @@ -46,7 +47,7 @@ public static void registerFeatures() { register(EndGateway.class, EndGateway::new); register(SlimeChunk.class, SlimeChunk::new); - register(SpawnPoint.class, v -> new SpawnPoint()); + register(SpawnPoint.class, v-> new SpawnPoint()); } public static > void register(Class clazz, FeatureFactory factory) { diff --git a/src/main/java/kaptainwutax/minemap/init/Icons.java b/src/main/java/kaptainwutax/minemap/init/Icons.java index 3d676cf..6027a19 100644 --- a/src/main/java/kaptainwutax/minemap/init/Icons.java +++ b/src/main/java/kaptainwutax/minemap/init/Icons.java @@ -4,6 +4,7 @@ import kaptainwutax.featureutils.loot.item.Item; import kaptainwutax.featureutils.loot.item.Items; import kaptainwutax.featureutils.misc.SlimeChunk; +import kaptainwutax.featureutils.misc.SpawnPoint; import kaptainwutax.featureutils.structure.*; import kaptainwutax.mcutils.util.data.Pair; import kaptainwutax.mcutils.version.MCVersion; diff --git a/src/main/java/kaptainwutax/minemap/ui/map/icon/SpawnIcon.java b/src/main/java/kaptainwutax/minemap/ui/map/icon/SpawnIcon.java index a089299..97823de 100644 --- a/src/main/java/kaptainwutax/minemap/ui/map/icon/SpawnIcon.java +++ b/src/main/java/kaptainwutax/minemap/ui/map/icon/SpawnIcon.java @@ -1,10 +1,8 @@ package kaptainwutax.minemap.ui.map.icon; -import kaptainwutax.biomeutils.source.BiomeSource; -import kaptainwutax.biomeutils.source.OverworldBiomeSource; import kaptainwutax.featureutils.Feature; +import kaptainwutax.featureutils.misc.SpawnPoint; import kaptainwutax.mcutils.util.pos.BPos; -import kaptainwutax.minemap.feature.SpawnPoint; import kaptainwutax.minemap.ui.map.MapContext; import kaptainwutax.minemap.ui.map.fragment.Fragment; import kaptainwutax.terrainutils.TerrainGenerator; @@ -19,7 +17,7 @@ public class SpawnIcon extends StaticIcon { public SpawnIcon(MapContext context) { super(context); TerrainGenerator generator = this.getContext().getTerrainGenerator(); - this.pos = generator instanceof OverworldTerrainGenerator ? kaptainwutax.featureutils.misc.SpawnPoint.getSpawnPoint((OverworldTerrainGenerator) generator) : null; + this.pos = generator instanceof OverworldTerrainGenerator ? SpawnPoint.getSpawn((OverworldTerrainGenerator) generator) : null; } public BPos getPos() { diff --git a/src/main/java/kaptainwutax/minemap/ui/menubar/WorldMenu.java b/src/main/java/kaptainwutax/minemap/ui/menubar/WorldMenu.java index 35fee58..8f9c1f8 100644 --- a/src/main/java/kaptainwutax/minemap/ui/menubar/WorldMenu.java +++ b/src/main/java/kaptainwutax/minemap/ui/menubar/WorldMenu.java @@ -1,10 +1,10 @@ package kaptainwutax.minemap.ui.menubar; +import kaptainwutax.featureutils.misc.SpawnPoint; import kaptainwutax.mcutils.rand.seed.WorldSeed; import kaptainwutax.mcutils.state.Dimension; import kaptainwutax.mcutils.util.pos.BPos; import kaptainwutax.minemap.MineMap; -import kaptainwutax.minemap.feature.SpawnPoint; import kaptainwutax.minemap.init.KeyShortcuts; import kaptainwutax.minemap.init.Logger; import kaptainwutax.minemap.listener.Events;