Skip to content

Commit

Permalink
Update to 1.12.2, fix silly lang filename, override annotation derps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyzderp-Bash authored and Kyzderp-Bash committed Nov 22, 2017
1 parent e6587d8 commit 5de48c4
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 43 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}

apply plugin: 'net.minecraftforge.gradle.liteloader'

version = "1.1.1"
version = "1.2.0"
group = "io.github.kyzderp.liteaccountswitcher" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "liteaccountswitcher"

minecraft {
version = "1.10.2"
mappings = "snapshot_20160906"
version = "1.12.2"
mappings = "snapshot_20170929"
runDir = "run"
}

Expand All @@ -40,7 +40,7 @@ sourceSets {
litemod {
json {
name = "Lite Account Switcher"
mcversion = "1.10.r1"
mcversion = "1.12.2"
author = "Kyzeragon"
description = "Ingame Account Switcher for LiteLoader"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,23 @@ public class LiteModAccountSwitcher implements Tickable
private UserFileAccessor userfile;
private AccountManager accManager;

@Override
public String getName() { return "Lite Account Switcher"; }
@Override
public String getVersion() { return "1.1.1"; }
public String getVersion() { return "1.2.0"; }

public LiteModAccountSwitcher()
{
instance = this;
}

@Override
public void init(File configPath)
{
LiteLoader.getInput().registerKeyBinding(keyGui);
this.userfile = new UserFileAccessor();
this.accManager = new AccountManager();
}

@Override
public void upgradeSettings(String version, File configPath, File oldConfigPath) {}

@Override
public void onTick(Minecraft minecraft, float partialTicks, boolean inGame, boolean clock)
{
// Allow switching ingame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public void initGui()
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 18, "Cancel"));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, 150, "Hide/Show Password"));

this.loginField = new GuiTextField(0, this.fontRendererObj, this.width / 2 - 100, 46, 200, 20);
this.loginField = new GuiTextField(0, this.fontRenderer, this.width / 2 - 100, 46, 200, 20);
this.loginField.setFocused(true);

this.notesField = new GuiTextField(1, this.fontRendererObj, this.width / 2 - 100, 86, 200, 20);
this.notesField = new GuiTextField(1, this.fontRenderer, this.width / 2 - 100, 86, 200, 20);
this.notesField.setMaxStringLength(18);

