mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fixed hippogriffs not using the correct models
This commit is contained in:
parent
ea89829050
commit
d881fc1a5d
2 changed files with 14 additions and 9 deletions
|
@ -71,9 +71,13 @@ public final class ModelType {
|
|||
public static final PlayerModelKey<LivingEntity, KirinModel<?>> KIRIN = registerPlayer("kirin", Race.KIRIN, KirinModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, PegasusModel<?>> PEGASUS = registerPlayer("pegasus", Race.PEGASUS, PegasusModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, PegasusModel<?>> GRYPHON = registerPlayer("gryphon", Race.GRYPHON, PegasusModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, PegasusModel<?>> HIPPOGRIFF = registerPlayer("hippogriff", Race.HIPPOGRIFF, PegasusModel::new, PonyArmourModel::new, PlayerSeaponyRenderer::new);
|
||||
public static final PlayerModelKey<LivingEntity, PegasusModel<?>> HIPPOGRIFF = registerPlayer("hippogriff", Race.HIPPOGRIFF, PegasusModel::new, PonyArmourModel::new, (ctx, slim, dry) -> {
|
||||
return new PlayerSeaponyRenderer(ctx, slim, getPlayerModel(Race.SEAPONY), dry);
|
||||
});
|
||||
public static final PlayerModelKey<LivingEntity, EarthPonyModel<?>> EARTH_PONY = registerPlayer("earth_pony", Race.EARTH, EarthPonyModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, SeaponyModel<?>> SEA_PONY = registerPlayer("sea_pony", Race.SEAPONY, SeaponyModel::new, SeaponyModel.Armour::new, PlayerSeaponyRenderer::new);
|
||||
public static final PlayerModelKey<LivingEntity, SeaponyModel<?>> SEA_PONY = registerPlayer("sea_pony", Race.SEAPONY, SeaponyModel::new, SeaponyModel.Armour::new, (ctx, slim, wet) -> {
|
||||
return new PlayerSeaponyRenderer(ctx, slim, wet, getPlayerModel(Race.UNICORN));
|
||||
});
|
||||
public static final PlayerModelKey<LivingEntity, PegasusModel<?>> BAT_PONY = registerPlayer("bat_pony", Race.BATPONY, PegasusModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, ChangelingModel<?>> CHANGELING = registerPlayer("changeling", Race.CHANGELING, ChangelingModel::new);
|
||||
public static final PlayerModelKey<LivingEntity, ChangelingModel<?>> CHANGEDLING = registerPlayer("reformed_changeling", Race.CHANGEDLING, ChangelingModel::new);
|
||||
|
|
|
@ -17,15 +17,16 @@ import net.minecraft.util.Identifier;
|
|||
public class PlayerSeaponyRenderer extends PlayerPonyRenderer {
|
||||
public static final Identifier SKIN_TYPE_ID = new Identifier("minelp", "seapony");
|
||||
|
||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> seapony;
|
||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> normalPony;
|
||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> wetPony;
|
||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> dryPony;
|
||||
|
||||
public PlayerSeaponyRenderer(EntityRendererFactory.Context context, boolean slim,
|
||||
PlayerModelKey<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> key) {
|
||||
super(context, slim, key);
|
||||
PlayerModelKey<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> wetModel,
|
||||
PlayerModelKey<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> dryModel) {
|
||||
super(context, slim, wetModel);
|
||||
|
||||
normalPony = ModelType.getPlayerModel(Race.UNICORN).<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>create(slim);
|
||||
seapony = getInternalRenderer().getModelWrapper();
|
||||
dryPony = dryModel.<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>create(slim);
|
||||
wetPony = getInternalRenderer().getModelWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,7 +44,7 @@ public class PlayerSeaponyRenderer extends PlayerPonyRenderer {
|
|||
(pony.race() == Race.SEAPONY || SkinsProxy.instance.getSkin(SKIN_TYPE_ID, player).isPresent())
|
||||
&& PonyPosture.isPartiallySubmerged(player);
|
||||
|
||||
model = manager.setModel(wet ? seapony : normalPony).body();
|
||||
model = manager.setModel(wet ? wetPony : dryPony).body();
|
||||
|
||||
float state = wet ? 100 : 0;
|
||||
float interpolated = pony.metadata().getInterpolator(player.getUuid()).interpolate("seapony_state", state, 5);
|
||||
|
|
Loading…
Reference in a new issue