mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Convert saddlebags to json
This commit is contained in:
parent
ca9df128cd
commit
db6a1f68e1
2 changed files with 85 additions and 51 deletions
|
@ -1,6 +1,5 @@
|
|||
package com.minelittlepony.client.model.gear;
|
||||
|
||||
import com.minelittlepony.client.util.render.Part;
|
||||
import com.minelittlepony.model.BodyPart;
|
||||
import com.minelittlepony.model.IModel;
|
||||
import com.minelittlepony.model.IPegasus;
|
||||
|
@ -30,13 +29,8 @@ public class SaddleBags extends AbstractGear {
|
|||
|
||||
float dropAmount = 0;
|
||||
|
||||
|
||||
private IModel model;
|
||||
|
||||
public SaddleBags() {
|
||||
init(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(ModelContext context) {
|
||||
strap = context.findByName("strap");
|
||||
|
@ -44,51 +38,6 @@ public class SaddleBags extends AbstractGear {
|
|||
rightBag = context.findByName("right_bag");
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void init(float yOffset, float stretch) {
|
||||
leftBag = new Part(this, 56, 19);
|
||||
rightBag = new Part(this, 56, 19);
|
||||
strap = new Part(this, 56, 19);
|
||||
|
||||
float y = -0.5F;
|
||||
int x = 4;
|
||||
int z = -1;
|
||||
|
||||
((Part)strap).offset(-x, y + 0.2F, z + 3).around(0, 4, 4)
|
||||
.tex(56, 31).top(0, 0, 0, 8, 1, stretch)
|
||||
.top(0, 0, 1, 8, 1, stretch)
|
||||
.south(0, 0, 2, 8, 1, stretch)
|
||||
.north(0, 0, 0, 8, 1, stretch)
|
||||
.child(0).offset(0, -3, -0.305F).tex(56, 31)
|
||||
.west( 4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there
|
||||
.west( 4.0002F, -1, 0, 1, 3, stretch) // otherwise straps
|
||||
.west(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body
|
||||
.west(-4.0002F, -1, 0, 1, 3, stretch)
|
||||
.pitch = ROTATE_270;
|
||||
|
||||
((Part)leftBag).offset(x, y, z).around(0, 4, 4)
|
||||
.tex(56, 25).south(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).south(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19) .west(3, 0, 0, 6, 8, stretch)
|
||||
.west(0, 0, 0, 6, 8, stretch)
|
||||
.child(0).offset(z, y, -x).tex(56, 16)
|
||||
.top(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().bottom(0, 6, -3, 8, 3, stretch)
|
||||
.yaw = ROTATE_270;
|
||||
|
||||
x += 3;
|
||||
|
||||
((Part)rightBag).offset(-x, y, z).around(0, 4, 4).flipX()
|
||||
.tex(56, 25).south(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).south(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19).west(3, 0, 0, 6, 8, stretch)
|
||||
.west(0, 0, 0, 6, 8, stretch)
|
||||
.child(0).offset(z, y, x).tex(56, 16)
|
||||
.flipZ().top(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().bottom(0, 6, -3, 8, 3, stretch)
|
||||
.yaw = ROTATE_270;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLivingAnimations(IModel model, Entity entity) {
|
||||
this.model = model;
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
"texture": {"w": 64, "h": 64},
|
||||
"left_bag": {
|
||||
"type": "mson:planar",
|
||||
"texture": {"u": 56, "v": 19},
|
||||
"offset": [4, -0.5, -1],
|
||||
"center": [0, 4, 4],
|
||||
"south": [
|
||||
[0, 0, 0, 3, 6, 56, 25],
|
||||
[0, 0, 8, 3, 6, 59, 25]
|
||||
],
|
||||
"west": [
|
||||
[3, 0, 0, 6, 8, 56, 19],
|
||||
[0, 0, 0, 6, 8, 56, 19]
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"rotate": [270, 0, 0],
|
||||
"offset": [-1, -0.5, -4],
|
||||
"top": [0, 0, -3, 8, 3, 56, 16],
|
||||
"children": [
|
||||
{
|
||||
"type": "mson:plane",
|
||||
"from": [0, 6, -3], "size": [-3, 8, 3],
|
||||
"mirror": [false, false, true]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"right_bag": {
|
||||
"type": "mson:planar",
|
||||
"texture": {"u": 56, "v": 19},
|
||||
"offset": [-7, -0.5, -1],
|
||||
"center": [0, 4, 4],
|
||||
"south": [
|
||||
[0, 0, 0, 3, 6, 56, 25],
|
||||
[0, 0, 8, 3, 6, 59, 25]
|
||||
],
|
||||
"west": [
|
||||
[3, 0, 0, 6, 8, 56, 19],
|
||||
[0, 0, 0, 6, 8, 56, 19]
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"rotate": [270, 0, 0],
|
||||
"offset": [-1, -0.5, 7],
|
||||
"top": [0, 0, -3, 8, 3, 56, 16],
|
||||
"children": [
|
||||
{
|
||||
"type": "mson:plane",
|
||||
"from": [0, 6, -3], "size": [-3, 8, 3],
|
||||
"mirror": [false, false, true]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"strap": {
|
||||
"type": "mson:planar",
|
||||
"texture": {"u": 56, "v": 19},
|
||||
"offset": [-4, -0.3, 2],
|
||||
"center": [0, 4, 4],
|
||||
"top": [
|
||||
[0, 0, 0, 8, 1],
|
||||
[0, 0, 1, 8, 1]
|
||||
],
|
||||
"south": [0, 0, 2, 8, 1],
|
||||
"north": [0, 0, 0, 8, 1],
|
||||
"children": [
|
||||
{
|
||||
"type": "mson:planar",
|
||||
"offset": [0.0002, -3, -0.305],
|
||||
"texture": {"u": 56, "v": 31},
|
||||
"rotate": [270, 0, 0],
|
||||
"west": [
|
||||
[ 4, 0, 0, 1, 3],
|
||||
[ 4, -1, 0, 1, 3],
|
||||
[-4, 0, 0, 1, 3],
|
||||
[-4, -1, 0, 1, 3]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue