mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Fix TagsPacket
This commit is contained in:
parent
9dffc7658c
commit
f3f854feaa
@ -37,8 +37,6 @@ import net.minestom.server.event.item.PickupExperienceEvent;
|
||||
import net.minestom.server.event.player.*;
|
||||
import net.minestom.server.instance.Chunk;
|
||||
import net.minestom.server.instance.Instance;
|
||||
import net.minestom.server.message.ChatMessageType;
|
||||
import net.minestom.server.message.ChatPosition;
|
||||
import net.minestom.server.inventory.Inventory;
|
||||
import net.minestom.server.inventory.PlayerInventory;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
@ -293,7 +291,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
|
||||
// Tags
|
||||
// FIXME
|
||||
//this.playerConnection.sendPacket(TagsPacket.getRequiredTagsPacket());
|
||||
this.playerConnection.sendPacket(TagsPacket.getRequiredTagsPacket());
|
||||
|
||||
// Some client update
|
||||
this.playerConnection.sendPacket(getPropertiesPacket()); // Send default properties
|
||||
|
@ -53,9 +53,10 @@ public class TagsPacket implements ServerPacket {
|
||||
writer.writeVarInt(values.size());
|
||||
// entries
|
||||
for (NamespaceID name : values) {
|
||||
Block b = Registries.getBlock(name);
|
||||
if (b == Block.AIR && !name.toString().equals("minecraft:air")) {
|
||||
Block b = Block.fromNamespaceId(name);
|
||||
if (b == null) {
|
||||
writer.writeVarInt(-1);
|
||||
continue;
|
||||
}
|
||||
writer.writeVarInt(b.getId());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user