diff --git a/src/main/java/com/minelittlepony/Pony.java b/src/main/java/com/minelittlepony/Pony.java index ace6d2c7..f4e24fd6 100644 --- a/src/main/java/com/minelittlepony/Pony.java +++ b/src/main/java/com/minelittlepony/Pony.java @@ -1,5 +1,6 @@ package com.minelittlepony; +import com.google.common.base.MoreObjects; import com.minelittlepony.model.PMAPI; import com.minelittlepony.model.PlayerModel; import com.minelittlepony.util.PonyFields; @@ -155,4 +156,12 @@ public class Pony { public PonyData getMetadata() { return metadata; } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("texture", texture) + .add("metadata", metadata) + .toString(); + } } diff --git a/src/main/java/com/minelittlepony/PonyData.java b/src/main/java/com/minelittlepony/PonyData.java index 20b67047..903ac1c2 100644 --- a/src/main/java/com/minelittlepony/PonyData.java +++ b/src/main/java/com/minelittlepony/PonyData.java @@ -1,5 +1,6 @@ package com.minelittlepony; +import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableBiMap; import java.awt.image.BufferedImage; @@ -70,6 +71,17 @@ public class PonyData implements IPonyData { return this.race != null && this.race.hasHorn() && this.glowColor != 0; } + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("race", race) + .add("tailSize", tailSize) + .add("gender", gender) + .add("size", size) + .add("glowColor", "#" + Integer.toHexString(glowColor)) + .toString(); + } + static PonyData parse(BufferedImage image) { int racePx = TriggerPixels.RACE.readColor(image); PonyRace race = RACE_COLORS.getOrDefault(racePx, PonyRace.HUMAN);