From 864beef341951eeee433bbc3e60e062258e7eb7e Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Mon, 5 Aug 2024 09:09:34 +0200 Subject: [PATCH] Regenerate toString() functions and remove them from protocol internals (#4072) --- .../api/minecraft/data/StructuredDataContainer.java | 2 ++ .../api/minecraft/entitydata/EntityDataType.java | 2 +- .../viaversion/api/minecraft/item/DataItem.java | 4 ++-- .../viaversion/data/entity/DimensionDataImpl.java | 5 +++-- .../v1_20to1_20_2/storage/ConfigurationState.java | 11 ----------- .../v1_9_3to1_10/storage/ResourcePackTracker.java | 7 ------- 6 files changed, 8 insertions(+), 23 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/data/StructuredDataContainer.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/data/StructuredDataContainer.java index 39b6d46ea..740994c3d 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/data/StructuredDataContainer.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/data/StructuredDataContainer.java @@ -212,6 +212,8 @@ public final class StructuredDataContainer { public String toString() { return "StructuredDataContainer{" + "data=" + data + + ", lookup=" + lookup + + ", mappedNames=" + mappedNames + '}'; } } diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/EntityDataType.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/EntityDataType.java index 988549340..f99974e42 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/EntityDataType.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/EntityDataType.java @@ -67,7 +67,7 @@ public interface EntityDataType { @Override public String toString() { - return "EntityDataType{" + + return "EntityDataTypeImpl{" + "typeId=" + typeId + ", type=" + type + '}'; diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/DataItem.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/DataItem.java index 297bd1e87..2fb87fc77 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/DataItem.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/item/DataItem.java @@ -124,11 +124,11 @@ public class DataItem implements Item { @Override public String toString() { - return "Item{" + + return "DataItem{" + "identifier=" + identifier + ", amount=" + amount + ", data=" + data + ", tag=" + tag + '}'; } -} \ No newline at end of file +} diff --git a/common/src/main/java/com/viaversion/viaversion/data/entity/DimensionDataImpl.java b/common/src/main/java/com/viaversion/viaversion/data/entity/DimensionDataImpl.java index 669191a74..207c909fe 100644 --- a/common/src/main/java/com/viaversion/viaversion/data/entity/DimensionDataImpl.java +++ b/common/src/main/java/com/viaversion/viaversion/data/entity/DimensionDataImpl.java @@ -73,8 +73,9 @@ public final class DimensionDataImpl implements DimensionData { @Override public String toString() { - return "DimensionData{" + - "minY=" + minY + + return "DimensionDataImpl{" + + "id=" + id + + ", minY=" + minY + ", height=" + height + '}'; } diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20to1_20_2/storage/ConfigurationState.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20to1_20_2/storage/ConfigurationState.java index 6baa3d879..2a865914d 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20to1_20_2/storage/ConfigurationState.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20to1_20_2/storage/ConfigurationState.java @@ -209,17 +209,6 @@ public class ConfigurationState implements StorableObject { public boolean skipCurrentPipeline() { return skipCurrentPipeline; } - - @Override - public String toString() { - return "QueuedPacket{" + - "buf=" + buf + - ", clientbound=" + clientbound + - ", packetType=" + packetType + - ", packetId=" + packetId + - ", skipCurrentPipeline=" + skipCurrentPipeline + - '}'; - } } public static final class ClientInformation { diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_9_3to1_10/storage/ResourcePackTracker.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_9_3to1_10/storage/ResourcePackTracker.java index 999a69090..68df45f41 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_9_3to1_10/storage/ResourcePackTracker.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_9_3to1_10/storage/ResourcePackTracker.java @@ -29,11 +29,4 @@ public class ResourcePackTracker implements StorableObject { public void setLastHash(String lastHash) { this.lastHash = lastHash; } - - @Override - public String toString() { - return "ResourcePackTracker{" + - "lastHash='" + lastHash + '\'' + - '}'; - } }