forked from BLOCKFANTASY/LOOHP-Limbo
Minecraft 1.18.2 Proper support
This commit is contained in:
parent
26aabe66bd
commit
4ebe77d5dd
2
pom.xml
2
pom.xml
|
|
@ -24,7 +24,7 @@
|
||||||
<groupId>com.loohp</groupId>
|
<groupId>com.loohp</groupId>
|
||||||
<artifactId>Limbo</artifactId>
|
<artifactId>Limbo</artifactId>
|
||||||
<name>Limbo</name>
|
<name>Limbo</name>
|
||||||
<version>0.6.11-ALPHA</version>
|
<version>0.6.12-ALPHA</version>
|
||||||
|
|
||||||
<description>Standalone Limbo Minecraft Server.</description>
|
<description>Standalone Limbo Minecraft Server.</description>
|
||||||
<url>https://github.com/LOOHP/Limbo</url>
|
<url>https://github.com/LOOHP/Limbo</url>
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,8 @@ public class Limbo {
|
||||||
|
|
||||||
//===========================
|
//===========================
|
||||||
|
|
||||||
public final String serverImplementationVersion = "1.18.1";
|
public final String serverImplementationVersion = "1.18.2";
|
||||||
public final int serverImplmentationProtocol = 757;
|
public final int serverImplementationProtocol = 758;
|
||||||
public final String limboImplementationVersion;
|
public final String limboImplementationVersion;
|
||||||
|
|
||||||
private AtomicBoolean isRunning;
|
private AtomicBoolean isRunning;
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ public class ServerProperties {
|
||||||
prop.store(pw, COMMENT);
|
prop.store(pw, COMMENT);
|
||||||
pw.close();
|
pw.close();
|
||||||
|
|
||||||
protocol = Limbo.getInstance().serverImplmentationProtocol;
|
protocol = Limbo.getInstance().serverImplementationProtocol;
|
||||||
|
|
||||||
maxPlayers = Integer.parseInt(prop.getProperty("max-players"));
|
maxPlayers = Integer.parseInt(prop.getProperty("max-players"));
|
||||||
serverPort = Integer.parseInt(prop.getProperty("server-port"));
|
serverPort = Integer.parseInt(prop.getProperty("server-port"));
|
||||||
|
|
|
||||||
|
|
@ -482,13 +482,13 @@ public class ClientConnection extends Thread {
|
||||||
String str = inetAddress.getHostName() + ":" + clientSocket.getPort() + "|" + player.getName() + "(" + player.getUniqueId() + ")";
|
String str = inetAddress.getHostName() + ":" + clientSocket.getPort() + "|" + player.getName() + "(" + player.getUniqueId() + ")";
|
||||||
Limbo.getInstance().getConsole().sendMessage("[/" + str + "] <-> Player had connected to the Limbo server!");
|
Limbo.getInstance().getConsole().sendMessage("[/" + str + "] <-> Player had connected to the Limbo server!");
|
||||||
|
|
||||||
|
player.playerInteractManager.update();
|
||||||
|
|
||||||
PacketPlayOutDeclareCommands declare = DeclareCommands.getDeclareCommandsPacket(player);
|
PacketPlayOutDeclareCommands declare = DeclareCommands.getDeclareCommandsPacket(player);
|
||||||
if (declare != null) {
|
if (declare != null) {
|
||||||
sendPacket(declare);
|
sendPacket(declare);
|
||||||
}
|
}
|
||||||
|
|
||||||
player.playerInteractManager.update();
|
|
||||||
|
|
||||||
PacketPlayOutSpawnPosition spawnPos = new PacketPlayOutSpawnPosition(BlockPosition.from(worldSpawn), worldSpawn.getPitch());
|
PacketPlayOutSpawnPosition spawnPos = new PacketPlayOutSpawnPosition(BlockPosition.from(worldSpawn), worldSpawn.getPitch());
|
||||||
sendPacket(spawnPos);
|
sendPacket(spawnPos);
|
||||||
|
|
||||||
|
|
@ -665,7 +665,7 @@ public class ClientConnection extends Thread {
|
||||||
running = false;
|
running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum ClientState {
|
public enum ClientState {
|
||||||
LEGACY,
|
LEGACY,
|
||||||
HANDSHAKE,
|
HANDSHAKE,
|
||||||
STATUS,
|
STATUS,
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,6 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
||||||
this.chunkZ = chunkZ;
|
this.chunkZ = chunkZ;
|
||||||
this.chunk = chunk;
|
this.chunk = chunk;
|
||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
this.chunkX = chunkX;
|
|
||||||
this.chunkZ = chunkZ;
|
|
||||||
this.trustEdges = trustEdges;
|
this.trustEdges = trustEdges;
|
||||||
this.skylightArrays = skylightArrays;
|
this.skylightArrays = skylightArrays;
|
||||||
this.blocklightArrays = blocklightArrays;
|
this.blocklightArrays = blocklightArrays;
|
||||||
|
|
@ -136,7 +134,7 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
Section section = chunk.getSection(i);
|
Section section = chunk.getSection(i);
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
int counter = 0;
|
short counter = 0;
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
for (int y = 0; y < 16; y++) {
|
for (int y = 0; y < 16; y++) {
|
||||||
|
|
@ -153,23 +151,12 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
||||||
newBits = Math.max(newBits, 4);
|
newBits = Math.max(newBits, 4);
|
||||||
//Limbo.getInstance().getConsole().sendMessage(i + " " + newBits);
|
//Limbo.getInstance().getConsole().sendMessage(i + " " + newBits);
|
||||||
if (newBits <= 8) {
|
if (newBits <= 8) {
|
||||||
/*
|
|
||||||
if (newBits == 4) {
|
|
||||||
dataOut.writeByte(4);
|
|
||||||
} else {
|
|
||||||
newBits = 8;
|
|
||||||
ChunkDataUtils.adjustBlockStateBits(newBits, section, chunk.getDataVersion());
|
|
||||||
dataOut.writeByte(8);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
dataOut.writeByte(newBits);
|
dataOut.writeByte(newBits);
|
||||||
|
|
||||||
DataTypeIO.writeVarInt(dataOut, section.getPalette().size());
|
DataTypeIO.writeVarInt(dataOut, section.getPalette().size());
|
||||||
//Limbo.getInstance().getConsole().sendMessage(section.getPalette().size());
|
//Limbo.getInstance().getConsole().sendMessage(section.getPalette().size());
|
||||||
Iterator<CompoundTag> itr1 = section.getPalette().iterator();
|
|
||||||
//Limbo.getInstance().getConsole().sendMessage("Nonnull -> " + i + " " + newBits);
|
//Limbo.getInstance().getConsole().sendMessage("Nonnull -> " + i + " " + newBits);
|
||||||
while (itr1.hasNext()) {
|
for (CompoundTag tag : section.getPalette()) {
|
||||||
CompoundTag tag = itr1.next();
|
|
||||||
DataTypeIO.writeVarInt(dataOut, GeneratedBlockDataMappings.getGlobalPaletteIDFromState(tag));
|
DataTypeIO.writeVarInt(dataOut, GeneratedBlockDataMappings.getGlobalPaletteIDFromState(tag));
|
||||||
//Limbo.getInstance().getConsole().sendMessage(tag + " -> " + GeneratedDataUtils.getGlobalPaletteIDFromState(tag));
|
//Limbo.getInstance().getConsole().sendMessage(tag + " -> " + GeneratedDataUtils.getGlobalPaletteIDFromState(tag));
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +208,7 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
||||||
}
|
}
|
||||||
int id = list.isEmpty() ? 0 : list.remove(0);
|
int id = list.isEmpty() ? 0 : list.remove(0);
|
||||||
currentLong = currentLong << 15;
|
currentLong = currentLong << 15;
|
||||||
currentLong |= (long) id;
|
currentLong |= id;
|
||||||
}
|
}
|
||||||
DataTypeIO.writeVarInt(dataOut, longsNeeded);
|
DataTypeIO.writeVarInt(dataOut, longsNeeded);
|
||||||
for (int j = 0; j < longsNeeded; j++) {
|
for (int j = 0; j < longsNeeded; j++) {
|
||||||
|
|
@ -266,7 +253,7 @@ public class ClientboundLevelChunkWithLightPacket extends PacketOut {
|
||||||
int x = each.getInt("x") % 16;
|
int x = each.getInt("x") % 16;
|
||||||
int y = each.getInt("y");
|
int y = each.getInt("y");
|
||||||
int z = each.getInt("z") % 16;
|
int z = each.getInt("z") % 16;
|
||||||
output.writeByte((x << 4) | z);
|
output.writeByte(((x & 15) << 4) | (z & 15));
|
||||||
output.writeShort(y);
|
output.writeShort(y);
|
||||||
Integer id = Registry.BLOCK_ENTITY_TYPE.getId(new NamespacedKey(chunk.getBlockStateAt(x, y, z).getString("Name")));
|
Integer id = Registry.BLOCK_ENTITY_TYPE.getId(new NamespacedKey(chunk.getBlockStateAt(x, y, z).getString("Name")));
|
||||||
DataTypeIO.writeVarInt(output, id == null ? -1 : id);
|
DataTypeIO.writeVarInt(output, id == null ? -1 : id);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -12579,8 +12579,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/structure_piece": {
|
"minecraft:worldgen/structure_placement": {
|
||||||
"protocol_id": 42,
|
"protocol_id": 42,
|
||||||
|
"entries": {
|
||||||
|
"minecraft:random_spread": {
|
||||||
|
"protocol_id": 0
|
||||||
|
},
|
||||||
|
"minecraft:concentric_rings": {
|
||||||
|
"protocol_id": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minecraft:worldgen/structure_piece": {
|
||||||
|
"protocol_id": 43,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:mscorridor": {
|
"minecraft:mscorridor": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12753,7 +12764,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/placement_modifier_type": {
|
"minecraft:worldgen/placement_modifier_type": {
|
||||||
"protocol_id": 43,
|
"protocol_id": 44,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:block_predicate_filter": {
|
"minecraft:block_predicate_filter": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12803,7 +12814,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/block_state_provider_type": {
|
"minecraft:worldgen/block_state_provider_type": {
|
||||||
"protocol_id": 44,
|
"protocol_id": 45,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:simple_state_provider": {
|
"minecraft:simple_state_provider": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12829,7 +12840,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/foliage_placer_type": {
|
"minecraft:worldgen/foliage_placer_type": {
|
||||||
"protocol_id": 45,
|
"protocol_id": 46,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:blob_foliage_placer": {
|
"minecraft:blob_foliage_placer": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12864,7 +12875,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/trunk_placer_type": {
|
"minecraft:worldgen/trunk_placer_type": {
|
||||||
"protocol_id": 46,
|
"protocol_id": 47,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:straight_trunk_placer": {
|
"minecraft:straight_trunk_placer": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12890,7 +12901,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/tree_decorator_type": {
|
"minecraft:worldgen/tree_decorator_type": {
|
||||||
"protocol_id": 47,
|
"protocol_id": 48,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:trunk_vine": {
|
"minecraft:trunk_vine": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12910,7 +12921,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/feature_size_type": {
|
"minecraft:worldgen/feature_size_type": {
|
||||||
"protocol_id": 48,
|
"protocol_id": 49,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:two_layers_feature_size": {
|
"minecraft:two_layers_feature_size": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12921,7 +12932,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/biome_source": {
|
"minecraft:worldgen/biome_source": {
|
||||||
"protocol_id": 49,
|
"protocol_id": 50,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:fixed": {
|
"minecraft:fixed": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12938,7 +12949,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/chunk_generator": {
|
"minecraft:worldgen/chunk_generator": {
|
||||||
"protocol_id": 50,
|
"protocol_id": 51,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:noise": {
|
"minecraft:noise": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12952,7 +12963,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/material_condition": {
|
"minecraft:worldgen/material_condition": {
|
||||||
"protocol_id": 51,
|
"protocol_id": 52,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:biome": {
|
"minecraft:biome": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -12990,7 +13001,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/material_rule": {
|
"minecraft:worldgen/material_rule": {
|
||||||
"protocol_id": 52,
|
"protocol_id": 53,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:bandlands": {
|
"minecraft:bandlands": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -13006,8 +13017,115 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"minecraft:worldgen/density_function_type": {
|
||||||
|
"protocol_id": 54,
|
||||||
|
"entries": {
|
||||||
|
"minecraft:blend_alpha": {
|
||||||
|
"protocol_id": 0
|
||||||
|
},
|
||||||
|
"minecraft:blend_offset": {
|
||||||
|
"protocol_id": 1
|
||||||
|
},
|
||||||
|
"minecraft:beardifier": {
|
||||||
|
"protocol_id": 2
|
||||||
|
},
|
||||||
|
"minecraft:old_blended_noise": {
|
||||||
|
"protocol_id": 3
|
||||||
|
},
|
||||||
|
"minecraft:interpolated": {
|
||||||
|
"protocol_id": 4
|
||||||
|
},
|
||||||
|
"minecraft:flat_cache": {
|
||||||
|
"protocol_id": 5
|
||||||
|
},
|
||||||
|
"minecraft:cache_2d": {
|
||||||
|
"protocol_id": 6
|
||||||
|
},
|
||||||
|
"minecraft:cache_once": {
|
||||||
|
"protocol_id": 7
|
||||||
|
},
|
||||||
|
"minecraft:cache_all_in_cell": {
|
||||||
|
"protocol_id": 8
|
||||||
|
},
|
||||||
|
"minecraft:noise": {
|
||||||
|
"protocol_id": 9
|
||||||
|
},
|
||||||
|
"minecraft:end_islands": {
|
||||||
|
"protocol_id": 10
|
||||||
|
},
|
||||||
|
"minecraft:weird_scaled_sampler": {
|
||||||
|
"protocol_id": 11
|
||||||
|
},
|
||||||
|
"minecraft:shifted_noise": {
|
||||||
|
"protocol_id": 12
|
||||||
|
},
|
||||||
|
"minecraft:range_choice": {
|
||||||
|
"protocol_id": 13
|
||||||
|
},
|
||||||
|
"minecraft:shift_a": {
|
||||||
|
"protocol_id": 14
|
||||||
|
},
|
||||||
|
"minecraft:shift_b": {
|
||||||
|
"protocol_id": 15
|
||||||
|
},
|
||||||
|
"minecraft:shift": {
|
||||||
|
"protocol_id": 16
|
||||||
|
},
|
||||||
|
"minecraft:blend_density": {
|
||||||
|
"protocol_id": 17
|
||||||
|
},
|
||||||
|
"minecraft:clamp": {
|
||||||
|
"protocol_id": 18
|
||||||
|
},
|
||||||
|
"minecraft:abs": {
|
||||||
|
"protocol_id": 19
|
||||||
|
},
|
||||||
|
"minecraft:square": {
|
||||||
|
"protocol_id": 20
|
||||||
|
},
|
||||||
|
"minecraft:cube": {
|
||||||
|
"protocol_id": 21
|
||||||
|
},
|
||||||
|
"minecraft:half_negative": {
|
||||||
|
"protocol_id": 22
|
||||||
|
},
|
||||||
|
"minecraft:quarter_negative": {
|
||||||
|
"protocol_id": 23
|
||||||
|
},
|
||||||
|
"minecraft:squeeze": {
|
||||||
|
"protocol_id": 24
|
||||||
|
},
|
||||||
|
"minecraft:slide": {
|
||||||
|
"protocol_id": 25
|
||||||
|
},
|
||||||
|
"minecraft:add": {
|
||||||
|
"protocol_id": 26
|
||||||
|
},
|
||||||
|
"minecraft:mul": {
|
||||||
|
"protocol_id": 27
|
||||||
|
},
|
||||||
|
"minecraft:min": {
|
||||||
|
"protocol_id": 28
|
||||||
|
},
|
||||||
|
"minecraft:max": {
|
||||||
|
"protocol_id": 29
|
||||||
|
},
|
||||||
|
"minecraft:spline": {
|
||||||
|
"protocol_id": 30
|
||||||
|
},
|
||||||
|
"minecraft:terrain_shaper_spline": {
|
||||||
|
"protocol_id": 31
|
||||||
|
},
|
||||||
|
"minecraft:constant": {
|
||||||
|
"protocol_id": 32
|
||||||
|
},
|
||||||
|
"minecraft:y_clamped_gradient": {
|
||||||
|
"protocol_id": 33
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"minecraft:worldgen/structure_processor": {
|
"minecraft:worldgen/structure_processor": {
|
||||||
"protocol_id": 53,
|
"protocol_id": 55,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:block_ignore": {
|
"minecraft:block_ignore": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
@ -13042,7 +13160,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft:worldgen/structure_pool_element": {
|
"minecraft:worldgen/structure_pool_element": {
|
||||||
"protocol_id": 54,
|
"protocol_id": 56,
|
||||||
"entries": {
|
"entries": {
|
||||||
"minecraft:single_pool_element": {
|
"minecraft:single_pool_element": {
|
||||||
"protocol_id": 0
|
"protocol_id": 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue