mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
20w46a -> 20w49a
This commit is contained in:
parent
7620f6090f
commit
5fdc5250b8
12 changed files with 47 additions and 48 deletions
|
@ -3,10 +3,10 @@ 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=20w46a
|
minecraft_version=20w49a
|
||||||
yarn_mappings=20w46a+build.15
|
yarn_mappings=20w49a+build.1
|
||||||
loader_version=0.10.8
|
loader_version=0.10.8
|
||||||
fabric_version=0.26.0+1.17
|
fabric_version=0.27.2+1.17
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
group=com.minelittlepony
|
group=com.minelittlepony
|
||||||
|
@ -18,6 +18,6 @@ org.gradle.daemon=false
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
modmenu_version=1.12.+
|
modmenu_version=1.12.+
|
||||||
kirin_version=1.8-20w46a-SNAPSHOT
|
kirin_version=1.8-20w49a-SNAPSHOT
|
||||||
hd_skins_version=6.4-20w46a-SNAPSHOT
|
hd_skins_version=6.4-20w49a-SNAPSHOT
|
||||||
mson_version=1.3.1-20w46a-SNAPSHOT
|
mson_version=1.3.1-20w49a-SNAPSHOT
|
||||||
|
|
|
@ -32,7 +32,7 @@ abstract class MixinFirstPersonRenderer {
|
||||||
|
|
||||||
@Redirect(method = "renderItem(" + LivingEntity + ItemStack + Mode + Boolean + MatrixStack + VertexConsumerProvider + Int + ")V",
|
@Redirect(method = "renderItem(" + LivingEntity + ItemStack + Mode + Boolean + MatrixStack + VertexConsumerProvider + Int + ")V",
|
||||||
at = @At(value = "INVOKE",
|
at = @At(value = "INVOKE",
|
||||||
target = ItemRenderer + "renderItem(" + LivingEntity + ItemStack + Mode + Boolean + MatrixStack + VertexConsumerProvider + World + Int + Int + ")V"))
|
target = ItemRenderer + "renderItem(" + LivingEntity + ItemStack + Mode + Boolean + MatrixStack + VertexConsumerProvider + World + Int + Int + Int + ")V"))
|
||||||
private void redirectRenderItem(ItemRenderer target,
|
private void redirectRenderItem(ItemRenderer target,
|
||||||
@Nullable LivingEntity entity,
|
@Nullable LivingEntity entity,
|
||||||
ItemStack item,
|
ItemStack item,
|
||||||
|
@ -41,7 +41,7 @@ abstract class MixinFirstPersonRenderer {
|
||||||
MatrixStack stack,
|
MatrixStack stack,
|
||||||
VertexConsumerProvider renderContext,
|
VertexConsumerProvider renderContext,
|
||||||
@Nullable World world,
|
@Nullable World world,
|
||||||
int lightUv, int overlayUv) {
|
int lightUv, int overlayUv, int posLong) {
|
||||||
PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemInFirstPerson(target, entity, item, transform, left, stack, renderContext, world, lightUv);
|
PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemInFirstPerson(target, entity, item, transform, left, stack, renderContext, world, lightUv, posLong);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,8 @@ import com.minelittlepony.mson.api.model.MsonPart;
|
||||||
|
|
||||||
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.CrossbowPosing;
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
@ -449,7 +448,7 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
arm.pitch = ROTATE_90 * 2;
|
arm.pitch = ROTATE_90 * 2;
|
||||||
break;
|
break;
|
||||||
case SPYGLASS:
|
case SPYGLASS:
|
||||||
arm.pitch = MathHelper.clamp(head.pitch + CrossbowPosing.method_31978(arm), -2.4F, 3.3F);
|
arm.pitch = MathHelper.clamp(head.pitch - 1.9198622F - (attributes.isCrouching ? 0.2617994F : 0), -2.4F, 3.3F);
|
||||||
arm.yaw = MathHelper.clamp(head.yaw + (0.7853982F * reflect), -1.1F, 0.0F);
|
arm.yaw = MathHelper.clamp(head.yaw + (0.7853982F * reflect), -1.1F, 0.0F);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -633,12 +632,12 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
||||||
@Override
|
@Override
|
||||||
public void transform(BodyPart part, MatrixStack stack) {
|
public void transform(BodyPart part, MatrixStack stack) {
|
||||||
if (attributes.isSleeping) {
|
if (attributes.isSleeping) {
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(90));
|
||||||
stack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
|
stack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(180));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (part == BodyPart.HEAD) {
|
if (part == BodyPart.HEAD) {
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(attributes.motionPitch));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(attributes.motionPitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
PonyTransformation.forSize(getSize()).transform(this, part, stack);
|
PonyTransformation.forSize(getSize()).transform(this, part, stack);
|
||||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.client.render.item.ItemRenderer;
|
||||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -55,9 +55,9 @@ public class LevitatingItemRenderer {
|
||||||
stack.scale(1.1F, 1.1F, 1.1F);
|
stack.scale(1.1F, 1.1F, 1.1F);
|
||||||
|
|
||||||
stack.translate(0.01F, 0.01F, 0.01F);
|
stack.translate(0.01F, 0.01F, 0.01F);
|
||||||
renderItem.renderItem(entity, drop, transform, hand == Arm.LEFT, stack, renderContext, entity.world, 0x0F00F0, OverlayTexture.DEFAULT_UV);
|
renderItem.renderItem(entity, drop, transform, hand == Arm.LEFT, stack, renderContext, entity.world, 0x0F00F0, OverlayTexture.DEFAULT_UV, 0);
|
||||||
stack.translate(-0.02F, -0.02F, -0.02F);
|
stack.translate(-0.02F, -0.02F, -0.02F);
|
||||||
renderItem.renderItem(entity, drop, transform, hand == Arm.LEFT, stack, renderContext, entity.world, 0x0F00F0, OverlayTexture.DEFAULT_UV);
|
renderItem.renderItem(entity, drop, transform, hand == Arm.LEFT, stack, renderContext, entity.world, 0x0F00F0, OverlayTexture.DEFAULT_UV, 0);
|
||||||
|
|
||||||
stack.pop();
|
stack.pop();
|
||||||
unsetColor();
|
unsetColor();
|
||||||
|
@ -76,7 +76,7 @@ public class LevitatingItemRenderer {
|
||||||
/**
|
/**
|
||||||
* Renders an item in first person optionally with a magical overlay.
|
* Renders an item in first person optionally with a magical overlay.
|
||||||
*/
|
*/
|
||||||
public void renderItemInFirstPerson(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformation.Mode transform, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv) {
|
public void renderItemInFirstPerson(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformation.Mode transform, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
|
||||||
|
|
||||||
if (entity instanceof PlayerEntity) {
|
if (entity instanceof PlayerEntity) {
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public class LevitatingItemRenderer {
|
||||||
setupPerspective(itemRenderer, entity, stack, left, matrix);
|
setupPerspective(itemRenderer, entity, stack, left, matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV);
|
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||||
|
|
||||||
if (doMagic) {
|
if (doMagic) {
|
||||||
setColor(pony.getMetadata().getGlowColor());
|
setColor(pony.getMetadata().getGlowColor());
|
||||||
|
@ -98,16 +98,16 @@ public class LevitatingItemRenderer {
|
||||||
matrix.scale(1.1F, 1.1F, 1.1F);
|
matrix.scale(1.1F, 1.1F, 1.1F);
|
||||||
|
|
||||||
matrix.translate(0.015F, 0.01F, 0.01F);
|
matrix.translate(0.015F, 0.01F, 0.01F);
|
||||||
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV);
|
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||||
matrix.translate(-0.03F, -0.02F, -0.02F);
|
matrix.translate(-0.03F, -0.02F, -0.02F);
|
||||||
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV);
|
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||||
|
|
||||||
unsetColor();
|
unsetColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix.pop();
|
matrix.pop();
|
||||||
} else {
|
} else {
|
||||||
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV);
|
itemRenderer.renderItem(entity, stack, transform, left, matrix, renderContext, world, lightUv, OverlayTexture.DEFAULT_UV, posLong);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,8 +139,8 @@ public class LevitatingItemRenderer {
|
||||||
distanceChange);
|
distanceChange);
|
||||||
|
|
||||||
if (!handHeldTool) { // bows have to point forwards
|
if (!handHeldTool) { // bows have to point forwards
|
||||||
stack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(sign * -60 + floatAmount));
|
stack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(sign * -60 + floatAmount));
|
||||||
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(sign * 30 + driftAmount));
|
stack.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(sign * 30 + driftAmount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import net.minecraft.client.render.entity.feature.FeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
import net.minecraft.client.render.entity.feature.StuckArrowsFeatureRenderer;
|
||||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
@ -94,7 +94,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
||||||
float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw);
|
float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw);
|
||||||
float l = entity.getWidth() / 2 * manager.getPony(entity).getMetadata().getSize().getScaleFactor();
|
float l = entity.getWidth() / 2 * manager.getPony(entity).getMetadata().getSize().getScaleFactor();
|
||||||
|
|
||||||
stack.multiply(Vector3f.NEGATIVE_Y.getDegreesQuaternion(yaw));
|
stack.multiply(Vec3f.NEGATIVE_Y.getDegreesQuaternion(yaw));
|
||||||
stack.translate(0, 0, -l);
|
stack.translate(0, 0, -l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
||||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
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.util.math.Vec3f;
|
||||||
import net.minecraft.entity.mob.WitchEntity;
|
import net.minecraft.entity.mob.WitchEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
@ -27,7 +27,7 @@ public class WitchRenderer extends PonyRenderer<WitchEntity, WitchPonyModel> {
|
||||||
@Override
|
@Override
|
||||||
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, MatrixStack stack) {
|
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, MatrixStack stack) {
|
||||||
stack.translate(0, -0.3F, -0.8F);
|
stack.translate(0, -0.3F, -0.8F);
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(10));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(10));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.PlayerModelPart;
|
import net.minecraft.client.render.entity.PlayerModelPart;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
@ -61,11 +61,11 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
|
||||||
float camera = MathHelper.lerp(tickDelta, player.prevStrideDistance, player.strideDistance);
|
float camera = MathHelper.lerp(tickDelta, player.prevStrideDistance, player.strideDistance);
|
||||||
capeMotionY += MathHelper.sin(MathHelper.lerp(tickDelta, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera;
|
capeMotionY += MathHelper.sin(MathHelper.lerp(tickDelta, player.prevHorizontalSpeed, player.horizontalSpeed) * 6) * 32 * camera;
|
||||||
|
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(2 + capeMotionX / 12 + capeMotionY));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(2 + capeMotionX / 12 + capeMotionY));
|
||||||
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion( diagMotion / 2));
|
stack.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion( diagMotion / 2));
|
||||||
stack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(-diagMotion / 2));
|
stack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(-diagMotion / 2));
|
||||||
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180));
|
stack.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(180));
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(90));
|
||||||
|
|
||||||
VertexConsumer vertices = renderContext.getBuffer(RenderLayer.getEntitySolid(player.getCapeTexture()));
|
VertexConsumer vertices = renderContext.getBuffer(RenderLayer.getEntitySolid(player.getCapeTexture()));
|
||||||
model.renderCape(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV);
|
model.renderCape(stack, vertices, lightUv, OverlayTexture.DEFAULT_UV);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.render.entity.model.EntityModel;
|
import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
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.util.math.Vec3f;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
|
@ -63,7 +63,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
||||||
}
|
}
|
||||||
|
|
||||||
preItemRender(entity, drop, transform, arm, stack);
|
preItemRender(entity, drop, transform, arm, stack);
|
||||||
MinecraftClient.getInstance().getItemRenderer().renderItem(entity, drop, transform, arm == Arm.LEFT, stack, renderContext, entity.world, lightUv, OverlayTexture.DEFAULT_UV);
|
MinecraftClient.getInstance().getItemRenderer().renderItem(entity, drop, transform, arm == Arm.LEFT, stack, renderContext, entity.world, lightUv, 0, OverlayTexture.DEFAULT_UV);
|
||||||
postItemRender(entity, drop, transform, arm, stack, renderContext);
|
postItemRender(entity, drop, transform, arm, stack, renderContext);
|
||||||
|
|
||||||
stack.pop();
|
stack.pop();
|
||||||
|
@ -77,8 +77,8 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
||||||
stack.translate(left / 10, -0.2F, -0.5F);
|
stack.translate(left / 10, -0.2F, -0.5F);
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-90));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(-90));
|
||||||
stack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(left * 180));
|
stack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(left * 180));
|
||||||
stack.translate(left * -0.2F, 0.125F, -1);
|
stack.translate(left * -0.2F, 0.125F, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.render.entity.ParrotEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.EntityModelLayers;
|
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.util.math.Vec3f;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
@ -54,7 +54,7 @@ public class PassengerFeature<T extends PlayerEntity, M extends ClientPonyModel<
|
||||||
sigma * 0.25,
|
sigma * 0.25,
|
||||||
entity.isInSneakingPose() ? -0.9 : -1.2,
|
entity.isInSneakingPose() ? -0.9 : -1.2,
|
||||||
0.45);
|
0.45);
|
||||||
stack.multiply(Vector3f.NEGATIVE_Z.getDegreesQuaternion(sigma * -5));
|
stack.multiply(Vec3f.NEGATIVE_Z.getDegreesQuaternion(sigma * -5));
|
||||||
|
|
||||||
VertexConsumer buffer = renderContext.getBuffer(model.getLayer(texture));
|
VertexConsumer buffer = renderContext.getBuffer(model.getLayer(texture));
|
||||||
model.poseOnShoulder(stack, buffer, light, OverlayTexture.DEFAULT_UV, limbDistance, limbAngle, headYaw, headPitch, entity.age);
|
model.poseOnShoulder(stack, buffer, light, OverlayTexture.DEFAULT_UV, limbDistance, limbAngle, headYaw, headPitch, entity.age);
|
||||||
|
|
|
@ -21,7 +21,7 @@ import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
import net.minecraft.client.render.entity.model.EntityModelLoader;
|
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.util.math.Vec3f;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.item.ArmorItem;
|
import net.minecraft.item.ArmorItem;
|
||||||
|
@ -73,7 +73,7 @@ public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPo
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderBlock(MatrixStack stack, VertexConsumerProvider renderContext, T entity, ItemStack itemstack, int lightUv) {
|
private void renderBlock(MatrixStack stack, VertexConsumerProvider renderContext, T entity, ItemStack itemstack, int lightUv) {
|
||||||
stack.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(180));
|
stack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(180));
|
||||||
stack.scale(0.625F, -0.625F, -0.625F);
|
stack.scale(0.625F, -0.625F, -0.625F);
|
||||||
stack.translate(0, 0.6F, -0.21F);
|
stack.translate(0, 0.6F, -0.21F);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.minelittlepony.client.transform;
|
package com.minelittlepony.client.transform;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
|
@ -9,7 +9,7 @@ import com.minelittlepony.model.IModel;
|
||||||
public class PostureElytra implements PonyPosture<LivingEntity> {
|
public class PostureElytra implements PonyPosture<LivingEntity> {
|
||||||
@Override
|
@Override
|
||||||
public void transform(IModel model, LivingEntity entity, MatrixStack stack, double motionX, double motionY, double motionZ, float yaw, float ticks) {
|
public void transform(IModel model, LivingEntity entity, MatrixStack stack, double motionX, double motionY, double motionZ, float yaw, float ticks) {
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(90));
|
||||||
stack.translate(0, model.getAttributes().isCrouching ? 0.2F : -1, 0);
|
stack.translate(0, model.getAttributes().isCrouching ? 0.2F : -1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.minelittlepony.model.IModel;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.client.util.math.Vector3f;
|
import net.minecraft.util.math.Vec3f;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
|
||||||
public class PostureFlight extends MotionCompositor implements PonyPosture<PlayerEntity> {
|
public class PostureFlight extends MotionCompositor implements PonyPosture<PlayerEntity> {
|
||||||
|
@ -22,7 +22,7 @@ public class PostureFlight extends MotionCompositor implements PonyPosture<Playe
|
||||||
|
|
||||||
roll = model.getMetadata().getInterpolator(player.getUuid()).interpolate("pegasusRoll", roll, 10);
|
roll = model.getMetadata().getInterpolator(player.getUuid()).interpolate("pegasusRoll", roll, 10);
|
||||||
|
|
||||||
stack.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(model.getAttributes().motionPitch));
|
stack.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(model.getAttributes().motionPitch));
|
||||||
stack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(roll));
|
stack.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(roll));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue