mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Update to 1.14.4
This commit is contained in:
parent
6226407826
commit
127c150107
18 changed files with 66 additions and 68 deletions
|
@ -3,9 +3,8 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.14.3
|
||||
# probably best not to auto-update this
|
||||
yarn_mappings=1.14.3+build.1
|
||||
minecraft_version=1.14.4
|
||||
yarn_mappings=1.14.4+build.2
|
||||
loader_version=0.4.8+
|
||||
|
||||
# Mod Properties
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.minelittlepony.model.armour.IEquestrianArmour;
|
|||
import net.minecraft.client.model.Cuboid;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
@ -364,8 +364,8 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
protected void holdItem(float swing) {
|
||||
boolean both = leftArmPose == ArmPose.ITEM && rightArmPose == ArmPose.ITEM;
|
||||
|
||||
alignArmForAction(getArm(AbsoluteHand.LEFT), leftArmPose, rightArmPose, both, swing, 1);
|
||||
alignArmForAction(getArm(AbsoluteHand.RIGHT), rightArmPose, leftArmPose, both, swing, -1);
|
||||
alignArmForAction(getArm(Arm.LEFT), leftArmPose, rightArmPose, both, swing, 1);
|
||||
alignArmForAction(getArm(Arm.RIGHT), rightArmPose, leftArmPose, both, swing, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -462,7 +462,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
*/
|
||||
protected void swingItem(T entity) {
|
||||
if (getSwingAmount() > 0 && !attributes.isSleeping) {
|
||||
AbsoluteHand mainSide = getPreferedHand(entity);
|
||||
Arm mainSide = getPreferredArm(entity);
|
||||
|
||||
swingArm(getArm(mainSide));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.client.model.Cuboid;
|
|||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
import com.minelittlepony.client.pony.PonyData;
|
||||
import com.minelittlepony.model.ModelAttributes;
|
||||
|
@ -81,12 +81,12 @@ public abstract class ClientPonyModel<T extends LivingEntity> extends PlayerEnti
|
|||
|
||||
|
||||
@Override
|
||||
public Cuboid getArm(AbsoluteHand side) {
|
||||
public Cuboid getArm(Arm side) {
|
||||
return super.getArm(side);
|
||||
}
|
||||
|
||||
public ArmPose getArmPoseForSide(AbsoluteHand side) {
|
||||
return side == AbsoluteHand.RIGHT ? rightArmPose : leftArmPose;
|
||||
public ArmPose getArmPoseForSide(Arm side) {
|
||||
return side == Arm.RIGHT ? rightArmPose : leftArmPose;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.client.model;
|
|||
|
||||
import net.minecraft.client.model.Cuboid;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
import com.minelittlepony.model.BodyPart;
|
||||
import com.minelittlepony.model.IUnicorn;
|
||||
|
@ -77,8 +77,8 @@ public interface IPonyMixinModel<T extends LivingEntity, M extends IPonyModel<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
default void setArmAngle(float var1, AbsoluteHand var2) {
|
||||
mixin().setArmAngle(var1, var2);
|
||||
default void setArmAngle(float angle, Arm side) {
|
||||
mixin().setArmAngle(angle, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -91,10 +91,10 @@ public interface IPonyMixinModel<T extends LivingEntity, M extends IPonyModel<T>
|
|||
return mixin().getBodyPart(part);
|
||||
}
|
||||
|
||||
interface Caster<T extends LivingEntity, M extends IPonyModel<T> & IUnicorn<Arm>, Arm> extends IPonyMixinModel<T, M>, IUnicorn<Arm> {
|
||||
interface Caster<T extends LivingEntity, M extends IPonyModel<T> & IUnicorn<ArmModel>, ArmModel> extends IPonyMixinModel<T, M>, IUnicorn<ArmModel> {
|
||||
|
||||
@Override
|
||||
default Arm getUnicornArmForSide(AbsoluteHand side) {
|
||||
default ArmModel getUnicornArmForSide(Arm side) {
|
||||
return mixin().getUnicornArmForSide(side);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.model.entities;
|
|||
import net.minecraft.client.model.Cuboid;
|
||||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.client.util.render.PonyRenderer;
|
||||
|
@ -100,7 +100,7 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
|
|||
rotateArm(rightArm, rightArmPose, 1);
|
||||
|
||||
if (handSwingProgress > 0) {
|
||||
swingArms(getPreferedHand(entity));
|
||||
swingArms(getPreferredArm(entity));
|
||||
}
|
||||
|
||||
float rotX = MathHelper.sin(ticks * 0.067F) * 0.05F;
|
||||
|
@ -123,10 +123,10 @@ public class ModelBreezie<T extends LivingEntity> extends BipedEntityModel<T> {
|
|||
leg.rotate(-1.4137167F, factor * PI / 10, factor * 0.07853982F);
|
||||
}
|
||||
|
||||
protected void swingArms(AbsoluteHand mainHand) {
|
||||
protected void swingArms(Arm mainHand) {
|
||||
body.yaw = MathHelper.sin(MathHelper.sqrt(handSwingProgress) * PI * 2) / 5;
|
||||
|
||||
if (mainHand == AbsoluteHand.LEFT) {
|
||||
if (mainHand == Arm.LEFT) {
|
||||
body.yaw *= -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.client.model.entities;
|
|||
|
||||
import net.minecraft.client.model.Cuboid;
|
||||
import net.minecraft.entity.mob.IllagerEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.client.model.ModelMobPony;
|
||||
|
@ -15,9 +15,9 @@ public class ModelIllagerPony<T extends IllagerEntity> extends ModelMobPony<T> {
|
|||
|
||||
IllagerEntity.State pose = illager.getState();
|
||||
|
||||
boolean rightHanded = illager.getMainHand() == AbsoluteHand.RIGHT;
|
||||
boolean rightHanded = illager.getMainArm() == Arm.RIGHT;
|
||||
float mult = rightHanded ? 1 : -1;
|
||||
Cuboid arm = getArm(illager.getMainHand());
|
||||
Cuboid arm = getArm(illager.getMainArm());
|
||||
|
||||
if (pose == IllagerEntity.State.ATTACKING) {
|
||||
// vindicator attacking
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.client.model.entities;
|
|||
|
||||
import net.minecraft.entity.mob.IllagerEntity;
|
||||
import net.minecraft.entity.mob.PillagerEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
import com.minelittlepony.client.model.races.ModelChangeling;
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class ModelPillagerPony<T extends PillagerEntity> extends ModelChangeling
|
|||
ArmPose holdingPose = getHoldingPose(entity.getState());
|
||||
|
||||
if (holdingPose != ArmPose.EMPTY) {
|
||||
boolean rightHanded = entity.getMainHand() == AbsoluteHand.RIGHT;
|
||||
boolean rightHanded = entity.getMainArm() == Arm.RIGHT;
|
||||
|
||||
leftArmPose = rightHanded ? ArmPose.EMPTY : holdingPose;
|
||||
rightArmPose = rightHanded ? holdingPose : ArmPose.EMPTY;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.entity.mob.WitherSkeletonEntity;
|
|||
import net.minecraft.entity.mob.HostileEntity;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Hand;
|
||||
|
||||
import com.minelittlepony.client.model.ModelMobPony;
|
||||
|
@ -35,7 +35,7 @@ public class ModelSkeletonPony<T extends HostileEntity> extends ModelMobPony<T>
|
|||
ItemStack mainHand = entity.getStackInHand(Hand.MAIN_HAND);
|
||||
ItemStack offHand = entity.getStackInHand(Hand.OFF_HAND);
|
||||
|
||||
boolean right = entity.getMainHand() == AbsoluteHand.RIGHT;
|
||||
boolean right = entity.getMainArm() == Arm.RIGHT;
|
||||
|
||||
if (!offHand.isEmpty()) {
|
||||
if (right) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.minelittlepony.model.IUnicorn;
|
|||
|
||||
import net.minecraft.client.model.Cuboid;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
|
@ -66,8 +66,8 @@ public class ModelUnicorn<T extends LivingEntity> extends ModelEarthPony<T> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public PonyRenderer getUnicornArmForSide(AbsoluteHand side) {
|
||||
return side == AbsoluteHand.LEFT ? unicornArmLeft : unicornArmRight;
|
||||
public PonyRenderer getUnicornArmForSide(Arm side) {
|
||||
return side == Arm.LEFT ? unicornArmLeft : unicornArmRight;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,7 +119,7 @@ public class ModelUnicorn<T extends LivingEntity> extends ModelEarthPony<T> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cuboid getArm(AbsoluteHand side) {
|
||||
public Cuboid getArm(Arm side) {
|
||||
if (canCast() && getArmPoseForSide(side) != ArmPose.EMPTY) {
|
||||
return getUnicornArmForSide(side);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.client.render.item.ItemRenderer;
|
|||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.UseAction;
|
||||
|
||||
import static com.mojang.blaze3d.platform.GlStateManager.*;
|
||||
|
@ -39,7 +39,7 @@ public class LevitatingItemRenderer {
|
|||
/**
|
||||
* Renders a magical overlay over an item in third person.
|
||||
*/
|
||||
public void renderItemGlow(LivingEntity entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand, int glowColor) {
|
||||
public void renderItemGlow(LivingEntity entity, ItemStack drop, ModelTransformation.Type transform, Arm hand, int glowColor) {
|
||||
pushMatrix();
|
||||
disableLighting();
|
||||
setColor(glowColor);
|
||||
|
@ -51,9 +51,9 @@ public class LevitatingItemRenderer {
|
|||
scalef(1.1F, 1.1F, 1.1F);
|
||||
|
||||
translatef(0.01F, 0.01F, 0.01F);
|
||||
renderItem.renderHeldItem(drop, entity, transform, hand == AbsoluteHand.LEFT);
|
||||
renderItem.renderHeldItem(drop, entity, transform, hand == Arm.LEFT);
|
||||
translatef(-0.02F, -0.02F, -0.02F);
|
||||
renderItem.renderHeldItem(drop, entity, transform, hand == AbsoluteHand.LEFT);
|
||||
renderItem.renderHeldItem(drop, entity, transform, hand == Arm.LEFT);
|
||||
|
||||
usingTransparency = false;
|
||||
unsetColor();
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
|||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.entity.mob.WitchEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class RenderPonyWitch extends RenderPonyMob<WitchEntity, ModelWitchPony> {
|
||||
|
@ -24,7 +24,7 @@ public class RenderPonyWitch extends RenderPonyMob<WitchEntity, ModelWitchPony>
|
|||
protected LayerHeldPonyItem<WitchEntity, ModelWitchPony> createItemHoldingLayer() {
|
||||
return new LayerHeldPonyItem<WitchEntity, ModelWitchPony>(this) {
|
||||
@Override
|
||||
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
GlStateManager.translatef(0, -0.3F, -0.8F);
|
||||
GlStateManager.rotatef(10, 1, 0, 0);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.client.render.entity.feature.FeatureRenderer;
|
|||
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class RenderPonyPlayer extends PlayerEntityRenderer implements IPonyRender<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> {
|
||||
|
@ -127,24 +127,24 @@ public class RenderPonyPlayer extends PlayerEntityRenderer implements IPonyRende
|
|||
|
||||
@Override
|
||||
public final void renderRightArm(AbstractClientPlayerEntity player) {
|
||||
renderArm(player, AbsoluteHand.RIGHT);
|
||||
renderArm(player, Arm.RIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void renderLeftArm(AbstractClientPlayerEntity player) {
|
||||
renderArm(player, AbsoluteHand.LEFT);
|
||||
renderArm(player, Arm.LEFT);
|
||||
}
|
||||
|
||||
protected void renderArm(AbstractClientPlayerEntity player, AbsoluteHand side) {
|
||||
protected void renderArm(AbstractClientPlayerEntity player, Arm side) {
|
||||
renderPony.updateModel(player);
|
||||
bindEntityTexture(player);
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
float reflect = side == AbsoluteHand.LEFT ? 1 : -1;
|
||||
float reflect = side == Arm.LEFT ? 1 : -1;
|
||||
|
||||
GlStateManager.translatef(reflect * -0.1F, -0.74F, 0);
|
||||
|
||||
if (side == AbsoluteHand.LEFT) {
|
||||
if (side == Arm.LEFT) {
|
||||
super.renderLeftArm(player);
|
||||
} else {
|
||||
super.renderRightArm(player);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.minelittlepony.client.render.layer;
|
||||
|
||||
import net.minecraft.entity.mob.IllagerEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
import com.minelittlepony.client.model.races.ModelAlicorn;
|
||||
import com.minelittlepony.client.render.IPonyRender;
|
||||
|
@ -20,7 +20,7 @@ public class LayerHeldItemIllager<T extends IllagerEntity, M extends ModelAlicor
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void renderArm(AbsoluteHand side) {
|
||||
protected void renderArm(Arm side) {
|
||||
getModel().getArm(side).applyTransform(0.0625F);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.client.render.entity.model.EntityModel;
|
|||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
import static com.mojang.blaze3d.platform.GlStateManager.*;
|
||||
|
||||
|
@ -20,13 +20,13 @@ public class LayerHeldPonyItem<T extends LivingEntity, M extends EntityModel<T>
|
|||
}
|
||||
|
||||
protected ItemStack getLeftItem(T entity) {
|
||||
boolean main = entity.getMainHand() == AbsoluteHand.LEFT;
|
||||
boolean main = entity.getMainArm() == Arm.LEFT;
|
||||
|
||||
return main ? entity.getMainHandStack() : entity.getOffHandStack();
|
||||
}
|
||||
|
||||
protected ItemStack getRightItem(T entity) {
|
||||
boolean main = entity.getMainHand() == AbsoluteHand.RIGHT;
|
||||
boolean main = entity.getMainArm() == Arm.RIGHT;
|
||||
|
||||
return main ? entity.getMainHandStack() : entity.getOffHandStack();
|
||||
}
|
||||
|
@ -44,14 +44,14 @@ public class LayerHeldPonyItem<T extends LivingEntity, M extends EntityModel<T>
|
|||
|
||||
model.transform(BodyPart.LEGS);
|
||||
|
||||
renderHeldItem(entity, right, ModelTransformation.Type.THIRD_PERSON_RIGHT_HAND, AbsoluteHand.RIGHT);
|
||||
renderHeldItem(entity, left, ModelTransformation.Type.THIRD_PERSON_LEFT_HAND, AbsoluteHand.LEFT);
|
||||
renderHeldItem(entity, right, ModelTransformation.Type.THIRD_PERSON_RIGHT_HAND, Arm.RIGHT);
|
||||
renderHeldItem(entity, left, ModelTransformation.Type.THIRD_PERSON_LEFT_HAND, Arm.LEFT);
|
||||
|
||||
popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void renderHeldItem(T entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
private void renderHeldItem(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
if (!drop.isEmpty()) {
|
||||
pushMatrix();
|
||||
renderArm(hand);
|
||||
|
@ -60,7 +60,7 @@ public class LayerHeldPonyItem<T extends LivingEntity, M extends EntityModel<T>
|
|||
translatef(0, 0.2F, 0);
|
||||
}
|
||||
|
||||
float left = hand == AbsoluteHand.LEFT ? 1 : -1;
|
||||
float left = hand == Arm.LEFT ? 1 : -1;
|
||||
|
||||
if (entity.hasVehicle()) {
|
||||
translatef(left / 10, -0.2F, -0.5F);
|
||||
|
@ -71,24 +71,24 @@ public class LayerHeldPonyItem<T extends LivingEntity, M extends EntityModel<T>
|
|||
translatef(left * -0.2F, 0, 0);
|
||||
|
||||
preItemRender(entity, drop, transform, hand);
|
||||
MinecraftClient.getInstance().getItemRenderer().renderHeldItem(drop, entity, transform, hand == AbsoluteHand.LEFT);
|
||||
MinecraftClient.getInstance().getItemRenderer().renderHeldItem(drop, entity, transform, hand == Arm.LEFT);
|
||||
postItemRender(entity, drop, transform, hand);
|
||||
|
||||
popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
translatef(0, 0.125F, -1);
|
||||
}
|
||||
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the main arm
|
||||
*/
|
||||
protected void renderArm(AbsoluteHand side) {
|
||||
protected void renderArm(Arm side) {
|
||||
getModel().setArmAngle(0.0625F, side);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.client.render.entity.model.EntityModel;
|
|||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
public class LayerHeldPonyItemMagical<T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> extends LayerHeldPonyItem<T, M> {
|
||||
|
||||
|
@ -24,16 +24,16 @@ public class LayerHeldPonyItemMagical<T extends LivingEntity, M extends EntityMo
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
if (isUnicorn()) {
|
||||
GlStateManager.translatef(hand == AbsoluteHand.LEFT ? -0.6F : 0, 0.5F, -0.3F);
|
||||
GlStateManager.translatef(hand == Arm.LEFT ? -0.6F : 0, 0.5F, -0.3F);
|
||||
} else {
|
||||
super.preItemRender(entity, drop, transform, hand);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, AbsoluteHand hand) {
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Type transform, Arm hand) {
|
||||
if (isUnicorn()) {
|
||||
PonyRenderManager.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn<?>)getModel()).getMagicColor());
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class LayerHeldPonyItemMagical<T extends LivingEntity, M extends EntityMo
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void renderArm(AbsoluteHand side) {
|
||||
protected void renderArm(Arm side) {
|
||||
if (isUnicorn()) {
|
||||
((IUnicorn<PonyRenderer>)getModel()).getUnicornArmForSide(side).applyTransform(0.0625F);
|
||||
} else {
|
||||
|
|
|
@ -63,8 +63,7 @@ public class LayerPonyCape<M extends ClientPonyModel<AbstractClientPlayerEntity>
|
|||
|
||||
float camera = MathHelper.lerp(partialTicks, player.field_7505, player.field_7483);
|
||||
//float camera = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * scale;
|
||||
capeMotionY += MathHelper.sin(MathHelper.lerp(partialTicks, player.field_6039, player.field_5973) * 6) * 32 * camera;
|
||||
//capeMotionY += MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * scale) * 6) * 32 * camera;
|
||||
capeMotionY += MathHelper.sin(MathHelper.lerp(partialTicks, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera;
|
||||
|
||||
rotatef(2 + capeMotionX / 12 + capeMotionY, 1, 0, 0);
|
||||
rotatef( diagMotion / 2, 0, 0, 1);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.minelittlepony.model;
|
||||
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
|
||||
public interface IUnicorn<Arm> extends IModel {
|
||||
public interface IUnicorn<ArmModel> extends IModel {
|
||||
/**
|
||||
* Gets the arm used for holding items in their magic.
|
||||
*/
|
||||
Arm getUnicornArmForSide(AbsoluteHand side);
|
||||
ArmModel getUnicornArmForSide(Arm side);
|
||||
|
||||
/**
|
||||
* Returns true if this model is being applied to a race that can use magic.
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.model;
|
|||
import com.minelittlepony.pony.IPony;
|
||||
import com.minelittlepony.util.math.MathUtil;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.AbsoluteHand;
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -99,6 +99,6 @@ public class ModelAttributes<T extends LivingEntity> {
|
|||
hasHeadGear = pony.isWearingHeadgear(entity);
|
||||
isSitting = pony.isRidingInteractive(entity);
|
||||
interpolatorId = entity.getUuid();
|
||||
isLeftHanded = entity.getMainHand() == AbsoluteHand.LEFT;
|
||||
isLeftHanded = entity.getMainArm() == Arm.LEFT;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue