From 13282898db46e0dd01569485b419f4036f7e2c81 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 20 Oct 2018 23:18:20 +0200 Subject: [PATCH] Add an interface method for getting an IPony from an already existing resource --- src/main/java/com/minelittlepony/pony/data/IPony.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/minelittlepony/pony/data/IPony.java b/src/main/java/com/minelittlepony/pony/data/IPony.java index ccc3f70c..bb1c3431 100644 --- a/src/main/java/com/minelittlepony/pony/data/IPony.java +++ b/src/main/java/com/minelittlepony/pony/data/IPony.java @@ -17,6 +17,14 @@ public interface IPony { return MineLittlePony.getInstance().getManager().getPony(player); } + /** + * Gets or creates a new pony associated with the provided resource location. + * The results of this method should not be cached. + */ + static IPony forResource(ResourceLocation texture) { + return MineLittlePony.getInstance().getManager().getPony(texture); + } + /** * Returns true if the provided entity is flying like a pegasus. * True if the entity is off the ground, has race with wings.