Missing descriptions, New quality additions, New HudEditor stuff(Tooltips, Background Blur)
This commit is contained in:
parent
5147d79ba5
commit
4ed3db4a3c
|
@ -118,8 +118,14 @@ public final class GuiHudEditor extends GuiScreen {
|
|||
public void onGuiClosed() {
|
||||
Seppuku.INSTANCE.getConfigManager().saveAll();
|
||||
|
||||
if (OpenGlHelper.shadersSupported) {
|
||||
mc.entityRenderer.stopUseShader();
|
||||
final HudEditorModule mod = (HudEditorModule) Seppuku.INSTANCE.getModuleManager().find(HudEditorModule.class);
|
||||
|
||||
if (mod != null) {
|
||||
if (mod.blur.getValue()) {
|
||||
if (OpenGlHelper.shadersSupported) {
|
||||
mc.entityRenderer.stopUseShader();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import me.rigamortis.seppuku.api.gui.hud.component.DraggableHudComponent;
|
|||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.util.RenderUtil;
|
||||
import me.rigamortis.seppuku.impl.gui.hud.GuiHudEditor;
|
||||
import me.rigamortis.seppuku.impl.module.ui.HudEditorModule;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -26,6 +27,8 @@ public final class ModuleListComponent extends DraggableHudComponent {
|
|||
private final int BORDER = 2;
|
||||
private final int TEXT_GAP = 1;
|
||||
|
||||
private final HudEditorModule hudEditorModule = (HudEditorModule) Seppuku.INSTANCE.getModuleManager().find(HudEditorModule.class);
|
||||
|
||||
public ModuleListComponent(Module.ModuleType type) {
|
||||
super(StringUtils.capitalize(type.name().toLowerCase()));
|
||||
this.type = type;
|
||||
|
@ -80,6 +83,28 @@ public final class ModuleListComponent extends DraggableHudComponent {
|
|||
}
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
|
||||
if (this.hudEditorModule != null && this.hudEditorModule.tooltips.getValue()) {
|
||||
final boolean inside = mouseX >= this.getX() && mouseX <= this.getX() + this.getW() && mouseY >= this.getY() && mouseY <= this.getY() + this.getH();
|
||||
|
||||
if (inside) {
|
||||
int height = BORDER;
|
||||
for (Module module : Seppuku.INSTANCE.getModuleManager().getModuleList(this.type)) {
|
||||
final boolean insideComponent = mouseX >= (this.getX() + BORDER) && mouseX <= (this.getX() + this.getW() - BORDER - SCROLL_WIDTH) && mouseY >= (this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1 + height - this.scroll) && mouseY <= (this.getY() + BORDER + (Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2) + 1 + height - this.scroll);
|
||||
if (!insideTitlebar && insideComponent) {
|
||||
final int tooltipWidth = mc.fontRenderer.getStringWidth(module.getDesc());
|
||||
final int tooltipHeight = mc.fontRenderer.FONT_HEIGHT;
|
||||
// Tooltip background
|
||||
RenderUtil.drawRect(mouseX - tooltipWidth / 2 - 2, mouseY - tooltipHeight - 2, mouseX + tooltipWidth / 2 + 2, mouseY + 2, 0x99101010);
|
||||
RenderUtil.drawRect(mouseX - tooltipWidth / 2 - 1, mouseY - tooltipHeight - 1, mouseX + tooltipWidth / 2 + 1, mouseY + 1, 0xFF101010);
|
||||
|
||||
// Tooltip
|
||||
mc.fontRenderer.drawStringWithShadow(module.getDesc(), mouseX - tooltipWidth / 2, mouseY - tooltipHeight, 0xFFC255FF);
|
||||
}
|
||||
height += Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + TEXT_GAP;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
this.totalHeight = BORDER + TEXT_GAP + offsetY + BORDER;
|
||||
}
|
||||
|
||||
|
@ -95,6 +120,7 @@ public final class ModuleListComponent extends DraggableHudComponent {
|
|||
final boolean insideComponent = mouseX >= (this.getX() + BORDER) && mouseX <= (this.getX() + this.getW() - BORDER - SCROLL_WIDTH) && mouseY >= (this.getY() + BORDER + Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 1 + offsetY - this.scroll) && mouseY <= (this.getY() + BORDER + (Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT * 2) + 1 + offsetY - this.scroll);
|
||||
if (!insideTitlebar && insideComponent) {
|
||||
module.toggle();
|
||||
this.setDragging(false);
|
||||
}
|
||||
offsetY += Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + TEXT_GAP;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class VanillaTabModule extends Module {
|
||||
|
||||
public VanillaTabModule() {
|
||||
super("VanillaTab", new String[]{"VTab", "VanillaT"}, "", "NONE", -1, ModuleType.MISC);
|
||||
super("VanillaTab", new String[]{"VTab", "VanillaT"}, "Removes the Header and Footer from the tab menu.", "NONE", -1, ModuleType.MISC);
|
||||
}
|
||||
|
||||
@Listener
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityBoat;
|
||||
import net.minecraft.entity.item.EntityEnderCrystal;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.item.EntityMinecartContainer;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
|
@ -30,6 +31,7 @@ public final class ChamsModule extends Module {
|
|||
public final Value<Boolean> mobs = new Value<Boolean>("Mobs", new String[]{"Mob"}, "Choose to enable on mobs.", true);
|
||||
public final Value<Boolean> animals = new Value<Boolean>("Animals", new String[]{"Animal"}, "Choose to enable on animals.", true);
|
||||
public final Value<Boolean> vehicles = new Value<Boolean>("Vehicles", new String[]{"Vehic", "Vehicle"}, "Choose to enable on vehicles.", 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<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode"}, "The chams mode to use.", Mode.NORMAL);
|
||||
|
||||
|
@ -147,7 +149,7 @@ public final class ChamsModule extends Module {
|
|||
|
||||
final Entity riding = Minecraft.getMinecraft().player.getRidingEntity();
|
||||
|
||||
if(riding != null && entity == riding) {
|
||||
if (riding != null && entity == riding) {
|
||||
ret = false;
|
||||
}
|
||||
|
||||
|
@ -167,6 +169,10 @@ public final class ChamsModule extends Module {
|
|||
ret = true;
|
||||
}
|
||||
|
||||
if (this.crystals.getValue() && entity instanceof EntityEnderCrystal) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLivingBase) {
|
||||
final EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ package me.rigamortis.seppuku.impl.module.render;
|
|||
import me.rigamortis.seppuku.Seppuku;
|
||||
import me.rigamortis.seppuku.api.event.gui.EventRenderPotions;
|
||||
import me.rigamortis.seppuku.api.event.render.EventRender2D;
|
||||
import me.rigamortis.seppuku.api.gui.hud.component.DraggableHudComponent;
|
||||
import me.rigamortis.seppuku.api.gui.hud.component.HudComponent;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import me.rigamortis.seppuku.impl.gui.hud.GuiHudEditor;
|
||||
import me.rigamortis.seppuku.impl.gui.hud.anchor.AnchorPoint;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
@ -40,7 +42,20 @@ public final class HudModule extends Module {
|
|||
GlStateManager.enableBlend();
|
||||
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
|
||||
if (component.isVisible()) {
|
||||
component.render(0, 0, mc.getRenderPartialTicks());
|
||||
|
||||
//dont render components with the TOP_CENTER anchor if we are looking at the tab list
|
||||
if (component instanceof DraggableHudComponent) {
|
||||
final DraggableHudComponent draggableComponent = (DraggableHudComponent) component;
|
||||
if (draggableComponent.getAnchorPoint() != null && draggableComponent.getAnchorPoint().getPoint() == AnchorPoint.Point.TOP_CENTER) {
|
||||
if (!mc.gameSettings.keyBindPlayerList.isKeyDown()) {
|
||||
draggableComponent.render(0, 0, mc.getRenderPartialTicks());
|
||||
}
|
||||
} else {
|
||||
draggableComponent.render(0, 0, mc.getRenderPartialTicks());
|
||||
}
|
||||
} else {
|
||||
component.render(0, 0, mc.getRenderPartialTicks());
|
||||
}
|
||||
}
|
||||
}
|
||||
GlStateManager.disableBlend();
|
||||
|
|
|
@ -39,10 +39,7 @@ import net.minecraft.util.math.Vec3d;
|
|||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
/**
|
||||
|
@ -64,6 +61,7 @@ public final class WallHackModule extends Module {
|
|||
public final Value<Boolean> items = new Value<Boolean>("Items", new String[]{"Item"}, "Choose to enable on items.", true);
|
||||
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<Boolean> pearls = new Value<Boolean>("Pearls", new String[]{"Pearl"}, "Choose to enable on ender pearls.", true);
|
||||
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);
|
||||
|
||||
|
@ -429,6 +427,12 @@ public final class WallHackModule extends Module {
|
|||
if (entity instanceof EntityEnderCrystal) {
|
||||
return "End Crystal";
|
||||
}
|
||||
if (entity instanceof EntityEnderPearl) {
|
||||
final EntityEnderPearl pearl = (EntityEnderPearl) entity;
|
||||
//TODO resolve and draw username
|
||||
// return pearl.getCachedUniqueIdString();
|
||||
return "Ender Pearl";
|
||||
}
|
||||
if (entity instanceof EntityMinecart) {
|
||||
final EntityMinecart minecart = (EntityMinecart) entity;
|
||||
return minecart.getCartItem().getDisplayName();
|
||||
|
@ -463,6 +467,11 @@ public final class WallHackModule extends Module {
|
|||
if (this.armorStand.getValue() && entity instanceof EntityArmorStand) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
if (this.pearls.getValue() && entity instanceof EntityEnderPearl) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
if (Minecraft.getMinecraft().player.getRidingEntity() != null && entity == Minecraft.getMinecraft().player.getRidingEntity()) {
|
||||
ret = false;
|
||||
}
|
||||
|
@ -488,6 +497,9 @@ public final class WallHackModule extends Module {
|
|||
if (entity instanceof EntityEnderCrystal) {
|
||||
ret = 0xFFCD00CD;
|
||||
}
|
||||
if (entity instanceof EntityEnderPearl) {
|
||||
ret = 0xFFCD00CD;
|
||||
}
|
||||
if (entity instanceof EntityPlayer) {
|
||||
ret = 0xFFFF4444;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package me.rigamortis.seppuku.impl.module.ui;
|
|||
|
||||
import me.rigamortis.seppuku.api.event.minecraft.EventDisplayGui;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import me.rigamortis.seppuku.impl.gui.hud.GuiHudEditor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
@ -14,6 +15,9 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class HudEditorModule extends Module {
|
||||
|
||||
public final Value<Boolean> blur = new Value("Blur", new String[]{"b"}, "Apply a blur effect to the Hud Editor's background.", true);
|
||||
public final Value<Boolean> tooltips = new Value("ToolTips", new String[]{"TT", "Tool"}, "Displays tooltips for modules.", true);
|
||||
|
||||
private boolean open;
|
||||
|
||||
public HudEditorModule() {
|
||||
|
@ -29,8 +33,10 @@ public final class HudEditorModule extends Module {
|
|||
if (mc.world != null) {
|
||||
mc.displayGuiScreen(new GuiHudEditor());
|
||||
|
||||
if (OpenGlHelper.shadersSupported) {
|
||||
mc.entityRenderer.loadShader(new ResourceLocation("minecraft", "shaders/post/blur.json"));
|
||||
if(this.blur.getValue()) {
|
||||
if (OpenGlHelper.shadersSupported) {
|
||||
mc.entityRenderer.loadShader(new ResourceLocation("minecraft", "shaders/post/blur.json"));
|
||||
}
|
||||
}
|
||||
this.open = true;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package me.rigamortis.seppuku.impl.module.world;
|
|||
import me.rigamortis.seppuku.api.event.EventStageable;
|
||||
import me.rigamortis.seppuku.api.event.player.EventPlayerUpdate;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemExpBottle;
|
||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +14,10 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class FastPlaceModule extends Module {
|
||||
|
||||
public final Value<Boolean> xp = new Value<Boolean>("XP", new String[]{"EXP"}, "Only activate while holding XP bottles.", false);
|
||||
|
||||
public FastPlaceModule() {
|
||||
super("FastPlace", new String[] {"Fp"}, "Removes place delay", "NONE", -1, ModuleType.WORLD);
|
||||
super("FastPlace", new String[]{"Fp"}, "Removes place delay", "NONE", -1, ModuleType.WORLD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,8 +28,14 @@ public final class FastPlaceModule extends Module {
|
|||
|
||||
@Listener
|
||||
public void onUpdate(EventPlayerUpdate event) {
|
||||
if(event.getStage() == EventStageable.EventStage.PRE) {
|
||||
Minecraft.getMinecraft().rightClickDelayTimer = 0;
|
||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||
if (this.xp.getValue()) {
|
||||
if (Minecraft.getMinecraft().player.getHeldItemMainhand().getItem() instanceof ItemExpBottle || Minecraft.getMinecraft().player.getHeldItemOffhand().getItem() instanceof ItemExpBottle) {
|
||||
Minecraft.getMinecraft().rightClickDelayTimer = 0;
|
||||
}
|
||||
} else {
|
||||
Minecraft.getMinecraft().rightClickDelayTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue