Skip to content

Commit

Permalink
feat(neoforge): Update to NeoForge 20.2.86, add final pieces to make …
Browse files Browse the repository at this point in the history
…it runnable
  • Loading branch information
BlayTheNinth committed Dec 5, 2023
1 parent 744e077 commit 2a89880
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ forge_version_range=[48,)
forge_loader_version_range=[48,)

# NeoForge
neoforge_version = 20.2.59-beta
neoforge_version = 20.2.86
neoforge_version_range=[20.2,)
neoforge_loader_version_range=[1,)

Expand Down
10 changes: 4 additions & 6 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,21 @@ dependencies {
apply from: 'dependencies.gradle'

// NeoGradle compiles the game, but we don't want to add our common code to the game's code
TaskCollection.metaClass.excludingNeoTasks = { ->
delegate.matching { !it.name.startsWith("neo") }
}
Spec<Task> notNeoTask = { Task it -> !it.name.startsWith("neo") } as Spec<Task>

tasks.withType(JavaCompile).excludingNeoTasks().configureEach {
tasks.withType(JavaCompile).matching(notNeoTask).configureEach {
source(project(":shared").sourceSets.main.allSource)
}

tasks.withType(Javadoc).excludingNeoTasks().configureEach {
tasks.withType(Javadoc).matching(notNeoTask).configureEach {
source(project(":shared").sourceSets.main.allJava)
}

tasks.named("sourcesJar", Jar) {
from(project(":shared").sourceSets.main.allSource)
}

tasks.withType(ProcessResources).excludingNeoTasks().configureEach {
tasks.withType(ProcessResources).matching(notNeoTask).configureEach {
from project(":shared").sourceSets.main.resources
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ public void commonSetup(FMLCommonSetupEvent event) {
public static final Codec<BalmBiomeModifier> BALM_BIOME_MODIFIER_CODEC = Codec.unit(BalmBiomeModifier.INSTANCE);
private final Map<String, Registrations> registrations = new ConcurrentHashMap<>();

public NeoForgeBalmWorldGen() {
NeoForge.EVENT_BUS.register(this);
}

@Override
public <T extends Feature<?>> DeferredObject<T> registerFeature(ResourceLocation identifier, Supplier<T> supplier) {
final var register = DeferredRegisters.get(Registries.FEATURE, identifier.getNamespace());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.blay09.mods.balm.neoforge.NeoForgeBalmRuntimeFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.blay09.mods.balm.neoforge.client.NeoForgeBalmClientRuntimeFactory

0 comments on commit 2a89880

Please sign in to comment.