Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: seppukudevelopment/seppuku
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.2.1
Choose a base ref
...
head repository: seppukudevelopment/seppuku
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 12 commits
  • 11 files changed
  • 5 contributors

Commits on May 20, 2023

  1. Adds MapBoundsModule

    Old-Chum committed May 20, 2023
    Copy the full SHA
    9ed4ea7 View commit details
  2. Merge pull request #107 from Old-Chum/master

    Adds MapBoundsModule
    uoil authored May 20, 2023
    Copy the full SHA
    b794ef1 View commit details
  3. Copy the full SHA
    a455dc1 View commit details

Commits on May 29, 2023

  1. Thanks JetBrains!

    Ossian Winter authored May 29, 2023
    Copy the full SHA
    21d58fc View commit details

Commits on Jul 31, 2023

  1. Update GuiSeppukuMainMenu.java

    Removed the .html at the end of the link at line 121 so the redirect works
    ProfitDaGod authored Jul 31, 2023
    Copy the full SHA
    db52ae0 View commit details

Commits on Aug 1, 2023

  1. Update FpsGraphComponent.java

    fixed FPSGraph hud component being labled "(movement)" until in game
    ProfitDaGod authored Aug 1, 2023
    Copy the full SHA
    e3ba19d View commit details
  2. Merge pull request #108 from ProfitDaGod/profit-fixes

    Profit fixes
    uoil authored Aug 1, 2023
    Copy the full SHA
    2e1e5fc View commit details

Commits on Aug 19, 2023

  1. New features for AutoFishModule

    uoil committed Aug 19, 2023
    Copy the full SHA
    53980dd View commit details
  2. Update readme.md

    uoil authored Aug 19, 2023
    Copy the full SHA
    19bbb8a View commit details

Commits on Sep 26, 2023

  1. Copy the full SHA
    78f6631 View commit details
  2. Copy the full SHA
    89ecd7b View commit details
  3. Copy the full SHA
    f18e252 View commit details
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'

apply plugin: "com.github.johnrengelman.shadow"

version = "3.2.1"
version = "3.2.2"
group = "me.rigamortis"
archivesBaseName = "seppuku"
def buildmode = "IDE"
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# ![Seppuku](res/seppuku_full.png)
# ![Seppuku](res/seppuku_full.png) <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.svg" width="96" height="96">

