<1.1.7> Fixed two protocol V4 issues in EaglerXVelocity

This commit is contained in:
lax1dude 2025-01-26 13:18:32 -08:00
parent aea12b5e67
commit ed97c1ac00
5 changed files with 9 additions and 7 deletions
gateway/EaglercraftXVelocity
EaglerXVelocity-Latest.jar
src/main
java/net/lax1dude/eaglercraft/v1_8/plugin/gateway_velocity
resources
gateway_version_velocity

@ -17,14 +17,14 @@ package net.lax1dude.eaglercraft.v1_8.plugin.gateway_velocity;
*/ */
public class EaglerXVelocityVersion { public class EaglerXVelocityVersion {
public static final String NATIVE_VELOCITY_BUILD = "3.4.0-SNAPSHOT:71feb11b:b461"; public static final String NATIVE_VELOCITY_BUILD = "3.4.0-SNAPSHOT:6995f415:b464";
public static final String NATIVE_VELOCITY_BUILD_DL = "https://api.papermc.io/v2/projects/velocity/versions/3.4.0-SNAPSHOT/builds/461/downloads/velocity-3.4.0-SNAPSHOT-461.jar"; public static final String NATIVE_VELOCITY_BUILD_DL = "https://api.papermc.io/v2/projects/velocity/versions/3.4.0-SNAPSHOT/builds/464/downloads/velocity-3.4.0-SNAPSHOT-464.jar";
public static final String ID = "EaglerXVelocity"; public static final String ID = "EaglerXVelocity";
public static final String PLUGIN_ID = "eaglerxvelocity"; public static final String PLUGIN_ID = "eaglerxvelocity";
public static final String NAME = "EaglercraftXVelocity"; public static final String NAME = "EaglercraftXVelocity";
public static final String DESCRIPTION = "Plugin to allow EaglercraftX 1.8 players to join your network, or allow EaglercraftX 1.8 players to use your network as a proxy to join other networks"; public static final String DESCRIPTION = "Plugin to allow EaglercraftX 1.8 players to join your network, or allow EaglercraftX 1.8 players to use your network as a proxy to join other networks";
public static final String VERSION = "1.1.6"; public static final String VERSION = "1.1.7";
public static final String[] AUTHORS = new String[] { "lax1dude", "ayunami2000" }; public static final String[] AUTHORS = new String[] { "lax1dude", "ayunami2000" };
} }

@ -238,18 +238,20 @@ public class GameProtocolMessageController {
pkt = sendQueueV4.remove(0); pkt = sendQueueV4.remove(0);
sendPluginMessage(owner, GamePluginMessageConstants.V4_CHANNEL, pkt); sendPluginMessage(owner, GamePluginMessageConstants.V4_CHANNEL, pkt);
}else { }else {
int i, j, sendCount, totalLen; int i, j, sendCount, totalLen, lastLen;
while(!sendQueueV4.isEmpty()) { while(!sendQueueV4.isEmpty()) {
sendCount = 0; sendCount = 0;
totalLen = 0; totalLen = 0;
Iterator<byte[]> itr = sendQueueV4.iterator(); Iterator<byte[]> itr = sendQueueV4.iterator();
do { do {
i = itr.next().length; i = itr.next().length;
totalLen += GamePacketOutputBuffer.getVarIntSize(i) + i; lastLen = GamePacketOutputBuffer.getVarIntSize(i) + i;
totalLen += lastLen;
++sendCount; ++sendCount;
}while(totalLen < 32760 && itr.hasNext()); }while(totalLen < 32760 && itr.hasNext());
if(totalLen >= 32760) { if(totalLen >= 32760) {
--sendCount; --sendCount;
totalLen -= lastLen;
} }
if(sendCount <= 1) { if(sendCount <= 1) {
pkt = sendQueueV4.remove(0); pkt = sendQueueV4.remove(0);

@ -1 +1 @@
{"id":"eaglerxvelocity","name":"EaglercraftXVelocity","version":"1.1.6","description":"Plugin to allow EaglercraftX 1.8 players to join your network, or allow EaglercraftX 1.8 players to use your network as a proxy to join other networks","authors":["lax1dude", "ayunami2000"],"dependencies":[],"main":"net.lax1dude.eaglercraft.v1_8.plugin.gateway_velocity.EaglerXVelocity"} {"id":"eaglerxvelocity","name":"EaglercraftXVelocity","version":"1.1.7","description":"Plugin to allow EaglercraftX 1.8 players to join your network, or allow EaglercraftX 1.8 players to use your network as a proxy to join other networks","authors":["lax1dude", "ayunami2000"],"dependencies":[],"main":"net.lax1dude.eaglercraft.v1_8.plugin.gateway_velocity.EaglerXVelocity"}

@ -1 +1 @@
1.1.6 1.1.7