diff --git a/readme.md b/readme.md index 03b0645..5c2e87f 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # ![Seppuku](res/seppuku_full.png) -Seppuku is a free, lightweight, open-source [_Minecraft Forge_](https://files.minecraftforge.net/) mod for Minecraft 1.12.2. Oriented towards the 9B9T anarchy server, this is a fully featured client-side mod with an external plugin API, unique exploits, and a [solid community](https://discord.gg/UzWBZPe). +Seppuku is a free, lightweight, open-source [_Minecraft Forge_](https://files.minecraftforge.net/) mod for Minecraft 1.12.2. Oriented towards the 9B9T anarchy server, this is a fully featured client-side mod with an external plugin API, unique exploits, and a [solid Discord community](https://discord.gg/UzWBZPe). # Requirements - **JDK 8** (https://adoptopenjdk.net/, https://aws.amazon.com/corretto/) @@ -9,22 +9,28 @@ Seppuku is a free, lightweight, open-source [_Minecraft Forge_](https://files.mi # Building ### Linux / Mac -1. Clone the repository `git clone git@github.com:seppukudevelopment/seppuku.git` -2. Run `gradlew setupDecompWorkspace` -3. Edit `build.gradle` and change field `buildmode` to `RELEASE` ex: `def - buildmode = "RELEASE"` -4. Run `gradlew build` +1. Clone the repository: `git clone git@github.com:seppukudevelopment/seppuku.git` +2. Run `gradlew setupDecompWorkspace` +3. Edit `build.gradle` and change field `buildmode` to `RELEASE`. (e.g. `def + buildmode = "RELEASE"`) +4. Run `gradlew build`. + +Your .jar file is in `build/libs/`. #### Windows -> Highly recommend using a git shell for Windows and using the linux guide above. (https://git-scm.com/downloads) -1. Clone the repository -2. Import the project through Gradle via `build.gradle` (simple tutorials online for [intellij](https://stackoverflow.com/questions/31256356/how-to-import-gradle-projects-in-intellij), [eclipse](https://stackoverflow.com/questions/10722773/import-existing-gradle-git-project-into-eclipse), etc.) +> Using a git shell for Windows and using the linux guide above is highly recommended. (https://git-scm.com/downloads) +1. Clone the repository. +2. Import the project through Gradle via `build.gradle` (simple tutorials online for +[intellij](https://stackoverflow.com/questions/31256356/how-to-import-gradle-projects-in-intellij), +[eclipse](https://stackoverflow.com/questions/10722773/import-existing-gradle-git-project-into-eclipse), etc.) 3. Run the gradle command `setupDecompWorkspace` via the IDE or gradlew.bat file (via command prompt: `gradlew.bat setupDecompWorkspace`) 4. Refresh the project (reload ide / refresh gradle workspace) 5. Edit `build.gradle` and change field `buildmode` to `RELEASE` ex: `def buildmode = "RELEASE"` 6. Run the gradle command `build` via the IDE or gradlew.bat file (via command prompt: `gradlew.bat build`) + +Your .jar file is in `build/libs/`. # Debugging - Use VM arg `-Dfml.coreMods.load=me.rigamortis.seppuku.impl.fml.core.SeppukuLoadingPlugin` diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/combat/TotemNotifierModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/combat/TotemNotifierModule.java index 9837212..4ac86e1 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/combat/TotemNotifierModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/combat/TotemNotifierModule.java @@ -33,6 +33,7 @@ public class TotemNotifierModule extends Module { @Listener public void runTick(EventRunTick event) { if (event.getStage() == EventStageable.EventStage.PRE) { + if(mc.world == null) return; for(Entity entity : mc.world.loadedEntityList) { if (entity instanceof EntityLivingBase) { final Iterable stacks = entity.getEquipmentAndArmor(); diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/combat/VelocityModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/combat/VelocityModule.java index 2e01707..f19ab90 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/combat/VelocityModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/combat/VelocityModule.java @@ -26,6 +26,8 @@ public final class VelocityModule extends Module { public final Value explosions = new Value("Explosions", new String[]{"Explosions", "Explosion", "EXP", "EX", "Expl"}, "Apply velocity modifier on explosion velocity.", true); public final Value bobbers = new Value("Bobbers", new String[]{"Bobb", "Bob", "FishHook", "FishHooks"}, "Apply velocity modifier on fishing bobber velocity.", true); + public final Minecraft mc = Minecraft.getMinecraft(); + public VelocityModule() { super("Velocity", new String[]{"Vel", "AntiVelocity", "Knockback", "AntiKnockback"}, "Modify the velocity you take", "NONE", -1, ModuleType.COMBAT); } @@ -39,13 +41,12 @@ public final class VelocityModule extends Module { public void receivePacket(EventReceivePacket event) { if (event.getStage() == EventStageable.EventStage.PRE) { if (event.getPacket() instanceof SPacketEntityStatus && this.bobbers.getValue()) { - event.setCanceled(true); final SPacketEntityStatus packet = (SPacketEntityStatus) event.getPacket(); if (packet.getOpCode() == 31) { - final Entity entity = packet.getEntity(Minecraft.getMinecraft().world); + final Entity entity = packet.getEntity(mc.world); if (entity != null && entity instanceof EntityFishHook) { final EntityFishHook fishHook = (EntityFishHook) entity; - if (fishHook.caughtEntity == Minecraft.getMinecraft().player) { + if (fishHook.caughtEntity == mc.player) { event.setCanceled(true); } } @@ -53,7 +54,7 @@ public final class VelocityModule extends Module { } if (event.getPacket() instanceof SPacketEntityVelocity) { final SPacketEntityVelocity packet = (SPacketEntityVelocity) event.getPacket(); - if (packet.getEntityID() == Minecraft.getMinecraft().player.getEntityId()) { + if (packet.getEntityID() == mc.player.getEntityId()) { if (this.horizontal_vel.getValue() == 0 && this.vertical_vel.getValue() == 0) { event.setCanceled(true); return;