mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #43 - Fix invisible block entities and other issues
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 = "u42";
|
||||
public static final String projectForkVersion = "u43";
|
||||
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 = "u42";
|
||||
public static final String projectOriginVersion = "u43";
|
||||
|
||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
||||
|
||||
// EPK Version Identifier
|
||||
|
||||
public static final String EPKVersionIdentifier = "u42"; // Set to null to disable EPK version check
|
||||
public static final String EPKVersionIdentifier = "u43"; // 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 = 42;
|
||||
public static final int updateBundlePackageVersionInt = 43;
|
||||
|
||||
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
||||
|
||||
|
@ -31,8 +31,6 @@ import java.math.BigInteger;
|
||||
import java.math.MathContext;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.text.DateFormatSymbols;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
@ -1449,12 +1447,7 @@ public final class HFormatter implements Closeable, Flushable {
|
||||
}
|
||||
|
||||
if (null == lineSeparator) {
|
||||
lineSeparator = AccessController.doPrivileged(new PrivilegedAction<String>() {
|
||||
|
||||
public String run() {
|
||||
return System.getProperty("line.separator"); //$NON-NLS-1$
|
||||
}
|
||||
});
|
||||
lineSeparator = System.getProperty("line.separator");
|
||||
}
|
||||
return lineSeparator;
|
||||
}
|
||||
|
@ -40,14 +40,6 @@ public class Touch {
|
||||
return PlatformInput.touchGetEventTouchY(pointId);
|
||||
}
|
||||
|
||||
public static float getEventTouchRadiusX(int pointId) {
|
||||
return PlatformInput.touchGetEventTouchRadiusX(pointId);
|
||||
}
|
||||
|
||||
public static float getEventTouchRadiusY(int pointId) {
|
||||
return PlatformInput.touchGetEventTouchRadiusY(pointId);
|
||||
}
|
||||
|
||||
public static float getEventTouchRadiusMixed(int pointId) {
|
||||
return PlatformInput.touchGetEventTouchRadiusMixed(pointId);
|
||||
}
|
||||
@ -72,14 +64,6 @@ public class Touch {
|
||||
return PlatformInput.touchPointY(pointId);
|
||||
}
|
||||
|
||||
public static float touchPointRadiusX(int pointId) {
|
||||
return PlatformInput.touchRadiusX(pointId);
|
||||
}
|
||||
|
||||
public static float touchPointRadiusY(int pointId) {
|
||||
return PlatformInput.touchRadiusY(pointId);
|
||||
}
|
||||
|
||||
public static float touchPointRadiusMixed(int pointId) {
|
||||
return PlatformInput.touchRadiusMixed(pointId);
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ public class ChunkUpdateManager {
|
||||
generator.setStatus(ChunkCompileTaskGenerator.Status.DONE);
|
||||
}
|
||||
}
|
||||
generator.getRenderChunk().setCompiledChunk(compiledchunk);
|
||||
} else if (chunkcompiletaskgenerator$type == ChunkCompileTaskGenerator.Type.RESORT_TRANSPARENCY) {
|
||||
if(!compiledchunk.isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT)) {
|
||||
this.uploadChunk(EnumWorldBlockLayer.TRANSLUCENT, generator.getRegionRenderCacheBuilder()
|
||||
@ -96,7 +95,6 @@ public class ChunkUpdateManager {
|
||||
.getWorldRendererByLayer(EnumWorldBlockLayer.REALISTIC_WATER),
|
||||
generator.getRenderChunk(), compiledchunk);
|
||||
}
|
||||
generator.getRenderChunk().setCompiledChunk(compiledchunk);
|
||||
generator.setStatus(ChunkCompileTaskGenerator.Status.DONE);
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.Comparator;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -30,6 +31,8 @@ import net.minecraft.util.MathHelper;
|
||||
*/
|
||||
public class WorldRenderer {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger("WorldRenderer");
|
||||
|
||||
private boolean needsUpdate;
|
||||
private int drawMode;
|
||||
private double xOffset;
|
||||
@ -68,7 +71,7 @@ public class WorldRenderer {
|
||||
int i = this.byteBuffer.capacity() >> 2;
|
||||
if (parInt1 > (i - pos)) {
|
||||
int k = (((pos + parInt1 + (parInt1 >> 1)) >> 16) + 1) << 16;
|
||||
LogManager.getLogger() .warn("Needed to grow BufferBuilder buffer: Old size " + (i << 2) +
|
||||
logger.warn("Needed to grow BufferBuilder buffer: Old size " + (i << 2) +
|
||||
" bytes, new size " + (k << 2) + " bytes.");
|
||||
ByteBuffer bytebuffer = GLAllocation.createDirectByteBuffer(k << 2);
|
||||
this.byteBuffer.position(0);
|
||||
@ -139,17 +142,15 @@ public class WorldRenderer {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* SLOW AND STUPID UPLOAD QUEUE SYSTEM, MUST BE REPLACED
|
||||
*/
|
||||
public WorldRenderer.State func_181672_a() {
|
||||
this.intBuffer.position(0);
|
||||
VertexFormat fmt = this.vertexFormat;
|
||||
int i = (fmt.attribStride >> 2) * vertexCount;
|
||||
IntBuffer buf = EagRuntime.allocateIntBuffer(i);
|
||||
this.intBuffer.position(0);
|
||||
this.intBuffer.limit(i);
|
||||
int[] aint = new int[i];
|
||||
this.intBuffer.get(aint);
|
||||
return new WorldRenderer.State(aint, fmt);
|
||||
buf.put(this.intBuffer);
|
||||
buf.flip();
|
||||
return new WorldRenderer.State(buf, fmt);
|
||||
}
|
||||
|
||||
private static float func_181665_a(FloatBuffer parFloatBuffer, float parFloat1, float parFloat2, float parFloat3,
|
||||
@ -172,14 +173,14 @@ public class WorldRenderer {
|
||||
return f12 * f12 + f13 * f13 + f14 * f14;
|
||||
}
|
||||
|
||||
/**
|
||||
* SLOW AND STUPID COMPANION FUNCTION TO 'func_181672_a'
|
||||
*/
|
||||
public void setVertexState(WorldRenderer.State state) {
|
||||
this.grow(state.getRawBuffer().length);
|
||||
IntBuffer buf = state.getRawBuffer();
|
||||
int pp = buf.position();
|
||||
this.grow(buf.remaining());
|
||||
int p = intBuffer.position();
|
||||
this.intBuffer.position(0);
|
||||
this.intBuffer.put(state.getRawBuffer());
|
||||
this.intBuffer.put(buf);
|
||||
buf.position(pp);
|
||||
this.intBuffer.position(p);
|
||||
this.vertexCount = state.getVertexCount();
|
||||
this.vertexFormat = state.getVertexFormat();
|
||||
@ -521,24 +522,38 @@ public class WorldRenderer {
|
||||
}
|
||||
|
||||
public class State {
|
||||
private final int[] stateRawBuffer;
|
||||
private final IntBuffer stateRawBuffer;
|
||||
private final VertexFormat stateVertexFormat;
|
||||
private int refCount = 1;
|
||||
|
||||
public State(int[] parArrayOfInt, VertexFormat parVertexFormat) {
|
||||
public State(IntBuffer parArrayOfInt, VertexFormat parVertexFormat) {
|
||||
this.stateRawBuffer = parArrayOfInt;
|
||||
this.stateVertexFormat = parVertexFormat;
|
||||
}
|
||||
|
||||
public int[] getRawBuffer() {
|
||||
public IntBuffer getRawBuffer() {
|
||||
return this.stateRawBuffer;
|
||||
}
|
||||
|
||||
public int getVertexCount() {
|
||||
return this.stateRawBuffer.length / (this.stateVertexFormat.attribStride >> 2);
|
||||
return this.stateRawBuffer.remaining() / (this.stateVertexFormat.attribStride >> 2);
|
||||
}
|
||||
|
||||
public VertexFormat getVertexFormat() {
|
||||
return this.stateVertexFormat;
|
||||
}
|
||||
|
||||
public void retain() {
|
||||
++refCount;
|
||||
}
|
||||
|
||||
public void release() {
|
||||
if(--refCount == 0) {
|
||||
EagRuntime.freeIntBuffer(stateRawBuffer);
|
||||
}
|
||||
if(refCount < 0) {
|
||||
logger.error("WorldRenderer.State released multiple times");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -164,7 +164,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
|
||||
|
||||
}
|
||||
EagUtils.sleep(20);
|
||||
}while(EagRuntime.steadyTimeMillis() - lm < 5000l);
|
||||
}while(EagRuntime.steadyTimeMillis() - lm < 10000l);
|
||||
|
||||
// no channel was opened
|
||||
sock.writePacket(new RelayPacket06ClientFailure(ipkt.peerId));
|
||||
@ -203,7 +203,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
|
||||
continue mainLoop;
|
||||
}
|
||||
EagUtils.sleep(20);
|
||||
}while(EagRuntime.steadyTimeMillis() - lm < 5000l);
|
||||
}while(EagRuntime.steadyTimeMillis() - lm < 10000l);
|
||||
|
||||
// no ice candidates were sent
|
||||
sock.close();
|
||||
|
@ -84,7 +84,7 @@ class LANClientPeer {
|
||||
|
||||
protected void update() {
|
||||
if(state != CLOSED) {
|
||||
if(state != CONNECTED && EagRuntime.steadyTimeMillis() - startTime > 10000l) {
|
||||
if(state != CONNECTED && EagRuntime.steadyTimeMillis() - startTime > 13000l) {
|
||||
logger.info("LAN client '{}' handshake timed out", clientId);
|
||||
disconnect();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user