Integrated server packets work (kinda)
This commit is contained in:
parent
3a10258a98
commit
6836e6d28e
13825
javascript/classes.js
13825
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
925635
javascript/classes_server.js
925635
javascript/classes_server.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -36,7 +36,7 @@ def folder = "../javascript"
|
||||||
def name = "classes_server.js"
|
def name = "classes_server.js"
|
||||||
|
|
||||||
teavm.js {
|
teavm.js {
|
||||||
obfuscated = false
|
obfuscated = true
|
||||||
sourceMap = true
|
sourceMap = true
|
||||||
targetFileName = "../" + name
|
targetFileName = "../" + name
|
||||||
optimization = OptimizationLevel.AGGRESSIVE
|
optimization = OptimizationLevel.AGGRESSIVE
|
||||||
|
|
|
@ -50,17 +50,18 @@ public class NetLoginHandler extends NetHandler {
|
||||||
* network packets unless the timeout has occurred.
|
* network packets unless the timeout has occurred.
|
||||||
*/
|
*/
|
||||||
public void handlePackets() {
|
public void handlePackets() {
|
||||||
System.out.println("[SP-Server][LOGIN][HANDLE][" + clientUsername + "]");
|
//System.out.println("[SP-Server][LOGIN][HANDLE][" + clientUsername + "]");
|
||||||
if (this.field_72544_i) { // FIX THIS SHIT!!!
|
if (this.field_72544_i) {
|
||||||
this.initializePlayerConnection();
|
this.initializePlayerConnection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.loginTimer++ == 600 && finishedProcessing == false) {
|
this.myTCPConnection.processReadPackets();
|
||||||
this.kickUser("Took too long to log in");
|
// if (this.loginTimer++ == 100) {
|
||||||
} else {
|
// this.kickUser("Took too long to log in");
|
||||||
this.myTCPConnection.processReadPackets(); // problem
|
// } else {
|
||||||
}
|
// this.myTCPConnection.processReadPackets();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
@ -155,7 +156,7 @@ public class NetLoginHandler extends NetHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.finishedProcessing = true;
|
//this.finishedProcessing = true;
|
||||||
System.out.println("finished processing");
|
System.out.println("finished processing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class NetServerHandler extends NetHandler
|
||||||
|
|
||||||
if ((long)this.currentTicks - this.ticksOfLastKeepAlive > 20L)
|
if ((long)this.currentTicks - this.ticksOfLastKeepAlive > 20L)
|
||||||
{
|
{
|
||||||
this.ticksOfLastKeepAlive = (long)this.currentTicks;
|
this.ticksOfLastKeepAlive = this.currentTicks;
|
||||||
this.keepAliveTimeSent = System.nanoTime() / 1000000L;
|
this.keepAliveTimeSent = System.nanoTime() / 1000000L;
|
||||||
this.keepAliveRandomID = randomGenerator.nextInt();
|
this.keepAliveRandomID = randomGenerator.nextInt();
|
||||||
this.sendPacketToPlayer(new Packet0KeepAlive(this.keepAliveRandomID));
|
this.sendPacketToPlayer(new Packet0KeepAlive(this.keepAliveRandomID));
|
||||||
|
@ -332,7 +332,6 @@ public class NetServerHandler extends NetHandler
|
||||||
public void handleBlockDig(Packet14BlockDig par1Packet14BlockDig)
|
public void handleBlockDig(Packet14BlockDig par1Packet14BlockDig)
|
||||||
{
|
{
|
||||||
WorldServer var2 = this.mcServer.worldServerForDimension(this.playerEntity.dimension);
|
WorldServer var2 = this.mcServer.worldServerForDimension(this.playerEntity.dimension);
|
||||||
//this.playerEntity.func_143004_u();
|
|
||||||
|
|
||||||
if (par1Packet14BlockDig.status == 4)
|
if (par1Packet14BlockDig.status == 4)
|
||||||
{
|
{
|
||||||
|
@ -428,7 +427,6 @@ public class NetServerHandler extends NetHandler
|
||||||
int var6 = par1Packet15Place.getYPosition();
|
int var6 = par1Packet15Place.getYPosition();
|
||||||
int var7 = par1Packet15Place.getZPosition();
|
int var7 = par1Packet15Place.getZPosition();
|
||||||
int var8 = par1Packet15Place.getDirection();
|
int var8 = par1Packet15Place.getDirection();
|
||||||
//this.playerEntity.func_143004_u();
|
|
||||||
|
|
||||||
if (par1Packet15Place.getDirection() == 255)
|
if (par1Packet15Place.getDirection() == 255)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,6 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
||||||
try {
|
try {
|
||||||
netHandler = new NetClientHandler(mc, EaglerProfile.username);
|
netHandler = new NetClientHandler(mc, EaglerProfile.username);
|
||||||
this.mc.setNetManager(netHandler.getNetManager());
|
this.mc.setNetManager(netHandler.getNetManager());
|
||||||
netHandler.handleSharedKey(new Packet252SharedKey());
|
|
||||||
netHandler.addToSendQueue(new Packet2ClientProtocol(78, EaglerProfile.username, "127.0.0.1", mc.gameSettings.renderDistance));
|
netHandler.addToSendQueue(new Packet2ClientProtocol(78, EaglerProfile.username, "127.0.0.1", mc.gameSettings.renderDistance));
|
||||||
netHandler.addToSendQueue(new Packet250CustomPayload("EAG|MySkin", EaglerProfile.getSkinPacket()));
|
netHandler.addToSendQueue(new Packet250CustomPayload("EAG|MySkin", EaglerProfile.getSkinPacket()));
|
||||||
netHandler.addToSendQueue(new Packet250CustomPayload("EAG|MyCape", EaglerProfile.getCapePacket()));
|
netHandler.addToSendQueue(new Packet250CustomPayload("EAG|MyCape", EaglerProfile.getCapePacket()));
|
||||||
|
|
Loading…
Reference in New Issue