From 393f3c8f9279f5d8f5e33933ce6ef985d65a92f0 Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Fri, 18 Feb 2022 04:58:10 -0330 Subject: Move commands to separate classes (#82) --- .../commands/misc/CosmeticsCommand.java | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java new file mode 100644 index 00000000..c722dbc4 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java @@ -0,0 +1,29 @@ +package io.github.moulberry.notenoughupdates.commands.misc; + +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import io.github.moulberry.notenoughupdates.commands.ClientCommandBase; +import io.github.moulberry.notenoughupdates.cosmetics.GuiCosmetics; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; + +public class CosmeticsCommand extends ClientCommandBase { + + public CosmeticsCommand() { + super("neucosmetics"); + } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (!OpenGlHelper.isFramebufferEnabled()) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "NEU cosmetics do not work with OF Fast Render. Go to ESC > Options > Video Settings > Performance > Fast Render to disable it.")); + + } + + NotEnoughUpdates.INSTANCE.openGui = new GuiCosmetics(); + } +} -- cgit From b09f774d422263ce15b97d6d0804beddf856176d Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 27 Feb 2022 11:53:57 -0500 Subject: feat: improve formating :) --- .../commands/misc/CosmeticsCommand.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java index c722dbc4..9ccb7cf0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java @@ -12,18 +12,18 @@ import net.minecraft.util.EnumChatFormatting; public class CosmeticsCommand extends ClientCommandBase { - public CosmeticsCommand() { - super("neucosmetics"); - } + public CosmeticsCommand() { + super("neucosmetics"); + } - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (!OpenGlHelper.isFramebufferEnabled()) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + - "NEU cosmetics do not work with OF Fast Render. Go to ESC > Options > Video Settings > Performance > Fast Render to disable it.")); + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (!OpenGlHelper.isFramebufferEnabled()) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "NEU cosmetics do not work with OF Fast Render. Go to ESC > Options > Video Settings > Performance > Fast Render to disable it.")); - } + } - NotEnoughUpdates.INSTANCE.openGui = new GuiCosmetics(); - } + NotEnoughUpdates.INSTANCE.openGui = new GuiCosmetics(); + } } -- cgit