mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #41 - Fix swords unable to break blocks in survival
This commit is contained in:
@ -10,7 +10,7 @@ public class EaglercraftVersion {
|
||||
/// Customize these to fit your fork:
|
||||
|
||||
public static final String projectForkName = "EaglercraftX";
|
||||
public static final String projectForkVersion = "u40";
|
||||
public static final String projectForkVersion = "u41";
|
||||
public static final String projectForkVendor = "lax1dude";
|
||||
|
||||
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||
@ -20,20 +20,20 @@ public class EaglercraftVersion {
|
||||
public static final String projectOriginName = "EaglercraftX";
|
||||
public static final String projectOriginAuthor = "lax1dude";
|
||||
public static final String projectOriginRevision = "1.8";
|
||||
public static final String projectOriginVersion = "u40";
|
||||
public static final String projectOriginVersion = "u41";
|
||||
|
||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
||||
|
||||
// EPK Version Identifier
|
||||
|
||||
public static final String EPKVersionIdentifier = "u40"; // Set to null to disable EPK version check
|
||||
public static final String EPKVersionIdentifier = "u41"; // Set to null to disable EPK version check
|
||||
|
||||
// Updating configuration
|
||||
|
||||
public static final boolean enableUpdateService = true;
|
||||
|
||||
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
||||
public static final int updateBundlePackageVersionInt = 40;
|
||||
public static final int updateBundlePackageVersionInt = 41;
|
||||
|
||||
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
||||
|
||||
|
@ -0,0 +1,114 @@
|
||||
package net.lax1dude.eaglercraft.v1_8.minecraft;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class GuiScreenVideoSettingsWarning extends GuiScreen {
|
||||
|
||||
private final GuiScreen cont;
|
||||
private final int mask;
|
||||
private final List<String> messages = new ArrayList<>();
|
||||
private int top = 0;
|
||||
|
||||
public static final int WARNING_VSYNC = 1;
|
||||
public static final int WARNING_RENDER_DISTANCE = 2;
|
||||
public static final int WARNING_FRAME_LIMIT = 4;
|
||||
|
||||
public GuiScreenVideoSettingsWarning(GuiScreen cont, int mask) {
|
||||
this.cont = cont;
|
||||
this.mask = mask;
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
messages.clear();
|
||||
messages.add(EnumChatFormatting.RED + I18n.format("options.badVideoSettingsDetected.title"));
|
||||
messages.add(null);
|
||||
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.0"));
|
||||
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.1"));
|
||||
if((mask & WARNING_VSYNC) != 0) {
|
||||
messages.add(null);
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.0"));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.1"));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.2"));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.3"));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.4"));
|
||||
}
|
||||
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||
messages.add(null);
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.0", mc.gameSettings.renderDistanceChunks));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.1"));
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.2"));
|
||||
}
|
||||
if((mask & WARNING_FRAME_LIMIT) != 0) {
|
||||
messages.add(null);
|
||||
messages.add(I18n.format("options.badVideoSettingsDetected.frameLimit.0", mc.gameSettings.limitFramerate));
|
||||
}
|
||||
int j = 0;
|
||||
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||
if(messages.get(i) != null) {
|
||||
j += 9;
|
||||
}else {
|
||||
j += 5;
|
||||
}
|
||||
}
|
||||
top = this.height / 6 + j / -12;
|
||||
j += top;
|
||||
buttonList.clear();
|
||||
buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 16, I18n.format("options.badVideoSettingsDetected.fixSettings")));
|
||||
buttonList.add(new GuiButton(1, this.width / 2 - 100, j + 40, I18n.format("options.badVideoSettingsDetected.continueAnyway")));
|
||||
buttonList.add(new GuiButton(2, this.width / 2 - 100, j + 64, I18n.format("options.badVideoSettingsDetected.doNotShowAgain")));
|
||||
}
|
||||
|
||||
public void drawScreen(int par1, int par2, float par3) {
|
||||
this.drawDefaultBackground();
|
||||
int j = 0;
|
||||
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||
String str = messages.get(i);
|
||||
if(str != null) {
|
||||
this.drawCenteredString(fontRendererObj, str, this.width / 2, top + j, 16777215);
|
||||
j += 9;
|
||||
}else {
|
||||
j += 5;
|
||||
}
|
||||
}
|
||||
super.drawScreen(par1, par2, par3);
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if(par1GuiButton.id == 0) {
|
||||
mc.gameSettings.fixBadVideoSettings();
|
||||
mc.gameSettings.saveOptions();
|
||||
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||
mc.renderGlobal.loadRenderers();
|
||||
}
|
||||
mc.displayGuiScreen(cont);
|
||||
}else if(par1GuiButton.id == 1) {
|
||||
mc.displayGuiScreen(cont);
|
||||
}else if(par1GuiButton.id == 2) {
|
||||
mc.gameSettings.hideVideoSettingsWarning = true;
|
||||
mc.gameSettings.saveOptions();
|
||||
mc.displayGuiScreen(cont);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -50,6 +50,7 @@ class LANClientPeer {
|
||||
PlatformWebRTC.serverLANPeerICECandidates(clientId, candidates);
|
||||
long millis = EagRuntime.steadyTimeMillis();
|
||||
do {
|
||||
PlatformWebRTC.runScheduledTasks();
|
||||
LANPeerEvent evt;
|
||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||
@ -78,6 +79,7 @@ class LANClientPeer {
|
||||
PlatformWebRTC.serverLANPeerDescription(clientId, description);
|
||||
long millis = EagRuntime.steadyTimeMillis();
|
||||
do {
|
||||
PlatformWebRTC.runScheduledTasks();
|
||||
LANPeerEvent evt;
|
||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||
if(evt instanceof LANPeerEvent.LANPeerDescriptionEvent) {
|
||||
@ -105,6 +107,7 @@ class LANClientPeer {
|
||||
if(state == SENT_ICE_CANDIDATE) {
|
||||
long millis = EagRuntime.steadyTimeMillis();
|
||||
do {
|
||||
PlatformWebRTC.runScheduledTasks();
|
||||
LANPeerEvent evt;
|
||||
while((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null && evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||
// skip ice candidates
|
||||
|
Reference in New Issue
Block a user