mirror of https://github.com/LOOHP/Limbo.git
Minecraft 1.20
This commit is contained in:
parent
0159361eec
commit
1f021007a1
14
pom.xml
14
pom.xml
|
|
@ -24,7 +24,7 @@
|
|||
<groupId>com.loohp</groupId>
|
||||
<artifactId>Limbo</artifactId>
|
||||
<name>Limbo</name>
|
||||
<version>0.7.4-ALPHA</version>
|
||||
<version>0.7.5-ALPHA</version>
|
||||
|
||||
<description>Standalone Limbo Minecraft Server.</description>
|
||||
<url>https://github.com/LOOHP/Limbo</url>
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}-${project.version}-1.19.4</finalName>
|
||||
<finalName>${project.artifactId}-${project.version}-1.20</finalName>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
|
|
@ -256,31 +256,31 @@
|
|||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<version>4.14.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-legacy</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<version>4.14.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-plain</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<version>4.14.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-api</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<version>4.14.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-nbt</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<version>4.14.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ public final class Limbo {
|
|||
|
||||
//===========================
|
||||
|
||||
public final String SERVER_IMPLEMENTATION_VERSION = "1.19.4";
|
||||
public final int SERVER_IMPLEMENTATION_PROTOCOL = 762;
|
||||
public final String SERVER_IMPLEMENTATION_VERSION = "1.20";
|
||||
public final int SERVER_IMPLEMENTATION_PROTOCOL = 763;
|
||||
public final String LIMBO_IMPLEMENTATION_VERSION;
|
||||
|
||||
private final AtomicBoolean isRunning;
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ public class ClientConnection extends Thread {
|
|||
worldSpawn = spawnEvent.getSpawnLocation();
|
||||
World world = worldSpawn.getWorld();
|
||||
|
||||
PacketPlayOutLogin join = new PacketPlayOutLogin(player.getEntityId(), false, properties.getDefaultGamemode(), Limbo.getInstance().getWorlds(), Limbo.getInstance().getDimensionRegistry().getCodec(), world, 0, (byte) properties.getMaxPlayers(), 8, 8, properties.isReducedDebugInfo(), true, false, true);
|
||||
PacketPlayOutLogin join = new PacketPlayOutLogin(player.getEntityId(), false, properties.getDefaultGamemode(), Limbo.getInstance().getWorlds(), Limbo.getInstance().getDimensionRegistry().getCodec(), world, 0, (byte) properties.getMaxPlayers(), 8, 8, properties.isReducedDebugInfo(), true, false, true, 0);
|
||||
sendPacket(join);
|
||||
Limbo.getInstance().getUnsafe().a(player, properties.getDefaultGamemode());
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
|||
private int chunkZ;
|
||||
private Chunk chunk;
|
||||
private Environment environment;
|
||||
private boolean trustEdges;
|
||||
private long[] skyLightBitMasks;
|
||||
private long[] blockLightBitMasks;
|
||||
private long[] skyLightBitMasksEmpty;
|
||||
|
|
@ -52,12 +51,11 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
|||
private List<Byte[]> skylightArrays;
|
||||
private List<Byte[]> blocklightArrays;
|
||||
|
||||
public ClientboundLevelChunkWithLightPacket(int chunkX, int chunkZ, Chunk chunk, Environment environment, boolean trustEdges, List<Byte[]> skylightArrays, List<Byte[]> blocklightArrays) {
|
||||
public ClientboundLevelChunkWithLightPacket(int chunkX, int chunkZ, Chunk chunk, Environment environment, List<Byte[]> skylightArrays, List<Byte[]> blocklightArrays) {
|
||||
this.chunkX = chunkX;
|
||||
this.chunkZ = chunkZ;
|
||||
this.chunk = chunk;
|
||||
this.environment = environment;
|
||||
this.trustEdges = trustEdges;
|
||||
this.skylightArrays = skylightArrays;
|
||||
this.blocklightArrays = blocklightArrays;
|
||||
|
||||
|
|
@ -96,10 +94,6 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
|||
return environment;
|
||||
}
|
||||
|
||||
public boolean isTrustEdges() {
|
||||
return trustEdges;
|
||||
}
|
||||
|
||||
public long[] getSkyLightBitMasks() {
|
||||
return skyLightBitMasks;
|
||||
}
|
||||
|
|
@ -258,7 +252,6 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
|||
DataTypeIO.writeCompoundTag(output, each);
|
||||
}
|
||||
|
||||
output.writeBoolean(trustEdges);
|
||||
DataTypeIO.writeVarInt(output, skyLightBitMasks.length);
|
||||
for (long l : skyLightBitMasks) {
|
||||
output.writeLong(l);
|
||||
|
|
|
|||
|
|
@ -49,8 +49,9 @@ public class PacketPlayOutLogin extends PacketOut {
|
|||
private boolean enableRespawnScreen;
|
||||
private boolean isDebug;
|
||||
private boolean isFlat;
|
||||
private int portalCooldown;
|
||||
|
||||
public PacketPlayOutLogin(int entityId, boolean isHardcore, GameMode gamemode, List<World> worlds, CompoundTag dimensionCodec, World world, long hashedSeed, byte maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean isDebug, boolean isFlat) {
|
||||
public PacketPlayOutLogin(int entityId, boolean isHardcore, GameMode gamemode, List<World> worlds, CompoundTag dimensionCodec, World world, long hashedSeed, byte maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean isDebug, boolean isFlat, int portalCooldown) {
|
||||
this.entityId = entityId;
|
||||
this.isHardcore = isHardcore;
|
||||
this.gamemode = gamemode;
|
||||
|
|
@ -66,6 +67,7 @@ public class PacketPlayOutLogin extends PacketOut {
|
|||
this.enableRespawnScreen = enableRespawnScreen;
|
||||
this.isDebug = isDebug;
|
||||
this.isFlat = isFlat;
|
||||
this.portalCooldown = portalCooldown;
|
||||
}
|
||||
|
||||
public int getEntityId() {
|
||||
|
|
@ -154,6 +156,7 @@ public class PacketPlayOutLogin extends PacketOut {
|
|||
output.writeBoolean(isDebug);
|
||||
output.writeBoolean(isFlat);
|
||||
output.writeBoolean(false);
|
||||
DataTypeIO.writeVarInt(output, portalCooldown);
|
||||
|
||||
return buffer.toByteArray();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import net.querz.mca.Chunk;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
|
@ -123,7 +124,7 @@ public class PlayerInteractManager {
|
|||
if (!currentViewing.containsKey(chunkPos)) {
|
||||
Chunk chunk = chunkPos.getWorld().getChunkAt(chunkPos.getChunkX(), chunkPos.getChunkZ());
|
||||
if (chunk == null) {
|
||||
ClientboundLevelChunkWithLightPacket chunkdata = new ClientboundLevelChunkWithLightPacket(chunkPos.getChunkX(), chunkPos.getChunkZ(), entry.getValue(), world.getEnvironment(), true, new ArrayList<>(), new ArrayList<>());
|
||||
ClientboundLevelChunkWithLightPacket chunkdata = new ClientboundLevelChunkWithLightPacket(chunkPos.getChunkX(), chunkPos.getChunkZ(), entry.getValue(), world.getEnvironment(), Collections.emptyList(), Collections.emptyList());
|
||||
player.clientConnection.sendPacket(chunkdata);
|
||||
} else {
|
||||
List<Byte[]> blockChunk = world.getLightEngineBlock().getBlockLightBitMask(chunkPos.getChunkX(), chunkPos.getChunkZ());
|
||||
|
|
@ -137,7 +138,7 @@ public class PlayerInteractManager {
|
|||
if (skyChunk == null) {
|
||||
skyChunk = new ArrayList<>();
|
||||
}
|
||||
ClientboundLevelChunkWithLightPacket chunkdata = new ClientboundLevelChunkWithLightPacket(chunkPos.getChunkX(), chunkPos.getChunkZ(), chunk, world.getEnvironment(), true, skyChunk, blockChunk);
|
||||
ClientboundLevelChunkWithLightPacket chunkdata = new ClientboundLevelChunkWithLightPacket(chunkPos.getChunkX(), chunkPos.getChunkZ(), chunk, world.getEnvironment(), skyChunk, blockChunk);
|
||||
player.clientConnection.sendPacket(chunkdata);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue