Skip to content

Commit

Permalink
Bump neo stuff, datagen pls
Browse files Browse the repository at this point in the history
  • Loading branch information
robotgryphon committed Jun 17, 2024
1 parent dcc4a5b commit 3cd084c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
6 changes: 6 additions & 0 deletions neoforge-datagen/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.slf4j.event.Level

plugins {
id("java")
id("eclipse")
Expand Down Expand Up @@ -28,6 +30,10 @@ neoForge {
}

this.runs {
configureEach {
logLevel.set(Level.DEBUG)
}

create("data") {
data()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@
import dev.compactmods.machines.datagen.tags.PointOfInterestTagGenerator;
import net.minecraft.data.loot.LootTableProvider;
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.data.event.GatherDataEvent;

import java.util.Collections;
import java.util.List;

@EventBusSubscriber(modid = CompactMachines.MOD_ID, bus = EventBusSubscriber.Bus.MOD)
@Mod(CompactMachines.MOD_ID)
public class DataGeneration {

@SubscribeEvent
public static void gatherData(GatherDataEvent event) {
public DataGeneration(IEventBus modBus) {
modBus.addListener(DataGeneration::gatherData);
}

private static void gatherData(GatherDataEvent event) {
final var fileHelper = event.getExistingFileHelper();
final var generator = event.getGenerator();

Expand Down
5 changes: 2 additions & 3 deletions neoforge-main/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@file:Suppress("SpellCheckingInspection")

import org.slf4j.event.Level
import java.text.SimpleDateFormat
import java.util.*

Expand Down Expand Up @@ -72,10 +73,8 @@ neoForge {
runs {
// applies to all the run configs below
configureEach {
systemProperty("forge.logging.markers", "") // 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
systemProperty("forge.logging.console.level", "debug")
logLevel.set(Level.DEBUG)

sourceSet = project.sourceSets.main

Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ rootProject.name = "Compact Machines 21.0"

dependencyResolutionManagement {
versionCatalogs.create("neoforged") {
version("mdg", "0.1.79")
version("neoforge", "21.0.2-beta")
version("mdg", "0.1.92")
version("neoforge", "21.0.14-beta")
version("neoforgeRange") {
require("[21.0,22)")
prefer("21.0.2-beta")
Expand Down

0 comments on commit 3cd084c

Please sign in to comment.