Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
noil | f18e252d52 | |
noil | 89ecd7b709 | |
noil | 78f663158c | |
noil | 19bbb8a5e7 | |
noil | 53980dd831 | |
noil | 2e1e5fcd69 | |
prof | e3ba19d1c1 | |
prof | db52ae0000 | |
Ossian Winter | 21d58fc5b2 | |
noil | a455dc19a0 | |
noil | b794ef1e8d | |
Old Chum | 9ed4ea7fe2 |
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -8,11 +8,13 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||
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 final class RenderUtil {
|
|||
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;
|
||||
|
|
|
@ -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 final class PlayCommand extends Command {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
|||
@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
|
||||
|
|
|
@ -135,7 +135,7 @@ public final class FpsGraphComponent extends ResizableHudComponent {
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ public final class GuiSeppukuMainMenu extends GuiScreen {
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@ import net.minecraft.client.Minecraft;
|
|||
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 final class CapeManager {
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ public final class ModuleManager {
|
|||
add(new ChestFarmerModule());
|
||||
add(new FastProjectile());
|
||||
add(new PearlDupeModule());
|
||||
add(new MapBoundsModule());
|
||||
// p2w experience
|
||||
|
||||
if (Seppuku.INSTANCE.getCapeManager().hasCape())
|
||||
|
|
|
@ -3,9 +3,14 @@ package me.rigamortis.seppuku.impl.module.misc;
|
|||
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;
|
||||
|
@ -13,11 +18,16 @@ 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);
|
||||
}
|
||||
|
@ -25,21 +35,79 @@ public final class AutoFishModule extends Module {
|
|||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package me.rigamortis.seppuku.impl.module.render;
|
||||
|
||||
import me.rigamortis.seppuku.api.event.render.EventRender3D;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.util.RenderUtil;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Old Chum
|
||||
* @since 5/20/2023
|
||||
*/
|
||||
public class MapBoundsModule extends Module {
|
||||
public Value<Boolean> throughWalls = new Value<Boolean>("ThroughWalls", new String[]{"Walls", "Wall", "w", "Through", "Thru"}, "If rendering should go through walls", false);
|
||||
public Value<Color> outlineColor = new Value<Color>("OutlineColor", new String[]{"OC", "OutC", "OColor", "Outline"}, "The color the outline should be", new Color(75, 25, 255, 255));
|
||||
public Value<Color> gridColor = new Value<Color>("GridColor", new String[]{"GC", "GridC", "GColor", "Grid"}, "The color the grid should be", new Color(5, 155, 0, 255));
|
||||
|
||||
public MapBoundsModule() {
|
||||
super("MapBounds", new String[]{"MBounds", "ShowMaps", "MapBoundaries"}, "Shows the boundaries of the map you are currently standing in.", -1, ModuleType.RENDER);
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onRender3d (EventRender3D event) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
double minX = (int) Math.floor((mc.player.posX + 64) / 128) * 128 - 64;
|
||||
double minZ = ((int) Math.floor((mc.player.posZ + 64) / 128) * 128 - 64);
|
||||
|
||||
AxisAlignedBB bb = new AxisAlignedBB(minX, 0, minZ, minX + 127, 255, minZ + 127);
|
||||
|
||||
RenderUtil.begin3D();
|
||||
|
||||
// begin3D() disables depth
|
||||
if (!this.throughWalls.getValue()) {
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
for (EnumFacing face : EnumFacing.HORIZONTALS) {
|
||||
RenderUtil.renderFaceMesh(interpolateBB(bb, event.getPartialTicks()), face, 8.0D, 1, gridColor.getValue().getRGB());
|
||||
}
|
||||
|
||||
RenderUtil.drawBoundingBox(interpolateBB(bb, event.getPartialTicks()), 2, outlineColor.getValue().getRGB());
|
||||
RenderUtil.end3D();
|
||||
}
|
||||
|
||||
public static AxisAlignedBB interpolateBB (AxisAlignedBB bb, float partialTicks) {
|
||||
EntityPlayer entityplayer = Minecraft.getMinecraft().player;
|
||||
double ix = entityplayer.lastTickPosX + (entityplayer.posX - entityplayer.lastTickPosX) * (double)partialTicks;
|
||||
double iy = entityplayer.lastTickPosY + (entityplayer.posY - entityplayer.lastTickPosY) * (double)partialTicks;
|
||||
double iz = entityplayer.lastTickPosZ + (entityplayer.posZ - entityplayer.lastTickPosZ) * (double)partialTicks;
|
||||
|
||||
return new AxisAlignedBB(
|
||||
bb.minX - ix,
|
||||
bb.minY - iy,
|
||||
bb.minZ - iz,
|
||||
bb.maxX - ix + 1,
|
||||
bb.maxY - iy + 1,
|
||||
bb.maxZ - iz + 1
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue