Skip to content

Commit

Permalink
Use the correct event to register the AE2 commands, fixing use after …
Browse files Browse the repository at this point in the history
…reload.
  • Loading branch information
shartte committed Dec 19, 2024
1 parent 18d5e7c commit 6594855
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/appeng/core/AppEngBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
import java.util.Collection;
import java.util.Collections;

import com.mojang.brigadier.CommandDispatcher;

import org.jetbrains.annotations.Nullable;

import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
Expand Down Expand Up @@ -210,9 +207,8 @@ public void registerKeyTypes() {
AEKeyTypes.register(AEKeyType.fluids());
}

public void registerCommands(ServerStartingEvent evt) {
CommandDispatcher<CommandSourceStack> dispatcher = evt.getServer().getCommands().getDispatcher();
new AECommand().register(dispatcher);
public void registerCommands(RegisterCommandsEvent evt) {
new AECommand().register(evt.getDispatcher());
}

public void registerSounds(IForgeRegistry<SoundEvent> registry) {
Expand Down

0 comments on commit 6594855

Please sign in to comment.