diff --git a/src/main/java/com/snoworange/mousse/Main.java b/src/main/java/com/snoworange/mousse/Main.java index 756dc143..35a50b24 100644 --- a/src/main/java/com/snoworange/mousse/Main.java +++ b/src/main/java/com/snoworange/mousse/Main.java @@ -2,6 +2,7 @@ import com.mojang.realmsclient.gui.ChatFormatting; import com.snoworange.mousse.command.CommandManager; +import com.snoworange.mousse.event.ForgeEventHandeler; import com.snoworange.mousse.module.Module; import com.snoworange.mousse.module.ModuleManager; import com.snoworange.mousse.ui.ClickGui; @@ -23,38 +24,32 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.Display; +import java.io.File; + @Mod(modid = Main.MOD_ID, name = Main.NAME, version = Main.VERSION) public class Main { - public static ThemeManager themeManager = new ThemeManager(); public static ModuleManager moduleManager; - public static Hud hud; public static KeyBinding ClickGUI; + public static ThemeManager themeManager; public static CommandManager commandManager; - private ClickGui clickgui; - //public ClickGui clickGui; + public static ClickGui clickgui; + public static ForgeEventHandeler forgeEventHandeler; // public static final String MOD_ID = "mousse"; public static final String NAME = "Mousse"; - public static final String VERSION = "v0.5.4"; + public static final String VERSION = "v0.5.7"; public static Minecraft mc = Minecraft.getMinecraft(); - public static final JColor MOUSSE_COLOR = new JColor(131, 141, 59); - // @Mod.Instance public Main instance; - - @Mod.EventHandler - public void PreInit(FMLPreInitializationEvent event) { - } - public void initFilesystem() { FileUtils.createDirectory(); FileUtils.loadAll(); @@ -72,6 +67,8 @@ public void init(FMLPreInitializationEvent event) { commandManager = new CommandManager(); hud = new Hud(); clickgui = new ClickGui(); + themeManager = new ThemeManager(); + forgeEventHandeler = new ForgeEventHandeler(); ClickGUI = new KeyBinding("ClickGUI", Keyboard.KEY_NONE, "Mousse"); ClientRegistry.registerKeyBinding(ClickGUI); @@ -115,6 +112,7 @@ public static void sendMessage(String msg) { @SubscribeEvent public void displayGuiScreen(TickEvent.ClientTickEvent event) { if (Main.ClickGUI.isPressed()) { + FileUtils.loadTheme(FileUtils.mousse); mc.displayGuiScreen(new ClickGui()); } } diff --git a/src/main/java/com/snoworange/mousse/mixin/mixins/MixinAbstractClientPlayer.java b/src/main/java/com/snoworange/mousse/mixin/mixins/MixinAbstractClientPlayer.java index f329ab30..7f184c06 100644 --- a/src/main/java/com/snoworange/mousse/mixin/mixins/MixinAbstractClientPlayer.java +++ b/src/main/java/com/snoworange/mousse/mixin/mixins/MixinAbstractClientPlayer.java @@ -2,7 +2,6 @@ import com.snoworange.mousse.Main; import com.snoworange.mousse.module.modules.player.Capes; -import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.util.ResourceLocation; @@ -23,15 +22,16 @@ public abstract class MixinAbstractClientPlayer { @Inject(method={"getLocationCape"}, at={@At(value="HEAD")}, cancellable=true) public void getLocationCape(CallbackInfoReturnable callbackInfoReturnable) { - NetworkPlayerInfo info = this.getPlayerInfo(); - UUID uuid = null; - if (info != null) { - uuid = this.getPlayerInfo().getGameProfile().getId(); - } - if (Main.moduleManager.getModule("Capes").isToggled()) { + NetworkPlayerInfo info = this.getPlayerInfo(); + UUID uuid = null; + if (info != null) { + uuid = this.getPlayerInfo().getGameProfile().getId(); + } + ResourceLocation cape = Capes.getCapeResource((AbstractClientPlayer) (Object) this); - if (uuid != null && Minecraft.getMinecraft().getSession().getUsername().equals(this.getPlayerInfo().getGameProfile().getName())) { + + if (uuid != null) { callbackInfoReturnable.setReturnValue(cape); } } diff --git a/src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiScreen.java b/src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiScreen.java index a312180a..f32987cd 100644 --- a/src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiScreen.java +++ b/src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiScreen.java @@ -26,13 +26,13 @@ public void updateScreen() { @Inject(method = "drawWorldBackground(I)V", at = @At("HEAD"), cancellable = true) private void drawWorldBackgroundWrapper(final int tint, final CallbackInfo ci) { - if (Minecraft.getMinecraft().world != null && (Main.moduleManager.getModule("CleanGUI").isToggled() || Main.moduleManager.getModule("Particles").isToggled())) { + if (Minecraft.getMinecraft().world != null && Main.moduleManager.getModule("CleanGUI").isToggled()) { ci.cancel(); } if (Minecraft.getMinecraft().world != null) { - if (Main.moduleManager.getModule("Particles").isToggled()) { + if (Main.moduleManager.getModule("Particles").isToggled()) { final ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); final int width = scaledResolution.getScaledWidth(); final int height = scaledResolution.getScaledHeight(); diff --git a/src/main/java/com/snoworange/mousse/module/Module.java b/src/main/java/com/snoworange/mousse/module/Module.java index 12866abf..4e635e7f 100644 --- a/src/main/java/com/snoworange/mousse/module/Module.java +++ b/src/main/java/com/snoworange/mousse/module/Module.java @@ -71,6 +71,14 @@ public boolean isToggled() { return toggled; } + public boolean isEnabled() { + return toggled; + } + + public boolean isDisabled() { + return !toggled; + } + public void setToggled(boolean toggled) { if (toggled) { if (!this.toggled) { @@ -107,6 +115,18 @@ public void onDisable() { } } + public void onTick() { + + } + + public void onPlayerTick() { + + } + + public void onUpdate() { + + } + public void enable() { this.onEnable(); this.toggled = true; diff --git a/src/main/java/com/snoworange/mousse/module/ModuleAnnotation.java b/src/main/java/com/snoworange/mousse/module/ModuleAnnotation.java deleted file mode 100644 index f21b108f..00000000 --- a/src/main/java/com/snoworange/mousse/module/ModuleAnnotation.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.snoworange.mousse.module; - -public @interface ModuleAnnotation { - -} diff --git a/src/main/java/com/snoworange/mousse/module/ModuleManager.java b/src/main/java/com/snoworange/mousse/module/ModuleManager.java index fe9ee548..ff7e118f 100644 --- a/src/main/java/com/snoworange/mousse/module/ModuleManager.java +++ b/src/main/java/com/snoworange/mousse/module/ModuleManager.java @@ -33,6 +33,7 @@ public ModuleManager() { modules.add(new AutoAuto32k()); modules.add(new Grab32k()); //modules.add(new SelfBow()); + modules.add(new Auto32k2019()); //EXPLOIT modules.add(new SecretClose()); @@ -63,6 +64,8 @@ public ModuleManager() { modules.add(new DiscordRPC()); modules.add(new Announcer()); modules.add(new GuiTheme()); + //modules.add(new TrueDurability()); + //modules.add(new DebugModule()); //RENDER modules.add(new ShulkerPeek()); @@ -106,16 +109,4 @@ public static List getModulesByCategory(Category c) { } return modules; } - - public static Module getModuleP(final Predicate predicate) { - return (Module)getModulesP().stream().filter(predicate).findFirst().orElse(null); - } - - public static List getModulesP(final Predicate predicate) { - return (List)getModulesP().stream().filter(predicate).collect(Collectors.toList()); - } - - public static List getModulesP() { - return getInstance().modules; - } } diff --git a/src/main/java/com/snoworange/mousse/module/modules/combat/Auto32k.java b/src/main/java/com/snoworange/mousse/module/modules/combat/Auto32k.java index df124c07..201f61fc 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/combat/Auto32k.java +++ b/src/main/java/com/snoworange/mousse/module/modules/combat/Auto32k.java @@ -3,8 +3,6 @@ import com.snoworange.mousse.Main; import com.snoworange.mousse.module.Category; import com.snoworange.mousse.module.Module; -import com.snoworange.mousse.setting.settings.BooleanSetting; -import com.snoworange.mousse.setting.settings.NumberSetting; import net.minecraft.block.BlockAir; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.enchantment.EnchantmentHelper; diff --git a/src/main/java/com/snoworange/mousse/module/modules/combat/AutoEz.java b/src/main/java/com/snoworange/mousse/module/modules/combat/AutoEz.java index 3201d7ab..a5491730 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/combat/AutoEz.java +++ b/src/main/java/com/snoworange/mousse/module/modules/combat/AutoEz.java @@ -103,7 +103,7 @@ public void ez(final EntityPlayer entityPlayer) { final int rand = new Random().nextInt(this.ezMessages.size()); AutoEz.targets.remove(name); - final String ezMessage = this.ezMessages.get(rand).replace("$name$", name); + final String ezMessage = this.ezMessages.get(rand).replace("$name$", name).replace("$clientname$", Main.NAME).replace("$version$", Main.VERSION); mc.player.sendChatMessage(ezMessage); } diff --git a/src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32k.java b/src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32k.java index 44f327c5..1e728eab 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32k.java +++ b/src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32k.java @@ -759,68 +759,60 @@ public void onRender3d(RenderWorldLastEvent event) { public void placeStuff(int hopperIndex, int shulkerIndex, int redstoneIndex, int dispenserIndex, int obsidianIndex, BlockPos blockPos, EnumFacing enumFacing, Vec3d vec3d) { mc.player.connection.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_SNEAKING)); - //Place obby (if empty) + //Place obby (forced) if (mc.world.getBlockState(blockPos.up()).getBlock() instanceof BlockAir) { - - if (obsidianIndex != -1) { - - if (silentSwap.enable) { - mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex)); - mc.playerController.updateController(); - } else { - mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex)); - mc.player.inventory.currentItem = obsidianIndex; - mc.playerController.updateController(); - } - - //mc.playerController.processRightClickBlock(mc.player, mc.world, blockPos, enumFacing, vec3d, EnumHand.MAIN_HAND); - placeBlock(blockPos); - mc.player.connection.sendPacket(new CPacketHeldItemChange(mc.player.inventory.currentItem)); - mc.player.swingArm(EnumHand.MAIN_HAND); + if (silentSwap.enable) { + mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex)); + mc.playerController.updateController(); } else { - Main.sendMessage("Missing obsidian in your hotbar!"); - disable(); + mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex)); + mc.player.inventory.currentItem = obsidianIndex; + mc.playerController.updateController(); } + + mc.playerController.processRightClickBlock(mc.player, mc.world, blockPos, EnumFacing.UP, new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()), EnumHand.MAIN_HAND); + mc.player.connection.sendPacket(new CPacketHeldItemChange(mc.player.inventory.currentItem)); + mc.player.swingArm(EnumHand.MAIN_HAND); } this.placedPos = blockPos.up(); //Dispenser placing phase - if ((mc.world.getBlockState(this.placedPos).getBlock().equals(Blocks.OBSIDIAN) || mc.world.getBlockState(this.placedPos).getBlock().equals(Blocks.BEDROCK) || mc.world.getBlockState(this.placedPos).isFullBlock()) && mc.world.getBlockState(this.placedPos.up()).getBlock() instanceof BlockAir) { - - //Check witch direction the player needs to be rotate to rotate dispenser - float yaw = 0.0f; - - if (dispenserDirection == EnumFacing.NORTH) { - yaw = -179.0f; - } else if (dispenserDirection == EnumFacing.EAST) { - yaw = -89.0f; - } else if (dispenserDirection == EnumFacing.SOUTH) { - yaw = 1.0f; - } else if (dispenserDirection == EnumFacing.WEST) { - yaw = 91.0f; - } + //if (mc.world.getBlockState(this.placedPos).isFullBlock() && mc.world.getBlockState(this.placedPos.up()).getBlock() instanceof BlockAir) { + + //Check witch direction the player needs to be rotate to rotate dispenser + float yaw = 0.0f; + + if (dispenserDirection == EnumFacing.NORTH) { + yaw = -179.0f; + } else if (dispenserDirection == EnumFacing.EAST) { + yaw = -89.0f; + } else if (dispenserDirection == EnumFacing.SOUTH) { + yaw = 1.0f; + } else if (dispenserDirection == EnumFacing.WEST) { + yaw = 91.0f; + } - if (silentSwap.enable) { - mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex)); - mc.playerController.updateController(); - } else { - mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex)); - mc.player.inventory.currentItem = dispenserIndex; - mc.playerController.updateController(); - } + if (silentSwap.enable) { + mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex)); + mc.playerController.updateController(); + } else { + mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex)); + mc.player.inventory.currentItem = dispenserIndex; + mc.playerController.updateController(); + } - //Sends rotation packet to rotate dispenser - mc.player.connection.sendPacket(new CPacketPlayer.Rotation(yaw, 0, mc.player.onGround)); - mc.playerController.processRightClickBlock(mc.player, mc.world, this.placedPos, EnumFacing.UP, new Vec3d(this.placedPos.getX(), this.placedPos.getY(), this.placedPos.getZ()), EnumHand.MAIN_HAND); - //placeBlock(this.placedPos); + //Sends rotation packet to rotate dispenser + mc.player.connection.sendPacket(new CPacketPlayer.Rotation(yaw, 0, mc.player.onGround)); + mc.playerController.processRightClickBlock(mc.player, mc.world, this.placedPos, EnumFacing.UP, new Vec3d(this.placedPos.getX(), this.placedPos.getY(), this.placedPos.getZ()), EnumHand.MAIN_HAND); + //placeBlock(this.placedPos); - mc.player.connection.sendPacket(new CPacketHeldItemChange(mc.player.inventory.currentItem)); + mc.player.connection.sendPacket(new CPacketHeldItemChange(mc.player.inventory.currentItem)); - prepareFastHopper = true; + prepareFastHopper = true; - mc.player.swingArm(EnumHand.MAIN_HAND); - } + mc.player.swingArm(EnumHand.MAIN_HAND); + //} this.placedPos = blockPos.up(2); diff --git a/src/main/java/com/snoworange/mousse/module/modules/exploit/SecretClose.java b/src/main/java/com/snoworange/mousse/module/modules/exploit/SecretClose.java index a26b2476..f9f83902 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/exploit/SecretClose.java +++ b/src/main/java/com/snoworange/mousse/module/modules/exploit/SecretClose.java @@ -51,12 +51,12 @@ public void onUpdate(LivingEvent.LivingUpdateEvent event) { public void onPacketSend(PacketEvent.Send event) { if (this.toggled) { if (event.getPacket() instanceof CPacketCloseWindow) { - Label_0236: + Label_69420: { if (mode.is("Hopper")) { if (!(lastGui instanceof GuiHopper)) { if (!(mc.currentScreen instanceof GuiHopper)) { - break Label_0236; + break Label_69420; } } event.setCanceled(true); diff --git a/src/main/java/com/snoworange/mousse/module/modules/misc/BetterChat.java b/src/main/java/com/snoworange/mousse/module/modules/misc/BetterChat.java index 0afdd78f..cc6118c3 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/misc/BetterChat.java +++ b/src/main/java/com/snoworange/mousse/module/modules/misc/BetterChat.java @@ -77,37 +77,40 @@ public void onDisable() { @SubscribeEvent public void onChat(final ClientChatEvent event) { - for (final String s : Arrays.asList("/", ".", "-", ",", ":", ";", "'", "\"", "+", "@", "#", "&", "_")) { - if (event.getMessage().startsWith(s)) return; - } - - if (customPrefix.enable) { + if (this.toggled) { - if (this.chatModifiers.size() == 0) { - Main.sendMessage("The BetterChat.txt file is empty. No prefix will be sent."); - return; + for (final String s : Arrays.asList("/", ".", "-", ",", ":", ";", "'", "\"", "+", "@", "#", "&", "_")) { + if (event.getMessage().startsWith(s)) return; } - final String prefix = this.chatModifiers.get(0); + if (customPrefix.enable) { - event.setMessage(prefix + " " + event.getMessage()); - } else if (!customPrefix.enable) { - event.setMessage("> " + event.getMessage()); - } + if (this.chatModifiers.size() == 0) { + Main.sendMessage("The BetterChat.txt file is empty. No prefix will be sent."); + return; + } - if (customSuffix.enable) { + final String prefix = this.chatModifiers.get(0); - if (this.chatModifiers.size() <= 1) { - Main.sendMessage("The suffix text in BetterChat.txt is empty. No suffix will be sent."); - return; + event.setMessage(prefix + " " + event.getMessage()); + } else if (!customPrefix.enable) { + event.setMessage("> " + event.getMessage()); } - final String suffix = this.chatModifiers.get(1); + if (customSuffix.enable) { - event.setMessage(event.getMessage() + suffix); + if (this.chatModifiers.size() <= 1) { + Main.sendMessage("The suffix text in BetterChat.txt is empty. No suffix will be sent."); + return; + } + + final String suffix = this.chatModifiers.get(1); - } else if (!customSuffix.enable) { - event.setMessage(event.getMessage() + " / Mousse"); + event.setMessage(event.getMessage() + suffix); + + } else if (!customSuffix.enable) { + event.setMessage(event.getMessage() + " / Mousse"); + } } } } diff --git a/src/main/java/com/snoworange/mousse/module/modules/misc/Disconnector.java b/src/main/java/com/snoworange/mousse/module/modules/misc/Disconnector.java index 4cdfc9f6..a555d619 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/misc/Disconnector.java +++ b/src/main/java/com/snoworange/mousse/module/modules/misc/Disconnector.java @@ -13,12 +13,9 @@ public Disconnector() { @Override public void onEnable() { - mc.world.sendQuittingDisconnectingPacket(); mc.player.connection.onDisconnect(new TextComponentString("Disconnecting!")); - - this.onDisable(); - this.toggled = false; + disable(); } @Override diff --git a/src/main/java/com/snoworange/mousse/module/modules/player/Capes.java b/src/main/java/com/snoworange/mousse/module/modules/player/Capes.java index 07fe102f..3959e13e 100644 --- a/src/main/java/com/snoworange/mousse/module/modules/player/Capes.java +++ b/src/main/java/com/snoworange/mousse/module/modules/player/Capes.java @@ -1,17 +1,38 @@ package com.snoworange.mousse.module.modules.player; +import com.snoworange.mousse.Main; import com.snoworange.mousse.module.Category; import com.snoworange.mousse.module.Module; +import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.util.ResourceLocation; +import java.util.*; + public class Capes extends Module { + public static List UUIDs = new ArrayList<>(); + + public static Capes instance; + public Capes() { super("Capes", "", Category.PLAYER, 0); + + UUIDs.add(UUID.fromString("fe1ad3a4-9e5d-4f68-a04c-2e74bd07df42")); //Snoworange6919 + UUIDs.add(UUID.fromString("05b09c32-fe1b-4563-bbc6-db9968070d94")); //Jonakip + UUIDs.add(UUID.fromString("42069420-6969-6969-6969-420420420420")); //huu_bo + UUIDs.add(UUID.fromString("7e31f4df-d166-44ef-9065-6231420226ab")); //HGkidudeski + UUIDs.add(UUID.fromString("e2857f53-ffa6-468e-bc7a-9aa43c143e45")); //Pseudonymous000 + + instance = this; } - public static Capes instance; - public static final ResourceLocation MOUSSE_CAPE = new ResourceLocation("textures/cape.png"); + + public static final ResourceLocation MOUSSE_CAPE = new ResourceLocation("textures/mousse_cape.png"); + public static final ResourceLocation SNOWORANGE_CAPE = new ResourceLocation("textures/snoworange_cape.png"); + public static final ResourceLocation JONAKIP_CAPE = new ResourceLocation("textures/jonakip_cape.png"); + public static final ResourceLocation HUUB_CAPE = new ResourceLocation("textures/huub_cape.png"); + public static final ResourceLocation ELMO_CAPE = new ResourceLocation("textures/elmo_cape.png"); + public static final ResourceLocation PSEUDO_CAPE = new ResourceLocation("textures/pseudo_cape.png"); @Override public void onEnable() { @@ -31,6 +52,28 @@ public static Capes getInstance() { } public static ResourceLocation getCapeResource(AbstractClientPlayer player) { - return MOUSSE_CAPE; + + if (player.getUniqueID().toString().equals("fe1ad3a4-9e5d-4f68-a04c-2e74bd07df42")) { + return SNOWORANGE_CAPE; + } + if (player.getUniqueID().toString().equals("05b09c32-fe1b-4563-bbc6-db9968070d94")) { + return JONAKIP_CAPE; + } + if (player.getUniqueID().toString().equals("42069420-6969-6969-6969-420420420420")) { + Main.sendMessage("Sorry Huub ik heb nog geen texture"); + return HUUB_CAPE; + } + if (player.getUniqueID().toString().equals("7e31f4df-d166-44ef-9065-6231420226ab")) { + return ELMO_CAPE; + } + if (player.getUniqueID().toString().equals("e2857f53-ffa6-468e-bc7a-9aa43c143e45")) { + return PSEUDO_CAPE; + } + + if (player.getName().equals(Minecraft.getMinecraft().getSession().getUsername())) { + return MOUSSE_CAPE; + } + + return null; } } diff --git a/src/main/java/com/snoworange/mousse/ui/ClickGui.java b/src/main/java/com/snoworange/mousse/ui/ClickGui.java index cac7e555..20403148 100644 --- a/src/main/java/com/snoworange/mousse/ui/ClickGui.java +++ b/src/main/java/com/snoworange/mousse/ui/ClickGui.java @@ -516,6 +516,7 @@ public boolean doesGuiPauseGame() { @Override public void initGui() { super.initGui(); + dragging = false; dragging2 = false; } diff --git a/src/main/java/com/snoworange/mousse/ui/theme/ThemeManager.java b/src/main/java/com/snoworange/mousse/ui/theme/ThemeManager.java index 22f509c5..39a4fad1 100644 --- a/src/main/java/com/snoworange/mousse/ui/theme/ThemeManager.java +++ b/src/main/java/com/snoworange/mousse/ui/theme/ThemeManager.java @@ -25,7 +25,7 @@ public Theme getCurrentTheme() { public boolean setTheme(String name) { for (Theme theme : themes) { - if(theme.getName() == name) { + if (theme.getName() == name) { this.index = themes.indexOf(theme); return true; } diff --git a/src/main/java/com/snoworange/mousse/util/misc/FileUtils.java b/src/main/java/com/snoworange/mousse/util/misc/FileUtils.java index 568c21e6..23defa69 100644 --- a/src/main/java/com/snoworange/mousse/util/misc/FileUtils.java +++ b/src/main/java/com/snoworange/mousse/util/misc/FileUtils.java @@ -206,8 +206,7 @@ public static void saveTheme(final File file) { final File theme = new File(file.getAbsolutePath(), "Theme.txt"); final BufferedWriter bw = new BufferedWriter(new FileWriter(theme)); - bw.write(Main.themeManager.getCurrentTheme().getName() + ":" + "Theme"); - bw.write("\r\n"); + bw.write(String.valueOf(Main.themeManager.index)); bw.close(); return; } @@ -228,12 +227,12 @@ public static void loadTheme(final File file) { final BufferedReader br = new BufferedReader(new FileReader(theme)); final List linezz = Files.readAllLines(theme.toPath()); for (final String line : linezz) { - final String[] regex = line.split(":"); - try { - Main.themeManager.setTheme(regex[0]); - } catch (Exception exj) { - System.out.println(exj); + if (Integer.parseInt(line) > -1) { + Main.themeManager.index = Integer.parseInt(line); + } + } catch (Exception e) { + e.printStackTrace(); } } br.close(); diff --git a/src/main/java/com/snoworange/mousse/util/misc/Larper.java b/src/main/java/com/snoworange/mousse/util/misc/Larper.java deleted file mode 100644 index 69307c96..00000000 --- a/src/main/java/com/snoworange/mousse/util/misc/Larper.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.snoworange.mousse.util.misc; - -public class Larper { - public int logoutTimes; - public String name; - public int pops; - - public Larper(final String name) { - this.pops = 0; - this.logoutTimes = 0; - this.name = name; - } - - public void addPop() { - ++this.pops; - } - - public void clearPops() { - this.pops = 0; - } - - public void addLogout() { - ++this.logoutTimes; - } - - public void clearLogouts() { - this.logoutTimes = 0; - } - - public String getName() { - return this.name; - } - - public int getPops() { - return this.pops; - } - - public boolean hasPops() { - return this.pops > 0; - } - - public int getLogoutTimes() { - return this.logoutTimes; - } - - public boolean hasLogouts() { - return this.logoutTimes > 0; - } -} diff --git a/src/main/resources/assets/minecraft/textures/cape.png b/src/main/resources/assets/minecraft/textures/cape.png deleted file mode 100644 index 8e19790d..00000000 Binary files a/src/main/resources/assets/minecraft/textures/cape.png and /dev/null differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 03ae1b29..ba89fac7 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "mousse", "name": "Mousse", "description": "Advanced utility mod for Minecraft 1.12.2", - "version": "0.5.4", + "version": "0.5.7", "mcversion": "1.12.2", "url": "", "updateUrl": "",