added devauth
Added some extra checks Made RD 1024
This commit is contained in:
12
build.gradle
12
build.gradle
@@ -201,4 +201,16 @@ dependencies {
|
|||||||
include(implementation 'org.apache.commons:commons-pool2:2.12.0')
|
include(implementation 'org.apache.commons:commons-pool2:2.12.0')
|
||||||
//implementation 'org.rocksdb:rocksdbjni:8.10.0'
|
//implementation 'org.rocksdb:rocksdbjni:8.10.0'
|
||||||
//implementation 'redis.clients:jedis:5.1.0'
|
//implementation 'redis.clients:jedis:5.1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
modRuntimeOnly('me.djtheredstoner:DevAuth-fabric:1.1.0') {
|
||||||
|
exclude group: 'net.fabricmc', module: 'fabric-loader'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ import me.cortex.voxy.client.core.rendering.section.IUsesMeshlets;
|
|||||||
import me.cortex.voxy.client.core.rendering.section.MDICSectionRenderer;
|
import me.cortex.voxy.client.core.rendering.section.MDICSectionRenderer;
|
||||||
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
||||||
import me.cortex.voxy.client.core.rendering.util.UploadStream;
|
import me.cortex.voxy.client.core.rendering.util.UploadStream;
|
||||||
|
import me.cortex.voxy.common.Logger;
|
||||||
import me.cortex.voxy.common.util.MessageQueue;
|
import me.cortex.voxy.common.util.MessageQueue;
|
||||||
import me.cortex.voxy.common.world.WorldEngine;
|
import me.cortex.voxy.common.world.WorldEngine;
|
||||||
import me.cortex.voxy.common.thread.ServiceThreadPool;
|
import me.cortex.voxy.common.thread.ServiceThreadPool;
|
||||||
@@ -48,7 +49,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
|
|||||||
|
|
||||||
//Max sections: ~500k
|
//Max sections: ~500k
|
||||||
//Max geometry: 1 gb
|
//Max geometry: 1 gb
|
||||||
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<20, (1L<<32)-1024);
|
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<20, (1L<<31)-1024);
|
||||||
|
|
||||||
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
|
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
|
||||||
var router = new SectionUpdateRouter();
|
var router = new SectionUpdateRouter();
|
||||||
@@ -148,10 +149,14 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
|
|||||||
|
|
||||||
private int q = -60;
|
private int q = -60;
|
||||||
public void setup(Camera camera) {
|
public void setup(Camera camera) {
|
||||||
final int W = 80;
|
final int W = 32;
|
||||||
final int H = 2;
|
final int H = 2;
|
||||||
for (int i = 0; i<32 && q<((W*2+1)*(W*2+1)*H)&&q++>=0;i++) {
|
for (int i = 0; i<64 && q<((W*2+1)*(W*2+1)*H)&&q++>=0;i++) {
|
||||||
this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, (q%(W*2+1))-W, ((q/(W*2+1))/(W*2+1))-1, ((q/(W*2+1))%(W*2+1)))-W);
|
this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, (q%(W*2+1))-W, ((q/(W*2+1))/(W*2+1))-1, ((q/(W*2+1))%(W*2+1))-W));
|
||||||
|
}
|
||||||
|
if (q==((W*2+1)*(W*2+1)*H)) {
|
||||||
|
q++;
|
||||||
|
Logger.info("Finished loading render distance");
|
||||||
}
|
}
|
||||||
this.modelService.tick();
|
this.modelService.tick();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ public class NodeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void insertTopLevelNode(long pos) {
|
public void insertTopLevelNode(long pos) {
|
||||||
|
if ((pos&0xF) != 0) {
|
||||||
|
throw new IllegalStateException("BAD POS !! YOU DID SOMETHING VERY BAD");
|
||||||
|
}
|
||||||
if (this.activeSectionMap.containsKey(pos)) {
|
if (this.activeSectionMap.containsKey(pos)) {
|
||||||
Logger.error("Tried inserting top level pos " + WorldEngine.pprintPos(pos) + " but it was in active map, discarding!");
|
Logger.error("Tried inserting top level pos " + WorldEngine.pprintPos(pos) + " but it was in active map, discarding!");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ public class MixinClientCommonNetworkHandler {
|
|||||||
private void handleDisconnectAsCrash(Packet<?> packet, Exception exception, CallbackInfo ci) {
|
private void handleDisconnectAsCrash(Packet<?> packet, Exception exception, CallbackInfo ci) {
|
||||||
if (packet instanceof GameJoinS2CPacket) {
|
if (packet instanceof GameJoinS2CPacket) {
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
if (exception instanceof RuntimeException re) {
|
//if (exception instanceof RuntimeException re) {
|
||||||
throw re;
|
// throw re;
|
||||||
} else {
|
//} else {
|
||||||
throw new RuntimeException("Force crashing due to exception during on game join", exception);
|
throw new RuntimeException("Force crashing due to exception during on game join", exception);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user