-
Автор темы
- #1
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
Java:
package me.gumballoff.gumballoff.module.modules;
import me.gumballoff.gumballoff.clickgui.setting.SettingManager;
import me.gumballoff.gumballoff.clickgui.setting.settings.ModeSetting;
import me.gumballoff.gumballoff.module.Module;
import me.gumballoff.gumballoff.module.ModuleInfo;
import me.gumballoff.gumballoff.utils.ColorUtil;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import java.awt.Color;
import java.util.ArrayList;
import static me.gumballoff.gumballoff.GUMBALLOFF.mc;
import static org.lwjgl.opengl.GL11.*;
@ModuleInfo(name = "Trails", key = Keyboard.KEY_NONE, category = Module.Category.Visual, description = "За вами следует красивая линия")
public class Trails extends Module {
ArrayList<Point> points = new ArrayList<>();
ModeSetting color = new ModeSetting("Color", this, "Client", "Client", "Astrolfo");
public Trails() {
addSettings(color);
}
@SubscribeEvent
public void onRender(RenderWorldLastEvent e) {
points.removeIf(p -> p.age >= 100);
float x = (float) (mc.player.lastTickPosX + (mc.player.posX - mc.player.lastTickPosX) * e.getPartialTicks());
float y = (float) (mc.player.lastTickPosY + (mc.player.posY - mc.player.lastTickPosY) * e.getPartialTicks());
float z = (float) (mc.player.lastTickPosZ + (mc.player.posZ - mc.player.lastTickPosZ) * e.getPartialTicks());
points.add(new Point((float) (x), y, (float) (z)));
GL11.glPushMatrix();
GL11.glDisable(GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_CULL_FACE);
for (final Point t : points) {
if (points.indexOf(t) >= points.size() - 1) continue;
Point temp = points.get(points.indexOf(t) + 1);
float a = 125;
a = 125 * (points.indexOf(t) / (float) points.size());
Color color = Color.WHITE;
if (this.color.getModeValue().equals("Client")) {
color = new Color((int) SettingManager.getSettingByName("Color", "Red").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Green").getNumberValue(), (int) SettingManager.getSettingByName("Color", "Blue").getNumberValue());
} else {
color = ColorUtil.astolfoColors45(t.age - t.age + 1, t.age, 0.5f, 10);
}
Color c = setAlpha(color, (int) a);
glBegin(GL_QUAD_STRIP);
final double x2 = t.x - mc.getRenderManager().viewerPosX;
final double y2 = t.y - mc.getRenderManager().viewerPosY;
final double z2 = t.z - mc.getRenderManager().viewerPosZ;
final double x1 = temp.x - mc.getRenderManager().viewerPosX;
final double y1 = temp.y - mc.getRenderManager().viewerPosY;
final double z1 = temp.z - mc.getRenderManager().viewerPosZ;
glColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), 0).getRGB());
glVertex3d(x2, y2 + mc.player.height - 0.1, z2);
glColor(c.getRGB());
glVertex3d(x2, y2 + 0.2, z2);
glVertex3d(x1, y1 + mc.player.height - 0.1, z1);
glVertex3d(x1, y1 + 0.2, z1);
glEnd();
++t.age;
}
GlStateManager.resetColor();
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
@Override
public void disable() {
points.clear();
super.disable();
}
class Point {
public final float x, y, z;
public float age = 0;
public Point(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
}
public static void glColor(int hex) {
float alpha = (hex >> 24 & 0xFF) / 255.0F;
float red = (hex >> 16 & 0xFF) / 255.0F;
float green = (hex >> 8 & 0xFF) / 255.0F;
float blue = (hex & 0xFF) / 255.0F;
GL11.glColor4f(red, green, blue, alpha);
}
public static Color setAlpha(Color color, int alpha) {
alpha = MathHelper.clamp(alpha, 0, 255);
return new Color(color.getRed(), color.getGreen(), color.getBlue(), alpha);
}
}
JumpCircles:
package me.gumballoff.gumballoff.module.modules;
import me.gumballoff.gumballoff.clickgui.setting.SettingManager;
import me.gumballoff.gumballoff.clickgui.setting.settings.ModeSetting;
import me.gumballoff.gumballoff.module.Module;
import me.gumballoff.gumballoff.module.ModuleInfo;
import me.gumballoff.gumballoff.utils.TimerUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static me.gumballoff.gumballoff.GUMBALLOFF.mc;
@ModuleInfo(name = "JumpCircles", key = Keyboard.KEY_NONE, category = Module.Category.Visual, description = "Рисует красивый круг, если вы прыгнули")
public class JumpCircles extends Module {
static final int TYPE = 0;
static final byte MAX_JC_TIME = 20;
static List<Circle> circles = new ArrayList();
ModeSetting mode = new ModeSetting("Mode", this, "Disc", "Disc", "NONE");
TimerUtil spawnDelay = new TimerUtil();
public JumpCircles() {
addSettings(mode);
}
@SubscribeEvent
public void onJump(TickEvent.ClientTickEvent event) {
if (mc.player != null && mc.world != null && spawnDelay.hasReached(100)) {
if (mc.player.motionY == 0.33319999363422365) {
handleEntityJump(mc.player);
spawnDelay.reset();
}
onLocalPlayerUpdate(mc.player);
}
}
@SubscribeEvent
public void onRender(RenderWorldLastEvent e) {
EntityPlayerSP client = Minecraft.getMinecraft().player;
double ix = -(client.lastTickPosX + (client.posX - client.lastTickPosX) * mc.getRenderPartialTicks());
double iy = -(client.lastTickPosY + (client.posY - client.lastTickPosY) * mc.getRenderPartialTicks());
double iz = -(client.lastTickPosZ + (client.posZ - client.lastTickPosZ) * mc.getRenderPartialTicks());
if (mode.getModeValue().equals("Disc")) {
GL11.glPushMatrix();
GL11.glTranslated(ix, iy, iz);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glShadeModel(GL11.GL_SMOOTH);
Collections.reverse(circles);
try {
for (Circle c : circles) {
float k = (float) c.existed / MAX_JC_TIME;
double x = c.position().x;
double y = c.position().y - k * 0.5;
double z = c.position().z;
float start = k;
float end = start + 1f - k;
GL11.glBegin(GL11.GL_QUAD_STRIP);
for (int i = 0; i <= 360; i = i + 5) {
GL11.glColor4f((float) c.color().x, (float) c.color().y, (float) c.color().z,
0.2f * (1 - ((float) c.existed / MAX_JC_TIME)));
GL11.glVertex3d(x + Math.cos(Math.toRadians(i * 4)) * start, y, z + Math.sin(Math.toRadians(i * 4)) * start);
GL11.glColor4f(1, 1, 1, 0.01f * (1 - ((float) c.existed / MAX_JC_TIME)));
GL11.glVertex3d(x + Math.cos(Math.toRadians(i)) * end, y + Math.sin(k * 8) * 0.5,
z + Math.sin(Math.toRadians(i) * end));
}
GL11.glEnd();
}
} catch (Exception exception) {
}
Collections.reverse(circles);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glPopMatrix();
} else if (mode.getModeValue().equals("NONE")) {
GL11.glPushMatrix();
GL11.glTranslated(ix, iy, iz);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glShadeModel(GL11.GL_SMOOTH);
Collections.reverse(circles);
for (Circle c : circles) {
double x = c.position().x;
double y = c.position().y;
double z = c.position().z;
float k = (float) c.existed / MAX_JC_TIME;
float start = k * 2.5f;
float end = start + 1f - k;
GL11.glBegin(GL11.GL_QUAD_STRIP);
for (int i = 0; i <= 360; i = i + 5) {
GL11.glColor4f((float) c.color().x, (float) c.color().y, (float) c.color().z,
0.7f * (1 - ((float) c.existed / MAX_JC_TIME)));
switch (TYPE) {
case 0:
GL11.glVertex3d(x + Math.cos(Math.toRadians(i)) * start, y,
z + Math.sin(Math.toRadians(i)) * start);
break;
case 1:
GL11.glVertex3d(x + Math.cos(Math.toRadians(i * 2)) * start, y,
z + Math.sin(Math.toRadians(i * 2)) * start);
break;
}
GL11.glColor4f(1, 1, 1, 0.01f * (1 - ((float) c.existed / MAX_JC_TIME)));
switch (TYPE) {
case 0:
GL11.glVertex3d(x + Math.cos(Math.toRadians(i)) * end, y, z + Math.sin(Math.toRadians(i)) * end);
break;
case 1:
GL11.glVertex3d(x + Math.cos(Math.toRadians(-i)) * end, y, z + Math.sin(Math.toRadians(-i)) * end);
break;
}
}
GL11.glEnd();
}
Collections.reverse(circles);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glPopMatrix();
}
}
// EntityPlayerSP.onUpdate
public static void onLocalPlayerUpdate(EntityPlayerSP instance) {
circles.removeIf(Circle::update);
}
public static void handleEntityJump(Entity entity) {
Vec3d color = new Vec3d((float) SettingManager.getSettingByName("Color", "Red").getNumberValue() / 255f, (float) SettingManager.getSettingByName("Color", "Green").getNumberValue() / 255f, (float) SettingManager.getSettingByName("Color", "Blue").getNumberValue() / 255f);
circles.add(new Circle(entity.getPositionVector(), color));
}
static class Circle {
private final Vec3d vec;
private final Vec3d color;
byte existed;
Circle(Vec3d vec, Vec3d color) {
this.vec = vec;
this.color = color;
}
Vec3d position() {
return this.vec;
}
Vec3d color() {
return this.color;
}
boolean update() {
return ++existed > MAX_JC_TIME;
}
}
}