mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-12-17 23:48:00 +01:00
Force ponies to use the seapony model (if they have one) when they are a seapony in unicopia
This commit is contained in:
parent
e44347e8ed
commit
ea78257ffd
3 changed files with 26 additions and 0 deletions
|
@ -35,6 +35,9 @@ public class UnicopiaMixinPlugin implements IMixinConfigPlugin {
|
|||
if (mixinClassName.indexOf("ad_astra") != -1) {
|
||||
return FabricLoader.getInstance().isModLoaded("ad_astra");
|
||||
}
|
||||
if (mixinClassName.indexOf("minelp") != -1) {
|
||||
return FabricLoader.getInstance().isModLoaded("minelp");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.minelittlepony.unicopia.mixin.client.minelp;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import com.minelittlepony.api.pony.PonyPosture;
|
||||
import com.minelittlepony.unicopia.Race;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
||||
@Mixin(PonyPosture.class)
|
||||
abstract class MixinPonyPosture {
|
||||
@Inject(method = "isPartiallySubmerged", at = @At("HEAD"), cancellable = true)
|
||||
private static void isPartiallySubmerged(LivingEntity entity, CallbackInfoReturnable<Boolean> info) {
|
||||
if (Pony.of(entity).filter(pony -> pony.getCompositeRace().includes(Race.SEAPONY)).isPresent()) {
|
||||
info.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,6 +78,7 @@
|
|||
"client.MixinTranslationStorage",
|
||||
"client.MixinWorldRenderer",
|
||||
"client.sodium.MixinSodiumWorldRenderer",
|
||||
"client.minelp.MixinPonyPosture",
|
||||
"trinkets.MixinTrinketCreativeSlot"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
Loading…
Reference in a new issue