mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
New Decompiler Runtime Official mappings ItemStacks arnt Capability providers anymore, use Vanilla's system. Co-authored-by: RealMangoRage <[email protected]> Co-authored-by: Paint_Ninja <[email protected]>
59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
--- a/net/minecraft/client/model/HumanoidModel.java
|
|
+++ b/net/minecraft/client/model/HumanoidModel.java
|
|
@@ -308,6 +_,8 @@
|
|
case BRUSH:
|
|
this.rightArm.xRot = this.rightArm.xRot * 0.5F - (float) (Math.PI / 5);
|
|
this.rightArm.yRot = 0.0F;
|
|
+ default:
|
|
+ this.rightArmPose.applyTransform(this, p_102876_, net.minecraft.world.entity.HumanoidArm.RIGHT);
|
|
}
|
|
}
|
|
|
|
@@ -352,6 +_,8 @@
|
|
case BRUSH:
|
|
this.leftArm.xRot = this.leftArm.xRot * 0.5F - (float) (Math.PI / 5);
|
|
this.leftArm.yRot = 0.0F;
|
|
+ default:
|
|
+ this.leftArmPose.applyTransform(this, p_102879_, net.minecraft.world.entity.HumanoidArm.LEFT);
|
|
}
|
|
}
|
|
|
|
@@ -451,7 +_,7 @@
|
|
}
|
|
|
|
@OnlyIn(Dist.CLIENT)
|
|
- public static enum ArmPose {
|
|
+ public static enum ArmPose implements net.minecraftforge.common.IExtensibleEnum {
|
|
EMPTY(false),
|
|
ITEM(false),
|
|
BLOCK(false),
|
|
@@ -467,10 +_,28 @@
|
|
|
|
private ArmPose(final boolean p_102896_) {
|
|
this.twoHanded = p_102896_;
|
|
+ this.forgeArmPose = null;
|
|
}
|
|
|
|
public boolean isTwoHanded() {
|
|
return this.twoHanded;
|
|
+ }
|
|
+
|
|
+ @javax.annotation.Nullable
|
|
+ private final net.minecraftforge.client.IArmPoseTransformer forgeArmPose;
|
|
+
|
|
+ private ArmPose(boolean twoHanded, @javax.annotation.Nonnull net.minecraftforge.client.IArmPoseTransformer forgeArmPose) {
|
|
+ this.twoHanded = twoHanded;
|
|
+ com.google.common.base.Preconditions.checkNotNull(forgeArmPose, "Cannot create new ArmPose with null transformer!");
|
|
+ this.forgeArmPose = forgeArmPose;
|
|
+ }
|
|
+
|
|
+ public static ArmPose create(String name, boolean twoHanded, @javax.annotation.Nonnull net.minecraftforge.client.IArmPoseTransformer forgeArmPose) {
|
|
+ throw new IllegalStateException("Enum not extended");
|
|
+ }
|
|
+
|
|
+ public <T extends LivingEntity> void applyTransform(HumanoidModel<T> model, T entity, net.minecraft.world.entity.HumanoidArm arm) {
|
|
+ if (this.forgeArmPose != null) this.forgeArmPose.applyTransform(model, entity, arm);
|
|
}
|
|
}
|
|
}
|