22w13f Actually fixed stuck CTRL, restored vanilla ban commands by default, bungeecord ban commands begin with /eag-

This commit is contained in:
LAX1DUDE 2022-04-01 16:53:50 -07:00
parent 4f72bb5fd4
commit 5c32202ee7
17 changed files with 84143 additions and 83871 deletions

View File

@ -657,9 +657,9 @@ public class BanList {
p.println("# Java regex syntax: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html"); p.println("# Java regex syntax: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html");
p.println("#"); p.println("#");
p.println(); p.println();
p.println("# set this to false to use \"/eag-ban\" to ban on bungee instead of just \"/ban\""); p.println("# set this to to true to use \"/ban\" to ban on bungee instead of \"/eag-ban\"");
p.println("# (most likely needs a restart to take effect)"); p.println("# (most likely needs a restart to take effect)");
p.println("replace-bukkit=true"); p.println("replace-bukkit=false");
p.println(); p.println();
p.println(); p.println();
p.println("[Usernames]"); p.println("[Usernames]");

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -7,6 +7,12 @@ import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.Frame; import java.awt.Frame;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -52,7 +58,6 @@ import org.lwjgl.opengl.GL13;
import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL30; import org.lwjgl.opengl.GL30;
import org.lwjgl.opengl.GL32;
import org.lwjgl.opengl.PixelFormat; import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU; import org.lwjgl.util.glu.GLU;
@ -1198,11 +1203,17 @@ public class EaglerAdapterImpl2 {
} }
public static final String getClipboard() { public static final String getClipboard() {
return "<err>"; try {
return (String)Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor);
} catch (HeadlessException | UnsupportedFlavorException | IOException e) {
return null;
}
} }
public static final void setClipboard(String str) { public static final void setClipboard(String str) {
// todo StringSelection selection = new StringSelection(str);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, selection);
} }
public static final void saveScreenshot() { public static final void saveScreenshot() {

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false; public static boolean profanity = false;
public static final String version = "22w13e"; public static final String version = "22w13f";
public static final String mainMenuString = "eaglercraft " + version; public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";

View File

@ -420,4 +420,13 @@ public class DefaultSkinRenderer {
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING); EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
} }
public static boolean isPlayerPreviewNew(int id2) {
int id = id2 - EaglerProfile.skins.size();
if(id < 0) {
return EaglerProfile.skins.get(id2).data.length == EaglerProfile.SKIN_DATA_SIZE[1] || EaglerProfile.skins.get(id2).data.length == EaglerProfile.SKIN_DATA_SIZE[3];
}else {
return isNewSkin(id);
}
}
} }

View File

@ -232,6 +232,17 @@ public class GuiScreenEditProfile extends GuiScreen {
this.mc.renderEngine.bindTexture(eee.glTex); this.mc.renderEngine.bindTexture(eee.glTex);
DefaultSkinRenderer.renderAlexOrSteve(xx, yy, mx, my, true); DefaultSkinRenderer.renderAlexOrSteve(xx, yy, mx, my, true);
}else { }else {
skinX = this.width / 2 - 120;
skinY = this.height / 6 + 8;
skinWidth = 80;
skinHeight = 130;
if(DefaultSkinRenderer.isPlayerPreviewNew(selectedSlot)) {
int w = fontRenderer.getStringWidth("1.8") + 4;
EaglerAdapter.glPushMatrix();
EaglerAdapter.glScalef(0.75f, 0.75f, 0.75f);
drawString(fontRenderer, "1.8", (int)((skinX + skinWidth) / 0.75f) - w, (int)((skinY + skinHeight) / 0.75f) - 12, 0xFFBBBB66);
EaglerAdapter.glPopMatrix();
}
DefaultSkinRenderer.renderPlayerPreview(xx, yy, newSkinWaitSteveOrAlex ? width / 2 : mx, newSkinWaitSteveOrAlex ? height / 2 : my, selectedSlot); DefaultSkinRenderer.renderPlayerPreview(xx, yy, newSkinWaitSteveOrAlex ? width / 2 : mx, newSkinWaitSteveOrAlex ? height / 2 : my, selectedSlot);
} }

View File

