From da34d19ebed6b7158b1d730d7fef459c73fe1aa4 Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 20 Aug 2021 20:16:52 +0200 Subject: Add alternative fairysouls command "/fairysouls" --- .../github/moulberry/notenoughupdates/NotEnoughUpdates.java | 1 + .../moulberry/notenoughupdates/miscfeatures/FairySouls.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index b699afa5..f0cf7774 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -1269,6 +1269,7 @@ public class NotEnoughUpdates { ClientCommandHandler.instance.registerCommand(dungeonWinTest); ClientCommandHandler.instance.registerCommand(calendarCommand); ClientCommandHandler.instance.registerCommand(new FairySouls.FairySoulsCommand()); + ClientCommandHandler.instance.registerCommand(new FairySouls.FairySoulsCommandAlt()); ClientCommandHandler.instance.registerCommand(neuhelp); BackgroundBlur.registerListener(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java index d45ca9ba..28b03f52 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java @@ -17,6 +17,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.command.ICommandSender; import net.minecraft.entity.Entity; import net.minecraft.util.*; +import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.event.world.WorldEvent; @@ -293,6 +294,18 @@ public class FairySouls { GlStateManager.enableDepth(); } + public static class FairySoulsCommandAlt extends SimpleCommand { + public FairySoulsCommandAlt() { + super("fairysouls", new ProcessCommandRunnable() { + @Override + public void processCommand(ICommandSender sender, String[] args) { + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neusouls"); + } + } + ); + } + } + public static class FairySoulsCommand extends SimpleCommand { public FairySoulsCommand() { -- cgit