Clean up imports and entry order
This commit is contained in:
parent
b3166a3e3b
commit
01e92cf942
|
@ -23,32 +23,20 @@ import static org.lwjgl.opengl.GL11.GL_QUADS;
|
|||
*/
|
||||
public class Camera {
|
||||
|
||||
private Vec3d pos;
|
||||
|
||||
private Vec3d prevPos;
|
||||
|
||||
private float yaw;
|
||||
|
||||
private float pitch;
|
||||
|
||||
private boolean recording;
|
||||
|
||||
private boolean valid;
|
||||
|
||||
private boolean rendering;
|
||||
|
||||
private boolean firstUpdate;
|
||||
|
||||
private float farPlaneDistance;
|
||||
|
||||
private Framebuffer frameBuffer;
|
||||
|
||||
private final int WIDTH_RESOLUTION = 420;
|
||||
private final int HEIGHT_RESOLUTION = 420;
|
||||
|
||||
private int frameCount;
|
||||
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
private Vec3d pos;
|
||||
private Vec3d prevPos;
|
||||
private float yaw;
|
||||
private float pitch;
|
||||
private boolean recording;
|
||||
private boolean valid;
|
||||
private boolean rendering;
|
||||
private boolean firstUpdate;
|
||||
private float farPlaneDistance;
|
||||
private Framebuffer frameBuffer;
|
||||
private int frameCount;
|
||||
|
||||
public Camera() {
|
||||
this.pos = new Vec3d(0, 0, 0);
|
||||
|
|
|
@ -24,10 +24,10 @@ public class EventChunk {
|
|||
return chunk;
|
||||
}
|
||||
|
||||
public static enum ChunkType {
|
||||
public enum ChunkType {
|
||||
LOAD, UNLOAD;
|
||||
|
||||
private ChunkType() {
|
||||
ChunkType() {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ public final class BlocksComponent extends HudComponent {
|
|||
|
||||
private final TextComponent searchBox;
|
||||
private final List<Block> blocks = new ArrayList<>();
|
||||
private List<Block> displayedBlocks;
|
||||
private final List<Block> displayedBlocks;
|
||||
|
||||
private Value<List<Block>> value;
|
||||
private final Value<List<Block>> value;
|
||||
|
||||
public BlocksComponent(Value<List<Block>> value) {
|
||||
super(value.getName());
|
||||
|
|
|
@ -14,10 +14,9 @@ import java.util.Iterator;
|
|||
*/
|
||||
public final class CarouselComponent extends HudComponent {
|
||||
|
||||
private Value value;
|
||||
|
||||
public String displayValue;
|
||||
public boolean focused;
|
||||
private final Value value;
|
||||
|
||||
public CarouselComponent(String name, Value value) {
|
||||
super(name);
|
||||
|
|
|
@ -9,16 +9,13 @@ import java.awt.*;
|
|||
|
||||
public class ColorComponent extends TextComponent {
|
||||
|
||||
private Color currentColor;
|
||||
|
||||
// space occupied from left to right: border, color box, spacing, text, spacing, check, spacing, gear, border
|
||||
private static final int COLOR_SIZE = 7;
|
||||
private static final int GEAR_WIDTH = 8;
|
||||
|
||||
private String customDisplayValue;
|
||||
|
||||
private final Texture gearTexture;
|
||||
private final Texture gearTextureEnabled;
|
||||
private Color currentColor;
|
||||
private String customDisplayValue;
|
||||
|
||||
public ColorComponent(String name, int defaultColor) {
|
||||
super(name, String.valueOf(defaultColor), false);
|
||||
|
|
|
@ -15,23 +15,19 @@ import org.lwjgl.input.Keyboard;
|
|||
*/
|
||||
public class DraggableHudComponent extends HudComponent {
|
||||
|
||||
private static final double ANCHOR_THRESHOLD = 80;
|
||||
protected final Minecraft mc = Minecraft.getMinecraft();
|
||||
private boolean rclicked;
|
||||
private boolean snappable;
|
||||
private boolean dragging;
|
||||
private boolean locked;
|
||||
private float deltaX;
|
||||
private float deltaY;
|
||||
|
||||
private AnchorPoint anchorPoint;
|
||||
|
||||
private DraggableHudComponent glued;
|
||||
private GlueSide glueSide;
|
||||
private boolean parent;
|
||||
|
||||
private static final double ANCHOR_THRESHOLD = 80;
|
||||
|
||||
protected final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public DraggableHudComponent(String name) {
|
||||
this.setName(name);
|
||||
this.setVisible(false);
|
||||
|
@ -360,10 +356,6 @@ public class DraggableHudComponent extends HudComponent {
|
|||
this.glueSide = glueSide;
|
||||
}
|
||||
|
||||
public enum GlueSide {
|
||||
TOP, BOTTOM
|
||||
}
|
||||
|
||||
public boolean isParent() {
|
||||
return parent;
|
||||
}
|
||||
|
@ -371,4 +363,8 @@ public class DraggableHudComponent extends HudComponent {
|
|||
public void setParent(boolean parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public enum GlueSide {
|
||||
TOP, BOTTOM
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,23 +11,18 @@ import java.util.List;
|
|||
*/
|
||||
public class HudComponent {
|
||||
|
||||
public ComponentListener mouseClickListener, rightClickListener;
|
||||
public boolean rightClickEnabled;
|
||||
public int subComponents = 0;
|
||||
private float x;
|
||||
private float y;
|
||||
private float w;
|
||||
private float h;
|
||||
|
||||
private float emptyH;
|
||||
|
||||
private String name;
|
||||
private String displayName;
|
||||
private String tooltipText = "";
|
||||
|
||||
private boolean visible;
|
||||
|
||||
public ComponentListener mouseClickListener, rightClickListener;
|
||||
public boolean rightClickEnabled;
|
||||
public int subComponents = 0;
|
||||
|
||||
private List<Value> valueList = new ArrayList<Value>();
|
||||
|
||||
public HudComponent() {
|
||||
|
|
|
@ -24,9 +24,9 @@ public final class ItemsComponent extends HudComponent {
|
|||
|
||||
private final TextComponent searchBox;
|
||||
private final List<Item> items = new ArrayList<>();
|
||||
private List<Item> displayedItems;
|
||||
private final List<Item> displayedItems;
|
||||
|
||||
private Value<List<Item>> value;
|
||||
private final Value<List<Item>> value;
|
||||
|
||||
public ItemsComponent(Value<List<Item>> value) {
|
||||
super(value.getName());
|
||||
|
|
|
@ -11,17 +11,15 @@ import net.minecraft.client.Minecraft;
|
|||
*/
|
||||
public class ResizableHudComponent extends DraggableHudComponent {
|
||||
|
||||
protected final float CLICK_ZONE = 2;
|
||||
private boolean resizeDragging;
|
||||
private float resizeDeltaX;
|
||||
private float resizeDeltaY;
|
||||
|
||||
private float initialWidth;
|
||||
private float initialHeight;
|
||||
private float maxWidth;
|
||||
private float maxHeight;
|
||||
|
||||
protected final float CLICK_ZONE = 2;
|
||||
|
||||
public ResizableHudComponent(String name, float initialWidth, float initialHeight, float maxWidth, float maxHeight) {
|
||||
super(name);
|
||||
this.initialWidth = initialWidth;
|
||||
|
@ -58,7 +56,7 @@ public class ResizableHudComponent extends DraggableHudComponent {
|
|||
}
|
||||
|
||||
if (Minecraft.getMinecraft().currentScreen instanceof GuiHudEditor) {
|
||||
RenderUtil.drawRect(this.getX() + this.getW() - CLICK_ZONE, this.getY() + this.getH() - CLICK_ZONE, this.getX() + this.getW() + CLICK_ZONE, this.getY() + this.getH() + CLICK_ZONE, this.isMouseInside(mouseX, mouseY) ? 0x90CCCCCC : 0x90CCCCCC);
|
||||
RenderUtil.drawRect(this.getX() + this.getW() - CLICK_ZONE, this.getY() + this.getH() - CLICK_ZONE, this.getX() + this.getW() + CLICK_ZONE, this.getY() + this.getH() + CLICK_ZONE, 0x90CCCCCC);
|
||||
}
|
||||
|
||||
final boolean insideClickZone = mouseX >= this.getX() + this.getW() - CLICK_ZONE && mouseX <= this.getX() + this.getW() + CLICK_ZONE && mouseY >= this.getY() + this.getH() - CLICK_ZONE && mouseY <= this.getY() + this.getH() + CLICK_ZONE;
|
||||
|
|
|
@ -17,15 +17,14 @@ import java.text.DecimalFormat;
|
|||
*/
|
||||
public final class SliderComponent extends HudComponent {
|
||||
|
||||
private Value value;
|
||||
private ComponentListener mouseClickListener;
|
||||
private final SliderBarComponent sliderBar;
|
||||
private TextComponent textComponent;
|
||||
|
||||
protected final DecimalFormat decimalFormat = new DecimalFormat("#.#");
|
||||
private final SliderBarComponent sliderBar;
|
||||
protected boolean sliding;
|
||||
protected float lastPositionX = -1;
|
||||
protected float lastWidth = -1;
|
||||
private final Value value;
|
||||
private ComponentListener mouseClickListener;
|
||||
private TextComponent textComponent;
|
||||
|
||||
public SliderComponent(String name, Value value) {
|
||||
super(name);
|
||||
|
@ -362,7 +361,7 @@ public final class SliderComponent extends HudComponent {
|
|||
if (this.parent.value.getValue() instanceof Integer) {
|
||||
return (int) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (int) this.parent.value.getMin(), (int) this.parent.value.getMax()) + "";
|
||||
} else if (this.parent.value.getValue() instanceof Double) {
|
||||
return this.parent.decimalFormat.format((double) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (double) this.parent.value.getMin(), (double) this.parent.value.getMax()));
|
||||
return this.parent.decimalFormat.format(MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (double) this.parent.value.getMin(), (double) this.parent.value.getMax()));
|
||||
} else if (this.parent.value.getValue() instanceof Float) {
|
||||
return this.parent.decimalFormat.format((float) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (float) this.parent.value.getMin(), (float) this.parent.value.getMax()));
|
||||
} else if (this.parent.value.getValue() instanceof Long) {
|
||||
|
@ -379,7 +378,7 @@ public final class SliderComponent extends HudComponent {
|
|||
final int finishedInt = (int) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (int) this.parent.value.getMin(), (int) this.parent.value.getMax());
|
||||
this.parent.value.setValue(finishedInt);
|
||||
} else if (this.parent.value.getValue() instanceof Double) {
|
||||
final double finishedDouble = (double) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (double) this.parent.value.getMin(), (double) this.parent.value.getMax());
|
||||
final double finishedDouble = MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (double) this.parent.value.getMin(), (double) this.parent.value.getMax());
|
||||
this.parent.value.setValue(Double.valueOf(this.parent.decimalFormat.format(finishedDouble)));
|
||||
} else if (this.parent.value.getValue() instanceof Float) {
|
||||
final float finishedFloat = (float) MathUtil.map(this.getX(), this.parent.getX(), this.parent.getX() + this.parent.getW() - this.getW(), (float) this.parent.value.getMin(), (float) this.parent.value.getMax());
|
||||
|
|
|
@ -19,21 +19,6 @@ import java.util.logging.Level;
|
|||
*/
|
||||
public class TextComponent extends HudComponent {
|
||||
|
||||
private String displayValue;
|
||||
public boolean focused;
|
||||
public boolean digitOnly;
|
||||
public ComponentListener returnListener;
|
||||
public TextComponentListener textListener;
|
||||
|
||||
protected Texture checkTexture;
|
||||
|
||||
private int textCursor = 0;
|
||||
private int textCursorOffset = 0;
|
||||
private int selectCursor = 0;
|
||||
private int selectCursorOffset = 0;
|
||||
private int shiftLength = 0;
|
||||
private boolean dirty = false;
|
||||
|
||||
// space occupied from left to right: border, text, spacing, check, border
|
||||
protected static final int BORDER = 1;
|
||||
protected static final int SPACING = 1;
|
||||
|
@ -41,6 +26,18 @@ public class TextComponent extends HudComponent {
|
|||
protected static final int CHECK_WIDTH = 8;
|
||||
protected static final int BLOCK_WIDTH = 2;
|
||||
protected static final float ICON_V_OFFSET = 0.5f;
|
||||
public boolean focused;
|
||||
public boolean digitOnly;
|
||||
public ComponentListener returnListener;
|
||||
public TextComponentListener textListener;
|
||||
protected Texture checkTexture;
|
||||
private String displayValue;
|
||||
private int textCursor = 0;
|
||||
private int textCursorOffset = 0;
|
||||
private int selectCursor = 0;
|
||||
private int selectCursorOffset = 0;
|
||||
private int shiftLength = 0;
|
||||
private boolean dirty = false;
|
||||
|
||||
public TextComponent(String name, String displayValue, boolean digitOnly) {
|
||||
super(name);
|
||||
|
|
|
@ -10,13 +10,11 @@ import java.util.concurrent.ThreadLocalRandom;
|
|||
|
||||
public class Particle {
|
||||
|
||||
private final int maxAlpha;
|
||||
private Vector2f pos;
|
||||
private Vector2f velocity;
|
||||
private Vector2f acceleration;
|
||||
|
||||
private int alpha;
|
||||
private final int maxAlpha;
|
||||
|
||||
private float size;
|
||||
|
||||
public Particle(Vector2f pos) {
|
||||
|
|
|
@ -16,10 +16,10 @@ import java.io.IOException;
|
|||
*/
|
||||
public final class GuiAddAlt extends GuiScreen {
|
||||
|
||||
private final GuiAltManager parent;
|
||||
private GuiTextField usernameField;
|
||||
private GuiTextField emailField;
|
||||
private GuiPasswordField passwordField;
|
||||
private final GuiAltManager parent;
|
||||
|
||||
public GuiAddAlt(GuiAltManager parent) {
|
||||
this.parent = parent;
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.util.ResourceLocation;
|
|||
*/
|
||||
public class GuiEntryAlt implements GuiListExtended.IGuiListEntry {
|
||||
|
||||
private GuiListAlt parent;
|
||||
private ResourceLocation resourceLocation;
|
||||
private final AltData alt;
|
||||
private final GuiListAlt parent;
|
||||
private ResourceLocation resourceLocation;
|
||||
|
||||
public GuiEntryAlt(GuiListAlt parent, AltData alt) {
|
||||
this.parent = parent;
|
||||
|
|
|
@ -63,10 +63,6 @@ public final class GuiListAlt extends GuiListExtended {
|
|||
return (index == this.selected);
|
||||
}
|
||||
|
||||
public void setSelected(int index) {
|
||||
this.selected = index;
|
||||
}
|
||||
|
||||
public boolean hasSelected() {
|
||||
return (this.selected >= 0 && this.selected < this.entries.size());
|
||||
}
|
||||
|
@ -75,6 +71,10 @@ public final class GuiListAlt extends GuiListExtended {
|
|||
return this.hasSelected() ? this.entries.get(this.selected) : null;
|
||||
}
|
||||
|
||||
public void setSelected(int index) {
|
||||
this.selected = index;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return this.entries.size();
|
||||
}
|
||||
|
|
|
@ -60,6 +60,10 @@ public class GuiPasswordField extends Gui {
|
|||
++this.cursorCounter;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
public void setText(String textIn) {
|
||||
if (this.validator.apply(textIn)) {
|
||||
if (textIn.length() > this.maxStringLength) {
|
||||
|
@ -73,10 +77,6 @@ public class GuiPasswordField extends Gui {
|
|||
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
public String getSelectedText() {
|
||||
int i = Math.min(this.cursorPosition, this.selectionEnd);
|
||||
int j = Math.max(this.cursorPosition, this.selectionEnd);
|
||||
|
@ -212,13 +212,6 @@ public class GuiPasswordField extends Gui {
|
|||
this.setCursorPosition(this.selectionEnd + num);
|
||||
}
|
||||
|
||||
public void setCursorPosition(int pos) {
|
||||
this.cursorPosition = pos;
|
||||
int i = this.text.length();
|
||||
this.cursorPosition = MathHelper.clamp(this.cursorPosition, 0, i);
|
||||
this.setSelectionPos(this.cursorPosition);
|
||||
}
|
||||
|
||||
public void setCursorPositionZero() {
|
||||
this.setCursorPosition(0);
|
||||
}
|
||||
|
@ -433,15 +426,19 @@ public class GuiPasswordField extends Gui {
|
|||
GlStateManager.enableColorLogic();
|
||||
GlStateManager.colorLogicOp(LogicOp.OR_REVERSE);
|
||||
bufferbuilder.begin(7, DefaultVertexFormats.POSITION);
|
||||
bufferbuilder.pos((double) startX, (double) endY, 0.0D).endVertex();
|
||||
bufferbuilder.pos((double) endX, (double) endY, 0.0D).endVertex();
|
||||
bufferbuilder.pos((double) endX, (double) startY, 0.0D).endVertex();
|
||||
bufferbuilder.pos((double) startX, (double) startY, 0.0D).endVertex();
|
||||
bufferbuilder.pos(startX, endY, 0.0D).endVertex();
|
||||
bufferbuilder.pos(endX, endY, 0.0D).endVertex();
|
||||
bufferbuilder.pos(endX, startY, 0.0D).endVertex();
|
||||
bufferbuilder.pos(startX, startY, 0.0D).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.disableColorLogic();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
public int getMaxStringLength() {
|
||||
return this.maxStringLength;
|
||||
}
|
||||
|
||||
public void setMaxStringLength(int length) {
|
||||
this.maxStringLength = length;
|
||||
if (this.text.length() > length) {
|
||||
|
@ -450,14 +447,17 @@ public class GuiPasswordField extends Gui {
|
|||
|
||||
}
|
||||
|
||||
public int getMaxStringLength() {
|
||||
return this.maxStringLength;
|
||||
}
|
||||
|
||||
public int getCursorPosition() {
|
||||
return this.cursorPosition;
|
||||
}
|
||||
|
||||
public void setCursorPosition(int pos) {
|
||||
this.cursorPosition = pos;
|
||||
int i = this.text.length();
|
||||
this.cursorPosition = MathHelper.clamp(this.cursorPosition, 0, i);
|
||||
this.setSelectionPos(this.cursorPosition);
|
||||
}
|
||||
|
||||
public boolean getEnableBackgroundDrawing() {
|
||||
return this.enableBackgroundDrawing;
|
||||
}
|
||||
|
@ -474,6 +474,10 @@ public class GuiPasswordField extends Gui {
|
|||
this.disabledColor = color;
|
||||
}
|
||||
|
||||
public boolean isFocused() {
|
||||
return this.isFocused;
|
||||
}
|
||||
|
||||
public void setFocused(boolean isFocusedIn) {
|
||||
if (isFocusedIn && !this.isFocused) {
|
||||
this.cursorCounter = 0;
|
||||
|
@ -486,10 +490,6 @@ public class GuiPasswordField extends Gui {
|
|||
|
||||
}
|
||||
|
||||
public boolean isFocused() {
|
||||
return this.isFocused;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.isEnabled = enabled;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class Module {
|
|||
options.append(option.name().toLowerCase() + ((i == size - 1) ? "" : ", "));
|
||||
}
|
||||
|
||||
msg.appendSibling(new TextComponentString(valuePrefix + v.getName() + ChatFormatting.GRAY + " <" + options.toString() + ">" + ChatFormatting.RESET + ": " + ChatFormatting.YELLOW + val.name().toLowerCase()).setStyle(new Style().setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString(v.getName() + "\n" + ChatFormatting.GOLD + ((v.getDesc() == null || v.getDesc().equals("")) ? "There is no description for this enum value." : v.getDesc()) + ChatFormatting.RESET + "\n " + ChatFormatting.GRAY + "<" + options.toString() + ">")))));
|
||||
msg.appendSibling(new TextComponentString(valuePrefix + v.getName() + ChatFormatting.GRAY + " <" + options + ">" + ChatFormatting.RESET + ": " + ChatFormatting.YELLOW + val.name().toLowerCase()).setStyle(new Style().setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString(v.getName() + "\n" + ChatFormatting.GOLD + ((v.getDesc() == null || v.getDesc().equals("")) ? "There is no description for this enum value." : v.getDesc()) + ChatFormatting.RESET + "\n " + ChatFormatting.GRAY + "<" + options + ">")))));
|
||||
}
|
||||
|
||||
if (v.getValue() instanceof Regex) {
|
||||
|
@ -145,10 +145,6 @@ public class Module {
|
|||
this.valueList.clear();
|
||||
}
|
||||
|
||||
public enum ModuleType {
|
||||
COMBAT, MOVEMENT, RENDER, PLAYER, WORLD, MISC, HIDDEN, UI
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
@ -227,4 +223,8 @@ public class Module {
|
|||
public void setValueList(List<Value> valueList) {
|
||||
this.valueList = valueList;
|
||||
}
|
||||
|
||||
public enum ModuleType {
|
||||
COMBAT, MOVEMENT, RENDER, PLAYER, WORLD, MISC, HIDDEN, UI
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,35 +22,35 @@ public class Note {
|
|||
this.pitch = pitch;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public void setPosition(BlockPos position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public void setInstrument(int instrument) {
|
||||
this.instrument = instrument;
|
||||
}
|
||||
|
||||
public void setPitch(int pitch) {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return this.index;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public BlockPos getPosition() {
|
||||
return this.position;
|
||||
}
|
||||
|
||||
public void setPosition(BlockPos position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public int getInstrument() {
|
||||
return this.instrument;
|
||||
}
|
||||
|
||||
public void setInstrument(int instrument) {
|
||||
this.instrument = instrument;
|
||||
}
|
||||
|
||||
public int getPitch() {
|
||||
return this.pitch;
|
||||
}
|
||||
|
||||
public void setPitch(int pitch) {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,20 +11,13 @@ import me.rigamortis.seppuku.impl.gui.hud.component.NotificationsComponent;
|
|||
public final class Notification {
|
||||
|
||||
private final String title;
|
||||
|
||||
private String text;
|
||||
|
||||
private float x = 0, y = 0, width = 0, height = 0;
|
||||
|
||||
private final Type type;
|
||||
|
||||
private int duration; // milliseconds
|
||||
|
||||
private final int maxDuration;
|
||||
|
||||
private float transitionX = 0, transitionY = 0;
|
||||
|
||||
private final Timer timer = new Timer();
|
||||
private String text;
|
||||
private float x = 0, y = 0, width = 0, height = 0;
|
||||
private int duration; // milliseconds
|
||||
private float transitionX = 0, transitionY = 0;
|
||||
|
||||
public Notification(String title, String text, Type type, int duration) {
|
||||
this.title = title;
|
||||
|
|
|
@ -68,9 +68,7 @@ public abstract class BasicTaskFactory<T extends BasicTask> implements TaskFacto
|
|||
}
|
||||
|
||||
public boolean comparePriority(T task) {
|
||||
if (task.getPriority() < this.currentTask.getPriority())
|
||||
return false;
|
||||
return true;
|
||||
return task.getPriority() >= this.currentTask.getPriority();
|
||||
}
|
||||
|
||||
public boolean isCurrentlyTasking() {
|
||||
|
|
|
@ -18,14 +18,14 @@ public final class HandSwapContext {
|
|||
return oldSlot;
|
||||
}
|
||||
|
||||
public int getNewSlot() {
|
||||
return newSlot;
|
||||
}
|
||||
|
||||
public void setOldSlot(int oldSlot) {
|
||||
this.oldSlot = oldSlot;
|
||||
}
|
||||
|
||||
public int getNewSlot() {
|
||||
return newSlot;
|
||||
}
|
||||
|
||||
public void setNewSlot(int newSlot) {
|
||||
this.newSlot = newSlot;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.math.Vec3d;
|
|||
*/
|
||||
public class EntityUtil {
|
||||
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
private static final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public static Vec3d getInterpolatedPosition(Entity entity, double x, double y, double z) {
|
||||
return new Vec3d(entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * x, entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * y, entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * z);
|
||||
|
|
|
@ -13,259 +13,11 @@ import java.nio.IntBuffer;
|
|||
* Author TheCyberBrick
|
||||
*/
|
||||
public final class GLUProjection {
|
||||
public static class Line {
|
||||
public Vector3D sourcePoint = new Vector3D(0, 0, 0);
|
||||
public Vector3D direction = new Vector3D(0, 0, 0);
|
||||
|
||||
public Line(double sx, double sy, double sz, double dx, double dy, double dz) {
|
||||
this.sourcePoint.x = sx;
|
||||
this.sourcePoint.y = sy;
|
||||
this.sourcePoint.z = sz;
|
||||
this.direction.x = dx;
|
||||
this.direction.y = dy;
|
||||
this.direction.z = dz;
|
||||
}
|
||||
|
||||
public Vector3D intersect(Line line) {
|
||||
double a = this.sourcePoint.x;
|
||||
double b = this.direction.x;
|
||||
double c = line.sourcePoint.x;
|
||||
double d = line.direction.x;
|
||||
double e = this.sourcePoint.y;
|
||||
double f = this.direction.y;
|
||||
double g = line.sourcePoint.y;
|
||||
double h = line.direction.y;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return this.intersectXZ(line);
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
private Vector3D intersectXZ(Line line) {
|
||||
double a = this.sourcePoint.x;
|
||||
double b = this.direction.x;
|
||||
double c = line.sourcePoint.x;
|
||||
double d = line.direction.x;
|
||||
double e = this.sourcePoint.z;
|
||||
double f = this.direction.z;
|
||||
double g = line.sourcePoint.z;
|
||||
double h = line.direction.z;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return this.intersectYZ(line);
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
private Vector3D intersectYZ(Line line) {
|
||||
double a = this.sourcePoint.y;
|
||||
double b = this.direction.y;
|
||||
double c = line.sourcePoint.y;
|
||||
double d = line.direction.y;
|
||||
double e = this.sourcePoint.z;
|
||||
double f = this.direction.z;
|
||||
double g = line.sourcePoint.z;
|
||||
double h = line.direction.z;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return null;
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Vector3D intersectPlane(Vector3D pointOnPlane, Vector3D planeNormal) {
|
||||
Vector3D result = new Vector3D(this.sourcePoint.x, this.sourcePoint.y, this.sourcePoint.z);
|
||||
double d = pointOnPlane.sub(this.sourcePoint).dot(planeNormal) / this.direction.dot(planeNormal);
|
||||
result.sadd(this.direction.mul(d));
|
||||
if (this.direction.dot(planeNormal) == 0.0D) {
|
||||
return null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Vector3D {
|
||||
public double x, y, z;
|
||||
|
||||
public Vector3D(double x, double y, double z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public Vector3D add(Vector3D v) {
|
||||
return new Vector3D(this.x + v.x, this.y + v.y, this.z + v.z);
|
||||
}
|
||||
|
||||
public Vector3D add(double x, double y, double z) {
|
||||
return new Vector3D(this.x + x, this.y + y, this.z + z);
|
||||
}
|
||||
|
||||
public Vector3D sub(Vector3D v) {
|
||||
return new Vector3D(this.x - v.x, this.y - v.y, this.z - v.z);
|
||||
}
|
||||
|
||||
public Vector3D sub(double x, double y, double z) {
|
||||
return new Vector3D(this.x - x, this.y - y, this.z - z);
|
||||
}
|
||||
|
||||
public Vector3D normalized() {
|
||||
double len = (double) Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
return new Vector3D(this.x / len, this.y / len, this.z / len);
|
||||
}
|
||||
|
||||
public double dot(Vector3D v) {
|
||||
return this.x * v.x + this.y * v.y + this.z * v.z;
|
||||
}
|
||||
|
||||
public Vector3D cross(Vector3D v) {
|
||||
return new Vector3D(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);
|
||||
}
|
||||
|
||||
public Vector3D mul(double m) {
|
||||
return new Vector3D(this.x * m, this.y * m, this.z * m);
|
||||
}
|
||||
|
||||
public Vector3D div(double d) {
|
||||
return new Vector3D(this.x / d, this.y / d, this.z / d);
|
||||
}
|
||||
|
||||
public double length() {
|
||||
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
}
|
||||
|
||||
public Vector3D sadd(Vector3D v) {
|
||||
this.x += v.x;
|
||||
this.y += v.y;
|
||||
this.z += v.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D sadd(double x, double y, double z) {
|
||||
this.x += x;
|
||||
this.y += y;
|
||||
this.z += z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D ssub(Vector3D v) {
|
||||
this.x -= v.x;
|
||||
this.y -= v.y;
|
||||
this.z -= v.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D ssub(double x, double y, double z) {
|
||||
this.x -= x;
|
||||
this.y -= y;
|
||||
this.z -= z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D snormalize() {
|
||||
double len = (double) Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
this.x /= len;
|
||||
this.y /= len;
|
||||
this.z /= len;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D scross(Vector3D v) {
|
||||
this.x = this.y * v.z - this.z * v.y;
|
||||
this.y = this.z * v.x - this.x * v.z;
|
||||
this.z = this.x * v.y - this.y * v.x;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D smul(double m) {
|
||||
this.x *= m;
|
||||
this.y *= m;
|
||||
this.z *= m;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D sdiv(double d) {
|
||||
this.x /= d;
|
||||
this.y /= d;
|
||||
this.z /= d;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(X: " + this.x + " Y: " + this.y + " Z: " + this.z + ")";
|
||||
}
|
||||
}
|
||||
|
||||
public static class Projection {
|
||||
public static enum Type {
|
||||
INSIDE, OUTSIDE, INVERTED, FAIL
|
||||
}
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final Type t;
|
||||
|
||||
public Projection(double x, double y, Type t) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.t = t;
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return this.y;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return this.t;
|
||||
}
|
||||
|
||||
public boolean isType(Type type) {
|
||||
return this.t == type;
|
||||
}
|
||||
}
|
||||
|
||||
public static enum ClampMode {ORTHOGONAL, DIRECT, NONE}
|
||||
|
||||
private GLUProjection() {
|
||||
}
|
||||
|
||||
private static GLUProjection instance;
|
||||
|
||||
public static GLUProjection getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new GLUProjection();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private IntBuffer viewport;
|
||||
private FloatBuffer modelview;
|
||||
private FloatBuffer projection;
|
||||
private FloatBuffer coords = BufferUtils.createFloatBuffer(3);
|
||||
private final FloatBuffer coords = BufferUtils.createFloatBuffer(3);
|
||||
private Vector3D frustumPos;
|
||||
private Vector3D[] frustum;
|
||||
private Vector3D[] invFrustum;
|
||||
|
@ -279,6 +31,15 @@ public final class GLUProjection {
|
|||
private float fovY;
|
||||
private float fovX;
|
||||
private Vector3D lookVec;
|
||||
private GLUProjection() {
|
||||
}
|
||||
|
||||
public static GLUProjection getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new GLUProjection();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the matrices. Needed whenever the viewport or one of the matrices has changed.
|
||||
|
@ -361,14 +122,14 @@ public final class GLUProjection {
|
|||
public Projection project(double x, double y, double z, ClampMode clampModeOutside, boolean extrudeInverted) {
|
||||
if (this.viewport != null && this.modelview != null && this.projection != null) {
|
||||
Vector3D posVec = new Vector3D(x, y, z);
|
||||
boolean frustum[] = this.doFrustumCheck(this.frustum, this.frustumPos, x, y, z);
|
||||
boolean[] frustum = this.doFrustumCheck(this.frustum, this.frustumPos, x, y, z);
|
||||
boolean outsideFrustum = frustum[0] || frustum[1] || frustum[2] || frustum[3];
|
||||
//Check if point is inside frustum
|
||||
if (outsideFrustum) {
|
||||
//Check if point is on opposite side of the near clip plane
|
||||
boolean opposite = posVec.sub(this.frustumPos).dot(this.viewVec) <= 0.0D;
|
||||
//Get inverted frustum check
|
||||
boolean invFrustum[] = this.doFrustumCheck(this.invFrustum, this.frustumPos, x, y, z);
|
||||
boolean[] invFrustum = this.doFrustumCheck(this.invFrustum, this.frustumPos, x, y, z);
|
||||
boolean outsideInvertedFrustum = invFrustum[0] || invFrustum[1] || invFrustum[2] || invFrustum[3];
|
||||
if ((extrudeInverted && !outsideInvertedFrustum) || (outsideInvertedFrustum && clampModeOutside != ClampMode.NONE)) {
|
||||
if ((extrudeInverted && !outsideInvertedFrustum) ||
|
||||
|
@ -381,10 +142,10 @@ public final class GLUProjection {
|
|||
if (opposite) {
|
||||
//Invert coordinates
|
||||
vecX = this.displayWidth * this.widthScale - (double) this.coords.get(0) * this.widthScale - this.displayWidth * this.widthScale / 2.0F;
|
||||
vecY = this.displayHeight * this.heightScale - ((double) displayHeight - (double) this.coords.get(1)) * (double) this.heightScale - this.displayHeight * this.heightScale / 2.0F;
|
||||
vecY = this.displayHeight * this.heightScale - (displayHeight - (double) this.coords.get(1)) * this.heightScale - this.displayHeight * this.heightScale / 2.0F;
|
||||
} else {
|
||||
vecX = (double) this.coords.get(0) * this.widthScale - this.displayWidth * this.widthScale / 2.0F;
|
||||
vecY = ((double) this.displayHeight - (double) this.coords.get(1)) * (double) this.heightScale - this.displayHeight * this.heightScale / 2.0F;
|
||||
vecY = (this.displayHeight - (double) this.coords.get(1)) * this.heightScale - this.displayHeight * this.heightScale / 2.0F;
|
||||
}
|
||||
} else {
|
||||
return new Projection(0, 0, Projection.Type.FAIL);
|
||||
|
@ -421,7 +182,7 @@ public final class GLUProjection {
|
|||
if (GLU.gluProject((float) x, (float) y, (float) z, this.modelview, this.projection, this.viewport, this.coords)) {
|
||||
//Get projected coordinates
|
||||
double guiX = (double) this.coords.get(0) * this.widthScale;
|
||||
double guiY = ((double) this.displayHeight - (double) this.coords.get(1)) * (double) this.heightScale;
|
||||
double guiY = (this.displayHeight - (double) this.coords.get(1)) * this.heightScale;
|
||||
if (opposite) {
|
||||
//Invert coordinates
|
||||
guiX = this.displayWidth * this.widthScale - guiX;
|
||||
|
@ -447,7 +208,7 @@ public final class GLUProjection {
|
|||
if (GLU.gluProject((float) x, (float) y, (float) z, this.modelview, this.projection, this.viewport, this.coords)) {
|
||||
//Get projected coordinates
|
||||
double guiX = (double) this.coords.get(0) * this.widthScale;
|
||||
double guiY = ((double) this.displayHeight - (double) this.coords.get(1)) * (double) this.heightScale;
|
||||
double guiY = (this.displayHeight - (double) this.coords.get(1)) * this.heightScale;
|
||||
if (opposite) {
|
||||
//Invert coordinates
|
||||
guiX = this.displayWidth * this.widthScale - guiX;
|
||||
|
@ -463,7 +224,7 @@ public final class GLUProjection {
|
|||
if (GLU.gluProject((float) x, (float) y, (float) z, this.modelview, this.projection, this.viewport, this.coords)) {
|
||||
//Get projected coordinates
|
||||
double guiX = (double) this.coords.get(0) * this.widthScale;
|
||||
double guiY = ((double) this.displayHeight - (double) this.coords.get(1)) * (double) this.heightScale;
|
||||
double guiY = (this.displayHeight - (double) this.coords.get(1)) * this.heightScale;
|
||||
return new Projection(guiX, guiY, Projection.Type.INSIDE);
|
||||
} else {
|
||||
return new Projection(0, 0, Projection.Type.FAIL);
|
||||
|
@ -603,6 +364,242 @@ public final class GLUProjection {
|
|||
double s = Math.sin(-rotYaw * 0.017453292F - Math.PI);
|
||||
double nc = -Math.cos(-rotPitch * 0.017453292F);
|
||||
double ns = Math.sin(-rotPitch * 0.017453292F);
|
||||
return new Vector3D((double) (s * nc), (double) ns, (double) (c * nc));
|
||||
return new Vector3D(s * nc, ns, c * nc);
|
||||
}
|
||||
|
||||
public enum ClampMode {ORTHOGONAL, DIRECT, NONE}
|
||||
|
||||
public static class Line {
|
||||
public Vector3D sourcePoint = new Vector3D(0, 0, 0);
|
||||
public Vector3D direction = new Vector3D(0, 0, 0);
|
||||
|
||||
public Line(double sx, double sy, double sz, double dx, double dy, double dz) {
|
||||
this.sourcePoint.x = sx;
|
||||
this.sourcePoint.y = sy;
|
||||
this.sourcePoint.z = sz;
|
||||
this.direction.x = dx;
|
||||
this.direction.y = dy;
|
||||
this.direction.z = dz;
|
||||
}
|
||||
|
||||
public Vector3D intersect(Line line) {
|
||||
double a = this.sourcePoint.x;
|
||||
double b = this.direction.x;
|
||||
double c = line.sourcePoint.x;
|
||||
double d = line.direction.x;
|
||||
double e = this.sourcePoint.y;
|
||||
double f = this.direction.y;
|
||||
double g = line.sourcePoint.y;
|
||||
double h = line.direction.y;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return this.intersectXZ(line);
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
private Vector3D intersectXZ(Line line) {
|
||||
double a = this.sourcePoint.x;
|
||||
double b = this.direction.x;
|
||||
double c = line.sourcePoint.x;
|
||||
double d = line.direction.x;
|
||||
double e = this.sourcePoint.z;
|
||||
double f = this.direction.z;
|
||||
double g = line.sourcePoint.z;
|
||||
double h = line.direction.z;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return this.intersectYZ(line);
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
private Vector3D intersectYZ(Line line) {
|
||||
double a = this.sourcePoint.y;
|
||||
double b = this.direction.y;
|
||||
double c = line.sourcePoint.y;
|
||||
double d = line.direction.y;
|
||||
double e = this.sourcePoint.z;
|
||||
double f = this.direction.z;
|
||||
double g = line.sourcePoint.z;
|
||||
double h = line.direction.z;
|
||||
double te = -(a * h - c * h - d * (e - g));
|
||||
double be = b * h - d * f;
|
||||
if (be == 0) {
|
||||
return null;
|
||||
}
|
||||
double t = te / be;
|
||||
Vector3D result = new Vector3D(0, 0, 0);
|
||||
result.x = this.sourcePoint.x + this.direction.x * t;
|
||||
result.y = this.sourcePoint.y + this.direction.y * t;
|
||||
result.z = this.sourcePoint.z + this.direction.z * t;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Vector3D intersectPlane(Vector3D pointOnPlane, Vector3D planeNormal) {
|
||||
Vector3D result = new Vector3D(this.sourcePoint.x, this.sourcePoint.y, this.sourcePoint.z);
|
||||
double d = pointOnPlane.sub(this.sourcePoint).dot(planeNormal) / this.direction.dot(planeNormal);
|
||||
result.sadd(this.direction.mul(d));
|
||||
if (this.direction.dot(planeNormal) == 0.0D) {
|
||||
return null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Vector3D {
|
||||
public double x, y, z;
|
||||
|
||||
public Vector3D(double x, double y, double z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public Vector3D add(Vector3D v) {
|
||||
return new Vector3D(this.x + v.x, this.y + v.y, this.z + v.z);
|
||||
}
|
||||
|
||||
public Vector3D add(double x, double y, double z) {
|
||||
return new Vector3D(this.x + x, this.y + y, this.z + z);
|
||||
}
|
||||
|
||||
public Vector3D sub(Vector3D v) {
|
||||
return new Vector3D(this.x - v.x, this.y - v.y, this.z - v.z);
|
||||
}
|
||||
|
||||
public Vector3D sub(double x, double y, double z) {
|
||||
return new Vector3D(this.x - x, this.y - y, this.z - z);
|
||||
}
|
||||
|
||||
public Vector3D normalized() {
|
||||
double len = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
return new Vector3D(this.x / len, this.y / len, this.z / len);
|
||||
}
|
||||
|
||||
public double dot(Vector3D v) {
|
||||
return this.x * v.x + this.y * v.y + this.z * v.z;
|
||||
}
|
||||
|
||||
public Vector3D cross(Vector3D v) {
|
||||
return new Vector3D(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);
|
||||
}
|
||||
|
||||
public Vector3D mul(double m) {
|
||||
return new Vector3D(this.x * m, this.y * m, this.z * m);
|
||||
}
|
||||
|
||||
public Vector3D div(double d) {
|
||||
return new Vector3D(this.x / d, this.y / d, this.z / d);
|
||||
}
|
||||
|
||||
public double length() {
|
||||
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
}
|
||||
|
||||
public Vector3D sadd(Vector3D v) {
|
||||
this.x += v.x;
|
||||
this.y += v.y;
|
||||
this.z += v.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D sadd(double x, double y, double z) {
|
||||
this.x += x;
|
||||
this.y += y;
|
||||
this.z += z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D ssub(Vector3D v) {
|
||||
this.x -= v.x;
|
||||
this.y -= v.y;
|
||||
this.z -= v.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D ssub(double x, double y, double z) {
|
||||
this.x -= x;
|
||||
this.y -= y;
|
||||
this.z -= z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D snormalize() {
|
||||
double len = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
||||
this.x /= len;
|
||||
this.y /= len;
|
||||
this.z /= len;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D scross(Vector3D v) {
|
||||
this.x = this.y * v.z - this.z * v.y;
|
||||
this.y = this.z * v.x - this.x * v.z;
|
||||
this.z = this.x * v.y - this.y * v.x;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D smul(double m) {
|
||||
this.x *= m;
|
||||
this.y *= m;
|
||||
this.z *= m;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3D sdiv(double d) {
|
||||
this.x /= d;
|
||||
this.y /= d;
|
||||
this.z /= d;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(X: " + this.x + " Y: " + this.y + " Z: " + this.z + ")";
|
||||
}
|
||||
}
|
||||
|
||||
public static class Projection {
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final Type t;
|
||||
public Projection(double x, double y, Type t) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.t = t;
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return this.y;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return this.t;
|
||||
}
|
||||
|
||||
public boolean isType(Type type) {
|
||||
return this.t == type;
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
INSIDE, OUTSIDE, INVERTED, FAIL
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,14 +28,13 @@ public class ShaderProgram {
|
|||
public static final String DEPTH_UNIFORM = "depth";
|
||||
public static final String DEPTHDIMS_UNIFORM = "depthdims";
|
||||
public static final String ENTITYBRIGHTNESS_UNIFORM = "entitybrightness";
|
||||
|
||||
private static int depthTextureCounter = 0;
|
||||
private static int programBeforeGrab = 0;
|
||||
private static final LinkedList<ShaderProgram> programStack = new LinkedList();
|
||||
public static final File shadersFsDir;
|
||||
public static final String SHADER_FS_PATH = "Seppuku/Shaders/";
|
||||
public static final String SHADER_RES_PATH = "/assets/seppukumod/shaders/";
|
||||
public static final String SHADER_RES_PATH_FORMATTED = "resource://" + SHADER_RES_PATH;
|
||||
private static final LinkedList<ShaderProgram> programStack = new LinkedList();
|
||||
private static int depthTextureCounter = 0;
|
||||
private static int programBeforeGrab = 0;
|
||||
|
||||
static {
|
||||
// make shaders directory if needed
|
||||
|
@ -45,21 +44,21 @@ public class ShaderProgram {
|
|||
}
|
||||
}
|
||||
|
||||
private final Map<String, Integer> files = new HashMap<String, Integer>();
|
||||
private boolean boundDepth = false;
|
||||
private boolean triedCompiling = false;
|
||||
private boolean valid = false;
|
||||
private int program = 0;
|
||||
private String name;
|
||||
// user uniforms. these are configurable by the user and are set when the
|
||||
// program is used
|
||||
public final Map<String, Value> userUniforms = new HashMap<String, Value>();
|
||||
private final Map<String, Integer> files = new HashMap<String, Integer>();
|
||||
// cache uniform locations to minimise number of glGetUniformLocation calls
|
||||
private final Map<String, Integer> locations = new HashMap<String, Integer>();
|
||||
// if you are nesting shaders and you want to update the uniform of a shader
|
||||
// not currently in use, it will be queued in one of these depending on the
|
||||
// type of uniform
|
||||
private final Map<Integer, UniformUtil.UValue> uniformQueue = new HashMap();
|
||||
private boolean boundDepth = false;
|
||||
private boolean triedCompiling = false;
|
||||
private boolean valid = false;
|
||||
private int program = 0;
|
||||
private String name;
|
||||
|
||||
public ShaderProgram(String name) {
|
||||
this.name = name;
|
||||
|
@ -214,7 +213,7 @@ public class ShaderProgram {
|
|||
throw jsonTypeException("uniform default value type mismatched;", "a number or missing", uDefault);
|
||||
}
|
||||
|
||||
if (((String) uType).equals("int")) {
|
||||
if (uType.equals("int")) {
|
||||
// check that numbers are whole
|
||||
// XXX org.json.simple stores whole numbers as Long (at least it seemed so in testing, if not, my bad -rafern)
|
||||
if (!(uMin instanceof Long)) {
|
||||
|
@ -474,7 +473,7 @@ public class ShaderProgram {
|
|||
}
|
||||
|
||||
this.unbindDepthTexture();
|
||||
this.programStack.remove(stackIndex);
|
||||
programStack.remove(stackIndex);
|
||||
|
||||
if (programStack.isEmpty()) {
|
||||
OpenGlHelper.glUseProgram(programBeforeGrab);
|
||||
|
@ -505,14 +504,14 @@ public class ShaderProgram {
|
|||
locations.put(name, new Integer(fetched));
|
||||
return fetched;
|
||||
} else {
|
||||
return (int) cached;
|
||||
return cached;
|
||||
}
|
||||
}
|
||||
|
||||
public void flushUniformQueue() {
|
||||
if (this.make()) {
|
||||
for (Map.Entry<Integer, UniformUtil.UValue> entry : this.uniformQueue.entrySet()) {
|
||||
entry.getValue().set((int) entry.getKey());
|
||||
entry.getValue().set(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -743,9 +742,9 @@ public class ShaderProgram {
|
|||
// only get depth sample if needed by shader since this is expensive
|
||||
if (depthUniform != -1 && !this.boundDepth) {
|
||||
this.boundDepth = true;
|
||||
this.depthTextureCounter++;
|
||||
depthTextureCounter++;
|
||||
|
||||
if (this.depthTextureCounter == 1) {
|
||||
if (depthTextureCounter == 1) {
|
||||
GlStateManager.setActiveTexture(GL_TEXTURE3); // nothing special about texture 3, it's just never used (at least in vanilla)
|
||||
GlStateManager.enableTexture2D();
|
||||
FramebufferUtil.bindDepthTexture();
|
||||
|
@ -754,7 +753,7 @@ public class ShaderProgram {
|
|||
this.setUniform(depthUniform, 3);
|
||||
this.setUniform(DEPTHDIMS_UNIFORM, (float) FramebufferUtil.getWidth(), (float) FramebufferUtil.getHeight());
|
||||
|
||||
if (this.depthTextureCounter == 1) {
|
||||
if (depthTextureCounter == 1) {
|
||||
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||
}
|
||||
}
|
||||
|
@ -767,11 +766,11 @@ public class ShaderProgram {
|
|||
private void unbindDepthTexture() {
|
||||
if (this.boundDepth) {
|
||||
this.boundDepth = false;
|
||||
this.depthTextureCounter--;
|
||||
depthTextureCounter--;
|
||||
|
||||
if (this.depthTextureCounter < 0) {
|
||||
if (depthTextureCounter < 0) {
|
||||
throw new RuntimeException("Too many depth texture unbinds; there's a bug somewhere, report this");
|
||||
} else if (this.depthTextureCounter == 0) {
|
||||
} else if (depthTextureCounter == 0) {
|
||||
GlStateManager.setActiveTexture(GL_TEXTURE3);
|
||||
GlStateManager.bindTexture(0);
|
||||
GlStateManager.disableTexture2D();
|
||||
|
|
|
@ -17,8 +17,268 @@ import static org.lwjgl.opengl.GL21.*;
|
|||
* Util for setting uniforms with any supported type
|
||||
*/
|
||||
public final class UniformUtil {
|
||||
public static interface UValue {
|
||||
public void set(int loc);
|
||||
private static Boolean arbShaders = null;
|
||||
private static boolean canWarn = true;
|
||||
|
||||
private static boolean usingArbShaders() {
|
||||
if (arbShaders == null) {
|
||||
// OpenGlHelper.arbShaders is private :(
|
||||
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
|
||||
arbShaders = new Boolean(contextcapabilities.OpenGL21);
|
||||
}
|
||||
|
||||
return arbShaders;
|
||||
}
|
||||
|
||||
private static void showWarning(String message) {
|
||||
if (canWarn) {
|
||||
canWarn = false;
|
||||
Seppuku.INSTANCE.getLogger().log(Level.WARNING, message + ". No further warning will be shown");
|
||||
}
|
||||
}
|
||||
|
||||
// methods for setting regular uniforms
|
||||
public static void set(int loc, float v0) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform1fARB(loc, v0);
|
||||
} else {
|
||||
glUniform1f(loc, v0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform2fARB(loc, v0, v1);
|
||||
} else {
|
||||
glUniform2f(loc, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1, float v2) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform3fARB(loc, v0, v1, v2);
|
||||
} else {
|
||||
glUniform3f(loc, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1, float v2, float v3) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform4fARB(loc, v0, v1, v2, v3);
|
||||
} else {
|
||||
glUniform4f(loc, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform1iARB(loc, v0);
|
||||
} else {
|
||||
glUniform1i(loc, v0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform2iARB(loc, v0, v1);
|
||||
} else {
|
||||
glUniform2i(loc, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1, int v2) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform3iARB(loc, v0, v1, v2);
|
||||
} else {
|
||||
glUniform3i(loc, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1, int v2, int v3) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform4iARB(loc, v0, v1, v2, v3);
|
||||
} else {
|
||||
glUniform4i(loc, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0) {
|
||||
set(loc, v0 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1, boolean v2) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1, boolean v2, boolean v3) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0, v3 ? 1 : 0);
|
||||
}
|
||||
|
||||
// methods for setting array uniforms. does no bounds checking; WILL crash on invalid data
|
||||
public static void set(int loc, int vecSize, FloatBuffer val) {
|
||||
switch (vecSize) {
|
||||
case 1:
|
||||
OpenGlHelper.glUniform1(loc, val);
|
||||
break;
|
||||
case 2:
|
||||
OpenGlHelper.glUniform2(loc, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniform3(loc, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniform4(loc, val);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid vector size for UniformUtil.set: " + vecSize);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int vecSize, IntBuffer val) {
|
||||
switch (vecSize) {
|
||||
case 1:
|
||||
OpenGlHelper.glUniform1(loc, val);
|
||||
break;
|
||||
case 2:
|
||||
OpenGlHelper.glUniform2(loc, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniform3(loc, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniform4(loc, val);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid vector size for UniformUtil.set: " + vecSize);
|
||||
}
|
||||
}
|
||||
|
||||
// methods for setting matrix uniforms. does no bounds checking; WILL crash on invalid data
|
||||
public static void set(int loc, int matrixSize, boolean transpose, FloatBuffer val) {
|
||||
switch (matrixSize) {
|
||||
case 2:
|
||||
OpenGlHelper.glUniformMatrix2(loc, transpose, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniformMatrix3(loc, transpose, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniformMatrix4(loc, transpose, val);
|
||||
break;
|
||||
case 23: // 2x3 not 23
|
||||
if (usingArbShaders()) {
|
||||
showWarning("2x3 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix2x3(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 32: // 3x2 not 32
|
||||
if (usingArbShaders()) {
|
||||
showWarning("3x2 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix3x2(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 24: // 2x4 not 24
|
||||
if (usingArbShaders()) {
|
||||
showWarning("2x4 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix2x4(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 42: // 4x2 not 42
|
||||
if (usingArbShaders()) {
|
||||
showWarning("4x2 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix4x2(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 34: // 3x4 not 34
|
||||
if (usingArbShaders()) {
|
||||
showWarning("3x4 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix3x4(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 43: // 4x3 not 43
|
||||
if (usingArbShaders()) {
|
||||
showWarning("4x3 matrix uniform with location " + loc + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix4x3(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid matrix size for UniformUtil.set: " + matrixSize);
|
||||
}
|
||||
}
|
||||
|
||||
// methods for turning a uniform value into a single object so it can be set later
|
||||
public static UFVec1 wrap(float v0) {
|
||||
return new UFVec1(v0);
|
||||
}
|
||||
|
||||
public static UFVec2 wrap(float v0, float v1) {
|
||||
return new UFVec2(v0, v1);
|
||||
}
|
||||
|
||||
public static UFVec3 wrap(float v0, float v1, float v2) {
|
||||
return new UFVec3(v0, v1, v2);
|
||||
}
|
||||
|
||||
public static UFVec4 wrap(float v0, float v1, float v2, float v3) {
|
||||
return new UFVec4(v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
public static UIVec1 wrap(int v0) {
|
||||
return new UIVec1(v0);
|
||||
}
|
||||
|
||||
public static UIVec2 wrap(int v0, int v1) {
|
||||
return new UIVec2(v0, v1);
|
||||
}
|
||||
|
||||
public static UIVec3 wrap(int v0, int v1, int v2) {
|
||||
return new UIVec3(v0, v1, v2);
|
||||
}
|
||||
|
||||
public static UIVec4 wrap(int v0, int v1, int v2, int v3) {
|
||||
return new UIVec4(v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
public static UIVec1 wrap(boolean v0) {
|
||||
return wrap(v0 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec2 wrap(boolean v0, boolean v1) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec3 wrap(boolean v0, boolean v1, boolean v2) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec4 wrap(boolean v0, boolean v1, boolean v2, boolean v3) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0, v3 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UFArray wrap(int vecSize, FloatBuffer val) {
|
||||
return new UFArray(vecSize, val);
|
||||
}
|
||||
|
||||
public static UIArray wrap(int vecSize, IntBuffer val) {
|
||||
return new UIArray(vecSize, val);
|
||||
}
|
||||
|
||||
public static UMatrix wrap(int matrixSize, boolean transpose, FloatBuffer val) {
|
||||
return new UMatrix(matrixSize, transpose, val);
|
||||
}
|
||||
|
||||
public interface UValue {
|
||||
void set(int loc);
|
||||
}
|
||||
|
||||
public static class UIVec1 implements UValue {
|
||||
|
@ -147,7 +407,7 @@ public final class UniformUtil {
|
|||
|
||||
public UIArray(int vecSize, IntBuffer buffer) {
|
||||
if (vecSize < 1 || vecSize > 4) {
|
||||
throw new RuntimeException("Invalid vector size for UIArray: " + String.valueOf(vecSize));
|
||||
throw new RuntimeException("Invalid vector size for UIArray: " + vecSize);
|
||||
}
|
||||
|
||||
this.vecSize = vecSize;
|
||||
|
@ -165,7 +425,7 @@ public final class UniformUtil {
|
|||
|
||||
public UFArray(int vecSize, FloatBuffer buffer) {
|
||||
if (vecSize < 1 || vecSize > 4) {
|
||||
throw new RuntimeException("Invalid vector size for UFArray: " + String.valueOf(vecSize));
|
||||
throw new RuntimeException("Invalid vector size for UFArray: " + vecSize);
|
||||
}
|
||||
|
||||
this.vecSize = vecSize;
|
||||
|
@ -184,7 +444,7 @@ public final class UniformUtil {
|
|||
|
||||
public UMatrix(int matrixSize, boolean transpose, FloatBuffer buffer) {
|
||||
if (matrixSize < 2 || matrixSize > 4) {
|
||||
throw new RuntimeException("Invalid matrix size for UMatrix: " + String.valueOf(matrixSize));
|
||||
throw new RuntimeException("Invalid matrix size for UMatrix: " + matrixSize);
|
||||
}
|
||||
|
||||
this.matrixSize = matrixSize;
|
||||
|
@ -196,265 +456,4 @@ public final class UniformUtil {
|
|||
UniformUtil.set(loc, this.matrixSize, this.transpose, this.buffer);
|
||||
}
|
||||
}
|
||||
|
||||
private static Boolean arbShaders = null;
|
||||
|
||||
private static boolean usingArbShaders() {
|
||||
if (arbShaders == null) {
|
||||
// OpenGlHelper.arbShaders is private :(
|
||||
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
|
||||
arbShaders = new Boolean(contextcapabilities.OpenGL21);
|
||||
}
|
||||
|
||||
return (boolean) arbShaders;
|
||||
}
|
||||
|
||||
private static boolean canWarn = true;
|
||||
|
||||
private static void showWarning(String message) {
|
||||
if (canWarn) {
|
||||
canWarn = false;
|
||||
Seppuku.INSTANCE.getLogger().log(Level.WARNING, message + ". No further warning will be shown");
|
||||
}
|
||||
}
|
||||
|
||||
// methods for setting regular uniforms
|
||||
public static void set(int loc, float v0) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform1fARB(loc, v0);
|
||||
} else {
|
||||
glUniform1f(loc, v0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform2fARB(loc, v0, v1);
|
||||
} else {
|
||||
glUniform2f(loc, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1, float v2) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform3fARB(loc, v0, v1, v2);
|
||||
} else {
|
||||
glUniform3f(loc, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, float v0, float v1, float v2, float v3) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform4fARB(loc, v0, v1, v2, v3);
|
||||
} else {
|
||||
glUniform4f(loc, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform1iARB(loc, v0);
|
||||
} else {
|
||||
glUniform1i(loc, v0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform2iARB(loc, v0, v1);
|
||||
} else {
|
||||
glUniform2i(loc, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1, int v2) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform3iARB(loc, v0, v1, v2);
|
||||
} else {
|
||||
glUniform3i(loc, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int v0, int v1, int v2, int v3) {
|
||||
if (usingArbShaders()) {
|
||||
glUniform4iARB(loc, v0, v1, v2, v3);
|
||||
} else {
|
||||
glUniform4i(loc, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0) {
|
||||
set(loc, v0 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1, boolean v2) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static void set(int loc, boolean v0, boolean v1, boolean v2, boolean v3) {
|
||||
set(loc, v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0, v3 ? 1 : 0);
|
||||
}
|
||||
|
||||
// methods for setting array uniforms. does no bounds checking; WILL crash on invalid data
|
||||
public static void set(int loc, int vecSize, FloatBuffer val) {
|
||||
switch (vecSize) {
|
||||
case 1:
|
||||
OpenGlHelper.glUniform1(loc, val);
|
||||
break;
|
||||
case 2:
|
||||
OpenGlHelper.glUniform2(loc, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniform3(loc, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniform4(loc, val);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid vector size for UniformUtil.set: " + String.valueOf(vecSize));
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(int loc, int vecSize, IntBuffer val) {
|
||||
switch (vecSize) {
|
||||
case 1:
|
||||
OpenGlHelper.glUniform1(loc, val);
|
||||
break;
|
||||
case 2:
|
||||
OpenGlHelper.glUniform2(loc, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniform3(loc, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniform4(loc, val);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid vector size for UniformUtil.set: " + String.valueOf(vecSize));
|
||||
}
|
||||
}
|
||||
|
||||
// methods for setting matrix uniforms. does no bounds checking; WILL crash on invalid data
|
||||
public static void set(int loc, int matrixSize, boolean transpose, FloatBuffer val) {
|
||||
switch (matrixSize) {
|
||||
case 2:
|
||||
OpenGlHelper.glUniformMatrix2(loc, transpose, val);
|
||||
break;
|
||||
case 3:
|
||||
OpenGlHelper.glUniformMatrix3(loc, transpose, val);
|
||||
break;
|
||||
case 4:
|
||||
OpenGlHelper.glUniformMatrix4(loc, transpose, val);
|
||||
break;
|
||||
case 23: // 2x3 not 23
|
||||
if (usingArbShaders()) {
|
||||
showWarning("2x3 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix2x3(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 32: // 3x2 not 32
|
||||
if (usingArbShaders()) {
|
||||
showWarning("3x2 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix3x2(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 24: // 2x4 not 24
|
||||
if (usingArbShaders()) {
|
||||
showWarning("2x4 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix2x4(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 42: // 4x2 not 42
|
||||
if (usingArbShaders()) {
|
||||
showWarning("4x2 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix4x2(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 34: // 3x4 not 34
|
||||
if (usingArbShaders()) {
|
||||
showWarning("3x4 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix3x4(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
case 43: // 4x3 not 43
|
||||
if (usingArbShaders()) {
|
||||
showWarning("4x3 matrix uniform with location " + String.valueOf(loc) + " not set since this feature is not available with ARB shaders; OpenGL 2.1 required");
|
||||
} else {
|
||||
glUniformMatrix4x3(loc, transpose, val);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Invalid matrix size for UniformUtil.set: " + String.valueOf(matrixSize));
|
||||
}
|
||||
}
|
||||
|
||||
// methods for turning a uniform value into a single object so it can be set later
|
||||
public static UFVec1 wrap(float v0) {
|
||||
return new UFVec1(v0);
|
||||
}
|
||||
|
||||
public static UFVec2 wrap(float v0, float v1) {
|
||||
return new UFVec2(v0, v1);
|
||||
}
|
||||
|
||||
public static UFVec3 wrap(float v0, float v1, float v2) {
|
||||
return new UFVec3(v0, v1, v2);
|
||||
}
|
||||
|
||||
public static UFVec4 wrap(float v0, float v1, float v2, float v3) {
|
||||
return new UFVec4(v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
public static UIVec1 wrap(int v0) {
|
||||
return new UIVec1(v0);
|
||||
}
|
||||
|
||||
public static UIVec2 wrap(int v0, int v1) {
|
||||
return new UIVec2(v0, v1);
|
||||
}
|
||||
|
||||
public static UIVec3 wrap(int v0, int v1, int v2) {
|
||||
return new UIVec3(v0, v1, v2);
|
||||
}
|
||||
|
||||
public static UIVec4 wrap(int v0, int v1, int v2, int v3) {
|
||||
return new UIVec4(v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
public static UIVec1 wrap(boolean v0) {
|
||||
return wrap(v0 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec2 wrap(boolean v0, boolean v1) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec3 wrap(boolean v0, boolean v1, boolean v2) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UIVec4 wrap(boolean v0, boolean v1, boolean v2, boolean v3) {
|
||||
return wrap(v0 ? 1 : 0, v1 ? 1 : 0, v2 ? 1 : 0, v3 ? 1 : 0);
|
||||
}
|
||||
|
||||
public static UFArray wrap(int vecSize, FloatBuffer val) {
|
||||
return new UFArray(vecSize, val);
|
||||
}
|
||||
|
||||
public static UIArray wrap(int vecSize, IntBuffer val) {
|
||||
return new UIArray(vecSize, val);
|
||||
}
|
||||
|
||||
public static UMatrix wrap(int matrixSize, boolean transpose, FloatBuffer val) {
|
||||
return new UMatrix(matrixSize, transpose, val);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,10 @@ public class Regex {
|
|||
this.setPatternString(patternString);
|
||||
}
|
||||
|
||||
public String getPatternString() {
|
||||
return this.patternString;
|
||||
}
|
||||
|
||||
public void setPatternString(String patternString) {
|
||||
this.patternString = patternString;
|
||||
if (patternString.equals("")) {
|
||||
|
@ -30,10 +34,6 @@ public class Regex {
|
|||
}
|
||||
}
|
||||
|
||||
public String getPatternString() {
|
||||
return this.patternString;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Pattern getPattern() {
|
||||
return this.pattern;
|
||||
|
|
|
@ -16,14 +16,14 @@ public class Shader {
|
|||
this("");
|
||||
}
|
||||
|
||||
public void setShaderID(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getShaderID() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setShaderID(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ShaderProgram getShaderProgram() {
|
||||
if (this.id.equals("")) {
|
||||
|
|
|
@ -73,7 +73,7 @@ public class Value<T> {
|
|||
}
|
||||
|
||||
public String getCapitalizedName() {
|
||||
return Character.toString(this.getName().charAt(0)) + this.getName().toLowerCase().replaceFirst(Character.toString(this.getName().charAt(0)).toLowerCase(), "");
|
||||
return this.getName().charAt(0) + this.getName().toLowerCase().replaceFirst(Character.toString(this.getName().charAt(0)).toLowerCase(), "");
|
||||
}
|
||||
|
||||
public String getCapitalizedValue() {
|
||||
|
|
|
@ -26,14 +26,12 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class CalcStrongholdCommand extends Command {
|
||||
|
||||
private final String[] resetAlias = new String[]{"Reset", "Res", "R"};
|
||||
private Vec3d firstStart;
|
||||
private Vec3d firstEnd;
|
||||
|
||||
private Vec3d secondStart;
|
||||
private Vec3d secondEnd;
|
||||
|
||||
private final String[] resetAlias = new String[]{"Reset", "Res", "R"};
|
||||
|
||||
public CalcStrongholdCommand() {
|
||||
super("CalcStronghold", new String[]{"CS", "FindStronghold", "cstrong"}, "Calculates where the nearest stronghold is", "CalcStronghold\n" +
|
||||
"CalcStronghold Reset");
|
||||
|
|
|
@ -67,13 +67,13 @@ public final class EnchantCommand extends Command {
|
|||
// disable curses? (used when doing all enchants)
|
||||
if (split.length > 3) {
|
||||
final String disableCurses = split[3];
|
||||
if (disableCurses.toLowerCase().equals("true") && enchant.isCurse())
|
||||
if (disableCurses.equalsIgnoreCase("true") && enchant.isCurse())
|
||||
continue;
|
||||
}
|
||||
|
||||
final String enchantmentName = enchant.getTranslatedName(0).replaceAll(" ", "");
|
||||
|
||||
if (enchantToApply.toLowerCase().equals("all") || enchantmentName.toLowerCase().startsWith(enchantToApply.toLowerCase())) {
|
||||
if (enchantToApply.equalsIgnoreCase("all") || enchantmentName.toLowerCase().startsWith(enchantToApply.toLowerCase())) {
|
||||
final NBTTagCompound enchantmentCompound = new NBTTagCompound();
|
||||
enchantmentCompound.setShort("id", (short) Enchantment.getEnchantmentID(enchant)); // set the enchant id
|
||||
if (levelToApply.toLowerCase().startsWith("max")) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class LocateFeatureCommand extends Command {
|
|||
Seppuku.INSTANCE.errorChat("Unknown number " + "\247f\"" + split[2] + "\"");
|
||||
return;
|
||||
}
|
||||
originHint = "to " + String.valueOf(originPos.getX()) + ", " + String.valueOf(originPos.getZ());
|
||||
originHint = "to " + originPos.getX() + ", " + originPos.getZ();
|
||||
} else {
|
||||
originPos = new BlockPos(Minecraft.getMinecraft().player.posX, 64, Minecraft.getMinecraft().player.posZ);
|
||||
originHint = "you";
|
||||
|
@ -69,7 +69,7 @@ public final class LocateFeatureCommand extends Command {
|
|||
if (pos == null) {
|
||||
Seppuku.INSTANCE.errorChat("No structure found " + "\247f\"" + split[1] + "\"");
|
||||
} else {
|
||||
Seppuku.INSTANCE.logChat(split[1] + " nearest " + originHint + " is at " + String.valueOf(pos.getX()) + ", " + String.valueOf(pos.getZ()));
|
||||
Seppuku.INSTANCE.logChat(split[1] + " nearest " + originHint + " is at " + pos.getX() + ", " + pos.getZ());
|
||||
}
|
||||
} else {
|
||||
Seppuku.INSTANCE.errorChat("Seed not set. Use the seed command first");
|
||||
|
|
|
@ -47,10 +47,6 @@ public class AnchorPoint {
|
|||
this.point = point;
|
||||
}
|
||||
|
||||
public enum Point {
|
||||
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, TOP_CENTER, BOTTOM_CENTER
|
||||
}
|
||||
|
||||
public void updatePosition(final ScaledResolution sr) {
|
||||
switch (this.getPoint()) {
|
||||
case TOP_LEFT:
|
||||
|
@ -79,4 +75,8 @@ public class AnchorPoint {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Point {
|
||||
TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, TOP_CENTER, BOTTOM_CENTER
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,13 +21,12 @@ import net.minecraft.util.EnumHand;
|
|||
*/
|
||||
public final class BattleInfoComponent extends DraggableHudComponent {
|
||||
|
||||
private final Texture donorsTexture;
|
||||
private CrystalAuraModule crystalAuraModule;
|
||||
private KillAuraModule killAuraModule;
|
||||
private AutoTrapModule autoTrapModule;
|
||||
private AbstractClientPlayer currentOpponent;
|
||||
|
||||
private final Texture donorsTexture;
|
||||
|
||||
public BattleInfoComponent() {
|
||||
super("BattleInfo");
|
||||
this.setW(117);
|
||||
|
|
|
@ -28,26 +28,21 @@ import java.util.logging.Level;
|
|||
*/
|
||||
public final class ColorsComponent extends ResizableHudComponent {
|
||||
|
||||
private int scroll;
|
||||
|
||||
private int totalHeight;
|
||||
|
||||
private final int SCROLL_WIDTH = 5;
|
||||
private final int BORDER = 2;
|
||||
private final int TEXT_GAP = 1;
|
||||
private final int TITLE_BAR_HEIGHT = mc.fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
private ColorComponent currentColorComponent = null;
|
||||
private final Texture spectrum;
|
||||
|
||||
public int baseColor = 0xFFFFFFFF;
|
||||
public int selectedColor = 0xFFFFFFFF;
|
||||
private int scroll;
|
||||
private int totalHeight;
|
||||
private ColorComponent currentColorComponent = null;
|
||||
private int lastGradientMouseX = -1;
|
||||
private int lastGradientMouseY = -1;
|
||||
private int lastSpectrumMouseX = -1;
|
||||
private int lastSpectrumMouseY = -1;
|
||||
|
||||
public int baseColor = 0xFFFFFFFF;
|
||||
public int selectedColor = 0xFFFFFFFF;
|
||||
|
||||
public ColorsComponent() {
|
||||
super("Colors", 100, 120, 215, 1000);
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import java.util.List;
|
|||
*/
|
||||
public final class EntityListComponent extends DraggableHudComponent {
|
||||
|
||||
private final List<EntityGroup> entityGroups;
|
||||
public final List<HudComponent> components;
|
||||
private final List<EntityGroup> entityGroups;
|
||||
|
||||
public EntityListComponent() {
|
||||
super("EntityList");
|
||||
|
@ -321,7 +321,7 @@ public final class EntityListComponent extends DraggableHudComponent {
|
|||
}
|
||||
}
|
||||
|
||||
final String info = String.format("\n%s\n- Key: %s\n- Enchantments: %s\n- Durability: %s", ChatFormatting.AQUA + itemStack.getDisplayName() + ChatFormatting.RESET, itemStack.getTranslationKey(), enchantStringBuilder.toString(), itemStack.getMaxDamage() - itemStack.getItemDamage());
|
||||
final String info = String.format("\n%s\n- Key: %s\n- Enchantments: %s\n- Durability: %s", ChatFormatting.AQUA + itemStack.getDisplayName() + ChatFormatting.RESET, itemStack.getTranslationKey(), enchantStringBuilder, itemStack.getMaxDamage() - itemStack.getItemDamage());
|
||||
Seppuku.INSTANCE.logChat(info);
|
||||
} else {
|
||||
final String info = String.format("\n%s\n- Key: %s\n- Count: %s\n- Metadata: %s\n- Damage: %s\n- Max Damage: %s\n- Durability: %s", ChatFormatting.GRAY + itemStack.getDisplayName(), itemStack.getTranslationKey(), itemStack.getCount(), itemStack.getMetadata(), itemStack.getItemDamage(), itemStack.getMaxDamage(), itemStack.getMaxDamage() - itemStack.getItemDamage());
|
||||
|
|
|
@ -18,17 +18,14 @@ import org.lwjgl.opengl.GL11;
|
|||
*/
|
||||
public final class HubComponent extends ResizableHudComponent {
|
||||
|
||||
private int scroll;
|
||||
|
||||
private int totalHeight;
|
||||
|
||||
private final int SCROLL_WIDTH = 5;
|
||||
private final int BORDER = 2;
|
||||
private final int TEXT_GAP = 1;
|
||||
private final int TEXTURE_SIZE = 8;
|
||||
private final int TITLE_BAR_HEIGHT = mc.fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
private final Texture texture;
|
||||
private int scroll;
|
||||
private int totalHeight;
|
||||
|
||||
public HubComponent() {
|
||||
super("Hub", 100, 120, 125, 1000);
|
||||
|
|
|
@ -19,10 +19,8 @@ public class TrayComponent extends DraggableHudComponent {
|
|||
|
||||
private static final int TEXTURE_WIDTH = 16;
|
||||
private static final int TEXTURE_HEIGHT = 16;
|
||||
|
||||
private ToolTipComponent currentToolTip;
|
||||
|
||||
private final List<TrayButtonComponent> buttons = new ArrayList<>();
|
||||
private ToolTipComponent currentToolTip;
|
||||
|
||||
public TrayComponent() {
|
||||
super("Tray");
|
||||
|
@ -96,9 +94,9 @@ public class TrayComponent extends DraggableHudComponent {
|
|||
|
||||
public static class TrayButtonComponent extends HudComponent {
|
||||
|
||||
private boolean pressed;
|
||||
private final Texture textureOff;
|
||||
private final Texture textureOn;
|
||||
private boolean pressed;
|
||||
|
||||
public TrayButtonComponent(String name) {
|
||||
super(name);
|
||||
|
|
|
@ -8,7 +8,6 @@ import me.rigamortis.seppuku.api.value.Value;
|
|||
import me.rigamortis.seppuku.impl.gui.hud.GuiHudEditor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -184,9 +183,9 @@ public final class FpsGraphComponent extends ResizableHudComponent {
|
|||
this.speed = speed;
|
||||
this.color = new Color(255, 255, 255);
|
||||
}
|
||||
|
||||
|
||||
public FpsNode() {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,26 +35,21 @@ import java.util.List;
|
|||
public final class ModuleListComponent extends ResizableHudComponent {
|
||||
|
||||
private final Module.ModuleType type;
|
||||
|
||||
private int scroll = 0;
|
||||
private int oldScroll = 0;
|
||||
private int totalHeight;
|
||||
|
||||
private final int SCROLL_WIDTH = 5;
|
||||
private final int BORDER = 2;
|
||||
private final int TEXT_GAP = 1;
|
||||
private final int TEXTURE_SIZE = 8;
|
||||
private final int TITLE_BAR_HEIGHT = mc.fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
private String originalName = "";
|
||||
private String title = "";
|
||||
|
||||
private final HudEditorModule hudEditorModule;
|
||||
private final Texture texture;
|
||||
private final Texture gearTexture;
|
||||
|
||||
private ToolTipComponent currentToolTip;
|
||||
public ModuleSettingsComponent currentSettings;
|
||||
private int scroll = 0;
|
||||
private int oldScroll = 0;
|
||||
private int totalHeight;
|
||||
private String originalName = "";
|
||||
private String title = "";
|
||||
private ToolTipComponent currentToolTip;
|
||||
|
||||
public ModuleListComponent(Module.ModuleType type) {
|
||||
super(StringUtils.capitalize(type.name().toLowerCase()), 100, 100, 150, 400);
|
||||
|
@ -592,7 +587,7 @@ public final class ModuleListComponent extends ResizableHudComponent {
|
|||
this.addComponentToButtons(valueText);*/
|
||||
|
||||
CarouselComponent carouselComponent = new CarouselComponent(value.getName(), value);
|
||||
carouselComponent.setTooltipText(value.getDesc() + " " + ChatFormatting.GRAY + "(" + options.toString() + ")");
|
||||
carouselComponent.setTooltipText(value.getDesc() + " " + ChatFormatting.GRAY + "(" + options + ")");
|
||||
components.add(carouselComponent);
|
||||
this.addComponentToButtons(carouselComponent);
|
||||
} else if (value.getValue() instanceof String) {
|
||||
|
|
|
@ -77,7 +77,7 @@ public final class GuiAltManager extends GuiScreen implements GuiYesNoCallback {
|
|||
break;
|
||||
case 1:
|
||||
if (this.guiListAlt.hasSelected() && this.guiListAlt.getSelected() != null) {
|
||||
mc.displayGuiScreen((GuiScreen) new GuiYesNo(this, "Remove account '" + this.guiListAlt.getSelected().getAlt().getUsername() + "'?", "", "Yes", "No", 0));
|
||||
mc.displayGuiScreen(new GuiYesNo(this, "Remove account '" + this.guiListAlt.getSelected().getAlt().getUsername() + "'?", "", "Yes", "No", 0));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
|
|
@ -129,9 +129,7 @@ public final class CapeManager {
|
|||
final CapeUser user = this.find(player);
|
||||
if (user != null) {
|
||||
final ResourceLocation res = this.findResource(user.getCape());
|
||||
if (res != null) {
|
||||
return res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ import java.util.List;
|
|||
*/
|
||||
public final class ChatManager {
|
||||
|
||||
private Timer timer = new Timer();
|
||||
private final Timer timer = new Timer();
|
||||
|
||||
private List<String> chatBuffer = new ArrayList<>();
|
||||
private final List<String> chatBuffer = new ArrayList<>();
|
||||
|
||||
private World world;
|
||||
|
||||
|
|
|
@ -15,17 +15,14 @@ import java.util.List;
|
|||
*/
|
||||
public final class ConfigManager {
|
||||
|
||||
public static final String CONFIG_PATH = "Seppuku/Config/";
|
||||
private File configDir;
|
||||
private File moduleConfigDir;
|
||||
private File hudComponentConfigDir;
|
||||
|
||||
private boolean firstLaunch = false;
|
||||
private boolean customMainMenuHidden = false;
|
||||
|
||||
private List<Configurable> configurableList = new ArrayList<>();
|
||||
|
||||
public static final String CONFIG_PATH = "Seppuku/Config/";
|
||||
|
||||
public ConfigManager() {
|
||||
this.generateDirectories();
|
||||
}
|
||||
|
|
|
@ -32,11 +32,10 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public final class HudManager {
|
||||
|
||||
private final FirstLaunchComponent firstLaunchComponent;
|
||||
private List<HudComponent> componentList = new CopyOnWriteArrayList<>();
|
||||
private List<AnchorPoint> anchorPoints = new ArrayList<>();
|
||||
|
||||
private final FirstLaunchComponent firstLaunchComponent;
|
||||
|
||||
public HudManager() {
|
||||
final ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
|
||||
|
||||
|
|
|
@ -317,6 +317,10 @@ public final class ModuleManager {
|
|||
return moduleList;
|
||||
}
|
||||
|
||||
public void setModuleList(List<Module> moduleList) {
|
||||
this.moduleList = moduleList;
|
||||
}
|
||||
|
||||
public List<Module> getModuleList(Module.ModuleType type) {
|
||||
List<Module> list = new ArrayList<>();
|
||||
for (Module module : moduleList) {
|
||||
|
@ -326,8 +330,4 @@ public final class ModuleManager {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setModuleList(List<Module> moduleList) {
|
||||
this.moduleList = moduleList;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,9 +41,7 @@ public final class NotificationManager implements Animation {
|
|||
}
|
||||
|
||||
public void removeNotification(Notification notification) {
|
||||
if (this.notifications.contains(notification)) {
|
||||
this.notifications.remove(notification);
|
||||
}
|
||||
this.notifications.remove(notification);
|
||||
}
|
||||
|
||||
public List<Notification> getNotifications() {
|
||||
|
|
|
@ -13,8 +13,8 @@ import java.util.logging.Level;
|
|||
|
||||
public final class ShaderManager {
|
||||
// XXX a bimap would be better for this but i didnt want an extra library for a single class -rafern
|
||||
private Map<String, ShaderProgram> shaderList = new HashMap<String, ShaderProgram>();
|
||||
private Map<ShaderProgram, String> programToID = new HashMap<ShaderProgram, String>();
|
||||
private final Map<String, ShaderProgram> shaderList = new HashMap<String, ShaderProgram>();
|
||||
private final Map<ShaderProgram, String> programToID = new HashMap<ShaderProgram, String>();
|
||||
|
||||
public ShaderManager() {
|
||||
this.loadShaders();
|
||||
|
|
|
@ -14,7 +14,7 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class TickRateManager {
|
||||
|
||||
private long prevTime;
|
||||
private float[] ticks = new float[20];
|
||||
private final float[] ticks = new float[20];
|
||||
private int currentTick;
|
||||
|
||||
private float lastTick = -1;
|
||||
|
|
|
@ -288,11 +288,7 @@ public final class AutoTrapModule extends Module {
|
|||
}
|
||||
|
||||
private boolean checkFilter(Entity entity) {
|
||||
boolean ret = false;
|
||||
|
||||
if (entity instanceof EntityPlayer && entity != mc.player && Seppuku.INSTANCE.getFriendManager().isFriend(entity) == null && !entity.getName().equals(mc.player.getName())) {
|
||||
ret = true;
|
||||
}
|
||||
boolean ret = entity instanceof EntityPlayer && entity != mc.player && Seppuku.INSTANCE.getFriendManager().isFriend(entity) == null && !entity.getName().equals(mc.player.getName());
|
||||
|
||||
if (entity instanceof EntityLivingBase) {
|
||||
final EntityLivingBase entityLivingBase = (EntityLivingBase) entity;
|
||||
|
|
|
@ -11,7 +11,6 @@ import me.rigamortis.seppuku.api.util.MathUtil;
|
|||
import me.rigamortis.seppuku.api.util.Timer;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -32,26 +31,19 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class BurrowModule extends Module {
|
||||
|
||||
public enum Mode {
|
||||
JUMP, GLITCH, TP, INSTA
|
||||
}
|
||||
|
||||
public final Value<Mode> mode = new Value<>("Mode", new String[]{"m"}, "The current mode to use.", Mode.JUMP);
|
||||
public final Value<Float> glitchY = new Value<>("ModeGlitchY", new String[]{"mgy", "glitchy"}, "Using GLITCH mode, this will be your player's motionY", 0.5f, 0.1f, 1.5f, 0.1f);
|
||||
public final Value<Integer> tpHeight = new Value<>("ModeTPHeight", new String[]{"mtph", "mth", "tpheight", "tpy"}, "Using TP mode, this will be how many blocks above the player to TP", 20, -30, 30, 1);
|
||||
public final Value<Float> delay = new Value<>("ModeDelay", new String[]{"del", "d"}, "Delay(ms) to wait for placing obsidian after the initial jump. Not used in INSTA mode", 200.0f, 1.0f, 500.0f, 1.0f);
|
||||
public final Value<Boolean> smartTp = new Value<>("ModeSmartTp", new String[]{"smart", "adaptivetp", "a", "atp"}, "Searches for an air block to tp to for INSTA mode", true);
|
||||
public final Value<Boolean> noVoid = new Value<>("ModeNoVoid", new String[]{"nonegative", "nv"}, "Doesn't tp you under Y 0", true);
|
||||
|
||||
public final Value<Boolean> rotate = new Value<>("Rotate", new String[]{"rot", "r"}, "Rotate the players head to place the block", true);
|
||||
public final Value<Boolean> center = new Value<>("Center", new String[]{"centered", "c", "cen"}, "Centers the player on their current block when beginning to place", false);
|
||||
public final Value<Boolean> offGround = new Value<>("OffGround", new String[]{"offg", "og", "o"}, "Forces player onGround to false when enabled", true);
|
||||
public final Value<Boolean> sneaking = new Value<>("Sneaking", new String[]{"sneak", "s", "fs", "sneaking"}, "Forces player to sneak when enabled", false);
|
||||
|
||||
private final Timer timer = new Timer();
|
||||
private final RotationTask rotationTask = new RotationTask("BurrowTask", 9); // 9 == high priority
|
||||
private BlockPos burrowPos;
|
||||
|
||||
public BurrowModule() {
|
||||
super("Burrow", new String[]{"burow", "burro", "brrw"}, "Places obsidian inside yourself", "NONE", -1, ModuleType.COMBAT);
|
||||
}
|
||||
|
@ -235,4 +227,8 @@ public final class BurrowModule extends Module {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
JUMP, GLITCH, TP, INSTA
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,6 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class ChestFarmerModule extends Module {
|
||||
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
//public final Value<Boolean> pickOnlyMode = new Value<Boolean>("PickaxeOnly", new String[]{"pickonly", "onlypick", "onlypicks", "onlypickaxes", "pickaxesonly", "po"}, "Only run this module while a pickaxe is being held", true);
|
||||
public final Value<Boolean> visible = new Value<Boolean>("Visible", new String[]{"Visible", "v"}, "Casts a ray to the placement position, forces the placement when disabled", true);
|
||||
public final Value<Boolean> rotate = new Value<Boolean>("Rotate", new String[]{"rotation", "r", "rotate"}, "Rotate to place the chest", true);
|
||||
|
@ -44,7 +42,7 @@ public final class ChestFarmerModule extends Module {
|
|||
public final Value<Integer> range = new Value<Integer>("Range", new String[]{"MaxRange", "MaximumRange"}, "Range around you to mine ender chests", 3, 1, 6, 1);
|
||||
public final Value<Float> placeDelay = new Value<Float>("Delay", new String[]{"PlaceDelay", "PlaceDel"}, "The delay(ms) between chests being placed", 100.0f, 0.0f, 500.0f, 1.0f);
|
||||
public final Value<Integer> safeLimit = new Value<Integer>("SafeLimit", new String[]{"limit", "sl", "l"}, "The amount of ender chests we will keep and not farm", 16, 0, 128, 1);
|
||||
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
private final Timer placeTimer = new Timer();
|
||||
private final RotationTask placeRotationTask = new RotationTask("ChestFarmerPlaceTask", 3);
|
||||
private final RotationTask mineRotationTask = new RotationTask("ChestFarmerMineTask", 3);
|
||||
|
|
|
@ -10,13 +10,14 @@ import me.rigamortis.seppuku.api.event.render.EventRender3D;
|
|||
import me.rigamortis.seppuku.api.event.world.EventAddEntity;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.task.rotation.RotationTask;
|
||||
import me.rigamortis.seppuku.api.util.*;
|
||||
import me.rigamortis.seppuku.api.util.ColorUtil;
|
||||
import me.rigamortis.seppuku.api.util.MathUtil;
|
||||
import me.rigamortis.seppuku.api.util.RenderUtil;
|
||||
import me.rigamortis.seppuku.api.util.Timer;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import me.rigamortis.seppuku.impl.module.player.GodModeModule;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -450,11 +451,7 @@ public final class CrystalAuraModule extends Module {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (this.ignore.getValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return this.ignore.getValue();
|
||||
}
|
||||
|
||||
private boolean canPlaceCrystal(BlockPos pos) {
|
||||
|
@ -504,27 +501,6 @@ public final class CrystalAuraModule extends Module {
|
|||
return damage;
|
||||
}
|
||||
|
||||
private static final class PlaceLocation extends Vec3i {
|
||||
|
||||
private int alpha = 0xAA;
|
||||
private boolean placed = false;
|
||||
private float damage = -1;
|
||||
|
||||
private PlaceLocation(int xIn, int yIn, int zIn, float damage) {
|
||||
super(xIn, yIn, zIn);
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
private PlaceLocation(int xIn, int yIn, int zIn) {
|
||||
super(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
private void update() {
|
||||
if (this.alpha > 0)
|
||||
this.alpha -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public Timer getAttackTimer() {
|
||||
return attackTimer;
|
||||
}
|
||||
|
@ -565,11 +541,32 @@ public final class CrystalAuraModule extends Module {
|
|||
return currentAttackEntity;
|
||||
}
|
||||
|
||||
public void setCurrentAttackEntity(Entity currentAttackEntity) {
|
||||
this.currentAttackEntity = currentAttackEntity;
|
||||
}
|
||||
|
||||
public Entity getCurrentAttackPlayer() {
|
||||
return currentAttackPlayer;
|
||||
}
|
||||
|
||||
public void setCurrentAttackEntity(Entity currentAttackEntity) {
|
||||
this.currentAttackEntity = currentAttackEntity;
|
||||
private static final class PlaceLocation extends Vec3i {
|
||||
|
||||
private int alpha = 0xAA;
|
||||
private boolean placed = false;
|
||||
private float damage = -1;
|
||||
|
||||
private PlaceLocation(int xIn, int yIn, int zIn, float damage) {
|
||||
super(xIn, yIn, zIn);
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
private PlaceLocation(int xIn, int yIn, int zIn) {
|
||||
super(xIn, yIn, zIn);
|
||||
}
|
||||
|
||||
private void update() {
|
||||
if (this.alpha > 0)
|
||||
this.alpha -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,11 +127,7 @@ public final class KillAuraModule extends Module {
|
|||
}
|
||||
|
||||
private boolean checkFilter(Entity entity) {
|
||||
boolean ret = false;
|
||||
|
||||
if (this.players.getValue() && entity instanceof EntityPlayer && entity != Minecraft.getMinecraft().player && Seppuku.INSTANCE.getFriendManager().isFriend(entity) == null && !entity.getName().equals(Minecraft.getMinecraft().player.getName())) {
|
||||
ret = true;
|
||||
}
|
||||
boolean ret = this.players.getValue() && entity instanceof EntityPlayer && entity != Minecraft.getMinecraft().player && Seppuku.INSTANCE.getFriendManager().isFriend(entity) == null && !entity.getName().equals(Minecraft.getMinecraft().player.getName());
|
||||
|
||||
if (this.mobs.getValue() && entity instanceof IMob) {
|
||||
ret = true;
|
||||
|
|
|
@ -15,7 +15,6 @@ import me.rigamortis.seppuku.api.util.Timer;
|
|||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import me.rigamortis.seppuku.impl.module.player.FreeCamModule;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemChorusFruit;
|
||||
|
@ -35,8 +34,6 @@ import java.util.List;
|
|||
*/
|
||||
public final class NoCrystalModule extends Module {
|
||||
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public final Value<Boolean> extended = new Value<Boolean>("Extended", new String[]{"extend", "e", "big"}, "Enlarges the size of the fortress", false);
|
||||
public final Value<Boolean> visible = new Value<Boolean>("Visible", new String[]{"Visible", "v"}, "Casts a ray to the placement position, forces the placement when disabled", true);
|
||||
public final Value<Boolean> rotate = new Value<Boolean>("Rotate", new String[]{"rotation", "r", "rotate"}, "Rotate to place blocks", true);
|
||||
|
@ -46,7 +43,7 @@ public final class NoCrystalModule extends Module {
|
|||
public final Value<Boolean> sneak = new Value<Boolean>("PlaceOnSneak", new String[]{"sneak", "s", "pos", "sneakPlace"}, "When true, NoCrystal will only place while the player is sneaking", false);
|
||||
public final Value<Float> range = new Value<Float>("Range", new String[]{"MaxRange", "MaximumRange"}, "The maximum block reaching range to continue building in", 6.0f, 1.0f, 10.0f, 0.5f);
|
||||
public final Value<Float> placeDelay = new Value<Float>("Delay", new String[]{"PlaceDelay", "PlaceDel"}, "The delay(ms) between obsidian blocks being placed", 100.0f, 0.0f, 500.0f, 1.0f);
|
||||
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
private final Timer placeTimer = new Timer();
|
||||
private final Timer chorusTpTimer = new Timer();
|
||||
private final RotationTask rotationTask = new RotationTask("NoCrystalTask", 8);
|
||||
|
|
|
@ -24,14 +24,13 @@ import java.util.List;
|
|||
* @since 6/24/20
|
||||
*/
|
||||
public class TotemNotifierModule extends Module {
|
||||
public final List<Integer> entitiesWithTotems = new ArrayList<>();
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public TotemNotifierModule() {
|
||||
super("TotemNotifier", new String[]{"tm"}, "Notifies you when others pop totems", "NONE", -1, ModuleType.COMBAT);
|
||||
}
|
||||
|
||||
public final List<Integer> entitiesWithTotems = new ArrayList<>();
|
||||
|
||||
@Listener
|
||||
public void runTick(EventRunTick event) {
|
||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||
|
|
|
@ -19,6 +19,6 @@ public class ArrayListModule extends Module {
|
|||
}
|
||||
|
||||
public enum Mode {
|
||||
LENGTH, ALPHABET, UNSORTED;
|
||||
LENGTH, ALPHABET, UNSORTED
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ import java.util.regex.Pattern;
|
|||
*/
|
||||
public final class IgnoreModule extends Module {
|
||||
|
||||
private final String REGEX_NAME = "<(\\S+)\\s*(\\S+?)?>\\s(.*)";
|
||||
public final Value<Boolean> allowFriends = new Value<Boolean>("AllowFriends", new String[]{"AllowF", "Friends", "AF", "F"}, "If enabled, any friend's message will not be auto-ignored", true);
|
||||
private final String REGEX_NAME = "<(\\S+)\\s*(\\S+?)?>\\s(.*)";
|
||||
|
||||
public IgnoreModule() {
|
||||
super("Ignore", new String[]{"Ignor"}, "Allows you to ignore people client-side", "NONE", -1, ModuleType.HIDDEN);
|
||||
|
|
|
@ -121,10 +121,6 @@ public final class AutoIgnoreModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CLIENT, SERVER, BOTH
|
||||
}
|
||||
|
||||
public List<String> getBlacklist() {
|
||||
return blacklist;
|
||||
}
|
||||
|
@ -132,4 +128,8 @@ public final class AutoIgnoreModule extends Module {
|
|||
public void setBlacklist(List<String> blacklist) {
|
||||
this.blacklist = blacklist;
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CLIENT, SERVER, BOTH
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,9 +22,8 @@ import java.util.stream.IntStream;
|
|||
*/
|
||||
public final class AutoSignModule extends Module {
|
||||
|
||||
private String[] lines;
|
||||
|
||||
public final Value<Boolean> overflow = new Value("Overflow", new String[]{"Ov"}, "Fill the sign with the maximum number of randomly generated characters", false);
|
||||
private String[] lines;
|
||||
|
||||
public AutoSignModule() {
|
||||
super("AutoSign", new String[]{"AutomaticSign", "ASign"}, "Automatically writes text on signs for you", "NONE", -1, ModuleType.MISC);
|
||||
|
@ -41,7 +40,7 @@ public final class AutoSignModule extends Module {
|
|||
if (event.getScreen() != null && event.getScreen() instanceof GuiEditSign) {
|
||||
final GuiEditSign gui = (GuiEditSign) event.getScreen();
|
||||
|
||||
final boolean shouldCancel = this.overflow.getValue() ? true : this.lines != null;
|
||||
final boolean shouldCancel = this.overflow.getValue() || this.lines != null;
|
||||
|
||||
if (gui != null && shouldCancel && gui.tileSign != null) {
|
||||
Minecraft.getMinecraft().player.connection.sendPacket(new CPacketUpdateSign(gui.tileSign.getPos(), new TextComponentString[]{new TextComponentString(""), new TextComponentString(""), new TextComponentString(""), new TextComponentString("")}));
|
||||
|
|
|
@ -19,10 +19,6 @@ public final class ChatTimeStampsModule extends Module {
|
|||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Time format, 12 hour or 24 hour", Mode.TWELVE);
|
||||
|
||||
private enum Mode {
|
||||
TWELVE, TWENTY_FOUR
|
||||
}
|
||||
|
||||
public ChatTimeStampsModule() {
|
||||
super("ChatTimeStamps", new String[]{"ChatStamp", "ChatStamps"}, "Appends a time stamp on chat messages", "NONE", -1, ModuleType.MISC);
|
||||
}
|
||||
|
@ -58,4 +54,8 @@ public final class ChatTimeStampsModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
TWELVE, TWENTY_FOUR
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,17 +22,11 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class CoordLoggerModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between various coord-logger modes", Mode.VANILLA);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, SPIGOT
|
||||
}
|
||||
|
||||
public final Value<Boolean> thunder = new Value<Boolean>("Thunder", new String[]{"thund"}, "Logs positions of thunder/lightning sounds", true);
|
||||
public final Value<Boolean> endPortal = new Value<Boolean>("EndPortal", new String[]{"portal"}, "Logs position of end portal creation sound", true);
|
||||
public final Value<Boolean> wither = new Value<Boolean>("Wither", new String[]{"with"}, "Logs positions of wither sounds", true);
|
||||
public final Value<Boolean> endDragon = new Value<Boolean>("EndDragon", new String[]{"dragon"}, "Logs positions of end dragon sounds", true);
|
||||
public final Value<Boolean> slimes = new Value<Boolean>("Slimes", new String[]{"slime"}, "Logs positions of slime spawns", false);
|
||||
|
||||
public CoordLoggerModule() {
|
||||
super("CoordLogger", new String[]{"CoordLog", "CLogger", "CLog"}, "Logs useful coordinates", "NONE", -1, ModuleType.MISC);
|
||||
}
|
||||
|
@ -111,4 +105,8 @@ public final class CoordLoggerModule extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, SPIGOT
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,10 +31,6 @@ public final class DonkeyAlertModule extends Module {
|
|||
|
||||
private final Timer timer = new Timer();
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
|
||||
public DonkeyAlertModule() {
|
||||
super("DonkeyAlert", new String[]{"Donkellama", "Donkeyllama", "DonkeyFinder", "LlamaFinder", "StorageEntityFinder", "Dllama", "Donkelama", "Donkeylama", "Donk", "DonkAlert", "DonkeyAlert", "LlamaAlert"}, "Alerts you about donkeys and llamas!! (horses, mules, too..)", "NONE", -1, ModuleType.MISC);
|
||||
}
|
||||
|
@ -81,4 +77,8 @@ public final class DonkeyAlertModule extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,9 +13,8 @@ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
|||
public final class FakePlayerModule extends Module {
|
||||
|
||||
public final Value<String> username = new Value<String>("Username", new String[]{"name", "uname", "u"}, "The username of the fake player", "Notch");
|
||||
|
||||
private EntityOtherPlayerMP entity;
|
||||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
private EntityOtherPlayerMP entity;
|
||||
|
||||
public FakePlayerModule() {
|
||||
super("FakePlayer", new String[]{"FakeP", "FPlayer"}, "Adds a fake player to your game", "NONE", -1, Module.ModuleType.MISC);
|
||||
|
|
|
@ -16,10 +16,6 @@ public final class GreeterModule extends Module {
|
|||
public final Value<Boolean> friends = new Value<Boolean>("Friends", new String[]{"Friend", "F"}, "Will only greet friends", false);
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between greeter modes: Client mode will only appear for you, Server mode will type the greeting in chat", Mode.CLIENT);
|
||||
|
||||
private enum Mode {
|
||||
CLIENT, SERVER
|
||||
}
|
||||
|
||||
public GreeterModule() {
|
||||
super("Greeter", new String[]{"Greet"}, "Automatically announces when a player joins and leaves", "NONE", -1, ModuleType.MISC);
|
||||
}
|
||||
|
@ -54,4 +50,8 @@ public final class GreeterModule extends Module {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CLIENT, SERVER
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,13 +31,7 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class LaggerModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between various lagger modes, each utilizing a different exploit to cause lag", Mode.BOXER);
|
||||
|
||||
private enum Mode {
|
||||
BOXER, SWAP, MOVEMENT, SIGN, NBT, CONTAINER, MAP
|
||||
}
|
||||
|
||||
public final Value<Integer> packets = new Value<Integer>("Packets", new String[]{"pckts", "packet"}, "Amount of packets to send each tick while running the chosen lag mode", 500, 0, 5000, 1);
|
||||
|
||||
private Container lastContainer = null;
|
||||
|
||||
public LaggerModule() {
|
||||
|
@ -148,4 +142,8 @@ public final class LaggerModule extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
BOXER, SWAP, MOVEMENT, SIGN, NBT, CONTAINER, MAP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,17 +19,10 @@ import java.awt.*;
|
|||
public final class NoBiomeColorModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between NoBiomeColor modes, Default to use vanilla colors, Custom to use specified RGB values", Mode.DEFAULT);
|
||||
|
||||
private enum Mode {
|
||||
DEFAULT, CUSTOM
|
||||
}
|
||||
|
||||
public final Value<Color> color = new Value<Color>("CustomColor", new String[]{"customcolor", "color", "c"}, "Edit the custom biome color", new Color(255, 255, 255));
|
||||
|
||||
private float prevRed;
|
||||
private float prevGreen;
|
||||
private float prevBlue;
|
||||
|
||||
private Mode prevMode;
|
||||
|
||||
public NoBiomeColorModule() {
|
||||
|
@ -132,4 +125,8 @@ public final class NoBiomeColorModule extends Module {
|
|||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
DEFAULT, CUSTOM
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,15 +18,12 @@ import java.util.logging.Level;
|
|||
*/
|
||||
public final class PacketLoggerModule extends Module {
|
||||
|
||||
private Packet[] packets;
|
||||
|
||||
public final Value<Boolean> incoming = new Value<Boolean>("Incoming", new String[]{"in"}, "Log incoming packets when enabled", true);
|
||||
public final Value<Boolean> outgoing = new Value<Boolean>("Outgoing", new String[]{"out"}, "Log outgoing packets when enabled", true);
|
||||
|
||||
public final Value<Boolean> chat = new Value<Boolean>("Chat", new String[]{"ch"}, "Logs packet traffic to chat", true);
|
||||
public final Value<Boolean> console = new Value<Boolean>("Console", new String[]{"con"}, "Logs packet traffic to console", true);
|
||||
|
||||
public final Value<Boolean> data = new Value<Boolean>("Data", new String[]{"dat"}, "Include data about the packet's class in the log when enabled", true);
|
||||
private Packet[] packets;
|
||||
|
||||
public PacketLoggerModule() {
|
||||
super("PacketLogger", new String[]{"pktlgr"}, "Log incoming and/or outgoing packets to console", "NONE", -1, ModuleType.MISC);
|
||||
|
|
|
@ -20,12 +20,11 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class ReconnectModule extends Module {
|
||||
|
||||
public final Value<Float> delay = new Value<Float>("Delay", new String[]{"Del"}, "Delay in MS (milliseconds) between reconnect attempts", 3000.0f, 0.0f, 10000.0f, 500.0f);
|
||||
private String lastIp;
|
||||
private int lastPort;
|
||||
private boolean reconnect;
|
||||
private Timer timer = new Timer();
|
||||
|
||||
public final Value<Float> delay = new Value<Float>("Delay", new String[]{"Del"}, "Delay in MS (milliseconds) between reconnect attempts", 3000.0f, 0.0f, 10000.0f, 500.0f);
|
||||
private final Timer timer = new Timer();
|
||||
|
||||
public ReconnectModule() {
|
||||
super("Reconnect", new String[]{"Rejoin", "Recon", "AutoReconnect"}, "Automatically reconnects to the last server after being kicked", "NONE", -1, ModuleType.MISC);
|
||||
|
|
|
@ -51,10 +51,6 @@ public final class StorageAlertModule extends Module {
|
|||
private final File locationsFile;
|
||||
private CommandsModule commandsModule;
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
|
||||
public StorageAlertModule() {
|
||||
super("StorageAlert", new String[]{"StorageAlerts", "ChestAlert"}, "Alerts you how many storage blocks are in a chunk when it's loaded", "NONE", -1, ModuleType.MISC);
|
||||
|
||||
|
@ -147,4 +143,8 @@ public final class StorageAlertModule extends Module {
|
|||
|
||||
FileUtil.write(this.locationsFile, linesToAdd, false);
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,11 +19,6 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class VisualRangeModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between alert modes", Mode.NOTIFICATION);
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
|
||||
private int prevPlayer = -1;
|
||||
|
||||
public VisualRangeModule() {
|
||||
|
@ -75,5 +70,9 @@ public final class VisualRangeModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,17 +32,11 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class ElytraFlyModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Mode to use for elytra flight", Mode.LOOK);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, PACKET, CONTROL, LOOK
|
||||
}
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd", "amount", "s"}, "Speed multiplier for elytra flight, higher values equals more speed", 1.0f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Float> speedX = new Value<Float>("SpeedX", new String[]{"SpdX", "amountX", "sX"}, "The X speed factor (speed * this)", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Float> speedYUp = new Value<Float>("SpeedYUp", new String[]{"SpdYUp", "amountYUp", "sYU"}, "The upwards Y speed factor (speed * this)", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Float> speedYDown = new Value<Float>("SpeedYDown", new String[]{"SpdYDown", "amountYDown", "sYD"}, "The downwards Y speed factor (speed * this)", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Float> speedZ = new Value<Float>("SpeedZ", new String[]{"SpdZ", "amountZ", "sZ"}, "The Z speed factor (speed * this)", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
|
||||
public final Value<Boolean> autoStart = new Value<Boolean>("AutoStart", new String[]{"AutoStart", "Auto-Start", "start", "autojump", "as"}, "Hold down the jump key to have an easy automated lift off", true);
|
||||
public final Value<Float> autoStartDelay = new Value<Float>("StartDelay", new String[]{"AutoStartDelay", "startdelay", "asd"}, "Delay(ms) between auto-start attempts", 100.0f, 0.0f, 300.0f, 10.0f);
|
||||
public final Value<Float> autoStartJumpDelay = new Value<Float>("JumpDelay", new String[]{"AutoStartJumpDelay", "jumpdelay", "autojumpdelay", "ajd"}, "Delay(ms) after holding jump key auto-start begins", 500.0f, 0.0f, 1000.0f, 100.0f);
|
||||
|
@ -55,12 +49,10 @@ public final class ElytraFlyModule extends Module {
|
|||
public final Value<Boolean> disableNoHunger = new Value<Boolean>("DisableNoHunger", new String[]{"NoHunger", "Hunger", "DNH"}, "Automatically disables the 'NoHunger' module", true);
|
||||
public final Value<Boolean> infiniteDurability = new Value<Boolean>("InfiniteDurability", new String[]{"InfiniteDura", "dura", "inf", "infdura"}, "Enables an old exploit that sends the start elytra-flying packet each tick (will kick you)", false);
|
||||
public final Value<Boolean> noKick = new Value<Boolean>("NoKick", new String[]{"AntiKick", "Kick", "nk"}, "Bypass the server kicking you for flying while in elytra flight (Only works for Packet mode!!)", false);
|
||||
|
||||
private final Timer startDelayTimer = new Timer();
|
||||
private final Timer equipDelayTimer = new Timer();
|
||||
private final Timer stayAirborneTimer = new Timer();
|
||||
private final Timer jumpTimer = new Timer();
|
||||
|
||||
public ElytraFlyModule() {
|
||||
super("ElytraFly", new String[]{"Elytra", "ElytraPlus", "Elytra+"}, "Allows you to fly with elytras", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -366,4 +358,8 @@ public final class ElytraFlyModule extends Module {
|
|||
|
||||
return elytras;
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, PACKET, CONTROL, LOOK
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,18 +25,10 @@ import java.util.List;
|
|||
public final class FlightModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The flight mode to use", Mode.VANILLA);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, PACKET
|
||||
}
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd"}, "Speed multiplier for flight, higher values equals more speed", 1.0f, 0.0f, 5.0f, 0.01f);
|
||||
|
||||
public final Value<Boolean> noKick = new Value<Boolean>("NoKick", new String[]{"AntiKick", "Kick"}, "Bypass the server kicking you for flying while in flight", true);
|
||||
|
||||
private int teleportId;
|
||||
private List<CPacketPlayer> packets = new ArrayList<>();
|
||||
|
||||
private final List<CPacketPlayer> packets = new ArrayList<>();
|
||||
public FlightModule() {
|
||||
super("Flight", new String[]{"Fly"}, "Allows you to fly", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -225,4 +217,8 @@ public final class FlightModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, PACKET
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,13 +20,8 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class GuiMoveModule extends Module {
|
||||
|
||||
public enum Mode {
|
||||
NEW, OLD
|
||||
}
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"mod", "m"}, "Change between modes", Mode.NEW);
|
||||
public final Value<Boolean> allowSignMove = new Value<Boolean>("AllowSignMove", new String[]{"sign", "allowsign", "as"}, "If enabled you will be able to move while in a sign GUI", false);
|
||||
|
||||
public GuiMoveModule() {
|
||||
super("GUIMove", new String[]{"InvMove", "InventoryMove", "GUIM"}, "Allows you to move while guis are open", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -83,4 +78,8 @@ public final class GuiMoveModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
NEW, OLD
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,17 +24,67 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class JesusModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The current Jesus/WaterWalk mode to use", Mode.NCP);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, NCP, BOUNCE
|
||||
}
|
||||
|
||||
public final Value<Float> offset = new Value<Float>("Offset", new String[]{"Off", "O"}, "Amount to offset the player into the water's bounding box", 0.05f, 0.0f, 0.9f, 0.01f);
|
||||
|
||||
public JesusModule() {
|
||||
super("Jesus", new String[]{"LiquidWalk", "WaterWalk"}, "Allows you to walk on water", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
||||
public static boolean isInLiquid() {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
if (mc.player.fallDistance >= 3.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mc.player != null) {
|
||||
boolean inLiquid = false;
|
||||
final AxisAlignedBB bb = mc.player.getRidingEntity() != null ? mc.player.getRidingEntity().getEntityBoundingBox() : mc.player.getEntityBoundingBox();
|
||||
int y = (int) bb.minY;
|
||||
for (int x = MathHelper.floor(bb.minX); x < MathHelper.floor(bb.maxX) + 1; x++) {
|
||||
for (int z = MathHelper.floor(bb.minZ); z < MathHelper.floor(bb.maxZ) + 1; z++) {
|
||||
final Block block = mc.world.getBlockState(new BlockPos(x, y, z)).getBlock();
|
||||
if (!(block instanceof BlockAir)) {
|
||||
if (!(block instanceof BlockLiquid)) {
|
||||
return false;
|
||||
}
|
||||
inLiquid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return inLiquid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOnLiquid(double offset) {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
if (mc.player.fallDistance >= 3.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mc.player != null) {
|
||||
final AxisAlignedBB bb = mc.player.getRidingEntity() != null ? mc.player.getRidingEntity().getEntityBoundingBox().contract(0.0d, 0.0d, 0.0d).offset(0.0d, -offset, 0.0d) : mc.player.getEntityBoundingBox().contract(0.0d, 0.0d, 0.0d).offset(0.0d, -offset, 0.0d);
|
||||
boolean onLiquid = false;
|
||||
int y = (int) bb.minY;
|
||||
for (int x = MathHelper.floor(bb.minX); x < MathHelper.floor(bb.maxX + 1.0D); x++) {
|
||||
for (int z = MathHelper.floor(bb.minZ); z < MathHelper.floor(bb.maxZ + 1.0D); z++) {
|
||||
final Block block = mc.world.getBlockState(new BlockPos(x, y, z)).getBlock();
|
||||
if (block != Blocks.AIR) {
|
||||
if (!(block instanceof BlockLiquid)) {
|
||||
return false;
|
||||
}
|
||||
onLiquid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return onLiquid;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetaData() {
|
||||
return this.mode.getValue().name();
|
||||
|
@ -95,66 +145,11 @@ public final class JesusModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
if (mc.player.fallDistance >= 3.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(mc.player.fallDistance >= 3.0f);
|
||||
}
|
||||
|
||||
public static boolean isInLiquid() {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
if (mc.player.fallDistance >= 3.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mc.player != null) {
|
||||
boolean inLiquid = false;
|
||||
final AxisAlignedBB bb = mc.player.getRidingEntity() != null ? mc.player.getRidingEntity().getEntityBoundingBox() : mc.player.getEntityBoundingBox();
|
||||
int y = (int) bb.minY;
|
||||
for (int x = MathHelper.floor(bb.minX); x < MathHelper.floor(bb.maxX) + 1; x++) {
|
||||
for (int z = MathHelper.floor(bb.minZ); z < MathHelper.floor(bb.maxZ) + 1; z++) {
|
||||
final Block block = mc.world.getBlockState(new BlockPos(x, y, z)).getBlock();
|
||||
if (!(block instanceof BlockAir)) {
|
||||
if (!(block instanceof BlockLiquid)) {
|
||||
return false;
|
||||
}
|
||||
inLiquid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return inLiquid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOnLiquid(double offset) {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
if (mc.player.fallDistance >= 3.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mc.player != null) {
|
||||
final AxisAlignedBB bb = mc.player.getRidingEntity() != null ? mc.player.getRidingEntity().getEntityBoundingBox().contract(0.0d, 0.0d, 0.0d).offset(0.0d, -offset, 0.0d) : mc.player.getEntityBoundingBox().contract(0.0d, 0.0d, 0.0d).offset(0.0d, -offset, 0.0d);
|
||||
boolean onLiquid = false;
|
||||
int y = (int) bb.minY;
|
||||
for (int x = MathHelper.floor(bb.minX); x < MathHelper.floor(bb.maxX + 1.0D); x++) {
|
||||
for (int z = MathHelper.floor(bb.minZ); z < MathHelper.floor(bb.maxZ + 1.0D); z++) {
|
||||
final Block block = mc.world.getBlockState(new BlockPos(x, y, z)).getBlock();
|
||||
if (block != Blocks.AIR) {
|
||||
if (!(block instanceof BlockLiquid)) {
|
||||
return false;
|
||||
}
|
||||
onLiquid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return onLiquid;
|
||||
}
|
||||
|
||||
return false;
|
||||
private enum Mode {
|
||||
VANILLA, NCP, BOUNCE
|
||||
}
|
||||
|
||||
}
|
|
@ -35,12 +35,10 @@ public final class ScaffoldModule extends Module {
|
|||
//public final Value<Boolean> destroy = new Value<Boolean>("Destroy", new String[]{"Dest"}, "When enabled, after placing the block, forces the player to swing/destroy at the same position.", false);
|
||||
|
||||
private final int[] blackList = new int[]{145, 130, 12, 252, 54, 146, 122, 13, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 50};
|
||||
|
||||
private final RotationTask rotationTask = new RotationTask("ScaffoldTask", 3);
|
||||
//private final List<BlockPos> blocks = new CopyOnWriteArrayList<BlockPos>();
|
||||
private BlockPos currentPlaceBlock = null;
|
||||
|
||||
private final RotationTask rotationTask = new RotationTask("ScaffoldTask", 3);
|
||||
|
||||
public ScaffoldModule() {
|
||||
super("Scaffold", new String[]{"Scaff"}, "Automatically places blocks where you are walking", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,6 @@ public final class SneakModule extends Module {
|
|||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The sneak mode to use", Mode.VANILLA);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, NCP
|
||||
}
|
||||
|
||||
public SneakModule() {
|
||||
super("Sneak", new String[]{"Sneek"}, "Allows you to sneak at full speed", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -81,4 +77,8 @@ public final class SneakModule extends Module {
|
|||
return GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindForward) || GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindLeft) || GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindRight) || GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindBack);
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, NCP
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,17 +19,10 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class SpeedModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The speed mode to use", Mode.VANILLA);
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, BHOP
|
||||
}
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd", "Amount", "A", "S"}, "Speed multiplier, higher numbers equal faster motion", 0.1f, 0.0f, 10.0f, 0.1f);
|
||||
|
||||
private int tick;
|
||||
private double prevDistance;
|
||||
private double movementSpeed;
|
||||
|
||||
public SpeedModule() {
|
||||
super("Speed", new String[]{"Spd"}, "Allows you to move faster", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -140,4 +133,8 @@ public final class SpeedModule extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
VANILLA, BHOP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,10 +15,6 @@ public final class SprintModule extends Module {
|
|||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The sprint mode to use", Mode.RAGE);
|
||||
|
||||
private enum Mode {
|
||||
RAGE, LEGIT
|
||||
}
|
||||
|
||||
public SprintModule() {
|
||||
super("Sprint", new String[]{"AutoSprint", "Spr"}, "Automatically sprints for you", "NONE", -1, ModuleType.MOVEMENT);
|
||||
}
|
||||
|
@ -57,4 +53,8 @@ public final class SprintModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
RAGE, LEGIT
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,17 +22,9 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class StepModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The step block-height mode to use", Mode.ONE);
|
||||
|
||||
private enum Mode {
|
||||
ONE, TWO
|
||||
}
|
||||
|
||||
private final double[] oneblockPositions = {0.42D, 0.75D};
|
||||
|
||||
private final double[] twoblockPositions = {0.4D, 0.75D, 0.5D, 0.41D, 0.83D, 1.16D, 1.41D, 1.57D, 1.58D, 1.42D};
|
||||
|
||||
private double[] selectedPositions = new double[0];
|
||||
|
||||
private int packets;
|
||||
|
||||
public StepModule() {
|
||||
|
@ -84,5 +76,9 @@ public final class StepModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
ONE, TWO
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -120,9 +120,6 @@ public final class AutoEatModule extends Module {
|
|||
if (!(item instanceof ItemFood))
|
||||
return false; // is not of ItemFood class
|
||||
|
||||
if (item == Items.GOLDEN_APPLE || item == Items.CHORUS_FRUIT || item == Items.ROTTEN_FLESH || item == Items.POISONOUS_POTATO || item == Items.SPIDER_EYE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return item != Items.GOLDEN_APPLE && item != Items.CHORUS_FRUIT && item != Items.ROTTEN_FLESH && item != Items.POISONOUS_POTATO && item != Items.SPIDER_EYE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||
*/
|
||||
public final class BlinkModule extends Module {
|
||||
|
||||
private EntityOtherPlayerMP entity;
|
||||
private final Queue<Packet> packets = new ConcurrentLinkedQueue();
|
||||
private EntityOtherPlayerMP entity;
|
||||
|
||||
public BlinkModule() {
|
||||
super("Blink", new String[]{"FakeLag"}, "Holds packets until disabled", "NONE", -1, ModuleType.PLAYER);
|
||||
|
|
|
@ -28,17 +28,16 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class FreeCamModule extends Module {
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd"}, "Speed of freecam flight, higher number equals quicker motion", 1.0f, 0.0f, 10.0f, 0.1f);
|
||||
public final Value<Boolean> view = new Value<Boolean>("3D", new String[]{"View"}, "The old Nodus client style free-cam, kind of like an elytra. (Hold forward key & move the mouse to turn)", false);
|
||||
public final Value<Boolean> packet = new Value<Boolean>("Packet", new String[]{"Pack"}, "Disables any player position or rotation packets from being sent during free-cam if enabled", true);
|
||||
public final Value<Boolean> allowDismount = new Value<Boolean>("AllowDismount", new String[]{"Dismount", "Dis", "AllowDis"}, "Allow dismounting of the riding entity", true);
|
||||
private Entity riding;
|
||||
private EntityOtherPlayerMP entity;
|
||||
private Vec3d position;
|
||||
private float yaw;
|
||||
private float pitch;
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd"}, "Speed of freecam flight, higher number equals quicker motion", 1.0f, 0.0f, 10.0f, 0.1f);
|
||||
public final Value<Boolean> view = new Value<Boolean>("3D", new String[]{"View"}, "The old Nodus client style free-cam, kind of like an elytra. (Hold forward key & move the mouse to turn)", false);
|
||||
public final Value<Boolean> packet = new Value<Boolean>("Packet", new String[]{"Pack"}, "Disables any player position or rotation packets from being sent during free-cam if enabled", true);
|
||||
public final Value<Boolean> allowDismount = new Value<Boolean>("AllowDismount", new String[]{"Dismount", "Dis", "AllowDis"}, "Allow dismounting of the riding entity", true);
|
||||
|
||||
public FreeCamModule() {
|
||||
super("FreeCam", new String[]{"FreeCamera"}, "Out of body experience", "NONE", -1, ModuleType.PLAYER);
|
||||
}
|
||||
|
|
|
@ -21,13 +21,7 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class GodModeModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The mode of the god-mode exploit", Mode.PORTAL);
|
||||
|
||||
private enum Mode {
|
||||
PORTAL, RIDING, LOCK, PACKET
|
||||
}
|
||||
|
||||
public final Value<Boolean> footsteps = new Value<Boolean>("FootSteps", new String[]{"Foot"}, "If enabled, others will be able to see your foot-steps during god-mode. (Disable if having trouble getting god-mode to work)", false);
|
||||
|
||||
private Entity riding;
|
||||
|
||||
public GodModeModule() {
|
||||
|
@ -148,4 +142,8 @@ public final class GodModeModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
PORTAL, RIDING, LOCK, PACKET
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,12 +21,12 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class InteractModule extends Module {
|
||||
|
||||
private boolean clicked;
|
||||
|
||||
public InteractModule() {
|
||||
super("Interact", new String[]{"GhostHand"}, "Allows you to access entities and blocks through walls", "NONE", -1, ModuleType.PLAYER);
|
||||
}
|
||||
|
||||
private boolean clicked;
|
||||
|
||||
@Listener
|
||||
public void sendPacket(EventSendPacket event) {
|
||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||
|
|
|
@ -20,15 +20,14 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class ItemSpoofModule extends Module {
|
||||
|
||||
private boolean send;
|
||||
private Entity entity;
|
||||
|
||||
public BlockPos position;
|
||||
public EnumFacing placedBlockDirection;
|
||||
public EnumHand hand;
|
||||
public float facingX;
|
||||
public float facingY;
|
||||
public float facingZ;
|
||||
private boolean send;
|
||||
private Entity entity;
|
||||
|
||||
public ItemSpoofModule() {
|
||||
super("ItemSpoof", new String[]{"ItemS"}, "Allows you to display a different item server-side (Use the top left slot in your inventory)", "NONE", -1, ModuleType.PLAYER);
|
||||
|
|
|
@ -26,11 +26,7 @@ public final class NoHungerModule extends Module {
|
|||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||
if (event.getPacket() instanceof CPacketPlayer) {
|
||||
final CPacketPlayer packet = (CPacketPlayer) event.getPacket();
|
||||
if (Minecraft.getMinecraft().player.fallDistance > 0 || Minecraft.getMinecraft().playerController.isHittingBlock) {
|
||||
packet.onGround = true;
|
||||
} else {
|
||||
packet.onGround = false;
|
||||
}
|
||||
packet.onGround = Minecraft.getMinecraft().player.fallDistance > 0 || Minecraft.getMinecraft().playerController.isHittingBlock;
|
||||
}
|
||||
if (event.getPacket() instanceof CPacketEntityAction) {
|
||||
final CPacketEntityAction packet = (CPacketEntityAction) event.getPacket();
|
||||
|
|
|
@ -30,10 +30,6 @@ public final class BlockHighlightModule extends Module {
|
|||
public final Value<Float> width = new Value<Float>("Width", new String[]{"W", "size", "s"}, "Width value of the highlight visual", 1.5f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Boolean> breaking = new Value<Boolean>("Breaking", new String[]{"Break", "block", "brk"}, "Sizes the highlight visual based on the block breaking damage", false);
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, CROSS
|
||||
}
|
||||
|
||||
public BlockHighlightModule() {
|
||||
super("BlockHighlight", new String[]{"BHighlight", "BlockHigh"}, "Highlights the block at your cross-hair", "NONE", -1, ModuleType.RENDER);
|
||||
}
|
||||
|
@ -88,4 +84,8 @@ public final class BlockHighlightModule extends Module {
|
|||
RenderUtil.end3D();
|
||||
}
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, CROSS
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,13 +18,7 @@ public final class BrightnessModule extends Module {
|
|||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The brightness mode to use", Mode.GAMMA);
|
||||
public final Value<Boolean> disablePotion = new Value<Boolean>("DisablePotion", new String[]{"AutoDisablePotion", "dp", "adp"}, "Automatically remove the night vision effect if using a different mode", true);
|
||||
|
||||
private enum Mode {
|
||||
GAMMA, POTION, TABLE
|
||||
}
|
||||
|
||||
private float lastGamma;
|
||||
|
||||
private World world;
|
||||
|
||||
public BrightnessModule() {
|
||||
|
@ -94,4 +88,8 @@ public final class BrightnessModule extends Module {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
GAMMA, POTION, TABLE
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,47 +66,10 @@ public final class ChamsModule extends Module {
|
|||
public final Value<Color> sneakingColor = new Value<Color>("SneakingColor", new String[]{"sneakingcolor", "sneakcolor", "sc"}, "Change the color of sneaking players on esp", new Color(238, 153, 0));
|
||||
|
||||
public final Value<Shader> shader = new Value<Shader>("Shader", new String[]{"shader", "program", "shaderprogram", "sp"}, "Change the shader to use when in shader mode", new Shader("resource:///assets/seppukumod/shaders/chams.json"));
|
||||
|
||||
private enum Mode {
|
||||
NORMAL, COLOR, TEXTURE, FLAT, WIREFRAME, SHADER
|
||||
}
|
||||
|
||||
private enum EntityType {
|
||||
SKIP, UNKNOWN, ANIMAL, MOB, VEHICLE, ITEM, CRYSTAL, NORMAL_PLAYER, FRIENDLY_PLAYER, SNEAKING_PLAYER
|
||||
}
|
||||
|
||||
private class QueuedEntity {
|
||||
public final double x;
|
||||
public final double y;
|
||||
public final double z;
|
||||
public final float yaw;
|
||||
public final float partialTicks;
|
||||
public final EntityType entityType;
|
||||
public final boolean hasShadow;
|
||||
public final Render<Entity> render;
|
||||
|
||||
public QueuedEntity(Entity entity, double x, double y, double z, float yaw, float partialTicks, EntityType entityType, boolean hasShadow) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.yaw = yaw;
|
||||
this.partialTicks = partialTicks;
|
||||
this.entityType = entityType;
|
||||
this.hasShadow = hasShadow;
|
||||
this.render = Minecraft.getMinecraft().getRenderManager().<Entity>getEntityRenderObject(entity);
|
||||
this.render.setRenderOutlines(false);
|
||||
}
|
||||
|
||||
public QueuedEntity(EventRenderEntity event, EntityType entityType, boolean hasShadow) {
|
||||
this(event.getEntity(), event.getX(), event.getY(), event.getZ(), event.getYaw(), event.getPartialTicks(), entityType, hasShadow);
|
||||
}
|
||||
}
|
||||
|
||||
private final HashMap<Entity, QueuedEntity> queuedEntities = new HashMap<Entity, QueuedEntity>();
|
||||
private final ArrayList<EventDrawNameplate> queuedNameplates = new ArrayList<EventDrawNameplate>();
|
||||
private boolean renderShadow = false;
|
||||
private boolean renderingShaded = false;
|
||||
|
||||
public ChamsModule() {
|
||||
super("Chams", new String[]{"Cham", "Chameleon"}, "Allows you to see entities through walls", "NONE", -1, ModuleType.RENDER);
|
||||
}
|
||||
|
@ -360,4 +323,39 @@ public final class ChamsModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
NORMAL, COLOR, TEXTURE, FLAT, WIREFRAME, SHADER
|
||||
}
|
||||
|
||||
private enum EntityType {
|
||||
SKIP, UNKNOWN, ANIMAL, MOB, VEHICLE, ITEM, CRYSTAL, NORMAL_PLAYER, FRIENDLY_PLAYER, SNEAKING_PLAYER
|
||||
}
|
||||
|
||||
private class QueuedEntity {
|
||||
public final double x;
|
||||
public final double y;
|
||||
public final double z;
|
||||
public final float yaw;
|
||||
public final float partialTicks;
|
||||
public final EntityType entityType;
|
||||
public final boolean hasShadow;
|
||||
public final Render<Entity> render;
|
||||
|
||||
public QueuedEntity(Entity entity, double x, double y, double z, float yaw, float partialTicks, EntityType entityType, boolean hasShadow) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.yaw = yaw;
|
||||
this.partialTicks = partialTicks;
|
||||
this.entityType = entityType;
|
||||
this.hasShadow = hasShadow;
|
||||
this.render = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(entity);
|
||||
this.render.setRenderOutlines(false);
|
||||
}
|
||||
|
||||
public QueuedEntity(EventRenderEntity event, EntityType entityType, boolean hasShadow) {
|
||||
this(event.getEntity(), event.getX(), event.getY(), event.getZ(), event.getYaw(), event.getPartialTicks(), entityType, hasShadow);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -139,10 +139,7 @@ public final class HolesModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
if (validHorizontalBlocks < 4)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return validHorizontalBlocks >= 4;
|
||||
}
|
||||
|
||||
private class Hole extends Vec3i {
|
||||
|
|
|
@ -30,15 +30,9 @@ public final class NewChunksModule extends Module {
|
|||
public final Value<Integer> alpha = new Value<Integer>("Alpha", new String[]{"Alp", "Opacity", "a", "o"}, "Edit the alpha of the chunk visual", 127, 1, 255, 1);
|
||||
public final Value<Float> lineWidth = new Value<Float>("LineWidth", new String[]{"Width", "Line-Width", "line", "size", "s", "l"}, "Edit the line width chunk visual", 1.5f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Float> height = new Value<Float>("Height", new String[]{"H"}, "Edit the height of the chunk visual", 3f, 1f, 25f, 1f);
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, PLANE
|
||||
}
|
||||
|
||||
private Color currentColor;
|
||||
private final ICamera frustum = new Frustum();
|
||||
|
||||
private final List<ChunkData> chunkDataList = new ArrayList<>();
|
||||
private Color currentColor;
|
||||
|
||||
public NewChunksModule() {
|
||||
super("NewChunks", new String[]{"ChunkGen"}, "Highlights newly generated chunks", "NONE", -1, ModuleType.RENDER);
|
||||
|
@ -119,6 +113,10 @@ public final class NewChunksModule extends Module {
|
|||
return temp;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, PLANE
|
||||
}
|
||||
|
||||
public static class ChunkData {
|
||||
private int x;
|
||||
private int z;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.rigamortis.seppuku.impl.module.render;
|
||||
|
||||
import me.rigamortis.seppuku.Seppuku;
|
||||
import me.rigamortis.seppuku.api.event.EventStageable;
|
||||
import me.rigamortis.seppuku.api.event.gui.hud.EventUIValueChanged;
|
||||
import me.rigamortis.seppuku.api.event.gui.hud.modulelist.EventUIListValueChanged;
|
||||
|
|
|
@ -37,24 +37,15 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||
public final class PortalFinderModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode"}, "Rendering mode to use for drawing found portals", Mode.TWO_D);
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_ DIMENSIONAL, THREE_ DIMENSIONAL
|
||||
}
|
||||
|
||||
public final Value<Boolean> chat = new Value<Boolean>("Chat", new String[]{"Chat", "ChatMessages", "ChatNotifications"}, "Display a message in chat when a portal is found (Hover the message for more info)", true);
|
||||
|
||||
public final Value<Boolean> remove = new Value<Boolean>("Remove", new String[]{"R", "Delete"}, "Removes a portal from being drawn if the player is a distance aways from it", true);
|
||||
public final Value<Integer> removeDistance = new Value<Integer>("RemoveDistance", new String[]{"RemoveDistance", "RD", "RemoveRange"}, "Minimum distance in blocks the player must be from a portal for it to stop being drawn", 200, 1, 2000, 1);
|
||||
|
||||
public final Value<Boolean> showInfo = new Value<Boolean>("Info", new String[]{"SI", "DrawInfo", "DrawText"}, "Draws information about the portal at it's location", true);
|
||||
public final Value<Float> infoScale = new Value<Float>("InfoScale", new String[]{"InfoScale", "IS", "Scale", "TextScale"}, "Scale of the text size on the drawn information", 1.0f, 0.1f, 3.0f, 0.25f);
|
||||
|
||||
public final Value<Boolean> tracer = new Value<Boolean>("Tracer", new String[]{"TracerLine", "trace", "line"}, "Display a tracer line to each found portal", true);
|
||||
public final Value<Color> color = new Value<Color>("TracerColor", new String[]{"TracerColor", "Color", "c"}, "Edit the portal tracer color", new Color(255, 255, 255));
|
||||
public final Value<Float> width = new Value<Float>("TracerWidth", new String[]{"TracerWidth", "W", "Width"}, "Width of each line that is drawn to indicate a portal's location", 0.5f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Integer> alpha = new Value<Integer>("TracerAlpha", new String[]{"TracerAlpha", "A", "Opacity", "Op"}, "Alpha value for each drawn line", 255, 1, 255, 1);
|
||||
|
||||
private final List<Vec3d> portals = new CopyOnWriteArrayList<>();
|
||||
|
||||
public PortalFinderModule() {
|
||||
|
@ -247,4 +238,8 @@ public final class PortalFinderModule extends Module {
|
|||
public List<Vec3d> getPortals() {
|
||||
return portals;
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_ DIMENSIONAL, THREE_ DIMENSIONAL
|
||||
}
|
||||
}
|
|
@ -43,11 +43,10 @@ import static org.lwjgl.opengl.GL11.*;
|
|||
*/
|
||||
public final class ProjectilesModule extends Module {
|
||||
|
||||
private final Queue<Vec3d> flightPoint = new ConcurrentLinkedQueue<>();
|
||||
|
||||
public final Value<Float> width = new Value<Float>("Width", new String[]{"W", "Width"}, "Pixel width of the projectile path", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Color> color = new Value<Color>("PathColor", new String[]{"color", "c", "pc"}, "Change the color of the predicted path", new Color(255, 255, 255));
|
||||
public final Value<Integer> alpha = new Value<Integer>("PathAlpha", new String[]{"opacity", "a", "o", "pa", "po"}, "Alpha value for the predicted path", 255, 1, 255, 1);
|
||||
private final Queue<Vec3d> flightPoint = new ConcurrentLinkedQueue<>();
|
||||
|
||||
public ProjectilesModule() {
|
||||
super("Projectiles", new String[]{"Proj"}, "Projects the possible path of an entity that was fired", "NONE", -1, ModuleType.RENDER);
|
||||
|
@ -225,6 +224,7 @@ public final class ProjectilesModule extends Module {
|
|||
*/
|
||||
private final class FlightPath {
|
||||
private final EntityPlayerSP shooter;
|
||||
private final ThrowableType throwableType;
|
||||
private Vec3d position;
|
||||
private Vec3d motion;
|
||||
private float yaw;
|
||||
|
@ -232,7 +232,6 @@ public final class ProjectilesModule extends Module {
|
|||
private AxisAlignedBB boundingBox;
|
||||
private boolean collided;
|
||||
private RayTraceResult target;
|
||||
private final ThrowableType throwableType;
|
||||
|
||||
FlightPath(EntityPlayerSP player, ThrowableType throwableType) {
|
||||
this.shooter = player;
|
||||
|
|
|
@ -49,17 +49,11 @@ public final class SearchModule extends Module {
|
|||
public final Value<Float> width = new Value<Float>("Width", new String[]{"size"}, "Line width of the search bounding box", 1.0f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Float> renderTime = new Value<Float>("RenderDelay", new String[]{"rendelay", "delay", "rd"}, "Delay(ms) between render updates if chunks are queued", 4000.0f, 500f, 8000f, 100f);
|
||||
public final Value<Boolean> tracer = new Value<Boolean>("Tracer", new String[]{"trace", "line"}, "Draw a tracer line to each search result", false);
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, OUTLINE_BOX, PLANE
|
||||
}
|
||||
|
||||
private final Value<List<Block>> blockIds = new Value<>("Ids", new String[]{"id", "i", "blocks"}, "Blocks to search for");
|
||||
private final List<Vec3i> blocks = new CopyOnWriteArrayList<>();
|
||||
private final List<Chunk> renderQueue = new CopyOnWriteArrayList<>();
|
||||
private final Timer renderTimer = new Timer();
|
||||
private final ICamera frustum = new Frustum();
|
||||
|
||||
public SearchModule() {
|
||||
super("Search", new String[]{"srch", "src"}, "Search for different types of blocks. Enter the \"search\" command", "NONE", -1, ModuleType.RENDER);
|
||||
|
||||
|
@ -368,4 +362,8 @@ public final class SearchModule extends Module {
|
|||
public Value<List<Block>> getBlockIds() {
|
||||
return blockIds;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
BOX, OUTLINE, OUTLINE_BOX, PLANE
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class ShulkerPreviewModule extends Module {
|
|||
if (blockEntityTag.hasKey("Items", 9)) {
|
||||
event.setCanceled(true); // cancel rendering the old tooltip
|
||||
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>withSize(27, ItemStack.EMPTY);
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
ItemStackHelper.loadAllItems(blockEntityTag, nonnulllist); // load the itemstacks from the tag to the list
|
||||
|
||||
// store mouse/event coords
|
||||
|
|
|
@ -25,11 +25,6 @@ import java.awt.*;
|
|||
public final class StorageESPModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Rendering mode", Mode.THREE_D);
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_DIMENSIONAL, THREE_DIMENSIONAL
|
||||
}
|
||||
|
||||
public final Value<Boolean> nametag = new Value<Boolean>("Nametag", new String[]{"Nametag", "Tag", "Tags", "Ntag", "name", "names"}, "Renders the name of the drawn storage object", false);
|
||||
public final Value<Integer> opacity = new Value<Integer>("Opacity", new String[]{"Opacity", "Transparency", "Alpha"}, "Opacity of the rendered esp", 128, 0, 255, 1);
|
||||
public final Value<Boolean> tracer = new Value<Boolean>("Tracer", new String[]{"TracerLine", "trace", "line"}, "Display a tracer line to each storage object", false);
|
||||
|
@ -37,7 +32,6 @@ public final class StorageESPModule extends Module {
|
|||
public final Value<Boolean> tracerStorageColor = new Value<Boolean>("TracerStorageColor", new String[]{"TracerStorageColor", "TStorageColor", "TSColor", "TStorageC", "TSC"}, "Use the storage object's color as the tracer color", false);
|
||||
public final Value<Float> tracerWidth = new Value<Float>("TracerWidth", new String[]{"TracerWidth", "TWidth", "TW"}, "Pixel width of each tracer-line", 0.5f, 0.1f, 5.0f, 0.1f);
|
||||
public final Value<Integer> tracerAlpha = new Value<Integer>("TracerAlpha", new String[]{"TracerAlpha", "TAlpha", "TA", "TracerOpacity", "TOpacity", "TO"}, "Alpha value for each drawn line", 255, 1, 255, 1);
|
||||
|
||||
private final ICamera camera = new Frustum();
|
||||
|
||||
public StorageESPModule() {
|
||||
|
@ -149,10 +143,7 @@ public final class StorageESPModule extends Module {
|
|||
if (te instanceof TileEntityHopper) {
|
||||
return true;
|
||||
}
|
||||
if (te instanceof TileEntityShulkerBox) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return te instanceof TileEntityShulkerBox;
|
||||
}
|
||||
|
||||
private AxisAlignedBB boundingBoxForEnt(TileEntity te) {
|
||||
|
@ -213,7 +204,6 @@ public final class StorageESPModule extends Module {
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
private int getBaseColor(TileEntity te) {
|
||||
if (te instanceof TileEntityChest) {
|
||||
return 0xFFFFC417;
|
||||
|
@ -275,7 +265,7 @@ public final class StorageESPModule extends Module {
|
|||
return null;
|
||||
}
|
||||
|
||||
final Vec3d corners[] = {
|
||||
final Vec3d[] corners = {
|
||||
new Vec3d(bb.minX, bb.minY, bb.minZ),
|
||||
new Vec3d(bb.maxX, bb.maxY, bb.maxZ),
|
||||
new Vec3d(bb.minX, bb.maxY, bb.maxZ),
|
||||
|
@ -303,4 +293,8 @@ public final class StorageESPModule extends Module {
|
|||
return null;
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_DIMENSIONAL, THREE_DIMENSIONAL
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,14 +46,8 @@ public final class TracersModule extends Module {
|
|||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode"}, "The rendering mode to use for drawing the tracer-line", Mode.TWO_D);
|
||||
|
||||
public final Value<Color> friendsColor = new Value<Color>("FriendsColor", new String[]{"friendscolor", "fc"}, "Change the color of added friends tracer lines", new Color(153, 0, 238));
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_DIMENSIONAL, THREE_DIMENSIONAL
|
||||
}
|
||||
|
||||
public final Value<Float> width = new Value<Float>("Width", new String[]{"Wid"}, "Pixel width of each tracer-line", 0.5f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Integer> alpha = new Value<Integer>("Alpha", new String[]{"Alpha", "A", "Opacity", "Op"}, "Alpha value for each drawn line", 255, 1, 255, 1);
|
||||
|
||||
public TracersModule() {
|
||||
super("Tracers", new String[]{"Trace", "Tracer", "Snapline", "Snaplines"}, "Draws a line to entities", "NONE", -1, ModuleType.RENDER);
|
||||
}
|
||||
|
@ -103,11 +97,7 @@ public final class TracersModule extends Module {
|
|||
}
|
||||
|
||||
private boolean checkFilter(Entity entity) {
|
||||
boolean ret = false;
|
||||
|
||||
if (this.players.getValue() && entity instanceof EntityPlayer && entity != Minecraft.getMinecraft().player) {
|
||||
ret = true;
|
||||
}
|
||||
boolean ret = this.players.getValue() && entity instanceof EntityPlayer && entity != Minecraft.getMinecraft().player;
|
||||
|
||||
if (this.mobs.getValue() && entity instanceof IMob) {
|
||||
ret = true;
|
||||
|
@ -158,4 +148,8 @@ public final class TracersModule extends Module {
|
|||
return ColorUtil.changeAlpha(ret, this.alpha.getValue());
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
TWO_D, THREE_D // TWO_DIMENSIONAL, THREE_DIMENSIONAL
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,64 +62,37 @@ public final class WallHackModule extends Module {
|
|||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "The mode of the drawn esp/wallhack", Mode.OPAQUE);
|
||||
public final Value<HealthMode> hpMode = new Value<HealthMode>("Hp", new String[]{"Health", "HpMode"}, "Rendering mode for the health bar", HealthMode.NONE);
|
||||
public final Value<PotionsMode> potionsMode = new Value<PotionsMode>("Potions", new String[]{"Pot", "Pots", "PotsMode"}, "Rendering mode for active potion-effects on the entity", PotionsMode.NONE);
|
||||
|
||||
private enum Mode {
|
||||
OPAQUE, BOX
|
||||
}
|
||||
|
||||
public final Value<Boolean> players = new Value<Boolean>("Players", new String[]{"Player"}, "Choose to enable on players", true);
|
||||
public final Value<Color> playersColor = new Value<Color>("PlayersColor", new String[]{"playerscolor", "pc"}, "Change the color of players on esp", new Color(255, 68, 68));
|
||||
|
||||
public final Value<Boolean> mobs = new Value<Boolean>("Mobs", new String[]{"Mob"}, "Choose to enable on mobs", true);
|
||||
public final Value<Color> mobsColor = new Value<Color>("MobsColor", new String[]{"mobscolor", "mc"}, "Change the color of mobs on esp", new Color(255, 170, 0));
|
||||
|
||||
public final Value<Boolean> animals = new Value<Boolean>("Animals", new String[]{"Animal"}, "Choose to enable on animals", true);
|
||||
public final Value<Color> animalsColor = new Value<Color>("AnimalsColor", new String[]{"animalscolor", "ac"}, "Change the color of animals on esp", new Color(0, 255, 68));
|
||||
|
||||
public final Value<Boolean> vehicles = new Value<Boolean>("Vehicles", new String[]{"Vehic", "Vehicle"}, "Choose to enable on vehicles", true);
|
||||
public final Value<Color> vehiclesColor = new Value<Color>("VehiclesColor", new String[]{"vehiclescolor", "vc"}, "Change the color of vehicles on esp", new Color(213, 255, 0));
|
||||
|
||||
public final Value<Boolean> items = new Value<Boolean>("Items", new String[]{"Item"}, "Choose to enable on items", true);
|
||||
public final Value<Color> itemsColor = new Value<Color>("ItemsColor", new String[]{"itemscolor", "ic"}, "Change the color of items on esp", new Color(0, 255, 170));
|
||||
|
||||
public final Value<Boolean> local = new Value<Boolean>("Local", new String[]{"Self"}, "Choose to enable on self/local-player", true);
|
||||
|
||||
public final Value<Boolean> crystals = new Value<Boolean>("Crystals", new String[]{"crystal", "crystals", "endcrystal", "endcrystals"}, "Choose to enable on end crystals", true);
|
||||
public final Value<Color> crystalsColor = new Value<Color>("CrystalsColor", new String[]{"endercrystalscolor", "endercrystalcolor", "crystalscolor", "crystalcolor", "ecc"}, "Change the color of ender crystals on esp", new Color(205, 0, 205));
|
||||
|
||||
public final Value<Boolean> pearls = new Value<Boolean>("Pearls", new String[]{"Pearl"}, "Choose to enable on ender pearls.", true);
|
||||
public final Value<Color> pearlsColor = new Value<Color>("PearlsColor", new String[]{"enderpearlscolor", "enderpearlcolor", "pearlscolor", "pearlcolor", "epc"}, "Change the color of ender pearls on esp", new Color(151, 255, 252));
|
||||
|
||||
public final Value<Boolean> armorStand = new Value<Boolean>("ArmorStands", new String[]{"ArmorStand", "ArmourStand", "ArmourStands", "ArmStand"}, "Choose to enable on armor-stands", true);
|
||||
public final Value<Boolean> footsteps = new Value<Boolean>("FootSteps", new String[]{"FootStep", "Steps"}, "Choose to draw entity footsteps", false);
|
||||
public final Value<Boolean> owner = new Value<Boolean>("Owner", new String[]{"Owners", "MobOwner"}, "Choose to draw entity (tame-able or horse) owner name", false);
|
||||
|
||||
public final Value<Boolean> nametag = new Value<Boolean>("Nametag", new String[]{"tag", "tags", "names", "name"}, "Draw the entity's name tag", true);
|
||||
public final Value<Boolean> ping = new Value<Boolean>("Ping", new String[]{"Ms"}, "Draw the entity's ping (only works on players)", true);
|
||||
public final Value<Boolean> armor = new Value<Boolean>("Armor", new String[]{"Arm"}, "Draw the entity's equipped armor", true);
|
||||
public final Value<Boolean> hearts = new Value<Boolean>("Hearts", new String[]{"Hrts"}, "Draw the entity's hearts in decimal format", true);
|
||||
public final Value<Boolean> absorption = new Value<Boolean>("Absorption", new String[]{"Abs", "GappleHearts"}, "Adds absorption value to heart display", true);
|
||||
public final Value<Boolean> enchants = new Value<Boolean>("Enchants", new String[]{"Ench"}, "Draw enchant names above the entity's equipped armor. (requires Armor value to be enabled", true);
|
||||
|
||||
public final Value<Color> friendsColor = new Value<Color>("FriendsColor", new String[]{"friendscolor", "friendcolor", "fc"}, "Change the color of friendly players on esp", new Color(153, 0, 238));
|
||||
public final Value<Color> sneakingColor = new Value<Color>("SneakingColor", new String[]{"sneakingcolor", "sneakcolor", "sc"}, "Change the color of sneaking players on esp", new Color(238, 153, 0));
|
||||
|
||||
public final Value<Boolean> background = new Value<Boolean>("Background", new String[]{"Bg"}, "Draw a transparent black background behind any text or icon drawn", true);
|
||||
private final Map<UUID, String> cachedMobOwners = Maps.newHashMap();
|
||||
private final Timer uuidTimer = new Timer();
|
||||
|
||||
private enum PotionsMode {
|
||||
NONE, ICON, TEXT
|
||||
}
|
||||
|
||||
public final Value<Boolean> background = new Value<Boolean>("Background", new String[]{"Bg"}, "Draw a transparent black background behind any text or icon drawn", true);
|
||||
|
||||
private enum HealthMode {
|
||||
NONE, BAR, BARTEXT
|
||||
}
|
||||
|
||||
private final ICamera camera = new Frustum();
|
||||
private final ResourceLocation inventory = new ResourceLocation("textures/gui/container/inventory.png");
|
||||
|
||||
//i cba
|
||||
private final List<FootstepData> footstepDataList = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -672,6 +645,18 @@ public final class WallHackModule extends Module {
|
|||
return null;
|
||||
}
|
||||
|
||||
private enum Mode {
|
||||
OPAQUE, BOX
|
||||
}
|
||||
|
||||
private enum PotionsMode {
|
||||
NONE, ICON, TEXT
|
||||
}
|
||||
|
||||
private enum HealthMode {
|
||||
NONE, BAR, BARTEXT
|
||||
}
|
||||
|
||||
public static class FootstepData {
|
||||
private double x;
|
||||
private double y;
|
||||
|
|
|
@ -20,10 +20,7 @@ import java.awt.*;
|
|||
*/
|
||||
public class AmbianceModule extends Module {
|
||||
|
||||
public enum SkyMode {
|
||||
NORMAL, COLOR, SEPPUKU, RAINBOW, END, NONE
|
||||
}
|
||||
|
||||
private static final ResourceLocation END_SKY_TEXTURES = new ResourceLocation("textures/environment/end_sky.png");
|
||||
public final Value<SkyMode> skyMode = new Value<SkyMode>("SkyMode", new String[]{"Sky", "Sm", "SkieMode", "Skie", "Skies"}, "Edit the skybox", SkyMode.SEPPUKU);
|
||||
public final Value<Color> skyColor = new Value<Color>("SkyColor", new String[]{"SkyCol", "Sc", "SkieColor", "SkieCol", "Color", "C"}, "Edit the skybox color (COLOR mode only)", new Color(0, 127, 255));
|
||||
public final Value<Integer> skyGamma = new Value<Integer>("SkyGamma", new String[]{"SkyGam", "SkyG", "Sg", "Gamma", "G"}, "Edit the skybox gamma", 128, 1, 255, 1);
|
||||
|
@ -32,8 +29,6 @@ public class AmbianceModule extends Module {
|
|||
private final Minecraft mc = Minecraft.getMinecraft();
|
||||
private final Texture seppukuSkyTexture;
|
||||
private final Texture rainbowSkyTexture;
|
||||
private static final ResourceLocation END_SKY_TEXTURES = new ResourceLocation("textures/environment/end_sky.png");
|
||||
|
||||
public AmbianceModule() {
|
||||
super("Ambiance", new String[]{"Ambience", "CustomSky", "CustomSound", "CustomSounds"}, "Edit ambient parts of the game. (Sky, sounds, etc.)", "NONE", -1, ModuleType.WORLD);
|
||||
this.seppukuSkyTexture = new Texture("seppuku_sky.jpg");
|
||||
|
@ -147,4 +142,8 @@ public class AmbianceModule extends Module {
|
|||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.enableAlpha();
|
||||
}
|
||||
|
||||
public enum SkyMode {
|
||||
NORMAL, COLOR, SEPPUKU, RAINBOW, END, NONE
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue