Skip to content

Commit

Permalink
Port to 1.20.1 Forge (47.3.0+) (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robocraft999 authored Oct 24, 2024
1 parent f3924a2 commit af9b863
Show file tree
Hide file tree
Showing 73 changed files with 595 additions and 660 deletions.
18 changes: 10 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ repositories {

// location of the maven that hosts JEI files
maven {
name "Progwml Repo"
url "https://dvs1.progwml6.com/files/maven"
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}

// TheOneProbe
Expand All @@ -270,15 +271,16 @@ dependencies {
runtimeOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-forge:${jei_version}")

// The One Probe
implementation(fg.deobf("curse.maven:theoneprobe-245211:3927520"))
implementation(fg.deobf("curse.maven:theoneprobe-245211:4629624"))

if (!System.getenv().containsKey("CI") && include_test_mods.equals("true")) {
// Nicephore - Screenshots and Stuff
runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3879841"))
//runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3879841"))

// Testing Mods - Trash Cans, Pipez, Create, Refined Pipes, Pretty Pipes, Refined Storage
runtimeOnly(fg.deobf("curse.maven:SuperMartijn642-454372:3910759"))
runtimeOnly(fg.deobf("curse.maven:trashcans-394535:3871885"))
runtimeOnly(fg.deobf("curse.maven:SuperMartijn642Core-454372:5668859"))
runtimeOnly(fg.deobf("curse.maven:SuperMartijn642Config-438332:4715408"))
runtimeOnly(fg.deobf("curse.maven:trashcans-394535:4665996"))

// runtimeOnly(fg.deobf("curse.maven:flywheel-486392:3871082"))
// runtimeOnly(fg.deobf("curse.maven:create-328085:3737418"))
Expand All @@ -302,8 +304,8 @@ dependencies {
// runtimeOnly(fg.deobf("curse.maven:ftbchunks-314906:3780113"))

// Mekanism + Mek Generators - Tunnel testing
runtimeOnly(fg.deobf("curse.maven:mekanism-268560:3922056"))
runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:3922058"))
runtimeOnly(fg.deobf("curse.maven:mekanism-268560:5662583"))
runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:5662587"))

// Soul Shards (FTB)
// runtimeOnly(fg.deobf("curse.maven:polylib-576589:3751528"))
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=1.19.2
forge_version=43.0.8
parchment_version=2022.08.10-1.19.2
minecraft_version=1.20.1
forge_version=47.3.0
parchment_version=2023.09.03-1.20.1

mod_id=compactmachines

# Dependencies and Libs
jei_mc_version=1.19.2
jei_version=11.2.0.247
jei_mc_version=1.20.1
jei_version=15.18.0.79
#top_version=1.16-3.1.4-22

# Curseforge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public abstract class CodecExtensions {
try {
return DataResult.success(UUID.fromString(s));
} catch (Exception ex) {
return DataResult.error("Not a valid UUID: " + s + " (" + ex.getMessage() + ")");
return DataResult.error(() -> "Not a valid UUID: " + s + " (" + ex.getMessage() + ")");
}
}, UUID::toString).stable();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static DataResult<double[]> fixedDoubleSize(DoubleStream stream, int limi
double[] limited = stream.limit(limit + 1).toArray();
if (limited.length != limit) {
String s = "Input is not a list of " + limit + " doubles";
return limited.length >= limit ? DataResult.error(s, Arrays.copyOf(limited, limit)) : DataResult.error(s);
return limited.length >= limit ? DataResult.error(() -> s, Arrays.copyOf(limited, limit)) : DataResult.error(() -> s);
} else {
return DataResult.success(limited);
}
Expand All @@ -44,7 +44,7 @@ public static <T> DataResult<DoubleStream> getDoubleStream(final DynamicOps<T> o
if (list.stream().allMatch(element -> ops.getNumberValue(element).result().isPresent())) {
return DataResult.success(list.stream().mapToDouble(element -> ops.getNumberValue(element).result().get().doubleValue()));
}
return DataResult.error("Some elements are not doubles: " + input);
return DataResult.error(() -> "Some elements are not doubles: " + input);
});
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package dev.compactmods.machines.api.dimension;

import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
Expand All @@ -13,10 +15,10 @@

public abstract class CompactDimension {
public static final ResourceKey<Level> LEVEL_KEY = ResourceKey
.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(MOD_ID, "compact_world"));
.create(Registries.DIMENSION, new ResourceLocation(MOD_ID, "compact_world"));

public static final ResourceKey<DimensionType> DIM_TYPE_KEY = ResourceKey
.create(Registry.DIMENSION_TYPE_REGISTRY, new ResourceLocation(MOD_ID, "compact_world"));
.create(Registries.DIMENSION_TYPE, new ResourceLocation(MOD_ID, "compact_world"));

private CompactDimension() {}

Expand Down

This file was deleted.

Loading

0 comments on commit af9b863

Please sign in to comment.