mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fix backwards compatibility with other 1.19.2 mods expecting older pony mod versions
This commit is contained in:
parent
67831d232d
commit
86b2cc16dc
2 changed files with 38 additions and 3 deletions
|
@ -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<IPony> {
|
||||
|
||||
/**
|
||||
* Gets the global pony manager instance.
|
||||
*/
|
||||
|
@ -46,12 +46,31 @@ public interface IPony extends Comparable<IPony> {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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<IPony> {
|
|||
*/
|
||||
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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue