mirror of
https://github.com/p2r3/bareiron.git
synced 2025-10-01 23:25:09 +02:00
precompute tag data along with registries
This commit is contained in:
@@ -572,37 +572,8 @@ int sc_registries (int client_fd) {
|
||||
printf("Sending Registries\n\n");
|
||||
send(client_fd, registries_bin, sizeof(registries_bin), 0);
|
||||
|
||||
// update water tag
|
||||
writeVarInt(client_fd, 3 + 5 + 2 + 5 + 1 + 1);
|
||||
writeByte(client_fd, 0x0D);
|
||||
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 5); // string length
|
||||
char *fluid = "fluid";
|
||||
send(client_fd, fluid, 5, 0);
|
||||
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 5); // string length
|
||||
char *water = "water";
|
||||
send(client_fd, water, 5, 0);
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 2); // protocol id
|
||||
|
||||
// update mineable/pickaxe tag
|
||||
writeVarInt(client_fd, 3 + 5 + 2 + 16 + 1 + 1);
|
||||
writeByte(client_fd, 0x0D);
|
||||
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 5); // string length
|
||||
char *block = "block";
|
||||
send(client_fd, block, 5, 0);
|
||||
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 16); // string length
|
||||
char *mineable = "mineable/pickaxe";
|
||||
send(client_fd, mineable, 16, 0);
|
||||
writeVarInt(client_fd, 1); // array length
|
||||
writeVarInt(client_fd, 1); // protocol id
|
||||
printf("Sending Tags\n\n");
|
||||
send(client_fd, tags_bin, sizeof(tags_bin), 0);
|
||||
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user