Merge branch 'main' of ssh://tudbut.de:222/BaseBand/BaseBandRewrite
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m39s
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m39s
This commit is contained in:
commit
98d4226bce
4 changed files with 83 additions and 97 deletions
|
@ -45,27 +45,21 @@ public class ESP extends Feature {
|
||||||
|
|
||||||
if(entities) {
|
if(entities) {
|
||||||
for (Entity entity : Minecraft.getMinecraft().world.loadedEntityList) {
|
for (Entity entity : Minecraft.getMinecraft().world.loadedEntityList) {
|
||||||
AxisAlignedBB interp = RenderAdapter.getInterpEntityBB(entity, event.getPartialTicks());
|
AxisAlignedBB interp = RenderAdapter.getLiveEntityBB(entity, event.getPartialTicks());
|
||||||
if(fill) {
|
if(fill)
|
||||||
|
RenderAdapter.drawAABB(interp, Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
||||||
|
if(wireframe)
|
||||||
RenderAdapter.drawAABBLines(interp, Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
RenderAdapter.drawAABBLines(interp, Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wireframe) {
|
|
||||||
RenderAdapter.drawAABBLines(interp, Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tileEntities) {
|
if(tileEntities) {
|
||||||
for (TileEntity entity : Minecraft.getMinecraft().world.loadedTileEntityList) {
|
for (TileEntity entity : Minecraft.getMinecraft().world.loadedTileEntityList) {
|
||||||
if(fill) {
|
if(fill)
|
||||||
|
RenderAdapter.drawAABB(entity.getRenderBoundingBox(), Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
||||||
|
if(wireframe)
|
||||||
RenderAdapter.drawAABBLines(entity.getRenderBoundingBox(), Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
RenderAdapter.drawAABBLines(entity.getRenderBoundingBox(), Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wireframe) {
|
|
||||||
RenderAdapter.drawAABBLines(entity.getRenderBoundingBox(), Features.getFeature(Client.class).theme.getGreenColor(), eye);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package de.com.baseband.client.util.render;
|
package de.com.baseband.client.util.render;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.item.EntityItemFrame;
|
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -225,11 +224,7 @@ public class RenderAdapter {
|
||||||
depth(false);
|
depth(false);
|
||||||
begin(GL11.GL_QUADS);
|
begin(GL11.GL_QUADS);
|
||||||
|
|
||||||
double entityHalfed = (box.maxX - box.minX) / 2;
|
drawAABBNow(box);
|
||||||
double entityHeight = (box.maxY - box.minY);
|
|
||||||
Vec3d pos = new Vec3d(box.maxX - entityHalfed, box.minY, box.maxZ - entityHalfed);
|
|
||||||
|
|
||||||
drawAABBNow(pos, entityHalfed, entityHeight);
|
|
||||||
|
|
||||||
end();
|
end();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -237,42 +232,42 @@ public class RenderAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void drawAABBNow(Vec3d halfPos, double entityHalfed, double entityHeight) {
|
private static void drawAABBNow(AxisAlignedBB bb) {
|
||||||
// bottom
|
// bottom
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
|
|
||||||
// top
|
// top
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
|
|
||||||
// z -
|
// z -
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
|
|
||||||
// z +
|
// z +
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
|
|
||||||
// x -
|
// x -
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
put(halfPos.x - entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
|
|
||||||
// y +
|
// y +
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y + entityHeight, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z + entityHalfed);
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
put(halfPos.x + entityHalfed, halfPos.y - 0.01, halfPos.z - entityHalfed);
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -293,62 +288,59 @@ public class RenderAdapter {
|
||||||
begin(GL11.GL_LINES);
|
begin(GL11.GL_LINES);
|
||||||
|
|
||||||
|
|
||||||
put(bb.minX, bb.minY, bb.minZ);
|
drawAABBLinesNow(bb);
|
||||||
put(bb.maxX, bb.minY, bb.minZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.minY, bb.minZ);
|
|
||||||
put(bb.minX, bb.minY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.maxX, bb.minY, bb.minZ);
|
|
||||||
put(bb.maxX, bb.minY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.minY, bb.maxZ);
|
|
||||||
put(bb.maxX, bb.minY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.minY, bb.minZ);
|
|
||||||
put(bb.minX, bb.maxY, bb.minZ);
|
|
||||||
|
|
||||||
put(bb.maxX, bb.minY, bb.minZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.minZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.minY, bb.maxZ);
|
|
||||||
put(bb.minX, bb.maxY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.maxX, bb.minY, bb.maxZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.maxX, bb.minY, bb.minZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.minZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.maxY, bb.minZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.minZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.maxY, bb.minZ);
|
|
||||||
put(bb.minX, bb.maxY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.maxX, bb.maxY, bb.minZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.maxZ);
|
|
||||||
|
|
||||||
put(bb.minX, bb.maxY, bb.maxZ);
|
|
||||||
put(bb.maxX, bb.maxY, bb.maxZ);
|
|
||||||
|
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void drawAABBLinesNow(AxisAlignedBB bb) {
|
||||||
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
|
|
||||||
//TwelveMod, Less Jitter? Interp even? :smile:
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
public static AxisAlignedBB getInterpEntityBB(Entity entity, float partialTicks) {
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
if(entity instanceof EntityItemFrame) {
|
|
||||||
return entity.getEntityBoundingBox();
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.minY, bb.minZ);
|
||||||
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
|
|
||||||
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.minY, bb.maxZ);
|
||||||
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.maxX, bb.minY, bb.maxZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.maxX, bb.minY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.maxY, bb.minZ);
|
||||||
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.maxX, bb.maxY, bb.minZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
|
|
||||||
|
put(bb.minX, bb.maxY, bb.maxZ);
|
||||||
|
put(bb.maxX, bb.maxY, bb.maxZ);
|
||||||
}
|
}
|
||||||
double x = entity.prevPosX + (entity.posX - entity.prevPosX) * (double) partialTicks;
|
|
||||||
double y = entity.prevPosY + (entity.posY - entity.prevPosY) * (double) partialTicks;
|
|
||||||
double z = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double) partialTicks;
|
|
||||||
|
|
||||||
double xW = entity.getEntityBoundingBox().maxX - entity.getEntityBoundingBox().minX;
|
public static AxisAlignedBB getLiveEntityBB(Entity entity, float partialTicks) {
|
||||||
double yH = entity.getEntityBoundingBox().maxY - entity.getEntityBoundingBox().minY;
|
AxisAlignedBB bb = entity.getEntityBoundingBox();
|
||||||
double zW = entity.getEntityBoundingBox().maxZ - entity.getEntityBoundingBox().minZ;
|
|
||||||
|
|
||||||
return new AxisAlignedBB(x, y, z, x + xW, y + yH, z + zW).offset(-xW / 2, 0, -zW / 2);
|
double shiftX = (entity.posX - entity.prevPosX) * (double) partialTicks;
|
||||||
|
double shiftY = (entity.posY - entity.prevPosY) * (double) partialTicks;
|
||||||
|
double shiftZ = (entity.posZ - entity.prevPosZ) * (double) partialTicks;
|
||||||
|
|
||||||
|
return bb.offset(shiftX, shiftY, shiftZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class TextSplitter {
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
String drawText = codes + split[i] + "§r";
|
String drawText = codes + split[i] + "§r";
|
||||||
int drawX = rtl ? x + width - fontRenderer.getStringWidth(drawText) : x;
|
int drawX = rtl ? x + width - fontRenderer.getStringWidth(drawText) : x;
|
||||||
fontRenderer.drawString(drawText, (float) x, (float) y + fontRenderer.FONT_HEIGHT * i, color, shadow);
|
fontRenderer.drawString(drawText, (float) drawX, (float) y + fontRenderer.FONT_HEIGHT * i, color, shadow);
|
||||||
codes.append(split[i].replaceAll("[^§]*?(§\\w)?[^§]*", "$1"));
|
codes.append(split[i].replaceAll("[^§]*?(§\\w)?[^§]*", "$1"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class CustomClassLoader extends ClassLoader implements Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Class<?> loadBBClass(String name) {
|
private Class<?> loadBBClass(String name) {
|
||||||
Set<ClassLoader> uniqueClassLoaders = Thread.getAllStackTraces().keySet().stream()
|
/*Set<ClassLoader> uniqueClassLoaders = Thread.getAllStackTraces().keySet().stream()
|
||||||
.map(Thread::getContextClassLoader)
|
.map(Thread::getContextClassLoader)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
@ -156,7 +156,7 @@ public class CustomClassLoader extends ClassLoader implements Util {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
final byte[][] bytes = {null};
|
final byte[][] bytes = {null};
|
||||||
binaryKeeper.access(m -> bytes[0] = m.getValue().get(name.replace('.', '/') + ".class"));
|
binaryKeeper.access(m -> bytes[0] = m.getValue().get(name.replace('.', '/') + ".class"));
|
||||||
if (bytes[0] != null) {
|
if (bytes[0] != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue