diff --git a/dependencies.gradle b/dependencies.gradle index 1f2af37e..db93d1e1 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,7 +1,7 @@ elytraModpackVersion { // 在这配置的gtnh版本 用于自动拉取依赖版本 - gtnhVersion = "2.8.0" + gtnhVersion = "2.8.4" // 是否不缓存拉取的依赖清单文件 manifestNoCache = false // 是否自动为输出的jar添加 `gtnhVersion` 后缀 @@ -21,8 +21,7 @@ dependencies { implementation(gtnhDev("Avaritia")) implementation(gtnhDev("Avaritiaddons")) implementation(gtnhDev("neiaddons")) - implementation('com.github.GTNewHorizons:Binnie:2.5.16:dev') -// implementation(gtnhDev("Binnie")) + implementation(gtnhDev("Binnie")) implementation(gtnhDev("BloodMagic")) implementation(gtnhDev("Botania")) implementation(gtnhDev("Draconic-Evolution")) @@ -53,6 +52,11 @@ dependencies { configurations.configureEach { exclude group: 'com.github.GTNewHorizons', module: 'Baubles' } + configurations.all { + resolutionStrategy { + force "com.github.GTNewHorizons:GTNHLib:0.7.10" + } + } } diff --git a/gradle.properties b/gradle.properties index 4d973cbd..ef0a0a42 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,10 +14,10 @@ modId = othtech modGroup = com.newmaa.othtech # Whether to use modGroup as the maven publishing group. -# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods. +# When false, com.github.GTNewHorizons is used. useModGroupForPublishing = false -# Updates your build.gradle.kts and settings.gradle automatically whenever an update is available. +# Updates your build.gradle and settings.gradle automatically whenever an update is available. autoUpdateBuildScript = false # Version of Minecraft to target @@ -87,14 +87,15 @@ usesMixins = true # Mixin classes will have access to "main" classes, but not the other way around. separateMixinSourceSet = -# look dependencies notes about -> supersolarpanels # Adds some debug arguments like verbose output and class export. usesMixinDebug = true # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. mixinPlugin = -# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +# Specify the package that contains all of your Mixins. The package must exist or +# the build will fail. If you have a package property defined in your mixins..json, +# it must match with this or the build will fail. mixinsPackage = Mixins # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! @@ -149,7 +150,7 @@ modrinthProjectId = # type can be one of [project, version], # and the name is the Modrinth project or version slug/id of the other mod. # Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech -# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true +# Note: UniMixins is automatically set as a required dependency if usesMixins = true. modrinthRelations = # Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. @@ -170,6 +171,12 @@ curseForgeRelations = # projects. New projects should not use this parameter. customArchiveBaseName = OTHTechnology +# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory. +# runClientWorkingDirectory = run/client + +# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory. +# runServerWorkingDirectory = run/server + # Optional parameter to have the build automatically fail if an illegal version is used. # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # The check is ONLY performed if the version is a git tag. @@ -198,3 +205,4 @@ customArchiveBaseName = OTHTechnology # Whether IDEA should run spotless checks when pressing the Build button. # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2b..5fbde863 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,10 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +<<<<<<< BlueDog_NewMachines +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +======= distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +>>>>>>> main networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index e013a70c..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -1,6 +1,5 @@ #!/bin/sh - # # Copyright © 2015-2021 the original authors. # diff --git a/settings.gradle b/settings.gradle index bf14114d..f7771925 100644 --- a/settings.gradle +++ b/settings.gradle @@ -23,5 +23,9 @@ pluginManagement { } plugins { +<<<<<<< BlueDog_NewMachines + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.51' +======= id("com.gtnewhorizons.gtnhsettingsconvention") version("2.0.7") +>>>>>>> main } diff --git a/src/main/java/com/newmaa/othtech/CommonProxy.java b/src/main/java/com/newmaa/othtech/CommonProxy.java index c4a66920..2d280563 100644 --- a/src/main/java/com/newmaa/othtech/CommonProxy.java +++ b/src/main/java/com/newmaa/othtech/CommonProxy.java @@ -41,7 +41,10 @@ public void init(FMLInitializationEvent event) { // postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed) public void postInit(FMLPostInitializationEvent event) { - + // TODO with the galacticgreg Modcontainer + /* + * new GTWorldGenLoader().run(); + */ } // register server commands in this event handler (Remove if not needed) diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/RegisterDimensions.java b/src/main/java/com/newmaa/othtech/common/dimensions/RegisterDimensions.java index 892508a0..cb306ec0 100644 --- a/src/main/java/com/newmaa/othtech/common/dimensions/RegisterDimensions.java +++ b/src/main/java/com/newmaa/othtech/common/dimensions/RegisterDimensions.java @@ -50,6 +50,5 @@ public void init() { planetRoss123b.setDimensionInfo(ID_DIM + 1, WorldProviderRoss123b.class); GalaxyRegistry.registerPlanet(planetRoss123b); GalacticraftRegistry.registerTeleportType(WorldProviderRoss123b.class, new WorldProviderRoss123b()); - } } diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionBlockMetaDefList.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionBlockMetaDefList.java new file mode 100644 index 00000000..1bb4124d --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionBlockMetaDefList.java @@ -0,0 +1,24 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.init.Blocks; + +import org.jetbrains.annotations.NotNull; + +import com.newmaa.othtech.common.blocks.antimonia.AntimoniaBlocks; + +import galacticgreg.api.ModDBMDef; + +public enum EnumDimensionBlockMetaDefList { + + Antimonia(new ModDBMDef(AntimoniaBlocks.antimoniaBlockStone)), + Ross123b(new ModDBMDef(Blocks.quartz_block)); + + public final @NotNull List DBMDefList; + + EnumDimensionBlockMetaDefList(ModDBMDef... DBMDefArray) { + DBMDefList = Arrays.asList(DBMDefArray); + } +} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionDefOTH.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionDefOTH.java new file mode 100644 index 00000000..be5c8775 --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumDimensionDefOTH.java @@ -0,0 +1,31 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +import galacticgreg.api.Enums; +import galacticgreg.api.ModDimensionDef; + +public enum EnumDimensionDefOTH { + + ROSS123B(new ModDimensionDef( + EnumDimensionDefOTH.DimNames.ROSS123B, + "newmaa.othtech.common.dimensions.ross123b.ChunkProviderRoss123b", + Enums.DimensionType.Planet, + EnumDimensionBlockMetaDefList.Ross123b.DBMDefList)), + ANTIMONIA(new ModDimensionDef( + EnumDimensionDefOTH.DimNames.ANTIMONIA, + "newmaa.othtech.common.dimensions.ross123b.ChunkProviderAntimonia", + Enums.DimensionType.Planet, + EnumDimensionBlockMetaDefList.Antimonia.DBMDefList)); + + public static class DimNames { + + public static final String ANTIMONIA = "Antimonia"; + public static final String ROSS123B = "Ross123b"; + + } + + public final ModDimensionDef enumDimensionDefOTH; + + EnumDimensionDefOTH(ModDimensionDef modDimDef) { + this.enumDimensionDefOTH = modDimDef; + } +} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumGTOreMixes.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumGTOreMixes.java new file mode 100644 index 00000000..09d361f9 --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumGTOreMixes.java @@ -0,0 +1,37 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +import static com.newmaa.othtech.common.dimensions.gtoregen.EnumDimensionDefOTH.DimNames.ANTIMONIA; +import static galacticgreg.api.enums.DimensionDef.*; + +import galacticgreg.WorldgenOreLayerSpace; +import gregtech.api.enums.Materials; +import gregtech.common.OreMixBuilder; +import gregtech.common.WorldgenGTOreLayer; + +public enum EnumGTOreMixes { + + Antimony(new OreMixBuilder().name("ore.mix.antimony") + .heightRange(0, 90) + .weight(30) + .density(10) + .size(40) + .enableInDim(ANTIMONIA) + .primary(Materials.Antimony) + .secondary(Materials.Niobium) + .inBetween(Materials.Sulfur) + .sporadic(Materials.Boron)); + + public final OreMixBuilder oreMixBuilder; + + EnumGTOreMixes(OreMixBuilder oreMixBuilder) { + this.oreMixBuilder = oreMixBuilder; + } + + public WorldgenGTOreLayer addGTOreLayer() { + return new WorldgenGTOreLayer(this.oreMixBuilder); + } + + public WorldgenOreLayerSpace addGaGregOreLayer() { + return new WorldgenOreLayerSpace(this.oreMixBuilder); + } +} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumModContainers.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumModContainers.java new file mode 100644 index 00000000..dfb81a6d --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/EnumModContainers.java @@ -0,0 +1,3 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +public enum EnumModContainers {} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTOreGeneratorOTH.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTOreGeneratorOTH.java new file mode 100644 index 00000000..339be14d --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTOreGeneratorOTH.java @@ -0,0 +1,11 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +import gregtech.common.OreMixBuilder; +import gregtech.common.WorldgenGTOreLayer; + +public class GTOreGeneratorOTH extends WorldgenGTOreLayer { + + public GTOreGeneratorOTH(OreMixBuilder mix) { + super(mix); + } +} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTWorldGenLoader.java b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTWorldGenLoader.java new file mode 100644 index 00000000..48ef9256 --- /dev/null +++ b/src/main/java/com/newmaa/othtech/common/dimensions/gtoregen/GTWorldGenLoader.java @@ -0,0 +1,14 @@ +package com.newmaa.othtech.common.dimensions.gtoregen; + +public class GTWorldGenLoader implements Runnable { + + @Override + public void run() { + for (EnumGTOreMixes oreMix : EnumGTOreMixes.values()) { + oreMix.addGTOreLayer(); + } + for (EnumGTOreMixes mix : EnumGTOreMixes.values()) { + mix.addGaGregOreLayer(); + } + } +} diff --git a/src/main/java/com/newmaa/othtech/common/dimensions/ross123b/ChunkProviderRoss123b.java b/src/main/java/com/newmaa/othtech/common/dimensions/ross123b/ChunkProviderRoss123b.java index e608d9b5..dcfb88fd 100644 --- a/src/main/java/com/newmaa/othtech/common/dimensions/ross123b/ChunkProviderRoss123b.java +++ b/src/main/java/com/newmaa/othtech/common/dimensions/ross123b/ChunkProviderRoss123b.java @@ -85,7 +85,7 @@ public void populate(IChunkProvider provider, int chunkX, int chunkZ) { Random rand = new Random(world.getSeed() + (chunkX * 341873128712L) + (chunkZ * 132897987541L)); buildingMapGen.generateStructuresInChunk(this.world, rand, chunkX, chunkZ); int roadWidth = 5; - int spacingBlocks = 40 + roadWidth; // 大楼 + 道路间隔 + int spacingBlocks = 40 + roadWidth; boolean roadX = ((worldX % spacingBlocks + spacingBlocks) % spacingBlocks) < roadWidth; boolean roadZ = ((worldZ % spacingBlocks + spacingBlocks) % spacingBlocks) < roadWidth; if (roadX || roadZ) { diff --git a/src/main/java/com/newmaa/othtech/utils/modsEnum.java b/src/main/java/com/newmaa/othtech/utils/modsEnum.java index e674f8f8..2c366b7f 100644 --- a/src/main/java/com/newmaa/othtech/utils/modsEnum.java +++ b/src/main/java/com/newmaa/othtech/utils/modsEnum.java @@ -11,11 +11,13 @@ public enum modsEnum { TwistSpaceTechnology(modsID.TST), NHUtilities(modsID.NHU), ET_Futurum(modsID.ET_Futurum), + OTHTechnology(modsID.OTHTechnology), GTNN(modsID.GTNN); public static class modsID { public static final String TST = "TwistSpaceTechnology"; + public static final String OTHTechnology = "123Technology"; public static final String NHU = "NHUtilities"; public static final String ET_Futurum = "etfuturum"; public static final String GTNN = "gtnn";