mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Re-activate MineLP integration
This commit is contained in:
parent
46706bc3fb
commit
2536872aad
3 changed files with 12 additions and 29 deletions
|
@ -52,6 +52,8 @@ dependencies {
|
||||||
|
|
||||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
|
modApi "com.minelittlepony:MineLittlePony:${project.minelp_version}"
|
||||||
|
|
||||||
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
|
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||||
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,5 @@ org.gradle.daemon=false
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.4.29+
|
fabric_version=0.4.29+
|
||||||
modmenu_version=1.8.+
|
modmenu_version=1.8.+
|
||||||
|
minelp_version=4.0.7-1.15.2
|
||||||
kirin_version=1.5.2-1.15.2
|
kirin_version=1.5.2-1.15.2
|
||||||
|
|
|
@ -1,45 +1,27 @@
|
||||||
package com.minelittlepony.unicopia.client;
|
package com.minelittlepony.unicopia.client;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.MineLittlePony;
|
||||||
import com.minelittlepony.unicopia.Race;
|
import com.minelittlepony.unicopia.Race;
|
||||||
|
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
|
||||||
public final class MineLPConnector {
|
public final class MineLPConnector {
|
||||||
private static boolean checkComplete;
|
|
||||||
private static boolean modIsActive;
|
|
||||||
|
|
||||||
// TODO: MineLP
|
|
||||||
/**
|
|
||||||
* Returns true if mine little pony is present. That's all we need.
|
|
||||||
*/
|
|
||||||
static boolean modIsActive() {
|
|
||||||
if (!checkComplete) {
|
|
||||||
try {
|
|
||||||
// MineLittlePony.instance();
|
|
||||||
|
|
||||||
// always true, but this will throw if we don't have what we need.
|
|
||||||
// modIsActive = PonyRace.HUMAN.isHuman();
|
|
||||||
} catch (Exception e) {
|
|
||||||
modIsActive = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return modIsActive;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Race getPlayerPonyRace() {
|
public static Race getPlayerPonyRace() {
|
||||||
|
if (!FabricLoader.getInstance().isModLoaded("minelp")) {
|
||||||
if (!modIsActive()) {
|
|
||||||
return Race.HUMAN;
|
return Race.HUMAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*switch (IPony.forPlayer(MinecraftClient.getInstance().player).getRace(false)) {
|
switch (MineLittlePony.getInstance().getManager().getPony(MinecraftClient.getInstance().player).getRace(false)) {
|
||||||
case ALICORN:
|
case ALICORN:
|
||||||
return Race.ALICORN;
|
return Race.ALICORN;
|
||||||
case CHANGELING:
|
case CHANGELING:
|
||||||
case REFORMED_CHANGELING:
|
case CHANGEDLING:
|
||||||
return Race.CHANGELING;
|
return Race.CHANGELING;
|
||||||
case ZEBRA:
|
case ZEBRA:
|
||||||
case EARTH:
|
case EARTH:
|
||||||
return Race.EARTH;
|
return Race.EARTH;
|
||||||
case GRIFFIN:
|
case GRYPHON:
|
||||||
case HIPPOGRIFF:
|
case HIPPOGRIFF:
|
||||||
case PEGASUS:
|
case PEGASUS:
|
||||||
case BATPONY:
|
case BATPONY:
|
||||||
|
@ -49,8 +31,6 @@ public final class MineLPConnector {
|
||||||
return Race.UNICORN;
|
return Race.UNICORN;
|
||||||
default:
|
default:
|
||||||
return Race.EARTH;
|
return Race.EARTH;
|
||||||
|
}
|
||||||
}*/
|
|
||||||
return Race.EARTH;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue