mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Update Mson
This commit is contained in:
parent
87d2d466a7
commit
aab8de2e89
7 changed files with 25 additions and 24 deletions
|
@ -43,6 +43,7 @@ minecraft {
|
|||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = 'modmenu'
|
||||
url = 'https://maven.terraformersmc.com/releases'
|
||||
|
|
|
@ -20,4 +20,4 @@ org.gradle.daemon=false
|
|||
modmenu_version=2.0.0-beta.7
|
||||
kirin_version=1.8.7-1.17
|
||||
hd_skins_version=6.4.6-1.17-rc1
|
||||
mson_version=1.3.3-1.17-rc1
|
||||
mson_version=1.4.0-beta.4
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.minelittlepony.api.pony.meta.Race;
|
|||
import com.minelittlepony.api.pony.meta.Sizes;
|
||||
import com.minelittlepony.client.model.armour.ArmourWrapper;
|
||||
import com.minelittlepony.client.transform.PonyTransformation;
|
||||
import com.minelittlepony.mson.api.model.MsonPart;
|
||||
import com.minelittlepony.mson.util.PartUtil;
|
||||
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
|
@ -125,10 +125,10 @@ public abstract class AbstractPonyModel<T extends LivingEntity> extends ClientPo
|
|||
|
||||
head.setPivot(1, 2, sneaking ? -1 : 1);
|
||||
|
||||
MsonPart.of(rightArm).shift(0, 2, 6);
|
||||
MsonPart.of(leftArm).shift(0, 2, 6);
|
||||
MsonPart.of(rightLeg).shift(0, 2, -8);
|
||||
MsonPart.of(leftLeg).shift(0, 2, -8);
|
||||
PartUtil.shift(rightArm, 0, 2, 6);
|
||||
PartUtil.shift(leftArm, 0, 2, 6);
|
||||
PartUtil.shift(rightLeg, 0, 2, -8);
|
||||
PartUtil.shift(leftLeg, 0, 2, -8);
|
||||
}
|
||||
|
||||
protected void ponySit() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.client.render.entity.model.ArmorStandEntityModel;
|
|||
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
||||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||
|
||||
import com.minelittlepony.mson.api.model.MsonPart;
|
||||
import com.minelittlepony.mson.util.PartUtil;
|
||||
|
||||
public class PonyArmourStandModel extends ArmorStandEntityModel {
|
||||
|
||||
|
@ -16,22 +16,22 @@ public class PonyArmourStandModel extends ArmorStandEntityModel {
|
|||
@Override
|
||||
public void setAngles(ArmorStandEntity entity, float move, float swing, float ticks, float headYaw, float headPitch) {
|
||||
super.setAngles(entity, move, swing, ticks, headYaw, headPitch);
|
||||
this.leftArm.visible = true;
|
||||
this.rightArm.visible = true;
|
||||
leftArm.visible = true;
|
||||
rightArm.visible = true;
|
||||
|
||||
MsonPart.of(this.leftLeg).rotateTo(this.leftArm);
|
||||
MsonPart.of(this.rightLeg).rotateTo(this.rightArm);
|
||||
PartUtil.copyAngles(leftArm, leftLeg);
|
||||
PartUtil.copyAngles(rightArm, rightLeg);
|
||||
|
||||
leftLeg.pitch *= -1;
|
||||
rightLeg.pitch *= -1;
|
||||
}
|
||||
|
||||
public void applyAnglesTo(BipedEntityModel<ArmorStandEntity> dest) {
|
||||
MsonPart.of(dest.head).rotateTo(head);
|
||||
MsonPart.of(dest.hat).rotateTo(hat);
|
||||
MsonPart.of(dest.leftLeg).rotateTo(leftLeg);
|
||||
MsonPart.of(dest.rightLeg).rotateTo(rightLeg);
|
||||
MsonPart.of(dest.leftArm).rotateTo(leftArm);
|
||||
MsonPart.of(dest.rightArm).rotateTo(rightArm);
|
||||
PartUtil.copyAngles(head, dest.head);
|
||||
PartUtil.copyAngles(hat, dest.hat);
|
||||
PartUtil.copyAngles(leftLeg, dest.leftLeg);
|
||||
PartUtil.copyAngles(rightLeg, dest.rightLeg);
|
||||
PartUtil.copyAngles(leftArm, dest.leftArm);
|
||||
PartUtil.copyAngles(rightArm, dest.rightArm);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.minelittlepony.client.model.entity;
|
|||
|
||||
import com.minelittlepony.client.model.IMobModel;
|
||||
import com.minelittlepony.client.model.entity.race.AlicornModel;
|
||||
import com.minelittlepony.mson.api.model.MsonPart;
|
||||
import com.minelittlepony.mson.util.PartUtil;
|
||||
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.entity.mob.HostileEntity;
|
||||
|
@ -29,10 +29,10 @@ public class ZomponyModel<Zombie extends HostileEntity> extends AlicornModel<Zom
|
|||
if (isZombified(entity)) {
|
||||
if (islookAngleRight(move)) {
|
||||
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
||||
MsonPart.of(rightArm).shift(0.5F, 1.5F, 3);
|
||||
PartUtil.shift(rightArm, 0.5F, 1.5F, 3);
|
||||
} else {
|
||||
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
||||
MsonPart.of(leftArm).shift(-0.5F, 1.5F, 3);
|
||||
PartUtil.shift(leftArm, -0.5F, 1.5F, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.entity.mob.ZombieVillagerEntity;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.client.model.IMobModel;
|
||||
import com.minelittlepony.mson.api.model.MsonPart;
|
||||
import com.minelittlepony.mson.util.PartUtil;
|
||||
|
||||
public class ZomponyVillagerModel extends VillagerPonyModel<ZombieVillagerEntity> implements IMobModel {
|
||||
|
||||
|
@ -20,10 +20,10 @@ public class ZomponyVillagerModel extends VillagerPonyModel<ZombieVillagerEntity
|
|||
if (rightArmPose == ArmPose.EMPTY) {
|
||||
if (islookAngleRight(move)) {
|
||||
rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
|
||||
MsonPart.of(rightArm).shift(0.5F, 1.5F, 3);
|
||||
PartUtil.shift(rightArm, 0.5F, 1.5F, 3);
|
||||
} else {
|
||||
rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
|
||||
MsonPart.of(leftArm).shift(-0.5F, 1.5F, 3);
|
||||
PartUtil.shift(leftArm, -0.5F, 1.5F, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class PonyTail implements IPart, MsonModel {
|
|||
theModel = context.getModel();
|
||||
|
||||
try {
|
||||
int segments = context.getLocals().getValue("segments").get().intValue();
|
||||
int segments = context.getLocals().getLocal("segments").get().intValue();
|
||||
|
||||
ModelContext subContext = context.resolve(this);
|
||||
|
||||
|
|
Loading…
Reference in a new issue