mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Some work on mannequins
This commit is contained in:
@@ -125,7 +125,7 @@ public class Entity implements GeyserEntity {
|
||||
@Setter(AccessLevel.NONE)
|
||||
private float boundingBoxWidth;
|
||||
@Setter(AccessLevel.NONE)
|
||||
private String displayName;
|
||||
protected String displayName;
|
||||
@Setter(AccessLevel.NONE)
|
||||
protected boolean silent = false;
|
||||
/* Metadata end */
|
||||
|
||||
@@ -269,13 +269,17 @@ public class AvatarEntity extends LivingEntity {
|
||||
@Override
|
||||
public void setDisplayName(EntityMetadata<Optional<Component>, ?> entityMetadata) {
|
||||
// Doesn't do anything for players
|
||||
// TODO test mannequins
|
||||
if (!(this instanceof PlayerEntity)) {
|
||||
super.setDisplayName(entityMetadata);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayNameVisible(BooleanEntityMetadata entityMetadata) {
|
||||
// Doesn't do anything for players
|
||||
// TODO test mannequins
|
||||
if (!(this instanceof PlayerEntity)) {
|
||||
super.setDisplayNameVisible(entityMetadata);
|
||||
}
|
||||
}
|
||||
|
||||
public void setBelowNameText(String text) {
|
||||
|
||||
@@ -38,14 +38,19 @@ import java.util.UUID;
|
||||
public class MannequinEntity extends AvatarEntity {
|
||||
|
||||
public MannequinEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, Vector3f position, Vector3f motion, float yaw, float pitch, float headYaw) {
|
||||
super(session, entityId, geyserId, uuid, definition, position, motion, yaw, pitch, headYaw, "Mannequin"); // TODO from translation
|
||||
super(session, entityId, geyserId, uuid, definition, position, motion, yaw, pitch, headYaw, "");
|
||||
}
|
||||
|
||||
public void setProfile(EntityMetadata<ResolvableProfile, ?> entityMetadata) {
|
||||
setSkin(entityMetadata.getValue(), true, () -> {});
|
||||
}
|
||||
|
||||
public void setDescription(EntityMetadata<Optional<Component>, ?> entityMetadata) {
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDescription(EntityMetadata<Optional<Component>, ?> entityMetadata) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user