this.passField = new GuiHiddenTextField(1, this.width / 2 - 100, 126, 200, 20);
Expand Down Expand Up @@ -209,10 +209,10 @@ protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOEx
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 17, 16777215);
this.drawString(this.fontRendererObj, "Username / Email", this.width / 2 - 100, 33, 10526880);
this.drawString(this.fontRendererObj, "Short Note", this.width / 2 - 100, 73, 10526880);
this.drawString(this.fontRendererObj, "Password", this.width / 2 - 100, 113, 10526880);
this.drawCenteredString(this.fontRenderer, this.title, this.width / 2, 17, 16777215);
this.drawString(this.fontRenderer, "Username / Email", this.width / 2 - 100, 33, 10526880);
this.drawString(this.fontRenderer, "Short Note", this.width / 2 - 100, 73, 10526880);
this.drawString(this.fontRenderer, "Password", this.width / 2 - 100, 113, 10526880);
this.loginField.drawTextBox();
this.notesField.drawTextBox();
this.passField.drawTextBox();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class GuiHiddenTextField extends GuiTextField {
private boolean showText = false;

public GuiHiddenTextField(int id, int x, int y, int width, int height) {
super(id, Minecraft.getMinecraft().fontRendererObj, x, y, width, height);
super(id, Minecraft.getMinecraft().fontRenderer, x, y, width, height);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOEx
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.drawCenteredString(this.fontRendererObj, "What is the \"Key\"?", this.width / 2, this.height / 2 - 100, 16777215);
this.drawCenteredString(this.fontRenderer, "What is the \"Key\"?", this.width / 2, this.height / 2 - 100, 16777215);

String[] lines = {"Your key is the \"password\" that is used to encrypt your login",
"credentials. Think of it as an extra layer of security so that someone",
Expand All @@ -83,7 +83,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks)
int y = 0;
for (String line: lines)
{
this.drawString(this.fontRendererObj, line, this.width / 2 - 180, this.height / 2 - 70 + y, 16777215);
this.drawString(this.fontRenderer, line, this.width / 2 - 180, this.height / 2 - 70 + y, 16777215);
y += 14;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void postInit()
this.offlineButton.enabled = false;
this.deleteButton.enabled = false;

this.keyField = new GuiTextField(0, this.mc.fontRendererObj, this.width / 2 + 29, this.height - 50, 100, 16);
this.keyField = new GuiTextField(0, this.mc.fontRenderer, this.width / 2 + 29, this.height - 50, 100, 16);
this.keyField.setFocused(true);
this.keyField.setText(Encryption.currentKey);

Expand Down Expand Up @@ -140,12 +140,12 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.selectionList.drawScreen(mouseX, mouseY, partialTicks);
this.keyField.drawTextBox();
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 20, 16777215);
this.drawCenteredString(this.fontRenderer, this.title, this.width / 2, 20, 16777215);

if (!this.message.isEmpty())
this.drawCenteredString(this.fontRendererObj, this.message, this.width / 2, 5, 6618980);
this.drawCenteredString(this.fontRenderer, this.message, this.width / 2, 5, 6618980);

this.drawString(this.fontRendererObj, "Key", this.width / 2 + 5, this.height - 46, 16777215);
this.drawString(this.fontRenderer, "Key", this.width / 2 + 5, this.height - 46, 16777215);
super.drawScreen(mouseX, mouseY, partialTicks);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public UserlistSelectionEntry(UserlistSelectionList listWorldSelIn, AccountInfo
this.mc = Minecraft.getMinecraft();
}

public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partialTicks)
{
int color = 8421504;
if (this.account.status.equals("Premium"))
Expand All @@ -33,11 +33,11 @@ else if (this.account.status.equals("Invalid Credentials")
|| this.account.status.equals("Wrong Key"))
color = 16737380;

this.mc.fontRendererObj.drawString(this.account.username, x + 32 + 3, y + 1, 16777215);
this.mc.fontRendererObj.drawString(this.account.login, x + 32 + 3, y + this.mc.fontRendererObj.FONT_HEIGHT + 3, 8421504);
this.mc.fontRendererObj.drawString(this.account.status, x + 32 + 3, y + this.mc.fontRendererObj.FONT_HEIGHT + this.mc.fontRendererObj.FONT_HEIGHT + 3, color);
int notesWidth = this.mc.fontRendererObj.getStringWidth(this.account.notes);
this.mc.fontRendererObj.drawString(this.account.notes, x + 265 - notesWidth, y + this.mc.fontRendererObj.FONT_HEIGHT + this.mc.fontRendererObj.FONT_HEIGHT + 3, 8421504);
this.mc.fontRenderer.drawString(this.account.username, x + 32 + 3, y + 1, 16777215);
this.mc.fontRenderer.drawString(this.account.login, x + 32 + 3, y + this.mc.fontRenderer.FONT_HEIGHT + 3, 8421504);
this.mc.fontRenderer.drawString(this.account.status, x + 32 + 3, y + this.mc.fontRenderer.FONT_HEIGHT + this.mc.fontRenderer.FONT_HEIGHT + 3, color);
int notesWidth = this.mc.fontRenderer.getStringWidth(this.account.notes);
this.mc.fontRenderer.drawString(this.account.notes, x + 265 - notesWidth, y + this.mc.fontRenderer.FONT_HEIGHT + this.mc.fontRenderer.FONT_HEIGHT + 3, 8421504);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

if (this.mc.gameSettings.touchscreen || isSelected)
Expand Down Expand Up @@ -144,4 +144,9 @@ public void delete()
{
this.containingListSel.deleteEntry(this);
}

public void updatePosition(int slotIndex, int x, int y, float partialTicks) {
// TODO Auto-generated method stub

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public StringEncoderComparator(final StringEncoder stringEncoder) {
* @return the Comparable.compareTo() return code or 0 if an encoding error was caught.
* @see Comparable
*/
@Override
public int compare(final Object o1, final Object o2) {

int compareCode = 0;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ protected static boolean isWhiteSpace(final byte byteToCheck) {
* @throws EncoderException
* if the parameter supplied is not of type byte[]
*/
@Override
public Object encode(final Object obj) throws EncoderException {
if (!(obj instanceof byte[])) {
throw new EncoderException("Parameter supplied to Base-N encode is not a byte[]");
Expand Down Expand Up @@ -372,7 +371,6 @@ public String encodeAsString(final byte[] pArray){
* @throws DecoderException
* if the parameter supplied is not of type byte[]
*/
@Override
public Object decode(final Object obj) throws DecoderException {
if (obj instanceof byte[]) {
return decode((byte[]) obj);
Expand Down Expand Up @@ -401,7 +399,6 @@ public byte[] decode(final String pArray) {
* A byte array containing Base-N character data
* @return a byte array containing binary data
*/
@Override
public byte[] decode(final byte[] pArray) {
if (pArray == null || pArray.length == 0) {
return pArray;
Expand All @@ -421,7 +418,6 @@ public byte[] decode(final byte[] pArray) {
* a byte array containing binary data
* @return A byte array containing only the basen alphabetic character data
*/
@Override
public byte[] encode(final byte[] pArray) {
if (pArray == null || pArray.length == 0) {
return pArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public class BinaryCodec implements BinaryDecoder, BinaryEncoder {
* @return 0 and 1 ASCII character bytes one for each bit of the argument
* @see org.apache.commons.codec.BinaryEncoder#encode(byte[])
*/
@Override
public byte[] encode(final byte[] raw) {
return toAsciiBytes(raw);
}
Expand All @@ -93,7 +92,6 @@ public byte[] encode(final byte[] raw) {
* if the argument is not a byte[]
* @see org.apache.commons.codec.Encoder#encode(Object)
*/
@Override
public Object encode(final Object raw) throws EncoderException {
if (!(raw instanceof byte[])) {
throw new EncoderException("argument not a byte array");
Expand All @@ -111,7 +109,6 @@ public Object encode(final Object raw) throws EncoderException {
* if argument is not a byte[], char[] or String
* @see org.apache.commons.codec.Decoder#decode(Object)
*/
@Override
public Object decode(final Object ascii) throws DecoderException {
if (ascii == null) {
return EMPTY_BYTE_ARRAY;
Expand All @@ -136,7 +133,6 @@ public Object decode(final Object ascii) throws DecoderException {
* @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
* @see org.apache.commons.codec.Decoder#decode(Object)
*/
@Override
public byte[] decode(final byte[] ascii) {
return fromAscii(ascii);
}
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/apache/commons/codec/binary/Hex.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ public Hex(final String charsetName) {
* Thrown if an odd number of characters is supplied to this function
* @see #decodeHex(char[])
*/
@Override
public byte[] decode(final byte[] array) throws DecoderException {
return decodeHex(new String(array, getCharset()).toCharArray());
}
Expand All @@ -245,7 +244,6 @@ public byte[] decode(final byte[] array) throws DecoderException {
* char[]
* @see #decodeHex(char[])
*/
@Override
public Object decode(final Object object) throws DecoderException {
try {
final char[] charArray = object instanceof String ? ((String) object).toCharArray() : (char[]) object;
Expand All @@ -270,7 +268,6 @@ public Object decode(final Object object) throws DecoderException {
* @since 1.7 No longer throws IllegalStateException if the charsetName is invalid.
* @see #encodeHex(byte[])
*/
@Override
public byte[] encode(final byte[] array) {
return encodeHexString(array).getBytes(this.getCharset());
}
Expand All @@ -291,7 +288,6 @@ public byte[] encode(final byte[] array) {
* Thrown if the given object is not a String or byte[]
* @see #encodeHex(byte[])
*/
@Override
public Object encode(final Object object) throws EncoderException {
try {
final byte[] byteArray = object instanceof String ?
Expand Down

0 comments on commit 5de48c4

Please sign in to comment.