Add optional 1.18 (21w40a) snapshot protocol support
Accessible via the net.md_5.bungee.protocol.snapshot JVM property.
This commit is contained in:
@@ -216,7 +216,7 @@ public class ServerConnector extends PacketHandler
|
||||
|
||||
// Set tab list size, TODO: what shall we do about packet mutability
|
||||
Login modLogin = new Login( login.getEntityId(), login.isHardcore(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(),
|
||||
(byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat() );
|
||||
(byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isDebug(), login.isFlat() );
|
||||
|
||||
user.unsafe().sendPacket( modLogin );
|
||||
|
||||
|
@@ -71,6 +71,8 @@ public abstract class EntityMap
|
||||
case ProtocolConstants.MINECRAFT_1_17:
|
||||
case ProtocolConstants.MINECRAFT_1_17_1:
|
||||
return EntityMap_1_16_2.INSTANCE_1_17;
|
||||
case ProtocolConstants.MINECRAFT_1_18:
|
||||
return EntityMap_1_16_2.INSTANCE_1_18;
|
||||
}
|
||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ class EntityMap_1_16_2 extends EntityMap
|
||||
|
||||
static final EntityMap_1_16_2 INSTANCE_1_16_2 = new EntityMap_1_16_2( 0x04, 0x2D );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_17 = new EntityMap_1_16_2( 0x04, 0x2D );
|
||||
static final EntityMap_1_16_2 INSTANCE_1_18 = new EntityMap_1_16_2( 0x04, 0x2D );
|
||||
//
|
||||
private final int spawnPlayerId;
|
||||
private final int spectateId;
|
||||
|
Reference in New Issue
Block a user