[![Website](https://img.shields.io/website?down_color=lightgrey&down_message=offline&up_color=darkgreen&up_message=online&url=https%3A%2F%2Fseppuku.pw%2F)](https://seppuku.pw)
[![Discord](https://img.shields.io/discord/579516739092480000?color=lightblue)](https://discord.gg/kfqVQPpmCx)
[![License](https://img.shields.io/github/license/seppukudevelopment/seppuku)](https://github.com/seppukudevelopment/seppuku/blob/master/LICENSE)
[![GitHub Version](https://img.shields.io/github/v/release/seppukudevelopment/seppuku)](https://github.com/seppukudevelopment/seppuku/releases/latest)
![GitHub Lines](https://img.shields.io/tokei/lines/github/seppukudevelopment/seppuku)
[![GitHub Contributors](https://img.shields.io/github/contributors/seppukudevelopment/seppuku?color=lightgrey)](https://github.com/seppukudevelopment/seppuku/graphs/contributors)
![GitHub Language](https://img.shields.io/github/languages/top/seppukudevelopment/seppuku?color=9900ee)
[![Downloads](https://img.shields.io/github/downloads/seppukudevelopment/seppuku/total?color=9900ee)](https://github.com/seppukudevelopment/seppuku/releases/latest)
@@ -15,6 +14,8 @@ Originally oriented towards the 9B9T and 2B2T anarchy servers; it is a fully fea

Checkout the [guide](https://seppuku.pw/guide.html) for help.

*A special thanks to JetBrains, they've kindly provided our team with Open Source development licenses! Check out more [here](https://jb.gg/OpenSourceSupport).*

# Requirements
- **JDK 8** ([Corretto](https://aws.amazon.com/corretto/) or [Adoptium](https://adoptium.net/?variant=openjdk8) is recommended)
- **[Git](https://git-scm.com)** (optional)
54 changes: 54 additions & 0 deletions src/main/java/me/rigamortis/seppuku/api/util/RenderUtil.java
Original file line number Diff line number Diff line change
@@ -8,11 +8,13 @@
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL32;
import org.lwjgl.util.glu.Sphere;

import java.awt.*;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;

@@ -298,6 +300,58 @@ public static void drawBoundingBox(AxisAlignedBB bb, float width) {
tessellator.draw();
}

public static void renderFaceMesh (AxisAlignedBB bb, EnumFacing face, double stepSize, float width, int hex) {
if (face == EnumFacing.NORTH) {
for (double i = bb.minX; i <= bb.maxX; i += stepSize) {
drawLine3D(i, bb.minY, bb.minZ, i, bb.maxY, bb.minZ, width, hex);
}

for (double i = bb.minY; i <= bb.maxY; i += stepSize) {
drawLine3D(bb.minX, i, bb.minZ, bb.maxX, i, bb.minZ, width, hex);
}
} else if (face == EnumFacing.SOUTH) {
for (double i = bb.minX; i <= bb.maxX; i += stepSize) {
drawLine3D(i, bb.minY, bb.maxZ, i, bb.maxY, bb.maxZ, width, hex);
}

for (double i = bb.minY; i <= bb.maxY; i += stepSize) {
drawLine3D(bb.minX, i, bb.maxZ, bb.maxX, i, bb.maxZ, width, hex);
}
} else if (face == EnumFacing.EAST) {
for (double i = bb.minZ; i <= bb.maxZ; i += stepSize) {
drawLine3D(bb.maxX, bb.minY, i, bb.maxX, bb.maxY, i, width, hex);
}

for (double i = bb.minY; i <= bb.maxY; i += stepSize) {
drawLine3D(bb.maxX, i, bb.minZ, bb.maxX, i, bb.maxZ, width, hex);
}
} else if (face == EnumFacing.WEST) {
for (double i = bb.minZ; i <= bb.maxZ; i += stepSize) {
drawLine3D(bb.minX, bb.minY, i, bb.minX, bb.maxY, i, width, hex);
}

for (double i = bb.minY; i <= bb.maxY; i += stepSize) {
drawLine3D(bb.minX, i, bb.minZ, bb.minX, i, bb.maxZ, width, hex);
}
} else if (face == EnumFacing.UP) {
for (double i = bb.minX; i <= bb.maxX; i += stepSize) {
drawLine3D(i, bb.maxY, bb.minZ, i, bb.maxY, bb.maxZ, width, hex);
}

for (double i = bb.minZ; i <= bb.maxZ; i += stepSize) {
drawLine3D(bb.minX, bb.maxY, i, bb.maxX, bb.maxY, i, width, hex);
}
} else if (face == EnumFacing.DOWN) {
for (double i = bb.minX; i <= bb.maxX; i += stepSize) {
drawLine3D(i, bb.minY, bb.minZ, i, bb.minY, bb.maxZ, width, hex);
}

for (double i = bb.minZ; i <= bb.maxZ; i += stepSize) {
drawLine3D(bb.minX, bb.minY, i, bb.maxX, bb.minY, i, width, hex);
}
}
}

public static void drawBoundingBox(AxisAlignedBB bb, float width, int color) {
final float alpha = (color >> 24 & 0xFF) / 255.0F;
final float red = (color >> 16 & 0xFF) / 255.0F;
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ public final class PlayCommand extends Command {
private final File directory;

public PlayCommand() {
super("Play", new String[]{"playsong", "begin"}, "Plays a song file from your /Seppuku/Songs/ directory.", ".play <song file name>");
super("Play", new String[]{"playsong", "begin"}, "Plays a song file from your /Seppuku/Config/<current config>/Songs/ directory.", ".play <midi file name>");

this.directory = new File(Seppuku.INSTANCE.getConfigManager().getConfigDir(), "Songs");
if (!directory.exists()) {
@@ -27,6 +27,21 @@ public PlayCommand() {
public void exec(String input) {
if (!this.clamp(input, 2, 2)) {
this.printUsage();
if (!this.directory.exists())
return;
final StringBuilder listedFilesBuilder = new StringBuilder();
final String[] fileList = this.directory.list();
if (fileList == null)
return;
if (fileList.length == 0 || fileList.length > 100)
return;
for (int i = 0; i < fileList.length; i++) {
String s = fileList[i].replaceAll(".midi", "").replaceAll(".mid", "");
listedFilesBuilder.append(ChatFormatting.GREEN).append(s);
if (i != fileList.length - 1)
listedFilesBuilder.append(ChatFormatting.GRAY).append(", ");
}
Seppuku.INSTANCE.logChat(ChatFormatting.GRAY + listedFilesBuilder.toString());
return;
}

Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
@Mod(modid = "seppukumod", name = "Seppuku", version = SeppukuMod.VERSION)
public final class SeppukuMod {

public static final String VERSION = "3.2.1";
public static final String VERSION = "3.2.2";

/**
* Our mods entry point
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ public void render(int mouseX, int mouseY, float partialTicks) {
// border
RenderUtil.drawBorderedRectBlurred(this.getX(), this.getY(), this.getX() + this.getW(), this.getY() + this.getH(), 2.0f, 0x00000000, 0x90101010);
} else {
mc.fontRenderer.drawStringWithShadow("(movement)", this.getX(), this.getY(), 0xFFAAAAAA);
mc.fontRenderer.drawStringWithShadow("(fps graph)", this.getX(), this.getY(), 0xFFAAAAAA);
}
}

Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@ public void action() {

if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
try {
desktop.browse(new URL("https://seppuku.pw/donate.html").toURI());
desktop.browse(new URL("https://seppuku.pw/donate").toURI());
} catch (Exception e) {
e.printStackTrace();
}
Original file line number Diff line number Diff line change
@@ -7,14 +7,14 @@
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.util.ResourceLocation;
import org.apache.commons.io.IOUtils;
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -49,30 +49,23 @@ public void displayCape(EventCapeLocation event) {
}

public void downloadCapeUsers() {
// Thread t = new Thread(new Runnable() {
// public void run() {
// }
// });
// t.start();
try {
URL url = new URL("https://seppuku.pw/capes/");
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.addRequestProperty("User-Agent", "Mozilla/4.76");
final BufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
if (!line.startsWith("<pre>") && !line.startsWith("</pre>") && line.length() > 1) {
final String[] split = line.split(";");
final List<String> lines = IOUtils.readLines(httpURLConnection.getInputStream(), StandardCharsets.UTF_8);
lines.stream().filter(line -> line.contains(";")).forEach(line -> {
final String[] split = line.split(";");
if (split.length > 1) {
if (split[0] != null && split[1] != null) {
if (split[1].toLowerCase().endsWith("png")) {
this.capeUserList.add(new CapeUser(split[0], split[1]));
}
}
}
}
reader.close();
});
} catch (Exception e) {
//e.printStackTrace();
e.printStackTrace();
}
}

Original file line number Diff line number Diff line change
@@ -178,6 +178,7 @@ public ModuleManager() {
add(new ChestFarmerModule());
add(new FastProjectile());
add(new PearlDupeModule());
add(new MapBoundsModule());
// p2w experience

if (Seppuku.INSTANCE.getCapeManager().hasCape())
Original file line number Diff line number Diff line change
@@ -3,43 +3,111 @@
import me.rigamortis.seppuku.api.event.EventStageable;
import me.rigamortis.seppuku.api.event.network.EventReceivePacket;
import me.rigamortis.seppuku.api.module.Module;
import me.rigamortis.seppuku.api.value.Value;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.multiplayer.PlayerControllerMP;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.ClickType;
import net.minecraft.item.ItemFishingRod;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.CPacketPlayerTryUseItem;
import net.minecraft.network.play.server.SPacketSoundEffect;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;

/**
* Author Seth
* 4/22/2019 @ 6:21 AM.
* @author Seth 2019
* @author uoil 2023
*/
public final class AutoFishModule extends Module {

public final Value<Boolean> durability = new Value<>("Durability", new String[]{"dura", "durabilitycheck", "d"}, "Saves the current rod before it breaks", true);
public final Value<Integer> durabilityLimit = new Value<>("DurabilityLimit", new String[]{"duralimit", "limit", "dl"}, "Minimum durability to stop using a rod", 5, 1, 10, 1);
public final Value<Boolean> swap = new Value<>("Swap", new String[]{"autoswap", "newrod", "s"}, "If the current rod is almost broken, swaps to a new rod", true);
public final Value<Integer> swapSlot = new Value<Integer>("Slot", new String[]{"s"}, "The hot-bar slot to put the fishing rod into (45 for offhand)", 43, 0, 45, 1);

public AutoFishModule() {
super("AutoFish", new String[]{"AutomaticFish"}, "Automatically catches fish and recasts", "NONE", -1, ModuleType.MISC);
}

@Listener
public void receivePacket(EventReceivePacket event) {
if (event.getStage() == EventStageable.EventStage.PRE) {

if (event.getPacket() instanceof SPacketSoundEffect) {
final SPacketSoundEffect packet = (SPacketSoundEffect) event.getPacket();
if (packet.getCategory() == SoundCategory.NEUTRAL && packet.getSound() == SoundEvents.ENTITY_BOBBER_SPLASH) {
final Minecraft mc = Minecraft.getMinecraft();
final ItemStack itemStackInMainHand = mc.player.getHeldItemMainhand();
final ItemStack itemStackInOffHand = mc.player.getHeldItemOffhand();
final boolean holdingFishingRodMain = itemStackInMainHand.getItem() instanceof ItemFishingRod;
final boolean holdingFishingRodOff = itemStackInOffHand.getItem() instanceof ItemFishingRod;
final boolean holdingFishingRod = holdingFishingRodMain || holdingFishingRodOff;
final EnumHand rodHand = holdingFishingRodMain ? EnumHand.MAIN_HAND : EnumHand.OFF_HAND;
final int damageMainHand = itemStackInMainHand.getMaxDamage() - itemStackInMainHand.getItemDamage();
final int damageOffHand = itemStackInOffHand.getMaxDamage() - itemStackInOffHand.getItemDamage();
if (holdingFishingRod) {
if ((holdingFishingRodMain && (damageMainHand) <= this.durabilityLimit.getValue() + 1)
|| (holdingFishingRodOff && (damageOffHand) <= this.durabilityLimit.getValue() + 1)) {
if (this.swap.getValue()) {
this.doSwap(mc.player, mc.playerController);
this.catchAndThrow(mc.player, rodHand);
return;
}
if (this.durability.getValue()) { // check durability before re-throw
return;
}
}

if (mc.player.getHeldItemMainhand().getItem() instanceof ItemFishingRod) {
mc.player.connection.sendPacket(new CPacketPlayerTryUseItem(EnumHand.MAIN_HAND));
mc.player.swingArm(EnumHand.MAIN_HAND);
mc.player.connection.sendPacket(new CPacketPlayerTryUseItem(EnumHand.MAIN_HAND));
mc.player.swingArm(EnumHand.MAIN_HAND);
this.catchAndThrow(mc.player, rodHand);
}
}
}
}
}

private void catchAndThrow(final EntityPlayerSP player, final EnumHand rodHand) {
player.connection.sendPacket(new CPacketPlayerTryUseItem(rodHand));
player.swingArm(rodHand);
player.connection.sendPacket(new CPacketPlayerTryUseItem(rodHand));
player.swingArm(rodHand);
}

private void doSwap(final EntityPlayerSP player, final PlayerControllerMP playerController) {
int bestDurability = -1;
int bestSlot = -1;
for (int slot = 44; slot > 8; slot--) {
ItemStack itemStack = Minecraft.getMinecraft().player.inventoryContainer.getSlot(slot).getStack();
if (itemStack.isEmpty())
continue;

int dura = itemStack.getMaxDamage() - itemStack.getItemDamage();
if (itemStack.getItem() instanceof ItemFishingRod && dura > this.durabilityLimit.getValue()) {
if (dura > bestDurability) {
bestDurability = dura;
bestSlot = slot;
}
}
}

if (bestSlot != -1) {
if (this.swapSlot.getValue() != 45) {
if (bestSlot < 36) {
playerController.windowClick(0, this.swapSlot.getValue(), 0, ClickType.QUICK_MOVE, player); // last hot-bar slot
playerController.windowClick(0, bestSlot, 0, ClickType.PICKUP, player);
playerController.windowClick(0, this.swapSlot.getValue(), 0, ClickType.PICKUP, player);
player.inventory.currentItem = this.swapSlot.getValue() - 36;
} else {
player.inventory.currentItem = bestSlot - 36; // in the hot-bar, so remove the inventory offset
}
} // we need this rod in the offhand
else if (!(player.getHeldItemOffhand().getItem() instanceof ItemFishingRod)) {
playerController.windowClick(0, 45, 0, ClickType.QUICK_MOVE, player); // offhand slot
playerController.windowClick(0, bestSlot, 0, ClickType.PICKUP, player);
playerController.windowClick(0, 45, 0, ClickType.PICKUP, player);
}
}

}
}
Loading