mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
*picks up house* *moves house outdoors*
This commit is contained in:
parent
01c4844596
commit
fc57875596
24 changed files with 223 additions and 74 deletions
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.client;
|
package com.minelittlepony.client;
|
||||||
|
|
||||||
import com.minelittlepony.client.hdskins.IndirectHDSkins;
|
import com.minelittlepony.client.hdskins.IndirectHDSkins;
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.pony.PonyManager;
|
import com.minelittlepony.client.pony.PonyManager;
|
||||||
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer;
|
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer;
|
||||||
import com.minelittlepony.client.settings.ClientPonyConfig;
|
import com.minelittlepony.client.settings.ClientPonyConfig;
|
||||||
|
@ -89,6 +90,8 @@ public class MineLittlePony implements ClientModInitializer {
|
||||||
if (FabricLoader.getInstance().isModLoaded("hdskins")) {
|
if (FabricLoader.getInstance().isModLoaded("hdskins")) {
|
||||||
IndirectHDSkins.initialize();
|
IndirectHDSkins.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModelType.bootstrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onClientReady(MinecraftClient client) {
|
private void onClientReady(MinecraftClient client) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.client;
|
package com.minelittlepony.client;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.minelittlepony.client.model.IPonyModel;
|
import com.minelittlepony.client.model.IPonyModel;
|
||||||
|
@ -13,6 +14,7 @@ import com.minelittlepony.client.render.IPonyRender;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.minelittlepony.common.mixin.MixinEntityRenderDispatcher;
|
import com.minelittlepony.common.mixin.MixinEntityRenderDispatcher;
|
||||||
|
import com.minelittlepony.mson.api.Mson;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
@ -79,6 +81,21 @@ public class PonyRenderManager {
|
||||||
* @param factory The replacement value
|
* @param factory The replacement value
|
||||||
* @param <T> The entity type
|
* @param <T> The entity type
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public <T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, Function<EntityRenderDispatcher, EntityRenderer<T>> factory) {
|
||||||
|
if (state) {
|
||||||
|
if (!renderMap.containsKey(type)) {
|
||||||
|
renderMap.put(type, ((MixinEntityRenderDispatcher)MinecraftClient.getInstance().getEntityRenderManager()).getEntityRenderers().get(type));
|
||||||
|
}
|
||||||
|
Mson.getInstance().getEntityRendererRegistry().registerEntityRenderer(type, factory);
|
||||||
|
} else {
|
||||||
|
if (renderMap.containsKey(type)) {
|
||||||
|
Mson.getInstance().getEntityRendererRegistry().registerEntityRenderer(type, m -> (EntityRenderer<T>)renderMap.get(type));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public <T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, EntityRendererRegistry.Factory factory) {
|
public <T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, EntityRendererRegistry.Factory factory) {
|
||||||
if (state) {
|
if (state) {
|
||||||
if (!renderMap.containsKey(type)) {
|
if (!renderMap.containsKey(type)) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IUnicorn;
|
import com.minelittlepony.model.IUnicorn;
|
||||||
import com.minelittlepony.model.ModelAttributes;
|
import com.minelittlepony.model.ModelAttributes;
|
||||||
import com.minelittlepony.model.armour.IEquestrianArmour;
|
import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.pony.IPony;
|
import com.minelittlepony.pony.IPony;
|
||||||
import com.minelittlepony.pony.IPonyData;
|
import com.minelittlepony.pony.IPonyData;
|
||||||
import com.minelittlepony.pony.meta.Size;
|
import com.minelittlepony.pony.meta.Size;
|
||||||
|
@ -17,6 +18,11 @@ public interface IPonyMixinModel<T extends LivingEntity, M extends IPonyModel<T>
|
||||||
|
|
||||||
M mixin();
|
M mixin();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default void init(ModelContext context) {
|
||||||
|
mixin().init(context);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default void updateLivingState(T entity, IPony pony) {
|
default void updateLivingState(T entity, IPony pony) {
|
||||||
mixin().updateLivingState(entity, pony);
|
mixin().updateLivingState(entity, pony);
|
||||||
|
|
|
@ -7,9 +7,10 @@ import com.minelittlepony.model.ICapitated;
|
||||||
import com.minelittlepony.model.ICompartmented;
|
import com.minelittlepony.model.ICompartmented;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.PonyModelConstants;
|
import com.minelittlepony.model.PonyModelConstants;
|
||||||
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
import com.minelittlepony.pony.IPony;
|
import com.minelittlepony.pony.IPony;
|
||||||
|
|
||||||
public interface IPonyModel<T extends LivingEntity> extends PonyModelConstants, IModel, ICapitated<ModelPart>, ICompartmented<ModelPart> {
|
public interface IPonyModel<T extends LivingEntity> extends PonyModelConstants, IModel, ICapitated<ModelPart>, ICompartmented<ModelPart>, MsonModel {
|
||||||
|
|
||||||
void updateLivingState(T entity, IPony pony);
|
void updateLivingState(T entity, IPony pony);
|
||||||
|
|
||||||
|
|
57
src/main/java/com/minelittlepony/client/model/ModelType.java
Normal file
57
src/main/java/com/minelittlepony/client/model/ModelType.java
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
package com.minelittlepony.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.Model;
|
||||||
|
import net.minecraft.entity.mob.VexEntity;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.entity.ModelBreezie;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelEnderStallion;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelGuardianPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelIllagerPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelPillagerPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelSkeletonPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelVillagerPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelWitchPony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelZombiePony;
|
||||||
|
import com.minelittlepony.client.model.entity.ModelZombieVillagerPony;
|
||||||
|
import com.minelittlepony.client.model.entity.race.ModelAlicorn;
|
||||||
|
import com.minelittlepony.client.model.entity.race.ModelChangeling;
|
||||||
|
import com.minelittlepony.client.model.entity.race.ModelPegasus;
|
||||||
|
import com.minelittlepony.client.model.entity.race.ModelUnicorn;
|
||||||
|
import com.minelittlepony.client.model.entity.race.ModelZebra;
|
||||||
|
import com.minelittlepony.mson.api.ModelKey;
|
||||||
|
import com.minelittlepony.mson.api.Mson;
|
||||||
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
public final class ModelType {
|
||||||
|
public static final ModelKey<ModelVillagerPony<?>> VILLAGER = register("villager", ModelVillagerPony::new);
|
||||||
|
public static final ModelKey<ModelWitchPony> WITCH = register("witch", ModelWitchPony::new);
|
||||||
|
public static final ModelKey<ModelZombiePony<?>> ZOMBIE = register("zombie", ModelZombiePony::new);
|
||||||
|
public static final ModelKey<ModelZombieVillagerPony> ZOMBIE_VILLAGER = register("zombie_villager", ModelZombieVillagerPony::new);
|
||||||
|
public static final ModelKey<ModelSkeletonPony<?>> SKELETON = register("skeleton", ModelSkeletonPony::new);
|
||||||
|
public static final ModelKey<ModelPillagerPony<?>> PILLAGER = register("pillager", ModelPillagerPony::new);
|
||||||
|
public static final ModelKey<ModelIllagerPony<?>> ILLAGER = register("illager", ModelIllagerPony::new);
|
||||||
|
public static final ModelKey<ModelGuardianPony> GUARDIAN = register("guardian", ModelGuardianPony::new);
|
||||||
|
public static final ModelKey<ModelEnderStallion> ENDERMAN = register("enderman", ModelEnderStallion::new);
|
||||||
|
public static final ModelKey<ModelBreezie<VexEntity>> BREEZIE = register("breezie", ModelBreezie::new);
|
||||||
|
|
||||||
|
public static final PlayerModelKey<ModelAlicorn<?>> ALICORN = registerPlayer("alicorn", ModelAlicorn::new);
|
||||||
|
public static final PlayerModelKey<ModelUnicorn<?>> UNICORN = registerPlayer("unicorn", ModelUnicorn::new);
|
||||||
|
public static final PlayerModelKey<ModelPegasus<?>> PEGASUS = registerPlayer("pegasus", ModelPegasus::new);
|
||||||
|
public static final PlayerModelKey<ModelPegasus<?>> BAT_PONY = registerPlayer("batpony", ModelPegasus::new);
|
||||||
|
public static final PlayerModelKey<ModelChangeling<?>> CHANGELING = registerPlayer("changeling", ModelChangeling::new);
|
||||||
|
public static final PlayerModelKey<ModelZebra<?>> ZEBRA = registerPlayer("zebra", ModelZebra::new);
|
||||||
|
|
||||||
|
static <T extends Model & MsonModel> PlayerModelKey<T> registerPlayer(String name, Function<Boolean, T> constructor) {
|
||||||
|
return new PlayerModelKey<>(new Identifier("minelittlepony", "races/" + name), constructor);
|
||||||
|
}
|
||||||
|
|
||||||
|
static <T extends Model & MsonModel> ModelKey<T> register(String name, Supplier<T> constructor) {
|
||||||
|
return Mson.getInstance().registerModel(new Identifier("minelittlepony", name), constructor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void bootstrap() {};
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.minelittlepony.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.Model;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.mson.api.ModelKey;
|
||||||
|
import com.minelittlepony.mson.api.Mson;
|
||||||
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
public class PlayerModelKey<T extends Model & MsonModel> {
|
||||||
|
|
||||||
|
private final ModelKey<T> key;
|
||||||
|
|
||||||
|
private boolean slim;
|
||||||
|
|
||||||
|
public final ModelKey<T> steveKey;
|
||||||
|
public final ModelKey<T> alexKey;
|
||||||
|
|
||||||
|
PlayerModelKey(Identifier id, Function<Boolean, T> factory) {
|
||||||
|
this.key = Mson.getInstance().registerModel(id, () -> factory.apply(slim));
|
||||||
|
|
||||||
|
steveKey = new Key(false);
|
||||||
|
alexKey = new Key(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public T createModel(boolean slimArms) {
|
||||||
|
return (slimArms ? alexKey : steveKey).createModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Key implements ModelKey<T> {
|
||||||
|
|
||||||
|
private final boolean slim;
|
||||||
|
|
||||||
|
public Key(boolean slim) {
|
||||||
|
this.slim = slim;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Identifier getId() {
|
||||||
|
return key.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T createModel() {
|
||||||
|
PlayerModelKey.this.slim = this.slim;
|
||||||
|
return key.createModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,11 +8,13 @@ import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
import com.minelittlepony.mson.api.model.MsonPart;
|
import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
|
|
||||||
import static com.minelittlepony.model.PonyModelConstants.PI;
|
import static com.minelittlepony.model.PonyModelConstants.PI;
|
||||||
|
|
||||||
public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
|
public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> implements MsonModel {
|
||||||
|
|
||||||
private ModelPart neck;
|
private ModelPart neck;
|
||||||
private ModelPart tail;
|
private ModelPart tail;
|
||||||
|
@ -26,6 +28,21 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
|
||||||
textureHeight = 64;
|
textureHeight = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// broken bridge
|
||||||
|
@Override
|
||||||
|
public void accept(ModelPart t) {
|
||||||
|
super.method_22696(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(ModelContext context) {
|
||||||
|
neck = context.findByName("neck");
|
||||||
|
tail = context.findByName("tail");
|
||||||
|
tailStub = context.findByName("tail_stub");
|
||||||
|
leftWing = context.findByName("left_wing");
|
||||||
|
rightWing = context.findByName("right_wing");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setVisible(boolean visible) {
|
public void setVisible(boolean visible) {
|
||||||
super.setVisible(visible);
|
super.setVisible(visible);
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
package com.minelittlepony.client.model.entity.race;
|
|
||||||
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public class ModelBatpony<T extends LivingEntity> extends ModelPegasus<T> {
|
|
||||||
public ModelBatpony(boolean smallArms) {
|
|
||||||
super(smallArms);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -25,7 +25,7 @@ public enum PlayerModels {
|
||||||
DEFAULT("default", "slim", Race.HUMAN, ModelEarthPony::new),
|
DEFAULT("default", "slim", Race.HUMAN, ModelEarthPony::new),
|
||||||
EARTHPONY(Race.EARTH, ModelEarthPony::new),
|
EARTHPONY(Race.EARTH, ModelEarthPony::new),
|
||||||
PEGASUS(Race.PEGASUS, ModelPegasus::new),
|
PEGASUS(Race.PEGASUS, ModelPegasus::new),
|
||||||
BATPONY(Race.BATPONY, ModelBatpony::new),
|
BATPONY(Race.BATPONY, ModelPegasus::new),
|
||||||
UNICORN(Race.UNICORN, ModelUnicorn::new),
|
UNICORN(Race.UNICORN, ModelUnicorn::new),
|
||||||
ALICORN(Race.ALICORN, ModelAlicorn::new),
|
ALICORN(Race.ALICORN, ModelAlicorn::new),
|
||||||
CHANGELING(Race.CHANGELING, ModelChangeling::new),
|
CHANGELING(Race.CHANGELING, ModelChangeling::new),
|
||||||
|
@ -71,10 +71,12 @@ public enum PlayerModels {
|
||||||
this.race = race;
|
this.race = race;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public PendingModel getPendingModel(boolean isSlim) {
|
public PendingModel getPendingModel(boolean isSlim) {
|
||||||
return isSlim ? slim : normal;
|
return isSlim ? slim : normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public <T extends LivingEntity, M extends IModel> ModelWrapper<T, M> getWrappedModel(boolean isSlim) {
|
public <T extends LivingEntity, M extends IModel> ModelWrapper<T, M> getWrappedModel(boolean isSlim) {
|
||||||
return getPendingModel(isSlim).getWrappedModel(isSlim);
|
return getPendingModel(isSlim).getWrappedModel(isSlim);
|
||||||
}
|
}
|
||||||
|
@ -84,13 +86,14 @@ public enum PlayerModels {
|
||||||
}
|
}
|
||||||
|
|
||||||
public RenderPonyPlayer createRenderer(EntityRenderDispatcher manager, boolean slimArms) {
|
public RenderPonyPlayer createRenderer(EntityRenderDispatcher manager, boolean slimArms) {
|
||||||
return new RenderPonyPlayer(manager, slimArms, getWrappedModel(slimArms));
|
return new RenderPonyPlayer(manager, getWrappedModel(slimArms));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerModels forRace(Race race) {
|
public static PlayerModels forRace(Race race) {
|
||||||
return raceModelsMap.getOrDefault(race.getAlias(), DEFAULT);
|
return raceModelsMap.getOrDefault(race.getAlias(), DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private final class PendingModel {
|
private final class PendingModel {
|
||||||
@Nullable
|
@Nullable
|
||||||
private ModelWrapper<?, IModel> model;
|
private ModelWrapper<?, IModel> model;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelEnderStallion;
|
import com.minelittlepony.client.model.entity.ModelEnderStallion;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerEyeGlow;
|
import com.minelittlepony.client.render.entity.feature.LayerEyeGlow;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerEyeGlow.IGlowingRenderer;
|
import com.minelittlepony.client.render.entity.feature.LayerEyeGlow.IGlowingRenderer;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
|
@ -25,8 +25,8 @@ public class RenderEnderStallion extends RenderPonyMob<EndermanEntity, ModelEnde
|
||||||
|
|
||||||
private final Random rnd = new Random();
|
private final Random rnd = new Random();
|
||||||
|
|
||||||
public RenderEnderStallion(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderEnderStallion(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelEnderStallion());
|
super(manager, ModelType.ENDERMAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,13 +3,13 @@ package com.minelittlepony.client.render.entity;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.minelittlepony.client.mixin.IResizeable;
|
import com.minelittlepony.client.mixin.IResizeable;
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelGuardianPony;
|
import com.minelittlepony.client.model.entity.ModelGuardianPony;
|
||||||
import com.minelittlepony.client.render.entity.RenderPonyMob.Proxy;
|
import com.minelittlepony.client.render.entity.RenderPonyMob.Proxy;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.render.entity.GuardianEntityRenderer;
|
import net.minecraft.client.render.entity.GuardianEntityRenderer;
|
||||||
|
@ -25,11 +25,11 @@ public class RenderPonyGuardian extends GuardianEntityRenderer {
|
||||||
|
|
||||||
private final Proxy<GuardianEntity, ModelGuardianPony> ponyRenderer;
|
private final Proxy<GuardianEntity, ModelGuardianPony> ponyRenderer;
|
||||||
|
|
||||||
public RenderPonyGuardian(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyGuardian(EntityRenderDispatcher manager) {
|
||||||
super(manager);
|
super(manager);
|
||||||
|
|
||||||
features.clear();
|
features.clear();
|
||||||
ponyRenderer = new Proxy<GuardianEntity, ModelGuardianPony>(features, manager, new ModelGuardianPony()) {
|
ponyRenderer = new Proxy<GuardianEntity, ModelGuardianPony>(features, manager, ModelType.GUARDIAN) {
|
||||||
@Override
|
@Override
|
||||||
public Identifier findTexture(GuardianEntity entity) {
|
public Identifier findTexture(GuardianEntity entity) {
|
||||||
return SEAPONY;
|
return SEAPONY;
|
||||||
|
@ -71,8 +71,8 @@ public class RenderPonyGuardian extends GuardianEntityRenderer {
|
||||||
|
|
||||||
public static class Elder extends RenderPonyGuardian {
|
public static class Elder extends RenderPonyGuardian {
|
||||||
|
|
||||||
public Elder(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Elder(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelIllagerPony;
|
import com.minelittlepony.client.model.entity.ModelIllagerPony;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldItemIllager;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldItemIllager;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
@ -23,7 +23,7 @@ public abstract class RenderPonyIllager<T extends IllagerEntity> extends RenderP
|
||||||
public static final Identifier VINDICATOR = new Identifier("minelittlepony", "textures/entity/illager/vindicator_pony.png");
|
public static final Identifier VINDICATOR = new Identifier("minelittlepony", "textures/entity/illager/vindicator_pony.png");
|
||||||
|
|
||||||
public RenderPonyIllager(EntityRenderDispatcher manager) {
|
public RenderPonyIllager(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelIllagerPony<>());
|
super(manager, ModelType.ILLAGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,7 +39,7 @@ public abstract class RenderPonyIllager<T extends IllagerEntity> extends RenderP
|
||||||
|
|
||||||
public static class Vindicator extends RenderPonyIllager<VindicatorEntity> {
|
public static class Vindicator extends RenderPonyIllager<VindicatorEntity> {
|
||||||
|
|
||||||
public Vindicator(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Vindicator(EntityRenderDispatcher manager) {
|
||||||
super(manager);
|
super(manager);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public abstract class RenderPonyIllager<T extends IllagerEntity> extends RenderP
|
||||||
|
|
||||||
public static class Evoker extends RenderPonyIllager<EvokerEntity> {
|
public static class Evoker extends RenderPonyIllager<EvokerEntity> {
|
||||||
|
|
||||||
public Evoker(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Evoker(EntityRenderDispatcher manager) {
|
||||||
super(manager);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public abstract class RenderPonyIllager<T extends IllagerEntity> extends RenderP
|
||||||
|
|
||||||
public static class Illusionist extends RenderPonyIllager<IllusionerEntity> {
|
public static class Illusionist extends RenderPonyIllager<IllusionerEntity> {
|
||||||
|
|
||||||
public Illusionist(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Illusionist(EntityRenderDispatcher manager) {
|
||||||
super(manager);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.minelittlepony.client.render.entity.feature.LayerPonyArmor;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerPonyCustomHead;
|
import com.minelittlepony.client.render.entity.feature.LayerPonyCustomHead;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerPonyElytra;
|
import com.minelittlepony.client.render.entity.feature.LayerPonyElytra;
|
||||||
import com.minelittlepony.model.IUnicorn;
|
import com.minelittlepony.model.IUnicorn;
|
||||||
|
import com.minelittlepony.mson.api.ModelKey;
|
||||||
import com.minelittlepony.pony.IPony;
|
import com.minelittlepony.pony.IPony;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
|
@ -33,8 +34,9 @@ public abstract class RenderPonyMob<T extends MobEntity, M extends EntityModel<T
|
||||||
|
|
||||||
protected RenderPony<T, M> renderPony = new RenderPony<>(this);
|
protected RenderPony<T, M> renderPony = new RenderPony<>(this);
|
||||||
|
|
||||||
public RenderPonyMob(EntityRenderDispatcher manager, M model) {
|
@SuppressWarnings("unchecked")
|
||||||
super(manager, model, 0.5F);
|
public RenderPonyMob(EntityRenderDispatcher manager, ModelKey<? super M> key) {
|
||||||
|
super(manager, (M)key.createModel(), 0.5F);
|
||||||
|
|
||||||
this.model = renderPony.setPonyModel(new ModelWrapper<>(model));
|
this.model = renderPony.setPonyModel(new ModelWrapper<>(model));
|
||||||
|
|
||||||
|
@ -123,8 +125,8 @@ public abstract class RenderPonyMob<T extends MobEntity, M extends EntityModel<T
|
||||||
|
|
||||||
public abstract static class Caster<T extends MobEntity, M extends ClientPonyModel<T> & IUnicorn<ModelPart>> extends RenderPonyMob<T, M> {
|
public abstract static class Caster<T extends MobEntity, M extends ClientPonyModel<T> & IUnicorn<ModelPart>> extends RenderPonyMob<T, M> {
|
||||||
|
|
||||||
public Caster(EntityRenderDispatcher manager, M model) {
|
public Caster(EntityRenderDispatcher manager, ModelKey<? super M> key) {
|
||||||
super(manager, model);
|
super(manager, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -136,8 +138,8 @@ public abstract class RenderPonyMob<T extends MobEntity, M extends EntityModel<T
|
||||||
public abstract static class Proxy<T extends MobEntity, M extends EntityModel<T> & IPonyModel<T>> extends RenderPonyMob<T, M> {
|
public abstract static class Proxy<T extends MobEntity, M extends EntityModel<T> & IPonyModel<T>> extends RenderPonyMob<T, M> {
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public Proxy(List exportedLayers, EntityRenderDispatcher manager, M model) {
|
public Proxy(List exportedLayers, EntityRenderDispatcher manager, ModelKey<M> key) {
|
||||||
super(manager, model);
|
super(manager, key);
|
||||||
|
|
||||||
exportedLayers.addAll(features);
|
exportedLayers.addAll(features);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.entity.mob.PillagerEntity;
|
import net.minecraft.entity.mob.PillagerEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelPillagerPony;
|
import com.minelittlepony.client.model.entity.ModelPillagerPony;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldItemIllager;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldItemIllager;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
|
@ -13,8 +13,8 @@ public class RenderPonyPillager extends RenderPonyMob<PillagerEntity, ModelPilla
|
||||||
|
|
||||||
private static final Identifier TEXTURES = new Identifier("minelittlepony", "textures/entity/illager/pillager_pony.png");
|
private static final Identifier TEXTURES = new Identifier("minelittlepony", "textures/entity/illager/pillager_pony.png");
|
||||||
|
|
||||||
public RenderPonyPillager(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyPillager(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelPillagerPony<>());
|
super(manager, ModelType.PILLAGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -38,8 +38,8 @@ public class RenderPonyPlayer extends PlayerEntityRenderer implements IPonyRende
|
||||||
|
|
||||||
protected final RenderPony<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> renderPony = new RenderPony<>(this);
|
protected final RenderPony<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> renderPony = new RenderPony<>(this);
|
||||||
|
|
||||||
public RenderPonyPlayer(EntityRenderDispatcher manager, boolean useSmallArms, ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> model) {
|
public RenderPonyPlayer(EntityRenderDispatcher manager, ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> model) {
|
||||||
super(manager, useSmallArms);
|
super(manager, false);
|
||||||
|
|
||||||
this.model = renderPony.setPonyModel(model);
|
this.model = renderPony.setPonyModel(model);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelSkeletonPony;
|
import com.minelittlepony.client.model.entity.ModelSkeletonPony;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItemMagical;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerPonyStrayOverlay;
|
import com.minelittlepony.client.render.entity.feature.LayerPonyStrayOverlay;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.AbstractSkeletonEntity;
|
import net.minecraft.entity.mob.AbstractSkeletonEntity;
|
||||||
|
@ -19,8 +19,8 @@ public class RenderPonySkeleton<Skeleton extends AbstractSkeletonEntity> extends
|
||||||
public static final Identifier WITHER = new Identifier("minelittlepony", "textures/entity/skeleton/skeleton_wither_pony.png");
|
public static final Identifier WITHER = new Identifier("minelittlepony", "textures/entity/skeleton/skeleton_wither_pony.png");
|
||||||
public static final Identifier STRAY = new Identifier("minelittlepony", "textures/entity/skeleton/stray_pony.png");
|
public static final Identifier STRAY = new Identifier("minelittlepony", "textures/entity/skeleton/stray_pony.png");
|
||||||
|
|
||||||
public RenderPonySkeleton(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonySkeleton(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelSkeletonPony<>());
|
super(manager, ModelType.SKELETON);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,8 +35,8 @@ public class RenderPonySkeleton<Skeleton extends AbstractSkeletonEntity> extends
|
||||||
|
|
||||||
public static class Stray extends RenderPonySkeleton<StrayEntity> {
|
public static class Stray extends RenderPonySkeleton<StrayEntity> {
|
||||||
|
|
||||||
public Stray(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Stray(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
addFeature(new LayerPonyStrayOverlay<>(this));
|
addFeature(new LayerPonyStrayOverlay<>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ public class RenderPonySkeleton<Skeleton extends AbstractSkeletonEntity> extends
|
||||||
|
|
||||||
public static class Wither extends RenderPonySkeleton<WitherSkeletonEntity> {
|
public static class Wither extends RenderPonySkeleton<WitherSkeletonEntity> {
|
||||||
|
|
||||||
public Wither(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Wither(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.passive.WanderingTraderEntity;
|
import net.minecraft.entity.passive.WanderingTraderEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.race.ModelAlicorn;
|
import com.minelittlepony.client.model.entity.race.ModelAlicorn;
|
||||||
|
|
||||||
public class RenderPonyTrader extends RenderPonyMob.Caster<WanderingTraderEntity, ModelAlicorn<WanderingTraderEntity>> {
|
public class RenderPonyTrader extends RenderPonyMob.Caster<WanderingTraderEntity, ModelAlicorn<WanderingTraderEntity>> {
|
||||||
|
|
||||||
public static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/entity/wandering_trader_pony.png");
|
public static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/entity/wandering_trader_pony.png");
|
||||||
|
|
||||||
public RenderPonyTrader(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyTrader(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelAlicorn<>(false));
|
super(manager, ModelType.ALICORN.steveKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.BipedEntityRenderer;
|
import net.minecraft.client.render.entity.BipedEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.VexEntity;
|
import net.minecraft.entity.mob.VexEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelBreezie;
|
import com.minelittlepony.client.model.entity.ModelBreezie;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,8 +17,8 @@ public class RenderPonyVex extends BipedEntityRenderer<VexEntity, ModelBreezie<V
|
||||||
private static final Identifier VEX = new Identifier("minelittlepony", "textures/entity/illager/vex_pony.png");
|
private static final Identifier VEX = new Identifier("minelittlepony", "textures/entity/illager/vex_pony.png");
|
||||||
private static final Identifier VEX_CHARGING = new Identifier("minelittlepony", "textures/entity/illager/vex_charging_pony.png");
|
private static final Identifier VEX_CHARGING = new Identifier("minelittlepony", "textures/entity/illager/vex_charging_pony.png");
|
||||||
|
|
||||||
public RenderPonyVex(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyVex(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelBreezie<>(), 0.3F);
|
super(manager, ModelType.BREEZIE.createModel(), 0.3F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelWitchPony;
|
import com.minelittlepony.client.model.entity.ModelWitchPony;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
import com.minelittlepony.client.render.entity.feature.LayerHeldPonyItem;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
@ -17,8 +17,8 @@ public class RenderPonyWitch extends RenderPonyMob<WitchEntity, ModelWitchPony>
|
||||||
|
|
||||||
private static final Identifier WITCH_TEXTURES = new Identifier("minelittlepony", "textures/entity/witch_pony.png");
|
private static final Identifier WITCH_TEXTURES = new Identifier("minelittlepony", "textures/entity/witch_pony.png");
|
||||||
|
|
||||||
public RenderPonyWitch(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyWitch(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelWitchPony());
|
super(manager, ModelType.WITCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.DrownedEntity;
|
import net.minecraft.entity.mob.DrownedEntity;
|
||||||
|
@ -10,6 +9,7 @@ import net.minecraft.entity.mob.ZombieEntity;
|
||||||
import net.minecraft.entity.mob.ZombiePigmanEntity;
|
import net.minecraft.entity.mob.ZombiePigmanEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelZombiePony;
|
import com.minelittlepony.client.model.entity.ModelZombiePony;
|
||||||
|
|
||||||
public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob.Caster<Zombie, ModelZombiePony<Zombie>> {
|
public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob.Caster<Zombie, ModelZombiePony<Zombie>> {
|
||||||
|
@ -19,8 +19,8 @@ public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob
|
||||||
public static final Identifier PIGMAN = new Identifier("minelittlepony", "textures/entity/zombie/zombie_pigman_pony.png");
|
public static final Identifier PIGMAN = new Identifier("minelittlepony", "textures/entity/zombie/zombie_pigman_pony.png");
|
||||||
public static final Identifier DROWNED = new Identifier("minelittlepony", "textures/entity/zombie/drowned_pony.png");
|
public static final Identifier DROWNED = new Identifier("minelittlepony", "textures/entity/zombie/drowned_pony.png");
|
||||||
|
|
||||||
public RenderPonyZombie(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyZombie(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelZombiePony<>());
|
super(manager, ModelType.ZOMBIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,8 +30,8 @@ public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob
|
||||||
|
|
||||||
public static class Drowned extends RenderPonyZombie<DrownedEntity> {
|
public static class Drowned extends RenderPonyZombie<DrownedEntity> {
|
||||||
|
|
||||||
public Drowned(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Drowned(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,8 +42,8 @@ public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob
|
||||||
|
|
||||||
public static class Pigman extends RenderPonyZombie<ZombiePigmanEntity> {
|
public static class Pigman extends RenderPonyZombie<ZombiePigmanEntity> {
|
||||||
|
|
||||||
public Pigman(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Pigman(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,8 +54,8 @@ public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob
|
||||||
|
|
||||||
public static class Husk extends RenderPonyZombie<HuskEntity> {
|
public static class Husk extends RenderPonyZombie<HuskEntity> {
|
||||||
|
|
||||||
public Husk(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Husk(EntityRenderDispatcher manager) {
|
||||||
super(manager, context);
|
super(manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -73,8 +73,8 @@ public class RenderPonyZombie<Zombie extends ZombieEntity> extends RenderPonyMob
|
||||||
|
|
||||||
public static class Giant extends RenderPonyMob.Caster<GiantEntity, ModelZombiePony<GiantEntity>> {
|
public static class Giant extends RenderPonyMob.Caster<GiantEntity, ModelZombiePony<GiantEntity>> {
|
||||||
|
|
||||||
public Giant(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public Giant(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelZombiePony<>());
|
super(manager, ModelType.ZOMBIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class RenderSeaponyPlayer extends RenderPonyPlayer {
|
||||||
public RenderSeaponyPlayer(EntityRenderDispatcher manager, boolean useSmallArms,
|
public RenderSeaponyPlayer(EntityRenderDispatcher manager, boolean useSmallArms,
|
||||||
ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> model,
|
ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> model,
|
||||||
ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> alternate) {
|
ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> alternate) {
|
||||||
super(manager, useSmallArms, model);
|
super(manager, model);
|
||||||
|
|
||||||
seapony = alternate;
|
seapony = alternate;
|
||||||
normalPony = model;
|
normalPony = model;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.minelittlepony.client.render.entity.RenderPonyMob;
|
||||||
import com.minelittlepony.client.render.entity.feature.LayerGear;
|
import com.minelittlepony.client.render.entity.feature.LayerGear;
|
||||||
import com.minelittlepony.model.IUnicorn;
|
import com.minelittlepony.model.IUnicorn;
|
||||||
import com.minelittlepony.model.gear.IGear;
|
import com.minelittlepony.model.gear.IGear;
|
||||||
|
import com.minelittlepony.mson.api.ModelKey;
|
||||||
import com.minelittlepony.util.resources.ITextureSupplier;
|
import com.minelittlepony.util.resources.ITextureSupplier;
|
||||||
|
|
||||||
abstract class AbstractVillagerRenderer<
|
abstract class AbstractVillagerRenderer<
|
||||||
|
@ -23,8 +24,8 @@ abstract class AbstractVillagerRenderer<
|
||||||
|
|
||||||
private final String entityType;
|
private final String entityType;
|
||||||
|
|
||||||
public AbstractVillagerRenderer(EntityRenderDispatcher manager, M model, String type, ITextureSupplier<String> formatter) {
|
public AbstractVillagerRenderer(EntityRenderDispatcher manager, ModelKey<? super M> key, String type, ITextureSupplier<String> formatter) {
|
||||||
super(manager, model);
|
super(manager, key);
|
||||||
|
|
||||||
entityType = type;
|
entityType = type;
|
||||||
baseTextures = new PonyTextures<>(formatter);
|
baseTextures = new PonyTextures<>(formatter);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.minelittlepony.client.render.entity.villager;
|
package com.minelittlepony.client.render.entity.villager;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelVillagerPony;
|
import com.minelittlepony.client.model.entity.ModelVillagerPony;
|
||||||
import com.minelittlepony.util.resources.ITextureSupplier;
|
import com.minelittlepony.util.resources.ITextureSupplier;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.passive.VillagerEntity;
|
import net.minecraft.entity.passive.VillagerEntity;
|
||||||
|
@ -13,8 +13,8 @@ public class RenderPonyVillager extends AbstractVillagerRenderer<VillagerEntity,
|
||||||
private static final String TYPE = "villager";
|
private static final String TYPE = "villager";
|
||||||
private static final ITextureSupplier<String> FORMATTER = ITextureSupplier.formatted("minelittlepony", "textures/entity/villager/%s.png");
|
private static final ITextureSupplier<String> FORMATTER = ITextureSupplier.formatted("minelittlepony", "textures/entity/villager/%s.png");
|
||||||
|
|
||||||
public RenderPonyVillager(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyVillager(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelVillagerPony<>(), TYPE, FORMATTER);
|
super(manager, ModelType.VILLAGER, TYPE, FORMATTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.minelittlepony.client.render.entity.villager;
|
package com.minelittlepony.client.render.entity.villager;
|
||||||
|
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ModelZombieVillagerPony;
|
import com.minelittlepony.client.model.entity.ModelZombieVillagerPony;
|
||||||
import com.minelittlepony.util.resources.ITextureSupplier;
|
import com.minelittlepony.util.resources.ITextureSupplier;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.ZombieVillagerEntity;
|
import net.minecraft.entity.mob.ZombieVillagerEntity;
|
||||||
|
@ -13,8 +13,8 @@ public class RenderPonyZombieVillager extends AbstractVillagerRenderer<ZombieVil
|
||||||
private static final String TYPE = "zombie_villager";
|
private static final String TYPE = "zombie_villager";
|
||||||
private static final ITextureSupplier<String> FORMATTER = ITextureSupplier.formatted("minelittlepony", "textures/entity/zombie_villager/zombie_%s.png");
|
private static final ITextureSupplier<String> FORMATTER = ITextureSupplier.formatted("minelittlepony", "textures/entity/zombie_villager/zombie_%s.png");
|
||||||
|
|
||||||
public RenderPonyZombieVillager(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) {
|
public RenderPonyZombieVillager(EntityRenderDispatcher manager) {
|
||||||
super(manager, new ModelZombieVillagerPony(), TYPE, FORMATTER);
|
super(manager, ModelType.ZOMBIE_VILLAGER, TYPE, FORMATTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue