mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Make piglin ponies more piggy
This commit is contained in:
parent
ffa9108f28
commit
a50d318065
6 changed files with 228 additions and 2 deletions
|
@ -1,16 +1,28 @@
|
|||
package com.minelittlepony.client.model.entity;
|
||||
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.entity.mob.HostileEntity;
|
||||
import net.minecraft.entity.mob.PiglinEntity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.api.pony.IPony;
|
||||
import com.minelittlepony.client.render.EquineRenderManager;
|
||||
import com.minelittlepony.mson.api.ModelContext;
|
||||
|
||||
public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
||||
|
||||
private PiglinEntity.Activity activity;
|
||||
|
||||
private ModelPart leftFlap;
|
||||
private ModelPart rightFlap;
|
||||
|
||||
@Override
|
||||
public void init(ModelContext context) {
|
||||
super.init(context);
|
||||
leftFlap = context.findByName("left_flap");
|
||||
rightFlap = context.findByName("right_flap");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLivingState(HostileEntity entity, IPony pony, EquineRenderManager.Mode mode) {
|
||||
super.updateLivingState(entity, pony, mode);
|
||||
|
@ -51,6 +63,11 @@ public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
|||
|
||||
helmet.copyPositionAndRotation(head);
|
||||
}
|
||||
|
||||
float progress = ticks * 0.1F + move * 0.5F;
|
||||
float range = 0.08F + swing * 0.4F;
|
||||
rightFlap.roll = -0.5235988F - MathHelper.cos(progress * 1.2F) * range;
|
||||
leftFlap.roll = 0.5235988F + MathHelper.cos(progress) * range;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ZomponyModel<Zombie extends HostileEntity> extends AlicornModel<Zom
|
|||
@Override
|
||||
public void animateModel(Zombie entity, float move, float swing, float ticks) {
|
||||
super.animateModel(entity, move, swing, ticks);
|
||||
isPegasus = entity.getUuid().getLeastSignificantBits() % 30 == 0;
|
||||
isPegasus = true;//entity.getUuid().getLeastSignificantBits() % 30 == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "minelittlepony:components/snout",
|
||||
"texture": {"w": 64, "h": 64, "u": 16, "v": 8},
|
||||
"locals": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"mare": {
|
||||
"type": "mson:planar",
|
||||
"offset": ["#x", "#y", "#z"],
|
||||
"north": [-2, -1, -7, 4, 3, 10, 13],
|
||||
"up": [-2, -1, -7, 4, 1, 10, 13],
|
||||
"down": [-2, 2, -7, 4, 1, 18, 7],
|
||||
"west": [-2, -1, -7, 1, 3, 9, 13],
|
||||
"east": [ 2, -1, -7, 1, 3, 14, 13]
|
||||
}
|
||||
}
|
|
@ -1,3 +1,194 @@
|
|||
{
|
||||
"parent": "minelittlepony:zombie"
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"parent": "minelittlepony:zombie",
|
||||
"head": {
|
||||
"center": [ 0, 0, -2 ],
|
||||
"cubes": [
|
||||
{ "from": [-4, -6, -6], "size": [ 8, 8, 8] }
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"name": "left_flap",
|
||||
"texture": {"u": 64, "v": 0},
|
||||
"rotate": [ 0, 0, 60 ],
|
||||
"center": [ 5, -4, 0 ],
|
||||
"cubes": [
|
||||
{ "from": [-2, -0.5, -2], "size": [ 4, 1, 4] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "right_flap",
|
||||
"texture": {"u": 64, "v": 0},
|
||||
"rotate": [ 0, 0, -60 ],
|
||||
"center": [-5, -4, 0 ],
|
||||
"cubes": [
|
||||
{ "from": [-2, -0.5, -2], "size": [ 4, 1, 4] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "mson:slot",
|
||||
"name": "snout",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonySnout",
|
||||
"content": "minelittlepony:components/pig_snout"
|
||||
},
|
||||
{
|
||||
"type": "mson:slot",
|
||||
"name": "ears",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyEars",
|
||||
"content": "minelittlepony:components/ears"
|
||||
},
|
||||
{
|
||||
"type": "mson:slot",
|
||||
"name": "horn",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.UnicornHorn",
|
||||
"content": "minelittlepony:components/horn"
|
||||
}
|
||||
]
|
||||
},
|
||||
"wings": {
|
||||
"type": "mson:slot",
|
||||
"name": "wings",
|
||||
"implementation": "com.minelittlepony.client.model.part.PegasusWings",
|
||||
"content": {
|
||||
"left_wing": {
|
||||
"type": "mson:slot",
|
||||
"name": "left_wing",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PegasusWings$Wing",
|
||||
"content": {
|
||||
"folded": {
|
||||
"texture": {"u": 56, "v": 32},
|
||||
"center": [0, 13, -2],
|
||||
"rotate": [90, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [4, 5, 2], "size": [2, 6, 2] },
|
||||
{"from": [4, 5, 4], "size": [2, 8, 2] },
|
||||
{"from": [4, 5, 6], "size": [2, 6, 2] }
|
||||
]
|
||||
},
|
||||
"extended": {
|
||||
"texture": {"u": 57, "v": 35},
|
||||
"center": [4.5, 5.3, 6],
|
||||
"rotate": [-30, 180, 0],
|
||||
"children": [
|
||||
{ "cubes": [ {"from": [-0.5, 6, 0], "size": [1, 9, 2], "stretch": 0.1 } ] },
|
||||
{ "cubes": [ {"from": [-0.5,-1, -0.3], "size": [1, 8, 2], "stretch": 0.1 } ], "rotate": [-48, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 1.8, 1.3], "size": [1, 8, 2], "stretch": -0.1 } ], "rotate": [-42, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 5, 2], "size": [1, 8, 2] } ], "rotate": [-28, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 0, -0.2], "size": [1, 6, 2], "stretch": 0.3 } ] },
|
||||
{ "cubes": [ {"from": [-0.5, 0, 0], "size": [1, 3, 2], "stretch": 0.19 } ], "rotate": [-48, 0, 0] }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"right_wing": {
|
||||
"type": "mson:slot",
|
||||
"name": "right_wing",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PegasusWings$Wing",
|
||||
"content": {
|
||||
"folded": {
|
||||
"texture": {"u": 56, "v": 16},
|
||||
"center": [0, 13, -2],
|
||||
"rotate": [90, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [-6, 5, 2], "size": [2, 6, 2] },
|
||||
{"from": [-6, 5, 4], "size": [2, 8, 2] },
|
||||
{"from": [-6, 5, 6], "size": [2, 6, 2] }
|
||||
]
|
||||
},
|
||||
"extended": {
|
||||
"texture": {"u": 56, "v": 19},
|
||||
"center": [-4.5, 5.3, 6],
|
||||
"rotate": [-30, 180, 0],
|
||||
"children": [
|
||||
{ "cubes": [ {"from": [-0.5, 6, 0], "size": [1, 9, 2], "stretch": 0.1 } ] },
|
||||
{ "cubes": [ {"from": [-0.5,-1, -0.3], "size": [1, 8, 2], "stretch": 0.1 } ], "rotate": [-48, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 1.8, 1.3], "size": [1, 8, 2], "stretch": -0.1 } ], "rotate": [-42, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 5, 2], "size": [1, 8, 2] } ], "rotate": [-28, 0, 0] },
|
||||
{ "cubes": [ {"from": [-0.5, 0, -0.2], "size": [1, 6, 2], "stretch": 0.3 } ] },
|
||||
{ "cubes": [ {"from": [-0.5, 0, 0], "size": [1, 3, 2], "stretch": 0.19 } ], "rotate": [-48, 0, 0] }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"legacy_right_wing": {
|
||||
"type": "mson:slot",
|
||||
"name": "legacy_right_wing",
|
||||
|
||||
"implementation": "com.minelittlepony.client.model.part.PegasusWings$Wing",
|
||||
"content": {
|
||||
"folded": {
|
||||
"texture": {"u": 56, "v": 32},
|
||||
"center": [0, 13, -2],
|
||||
"rotate": [90, 0, 0],
|
||||
"cubes": [
|
||||
{"from": [-6, 5, 2], "size": [2, 6, 2] },
|
||||
{"from": [-6, 5, 4], "size": [2, 8, 2] },
|
||||
{"from": [-6, 5, 6], "size": [2, 6, 2] }
|
||||
]
|
||||
},
|
||||
"extended": {
|
||||
"texture": {"u": 57, "v": 35, "w": 64, "h": 64},
|
||||
"center": [-4.5, 5.3, 6],
|
||||
"rotate": [-30, 180, 0],
|
||||
"children": [
|
||||
{ "cubes": [ {"from": [-0.5, 6, 0], "size": [1, 9, 2], "stretch": 0.1 } ], "mirror": true },
|
||||
{ "cubes": [ {"from": [-0.5,-1, -0.3], "size": [1, 8, 2], "stretch": 0.1 } ], "rotate": [-48, 0, 0], "mirror": true },
|
||||
{ "cubes": [ {"from": [-0.5, 1.8, 1.3], "size": [1, 8, 2], "stretch": -0.1 } ], "rotate": [-42, 0, 0], "mirror": true },
|
||||
{ "cubes": [ {"from": [-0.5, 5, 2], "size": [1, 8, 2] } ], "rotate": [-28 , 0, 0], "mirror": true },
|
||||
{ "cubes": [ {"from": [-0.5, 0, -0.2], "size": [1, 6, 2], "stretch": 0.3 } ] },
|
||||
{ "cubes": [ {"from": [-0.5, 0, 0], "size": [1, 3, 2], "stretch": 0.19 } ], "rotate": [-48, 0, 0], "mirror": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tail": {
|
||||
"type": "mson:slot",
|
||||
"name": "tail",
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyTail",
|
||||
"content": {
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"locals": {
|
||||
"segments": 4
|
||||
},
|
||||
"segment_0": {
|
||||
"type": "mson:slot",
|
||||
"name": "segment_0",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyTail$Segment",
|
||||
"locals": { "segment_index": 0 },
|
||||
"content": "minelittlepony:components/tail_segment"
|
||||
},
|
||||
"segment_1": {
|
||||
"type": "mson:slot",
|
||||
"name": "segment_1",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyTail$Segment",
|
||||
"locals": { "segment_index": 1 },
|
||||
"content": "minelittlepony:components/tail_segment"
|
||||
},
|
||||
"segment_2": {
|
||||
"type": "mson:slot",
|
||||
"name": "segment_2",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyTail$Segment",
|
||||
"locals": { "segment_index": 2 },
|
||||
"content": "minelittlepony:components/tail_segment"
|
||||
},
|
||||
"segment_3": {
|
||||
"type": "mson:slot",
|
||||
"name": "segment_3",
|
||||
"texture": {"w": 128, "h": 64},
|
||||
"implementation": "com.minelittlepony.client.model.part.PonyTail$Segment",
|
||||
"locals": { "segment_index": 3 },
|
||||
"content": "minelittlepony:components/tail_segment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
Loading…
Reference in a new issue