@ -258,7 +258,7 @@ public class GuiScreen extends Gui {
} }
public static boolean isCtrlKeyDown() { public static boolean isCtrlKeyDown() {
return EaglerAdapter.isKeyDown(29) || EaglerAdapter.isKeyDown(157) || (isMacOs && EaglerAdapter.isKeyDown(28) || EaglerAdapter.isKeyDown(219) || EaglerAdapter.isKeyDown(220)); return EaglerAdapter.isKeyDown(29) || EaglerAdapter.isKeyDown(157) || (isMacOs && (EaglerAdapter.isKeyDown(28) || EaglerAdapter.isKeyDown(219) || EaglerAdapter.isKeyDown(220)));
} }
public static boolean isShiftKeyDown() { public static boolean isShiftKeyDown() {

View File

@ -274,7 +274,7 @@ public class GuiTextField extends Gui {
this.setCursorPositionEnd(); this.setCursorPositionEnd();
this.setSelectionPos(0); this.setSelectionPos(0);
return true; return true;
/*
case 3: case 3:
String s = this.getSelectedtext(); String s = this.getSelectedtext();
if(s != null && s.length() > 0) { if(s != null && s.length() > 0) {
@ -296,7 +296,7 @@ public class GuiTextField extends Gui {
} }
this.writeText(""); this.writeText("");
return true; return true;
*/
default: default:
switch (par2) { switch (par2) {
case 14: case 14:

View File

@ -930,6 +930,17 @@ public class EaglerAdapterImpl2 {
return currentEvent == null ? -1 : canvas.getClientHeight() - currentEvent.getClientY(); return currentEvent == null ? -1 : canvas.getClientHeight() - currentEvent.getClientY();
} }
public static final boolean keysNext() { public static final boolean keysNext() {
if(unpressCTRL) { //un-press ctrl after copy/paste permission
keyEvents.clear();
currentEventK = null;
keyStates[29] = false;
keyStates[157] = false;
keyStates[28] = false;
keyStates[219] = false;
keyStates[220] = false;
unpressCTRL = false;
return false;
}
currentEventK = null; currentEventK = null;
return !keyEvents.isEmpty() && (currentEventK = keyEvents.remove(0)) != null; return !keyEvents.isEmpty() && (currentEventK = keyEvents.remove(0)) != null;
} }
@ -945,6 +956,16 @@ public class EaglerAdapterImpl2 {
return currentEventK == null? false : !currentEventK.getType().equals("keyup"); return currentEventK == null? false : !currentEventK.getType().equals("keyup");
} }
public static final boolean isKeyDown(int p1) { public static final boolean isKeyDown(int p1) {
if(unpressCTRL) { //un-press ctrl after copy/paste permission
keyStates[28] = false;
keyStates[29] = false;
keyStates[157] = false;
keyStates[219] = false;
keyStates[220] = false;
}
if(p1 == 28 || p1 == 29 || p1 == 157 || p1 == 219 || p1 == 220) {
System.out.println("" + p1 + ": " + keyStates[220]);
}
return keyStates[p1]; return keyStates[p1];
} }
public static final String getKeyName(int p1) { public static final String getKeyName(int p1) {
@ -1608,6 +1629,8 @@ public class EaglerAdapterImpl2 {
void resolveStr(String s); void resolveStr(String s);
} }
private static boolean unpressCTRL = false;
@Async @Async
public static native String getClipboard(); public static native String getClipboard();
@ -1617,7 +1640,7 @@ public class EaglerAdapterImpl2 {
@Override @Override
public void resolveStr(String s) { public void resolveStr(String s) {
if(System.currentTimeMillis() - start > 500l) { if(System.currentTimeMillis() - start > 500l) {
keyStates[28] = false; //un-press ctrl unpressCTRL = true;
} }
cb.complete(s); cb.complete(s);
} }

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
# set this to false to use "/eag-ban" to ban on bungee instead of just "/ban" # set this to false to use "/eag-ban" to ban on bungee instead of just "/ban"
# (most likely needs a restart to take effect) # (most likely needs a restart to take effect)
replace-bukkit=true replace-bukkit=false
[Usernames] [Usernames]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long