readme.md formatting, fix VelocityModule and optimize, fix TotemNotifierModule null check
This commit is contained in:
parent
89d5fdcb91
commit
92c63dfbc3
24
readme.md
24
readme.md
|
@ -1,6 +1,6 @@
|
||||||
# ![Seppuku](res/seppuku_full.png)
|
# ![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
|
# Requirements
|
||||||
- **JDK 8** (https://adoptopenjdk.net/, https://aws.amazon.com/corretto/)
|
- **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
|
# Building
|
||||||
|
|
||||||
### Linux / Mac
|
### Linux / Mac
|
||||||
1. Clone the repository `git clone git@github.com:seppukudevelopment/seppuku.git`
|
1. Clone the repository: `git clone git@github.com:seppukudevelopment/seppuku.git`
|
||||||
2. Run `gradlew setupDecompWorkspace`
|
2. Run `gradlew setupDecompWorkspace`
|
||||||
3. Edit `build.gradle` and change field `buildmode` to `RELEASE` ex: `def
|
3. Edit `build.gradle` and change field `buildmode` to `RELEASE`. (e.g. `def
|
||||||
buildmode = "RELEASE"`
|
buildmode = "RELEASE"`)
|
||||||
4. Run `gradlew build`
|
4. Run `gradlew build`.
|
||||||
|
|
||||||
|
Your .jar file is in `build/libs/`.
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
> Highly recommend using a git shell for Windows and using the linux guide above. (https://git-scm.com/downloads)
|
> Using a git shell for Windows and using the linux guide above is highly recommended. (https://git-scm.com/downloads)
|
||||||
1. Clone the repository
|
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.)
|
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`)
|
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)
|
4. Refresh the project (reload ide / refresh gradle workspace)
|
||||||
5. Edit `build.gradle` and change field `buildmode` to `RELEASE` ex: `def
|
5. Edit `build.gradle` and change field `buildmode` to `RELEASE` ex: `def
|
||||||
buildmode = "RELEASE"`
|
buildmode = "RELEASE"`
|
||||||
6. Run the gradle command `build` via the IDE or gradlew.bat file (via
|
6. Run the gradle command `build` via the IDE or gradlew.bat file (via
|
||||||
command prompt: `gradlew.bat build`)
|
command prompt: `gradlew.bat build`)
|
||||||
|
|
||||||
|
Your .jar file is in `build/libs/`.
|
||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
- Use VM arg `-Dfml.coreMods.load=me.rigamortis.seppuku.impl.fml.core.SeppukuLoadingPlugin`
|
- Use VM arg `-Dfml.coreMods.load=me.rigamortis.seppuku.impl.fml.core.SeppukuLoadingPlugin`
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class TotemNotifierModule extends Module {
|
||||||
@Listener
|
@Listener
|
||||||
public void runTick(EventRunTick event) {
|
public void runTick(EventRunTick event) {
|
||||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||||
|
if(mc.world == null) return;
|
||||||
for(Entity entity : mc.world.loadedEntityList) {
|
for(Entity entity : mc.world.loadedEntityList) {
|
||||||
if (entity instanceof EntityLivingBase) {
|
if (entity instanceof EntityLivingBase) {
|
||||||
final Iterable<ItemStack> stacks = entity.getEquipmentAndArmor();
|
final Iterable<ItemStack> stacks = entity.getEquipmentAndArmor();
|
||||||
|
|
|
@ -26,6 +26,8 @@ public final class VelocityModule extends Module {
|
||||||
public final Value<Boolean> explosions = new Value("Explosions", new String[]{"Explosions", "Explosion", "EXP", "EX", "Expl"}, "Apply velocity modifier on explosion velocity.", true);
|
public final Value<Boolean> explosions = new Value("Explosions", new String[]{"Explosions", "Explosion", "EXP", "EX", "Expl"}, "Apply velocity modifier on explosion velocity.", true);
|
||||||
public final Value<Boolean> bobbers = new Value("Bobbers", new String[]{"Bobb", "Bob", "FishHook", "FishHooks"}, "Apply velocity modifier on fishing bobber velocity.", true);
|
public final Value<Boolean> 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() {
|
public VelocityModule() {
|
||||||
super("Velocity", new String[]{"Vel", "AntiVelocity", "Knockback", "AntiKnockback"}, "Modify the velocity you take", "NONE", -1, ModuleType.COMBAT);
|
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) {
|
public void receivePacket(EventReceivePacket event) {
|
||||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||||
if (event.getPacket() instanceof SPacketEntityStatus && this.bobbers.getValue()) {
|
if (event.getPacket() instanceof SPacketEntityStatus && this.bobbers.getValue()) {
|
||||||
event.setCanceled(true);
|
|
||||||
final SPacketEntityStatus packet = (SPacketEntityStatus) event.getPacket();
|
final SPacketEntityStatus packet = (SPacketEntityStatus) event.getPacket();
|
||||||
if (packet.getOpCode() == 31) {
|
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) {
|
if (entity != null && entity instanceof EntityFishHook) {
|
||||||
final EntityFishHook fishHook = (EntityFishHook) entity;
|
final EntityFishHook fishHook = (EntityFishHook) entity;
|
||||||
if (fishHook.caughtEntity == Minecraft.getMinecraft().player) {
|
if (fishHook.caughtEntity == mc.player) {
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +54,7 @@ public final class VelocityModule extends Module {
|
||||||
}
|
}
|
||||||
if (event.getPacket() instanceof SPacketEntityVelocity) {
|
if (event.getPacket() instanceof SPacketEntityVelocity) {
|
||||||
final SPacketEntityVelocity packet = (SPacketEntityVelocity) event.getPacket();
|
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) {
|
if (this.horizontal_vel.getValue() == 0 && this.vertical_vel.getValue() == 0) {
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue