Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RawDiamondMC committed Sep 21, 2024
1 parent 6a6864e commit a7b6096
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import net.neoforged.fml.common.Mod;

@Mod(KessokuBase.MOD_ID)
public final class KessokuBaseEntrypointNeoforge {
public KessokuBaseEntrypointNeoforge() {
public final class KessokuBaseNeoforge {
public KessokuBaseNeoforge() {
ModUtils.getLogger().info(KessokuBase.MARKER, "KessokuLib-Base is loaded!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import java.util.List;

public class KessokuGradlePlugin implements Plugin<PluginAware> {
public final class KessokuGradlePlugin implements Plugin<PluginAware> {
private static final List<String> NEO_GROUPS = List.of(
"net.neoforged",
"cpw.mods",
Expand All @@ -35,7 +35,8 @@ public void apply(@NotNull PluginAware target) {
case Gradle gradle -> {
return;
}
default -> throw new IllegalArgumentException("Expected target to be a Project or Settings, but was a " + target.getClass());
default ->
throw new IllegalArgumentException("Expected target to be a Project or Settings, but was a " + target.getClass());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;

public class KessokuCommand {
public final class KessokuCommand {
public static final String MOD_ID = "kessoku_command";
public static final Marker MARKER = MarkerFactory.getMarker("[KessokuCommand]");
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import band.kessoku.lib.command.impl.KessokuCommandImpl;
import net.fabricmc.api.ModInitializer;

public class KessokuCommandEntrypoint implements ModInitializer {
public final class KessokuCommandFabric implements ModInitializer {
@Override
public void onInitialize() {
ModUtils.getLogger().info(KessokuCommand.MARKER, "KessokuLib-Command is Loaded!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import band.kessoku.lib.command.api.events.CommandRegistryEvent;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;

public class KessokuCommandImpl {
public final class KessokuCommandImpl {
public static void registerCommonEvents() {
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> {
CommandRegistryEvent.EVENT.invoker().register(dispatcher, registryAccess, environment);
Expand Down
5 changes: 5 additions & 0 deletions command/fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
},
"license": "LGPL-3.0-only",
"icon": "icon.png",
"entrypoints": {
"main": [
"band.kessoku.lib.command.KessokuCommandFabric"
]
},
"environment": "*",
"depends": {
"fabricloader": ">=0.16.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

import band.kessoku.lib.base.ModUtils;
import band.kessoku.lib.command.impl.KessokuCommandImpl;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.common.NeoForge;

@Mod(KessokuCommand.MOD_ID)
public class KessokuCommandEntrypoint {
public KessokuCommandEntrypoint(IEventBus modEventBus) {
public final class KessokuCommandNeoforge {
public KessokuCommandNeoforge() {
var forgeEventBus = NeoForge.EVENT_BUS;
ModUtils.getLogger().info(KessokuCommand.MARKER, "KessokuLib-Command is Loaded!");
KessokuCommandImpl.registerCommonEvents(forgeEventBus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.event.RegisterCommandsEvent;

public class KessokuCommandImpl {
public final class KessokuCommandImpl {
public static void registerCommonEvents(IEventBus forgeEventBus) {
NeoEventUtils.registerEvent(forgeEventBus, RegisterCommandsEvent.class, event -> {
CommandRegistryEvent.EVENT.invoker().register(event.getDispatcher(), event.getBuildContext(), event.getCommandSelection());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import net.fabricmc.api.ModInitializer;

public class KessokuConfigEntrypoint implements ModInitializer {
public final class KessokuConfigFabric implements ModInitializer {
@Override
public void onInitialize() {
}
Expand Down
5 changes: 5 additions & 0 deletions config/fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
},
"license": "LGPL-3.0-only",
"icon": "icon.png",
"entrypoints": {
"main": [
"band.kessoku.lib.config.KessokuConfigFabric"
]
},
"environment": "*",
"depends": {
"fabricloader": ">=0.16.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import net.neoforged.fml.common.Mod;

@Mod(KessokuConfig.MOD_ID)
public class KessokuConfigEntrypoint {
public KessokuConfigEntrypoint() {
public final class KessokuConfigNeoforge {
public KessokuConfigNeoforge() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import band.kessoku.lib.base.ModUtils;
import net.fabricmc.api.ModInitializer;

public final class KessokuDataEntrypoint implements ModInitializer {
public final class KessokuDataFabric implements ModInitializer {
@Override
public void onInitialize() {
ModUtils.getLogger().info(KessokuData.MARKER, "KessokuLib-BlockEntity is Loaded!");
Expand Down
2 changes: 1 addition & 1 deletion data/fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"icon": "icon.png",
"entrypoints": {
"main": [
"band.kessoku.lib.data.KessokuDataEntrypoint"
"band.kessoku.lib.data.KessokuDataFabric"
]
},
"environment": "*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package band.kessoku.lib.data;

import band.kessoku.lib.base.ModUtils;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;

@Mod(KessokuData.MOD_ID)
public class KessokuDataEntrypoint {
public KessokuDataEntrypoint(IEventBus modEventBus) {
public final class KessokuDataNeoforge {
public KessokuDataNeoforge() {
ModUtils.getLogger().info(KessokuData.MARKER, "KessokuLib-BlockEntity is Loaded!");
}
}

0 comments on commit a7b6096

Please sign in to comment.