-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uploaded June-July m6 release with compiled .jar
- Loading branch information
Showing
2,858 changed files
with
13,018 additions
and
13,242 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
....metadata/.plugins/org.eclipse.core.resources/.history/1/e01bb5a37afb001c1f96c3a8ce8fba34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
public class drpc { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...metadata/.plugins/org.eclipse.core.resources/.history/14/d00f43736bfb001c1f96c3a8ce8fba34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.Hero.clickgui.util; | ||
|
||
import java.awt.Color; | ||
|
||
//Deine Imports | ||
import bastion.defiant.Defiant; | ||
|
||
/** | ||
* Made by HeroCode | ||
* it's free to use | ||
* but you have to credit me | ||
* | ||
* @author HeroCode | ||
*/ | ||
public class ColorUtil { | ||
|
||
public static Color getClickGUIColor(){ | ||
return new Color((int)Defiant.instance.settingsManager.getSettingByName("GuiRed").getValDouble(), (int)Defiant.instance.settingsManager.getSettingByName("GuiGreen").getValDouble(), (int)Defiant.instance.settingsManager.getSettingByName("GuiBlue").getValDouble()); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...metadata/.plugins/org.eclipse.core.resources/.history/15/f0f212e279fb001c1f96c3a8ce8fba34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package bastion.defiantce.extensions; | ||
|
||
public class DiscordRP { | ||
|
||
public boolean running = true; | ||
private long created = 0; | ||
|
||
public void start() { | ||
|
||
this.created = System.currentTimeMillis(); | ||
|
||
DiscordEventHandlers | ||
|
||
} | ||
|
||
} |
93 changes: 93 additions & 0 deletions
93
...metadata/.plugins/org.eclipse.core.resources/.history/16/403092766afb001c1f96c3a8ce8fba34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package de.Hero.clickgui.elements; | ||
|
||
import de.Hero.clickgui.ClickGUI; | ||
import de.Hero.clickgui.elements.menu.ElementComboBox; | ||
import de.Hero.clickgui.util.FontUtil; | ||
import de.Hero.settings.Setting; | ||
|
||
/** | ||
* Made by HeroCode | ||
* it's free to use | ||
* but you have to credit me | ||
* | ||
* @author HeroCode | ||
*/ | ||
public class Element { | ||
public ClickGUI clickgui; | ||
public ModuleButton parent; | ||
public Setting set; | ||
public double offset; | ||
public double x; | ||
public double y; | ||
public double width; | ||
public double height; | ||
|
||
public String setstrg; | ||
|
||
public boolean comboextended; | ||
|
||
public void setup(){ | ||
clickgui = parent.parent.clickgui; | ||
} | ||
|
||
public void update(){ | ||
/* | ||
* Richtig positionieren! Offset wird von ClickGUI aus bestimmt, sodass | ||
* nichts ineinander gerendert wird | ||
*/ | ||
x = parent.x + parent.width + 2; | ||
y = parent.y + offset; | ||
width = parent.width + 10; | ||
height = 15; | ||
|
||
/* | ||
* Title der Box bestimmen und falls n�tig die Breite der CheckBox | ||
* erweitern | ||
*/ | ||
String sname = set.getName(); | ||
if(set.isCheck()){ | ||
setstrg = sname.substring(0, 1).toUpperCase() + sname.substring(1, sname.length()); | ||
double textx = x + width - FontUtil.getStringWidth(setstrg); | ||
if (textx < x + 13) { | ||
width += (x + 13) - textx + 1; | ||
} | ||
}else if(set.isCombo()){ | ||
height = comboextended ? set.getOptions().size() * (FontUtil.getFontHeight() + 2) + 15 : 15; | ||
|
||
setstrg = sname.substring(0, 1).toUpperCase() + sname.substring(1, sname.length()); | ||
int longest = FontUtil.getStringWidth(setstrg); | ||
for (String s : set.getOptions()) { | ||
int temp = FontUtil.getStringWidth(s); | ||
if (temp > longest) { | ||
longest = temp; | ||
} | ||
} | ||
double textx = x + width - longest; | ||
if (textx < x) { | ||
width += x - textx + 1; | ||
} | ||
}else if(set.isSlider()){ | ||
setstrg = sname.substring(0, 1).toUpperCase() + sname.substring(1, sname.length()); | ||
String displayval = "" + Math.round(set.getValDouble() * 100D)/ 100D; | ||
String displaymax = "" + Math.round(set.getMax() * 100D)/ 100D; | ||
double textx = x + width - FontUtil.getStringWidth(setstrg) - FontUtil.getStringWidth(displaymax) - 4; | ||
if (textx < x) { | ||
width += x - textx + 1; | ||
} | ||
} | ||
} | ||
|
||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {} | ||
|
||
public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) { | ||
return isHovered(mouseX, mouseY); | ||
} | ||
|
||
public void mouseReleased(int mouseX, int mouseY, int state) {} | ||
|
||
public boolean isHovered(int mouseX, int mouseY) | ||
{ | ||
|
||
return mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height; | ||
} | ||
} |
163 changes: 163 additions & 0 deletions
163
...metadata/.plugins/org.eclipse.core.resources/.history/17/00418a766afb001c1f96c3a8ce8fba34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
package de.Hero.clickgui.elements; | ||
|
||
import java.awt.Color; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.Gui; | ||
|
||
import org.lwjgl.input.Keyboard; | ||
|
||
import de.Hero.clickgui.Panel; | ||
import de.Hero.clickgui.elements.menu.ElementCheckBox; | ||
import de.Hero.clickgui.elements.menu.ElementComboBox; | ||
import de.Hero.clickgui.elements.menu.ElementSlider; | ||
import de.Hero.clickgui.util.ColorUtil; | ||
import de.Hero.clickgui.util.FontUtil; | ||
import de.Hero.settings.Setting; | ||
import me.gamrboy4life.paradox.Paradox; | ||
import me.gamrboy4life.paradox.module.Module; | ||
|
||
//Deine Imports | ||
|
||
/** | ||
* Made by HeroCode | ||
* it's free to use | ||
* but you have to credit me | ||
* | ||
* @author HeroCode | ||
*/ | ||
public class ModuleButton { | ||
public Module mod; | ||
public ArrayList<Element> menuelements; | ||
public Panel parent; | ||
public double x; | ||
public double y; | ||
public double width; | ||
public double height; | ||
public boolean extended = false; | ||
public boolean listening = false; | ||
|
||
/* | ||
* Konstrukor | ||
*/ | ||
public ModuleButton(Module imod, Panel pl) { | ||
mod = imod; | ||
height = Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT + 2; | ||
parent = pl; | ||
menuelements = new ArrayList<Element>(); | ||
/* | ||
* Settings wurden zuvor in eine ArrayList eingetragen | ||
* dieses SettingSystem hat 3 Konstruktoren je nach | ||
* verwendetem Konstruktor �ndert sich die Value | ||
* bei .isCheck() usw. so kann man ganz einfach ohne | ||
* irgendeinen Aufwand bestimmen welches Element | ||
* f�r ein Setting ben�tigt wird :> | ||
*/ | ||
if (Paradox.instance.settingsManager.getSettingsByMod(imod) != null) | ||
for (Setting s : Paradox.instance.settingsManager.getSettingsByMod(imod)) { | ||
if (s.isCheck()) { | ||
menuelements.add(new ElementCheckBox(this, s)); | ||
} else if (s.isSlider()) { | ||
menuelements.add(new ElementSlider(this, s)); | ||
} else if (s.isCombo()) { | ||
menuelements.add(new ElementComboBox(this, s)); | ||
} | ||
} | ||
|
||
} | ||
|
||
/* | ||
* Rendern des Elements | ||
*/ | ||
public void drawScreen(int mouseX, int mouseY, float partialTicks) { | ||
Color temp = ColorUtil.getClickGUIColor(); | ||
int color = new Color(temp.getRed(), temp.getGreen(), temp.getBlue(), 150).getRGB(); | ||
|
||
/* | ||
* Ist das Module an, wenn ja dann soll | ||
* #ein neues Rechteck in Gr��e des Buttons den Knopf als Toggled kennzeichnen | ||
* #sich der Text anders f�rben | ||
*/ | ||
int textcolor = 0xffafafaf; | ||
if (mod.isToggled()) { | ||
Gui.drawRect(x - 2, y, x + width + 2, y + height + 1, color); | ||
textcolor = 0xffefefef; | ||
} | ||
|
||
/* | ||
* Ist die Maus �ber dem Element, wenn ja dann soll der Button sich anders f�rben | ||
*/ | ||
if (isHovered(mouseX, mouseY)) { | ||
Gui.drawRect(x - 2, y, x + width + 2, y + height + 1, 0x55111111); | ||
} | ||
|
||
/* | ||
* Den Namen des Modules in die Mitte (x und y) rendern | ||
*/ | ||
FontUtil.drawTotalCenteredStringWithShadow(mod.getName(), x + width / 2, y + 1 + height / 2, textcolor); | ||
} | ||
|
||
/* | ||
* 'true' oder 'false' bedeutet hat der Nutzer damit interagiert und | ||
* sollen alle anderen Versuche der Interaktion abgebrochen werden? | ||
*/ | ||
public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) { | ||
if (!isHovered(mouseX, mouseY)) | ||
return false; | ||
|
||
/* | ||
* Rechtsklick, wenn ja dann Module togglen, | ||
*/ | ||
if (mouseButton == 0) { | ||
mod.toggle(); | ||
|
||
if(Paradox.instance.settingsManager.getSettingByName("Sound").getValBoolean()) | ||
Minecraft.getMinecraft().thePlayer.playSound("random.click", 0.5f, 0.5f); | ||
} else if (mouseButton == 1) { | ||
/* | ||
* Wenn ein Settingsmenu existiert dann sollen alle Settingsmenus | ||
* geschlossen werden und dieses ge�ffnet/geschlossen werden | ||
*/ | ||
if (menuelements != null && menuelements.size() > 0) { | ||
boolean b = !this.extended; | ||
Paradox.instance.clickGUI.closeAllSettings(); | ||
this.extended = b; | ||
|
||
if(Paradox.instance.settingsManager.getSettingByName("Sound").getValBoolean()) | ||
if(extended)Minecraft.getMinecraft().thePlayer.playSound("tile.piston.out", 1f, 1f);else Minecraft.getMinecraft().thePlayer.playSound("tile.piston.in", 1f, 1f); | ||
} | ||
} else if (mouseButton == 2) { | ||
/* | ||
* MidClick => Set keybind (wait for next key) | ||
*/ | ||
listening = true; | ||
} | ||
return true; | ||
} | ||
|
||
public boolean keyTyped(char typedChar, int keyCode) throws IOException { | ||
/* | ||
* Wenn listening, dann soll der n�chster Key (abgesehen 'ESCAPE') als Keybind f�r mod | ||
* danach soll nicht mehr gewartet werden! | ||
*/ | ||
if (listening) { | ||
if (keyCode != Keyboard.KEY_ESCAPE) { | ||
//Client.sendChatMessage("Bound '" + mod.getName() + "'" + " to '" + Keyboard.getKeyName(keyCode) + "'"); | ||
mod.setKey(keyCode);; | ||
} else { | ||
//Client.sendChatMessage("Unbound '" + mod.getName() + "'"); | ||
mod.setKey(Keyboard.KEY_NONE);; | ||
} | ||
listening = false; | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
public boolean isHovered(int mouseX, int mouseY) { | ||
return mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height; | ||
} | ||
|
||
} |
Oops, something went wrong.