mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed the witch hat and other rendering issues with wearables
This commit is contained in:
parent
44954abb6a
commit
508d21ed0b
6 changed files with 22 additions and 24 deletions
|
@ -23,8 +23,7 @@ public abstract class AbstractGear extends Model implements IGear, MsonModel {
|
||||||
textureHeight = 64;
|
textureHeight = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void addPart(ModelPart t) {
|
||||||
public void accept(ModelPart t) {
|
|
||||||
parts.add(t);
|
parts.add(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class Muffin extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
accept(context.findByName("crown"));
|
addPart(context.findByName("crown"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class Stetson extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
accept(context.findByName("rim"));
|
addPart(context.findByName("rim"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class WitchHat extends AbstractGear implements IStackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(ModelContext context) {
|
public void init(ModelContext context) {
|
||||||
accept(context.findByName("witch_hat"));
|
addPart(context.findByName("hat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,9 @@ public class GearFeature<T extends LivingEntity, M extends EntityModel<T> & IPon
|
||||||
gear.setLivingAnimations(model, entity);
|
gear.setLivingAnimations(model, entity);
|
||||||
gear.setRotationAndAngles(model.getAttributes().isGoingFast, entity.getUuid(), limbDistance, limbAngle, model.getWobbleAmount(), tickDelta);
|
gear.setRotationAndAngles(model.getAttributes().isGoingFast, entity.getUuid(), limbDistance, limbAngle, model.getWobbleAmount(), tickDelta);
|
||||||
|
|
||||||
VertexConsumer vertexConsumer = renderContext.getBuffer(RenderLayer.getEntitySolid(gear.getTexture(entity, getContext())));
|
RenderLayer layer = RenderLayer.getEntityTranslucent(gear.getTexture(entity, getContext()));
|
||||||
gear.renderPart(stack, vertexConsumer, OverlayTexture.DEFAULT_UV, lightUv, limbDistance, limbAngle, tickDelta, 1F, entity.getUuid());
|
|
||||||
|
VertexConsumer vertexConsumer = renderContext.getBuffer(layer);
|
||||||
|
gear.renderPart(stack, vertexConsumer, lightUv, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1, entity.getUuid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +1,34 @@
|
||||||
{
|
{
|
||||||
"texture": {"w": 16, "h": 8, "u": 64, "h": 128},
|
"texture": {"u": 0, "w": 64, "h": 128},
|
||||||
"witch_hat": {
|
"hat": {
|
||||||
"visible": false,
|
"texture": {"v": 64 },
|
||||||
"texture": {"u": 0, "v": 64},
|
"center": [-5, -8, -7.0],
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-5, -6, -7], "size": [10, 2, 10] }
|
{ "size": [10, 2, 10] }
|
||||||
],
|
],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"visible": false,
|
"texture": {"v": 76 },
|
||||||
"center": [1.75, -4, 2],
|
"center": [1.75, -4, 2],
|
||||||
"texture": {"u": 0, "v": 76},
|
"rotate": [-3, 0, 1.5],
|
||||||
"rotate": [3, 0, 1.5],
|
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-5, -5, -7], "size": [7, 4, 7] }
|
{ "size": [7, 4, 7] }
|
||||||
],
|
],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"visible": false,
|
"texture": {"v": 87 },
|
||||||
"center": [1.75, -4, 2],
|
"center": [1.75, -4, 2],
|
||||||
"texture": {"u": 0, "v": 87},
|
"rotate": [-6, 0, 3],
|
||||||
"rotate": [6, 0, 3],
|
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-5, -4, -7], "size": [4, 4, 4] }
|
{ "size": [4, 4, 4] }
|
||||||
],
|
],
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"visible": false,
|
"texture": {"v": 95 },
|
||||||
"center": [1.75, -2, 2],
|
"center": [1.75, -2, 2],
|
||||||
"texture": {"u": 0, "v": 95},
|
"rotate": [-12, 0, 6],
|
||||||
"rotate": [12, 0, 6],
|
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{ "from": [-5, -2, -7], "size": [1, 2, 1] }
|
{ "size": [1, 2, 1], "stretch": 0.25 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue