Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cb307dc
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 18, 2025
4a2f09b
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 19, 2025
bf75147
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 19, 2025
ab132dd
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 19, 2025
1b65fe7
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 20, 2025
130abdc
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 20, 2025
f9ca9e5
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 22, 2025
4beaec4
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 24, 2025
1dde1b7
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 24, 2025
4bc694e
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 24, 2025
71f45aa
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 24, 2025
e2e4dc8
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 25, 2025
0c1ab33
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 25, 2025
a08ee29
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 25, 2025
b095ec5
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 26, 2025
e1c7f29
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 29, 2025
b7d150e
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jun 29, 2025
5904549
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jul 3, 2025
8b65117
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jul 3, 2025
dc9286f
Update MDK with new output from mod generator
neoforge-mdk-automation[bot] Jul 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'net.neoforged.moddev' version '2.0.95'
id 'net.neoforged.moddev' version '2.0.99'
id 'idea'
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ org.gradle.configuration-cache=true

#read more on this at https://github.com/neoforged/ModDevGradle?tab=readme-ov-file#better-minecraft-parameter-names--javadoc-parchment
# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started
parchment_minecraft_version=1.21.5
parchment_mappings_version=2025.06.15
parchment_minecraft_version=1.21.6
parchment_mappings_version=2025.06.29
# Environment Properties
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
# The Minecraft version must agree with the Neo version to get a valid artifact
Expand All @@ -18,9 +18,9 @@ minecraft_version=1.21.6
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.21.6]
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.6.4-beta
neo_version=21.6.20-beta
# The Neo version range can use any version of Neo as bounds
neo_version_range=[21.6.4-beta,)
neo_version_range=[21.6.20-beta,)

## Mod Properties

Expand Down
18 changes: 2 additions & 16 deletions src/main/java/com/example/examplemod/ExampleMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.mojang.logging.LogUtils;

import net.minecraft.client.Minecraft;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
Expand All @@ -20,11 +19,9 @@
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent;
Expand All @@ -40,7 +37,7 @@ public class ExampleMod {
// Define mod id in a common place for everything to reference
public static final String MODID = "examplemod";
// Directly reference a slf4j logger
private static final Logger LOGGER = LogUtils.getLogger();
public static final Logger LOGGER = LogUtils.getLogger();
// Create a Deferred Register to hold Blocks which will all be registered under the "examplemod" namespace
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(MODID);
// Create a Deferred Register to hold Items which will all be registered under the "examplemod" namespace
Expand Down Expand Up @@ -117,15 +114,4 @@ public void onServerStarting(ServerStartingEvent event) {
// Do something when the server starts
LOGGER.info("HELLO from server starting");
}

// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
@EventBusSubscriber(modid = MODID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public static class ClientModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
// Some client setup code
LOGGER.info("HELLO FROM CLIENT SETUP");
LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
}
}
}
15 changes: 14 additions & 1 deletion src/main/java/com/example/examplemod/ExampleModClient.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
package com.example.examplemod;

import net.minecraft.client.Minecraft;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.neoforge.client.gui.ConfigurationScreen;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;

// This class will not load on dedicated servers. Accessing client side code from here is safe.
@Mod(value = ExampleMod.MODID, dist = Dist.CLIENT)
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
@EventBusSubscriber(modid = ExampleMod.MODID, value = Dist.CLIENT)
public class ExampleModClient {
public ExampleModClient(ModContainer container) {
// Allows NeoForge to create a config screen for this mod's configs.
// The config screen is accessed by going to the Mods screen > clicking on your mod > clicking on config.
// Do not forget to add translations for your config options to the en_us.json file.
container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
}
}

@SubscribeEvent
static void onClientSetup(FMLClientSetupEvent event) {
// Some client setup code
ExampleMod.LOGGER.info("HELLO FROM CLIENT SETUP");
ExampleMod.LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
}
}