Skip to content

Migrate BedWar from Minecraft 1.8.9 Forge to NeoForge 1.21.1#1

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/update-neo-forge-1-21-11
Draft

Migrate BedWar from Minecraft 1.8.9 Forge to NeoForge 1.21.1#1
Copilot wants to merge 5 commits intomainfrom
copilot/update-neo-forge-1-21-11

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 24, 2026

Migrates the entire mod from the legacy 1.8.9 Forge/architectury-loom stack to NeoForge 21.1.172 (Minecraft 1.21.1), Java 21, and Kotlin 2.0.0.

Build System

  • Replace architectury-loom with net.neoforged.gradle.userdev (7.0.171)
  • Remove MoulConfig (io.github.moulberry.moulconfig) and libautoupdate (moe.nea:libautoupdate) dependencies
  • Add META-INF/mods.toml + pack.mcmeta (pack_format 34); remove mcmod.info

Event System

  • MinecraftForge.EVENT_BUSNeoForge.EVENT_BUS; all @SubscribeEvent imports updated to net.neoforged.bus.api
  • @Cancelable annotation replaced with ICancellableEvent interface
  • Tick/world events: ClientTickEvent.Pre, LevelEvent.Load; chat: ClientChatReceivedEvent; disconnect: ClientPlayerNetworkEvent.LoggingOut

Minecraft API

  • Minecraft.getMinecraft()Minecraft.getInstance(), .thePlayer.player, .theWorld.level, .fontRendererObj.font
  • IChatComponent / ChatComponentTextComponent / MutableComponent
  • ScaledResolutionWindow.getGuiScaledWidth/Height()
  • All net.minecraft.item.* / net.minecraft.init.*net.minecraft.world.item.*

Rendering

  • All rendering uses GuiGraphics (replacing GlStateManager direct calls); GuiRenderEvent and NotificationRenderEvent now carry a GuiGraphics instance
  • GuiScreenScreen; GuiPositionEditor rewritten using Screen's render, mouseClicked, keyPressed, mouseScrolled overrides
  • HUD overlay via RenderGuiLayerEvent.Pre with VanillaGuiLayers.HOTBAR

Mixin Transformers

Old → new class targets: GuiContainerAbstractContainerScreen, NetHandlerPlayClientClientPacketListener, NetworkManagerConnection, GuiPlayerTabOverlayPlayerTabOverlay, ChatComponentTextLiteralContents. Mixin compatibility level set to JAVA_21.

Config System

MoulConfig removed; config now serialized directly via GSON to config/bedwar/config.json. All @ConfigOption/@ConfigEditorBoolean/@Accordion annotations stripped; @Expose retained for GSON. No config GUI in this iteration.

Commands

ClientCommandHandler.instance.registerCommand() replaced with Brigadier via RegisterClientCommandsEvent.

// Before (old Forge)
ClientCommandHandler.instance.registerCommand(SimpleCommand("bw") { ... })

// After (NeoForge 1.21.1)
@SubscribeEvent
fun onRegisterCommands(event: RegisterClientCommandsEvent) {
    event.dispatcher.register(
        LiteralArgumentBuilder.literal<CommandSourceStack>("bw")
            .executes { cmd.execute(emptyArray()); 1 }
    )
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.neoforged.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.3-bin/dxjbbhstwasg8cbags9q7cvli/gradle-8.3/lib/gradle-launcher-8.3.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.3-bin/dxjbbhstwasg8cbags9q7cvli/gradle-8.3/lib/agents/gradle-instrumentation-agent-8.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.3 bash git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 24, 2026 13:31
Co-authored-by: fex2000 <88728720+fex2000@users.noreply.github.com>
Co-authored-by: fex2000 <88728720+fex2000@users.noreply.github.com>
…erGuiData

Co-authored-by: fex2000 <88728720+fex2000@users.noreply.github.com>
… up dead code

Co-authored-by: fex2000 <88728720+fex2000@users.noreply.github.com>
Copilot AI changed the title [WIP] Update NeoForge to version 1.21.11 in Java Migrate BedWar from Minecraft 1.8.9 Forge to NeoForge 1.21.1 Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants