diff --git a/src/main/java/com/minelittlepony/api/pony/IPony.java b/src/main/java/com/minelittlepony/api/pony/IPony.java index 7db5185d..0ea98043 100644 --- a/src/main/java/com/minelittlepony/api/pony/IPony.java +++ b/src/main/java/com/minelittlepony/api/pony/IPony.java @@ -7,9 +7,9 @@ import org.jetbrains.annotations.Nullable; import com.google.common.collect.ComparisonChain; import com.minelittlepony.api.config.PonyConfig; import com.minelittlepony.api.pony.meta.Race; +import com.minelittlepony.api.pony.meta.Size; public interface IPony extends Comparable { - /** * Gets the global pony manager instance. */ @@ -46,12 +46,31 @@ public interface IPony extends Comparable { } /** - * Returns true if and only if this metadata represents a pony that can cast magic. + * @deprecated Replace with pony.race() when updating to 1.19.3 (minelp >=4.7.4) */ + @Deprecated + default Race getRace(boolean ignoreLevel) { + return ignoreLevel ? metadata().getRace() : race(); + } + + /** + * Returns true if and only if this metadata represents a pony that can cast magic. + * + * @deprecated Replace with pony.metadata().hasMagic() when updating to 1.19.4 (minelp >=4.8.0) + */ + @Deprecated default boolean hasMagic() { return race().hasHorn() && metadata().getGlowColor() != 0; } + /** + * @deprecated Replace with pony.race().hasWings() when updating to 1.19.3 (minelp >=4.7.4) + */ + @Deprecated + default boolean canFly() { + return race().hasWings(); + } + /** * Gets the texture used for rendering this pony. */ @@ -62,6 +81,21 @@ public interface IPony extends Comparable { */ IPonyData metadata(); + /** + * @deprecated Replace with pony.metadata() when updating to 1.19.3 (minelp >=4.7.4) + */ + @Deprecated + default IPonyData getMetadata() { + return metadata(); + } + + /** + * @deprecated Replace with pony.metadata().getSize() when updating to 1.19.3 (minelp >=4.7.4) + */ + @Deprecated + default Size getSize() { + return metadata().getSize(); + } @Override default int compareTo(@Nullable IPony o) { diff --git a/src/main/java/com/minelittlepony/client/MineLittlePony.java b/src/main/java/com/minelittlepony/client/MineLittlePony.java index bf7652f6..a0c47ec1 100644 --- a/src/main/java/com/minelittlepony/client/MineLittlePony.java +++ b/src/main/java/com/minelittlepony/client/MineLittlePony.java @@ -1,6 +1,7 @@ package com.minelittlepony.client; import com.minelittlepony.api.config.PonyConfig; +import com.minelittlepony.api.pony.IPonyManager; import com.minelittlepony.api.pony.network.fabric.Channel; import com.minelittlepony.client.model.ModelType; import com.minelittlepony.client.pony.PonyManager; @@ -141,7 +142,7 @@ public class MineLittlePony implements ClientModInitializer { return config; } - public PonyManager getManager() { + public IPonyManager getManager() { return ponyManager; }