mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
1.19.3 -> 1.19.4
This commit is contained in:
parent
f4d47f1585
commit
1af3ac0c69
14 changed files with 48 additions and 47 deletions
|
@ -3,10 +3,10 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.2
|
||||
loader_version=0.14.11
|
||||
fabric_version=0.68.1+1.19.3
|
||||
minecraft_version=1.19.4
|
||||
yarn_mappings=1.19.4+build.1
|
||||
loader_version=0.14.17
|
||||
fabric_version=0.76.0+1.19.4
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -15,12 +15,12 @@ org.gradle.daemon=false
|
|||
description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings.
|
||||
|
||||
# Publishing
|
||||
minecraft_version_range=>=1.19.3-pre1
|
||||
minecraft_version_range=>=1.19.4
|
||||
modrinth_loader_type=fabric
|
||||
modrinth_project_id=JBjInUXM
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=5.0.0-alpha.3
|
||||
kirin_version=1.13.2
|
||||
hd_skins_version=6.7.6
|
||||
mson_version=1.7.2
|
||||
modmenu_version=6.1.0-rc.4
|
||||
kirin_version=1.14.0-beta.3
|
||||
hd_skins_version=6.8.0-beta.1
|
||||
mson_version=1.8.0-beta.2
|
||||
|
|
|
@ -58,10 +58,11 @@ public final class PonyPosture {
|
|||
double offsetAmount = below.getBlock() instanceof StairsBlock ? 1 : 0.05;
|
||||
|
||||
Vec3d pos = entity.getPos();
|
||||
BlockPos blockpos = new BlockPos(
|
||||
Math.floor(pos.x),
|
||||
Math.floor(pos.y - offsetAmount),
|
||||
Math.floor(pos.z));
|
||||
BlockPos blockpos = BlockPos.ofFloored(
|
||||
pos.x,
|
||||
pos.y - offsetAmount,
|
||||
pos.z
|
||||
);
|
||||
|
||||
return !entity.getEntityWorld().isAir(blockpos);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import net.minecraft.client.render.item.HeldItemRenderer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation.Mode;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -22,7 +22,7 @@ abstract class MixinHeldItemRenderer {
|
|||
private static final String LivingEntity = "Lnet/minecraft/entity/LivingEntity;";
|
||||
private static final String MatrixStack = "Lnet/minecraft/client/util/math/MatrixStack;";
|
||||
private static final String ItemStack = "Lnet/minecraft/item/ItemStack;";
|
||||
private static final String Mode = "Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;";
|
||||
private static final String Mode = "Lnet/minecraft/client/render/model/json/ModelTransformationMode;";
|
||||
private static final String VertexConsumerProvider = "Lnet/minecraft/client/render/VertexConsumerProvider;";
|
||||
private static final String World = "Lnet/minecraft/world/World;";
|
||||
private static final String ItemRenderer = "Lnet/minecraft/client/render/item/ItemRenderer;";
|
||||
|
@ -36,7 +36,7 @@ abstract class MixinHeldItemRenderer {
|
|||
private void redirectRenderItem(ItemRenderer target,
|
||||
@Nullable LivingEntity entity,
|
||||
ItemStack item,
|
||||
Mode transform,
|
||||
ModelTransformationMode transform,
|
||||
boolean left,
|
||||
MatrixStack stack,
|
||||
VertexConsumerProvider renderContext,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.minelittlepony.client.mixin;
|
||||
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.listener.ServerPlayPacketListener;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import com.minelittlepony.client.HorseCam;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.network.*;
|
||||
import net.minecraft.network.listener.ClientPlayPacketListener;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket.Flag;
|
||||
import net.minecraft.network.packet.s2c.play.PositionFlag;
|
||||
|
||||
import org.spongepowered.asm.mixin.*;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -19,12 +19,12 @@ abstract class MixinPlayerPositionLookS2CPacket implements Packet<ClientPlayPack
|
|||
@Shadow @Mutable
|
||||
private @Final float pitch;
|
||||
@Shadow
|
||||
private @Final Set<Flag> flags;
|
||||
private @Final Set<PositionFlag> flags;
|
||||
|
||||
@Inject(method = "apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V",
|
||||
at = @At("HEAD"))
|
||||
private void onApply(ClientPlayPacketListener clientPlayPacketListener, CallbackInfo info) {
|
||||
if (!flags.contains(PlayerPositionLookS2CPacket.Flag.Y_ROT)) {
|
||||
if (!flags.contains(PositionFlag.Y_ROT)) {
|
||||
pitch = HorseCam.transformIncomingServerCameraAngle(pitch);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,18 +16,16 @@ public class PonySnout implements IPart, MsonModel {
|
|||
|
||||
private boolean visible = false;
|
||||
|
||||
private ModelPart mare;
|
||||
private ModelPart stallion;
|
||||
private final ModelPart mare;
|
||||
private final ModelPart stallion;
|
||||
|
||||
public PonySnout(ModelPart tree) {
|
||||
|
||||
mare = tree.getChild("mare");
|
||||
stallion = tree.getChild("stallion");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(ModelContext context) {
|
||||
mare = context.findByName("mare");
|
||||
stallion = context.findByName("stallion");
|
||||
|
||||
PartBuilder head = context.getContext();
|
||||
head.addChild("mare", mare);
|
||||
head.addChild("stallion", stallion);
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.client.render.OverlayTexture;
|
|||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -46,7 +46,7 @@ public class LevitatingItemRenderer {
|
|||
/**
|
||||
* Renders a magical overlay over an item in third person.
|
||||
*/
|
||||
public void renderItemGlow(LivingEntity entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, int glowColor, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
public void renderItemGlow(LivingEntity entity, ItemStack drop, ModelTransformationMode transform, Arm hand, int glowColor, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
setColor(glowColor);
|
||||
stack.push();
|
||||
|
||||
|
@ -76,9 +76,9 @@ public class LevitatingItemRenderer {
|
|||
/**
|
||||
* Renders an item in first person optionally with a magical overlay.
|
||||
*/
|
||||
public void renderItemInFirstPerson(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformation.Mode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
|
||||
public void renderItemInFirstPerson(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformationMode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
|
||||
|
||||
if (entity instanceof PlayerEntity && (mode.isFirstPerson() || mode == ModelTransformation.Mode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformation.Mode.THIRD_PERSON_RIGHT_HAND)) {
|
||||
if (entity instanceof PlayerEntity && (mode.isFirstPerson() || mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND)) {
|
||||
|
||||
IPony pony = IPony.getManager().getPony((PlayerEntity)entity);
|
||||
|
||||
|
|
|
@ -65,7 +65,8 @@ public class PonyStandRenderer extends ArmorStandEntityRenderer {
|
|||
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> renderer, EntityRendererFactory.Context context) {
|
||||
super(renderer,
|
||||
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_INNER_ARMOR)),
|
||||
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_OUTER_ARMOR))
|
||||
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_OUTER_ARMOR)),
|
||||
context.getModelManager()
|
||||
);
|
||||
|
||||
pony.applyMetadata(new PonyData(Race.EARTH));
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.minelittlepony.client.model.entity.WitchPonyModel;
|
|||
import com.minelittlepony.client.render.entity.feature.HeldItemFeature;
|
||||
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
import net.minecraft.entity.mob.WitchEntity;
|
||||
|
@ -25,7 +25,7 @@ public class WitchRenderer extends PonyRenderer<WitchEntity, WitchPonyModel> {
|
|||
protected HeldItemFeature<WitchEntity, WitchPonyModel> createItemHoldingLayer() {
|
||||
return new HeldItemFeature<WitchEntity, WitchPonyModel>(this) {
|
||||
@Override
|
||||
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, MatrixStack stack) {
|
||||
protected void preItemRender(WitchEntity entity, ItemStack drop, ModelTransformationMode transform, Arm hand, MatrixStack stack) {
|
||||
super.preItemRender(entity, drop, transform, hand, stack);
|
||||
stack.multiply(RotationAxis.POSITIVE_X.rotationDegrees(10));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.minelittlepony.client.render.PonyRenderDispatcher;
|
|||
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -31,7 +31,7 @@ public class GlowingItemFeature<T extends LivingEntity, M extends EntityModel<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Mode transform, Arm arm, MatrixStack stack) {
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformationMode transform, Arm arm, MatrixStack stack) {
|
||||
super.preItemRender(entity, drop, transform, arm, stack);
|
||||
|
||||
if (!isUnicorn()) {
|
||||
|
@ -71,7 +71,7 @@ public class GlowingItemFeature<T extends LivingEntity, M extends EntityModel<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformationMode transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
if (isUnicorn()) {
|
||||
PonyRenderDispatcher.getInstance().getMagicRenderer().renderItemGlow(entity, drop, transform, hand, ((IUnicorn)getContextModel()).getMagicColor(), stack, renderContext);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.client.render.OverlayTexture;
|
|||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.client.render.entity.model.ModelWithArms;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -49,14 +49,14 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
|||
|
||||
model.transform(BodyPart.LEGS, stack);
|
||||
|
||||
renderHeldItem(entity, right, ModelTransformation.Mode.THIRD_PERSON_RIGHT_HAND, Arm.RIGHT, stack, renderContext, lightUv);
|
||||
renderHeldItem(entity, left, ModelTransformation.Mode.THIRD_PERSON_LEFT_HAND, Arm.LEFT, stack, renderContext, lightUv);
|
||||
renderHeldItem(entity, right, ModelTransformationMode.THIRD_PERSON_RIGHT_HAND, Arm.RIGHT, stack, renderContext, lightUv);
|
||||
renderHeldItem(entity, left, ModelTransformationMode.THIRD_PERSON_LEFT_HAND, Arm.LEFT, stack, renderContext, lightUv);
|
||||
|
||||
stack.pop();
|
||||
}
|
||||
}
|
||||
|
||||
private void renderHeldItem(T entity, ItemStack drop, ModelTransformation.Mode transform, Arm arm, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||
private void renderHeldItem(T entity, ItemStack drop, ModelTransformationMode transform, Arm arm, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||
if (!drop.isEmpty()) {
|
||||
stack.push();
|
||||
renderArm(arm, stack);
|
||||
|
@ -73,7 +73,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
|||
}
|
||||
}
|
||||
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformation.Mode transform, Arm arm, MatrixStack stack) {
|
||||
protected void preItemRender(T entity, ItemStack drop, ModelTransformationMode transform, Arm arm, MatrixStack stack) {
|
||||
float left = arm == Arm.LEFT ? 1 : -1;
|
||||
|
||||
UseAction action = drop.getUseAction();
|
||||
|
@ -103,7 +103,7 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
|||
stack.translate(left * -0.2F, 0.125F, -1);
|
||||
}
|
||||
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformation.Mode transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
protected void postItemRender(T entity, ItemStack drop, ModelTransformationMode transform, Arm hand, MatrixStack stack, VertexConsumerProvider renderContext) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@ import net.minecraft.client.render.block.entity.SkullBlockEntityModel;
|
|||
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
||||
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.ModelTransformationMode;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
|
@ -76,7 +76,7 @@ public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPo
|
|||
stack.translate(0, 0.6F, -0.21F);
|
||||
|
||||
MinecraftClient.getInstance().getItemRenderer()
|
||||
.renderItem(entity, itemstack, ModelTransformation.Mode.HEAD, false, stack, renderContext, entity.world, lightUv, OverlayTexture.DEFAULT_UV, entity.getId() + ModelTransformation.Mode.HEAD.ordinal());
|
||||
.renderItem(entity, itemstack, ModelTransformationMode.HEAD, false, stack, renderContext, entity.world, lightUv, OverlayTexture.DEFAULT_UV, entity.getId() + ModelTransformationMode.HEAD.ordinal());
|
||||
}
|
||||
|
||||
private void renderSkull(MatrixStack stack, VertexConsumerProvider renderContext, ItemStack itemstack, boolean isVillager, float limbDistance, int lightUv) {
|
||||
|
|
|
@ -77,7 +77,7 @@ public abstract class IllagerPonyRenderer<T extends IllagerEntity> extends PonyR
|
|||
@Override
|
||||
public void render(IllusionerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||
if (entity.isInvisible()) {
|
||||
Vec3d[] clones = entity.method_7065(tickDelta);
|
||||
Vec3d[] clones = entity.getMirrorCopyOffsets(tickDelta);
|
||||
float rotation = getAnimationProgress(entity, tickDelta);
|
||||
|
||||
for (int i = 0; i < clones.length; ++i) {
|
||||
|
|
|
@ -4,6 +4,7 @@ import net.minecraft.client.MinecraftClient;
|
|||
import net.minecraft.client.texture.*;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.ColorHelper;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.mojang.blaze3d.platform.TextureUtil;
|
||||
|
@ -60,7 +61,7 @@ public class TextureFlattener {
|
|||
|
||||
public static void copy(NativeImage from, NativeImage to, int x, int y) {
|
||||
int color = from.getColor(x, y);
|
||||
if (NativeImage.getAlpha(color) > 0) {
|
||||
if (ColorHelper.Argb.getAlpha(color) > 0) {
|
||||
to.setColor(x, y, color);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue