mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
1.16.4 -> 20w46a
This commit is contained in:
parent
9f2653ec89
commit
baf4b2a754
76 changed files with 503 additions and 412 deletions
|
@ -3,21 +3,21 @@ org.gradle.daemon=false
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.16.5
|
minecraft_version=20w46a
|
||||||
yarn_mappings=1.16.5+build.4
|
yarn_mappings=20w46a+build.15
|
||||||
loader_version=0.11.1
|
loader_version=0.10.8
|
||||||
fabric_version=0.30.3+1.16
|
fabric_version=0.26.0+1.17
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
group=com.minelittlepony
|
group=com.minelittlepony
|
||||||
displayname=Mine Little Pony
|
displayname=Mine Little Pony
|
||||||
authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace
|
authors=Verdana, Rene_Z, Mumfrey, Killjoy1221, Sollace
|
||||||
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
||||||
version=4.2.5
|
version=4.3
|
||||||
release=SNAPSHOT
|
release=SNAPSHOT
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
modmenu_version=1.14.+
|
modmenu_version=1.12.+
|
||||||
kirin_version=1.7.1-1.16.5
|
kirin_version=1.8-20w46a-SNAPSHOT
|
||||||
hd_skins_version=6.3.3-1.16.3
|
hd_skins_version=6.4-20w46a-SNAPSHOT
|
||||||
mson_version=1.2.2-1.16.5-1.16
|
mson_version=1.3.1-20w46a-SNAPSHOT
|
||||||
|
|
|
@ -27,7 +27,7 @@ abstract class MixinItemRenderer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "getDirectItemGlintConsumer(" + VertexConsumerProvider + RenderLayer + Boolean + Boolean + ")" + VertexConsumer, at = @At("HEAD"), cancellable = true)
|
@Inject(method = "getItemGlintConsumer(" + VertexConsumerProvider + RenderLayer + Boolean + Boolean + ")" + VertexConsumer, at = @At("HEAD"), cancellable = true)
|
||||||
private static void onMethod_29711(VertexConsumerProvider provider, RenderLayer layer, boolean solide, boolean glint, CallbackInfoReturnable<VertexConsumer> info) {
|
private static void onMethod_29711(VertexConsumerProvider provider, RenderLayer layer, boolean solide, boolean glint, CallbackInfoReturnable<VertexConsumer> info) {
|
||||||
if (LevitatingItemRenderer.usesTransparency()) {
|
if (LevitatingItemRenderer.usesTransparency()) {
|
||||||
info.setReturnValue(provider.getBuffer(LevitatingItemRenderer.getRenderLayer()));
|
info.setReturnValue(provider.getBuffer(LevitatingItemRenderer.getRenderLayer()));
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.minelittlepony.client.mixin;
|
||||||
|
|
||||||
import net.minecraft.block.SkullBlock;
|
import net.minecraft.block.SkullBlock;
|
||||||
import net.minecraft.block.entity.SkullBlockEntity;
|
import net.minecraft.block.entity.SkullBlockEntity;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||||
|
import net.minecraft.client.render.block.entity.SkullBlockEntityModel;
|
||||||
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
@ -12,6 +14,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer;
|
import com.minelittlepony.client.render.blockentity.skull.PonySkullRenderer;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
@ -19,26 +22,43 @@ import com.mojang.authlib.GameProfile;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
@Mixin(SkullBlockEntityRenderer.class)
|
@Mixin(SkullBlockEntityRenderer.class)
|
||||||
abstract class MixinSkullBlockEntityRenderer extends BlockEntityRenderer<SkullBlockEntity> {
|
abstract class MixinSkullBlockEntityRenderer implements BlockEntityRenderer<SkullBlockEntity> {
|
||||||
|
@Inject(method = "method_32161("
|
||||||
MixinSkullBlockEntityRenderer() { super(null); }
|
|
||||||
|
|
||||||
@Inject(method = "render("
|
|
||||||
+ "Lnet/minecraft/util/math/Direction;"
|
+ "Lnet/minecraft/util/math/Direction;"
|
||||||
+ "F"
|
+ "F"
|
||||||
+ "Lnet/minecraft/block/SkullBlock$SkullType;"
|
|
||||||
+ "Lcom/mojang/authlib/GameProfile;"
|
|
||||||
+ "F"
|
+ "F"
|
||||||
+ "Lnet/minecraft/client/util/math/MatrixStack;"
|
+ "Lnet/minecraft/client/util/math/MatrixStack;"
|
||||||
+ "Lnet/minecraft/client/render/VertexConsumerProvider;"
|
+ "Lnet/minecraft/client/render/VertexConsumerProvider;"
|
||||||
+ "I"
|
+ "I"
|
||||||
|
+ "Lnet/minecraft/client/render/block/entity/SkullBlockEntityModel;"
|
||||||
|
+ "Lnet/minecraft/client/render/RenderLayer;"
|
||||||
+ ")V", at = @At("HEAD"), cancellable = true)
|
+ ")V", at = @At("HEAD"), cancellable = true)
|
||||||
private static void onRender(@Nullable Direction direction, float angle,
|
private static void onMethod_32161(@Nullable Direction direction,
|
||||||
SkullBlock.SkullType skullType, @Nullable GameProfile profile, float poweredTicks,
|
float angle, float poweredTicks,
|
||||||
MatrixStack stack, VertexConsumerProvider renderContext, int lightUv,
|
MatrixStack stack, VertexConsumerProvider renderContext, int lightUv,
|
||||||
|
SkullBlockEntityModel model, RenderLayer layer,
|
||||||
CallbackInfo info) {
|
CallbackInfo info) {
|
||||||
if (!info.isCancelled() && PonySkullRenderer.renderPonySkull(direction, angle, skullType, profile, poweredTicks, stack, renderContext, lightUv)) {
|
|
||||||
|
if (PonySkullRenderer.INSTANCE == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!info.isCancelled() && PonySkullRenderer.INSTANCE.renderSkull(direction, angle, poweredTicks, stack, renderContext, layer, lightUv)) {
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject(method = "method_3578("
|
||||||
|
+ "Lnet/minecraft/block/SkullBlock$SkullType;"
|
||||||
|
+ "Lcom/mojang/authlib/GameProfile;"
|
||||||
|
+ ")Lnet/minecraft/client/render/RenderLayer;", at = @At("HEAD"), cancellable = true)
|
||||||
|
private static void onMethod_3578(SkullBlock.SkullType skullType, @Nullable GameProfile profile, CallbackInfoReturnable<RenderLayer> info) {
|
||||||
|
if (info.isCancelled() || PonySkullRenderer.INSTANCE == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RenderLayer result = PonySkullRenderer.INSTANCE.getRenderLayer(skullType, profile);
|
||||||
|
if (result != null) {
|
||||||
|
info.setReturnValue(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.minelittlepony.client.model.armour.ArmourWrapper;
|
||||||
import com.minelittlepony.client.transform.PonyTransformation;
|
import com.minelittlepony.client.transform.PonyTransformation;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.armour.IEquestrianArmour;
|
import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
import com.minelittlepony.mson.api.model.MsonPart;
|
import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
|
@ -30,20 +29,12 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
|
|
||||||
protected ModelPart neck;
|
protected ModelPart neck;
|
||||||
|
|
||||||
@Override
|
public AbstractPonyModel(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
super(tree);
|
||||||
super.init(context);
|
|
||||||
context.findByName("left_sleeve", leftSleeve);
|
|
||||||
context.findByName("right_sleeve", rightSleeve);
|
|
||||||
|
|
||||||
context.findByName("left_pant_leg", leftPantLeg);
|
upperTorso = tree.getChild("upper_torso");
|
||||||
context.findByName("right_pant_leg", rightPantLeg);
|
upperTorsoOverlay = tree.getChild("saddle");
|
||||||
|
neck = tree.getChild("neck");
|
||||||
context.findByName("jacket", jacket);
|
|
||||||
|
|
||||||
upperTorso = context.findByName("upper_torso");
|
|
||||||
upperTorsoOverlay = context.findByName("saddle");
|
|
||||||
neck = context.findByName("neck");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -133,10 +124,10 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
|
|
||||||
head.setPivot(1, 2, sneaking ? -1 : 1);
|
head.setPivot(1, 2, sneaking ? -1 : 1);
|
||||||
|
|
||||||
((MsonPart)rightArm).shift(0, 2, 6);
|
((MsonPart)(Object)rightArm).shift(0, 2, 6);
|
||||||
((MsonPart)leftArm).shift(0, 2, 6);
|
((MsonPart)(Object)leftArm).shift(0, 2, 6);
|
||||||
((MsonPart)rightLeg).shift(0, 2, -8);
|
((MsonPart)(Object)rightLeg).shift(0, 2, -8);
|
||||||
((MsonPart)leftLeg).shift(0, 2, -8);
|
((MsonPart)(Object)leftLeg).shift(0, 2, -8);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ponySit() {
|
protected void ponySit() {
|
||||||
|
@ -199,13 +190,13 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateWears() {
|
private void animateWears() {
|
||||||
leftSleeve.copyPositionAndRotation(leftArm);
|
leftSleeve.copyTransform(leftArm);
|
||||||
rightSleeve.copyPositionAndRotation(rightArm);
|
rightSleeve.copyTransform(rightArm);
|
||||||
leftPantLeg.copyPositionAndRotation(leftLeg);
|
leftPantLeg.copyTransform(leftLeg);
|
||||||
rightPantLeg.copyPositionAndRotation(rightLeg);
|
rightPantLeg.copyTransform(rightLeg);
|
||||||
jacket.copyPositionAndRotation(torso);
|
jacket.copyTransform(torso);
|
||||||
helmet.copyPositionAndRotation(head);
|
helmet.copyTransform(head);
|
||||||
upperTorsoOverlay.copyPositionAndRotation(upperTorso);
|
upperTorsoOverlay.copyTransform(upperTorso);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -456,6 +447,11 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
case THROW_SPEAR:
|
case THROW_SPEAR:
|
||||||
arm.pitch = ROTATE_90 * 2;
|
arm.pitch = ROTATE_90 * 2;
|
||||||
break;
|
break;
|
||||||
|
case SPYGLASS:
|
||||||
|
// TODO: SPYGLASS
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +561,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
renderStage(BodyPart.HEAD, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderHead);
|
renderStage(BodyPart.HEAD, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderHead);
|
||||||
renderStage(BodyPart.LEGS, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderLegs);
|
renderStage(BodyPart.LEGS, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderLegs);
|
||||||
|
|
||||||
if (textureHeight == 64 && getMetadata().getRace() != Race.SEAPONY) {
|
if (getMetadata().getRace() != Race.SEAPONY) {
|
||||||
renderStage(BodyPart.LEGS, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderSleeves);
|
renderStage(BodyPart.LEGS, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderSleeves);
|
||||||
renderStage(BodyPart.BODY, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderVest);
|
renderStage(BodyPart.BODY, stack, vertices, overlayUv, lightUv, red, green, blue, alpha, this::renderVest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
import com.minelittlepony.model.capabilities.fabric.PonyModelPrepareCallback;
|
import com.minelittlepony.model.capabilities.fabric.PonyModelPrepareCallback;
|
||||||
import com.minelittlepony.api.pony.IPony;
|
import com.minelittlepony.api.pony.IPony;
|
||||||
|
@ -33,6 +34,15 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends MsonPlayer
|
||||||
*/
|
*/
|
||||||
protected IPonyData metadata = PonyData.NULL;
|
protected IPonyData metadata = PonyData.NULL;
|
||||||
|
|
||||||
|
public ClientPonyModel(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Arm getPreferredArm(T livingEntity) {
|
||||||
|
Arm arm = livingEntity.getMainArm();
|
||||||
|
return livingEntity.preferredHand == Hand.MAIN_HAND ? arm : arm.getOpposite();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode) {
|
public void updateLivingState(T entity, IPony pony, EquineRenderManager.Mode mode) {
|
||||||
child = entity.isBaby();
|
child = entity.isBaby();
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
package com.minelittlepony.client.model;
|
package com.minelittlepony.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.entity.model.SkullEntityModel;
|
import net.minecraft.client.render.entity.model.SkullEntityModel;
|
||||||
|
|
||||||
import com.minelittlepony.mson.api.model.BoxBuilder;
|
|
||||||
|
|
||||||
public class DJPon3EarsModel extends SkullEntityModel {
|
public class DJPon3EarsModel extends SkullEntityModel {
|
||||||
|
|
||||||
public DJPon3EarsModel() {
|
public DJPon3EarsModel(ModelPart tree) {
|
||||||
super(24, 0, 64, 64);
|
super(tree);
|
||||||
((BoxBuilder.ContentAccessor)skull).cubes().clear();
|
|
||||||
skull.addCuboid(-9, -13, -1, 6, 6, 1, 0);
|
|
||||||
skull.addCuboid(3, -13, -1, 6, 6, 1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVisible(boolean show) {
|
public void setVisible(boolean show) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.client.model;
|
package com.minelittlepony.client.model;
|
||||||
|
|
||||||
import net.minecraft.client.model.Model;
|
import net.minecraft.client.model.Model;
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.mob.VexEntity;
|
import net.minecraft.entity.mob.VexEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -27,6 +28,7 @@ import com.minelittlepony.client.model.entity.race.PegasusModel;
|
||||||
import com.minelittlepony.client.model.entity.race.SeaponyModel;
|
import com.minelittlepony.client.model.entity.race.SeaponyModel;
|
||||||
import com.minelittlepony.client.model.entity.race.UnicornModel;
|
import com.minelittlepony.client.model.entity.race.UnicornModel;
|
||||||
import com.minelittlepony.client.model.entity.race.ZebraModel;
|
import com.minelittlepony.client.model.entity.race.ZebraModel;
|
||||||
|
import com.minelittlepony.client.model.gear.AbstractGear;
|
||||||
import com.minelittlepony.client.model.gear.ChristmasHat;
|
import com.minelittlepony.client.model.gear.ChristmasHat;
|
||||||
import com.minelittlepony.client.model.gear.Muffin;
|
import com.minelittlepony.client.model.gear.Muffin;
|
||||||
import com.minelittlepony.client.model.gear.SaddleBags;
|
import com.minelittlepony.client.model.gear.SaddleBags;
|
||||||
|
@ -43,8 +45,7 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Supplier;
|
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public final class ModelType {
|
public final class ModelType {
|
||||||
|
@ -52,6 +53,8 @@ public final class ModelType {
|
||||||
private static final Map<Race, PlayerModelKey<?, ?>> PLAYER_MODELS = new HashMap<>();
|
private static final Map<Race, PlayerModelKey<?, ?>> PLAYER_MODELS = new HashMap<>();
|
||||||
private static final Map<Wearable, ModelKey<? extends IGear>> GEAR_MODELS = new HashMap<>();
|
private static final Map<Wearable, ModelKey<? extends IGear>> GEAR_MODELS = new HashMap<>();
|
||||||
|
|
||||||
|
public static final ModelKey<DJPon3EarsModel> DJ_PON_3 = register("dj_pon_three", DJPon3EarsModel::new);
|
||||||
|
|
||||||
public static final ModelKey<VillagerPonyModel<?>> VILLAGER = register("villager", VillagerPonyModel::new);
|
public static final ModelKey<VillagerPonyModel<?>> VILLAGER = register("villager", VillagerPonyModel::new);
|
||||||
public static final ModelKey<WitchPonyModel> WITCH = register("witch", WitchPonyModel::new);
|
public static final ModelKey<WitchPonyModel> WITCH = register("witch", WitchPonyModel::new);
|
||||||
public static final ModelKey<ZomponyModel<?>> ZOMBIE = register("zombie", ZomponyModel::new);
|
public static final ModelKey<ZomponyModel<?>> ZOMBIE = register("zombie", ZomponyModel::new);
|
||||||
|
@ -91,25 +94,25 @@ public final class ModelType {
|
||||||
public static final PlayerModelKey<?, ChangelingModel<?>> CHANGEDLING = registerPlayer("reformed_changeling", Race.CHANGEDLING, ChangelingModel::new);
|
public static final PlayerModelKey<?, ChangelingModel<?>> CHANGEDLING = registerPlayer("reformed_changeling", Race.CHANGEDLING, ChangelingModel::new);
|
||||||
public static final PlayerModelKey<?, ZebraModel<?>> ZEBRA = registerPlayer("zebra", Race.ZEBRA, ZebraModel::new);
|
public static final PlayerModelKey<?, ZebraModel<?>> ZEBRA = registerPlayer("zebra", Race.ZEBRA, ZebraModel::new);
|
||||||
|
|
||||||
static <E extends LivingEntity, T extends Model & MsonModel> PlayerModelKey<E, T> registerPlayer(String name, Race race, Function<Boolean, T> constructor) {
|
static <E extends LivingEntity, T extends Model & MsonModel> PlayerModelKey<E, T> registerPlayer(String name, Race race, BiFunction<ModelPart, Boolean, T> constructor) {
|
||||||
return registerPlayer(name, race, constructor, PlayerPonyRenderer::new);
|
return registerPlayer(name, race, constructor, PlayerPonyRenderer::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
static <E extends LivingEntity, T extends Model & MsonModel> PlayerModelKey<E, T> registerPlayer(String name, Race race, Function<Boolean, T> constructor, PlayerModelKey.RendererFactory rendererFactory) {
|
static <E extends LivingEntity, T extends Model & MsonModel> PlayerModelKey<E, T> registerPlayer(String name, Race race, BiFunction<ModelPart, Boolean, T> constructor, PlayerModelKey.RendererFactory rendererFactory) {
|
||||||
return (PlayerModelKey<E, T>)PLAYER_MODELS.computeIfAbsent(race, r -> {
|
return (PlayerModelKey<E, T>)PLAYER_MODELS.computeIfAbsent(race, r -> {
|
||||||
return new PlayerModelKey<>(name, constructor, rendererFactory);
|
return new PlayerModelKey<>(name, constructor, rendererFactory);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
static <T extends IGear> ModelKey<T> registerGear(String name, Wearable wearable, Supplier<T> constructor) {
|
static <T extends AbstractGear> ModelKey<T> registerGear(String name, Wearable wearable, MsonModel.Factory<T> constructor) {
|
||||||
return (ModelKey<T>)GEAR_MODELS.computeIfAbsent(wearable, w -> {
|
return (ModelKey<T>)GEAR_MODELS.computeIfAbsent(wearable, w -> {
|
||||||
return Mson.getInstance().registerModel(new Identifier("minelittlepony", "gear/" + name), constructor);
|
return Mson.getInstance().registerModel(new Identifier("minelittlepony", "gear/" + name), constructor);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static <T extends Model & MsonModel> ModelKey<T> register(String name, Supplier<T> constructor) {
|
static <T extends Model> ModelKey<T> register(String name, MsonModel.Factory<T> constructor) {
|
||||||
return Mson.getInstance().registerModel(new Identifier("minelittlepony", name), constructor);
|
return Mson.getInstance().registerModel(new Identifier("minelittlepony", name), constructor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package com.minelittlepony.client.model;
|
package com.minelittlepony.client.model;
|
||||||
|
|
||||||
import net.minecraft.client.model.Model;
|
import net.minecraft.client.model.Model;
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -11,6 +12,7 @@ import com.minelittlepony.mson.api.ModelKey;
|
||||||
import com.minelittlepony.mson.api.Mson;
|
import com.minelittlepony.mson.api.Mson;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
|
||||||
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
public class PlayerModelKey<T extends LivingEntity, M extends Model & MsonModel> {
|
public class PlayerModelKey<T extends LivingEntity, M extends Model & MsonModel> {
|
||||||
|
@ -20,11 +22,11 @@ public class PlayerModelKey<T extends LivingEntity, M extends Model & MsonModel>
|
||||||
|
|
||||||
private final RendererFactory rendererFactory;
|
private final RendererFactory rendererFactory;
|
||||||
|
|
||||||
PlayerModelKey(String name, Function<Boolean, M> modelFactory, RendererFactory rendererFactory) {
|
PlayerModelKey(String name, BiFunction<ModelPart, Boolean, M> modelFactory, RendererFactory rendererFactory) {
|
||||||
this.rendererFactory = rendererFactory;
|
this.rendererFactory = rendererFactory;
|
||||||
|
|
||||||
steveKey = Mson.getInstance().registerModel(new Identifier("minelittlepony", "races/steve/" + name), () -> modelFactory.apply(false));
|
steveKey = Mson.getInstance().registerModel(new Identifier("minelittlepony", "races/steve/" + name), tree -> modelFactory.apply(tree, false));
|
||||||
alexKey = Mson.getInstance().registerModel(new Identifier("minelittlepony", "races/alex/" + name), () -> modelFactory.apply(true));
|
alexKey = Mson.getInstance().registerModel(new Identifier("minelittlepony", "races/alex/" + name), tree -> modelFactory.apply(tree, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModelKey<M> getKey(boolean slimArms) {
|
public ModelKey<M> getKey(boolean slimArms) {
|
||||||
|
@ -32,13 +34,13 @@ public class PlayerModelKey<T extends LivingEntity, M extends Model & MsonModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Function<EntityRenderDispatcher, PlayerEntityRenderer> getRendererFactory(boolean slimArms) {
|
public Function<EntityRendererFactory.Context, PlayerEntityRenderer> getRendererFactory(boolean slimArms) {
|
||||||
return d -> rendererFactory.create(d, slimArms, (ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>>)getKey(slimArms));
|
return d -> rendererFactory.create(d, slimArms, (ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>>)getKey(slimArms));
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface RendererFactory {
|
public interface RendererFactory {
|
||||||
PlayerEntityRenderer create(
|
PlayerEntityRenderer create(
|
||||||
EntityRenderDispatcher dispatcher,
|
EntityRendererFactory.Context context,
|
||||||
boolean slim,
|
boolean slim,
|
||||||
ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key
|
ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,25 +7,22 @@ import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
|
||||||
|
|
||||||
import static com.minelittlepony.model.PonyModelConstants.*;
|
import static com.minelittlepony.model.PonyModelConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modified from ModelElytra.
|
* Modified from ModelElytra.
|
||||||
*/
|
*/
|
||||||
public class PonyElytra<T extends LivingEntity> extends AnimalModel<T> implements MsonModel {
|
public class PonyElytra<T extends LivingEntity> extends AnimalModel<T> {
|
||||||
|
|
||||||
public boolean isSneaking;
|
public boolean isSneaking;
|
||||||
|
|
||||||
private ModelPart rightWing;
|
private final ModelPart rightWing;
|
||||||
private ModelPart leftWing;
|
private final ModelPart leftWing;
|
||||||
|
|
||||||
@Override
|
public PonyElytra(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
rightWing = tree.getChild("right_wing");
|
||||||
rightWing = context.findByName("right_wing");
|
leftWing = tree.getChild("left_wing");
|
||||||
leftWing = context.findByName("left_wing");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,10 +11,10 @@ import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.render.entity.model.SkullOverlayEntityModel;
|
import net.minecraft.client.render.entity.model.SkullEntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
public class PonySkullModel extends SkullOverlayEntityModel implements MsonModel, ICapitated<ModelPart> {
|
public class PonySkullModel extends SkullEntityModel implements MsonModel, ICapitated<ModelPart> {
|
||||||
|
|
||||||
private PonySnout snout;
|
private PonySnout snout;
|
||||||
|
|
||||||
|
@ -26,9 +26,12 @@ public class PonySkullModel extends SkullOverlayEntityModel implements MsonModel
|
||||||
|
|
||||||
public IPonyData metadata = PonyData.NULL;
|
public IPonyData metadata = PonyData.NULL;
|
||||||
|
|
||||||
|
public PonySkullModel(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
context.findByName("skull", skull);
|
|
||||||
hair = context.findByName("hair");
|
hair = context.findByName("hair");
|
||||||
snout = context.findByName("snout");
|
snout = context.findByName("snout");
|
||||||
horn = context.findByName("horn");
|
horn = context.findByName("horn");
|
||||||
|
|
|
@ -6,15 +6,14 @@ import com.minelittlepony.api.pony.IPonyData;
|
||||||
import com.minelittlepony.client.model.ModelType;
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.model.armour.ArmourLayer;
|
import com.minelittlepony.model.armour.ArmourLayer;
|
||||||
import com.minelittlepony.model.armour.IEquestrianArmour;
|
import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public class ArmourWrapper<T extends LivingEntity> implements IEquestrianArmour<PonyArmourModel<T>> {
|
public class ArmourWrapper<T extends LivingEntity> implements IEquestrianArmour<PonyArmourModel<T>> {
|
||||||
|
|
||||||
private final PonyArmourModel<T> outerLayer;
|
private final PonyArmourModel<T> outerLayer;
|
||||||
private final PonyArmourModel<T> innerLayer;
|
private final PonyArmourModel<T> innerLayer;
|
||||||
|
|
||||||
public ArmourWrapper(Supplier<PonyArmourModel<T>> supplier) {
|
public ArmourWrapper(MsonModel.Factory<PonyArmourModel<T>> supplier) {
|
||||||
outerLayer = ModelType.ARMOUR_OUTER.createModel(supplier);
|
outerLayer = ModelType.ARMOUR_OUTER.createModel(supplier);
|
||||||
innerLayer = ModelType.ARMOUR_INNER.createModel(supplier);
|
innerLayer = ModelType.ARMOUR_INNER.createModel(supplier);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ import com.minelittlepony.client.model.AbstractPonyModel;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.armour.ArmourVariant;
|
import com.minelittlepony.model.armour.ArmourVariant;
|
||||||
import com.minelittlepony.model.armour.IArmour;
|
import com.minelittlepony.model.armour.IArmour;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class PonyArmourModel<T extends LivingEntity> extends AbstractPonyModel<T> implements IArmour {
|
public class PonyArmourModel<T extends LivingEntity> extends AbstractPonyModel<T> implements IArmour {
|
||||||
|
|
||||||
|
@ -21,16 +20,11 @@ public class PonyArmourModel<T extends LivingEntity> extends AbstractPonyModel<T
|
||||||
|
|
||||||
private ArmourVariant variant = ArmourVariant.NORMAL;
|
private ArmourVariant variant = ArmourVariant.NORMAL;
|
||||||
|
|
||||||
public PonyArmourModel() {
|
public PonyArmourModel(ModelPart tree) {
|
||||||
textureHeight = 32;
|
super(tree);
|
||||||
}
|
chestPiece = tree.getChild("chestpiece");
|
||||||
|
steveRightLeg = tree.getChild("steve_right_leg");
|
||||||
@Override
|
steveLeftLeg = tree.getChild("steve_left_leg");
|
||||||
public void init(ModelContext context) {
|
|
||||||
super.init(context);
|
|
||||||
chestPiece = context.findByName("chestpiece");
|
|
||||||
steveRightLeg = context.findByName("steve_right_leg");
|
|
||||||
steveLeftLeg = context.findByName("steve_left_leg");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,17 +63,17 @@ public class PonyArmourModel<T extends LivingEntity> extends AbstractPonyModel<T
|
||||||
if (model instanceof BipedEntityModel) {
|
if (model instanceof BipedEntityModel) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
BipedEntityModel<T> mainModel = (BipedEntityModel<T>)model;
|
BipedEntityModel<T> mainModel = (BipedEntityModel<T>)model;
|
||||||
head.copyPositionAndRotation(mainModel.head);
|
head.copyTransform(mainModel.head);
|
||||||
helmet.copyPositionAndRotation(mainModel.helmet);
|
helmet.copyTransform(mainModel.helmet);
|
||||||
|
|
||||||
torso.copyPositionAndRotation(mainModel.torso);
|
torso.copyTransform(mainModel.torso);
|
||||||
rightArm.copyPositionAndRotation(mainModel.rightArm);
|
rightArm.copyTransform(mainModel.rightArm);
|
||||||
leftArm.copyPositionAndRotation(mainModel.leftArm);
|
leftArm.copyTransform(mainModel.leftArm);
|
||||||
rightLeg.copyPositionAndRotation(mainModel.rightLeg);
|
rightLeg.copyTransform(mainModel.rightLeg);
|
||||||
leftLeg.copyPositionAndRotation(mainModel.leftLeg);
|
leftLeg.copyTransform(mainModel.leftLeg);
|
||||||
|
|
||||||
steveLeftLeg.copyPositionAndRotation(mainModel.leftLeg);
|
steveLeftLeg.copyTransform(mainModel.leftLeg);
|
||||||
steveRightLeg.copyPositionAndRotation(mainModel.rightLeg);
|
steveRightLeg.copyTransform(mainModel.rightLeg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,30 @@
|
||||||
package com.minelittlepony.client.model.entity;
|
package com.minelittlepony.client.model.entity;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
|
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.MathHelper;
|
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 com.minelittlepony.mson.api.model.biped.MsonBiped;
|
|
||||||
|
|
||||||
import static com.minelittlepony.model.PonyModelConstants.PI;
|
import static com.minelittlepony.model.PonyModelConstants.PI;
|
||||||
|
|
||||||
public class BreezieModel<T extends LivingEntity> extends MsonBiped<T> implements MsonModel {
|
public class BreezieModel<T extends LivingEntity> extends BipedEntityModel<T> {
|
||||||
|
|
||||||
private ModelPart neck;
|
private ModelPart neck;
|
||||||
|
|
||||||
private ModelPart leftWing;
|
private ModelPart leftWing;
|
||||||
private ModelPart rightWing;
|
private ModelPart rightWing;
|
||||||
|
|
||||||
public BreezieModel() {
|
public BreezieModel(ModelPart tree) {
|
||||||
textureHeight = 64;
|
super(tree);
|
||||||
}
|
neck = tree.getChild("neck");
|
||||||
|
leftWing = tree.getChild("left_wing");
|
||||||
@Override
|
rightWing = tree.getChild("right_wing");
|
||||||
public void init(ModelContext context) {
|
|
||||||
super.init(context);
|
|
||||||
neck = context.findByName("neck");
|
|
||||||
leftWing = context.findByName("left_wing");
|
|
||||||
rightWing = context.findByName("right_wing");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,16 +47,16 @@ public class BreezieModel<T extends LivingEntity> extends MsonBiped<T> implement
|
||||||
leftArm.pitch = MathHelper.cos(move * 0.6662F) * swing;
|
leftArm.pitch = MathHelper.cos(move * 0.6662F) * swing;
|
||||||
leftArm.roll = 0;
|
leftArm.roll = 0;
|
||||||
|
|
||||||
((MsonPart)rightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0);
|
((MsonPart)(Object)rightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0);
|
||||||
((MsonPart)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
|
((MsonPart)(Object)leftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
|
||||||
((MsonPart)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
|
((MsonPart)(Object)rightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
|
||||||
|
|
||||||
if (riding) {
|
if (riding) {
|
||||||
leftArm.pitch += -PI / 5;
|
leftArm.pitch += -PI / 5;
|
||||||
rightArm.pitch += -PI / 5;
|
rightArm.pitch += -PI / 5;
|
||||||
|
|
||||||
rotateLegRiding((MsonPart)leftLeg, -1);
|
rotateLegRiding((MsonPart)(Object)leftLeg, -1);
|
||||||
rotateLegRiding((MsonPart)rightLeg, 1);
|
rotateLegRiding((MsonPart)(Object)rightLeg, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
rotateArm(leftArm, leftArmPose, 1);
|
rotateArm(leftArm, leftArmPose, 1);
|
||||||
|
@ -98,6 +92,12 @@ public class BreezieModel<T extends LivingEntity> extends MsonBiped<T> implement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Arm getPreferredArm(T livingEntity) {
|
||||||
|
Arm arm = livingEntity.getMainArm();
|
||||||
|
return livingEntity.preferredHand == Hand.MAIN_HAND ? arm : arm.getOpposite();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void rotateLegRiding(MsonPart leg, float factor) {
|
protected void rotateLegRiding(MsonPart leg, float factor) {
|
||||||
leg.rotate(-1.4137167F, factor * PI / 10, factor * 0.07853982F);
|
leg.rotate(-1.4137167F, factor * PI / 10, factor * 0.07853982F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,6 @@ import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.EndermanEntity;
|
import net.minecraft.entity.mob.EndermanEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class EnderStallionModel extends SkeleponyModel<EndermanEntity> {
|
public class EnderStallionModel extends SkeleponyModel<EndermanEntity> {
|
||||||
|
|
||||||
public boolean isCarrying;
|
public boolean isCarrying;
|
||||||
|
@ -16,18 +14,13 @@ public class EnderStallionModel extends SkeleponyModel<EndermanEntity> {
|
||||||
public boolean isAlicorn;
|
public boolean isAlicorn;
|
||||||
public boolean isBoss;
|
public boolean isBoss;
|
||||||
|
|
||||||
private ModelPart leftHorn;
|
private final ModelPart leftHorn;
|
||||||
private ModelPart rightHorn;
|
private final ModelPart rightHorn;
|
||||||
|
|
||||||
public EnderStallionModel() {
|
public EnderStallionModel(ModelPart tree) {
|
||||||
super();
|
super(tree);
|
||||||
}
|
leftHorn = tree.getChild("left_horn");
|
||||||
|
rightHorn = tree.getChild("right_horn");
|
||||||
@Override
|
|
||||||
public void init(ModelContext context) {
|
|
||||||
super.init(context);
|
|
||||||
leftHorn = context.findByName("left_horn");
|
|
||||||
rightHorn = context.findByName("right_horn");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,7 +11,12 @@ import com.minelittlepony.client.model.IPonyMixinModel;
|
||||||
import com.minelittlepony.client.model.entity.race.SeaponyModel;
|
import com.minelittlepony.client.model.entity.race.SeaponyModel;
|
||||||
|
|
||||||
public class GuardianPonyModel extends GuardianEntityModel implements IPonyMixinModel.Caster<GuardianEntity, SeaponyModel<GuardianEntity>, ModelPart> {
|
public class GuardianPonyModel extends GuardianEntityModel implements IPonyMixinModel.Caster<GuardianEntity, SeaponyModel<GuardianEntity>, ModelPart> {
|
||||||
private final SeaponyModel<GuardianEntity> mixin = new SeaponyModel<>();
|
private final SeaponyModel<GuardianEntity> mixin;
|
||||||
|
|
||||||
|
public GuardianPonyModel(ModelPart tree) {
|
||||||
|
super(getTexturedModelData().createModel());
|
||||||
|
mixin = new SeaponyModel<>(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAngles(GuardianEntity entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
public void setAngles(GuardianEntity entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
||||||
|
|
|
@ -9,8 +9,8 @@ import com.minelittlepony.client.model.entity.race.AlicornModel;
|
||||||
|
|
||||||
public class IllagerPonyModel<T extends IllagerEntity> extends AlicornModel<T> {
|
public class IllagerPonyModel<T extends IllagerEntity> extends AlicornModel<T> {
|
||||||
|
|
||||||
public IllagerPonyModel() {
|
public IllagerPonyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -7,10 +7,7 @@ import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.passive.StriderEntity;
|
import net.minecraft.entity.passive.StriderEntity;
|
||||||
|
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
public class ParaspriteModel extends EntityModel<StriderEntity> {
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
|
||||||
|
|
||||||
public class ParaspriteModel extends EntityModel<StriderEntity> implements MsonModel {
|
|
||||||
|
|
||||||
private ModelPart body;
|
private ModelPart body;
|
||||||
private ModelPart leftWing;
|
private ModelPart leftWing;
|
||||||
|
@ -18,18 +15,13 @@ public class ParaspriteModel extends EntityModel<StriderEntity> implements MsonM
|
||||||
|
|
||||||
private ModelPart saddle;
|
private ModelPart saddle;
|
||||||
|
|
||||||
public ParaspriteModel() {
|
public ParaspriteModel(ModelPart tree) {
|
||||||
super(RenderLayer::getEntityTranslucent);
|
super(RenderLayer::getEntityTranslucent);
|
||||||
child = false;
|
child = false;
|
||||||
textureHeight = 64;
|
body = tree.getChild("body");
|
||||||
}
|
saddle = tree.getChild("saddle");
|
||||||
|
leftWing = tree.getChild("leftWing");
|
||||||
@Override
|
rightWing = tree.getChild("rightWing");
|
||||||
public void init(ModelContext context) {
|
|
||||||
body = context.findByName("body");
|
|
||||||
saddle = context.findByName("saddle");
|
|
||||||
leftWing = context.findByName("leftWing");
|
|
||||||
rightWing = context.findByName("rightWing");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,7 +40,7 @@ public class ParaspriteModel extends EntityModel<StriderEntity> implements MsonM
|
||||||
body.yaw = headYaw * 0.017453292F;
|
body.yaw = headYaw * 0.017453292F;
|
||||||
body.pitch = headPitch * 0.017453292F;
|
body.pitch = headPitch * 0.017453292F;
|
||||||
}
|
}
|
||||||
saddle.copyPositionAndRotation(body);
|
saddle.copyTransform(body);
|
||||||
|
|
||||||
float sin = (float)Math.sin(ticks) / 2;
|
float sin = (float)Math.sin(ticks) / 2;
|
||||||
float cos = (float)Math.cos(ticks) / 3;
|
float cos = (float)Math.cos(ticks) / 3;
|
||||||
|
|
|
@ -8,20 +8,18 @@ import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import com.minelittlepony.api.pony.IPony;
|
import com.minelittlepony.api.pony.IPony;
|
||||||
import com.minelittlepony.client.render.EquineRenderManager;
|
import com.minelittlepony.client.render.EquineRenderManager;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
||||||
|
|
||||||
private PiglinActivity activity;
|
private PiglinActivity activity;
|
||||||
|
|
||||||
private ModelPart leftFlap;
|
private final ModelPart leftFlap;
|
||||||
private ModelPart rightFlap;
|
private final ModelPart rightFlap;
|
||||||
|
|
||||||
@Override
|
public PiglinPonyModel(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
super(tree);
|
||||||
super.init(context);
|
leftFlap = tree.getChild("left_flap");
|
||||||
leftFlap = context.findByName("left_flap");
|
rightFlap = tree.getChild("right_flap");
|
||||||
rightFlap = context.findByName("right_flap");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.entity;
|
package com.minelittlepony.client.model.entity;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.mob.IllagerEntity;
|
import net.minecraft.entity.mob.IllagerEntity;
|
||||||
import net.minecraft.entity.mob.PillagerEntity;
|
import net.minecraft.entity.mob.PillagerEntity;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
@ -8,8 +9,8 @@ import com.minelittlepony.client.model.entity.race.ChangelingModel;
|
||||||
|
|
||||||
public class PillagerPonyModel<T extends PillagerEntity> extends ChangelingModel<T> {
|
public class PillagerPonyModel<T extends PillagerEntity> extends ChangelingModel<T> {
|
||||||
|
|
||||||
public PillagerPonyModel() {
|
public PillagerPonyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.client.model.entity;
|
package com.minelittlepony.client.model.entity;
|
||||||
|
|
||||||
import net.minecraft.entity.mob.WitherSkeletonEntity;
|
import net.minecraft.entity.mob.WitherSkeletonEntity;
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.HostileEntity;
|
import net.minecraft.entity.mob.HostileEntity;
|
||||||
|
@ -18,8 +19,8 @@ public class SkeleponyModel<T extends HostileEntity> extends AlicornModel<T> imp
|
||||||
|
|
||||||
public boolean isWithered;
|
public boolean isWithered;
|
||||||
|
|
||||||
public SkeleponyModel() {
|
public SkeleponyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,14 +20,16 @@ import com.minelittlepony.mson.api.ModelContext;
|
||||||
|
|
||||||
public class VillagerPonyModel<T extends LivingEntity & VillagerDataContainer> extends AlicornModel<T> implements ModelWithHat {
|
public class VillagerPonyModel<T extends LivingEntity & VillagerDataContainer> extends AlicornModel<T> implements ModelWithHat {
|
||||||
|
|
||||||
private ModelPart apron;
|
private final ModelPart apron;
|
||||||
private ModelPart trinket;
|
private final ModelPart trinket;
|
||||||
|
|
||||||
private IPart batWings;
|
private IPart batWings;
|
||||||
private IPart batEars;
|
private IPart batEars;
|
||||||
|
|
||||||
public VillagerPonyModel() {
|
public VillagerPonyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
|
apron = tree.getChild("apron");
|
||||||
|
trinket = tree.getChild("trinket");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,8 +37,6 @@ public class VillagerPonyModel<T extends LivingEntity & VillagerDataContainer> e
|
||||||
super.init(context);
|
super.init(context);
|
||||||
batWings = context.findByName("bat_wings");
|
batWings = context.findByName("bat_wings");
|
||||||
batEars = context.findByName("bat_ears");
|
batEars = context.findByName("bat_ears");
|
||||||
apron = context.findByName("apron");
|
|
||||||
trinket = context.findByName("trinket");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.entity;
|
package com.minelittlepony.client.model.entity;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.mob.WitchEntity;
|
import net.minecraft.entity.mob.WitchEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -10,8 +11,8 @@ import com.minelittlepony.client.render.EquineRenderManager;
|
||||||
|
|
||||||
public class WitchPonyModel extends ZebraModel<WitchEntity> {
|
public class WitchPonyModel extends ZebraModel<WitchEntity> {
|
||||||
|
|
||||||
public WitchPonyModel() {
|
public WitchPonyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.minelittlepony.client.model.IMobModel;
|
||||||
import com.minelittlepony.client.model.entity.race.AlicornModel;
|
import com.minelittlepony.client.model.entity.race.AlicornModel;
|
||||||
import com.minelittlepony.mson.api.model.MsonPart;
|
import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.mob.HostileEntity;
|
import net.minecraft.entity.mob.HostileEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -11,8 +12,8 @@ public class ZomponyModel<Zombie extends HostileEntity> extends AlicornModel<Zom
|
||||||
|
|
||||||
private boolean isPegasus;
|
private boolean isPegasus;
|
||||||
|
|
||||||
public ZomponyModel() {
|
public ZomponyModel(ModelPart tree) {
|
||||||
super(false);
|
super(tree, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -28,10 +29,10 @@ public class ZomponyModel<Zombie extends HostileEntity> extends AlicornModel<Zom
|
||||||
if (isZombified(entity)) {
|
if (isZombified(entity)) {
|
||||||
if (islookAngleRight(move)) {
|
if (islookAngleRight(move)) {
|
||||||
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
||||||
((MsonPart)rightArm).shift(0.5F, 1.5F, 3);
|
((MsonPart)(Object)rightArm).shift(0.5F, 1.5F, 3);
|
||||||
} else {
|
} else {
|
||||||
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
||||||
((MsonPart)leftArm).shift(-0.5F, 1.5F, 3);
|
((MsonPart)(Object)leftArm).shift(-0.5F, 1.5F, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.entity;
|
package com.minelittlepony.client.model.entity;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.mob.ZombieVillagerEntity;
|
import net.minecraft.entity.mob.ZombieVillagerEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
|
@ -8,6 +9,10 @@ import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
|
|
||||||
public class ZomponyVillagerModel extends VillagerPonyModel<ZombieVillagerEntity> implements IMobModel {
|
public class ZomponyVillagerModel extends VillagerPonyModel<ZombieVillagerEntity> implements IMobModel {
|
||||||
|
|
||||||
|
public ZomponyVillagerModel(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void rotateLegs(float move, float swing, float ticks, ZombieVillagerEntity entity) {
|
protected void rotateLegs(float move, float swing, float ticks, ZombieVillagerEntity entity) {
|
||||||
super.rotateLegs(move, swing, ticks, entity);
|
super.rotateLegs(move, swing, ticks, entity);
|
||||||
|
@ -15,10 +20,10 @@ public class ZomponyVillagerModel extends VillagerPonyModel<ZombieVillagerEntity
|
||||||
if (rightArmPose == ArmPose.EMPTY) {
|
if (rightArmPose == ArmPose.EMPTY) {
|
||||||
if (islookAngleRight(move)) {
|
if (islookAngleRight(move)) {
|
||||||
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
||||||
((MsonPart)rightArm).shift(0.5F, 1.5F, 3);
|
((MsonPart)(Object)rightArm).shift(0.5F, 1.5F, 3);
|
||||||
} else {
|
} else {
|
||||||
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
||||||
((MsonPart)leftArm).shift(-0.5F, 1.5F, 3);
|
((MsonPart)(Object)leftArm).shift(-0.5F, 1.5F, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.model.IPegasus;
|
import com.minelittlepony.model.IPegasus;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
@ -12,8 +13,8 @@ public class AlicornModel<T extends LivingEntity> extends UnicornModel<T> implem
|
||||||
|
|
||||||
private IPart wings;
|
private IPart wings;
|
||||||
|
|
||||||
public AlicornModel(boolean smallArms) {
|
public AlicornModel(ModelPart tree, boolean smallArms) {
|
||||||
super(smallArms);
|
super(tree, smallArms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package com.minelittlepony.client.model.entity.race;
|
package com.minelittlepony.client.model.entity.race;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
public class ChangelingModel<T extends LivingEntity> extends AlicornModel<T> {
|
public class ChangelingModel<T extends LivingEntity> extends AlicornModel<T> {
|
||||||
|
|
||||||
public ChangelingModel(boolean smallArms) {
|
public ChangelingModel(ModelPart tree, boolean smallArms) {
|
||||||
super(smallArms);
|
super(tree, smallArms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.minelittlepony.client.model.part.PonySnout;
|
||||||
import com.minelittlepony.model.IPart;
|
import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
@ -17,7 +18,8 @@ public class EarthPonyModel<T extends LivingEntity> extends AbstractPonyModel<T>
|
||||||
protected PonySnout snout;
|
protected PonySnout snout;
|
||||||
protected IPart ears;
|
protected IPart ears;
|
||||||
|
|
||||||
public EarthPonyModel(boolean smallArms) {
|
public EarthPonyModel(ModelPart tree, boolean smallArms) {
|
||||||
|
super(tree);
|
||||||
this.smallArms = smallArms;
|
this.smallArms = smallArms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.model.IPegasus;
|
import com.minelittlepony.model.IPegasus;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
@ -12,8 +13,8 @@ public class PegasusModel<T extends LivingEntity> extends EarthPonyModel<T> impl
|
||||||
|
|
||||||
private IPart wings;
|
private IPart wings;
|
||||||
|
|
||||||
public PegasusModel(boolean smallArms) {
|
public PegasusModel(ModelPart tree, boolean smallArms) {
|
||||||
super(smallArms);
|
super(tree, smallArms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.minelittlepony.api.pony.IPony;
|
||||||
import com.minelittlepony.client.model.armour.ArmourWrapper;
|
import com.minelittlepony.client.model.armour.ArmourWrapper;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.armour.IEquestrianArmour;
|
import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
|
@ -16,28 +15,22 @@ import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
|
public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
|
||||||
|
|
||||||
private ModelPart bodyCenter;
|
private final ModelPart bodyCenter;
|
||||||
|
|
||||||
private ModelPart leftFin;
|
private final ModelPart leftFin;
|
||||||
private ModelPart centerFin;
|
private final ModelPart centerFin;
|
||||||
private ModelPart rightFin;
|
private final ModelPart rightFin;
|
||||||
|
|
||||||
public SeaponyModel(boolean smallArms) {
|
public SeaponyModel(ModelPart tree, boolean smallArms) {
|
||||||
super(smallArms);
|
super(tree, smallArms);
|
||||||
textureHeight = 64;
|
bodyCenter = tree.getChild("abdomin");
|
||||||
|
leftFin = tree.getChild("left_fin");
|
||||||
|
rightFin = tree.getChild("right_fin");
|
||||||
|
centerFin = tree.getChild("center_fin");
|
||||||
}
|
}
|
||||||
|
|
||||||
public SeaponyModel() {
|
public SeaponyModel(ModelPart tree) {
|
||||||
this(false);
|
this(tree, false);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(ModelContext context) {
|
|
||||||
super.init(context);
|
|
||||||
bodyCenter = context.findByName("abdomin");
|
|
||||||
leftFin = context.findByName("left_fin");
|
|
||||||
rightFin = context.findByName("right_fin");
|
|
||||||
centerFin = context.findByName("center_fin");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -155,6 +148,10 @@ public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
|
||||||
|
|
||||||
class Armour extends PonyArmourModel<T> {
|
class Armour extends PonyArmourModel<T> {
|
||||||
|
|
||||||
|
public Armour(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showBoots() {
|
public void showBoots() {
|
||||||
rightArm.visible = true;
|
rightArm.visible = true;
|
||||||
|
|
|
@ -18,21 +18,21 @@ import net.minecraft.util.math.MathHelper;
|
||||||
*/
|
*/
|
||||||
public class UnicornModel<T extends LivingEntity> extends EarthPonyModel<T> implements IUnicorn<ModelPart> {
|
public class UnicornModel<T extends LivingEntity> extends EarthPonyModel<T> implements IUnicorn<ModelPart> {
|
||||||
|
|
||||||
protected ModelPart unicornArmRight;
|
protected final ModelPart unicornArmRight;
|
||||||
protected ModelPart unicornArmLeft;
|
protected final ModelPart unicornArmLeft;
|
||||||
|
|
||||||
protected UnicornHorn horn;
|
protected UnicornHorn horn;
|
||||||
|
|
||||||
public UnicornModel(boolean smallArms) {
|
public UnicornModel(ModelPart tree, boolean smallArms) {
|
||||||
super(smallArms);
|
super(tree, smallArms);
|
||||||
|
unicornArmRight = tree.getChild("right_cast");
|
||||||
|
unicornArmLeft = tree.getChild("left_cast");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
super.init(context);
|
super.init(context);
|
||||||
horn = context.findByName("horn");
|
horn = context.findByName("horn");
|
||||||
unicornArmRight = context.findByName("right_cast");
|
|
||||||
unicornArmLeft = context.findByName("left_cast");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -47,8 +47,8 @@ public class UnicornModel<T extends LivingEntity> extends EarthPonyModel<T> impl
|
||||||
protected void rotateLegs(float move, float swing, float ticks, T entity) {
|
protected void rotateLegs(float move, float swing, float ticks, T entity) {
|
||||||
super.rotateLegs(move, swing, ticks, entity);
|
super.rotateLegs(move, swing, ticks, entity);
|
||||||
|
|
||||||
((MsonPart)unicornArmRight).rotate(0, 0, 0).around(-7, 12, -2);
|
((MsonPart)(Object)unicornArmRight).rotate(0, 0, 0).around(-7, 12, -2);
|
||||||
((MsonPart)unicornArmLeft).rotate(0, 0, 0).around(-7, 12, -2);
|
((MsonPart)(Object)unicornArmLeft).rotate(0, 0, 0).around(-7, 12, -2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.entity.race;
|
package com.minelittlepony.client.model.entity.race;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
|
||||||
|
@ -10,8 +11,8 @@ import com.minelittlepony.model.armour.IEquestrianArmour;
|
||||||
|
|
||||||
public class ZebraModel<T extends LivingEntity> extends EarthPonyModel<T> {
|
public class ZebraModel<T extends LivingEntity> extends EarthPonyModel<T> {
|
||||||
|
|
||||||
public ZebraModel(boolean useSmallArms) {
|
public ZebraModel(ModelPart tree, boolean useSmallArms) {
|
||||||
super(useSmallArms);
|
super(tree, useSmallArms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,6 +27,10 @@ public class ZebraModel<T extends LivingEntity> extends EarthPonyModel<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Armour extends PonyArmourModel<T> {
|
class Armour extends PonyArmourModel<T> {
|
||||||
|
public Armour(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void transform(BodyPart part, MatrixStack stack) {
|
public void transform(BodyPart part, MatrixStack stack) {
|
||||||
applyLongNeck(part, stack);
|
applyLongNeck(part, stack);
|
||||||
|
|
|
@ -7,20 +7,17 @@ import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
import com.minelittlepony.model.gear.IGear;
|
import com.minelittlepony.model.gear.IGear;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public abstract class AbstractGear extends Model implements IGear, MsonModel {
|
public abstract class AbstractGear extends Model implements IGear {
|
||||||
|
|
||||||
private final List<ModelPart> parts = new ArrayList<>();
|
private final List<ModelPart> parts = new ArrayList<>();
|
||||||
|
|
||||||
public AbstractGear() {
|
public AbstractGear() {
|
||||||
super(RenderLayer::getEntitySolid);
|
super(RenderLayer::getEntitySolid);
|
||||||
textureWidth = 64;
|
|
||||||
textureHeight = 64;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPart(ModelPart t) {
|
public void addPart(ModelPart t) {
|
||||||
|
|
|
@ -11,7 +11,6 @@ import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.common.util.Color;
|
import com.minelittlepony.common.util.Color;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -34,15 +33,14 @@ public class ChristmasHat extends AbstractGear {
|
||||||
|
|
||||||
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/antlers.png");
|
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/antlers.png");
|
||||||
|
|
||||||
private ModelPart left;
|
private final ModelPart left;
|
||||||
private ModelPart right;
|
private final ModelPart right;
|
||||||
|
|
||||||
private int tint;
|
private int tint;
|
||||||
|
|
||||||
@Override
|
public ChristmasHat(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
left = tree.getChild("left");
|
||||||
left = context.findByName("left");
|
right = tree.getChild("right");
|
||||||
right = context.findByName("right");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.gear;
|
package com.minelittlepony.client.model.gear;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -7,15 +8,13 @@ import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.gear.IStackable;
|
import com.minelittlepony.model.gear.IStackable;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class Muffin extends AbstractGear implements IStackable {
|
public class Muffin extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/muffin.png");
|
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/muffin.png");
|
||||||
|
|
||||||
@Override
|
public Muffin(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
addPart(tree.getChild("crown"));
|
||||||
addPart(context.findByName("crown"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.IPegasus;
|
import com.minelittlepony.model.IPegasus;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -20,10 +19,10 @@ public class SaddleBags extends AbstractGear {
|
||||||
|
|
||||||
public static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/saddlebags.png");
|
public static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/saddlebags.png");
|
||||||
|
|
||||||
private ModelPart leftBag;
|
private final ModelPart leftBag;
|
||||||
private ModelPart rightBag;
|
private final ModelPart rightBag;
|
||||||
|
|
||||||
private ModelPart strap;
|
private final ModelPart strap;
|
||||||
|
|
||||||
private boolean hangLow = false;
|
private boolean hangLow = false;
|
||||||
|
|
||||||
|
@ -31,11 +30,10 @@ public class SaddleBags extends AbstractGear {
|
||||||
|
|
||||||
private IModel model;
|
private IModel model;
|
||||||
|
|
||||||
@Override
|
public SaddleBags(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
strap = tree.getChild("strap");
|
||||||
strap = context.findByName("strap");
|
leftBag = tree.getChild("left_bag");
|
||||||
leftBag = context.findByName("left_bag");
|
rightBag = tree.getChild("right_bag");
|
||||||
rightBag = context.findByName("right_bag");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.gear;
|
package com.minelittlepony.client.model.gear;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -7,14 +8,12 @@ import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.gear.IStackable;
|
import com.minelittlepony.model.gear.IStackable;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class Stetson extends AbstractGear implements IStackable {
|
public class Stetson extends AbstractGear implements IStackable {
|
||||||
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/stetson.png");
|
private static final Identifier TEXTURE = new Identifier("minelittlepony", "textures/models/stetson.png");
|
||||||
|
|
||||||
@Override
|
public Stetson(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
addPart(tree.getChild("rim"));
|
||||||
addPart(context.findByName("rim"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.minelittlepony.client.model.gear;
|
package com.minelittlepony.client.model.gear;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -7,15 +8,13 @@ import com.minelittlepony.api.pony.meta.Wearable;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.gear.IStackable;
|
import com.minelittlepony.model.gear.IStackable;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
|
||||||
|
|
||||||
public class WitchHat extends AbstractGear implements IStackable {
|
public class WitchHat extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
private static final Identifier WITCH_TEXTURES = new Identifier("textures/entity/witch.png");
|
private static final Identifier WITCH_TEXTURES = new Identifier("textures/entity/witch.png");
|
||||||
|
|
||||||
@Override
|
public WitchHat(ModelPart tree) {
|
||||||
public void init(ModelContext context) {
|
addPart(tree.getChild("hat"));
|
||||||
addPart(context.findByName("hat"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.client.model.part;
|
package com.minelittlepony.client.model.part;
|
||||||
|
|
||||||
import net.minecraft.client.model.Model;
|
import net.minecraft.client.model.Model;
|
||||||
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
|
@ -10,6 +11,10 @@ import java.util.UUID;
|
||||||
|
|
||||||
public class BatWings<T extends Model & IPegasus> extends PegasusWings<T> {
|
public class BatWings<T extends Model & IPegasus> extends PegasusWings<T> {
|
||||||
|
|
||||||
|
public BatWings(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderPart(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha, UUID interpolatorId) {
|
public void renderPart(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha, UUID interpolatorId) {
|
||||||
stack.push();
|
stack.push();
|
||||||
|
@ -21,6 +26,11 @@ public class BatWings<T extends Model & IPegasus> extends PegasusWings<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Wing extends PegasusWings.Wing {
|
public static class Wing extends PegasusWings.Wing {
|
||||||
|
|
||||||
|
public Wing(ModelPart tree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rotateWalking(float swing) {
|
public void rotateWalking(float swing) {
|
||||||
folded.yaw = swing * 0.05F;
|
folded.yaw = swing * 0.05F;
|
||||||
|
|
|
@ -23,6 +23,10 @@ public class PegasusWings<T extends Model & IPegasus> implements IPart, MsonMode
|
||||||
|
|
||||||
protected Wing legacyWing;
|
protected Wing legacyWing;
|
||||||
|
|
||||||
|
public PegasusWings(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
pegasus = context.getModel();
|
pegasus = context.getModel();
|
||||||
|
@ -89,6 +93,10 @@ public class PegasusWings<T extends Model & IPegasus> implements IPart, MsonMode
|
||||||
protected ModelPart extended;
|
protected ModelPart extended;
|
||||||
protected ModelPart folded;
|
protected ModelPart folded;
|
||||||
|
|
||||||
|
public Wing(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
pegasus = context.getModel();
|
pegasus = context.getModel();
|
||||||
|
|
|
@ -7,24 +7,26 @@ import net.minecraft.client.util.math.MatrixStack;
|
||||||
import com.minelittlepony.model.IPart;
|
import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
import com.minelittlepony.mson.api.model.BoxBuilder.ContentAccessor;
|
import com.minelittlepony.mson.api.model.PartBuilder;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class PonyEars implements IPart, MsonModel {
|
public class PonyEars implements IPart, MsonModel {
|
||||||
|
|
||||||
private ModelPart right;
|
private ModelPart right;
|
||||||
private ModelPart left;
|
private ModelPart left;
|
||||||
|
|
||||||
|
public PonyEars(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
right = context.findByName("right");
|
right = context.findByName("right");
|
||||||
left = context.findByName("left");
|
left = context.findByName("left");
|
||||||
|
|
||||||
ContentAccessor head = context.getContext();
|
PartBuilder head = context.getContext();
|
||||||
head.children().add(right);
|
head.addChild("right_ear", right);
|
||||||
head.children().add(left);
|
head.addChild("left_ear", left);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,7 +10,7 @@ import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
import com.minelittlepony.mson.api.model.MsonPart;
|
import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
import com.minelittlepony.mson.api.model.BoxBuilder.ContentAccessor;
|
import com.minelittlepony.mson.api.model.PartBuilder;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -21,19 +21,23 @@ public class PonySnout implements IPart, MsonModel {
|
||||||
private ModelPart mare;
|
private ModelPart mare;
|
||||||
private ModelPart stallion;
|
private ModelPart stallion;
|
||||||
|
|
||||||
|
public PonySnout(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
mare = context.findByName("mare");
|
mare = context.findByName("mare");
|
||||||
stallion = context.findByName("stallion");
|
stallion = context.findByName("stallion");
|
||||||
|
|
||||||
ContentAccessor head = context.getContext();
|
PartBuilder head = context.getContext();
|
||||||
head.children().add(mare);
|
head.addChild("mare", mare);
|
||||||
head.children().add(stallion);
|
head.addChild("stallion", stallion);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rotate(float x, float y, float z) {
|
public void rotate(float x, float y, float z) {
|
||||||
((MsonPart)mare).rotate(x, y, z);
|
((MsonPart)(Object)mare).rotate(x, y, z);
|
||||||
((MsonPart)stallion).rotate(x, y, z);
|
((MsonPart)(Object)stallion).rotate(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,6 +10,9 @@ import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.ModelContext;
|
import com.minelittlepony.mson.api.ModelContext;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
import com.minelittlepony.mson.api.MsonModel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
|
@ -20,12 +23,16 @@ public class PonyTail implements IPart, MsonModel {
|
||||||
|
|
||||||
private int tailStop = 0;
|
private int tailStop = 0;
|
||||||
|
|
||||||
|
private final List<Segment> segments = new ArrayList<>();
|
||||||
|
|
||||||
|
public PonyTail(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
theModel = context.getModel();
|
theModel = context.getModel();
|
||||||
|
|
||||||
tail = new ModelPart(theModel);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int segments = context.getLocals().getValue("segments").get().intValue();
|
int segments = context.getLocals().getValue("segments").get().intValue();
|
||||||
|
|
||||||
|
@ -33,13 +40,16 @@ public class PonyTail implements IPart, MsonModel {
|
||||||
|
|
||||||
for (int i = 0; i < segments; i++) {
|
for (int i = 0; i < segments; i++) {
|
||||||
Segment segment = subContext.findByName("segment_" + i);
|
Segment segment = subContext.findByName("segment_" + i);
|
||||||
|
segment.tail = this;
|
||||||
segment.index = i;
|
segment.index = i;
|
||||||
tail.addChild(segment);
|
this.segments.add(segment);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tail = new ModelPart(new ArrayList<>(), new HashMap<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -90,29 +100,28 @@ public class PonyTail implements IPart, MsonModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderPart(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha, UUID interpolatorId) {
|
public void renderPart(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha, UUID interpolatorId) {
|
||||||
tail.render(stack, vertices, overlayUv, lightUv, red, green, blue, alpha);
|
stack.push();
|
||||||
|
tail.rotate(stack);
|
||||||
|
|
||||||
|
segments.forEach(segment -> segment.render(stack, vertices, overlayUv, lightUv, red, green, blue, alpha));
|
||||||
|
|
||||||
|
stack.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Segment extends ModelPart implements MsonModel {
|
public static class Segment implements MsonModel {
|
||||||
|
|
||||||
public PonyTail tail;
|
public PonyTail tail;
|
||||||
|
|
||||||
public int index;
|
public int index;
|
||||||
|
|
||||||
public Segment(ModelContext context) {
|
private final ModelPart tree;
|
||||||
super(context.getModel());
|
|
||||||
|
public Segment(ModelPart tree) {
|
||||||
|
this.tree = tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(ModelContext context) {
|
|
||||||
tail = context.getContext();
|
|
||||||
context.findByName("segment", this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(MatrixStack stack, VertexConsumer renderContext, int overlayUv, int lightUv, float red, float green, float blue, float alpha) {
|
public void render(MatrixStack stack, VertexConsumer renderContext, int overlayUv, int lightUv, float red, float green, float blue, float alpha) {
|
||||||
if (index < tail.tailStop) {
|
if (index < tail.tailStop) {
|
||||||
super.render(stack, renderContext, overlayUv, lightUv, red, green, blue, alpha);
|
tree.render(stack, renderContext, overlayUv, lightUv, red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,10 @@ public class SeaponyTail implements IPart, MsonModel {
|
||||||
|
|
||||||
private IPonyModel<?> model;
|
private IPonyModel<?> model;
|
||||||
|
|
||||||
|
public SeaponyTail(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
model = context.getModel();
|
model = context.getModel();
|
||||||
|
|
|
@ -24,6 +24,10 @@ public class UnicornHorn implements IPart, MsonModel {
|
||||||
|
|
||||||
protected boolean visible = true;
|
protected boolean visible = true;
|
||||||
|
|
||||||
|
public UnicornHorn(ModelPart tree) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
horn = context.findByName("bone");
|
horn = context.findByName("bone");
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class Pony implements IPony {
|
||||||
public boolean isFlying(LivingEntity entity) {
|
public boolean isFlying(LivingEntity entity) {
|
||||||
return !(isOnGround(entity)
|
return !(isOnGround(entity)
|
||||||
|| entity.hasVehicle()
|
|| entity.hasVehicle()
|
||||||
|| (entity.isClimbing() && !(entity instanceof PlayerEntity && ((PlayerEntity)entity).abilities.allowFlying))
|
|| (entity.isClimbing() && !(entity instanceof PlayerEntity && ((PlayerEntity)entity).getAbilities().allowFlying))
|
||||||
|| entity.isSubmergedInWater()
|
|| entity.isSubmergedInWater()
|
||||||
|| entity.isSleeping());
|
|| entity.isSleeping());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.minelittlepony.client.render;
|
||||||
|
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import net.minecraft.client.render.RenderPhase;
|
import net.minecraft.client.render.RenderPhase;
|
||||||
|
import net.minecraft.client.render.VertexFormat;
|
||||||
import net.minecraft.client.render.VertexFormats;
|
import net.minecraft.client.render.VertexFormats;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ public class MagicGlow extends RenderPhase {
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.defaultBlendFunc();
|
||||||
});
|
});
|
||||||
|
|
||||||
private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, 7, 256, RenderLayer.MultiPhaseParameters.builder()
|
private static final RenderLayer MAGIC = RenderLayer.of("mlp_magic_glow", VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL, VertexFormat.DrawMode.QUADS, 256, RenderLayer.MultiPhaseParameters.builder()
|
||||||
.texture(NO_TEXTURE)
|
.texture(NO_TEXTURE)
|
||||||
.writeMaskState(COLOR_MASK)
|
.writeMaskState(COLOR_MASK)
|
||||||
.transparency(LIGHTNING_TRANSPARENCY)
|
.transparency(LIGHTNING_TRANSPARENCY)
|
||||||
|
@ -37,7 +38,7 @@ public class MagicGlow extends RenderPhase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RenderLayer getTintedTexturedLayer(Identifier texture, float red, float green, float blue, float alpha) {
|
public static RenderLayer getTintedTexturedLayer(Identifier texture, float red, float green, float blue, float alpha) {
|
||||||
return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderLayer.MultiPhaseParameters.builder()
|
return RenderLayer.of("mlp_tint_layer", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, VertexFormat.DrawMode.QUADS, 256, true, true, RenderLayer.MultiPhaseParameters.builder()
|
||||||
.texture(new Color(texture, red, green, blue, alpha))
|
.texture(new Color(texture, red, green, blue, alpha))
|
||||||
.writeMaskState(COLOR_MASK)
|
.writeMaskState(COLOR_MASK)
|
||||||
.alpha(ONE_TENTH_ALPHA)
|
.alpha(ONE_TENTH_ALPHA)
|
||||||
|
|
|
@ -15,6 +15,7 @@ import com.minelittlepony.mson.api.Mson;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||||
import net.minecraft.client.render.entity.EntityRenderer;
|
import net.minecraft.client.render.entity.EntityRenderer;
|
||||||
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.model.EntityModel;
|
import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
|
@ -71,7 +72,7 @@ public class PonyRenderDispatcher {
|
||||||
* @param <T> The entity type
|
* @param <T> The entity type
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
<T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, Function<EntityRenderDispatcher, EntityRenderer<T>> factory) {
|
<T extends Entity, V extends T> void switchRenderer(boolean state, EntityType<V> type, Function<EntityRendererFactory.Context, EntityRenderer<T>> factory) {
|
||||||
if (state) {
|
if (state) {
|
||||||
if (!renderMap.containsKey(type)) {
|
if (!renderMap.containsKey(type)) {
|
||||||
renderMap.put(type, ((MixinEntityRenderDispatcher)MinecraftClient.getInstance().getEntityRenderDispatcher()).getEntityRenderers().get(type));
|
renderMap.put(type, ((MixinEntityRenderDispatcher)MinecraftClient.getInstance().getEntityRenderDispatcher()).getEntityRenderers().get(type));
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.minelittlepony.client.render.blockentity.skull;
|
||||||
|
|
||||||
import com.minelittlepony.client.SkinsProxy;
|
import com.minelittlepony.client.SkinsProxy;
|
||||||
import com.minelittlepony.client.model.DJPon3EarsModel;
|
import com.minelittlepony.client.model.DJPon3EarsModel;
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.settings.PonyConfig;
|
import com.minelittlepony.settings.PonyConfig;
|
||||||
import com.minelittlepony.settings.PonyLevel;
|
import com.minelittlepony.settings.PonyLevel;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
@ -16,7 +17,7 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class PonySkull extends AbstractPonySkull {
|
public class PonySkull extends AbstractPonySkull {
|
||||||
|
|
||||||
private final DJPon3EarsModel deadMau5 = new DJPon3EarsModel();
|
private final DJPon3EarsModel deadMau5 = ModelType.DJ_PON_3.createModel();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRender(PonyConfig config) {
|
public boolean canRender(PonyConfig config) {
|
||||||
|
|
|
@ -14,9 +14,10 @@ import com.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.block.SkullBlock;
|
import net.minecraft.block.SkullBlock;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.client.render.OverlayTexture;
|
import net.minecraft.client.render.OverlayTexture;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
|
||||||
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -31,7 +32,7 @@ import javax.annotation.Nullable;
|
||||||
*/
|
*/
|
||||||
public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
||||||
|
|
||||||
private static PonySkullRenderer INSTANCE;
|
public static PonySkullRenderer INSTANCE;
|
||||||
|
|
||||||
public static void resolve(boolean ponySkulls) {
|
public static void resolve(boolean ponySkulls) {
|
||||||
Mson.getInstance().getEntityRendererRegistry().registerBlockRenderer(BlockEntityType.SKULL,
|
Mson.getInstance().getEntityRendererRegistry().registerBlockRenderer(BlockEntityType.SKULL,
|
||||||
|
@ -39,6 +40,9 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ISkull selectedSkull;
|
||||||
|
private Identifier selectedSkin;
|
||||||
|
|
||||||
private final Map<SkullBlock.SkullType, ISkull> skullMap = Util.make(Maps.newHashMap(), (skullMap) -> {
|
private final Map<SkullBlock.SkullType, ISkull> skullMap = Util.make(Maps.newHashMap(), (skullMap) -> {
|
||||||
skullMap.put(SkullBlock.Type.SKELETON, new MobSkull(SkeleponyRenderer.SKELETON, MobRenderers.SKELETON));
|
skullMap.put(SkullBlock.Type.SKELETON, new MobSkull(SkeleponyRenderer.SKELETON, MobRenderers.SKELETON));
|
||||||
skullMap.put(SkullBlock.Type.WITHER_SKELETON, new MobSkull(SkeleponyRenderer.WITHER, MobRenderers.SKELETON));
|
skullMap.put(SkullBlock.Type.WITHER_SKELETON, new MobSkull(SkeleponyRenderer.WITHER, MobRenderers.SKELETON));
|
||||||
|
@ -46,34 +50,36 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
||||||
skullMap.put(SkullBlock.Type.PLAYER, new PonySkull());
|
skullMap.put(SkullBlock.Type.PLAYER, new PonySkull());
|
||||||
});
|
});
|
||||||
|
|
||||||
public PonySkullRenderer(BlockEntityRenderDispatcher dispatcher) {
|
public PonySkullRenderer(BlockEntityRendererFactory.Context context) {
|
||||||
super(dispatcher);
|
super(context);
|
||||||
|
|
||||||
INSTANCE = this;
|
INSTANCE = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderPonySkull(@Nullable Direction direction, float angle,
|
public RenderLayer getRenderLayer(SkullBlock.SkullType skullType, @Nullable GameProfile profile) {
|
||||||
SkullBlock.SkullType skullType, @Nullable GameProfile profile, float poweredTicks,
|
selectedSkull = null;
|
||||||
MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
selectedSkin = null;
|
||||||
if (INSTANCE != null) {
|
|
||||||
return INSTANCE.renderSkull(direction, angle, skullType, profile, poweredTicks, stack, renderContext, lightUv);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean renderSkull(@Nullable Direction direction, float angle,
|
|
||||||
SkullBlock.SkullType skullType, @Nullable GameProfile profile, float poweredTicks,
|
|
||||||
MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
|
||||||
|
|
||||||
ISkull skull = skullMap.get(skullType);
|
ISkull skull = skullMap.get(skullType);
|
||||||
|
|
||||||
if (skull == null || !skull.canRender(MineLittlePony.getInstance().getConfig())) {
|
if (skull == null || !skull.canRender(MineLittlePony.getInstance().getConfig())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedSkull = skull;
|
||||||
|
selectedSkin = skull.getSkinResource(profile);
|
||||||
|
return LevitatingItemRenderer.getRenderLayer(selectedSkin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean renderSkull(@Nullable Direction direction,
|
||||||
|
float angle, float poweredTicks,
|
||||||
|
MatrixStack stack, VertexConsumerProvider renderContext, RenderLayer layer,
|
||||||
|
int lightUv) {
|
||||||
|
|
||||||
|
if (selectedSkull == null || !selectedSkull.canRender(MineLittlePony.getInstance().getConfig())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Identifier skin = skull.getSkinResource(profile);
|
selectedSkull.bindPony(MineLittlePony.getInstance().getManager().getPony(selectedSkin));
|
||||||
|
|
||||||
skull.bindPony(MineLittlePony.getInstance().getManager().getPony(skin));
|
|
||||||
|
|
||||||
stack.push();
|
stack.push();
|
||||||
|
|
||||||
|
@ -81,10 +87,10 @@ public class PonySkullRenderer extends SkullBlockEntityRenderer {
|
||||||
|
|
||||||
stack.scale(-1, -1, 1);
|
stack.scale(-1, -1, 1);
|
||||||
|
|
||||||
VertexConsumer vertices = renderContext.getBuffer(LevitatingItemRenderer.getRenderLayer(skin));
|
VertexConsumer vertices = renderContext.getBuffer(layer);
|
||||||
|
|
||||||
skull.setAngles(angle, poweredTicks);
|
selectedSkull.setAngles(angle, poweredTicks);
|
||||||
skull.render(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
|
selectedSkull.render(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
|
||||||
|
|
||||||
stack.pop();
|
stack.pop();
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import com.minelittlepony.client.render.entity.feature.GlowingEyesFeature.IGlowi
|
||||||
|
|
||||||
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.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.EndermanEntity;
|
import net.minecraft.entity.mob.EndermanEntity;
|
||||||
|
@ -25,14 +25,14 @@ public class EnderStallionRenderer extends PonyRenderer<EndermanEntity, EnderSta
|
||||||
|
|
||||||
private final Random rnd = new Random();
|
private final Random rnd = new Random();
|
||||||
|
|
||||||
public EnderStallionRenderer(EntityRenderDispatcher manager) {
|
public EnderStallionRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ENDERMAN);
|
super(context, ModelType.ENDERMAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addLayers() {
|
protected void addLayers(EntityRendererFactory.Context context) {
|
||||||
addFeature(createItemHoldingLayer());
|
addFeature(createItemHoldingLayer());
|
||||||
addFeature(new StuckArrowsFeatureRenderer<>(this));
|
addFeature(new StuckArrowsFeatureRenderer<>(context, this));
|
||||||
addFeature(new GlowingEyesFeature<>(this));
|
addFeature(new GlowingEyesFeature<>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.MobEntityRenderer;
|
import net.minecraft.client.render.entity.MobEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.SaddleFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.SaddleFeatureRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
@ -17,8 +17,8 @@ public class ParaspriteRenderer extends MobEntityRenderer<StriderEntity, Paraspr
|
||||||
|
|
||||||
private static final Identifier SADDLE = new Identifier("minelittlepony", "textures/entity/strider/strider_saddle_pony.png");
|
private static final Identifier SADDLE = new Identifier("minelittlepony", "textures/entity/strider/strider_saddle_pony.png");
|
||||||
|
|
||||||
public ParaspriteRenderer(EntityRenderDispatcher dispatcher) {
|
public ParaspriteRenderer(EntityRendererFactory.Context context) {
|
||||||
super(dispatcher, ModelType.PARASPRITE.createModel(), 0.5F);
|
super(context, ModelType.PARASPRITE.createModel(), 0.5F);
|
||||||
addFeature(new SaddleFeatureRenderer<>(this, ModelType.PARASPRITE.createModel(), SADDLE));
|
addFeature(new SaddleFeatureRenderer<>(this, ModelType.PARASPRITE.createModel(), SADDLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||||
import net.minecraft.client.render.Frustum;
|
import net.minecraft.client.render.Frustum;
|
||||||
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.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
import net.minecraft.client.render.entity.PlayerEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.FeatureRenderer;
|
import net.minecraft.client.render.entity.feature.FeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
||||||
|
@ -44,25 +44,25 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
||||||
|
|
||||||
protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager = new EquineRenderManager<>(this);
|
protected final EquineRenderManager<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> manager = new EquineRenderManager<>(this);
|
||||||
|
|
||||||
public PlayerPonyRenderer(EntityRenderDispatcher dispatcher, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key) {
|
public PlayerPonyRenderer(EntityRendererFactory.Context context, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key) {
|
||||||
super(dispatcher, slim);
|
super(context, slim);
|
||||||
|
|
||||||
this.model = manager.setModel(key).getBody();
|
this.model = manager.setModel(key).getBody();
|
||||||
|
|
||||||
addLayers();
|
addLayers(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addLayers() {
|
protected void addLayers(EntityRendererFactory.Context context) {
|
||||||
features.clear();
|
features.clear();
|
||||||
|
|
||||||
addLayer(new DJPon3Feature<>(this));
|
addLayer(new DJPon3Feature<>(this));
|
||||||
addLayer(new ArmourFeature<>(this));
|
addLayer(new ArmourFeature<>(this));
|
||||||
addFeature(new StuckArrowsFeatureRenderer<>(this));
|
addFeature(new StuckArrowsFeatureRenderer<>(context, this));
|
||||||
addLayer(new SkullFeature<>(this));
|
addLayer(new SkullFeature<>(this, context.getModelLoader()));
|
||||||
addLayer(new ElytraFeature<>(this));
|
addLayer(new ElytraFeature<>(this));
|
||||||
addLayer(new GlowingItemFeature<>(this));
|
addLayer(new GlowingItemFeature<>(this));
|
||||||
addLayer(new CapeFeature<>(this));
|
addLayer(new CapeFeature<>(this));
|
||||||
addLayer(new PassengerFeature<>(this));
|
addLayer(new PassengerFeature<>(this, context));
|
||||||
addLayer(new GearFeature<>(this));
|
addLayer(new GearFeature<>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import com.minelittlepony.mson.api.ModelKey;
|
||||||
import com.minelittlepony.util.MathUtil;
|
import com.minelittlepony.util.MathUtil;
|
||||||
|
|
||||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ public class PlayerSeaponyRenderer extends PlayerPonyRenderer {
|
||||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> seapony;
|
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> seapony;
|
||||||
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> normalPony;
|
private final ModelWrapper<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> normalPony;
|
||||||
|
|
||||||
public PlayerSeaponyRenderer(EntityRenderDispatcher manager, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key) {
|
public PlayerSeaponyRenderer(EntityRendererFactory.Context context, boolean slim, ModelKey<? extends ClientPonyModel<AbstractClientPlayerEntity>> key) {
|
||||||
super(manager, slim, key);
|
super(context, slim, key);
|
||||||
|
|
||||||
normalPony = new ModelWrapper<>(ModelType.<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>getPlayerModel(Race.UNICORN).getKey(slim));
|
normalPony = new ModelWrapper<>(ModelType.<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>getPlayerModel(Race.UNICORN).getKey(slim));
|
||||||
seapony = this.manager.getModelWrapper();
|
seapony = this.manager.getModelWrapper();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.mob.AbstractPiglinEntity;
|
import net.minecraft.entity.mob.AbstractPiglinEntity;
|
||||||
|
@ -22,8 +22,8 @@ public class PonyPiglinRenderer extends PonyRenderer.Caster<HostileEntity, Pigli
|
||||||
map.put(EntityType.ZOMBIFIED_PIGLIN, new Identifier("minelittlepony", "textures/entity/piglin/zombified_piglin_pony.png"));
|
map.put(EntityType.ZOMBIFIED_PIGLIN, new Identifier("minelittlepony", "textures/entity/piglin/zombified_piglin_pony.png"));
|
||||||
});
|
});
|
||||||
|
|
||||||
public PonyPiglinRenderer(EntityRenderDispatcher manager) {
|
public PonyPiglinRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.PIGLIN);
|
super(context, ModelType.PIGLIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,7 +20,7 @@ import com.minelittlepony.mson.api.ModelKey;
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.Frustum;
|
import net.minecraft.client.render.Frustum;
|
||||||
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.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.MobEntityRenderer;
|
import net.minecraft.client.render.entity.MobEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.EntityModel;
|
import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
||||||
|
@ -36,19 +36,19 @@ public abstract class PonyRenderer<T extends MobEntity, M extends EntityModel<T>
|
||||||
|
|
||||||
protected EquineRenderManager<T, M> manager = new EquineRenderManager<>(this);
|
protected EquineRenderManager<T, M> manager = new EquineRenderManager<>(this);
|
||||||
|
|
||||||
public PonyRenderer(EntityRenderDispatcher dispatcher, ModelKey<? super M> key) {
|
public PonyRenderer(EntityRendererFactory.Context context, ModelKey<? super M> key) {
|
||||||
super(dispatcher, null, 0.5F);
|
super(context, null, 0.5F);
|
||||||
|
|
||||||
this.model = manager.setModel(key).getBody();
|
this.model = manager.setModel(key).getBody();
|
||||||
|
|
||||||
addLayers();
|
addLayers(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addLayers() {
|
protected void addLayers(EntityRendererFactory.Context context) {
|
||||||
addFeature(new ArmourFeature<>(this));
|
addFeature(new ArmourFeature<>(this));
|
||||||
addFeature(createItemHoldingLayer());
|
addFeature(createItemHoldingLayer());
|
||||||
//addFeature(new StuckArrowsFeatureRenderer<>(this));
|
//addFeature(new StuckArrowsFeatureRenderer<>(this));
|
||||||
addFeature(new SkullFeature<>(this));
|
addFeature(new SkullFeature<>(this, context.getModelLoader()));
|
||||||
addFeature(new ElytraFeature<>(this));
|
addFeature(new ElytraFeature<>(this));
|
||||||
addFeature(new GearFeature<>(this));
|
addFeature(new GearFeature<>(this));
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,8 @@ public abstract class PonyRenderer<T extends MobEntity, M extends EntityModel<T>
|
||||||
|
|
||||||
public abstract static class Caster<T extends MobEntity, M extends ClientPonyModel<T> & IUnicorn<ModelPart>> extends PonyRenderer<T, M> {
|
public abstract static class Caster<T extends MobEntity, M extends ClientPonyModel<T> & IUnicorn<ModelPart>> extends PonyRenderer<T, M> {
|
||||||
|
|
||||||
public Caster(EntityRenderDispatcher manager, ModelKey<? super M> key) {
|
public Caster(EntityRendererFactory.Context context, ModelKey<? super M> key) {
|
||||||
super(manager, key);
|
super(context, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -143,16 +143,16 @@ public abstract class PonyRenderer<T extends MobEntity, M extends EntityModel<T>
|
||||||
public abstract static class Proxy<T extends MobEntity, M extends EntityModel<T> & IPonyModel<T>> extends PonyRenderer<T, M> {
|
public abstract static class Proxy<T extends MobEntity, M extends EntityModel<T> & IPonyModel<T>> extends PonyRenderer<T, M> {
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
public Proxy(List exportedLayers, EntityRenderDispatcher manager, ModelKey<M> key) {
|
public Proxy(List exportedLayers, EntityRendererFactory.Context context, ModelKey<M> key) {
|
||||||
super(manager, key);
|
super(context, key);
|
||||||
|
|
||||||
exportedLayers.addAll(features);
|
exportedLayers.addAll(features);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addLayers() {
|
protected void addLayers(EntityRendererFactory.Context context) {
|
||||||
features.clear();
|
features.clear();
|
||||||
super.addLayers();
|
super.addLayers(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Identifier getTextureFor(T entity) {
|
public final Identifier getTextureFor(T entity) {
|
||||||
|
|
|
@ -2,13 +2,14 @@ package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.ArmorStandEntityRenderer;
|
import net.minecraft.client.render.entity.ArmorStandEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.FeatureRendererContext;
|
import net.minecraft.client.render.entity.feature.FeatureRendererContext;
|
||||||
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.model.ArmorStandArmorEntityModel;
|
import net.minecraft.client.render.entity.model.ArmorStandArmorEntityModel;
|
||||||
|
import net.minecraft.client.render.entity.model.EntityModelLayers;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||||
|
@ -23,21 +24,24 @@ import com.minelittlepony.model.armour.ArmourLayer;
|
||||||
|
|
||||||
public class PonyStandRenderer extends ArmorStandEntityRenderer {
|
public class PonyStandRenderer extends ArmorStandEntityRenderer {
|
||||||
|
|
||||||
public PonyStandRenderer(EntityRenderDispatcher entityRenderDispatcher) {
|
public PonyStandRenderer(EntityRendererFactory.Context context) {
|
||||||
super(entityRenderDispatcher);
|
super(context);
|
||||||
|
|
||||||
features.clear();
|
features.clear();
|
||||||
addFeature(new Armour(this));
|
addFeature(new Armour(this, context));
|
||||||
addFeature(new HeldItemFeatureRenderer<>(this));
|
addFeature(new HeldItemFeatureRenderer<>(this));
|
||||||
addFeature(new ElytraFeatureRenderer<>(this));
|
addFeature(new ElytraFeatureRenderer<>(this, context.getModelLoader()));
|
||||||
addFeature(new HeadFeatureRenderer<>(this));
|
addFeature(new HeadFeatureRenderer<>(this, context.getModelLoader()));
|
||||||
}
|
}
|
||||||
|
|
||||||
class Armour extends ArmorFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> {
|
class Armour extends ArmorFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> {
|
||||||
private final ModelWrapper<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = new ModelWrapper<>(ModelType.EARTH_PONY.getKey(false));
|
private final ModelWrapper<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = new ModelWrapper<>(ModelType.EARTH_PONY.getKey(false));
|
||||||
|
|
||||||
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> context) {
|
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> renderer, EntityRendererFactory.Context context) {
|
||||||
super(context, new ArmorStandArmorEntityModel(0.5F), new ArmorStandArmorEntityModel(1));
|
super(renderer,
|
||||||
|
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_INNER_ARMOR)),
|
||||||
|
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_OUTER_ARMOR))
|
||||||
|
);
|
||||||
|
|
||||||
pony.apply(new PonyData(Race.EARTH));
|
pony.apply(new PonyData(Race.EARTH));
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.minelittlepony.client.render.entity.feature.GlowingItemFeature;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
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.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.GuardianEntityRenderer;
|
import net.minecraft.client.render.entity.GuardianEntityRenderer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.EntityDimensions;
|
import net.minecraft.entity.EntityDimensions;
|
||||||
|
@ -25,11 +25,11 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
|
||||||
|
|
||||||
private final Proxy<GuardianEntity, GuardianPonyModel> ponyRenderer;
|
private final Proxy<GuardianEntity, GuardianPonyModel> ponyRenderer;
|
||||||
|
|
||||||
public SeaponyRenderer(EntityRenderDispatcher manager) {
|
public SeaponyRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
|
|
||||||
features.clear();
|
features.clear();
|
||||||
ponyRenderer = new Proxy<GuardianEntity, GuardianPonyModel>(features, manager, ModelType.GUARDIAN) {
|
ponyRenderer = new Proxy<GuardianEntity, GuardianPonyModel>(features, context, ModelType.GUARDIAN) {
|
||||||
@Override
|
@Override
|
||||||
public Identifier findTexture(GuardianEntity entity) {
|
public Identifier findTexture(GuardianEntity entity) {
|
||||||
return SEAPONY;
|
return SEAPONY;
|
||||||
|
@ -71,8 +71,8 @@ public class SeaponyRenderer extends GuardianEntityRenderer {
|
||||||
|
|
||||||
public static class Elder extends SeaponyRenderer {
|
public static class Elder extends SeaponyRenderer {
|
||||||
|
|
||||||
public Elder(EntityRenderDispatcher manager) {
|
public Elder(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
||||||
import com.minelittlepony.client.render.entity.feature.GlowingItemFeature;
|
import com.minelittlepony.client.render.entity.feature.GlowingItemFeature;
|
||||||
import com.minelittlepony.client.render.entity.feature.StrayClothingFeature;
|
import com.minelittlepony.client.render.entity.feature.StrayClothingFeature;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
import net.minecraft.entity.mob.StrayEntity;
|
import net.minecraft.entity.mob.StrayEntity;
|
||||||
|
@ -19,8 +19,8 @@ public class SkeleponyRenderer<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 SkeleponyRenderer(EntityRenderDispatcher manager) {
|
public SkeleponyRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.SKELETON);
|
super(context, ModelType.SKELETON);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,8 +35,8 @@ public class SkeleponyRenderer<Skeleton extends AbstractSkeletonEntity> extends
|
||||||
|
|
||||||
public static class Stray extends SkeleponyRenderer<StrayEntity> {
|
public static class Stray extends SkeleponyRenderer<StrayEntity> {
|
||||||
|
|
||||||
public Stray(EntityRenderDispatcher manager) {
|
public Stray(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
addFeature(new StrayClothingFeature<>(this));
|
addFeature(new StrayClothingFeature<>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ public class SkeleponyRenderer<Skeleton extends AbstractSkeletonEntity> extends
|
||||||
|
|
||||||
public static class Wither extends SkeleponyRenderer<WitherSkeletonEntity> {
|
public static class Wither extends SkeleponyRenderer<WitherSkeletonEntity> {
|
||||||
|
|
||||||
public Wither(EntityRenderDispatcher manager) {
|
public Wither(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
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.EntityRendererFactory;
|
||||||
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;
|
||||||
|
@ -17,8 +17,8 @@ public class VexRenderer extends BipedEntityRenderer<VexEntity, BreezieModel<Vex
|
||||||
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 VexRenderer(EntityRenderDispatcher manager) {
|
public VexRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.BREEZIE.createModel(), 0.3F);
|
super(context, ModelType.BREEZIE.createModel(), 0.3F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.WitchPonyModel;
|
import com.minelittlepony.client.model.entity.WitchPonyModel;
|
||||||
import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.client.util.math.Vector3f;
|
||||||
|
@ -17,8 +17,8 @@ public class WitchRenderer extends PonyRenderer<WitchEntity, WitchPonyModel> {
|
||||||
|
|
||||||
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 WitchRenderer(EntityRenderDispatcher manager) {
|
public WitchRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.WITCH);
|
super(context, ModelType.WITCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.minelittlepony.client.render.entity;
|
package com.minelittlepony.client.render.entity;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
import net.minecraft.entity.mob.GiantEntity;
|
import net.minecraft.entity.mob.GiantEntity;
|
||||||
|
@ -17,8 +17,8 @@ public class ZomponyRenderer<Zombie extends ZombieEntity> extends PonyRenderer.C
|
||||||
public static final Identifier HUSK = new Identifier("minelittlepony", "textures/entity/zombie/husk_pony.png");
|
public static final Identifier HUSK = new Identifier("minelittlepony", "textures/entity/zombie/husk_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 ZomponyRenderer(EntityRenderDispatcher manager) {
|
public ZomponyRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ZOMBIE);
|
super(context, ModelType.ZOMBIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -28,8 +28,8 @@ public class ZomponyRenderer<Zombie extends ZombieEntity> extends PonyRenderer.C
|
||||||
|
|
||||||
public static class Drowned extends ZomponyRenderer<DrownedEntity> {
|
public static class Drowned extends ZomponyRenderer<DrownedEntity> {
|
||||||
|
|
||||||
public Drowned(EntityRenderDispatcher manager) {
|
public Drowned(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,8 +40,8 @@ public class ZomponyRenderer<Zombie extends ZombieEntity> extends PonyRenderer.C
|
||||||
|
|
||||||
public static class Husk extends ZomponyRenderer<HuskEntity> {
|
public static class Husk extends ZomponyRenderer<HuskEntity> {
|
||||||
|
|
||||||
public Husk(EntityRenderDispatcher manager) {
|
public Husk(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,8 +59,8 @@ public class ZomponyRenderer<Zombie extends ZombieEntity> extends PonyRenderer.C
|
||||||
|
|
||||||
public static class Giant extends PonyRenderer.Caster<GiantEntity, ZomponyModel<GiantEntity>> {
|
public static class Giant extends PonyRenderer.Caster<GiantEntity, ZomponyModel<GiantEntity>> {
|
||||||
|
|
||||||
public Giant(EntityRenderDispatcher manager) {
|
public Giant(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ZOMBIE);
|
super(context, ModelType.ZOMBIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -8,13 +8,14 @@ import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
import com.minelittlepony.client.model.IPonyModel;
|
import com.minelittlepony.client.model.IPonyModel;
|
||||||
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.DJPon3EarsModel;
|
import com.minelittlepony.client.model.DJPon3EarsModel;
|
||||||
import com.minelittlepony.client.render.IPonyRenderContext;
|
import com.minelittlepony.client.render.IPonyRenderContext;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
|
|
||||||
public class DJPon3Feature<T extends AbstractClientPlayerEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
public class DJPon3Feature<T extends AbstractClientPlayerEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
||||||
|
|
||||||
private final DJPon3EarsModel deadMau5 = new DJPon3EarsModel();
|
private final DJPon3EarsModel deadMau5 = ModelType.DJ_PON_3.createModel();
|
||||||
|
|
||||||
public DJPon3Feature(IPonyRenderContext<T, M> context) {
|
public DJPon3Feature(IPonyRenderContext<T, M> context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
|
@ -3,7 +3,9 @@ package com.minelittlepony.client.render.entity.feature;
|
||||||
import net.minecraft.client.render.OverlayTexture;
|
import net.minecraft.client.render.OverlayTexture;
|
||||||
import net.minecraft.client.render.VertexConsumer;
|
import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.ParrotEntityRenderer;
|
import net.minecraft.client.render.entity.ParrotEntityRenderer;
|
||||||
|
import net.minecraft.client.render.entity.model.EntityModelLayers;
|
||||||
import net.minecraft.client.render.entity.model.ParrotEntityModel;
|
import net.minecraft.client.render.entity.model.ParrotEntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.client.util.math.Vector3f;
|
||||||
|
@ -20,10 +22,11 @@ import java.util.Optional;
|
||||||
|
|
||||||
public class PassengerFeature<T extends PlayerEntity, M extends ClientPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
public class PassengerFeature<T extends PlayerEntity, M extends ClientPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
||||||
|
|
||||||
private final ParrotEntityModel model = new ParrotEntityModel();
|
private final ParrotEntityModel model;
|
||||||
|
|
||||||
public PassengerFeature(IPonyRenderContext<T, M> context) {
|
public PassengerFeature(IPonyRenderContext<T, M> renderer, EntityRendererFactory.Context context) {
|
||||||
super(context);
|
super(renderer);
|
||||||
|
model = new ParrotEntityModel(context.getPart(EntityModelLayers.PARROT));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,13 +6,19 @@ import com.minelittlepony.client.render.IPonyRenderContext;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.block.AbstractSkullBlock;
|
import net.minecraft.block.AbstractSkullBlock;
|
||||||
|
import net.minecraft.block.SkullBlock;
|
||||||
import net.minecraft.block.SkullBlock.SkullType;
|
import net.minecraft.block.SkullBlock.SkullType;
|
||||||
import net.minecraft.block.entity.SkullBlockEntity;
|
import net.minecraft.block.entity.SkullBlockEntity;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
|
import net.minecraft.client.render.block.entity.SkullBlockEntityModel;
|
||||||
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.EntityModel;
|
import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
|
import net.minecraft.client.render.entity.model.EntityModelLoader;
|
||||||
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;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.client.util.math.Vector3f;
|
||||||
|
@ -28,8 +34,11 @@ import net.minecraft.village.VillagerDataContainer;
|
||||||
|
|
||||||
public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
||||||
|
|
||||||
public SkullFeature(IPonyRenderContext<T, M> renderPony) {
|
private final Map<SkullBlock.SkullType, SkullBlockEntityModel> headModels;
|
||||||
|
|
||||||
|
public SkullFeature(IPonyRenderContext<T, M> renderPony, EntityModelLoader entityModelLoader) {
|
||||||
super(renderPony);
|
super(renderPony);
|
||||||
|
headModels = SkullBlockEntityRenderer.getModels(entityModelLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -94,9 +103,11 @@ public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkullType type = ((AbstractSkullBlock) ((BlockItem) itemstack.getItem()).getBlock()).getSkullType();
|
|
||||||
|
|
||||||
stack.translate(-0.5, 0, -0.5);
|
stack.translate(-0.5, 0, -0.5);
|
||||||
SkullBlockEntityRenderer.render(null, 180, type, profile, limbDistance, stack, renderContext, lightUv);
|
SkullType type = ((AbstractSkullBlock) ((BlockItem) itemstack.getItem()).getBlock()).getSkullType();
|
||||||
|
SkullBlockEntityModel skullBlockEntityModel = (SkullBlockEntityModel)this.headModels.get(type);
|
||||||
|
RenderLayer renderLayer = SkullBlockEntityRenderer.method_3578(type, profile);
|
||||||
|
|
||||||
|
SkullBlockEntityRenderer.method_32161(null, 180, f, stack, renderContext, lightUv, skullBlockEntityModel, renderLayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.minelittlepony.client.render.entity.npc;
|
package com.minelittlepony.client.render.entity.npc;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
import net.minecraft.client.model.ModelPart;
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.client.render.entity.model.ModelWithHat;
|
import net.minecraft.client.render.entity.model.ModelWithHat;
|
||||||
import net.minecraft.entity.mob.MobEntity;
|
import net.minecraft.entity.mob.MobEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -23,8 +23,8 @@ abstract class AbstractNpcRenderer<
|
||||||
|
|
||||||
private final String entityType;
|
private final String entityType;
|
||||||
|
|
||||||
public AbstractNpcRenderer(EntityRenderDispatcher manager, ModelKey<? super M> key, String type, TextureSupplier<String> formatter) {
|
public AbstractNpcRenderer(EntityRendererFactory.Context context, ModelKey<? super M> key, String type, TextureSupplier<String> formatter) {
|
||||||
super(manager, key);
|
super(context, key);
|
||||||
|
|
||||||
entityType = type;
|
entityType = type;
|
||||||
baseTextures = new PonyTextures<>(formatter);
|
baseTextures = new PonyTextures<>(formatter);
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.minelittlepony.client.render.entity.PonyRenderer;
|
||||||
import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
||||||
|
|
||||||
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.EntityRendererFactory;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.mob.EvokerEntity;
|
import net.minecraft.entity.mob.EvokerEntity;
|
||||||
import net.minecraft.entity.mob.IllagerEntity;
|
import net.minecraft.entity.mob.IllagerEntity;
|
||||||
|
@ -23,8 +23,8 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
||||||
public static final Identifier EVOKER = new Identifier("minelittlepony", "textures/entity/illager/evoker_pony.png");
|
public static final Identifier EVOKER = new Identifier("minelittlepony", "textures/entity/illager/evoker_pony.png");
|
||||||
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 IllagerPonyRenderer(EntityRenderDispatcher manager) {
|
public IllagerPonyRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ILLAGER);
|
super(context, ModelType.ILLAGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,8 +40,8 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
||||||
|
|
||||||
public static class Vindicator extends IllagerPonyRenderer<VindicatorEntity> {
|
public static class Vindicator extends IllagerPonyRenderer<VindicatorEntity> {
|
||||||
|
|
||||||
public Vindicator(EntityRenderDispatcher manager) {
|
public Vindicator(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
||||||
|
|
||||||
public static class Evoker extends IllagerPonyRenderer<EvokerEntity> {
|
public static class Evoker extends IllagerPonyRenderer<EvokerEntity> {
|
||||||
|
|
||||||
public Evoker(EntityRenderDispatcher manager) {
|
public Evoker(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,8 +65,8 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
||||||
|
|
||||||
public static class Illusionist extends IllagerPonyRenderer<IllusionerEntity> {
|
public static class Illusionist extends IllagerPonyRenderer<IllusionerEntity> {
|
||||||
|
|
||||||
public Illusionist(EntityRenderDispatcher manager) {
|
public Illusionist(EntityRendererFactory.Context context) {
|
||||||
super(manager);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.minelittlepony.client.render.entity.npc;
|
package com.minelittlepony.client.render.entity.npc;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
import net.minecraft.entity.mob.PillagerEntity;
|
import net.minecraft.entity.mob.PillagerEntity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ public class PillagerRenderer extends PonyRenderer<PillagerEntity, PillagerPonyM
|
||||||
|
|
||||||
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 PillagerRenderer(EntityRenderDispatcher manager) {
|
public PillagerRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.PILLAGER);
|
super(context, ModelType.PILLAGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.minelittlepony.client.render.entity.npc;
|
package com.minelittlepony.client.render.entity.npc;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
|
@ -13,8 +13,8 @@ public class TraderRenderer extends PonyRenderer.Caster<WanderingTraderEntity, A
|
||||||
|
|
||||||
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 TraderRenderer(EntityRenderDispatcher manager) {
|
public TraderRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ALICORN.getKey(false));
|
super(context, ModelType.ALICORN.getKey(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.render.entity.npc;
|
||||||
import com.minelittlepony.client.model.ModelType;
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.VillagerPonyModel;
|
import com.minelittlepony.client.model.entity.VillagerPonyModel;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ public class VillagerPonyRenderer extends AbstractNpcRenderer<VillagerEntity, Vi
|
||||||
private static final String TYPE = "villager";
|
private static final String TYPE = "villager";
|
||||||
private static final TextureSupplier<String> FORMATTER = TextureSupplier.formatted("minelittlepony", "textures/entity/villager/%s.png");
|
private static final TextureSupplier<String> FORMATTER = TextureSupplier.formatted("minelittlepony", "textures/entity/villager/%s.png");
|
||||||
|
|
||||||
public VillagerPonyRenderer(EntityRenderDispatcher manager) {
|
public VillagerPonyRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.VILLAGER, TYPE, FORMATTER);
|
super(context, ModelType.VILLAGER, TYPE, FORMATTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.render.entity.npc;
|
||||||
import com.minelittlepony.client.model.ModelType;
|
import com.minelittlepony.client.model.ModelType;
|
||||||
import com.minelittlepony.client.model.entity.ZomponyVillagerModel;
|
import com.minelittlepony.client.model.entity.ZomponyVillagerModel;
|
||||||
|
|
||||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
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;
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ public class ZomponyVillagerRenderer extends AbstractNpcRenderer<ZombieVillagerE
|
||||||
private static final String TYPE = "zombie_villager";
|
private static final String TYPE = "zombie_villager";
|
||||||
private static final TextureSupplier<String> FORMATTER = TextureSupplier.formatted("minelittlepony", "textures/entity/zombie_villager/zombie_%s.png");
|
private static final TextureSupplier<String> FORMATTER = TextureSupplier.formatted("minelittlepony", "textures/entity/zombie_villager/zombie_%s.png");
|
||||||
|
|
||||||
public ZomponyVillagerRenderer(EntityRenderDispatcher manager) {
|
public ZomponyVillagerRenderer(EntityRendererFactory.Context context) {
|
||||||
super(manager, ModelType.ZOMBIE_VILLAGER, TYPE, FORMATTER);
|
super(context, ModelType.ZOMBIE_VILLAGER, TYPE, FORMATTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -7,9 +7,8 @@ import com.minelittlepony.client.model.gear.IRenderContext;
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.IPart;
|
import com.minelittlepony.model.IPart;
|
||||||
import com.minelittlepony.mson.api.MsonModel;
|
|
||||||
|
|
||||||
public interface IGear extends IPart, MsonModel {
|
public interface IGear extends IPart {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if this wearable can and is worn by the selected entity.
|
* Determines if this wearable can and is worn by the selected entity.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"helmet": {
|
"hat": {
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"center": [0, 0, -4],
|
"center": [0, 0, -4],
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
{"from": [0, 0, 0], "size": [2, 5, 2] }
|
{"from": [0, 0, 0], "size": [2, 5, 2] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"torso": {
|
"body": {
|
||||||
"texture": {"u": 2, "v": 12},
|
"texture": {"u": 2, "v": 12},
|
||||||
"center": [-3, 2, -3],
|
"center": [-3, 2, -3],
|
||||||
"rotate": [-30, 0, 0],
|
"rotate": [-30, 0, 0],
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"texture": {"w": 64, "h": 64},
|
||||||
|
"head": {
|
||||||
|
"cubes": [
|
||||||
|
{ "from": [-9, -13, -1], "size": [ 6, 6, 1] },
|
||||||
|
{ "from": [ 3, 13, -1], "size": [ 6, 6, 1] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -68,7 +68,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"helmet": {
|
"hat": {
|
||||||
"texture": { "u": 32, "v": 0 },
|
"texture": { "u": 32, "v": 0 },
|
||||||
"center": [0, 0, -2],
|
"center": [0, 0, -2],
|
||||||
"cubes": [
|
"cubes": [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"texture": {"w": 64, "h": 64},
|
"texture": {"w": 64, "h": 64},
|
||||||
"skull": {
|
"head": {
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{"from": [-4, -8, -4], "size": [8, 8, 8]}
|
{"from": [-4, -8, -4], "size": [8, 8, 8]}
|
||||||
],
|
],
|
||||||
|
|
|
@ -34,14 +34,14 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"helmet": {
|
"hat": {
|
||||||
"texture": { "u": 32, "v": 0 },
|
"texture": { "u": 32, "v": 0 },
|
||||||
"center": [ 0, 0, -2 ],
|
"center": [ 0, 0, -2 ],
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-4, -6, -6], "size": [ 8, 8, 8], "stretch": 0.5 }
|
{ "from": [-4, -6, -6], "size": [ 8, 8, 8], "stretch": 0.5 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"torso": {
|
"body": {
|
||||||
"texture": { "u": 16, "v": 16 },
|
"texture": { "u": 16, "v": 16 },
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-4, 4, -2], "size": [ 8, 8, 4] }
|
{ "from": [-4, 4, -2], "size": [ 8, 8, 4] }
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"right_pant_leg": {
|
"right_pants": {
|
||||||
"center": ["#arm_rotation_x_neg", 0, 0],
|
"center": ["#arm_rotation_x_neg", 0, 0],
|
||||||
"texture": { "u": 0, "v": 32 },
|
"texture": { "u": 0, "v": 32 },
|
||||||
"cubes": [
|
"cubes": [
|
||||||
|
@ -264,7 +264,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"left_pant_leg": {
|
"left_pants": {
|
||||||
"center": ["#arm_rotation_x", 0, 0],
|
"center": ["#arm_rotation_x", 0, 0],
|
||||||
"texture": { "u": 0, "v": 48 },
|
"texture": { "u": 0, "v": 48 },
|
||||||
"cubes": [
|
"cubes": [
|
||||||
|
|
Loading…
Reference in a new issue