Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Oct 25, 2024
1 parent 1b7b876 commit fbe4b47
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

package org.geysermc.geyser.entity.type.living;

import java.util.Optional;
import java.util.UUID;
import lombok.Getter;
import net.kyori.adventure.text.Component;
import org.checkerframework.checker.nullness.qual.Nullable;
Expand All @@ -49,6 +47,9 @@
import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand;
import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack;

import java.util.Optional;
import java.util.UUID;

public class ArmorStandEntity extends LivingEntity {

// These are used to store the state of the armour stand for use when handling invisibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@

package org.geysermc.geyser.translator.protocol.java.entity.player;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.protocol.bedrock.packet.PlayerListPacket;
Expand All @@ -43,6 +39,11 @@
import org.geysermc.mcprotocollib.protocol.data.game.PlayerListEntryAction;
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundPlayerInfoUpdatePacket;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;

@Translator(packet = ClientboundPlayerInfoUpdatePacket.class)
public class JavaPlayerInfoUpdateTranslator extends PacketTranslator<ClientboundPlayerInfoUpdatePacket> {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.EnumSet;
import java.util.Optional;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes;
import org.cloudburstmc.protocol.bedrock.packet.AddEntityPacket;
Expand Down Expand Up @@ -74,6 +71,10 @@
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.scoreboard.ClientboundSetPlayerTeamPacket;
import org.junit.jupiter.api.Test;

import java.util.EnumSet;
import java.util.Optional;
import java.util.UUID;

/**
* Tests for issues reported on GitHub.
*/
Expand Down Expand Up @@ -213,7 +214,7 @@ void nameNotUpdating() {
assertEquals("minecraft:armor_stand", packet.getIdentifier());
});

// invisible, custom name, custom name visible
// metadata set: invisible, custom name, custom name visible
context.translate(setEntityDataTranslator, new ClientboundSetEntityDataPacket(1298, new EntityMetadata[]{
new ByteEntityMetadata(0, MetadataType.BYTE, (byte) 0x20),
new ObjectEntityMetadata<>(2, MetadataType.OPTIONAL_CHAT, Optional.of(Component.text("tesss"))),
Expand Down

0 comments on commit fbe4b47

Please sign in to comment.