mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-21 20:18:01 +01:00
1.19.4 -> 1.19.3
This commit is contained in:
parent
fe1fc94127
commit
3b3b1740fe
15 changed files with 34 additions and 58 deletions
|
@ -60,6 +60,7 @@ dependencies {
|
|||
include "com.minelittlepony:mson:${project.mson_version}"
|
||||
|
||||
modImplementation "com.minelittlepony:hdskins:${project.hd_skins_version}"
|
||||
// modImplementation "com.minelittlepony:bigpony:${project.bigpony_version}"
|
||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
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
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.5
|
||||
loader_version=0.14.19
|
||||
fabric_version=0.76.0+1.19.3
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -16,11 +16,13 @@ org.gradle.daemon=false
|
|||
|
||||
# Publishing
|
||||
minecraft_version_range=1.19.4
|
||||
minecraft_version_range=1.19.3
|
||||
modrinth_loader_type=fabric
|
||||
modrinth_project_id=JBjInUXM
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=6.1.0-rc.4
|
||||
kirin_version=1.15.2+1.19.4
|
||||
hd_skins_version=6.10.1+1.19.4
|
||||
mson_version=1.8.1
|
||||
modmenu_version=5.0.0-alpha.3
|
||||
kirin_version=1.15.2+1.19.3
|
||||
hd_skins_version=6.10.1+1.19.3
|
||||
bigpony_version=1.8.0+lts
|
||||
mson_version=1.8.0+lts.1.19.3
|
||||
|
|
|
@ -58,7 +58,7 @@ public final class PonyPosture {
|
|||
double offsetAmount = below.getBlock() instanceof StairsBlock ? 1 : 0.05;
|
||||
|
||||
Vec3d pos = entity.getPos();
|
||||
BlockPos blockpos = BlockPos.ofFloored(
|
||||
BlockPos blockpos = new BlockPos(
|
||||
pos.x,
|
||||
pos.y - offsetAmount,
|
||||
pos.z
|
||||
|
|
|
@ -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.ModelTransformationMode;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
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/ModelTransformationMode;";
|
||||
private static final String Mode = "Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;";
|
||||
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,
|
||||
ModelTransformationMode transform,
|
||||
ModelTransformation.Mode transform,
|
||||
boolean left,
|
||||
MatrixStack stack,
|
||||
VertexConsumerProvider renderContext,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.minelittlepony.client.mixin;
|
||||
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.listener.ServerPlayPacketListener;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@ import com.minelittlepony.client.HorseCam;
|
|||
import java.util.Set;
|
||||
|
||||
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.PositionFlag;
|
||||
import net.minecraft.network.Packet;
|
||||
|
||||
import org.spongepowered.asm.mixin.*;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -19,12 +18,12 @@ abstract class MixinPlayerPositionLookS2CPacket implements Packet<ClientPlayPack
|
|||
@Shadow @Mutable
|
||||
private @Final float pitch;
|
||||
@Shadow
|
||||
private @Final Set<PositionFlag> flags;
|
||||
private @Final Set<PlayerPositionLookS2CPacket.Flag> flags;
|
||||
|
||||
@Inject(method = "apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V",
|
||||
at = @At("HEAD"))
|
||||
private void onApply(ClientPlayPacketListener clientPlayPacketListener, CallbackInfo info) {
|
||||
if (!flags.contains(PositionFlag.Y_ROT)) {
|
||||
if (!flags.contains(PlayerPositionLookS2CPacket.Flag.Y_ROT)) {
|
||||
pitch = HorseCam.transformIncomingServerCameraAngle(pitch);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -25,7 +25,7 @@ public class LevitatingItemRenderer {
|
|||
final int color = pony.metadata().getGlowColor();
|
||||
return layer -> {
|
||||
Identifier texture = RenderLayerUtil.getTexture(layer).orElse(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE);
|
||||
if (texture == ItemRenderer.ENTITY_ENCHANTMENT_GLINT || texture == ItemRenderer.ITEM_ENCHANTMENT_GLINT) {
|
||||
if (texture == ItemRenderer.ENCHANTED_ITEM_GLINT) {
|
||||
return renderContext.getBuffer(layer);
|
||||
}
|
||||
return renderContext.getBuffer(MagicGlow.getColoured(texture, color));
|
||||
|
@ -35,9 +35,9 @@ public class LevitatingItemRenderer {
|
|||
/**
|
||||
* Renders an item with a magical overlay.
|
||||
*/
|
||||
public void renderItem(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformationMode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
|
||||
public void renderItem(ItemRenderer itemRenderer, @Nullable LivingEntity entity, ItemStack stack, ModelTransformation.Mode mode, boolean left, MatrixStack matrix, VertexConsumerProvider renderContext, @Nullable World world, int lightUv, int posLong) {
|
||||
|
||||
if (entity instanceof PlayerEntity && (mode.isFirstPerson() || mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND)) {
|
||||
if (entity instanceof PlayerEntity && (mode.isFirstPerson() || mode == ModelTransformation.Mode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformation.Mode.THIRD_PERSON_RIGHT_HAND)) {
|
||||
|
||||
IPony pony = IPony.getManager().getPony((PlayerEntity)entity);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
|
|||
}
|
||||
|
||||
protected void addFeatures(EntityRendererFactory.Context context) {
|
||||
addFeature(new ArmourFeature<>(this, context.getModelManager()));
|
||||
addFeature(new ArmourFeature<>(this));
|
||||
addFeature(createHeldItemFeature(context));
|
||||
addFeature(new SkullFeature<>(this, context.getModelLoader()));
|
||||
addFeature(new ElytraFeature<>(this));
|
||||
|
|
|
@ -51,7 +51,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements IPonyRen
|
|||
|| feature instanceof ElytraFeatureRenderer
|
||||
|| feature instanceof ShoulderParrotFeatureRenderer;
|
||||
});
|
||||
addLayer(new ArmourFeature<>(this, context.getModelManager()));
|
||||
addLayer(new ArmourFeature<>(this));
|
||||
addLayer(new HeldItemFeature(this, context.getHeldItemRenderer()));
|
||||
addLayer(new DJPon3Feature<>(this));
|
||||
addLayer(new CapeFeature<>(this));
|
||||
|
|
|
@ -65,8 +65,7 @@ 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)),
|
||||
context.getModelManager()
|
||||
new ArmorStandArmorEntityModel(context.getPart(EntityModelLayers.ARMOR_STAND_OUTER_ARMOR))
|
||||
);
|
||||
|
||||
pony.applyMetadata(new PonyData(Race.EARTH));
|
||||
|
|
|
@ -7,23 +7,18 @@ import com.minelittlepony.client.model.armour.DefaultArmourTextureResolver;
|
|||
import com.minelittlepony.client.render.IPonyRenderContext;
|
||||
import com.minelittlepony.common.util.Color;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.entity.model.*;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.BakedModelManager;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.trim.ArmorTrim;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
|
||||
|
||||
public ArmourFeature(IPonyRenderContext<T, M> context, BakedModelManager bakery) {
|
||||
public ArmourFeature(IPonyRenderContext<T, M> context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
|
@ -83,16 +78,6 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IP
|
|||
m.render(matrices, getArmorConsumer(renderContext, tex, false), light, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
|
||||
});
|
||||
}
|
||||
|
||||
if (stack.getItem() instanceof ArmorItem armor) {
|
||||
ArmorTrim.getTrim(entity.getWorld().getRegistryManager(), stack).ifPresent(trim -> {
|
||||
pony.getArmourModel(stack, layer, ArmourVariant.TRIM)
|
||||
.filter(m -> m.poseModel(entity, limbAngle, limbDistance, age, headYaw, headPitch, armorSlot, layer, pony.body()))
|
||||
.ifPresent(m -> {
|
||||
m.render(matrices, getTrimConsumer(renderContext, armor.getMaterial(), trim, layer, glint), light, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -100,14 +85,4 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IP
|
|||
return ItemRenderer.getArmorGlintConsumer(provider, RenderLayer.getArmorCutoutNoCull(texture), false, glint);
|
||||
}
|
||||
|
||||
private static VertexConsumer getTrimConsumer(VertexConsumerProvider provider, ArmorMaterial material, ArmorTrim trim, ArmourLayer layer, boolean glint) {
|
||||
SpriteAtlasTexture armorTrimsAtlas = MinecraftClient.getInstance().getBakedModelManager().getAtlas(TexturedRenderLayers.ARMOR_TRIMS_ATLAS_TEXTURE);
|
||||
Sprite sprite = armorTrimsAtlas.getSprite(
|
||||
layer == ArmourLayer.INNER ? trim.getLeggingsModelId(material) : trim.getGenericModelId(material)
|
||||
);
|
||||
|
||||
return sprite.getTextureSpecificVertexConsumer(
|
||||
ItemRenderer.getDirectItemGlintConsumer(provider, TexturedRenderLayers.getArmorTrims(), true, glint)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
|||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.client.render.entity.model.ModelWithArms;
|
||||
import net.minecraft.client.render.item.HeldItemRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformationMode;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -46,9 +46,9 @@ public class HeldItemFeature<T extends LivingEntity, M extends EntityModel<T> &
|
|||
model.transform(BodyPart.LEGS, stack);
|
||||
|
||||
model.getAttributes().heldStack = right;
|
||||
renderItem(entity, right, ModelTransformationMode.THIRD_PERSON_RIGHT_HAND, Arm.RIGHT, stack, renderContext, lightUv);
|
||||
renderItem(entity, right, ModelTransformation.Mode.THIRD_PERSON_RIGHT_HAND, Arm.RIGHT, stack, renderContext, lightUv);
|
||||
model.getAttributes().heldStack = left;
|
||||
renderItem(entity, left, ModelTransformationMode.THIRD_PERSON_LEFT_HAND, Arm.LEFT, stack, renderContext, lightUv);
|
||||
renderItem(entity, left, ModelTransformation.Mode.THIRD_PERSON_LEFT_HAND, Arm.LEFT, stack, renderContext, lightUv);
|
||||
model.getAttributes().heldStack = ItemStack.EMPTY;
|
||||
stack.pop();
|
||||
}
|
||||
|
|
|
@ -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.ModelTransformationMode;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
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, ModelTransformationMode.HEAD, false, stack, renderContext, entity.getWorld(), lightUv, OverlayTexture.DEFAULT_UV, entity.getId() + ModelTransformationMode.HEAD.ordinal());
|
||||
.renderItem(entity, itemstack, ModelTransformation.Mode.HEAD, false, stack, renderContext, entity.getWorld(), lightUv, OverlayTexture.DEFAULT_UV, entity.getId() + ModelTransformation.Mode.HEAD.ordinal());
|
||||
}
|
||||
|
||||
private void renderSkull(MatrixStack stack, VertexConsumerProvider renderContext, ItemStack itemstack, boolean isVillager, float limbDistance, int lightUv) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public class IllagerPonyRenderer<T extends IllagerEntity> extends PonyRenderer<T
|
|||
@Override
|
||||
public void render(IllusionerEntity entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
|
||||
if (entity.isInvisible()) {
|
||||
Vec3d[] clones = entity.getMirrorCopyOffsets(tickDelta);
|
||||
Vec3d[] clones = entity.method_7065(tickDelta);
|
||||
float rotation = getAnimationProgress(entity, tickDelta);
|
||||
|
||||
for (int i = 0; i < clones.length; ++i) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public interface PonyPosture {
|
|||
|
||||
if (RenderPass.getCurrent() == RenderPass.GUI) {
|
||||
Vec3d vec3d = player.getRotationVec(tickDelta);
|
||||
Vec3d vec3d2 = ((AbstractClientPlayerEntity)player).lerpVelocity(tickDelta);
|
||||
Vec3d vec3d2 = ((AbstractClientPlayerEntity)player).getVelocity();
|
||||
double d = vec3d2.horizontalLengthSquared();
|
||||
double e = vec3d.horizontalLengthSquared();
|
||||
if (d > 0.0 && e > 0.0) {
|
||||
|
|
Loading…
Reference in a new issue