mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Convert the witch hat to json
This commit is contained in:
parent
8f6f21b67b
commit
b879ac2f44
2 changed files with 36 additions and 26 deletions
|
@ -1,10 +1,8 @@
|
||||||
package com.minelittlepony.client.model.gear;
|
package com.minelittlepony.client.model.gear;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelPart;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
import com.minelittlepony.client.util.render.Part;
|
|
||||||
import com.minelittlepony.model.BodyPart;
|
import com.minelittlepony.model.BodyPart;
|
||||||
import com.minelittlepony.model.IModel;
|
import com.minelittlepony.model.IModel;
|
||||||
import com.minelittlepony.model.gear.IStackable;
|
import com.minelittlepony.model.gear.IStackable;
|
||||||
|
@ -15,34 +13,11 @@ public class WitchHat extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
private static final Identifier WITCH_TEXTURES = new Identifier("textures/entity/witch.png");
|
private static final Identifier WITCH_TEXTURES = new Identifier("textures/entity/witch.png");
|
||||||
|
|
||||||
private ModelPart witchHat;
|
|
||||||
|
|
||||||
public WitchHat() {
|
|
||||||
init(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
witchHat = context.findByName("witch_hat");
|
accept(context.findByName("witch_hat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public void init(float yOffset, float stretch) {
|
|
||||||
accept(witchHat = new Part(this).size(64, 128));
|
|
||||||
((Part)witchHat).around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
|
||||||
.tex(0, 64).box(-5, -6, -7, 10, 2, 10, stretch)
|
|
||||||
.child(0).around(1.75F, -4, 2)
|
|
||||||
.tex(0, 76).box(-5, -5, -7, 7, 4, 7, stretch)
|
|
||||||
.rotate(-0.05235988F, 0, 0.02617994F)
|
|
||||||
.child(0).around(1.75F, -4, 2)
|
|
||||||
.tex(0, 87).box(-5, -4, -7, 4, 4, 4, stretch)
|
|
||||||
.rotate(-0.10471976F, 0, 0.05235988F)
|
|
||||||
.child(0).around(1.75F, -2, 2)
|
|
||||||
.tex(0, 95).box(-5, -2, -7, 1, 2, 1, stretch)
|
|
||||||
.rotate(-0.20943952F, 0, 0.10471976F);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRender(IModel model, Entity entity) {
|
public boolean canRender(IModel model, Entity entity) {
|
||||||
return model.isWearing(Wearable.HAT);
|
return model.isWearing(Wearable.HAT);
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"texture": {"w": 16, "h": 8, "u": 64, "h": 128},
|
||||||
|
"witch_hat": {
|
||||||
|
"texture": {"u": 0, "v": 64},
|
||||||
|
"cubes": [
|
||||||
|
{ "from": [-5, -6, -7], "size": [10, 2, 10] }
|
||||||
|
],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"center": [1.75, -4, 2],
|
||||||
|
"texture": {"u": 0, "v": 76},
|
||||||
|
"rotate": [3, 0, 1.5],
|
||||||
|
"cubes": [
|
||||||
|
{ "from": [-5, -5, -7], "size": [7, 4, 7] }
|
||||||
|
],
|
||||||
|
"children": [
|
||||||
|
"center": [1.75, -4, 2],
|
||||||
|
"texture": {"u": 0, "v": 87},
|
||||||
|
"rotate": [6, 0, 3],
|
||||||
|
"cubes": [
|
||||||
|
{ "from": [-5, -4, -7], "size": [4, 4, 4] }
|
||||||
|
],
|
||||||
|
"children": [
|
||||||
|
"center": [1.75, -2, 2],
|
||||||
|
"texture": {"u": 0, "v": 95],
|
||||||
|
"rotate": [12, 0, 6],
|
||||||
|
"cubes": [
|
||||||
|
{ "from": [-5, -2, -7], "size": [1, 2, 1] }
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue