diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d0e6a12..552033a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### FIXES: ### CHANGES: -- updated to GT 1.4.1+patch.2 +- updated to GT 1.4.2 ## WIP Documentation!: diff --git a/build.gradle b/build.gradle index 1cc2ff17..3ce008d4 100644 --- a/build.gradle +++ b/build.gradle @@ -85,9 +85,18 @@ configurations { repositories { mavenLocal() + + maven { + name = 'GTCEu Maven' + url = 'https://maven.gtceu.com' + content { + includeGroup 'com.gregtechceu.gtceu' + } + } // mavens for Forge-exclusives maven { url = "https://api.modrinth.com/maven" } // Jade maven { url = "https://maven.theillusivec4.top/" } // Curios + maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu, EMI maven { // Create Forge and Registrate Forge url = "https://maven.tterrag.com/" content { @@ -158,9 +167,7 @@ dependencies { modImplementation("com.tterrag.registrate:Registrate:${forge.versions.registrate.get()}") // REI - modCompileOnly forge.rei.plugin - modCompileOnly forge.rei.api - modImplementation forge.rei.forge + modImplementation forge.emi // TOP modCompileOnly(forge.theoneprobe) { transitive = false } diff --git a/gradle.properties b/gradle.properties index 7b06ce59..a10bda1d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G -Xss4M mod_id=gcyr mod_name=Gregicality Rocketry -mod_version=0.2.2 +mod_version=0.2.3 maven_group=argent_matter loom.platform=forge diff --git a/settings.gradle b/settings.gradle index f82caf70..3f003d9c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,7 +18,7 @@ dependencyResolutionManagement { // Mod Dependencies Versions // Common - def reiVersion = "12.1.725" + def emiVersion = "1.1.13" def kjsVersion = "2001.6.4-build.120" // Forge @@ -36,8 +36,8 @@ dependencyResolutionManagement { def vineFlowerVersion = "1.+" def macheteVersion = "1.+" def configurationVersion = "2.2.0" - def gtCeuVersion = "1.4.1+patch.2" - def ldLibVersion = "1.0.27.b" + def gtCeuVersion = "1.4.2" + def ldLibVersion = "1.0.28.b" def mixinExtrasVersion = "0.2.0" def mixinVersion = "0.8.6-SNAPSHOT" @@ -52,10 +52,8 @@ dependencyResolutionManagement { def registrate = version("registrate", registrateForgeVersion) library("registrate", "com.tterrag.registrate", "Registrate").versionRef(registrate) - def rei = version("rei", reiVersion) - library("rei-plugin", "me.shedaniel", "RoughlyEnoughItems-default-plugin-forge").versionRef(rei) - library("rei-api", "me.shedaniel", "RoughlyEnoughItems-api-forge").versionRef(rei) - library("rei-forge", "me.shedaniel", "RoughlyEnoughItems-forge").versionRef(rei) + def emi = version("emi", emiVersion + "+" + minecraftVersion) + library("emi", "dev.emi", "emi-forge").versionRef(emi) def theoneprobe = version("theoneprobe", topForgeVersion) library("theoneprobe", "mcjty.theoneprobe", "theoneprobe").versionRef(theoneprobe) diff --git a/src/main/java/argent_matter/gcyr/GCYR.java b/src/main/java/argent_matter/gcyr/GCYR.java index 27134107..1d96d73e 100644 --- a/src/main/java/argent_matter/gcyr/GCYR.java +++ b/src/main/java/argent_matter/gcyr/GCYR.java @@ -18,6 +18,7 @@ import com.gregtechceu.gtceu.api.machine.MachineDefinition; import com.gregtechceu.gtceu.api.recipe.GTRecipeType; import com.gregtechceu.gtceu.api.recipe.RecipeCondition; +import com.gregtechceu.gtceu.api.recipe.condition.RecipeConditionType; import com.lowdragmc.lowdraglib.gui.factory.UIFactory; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; @@ -44,7 +45,7 @@ public GCYR() { bus.register(this); bus.addGenericListener(GTRecipeType.class, this::registerRecipeTypes); - bus.addGenericListener(Class.class, this::registerRecipeConditions); + bus.addGenericListener(RecipeConditionType.class, this::registerRecipeConditions); bus.addGenericListener(MachineDefinition.class, this::registerMachines); bus.addGenericListener(DimensionMarker.class, this::registerDimensionMarkers); GCYRDimensionTypes.register(bus); @@ -111,7 +112,7 @@ public void registerRecipeTypes(GTCEuAPI.RegisterEvent> event) { + public void registerRecipeConditions(GTCEuAPI.RegisterEvent> event) { GCYRRecipeConditions.init(); } diff --git a/src/main/java/argent_matter/gcyr/GCYRGTAddon.java b/src/main/java/argent_matter/gcyr/GCYRGTAddon.java index a0c12b04..cfa1a19c 100644 --- a/src/main/java/argent_matter/gcyr/GCYRGTAddon.java +++ b/src/main/java/argent_matter/gcyr/GCYRGTAddon.java @@ -50,7 +50,7 @@ public void registerTagPrefixes() { .registerOre(() -> GCYRBlocks.VENUS_ROCK.orElse(Blocks.DEEPSLATE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_ORANGE).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/venus_rock")); TagPrefix.oreTagPrefix("mercury", BlockTags.MINEABLE_WITH_PICKAXE) .langValue("Mercury %s Ore") - .registerOre(() -> GCYRBlocks.MERCURY_ROCK.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/moon_stone")); + .registerOre(() -> GCYRBlocks.MERCURY_ROCK.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/mercury_rock")); } @Override diff --git a/src/main/java/argent_matter/gcyr/common/data/GCYRBlocks.java b/src/main/java/argent_matter/gcyr/common/data/GCYRBlocks.java index 72fb62c3..4daec2cb 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCYRBlocks.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCYRBlocks.java @@ -402,7 +402,6 @@ public class GCYRBlocks { .build() .register(); - // erm what the sigma public static final BlockEntry PRB_SHROOM = REGISTRATE .block("prb_underground_mushroom", (p) -> new MushroomBlock(p, null /*todo fix*/)) .initialProperties(() -> Blocks.BROWN_MUSHROOM) diff --git a/src/main/java/argent_matter/gcyr/common/data/GCYRRecipeConditions.java b/src/main/java/argent_matter/gcyr/common/data/GCYRRecipeConditions.java index 673c1347..dd42def5 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCYRRecipeConditions.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCYRRecipeConditions.java @@ -2,12 +2,15 @@ import argent_matter.gcyr.common.recipe.condition.DysonSphereCondition; import argent_matter.gcyr.common.recipe.condition.OrbitCondition; +import com.gregtechceu.gtceu.api.recipe.condition.RecipeConditionType; import com.gregtechceu.gtceu.api.registry.GTRegistries; public class GCYRRecipeConditions { - public static void init() { - GTRegistries.RECIPE_CONDITIONS.register(DysonSphereCondition.INSTANCE.getType(), DysonSphereCondition.class); - GTRegistries.RECIPE_CONDITIONS.register(OrbitCondition.INSTANCE.getType(), OrbitCondition.class); - } + public static final RecipeConditionType DYSON_SPHERE = GTRegistries.RECIPE_CONDITIONS.register("dyson_sphere", + new RecipeConditionType<>(DysonSphereCondition::new, DysonSphereCondition.CODEC)); + public static final RecipeConditionType ORBIT = GTRegistries.RECIPE_CONDITIONS.register("orbit", + new RecipeConditionType<>(OrbitCondition::new, OrbitCondition.CODEC)); + + public static void init() {} } diff --git a/src/main/java/argent_matter/gcyr/common/recipe/condition/DysonSphereCondition.java b/src/main/java/argent_matter/gcyr/common/recipe/condition/DysonSphereCondition.java index 0d446ad0..fe77d88b 100644 --- a/src/main/java/argent_matter/gcyr/common/recipe/condition/DysonSphereCondition.java +++ b/src/main/java/argent_matter/gcyr/common/recipe/condition/DysonSphereCondition.java @@ -2,9 +2,14 @@ import argent_matter.gcyr.api.capability.GCYRCapabilityHelper; import argent_matter.gcyr.api.capability.IDysonSystem; +import argent_matter.gcyr.common.data.GCYRRecipeConditions; import com.gregtechceu.gtceu.api.machine.trait.RecipeLogic; import com.gregtechceu.gtceu.api.recipe.GTRecipe; import com.gregtechceu.gtceu.api.recipe.RecipeCondition; +import com.gregtechceu.gtceu.api.recipe.condition.RecipeConditionType; +import com.gregtechceu.gtceu.common.recipe.condition.AdjacentBlockCondition; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import lombok.NoArgsConstructor; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; @@ -13,11 +18,17 @@ @NoArgsConstructor public class DysonSphereCondition extends RecipeCondition { + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> RecipeCondition.isReverse(instance).apply(instance, DysonSphereCondition::new)); public final static DysonSphereCondition INSTANCE = new DysonSphereCondition(); + public DysonSphereCondition(boolean isReverse) { + super(isReverse); + } + @Override - public String getType() { - return "dyson_sphere"; + public RecipeConditionType getType() { + return GCYRRecipeConditions.DYSON_SPHERE; } @Override diff --git a/src/main/java/argent_matter/gcyr/common/recipe/condition/OrbitCondition.java b/src/main/java/argent_matter/gcyr/common/recipe/condition/OrbitCondition.java index 5c1426cc..ede2c9ec 100644 --- a/src/main/java/argent_matter/gcyr/common/recipe/condition/OrbitCondition.java +++ b/src/main/java/argent_matter/gcyr/common/recipe/condition/OrbitCondition.java @@ -2,11 +2,15 @@ import argent_matter.gcyr.GCYRClient; import argent_matter.gcyr.common.data.GCYRNetworking; +import argent_matter.gcyr.common.data.GCYRRecipeConditions; import argent_matter.gcyr.common.networking.c2s.PacketRequestPlanetData; import argent_matter.gcyr.data.loader.PlanetData; import com.gregtechceu.gtceu.api.machine.trait.RecipeLogic; import com.gregtechceu.gtceu.api.recipe.GTRecipe; import com.gregtechceu.gtceu.api.recipe.RecipeCondition; +import com.gregtechceu.gtceu.api.recipe.condition.RecipeConditionType; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import lombok.NoArgsConstructor; import net.minecraft.network.chat.Component; import net.minecraft.world.level.Level; @@ -14,11 +18,17 @@ @NoArgsConstructor public class OrbitCondition extends RecipeCondition { + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> RecipeCondition.isReverse(instance).apply(instance, OrbitCondition::new)); public final static OrbitCondition INSTANCE = new OrbitCondition(); + public OrbitCondition(boolean isReverse) { + super(isReverse); + } + @Override - public String getType() { - return "orbit"; + public RecipeConditionType getType() { + return GCYRRecipeConditions.ORBIT; } @Override