Skip to content

Commit ebd20d8

Browse files
authored
Merge pull request #2104
Fix Mimic rendering
2 parents 4335a69 + bea55f2 commit ebd20d8

File tree

9 files changed

+400
-400
lines changed

9 files changed

+400
-400
lines changed

src/generated/resources/assets/bloodmagic/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
"block.bloodmagic.fungal_charge_2": "Fungal Charge II",
7171
"block.bloodmagic.incensealtar": "Incense Altar",
7272
"block.bloodmagic.inputroutingnode": "Input Routing Node",
73+
"block.bloodmagic.inversion_pillar": "Inversion Pillar",
74+
"block.bloodmagic.inversion_pillar_cap": "Inversion Pillar Cap",
7375
"block.bloodmagic.itemroutingnode": "Routing Node",
7476
"block.bloodmagic.largebloodstonebrick": "Large Bloodstone Brick",
7577
"block.bloodmagic.lightritualstone": "Dawn Ritual Stone",

src/main/java/wayoftime/bloodmagic/client/model/MimicBakedModel.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,15 @@ private void putVertex(QuadBakingVertexConsumer quadBaker, Vec3 normal, double x
6161
quadBaker.endVertex();
6262
}
6363

64-
private BakedQuad createQuad(Vec3 v1, Vec3 v2, Vec3 v3, Vec3 v4, TextureAtlasSprite sprite)
64+
private BakedQuad createQuad(Vec3 vec1, Vec3 v2, Vec3 v3, Vec3 v4, TextureAtlasSprite sprite)
6565
{
66-
Vec3 normal = v3.subtract(v2).cross(v1.subtract(v2)).normalize();
67-
int tw = sprite.getX();
68-
int th = sprite.getY();
69-
70-
QuadBakingVertexConsumer.Buffered quadBaker = new QuadBakingVertexConsumer.Buffered();
71-
putVertex(quadBaker, normal, v1.x, v1.y, v1.z, 0, 0, sprite, 1.0f, 1.0f, 1.0f);
72-
putVertex(quadBaker, normal, v2.x, v2.y, v2.z, 0, th, sprite, 1.0f, 1.0f, 1.0f);
73-
putVertex(quadBaker, normal, v3.x, v3.y, v3.z, tw, th, sprite, 1.0f, 1.0f, 1.0f);
74-
putVertex(quadBaker, normal, v4.x, v4.y, v4.z, tw, 0, sprite, 1.0f, 1.0f, 1.0f);
66+
Vec3 normal = v3.subtract(v2).cross(vec1.subtract(v2)).normalize();
67+
68+
QuadBakingVertexConsumer.Buffered quadBaker = new QuadBakingVertexConsumer.Buffered();
69+
putVertex(quadBaker, normal, vec1.x, vec1.y, vec1.z, 0, 0, sprite, 1.0f, 1.0f, 1.0f);
70+
putVertex(quadBaker, normal, v2.x, v2.y, v2.z, 0, 16, sprite, 1.0f, 1.0f, 1.0f);
71+
putVertex(quadBaker, normal, v3.x, v3.y, v3.z, 16, 16, sprite, 1.0f, 1.0f, 1.0f);
72+
putVertex(quadBaker, normal, v4.x, v4.y, v4.z, 16, 0, sprite, 1.0f, 1.0f, 1.0f);
7573
return quadBaker.getQuad();
7674
}
7775

src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ protected void registerModels() {
7777
registerBlockModel(BloodMagicBlocks.DUNGEON_BRICK_SLAB.get());
7878
registerBlockModel(BloodMagicBlocks.DUNGEON_TILE_SLAB.get());
7979

80-
// registerBlockModel(BloodMagicBlocks.INVERSION_PILLAR_CAP.get());
81-
8280
registerBlockModel(BloodMagicBlocks.DUNGEON_CONTROLLER.get());
8381
registerBlockModel(BloodMagicBlocks.DUNGEON_SEAL.get());
8482
registerCustomBlockPath(BloodMagicBlocks.SPECIAL_DUNGEON_SEAL.get(), "special_dungeon_seal_standard");

src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ protected void addTranslations()
614614
addBlock(BloodMagicBlocks.DUNGEON_EMITTER, "Demon Emitter");
615615
addBlock(BloodMagicBlocks.DUNGEON_ALTERNATOR, "Demon Alternator");
616616

617+
addBlock(BloodMagicBlocks.INVERSION_PILLAR, "Inversion Pillar");
618+
addBlock(BloodMagicBlocks.INVERSION_PILLAR_CAP, "Inversion Pillar Cap");
619+
617620
addBlock(BloodMagicBlocks.SPIKES, "Spikes");
618621
addBlock(BloodMagicBlocks.DUNGEON_SPIKE_TRAP, "Demon Spike Trap");
619622

Lines changed: 109 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,185 @@
11
{
2-
"textures": {
2+
"parent": "minecraft:block/block",
3+
"textures": {
34
"texture": "models/pillar_base_d"
4-
},
5-
"elements": [
6-
{
7-
"__comment": "Base1",
8-
"from": [ 0, 0, 0 ],
9-
"to": [ 16, 2, 16 ],
10-
"faces": {
5+
},
6+
"elements": [
7+
{
8+
"__comment": "Base1",
9+
"from": [ 0, 0, 0 ],
10+
"to": [ 16, 2, 16 ],
11+
"faces": {
1112
"down": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture", "cullface": "down" },
1213
"up": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" },
1314
"north": { "uv": [ 0, 7, 8, 8 ], "texture": "#texture", "cullface": "north" },
1415
"south": { "uv": [ 0, 7, 8, 8 ], "texture": "#texture", "cullface": "south" },
1516
"west": { "uv": [ 0, 7, 8, 8 ], "texture": "#texture", "cullface": "west" },
1617
"east": { "uv": [ 0, 7, 8, 8 ], "texture": "#texture", "cullface": "east" }
17-
}
18-
},
19-
{
20-
"__comment": "Base2",
21-
"from": [ 1, 2, 1 ],
22-
"to": [ 15, 3, 15 ],
23-
"faces": {
18+
}
19+
},
20+
{
21+
"__comment": "Base2",
22+
"from": [ 1, 2, 1 ],
23+
"to": [ 15, 3, 15 ],
24+
"faces": {
2425
"north": { "uv": [ 0, 8.5, 7.5, 9 ], "texture": "#texture" },
2526
"south": { "uv": [ 0, 8.5, 7.5, 9 ], "texture": "#texture" },
2627
"west": { "uv": [ 0, 8.5, 7.5, 9 ], "texture": "#texture" },
2728
"east": { "uv": [ 0, 8.5, 7.5, 9 ], "texture": "#texture" }
28-
}
29-
},
30-
{
31-
"__comment": "Base3",
32-
"from": [ 0, 3, 0 ],
33-
"to": [ 16, 5, 16 ],
34-
"faces": {
29+
}
30+
},
31+
{
32+
"__comment": "Base3",
33+
"from": [ 0, 3, 0 ],
34+
"to": [ 16, 5, 16 ],
35+
"faces": {
3536
"down": { "uv": [ 0, 0, 8, 8 ], "texture": "#texture" },
3637
"up": { "uv": [ 8, 8, 16, 16 ], "texture": "#texture" },
3738
"north": { "uv": [ 0, 0, 8, 1 ], "texture": "#texture", "cullface": "north" },
3839
"south": { "uv": [ 0, 0, 8, 1 ], "texture": "#texture", "cullface": "south" },
3940
"west": { "uv": [ 0, 0, 8, 1 ], "texture": "#texture", "cullface": "west" },
4041
"east": { "uv": [ 0, 0, 8, 1 ], "texture": "#texture", "cullface": "east" }
41-
}
42-
},
43-
{
44-
"__comment": "Rim1",
45-
"from": [ 3, 5, 13 ],
46-
"to": [ 13, 6, 15 ],
47-
"faces": {
42+
}
43+
},
44+
{
45+
"__comment": "Rim1",
46+
"from": [ 3, 5, 13 ],
47+
"to": [ 13, 6, 15 ],
48+
"faces": {
4849
"up": { "uv": [ 1.5, 7, 6.5, 8 ], "texture": "#texture" },
4950
"north": { "uv": [ 1.5, 7, 6.5, 7.5 ], "texture": "#texture" },
5051
"south": { "uv": [ 1.5, 7.5, 6.5, 8 ], "texture": "#texture" }
51-
}
52-
},
53-
{
54-
"__comment": "Rim2",
55-
"from": [ 1, 5, 3 ],
56-
"to": [ 3, 6, 13 ],
57-
"faces": {
52+
}
53+
},
54+
{
55+
"__comment": "Rim2",
56+
"from": [ 1, 5, 3 ],
57+
"to": [ 3, 6, 13 ],
58+
"faces": {
5859
"up": { "uv": [ 0, 1.5, 1, 6.5 ], "texture": "#texture" },
5960
"west": { "uv": [ 1.5, 7.5, 6.5, 8 ], "texture": "#texture" },
6061
"east": { "uv": [ 1.5, 7, 6.5, 7.5 ], "texture": "#texture" }
61-
}
62-
},
63-
{
64-
"__comment": "Nook1",
65-
"from": [ -1, -0.5, -1 ],
66-
"to": [ 1, 2.5, 1 ],
67-
"faces": {
62+
}
63+
},
64+
{
65+
"__comment": "Nook1",
66+
"from": [ -1, -0.5, -1 ],
67+
"to": [ 1, 2.5, 1 ],
68+
"faces": {
6869
"down": { "uv": [ 11.5, 0, 12.5, 1 ], "texture": "#texture", "cullface": "west" },
6970
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture", "cullface": "west" },
7071
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
7172
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
7273
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
7374
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" }
74-
}
75-
},
76-
{
77-
"__comment": "Rim4",
78-
"from": [ 3, 5, 1 ],
79-
"to": [ 13, 6, 3 ],
80-
"faces": {
75+
}
76+
},
77+
{
78+
"__comment": "Rim4",
79+
"from": [ 3, 5, 1 ],
80+
"to": [ 13, 6, 3 ],
81+
"faces": {
8182
"up": { "uv": [ 1.5, 0, 6.5, 1 ], "texture": "#texture" },
8283
"north": { "uv": [ 1.5, 7.5, 6.5, 8 ], "texture": "#texture" },
8384
"south": { "uv": [ 1.5, 7, 6.5, 7.5 ], "texture": "#texture" }
84-
}
85-
},
86-
{
87-
"__comment": "Rim4",
88-
"from": [ 13, 5, 3 ],
89-
"to": [ 15, 6, 13 ],
90-
"faces": {
85+
}
86+
},
87+
{
88+
"__comment": "Rim4",
89+
"from": [ 13, 5, 3 ],
90+
"to": [ 15, 6, 13 ],
91+
"faces": {
9192
"up": { "uv": [ 7, 1.5, 8, 6.5 ], "texture": "#texture" },
9293
"west": { "uv": [ 1.5, 7, 6.5, 7.5 ], "texture": "#texture" },
9394
"east": { "uv": [ 1.5, 7.5, 6.5, 8 ], "texture": "#texture" }
94-
}
95-
},
96-
{
97-
"__comment": "Nook5",
98-
"from": [ 1, 5, 13 ],
99-
"to": [ 3, 8, 15 ],
100-
"faces": {
95+
}
96+
},
97+
{
98+
"__comment": "Nook5",
99+
"from": [ 1, 5, 13 ],
100+
"to": [ 3, 8, 15 ],
101+
"faces": {
101102
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture" },
102103
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
103104
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
104105
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
105106
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" }
106-
}
107-
},
108-
{
109-
"__comment": "Nook6",
110-
"from": [ 13, 5, 13 ],
111-
"to": [ 15, 8, 15 ],
112-
"faces": {
107+
}
108+
},
109+
{
110+
"__comment": "Nook6",
111+
"from": [ 13, 5, 13 ],
112+
"to": [ 15, 8, 15 ],
113+
"faces": {
113114
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture" },
114115
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
115116
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
116117
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
117118
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" }
118-
}
119-
},
120-
{
121-
"__comment": "Nook7",
122-
"from": [ 13, 5, 1 ],
123-
"to": [ 15, 8, 3 ],
124-
"faces": {
119+
}
120+
},
121+
{
122+
"__comment": "Nook7",
123+
"from": [ 13, 5, 1 ],
124+
"to": [ 15, 8, 3 ],
125+
"faces": {
125126
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture" },
126127
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
127128
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
128129
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
129130
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" }
130-
}
131-
},
132-
{
133-
"__comment": "Nook8",
134-
"from": [ 1, 5, 1 ],
135-
"to": [ 3, 8, 3 ],
136-
"faces": {
131+
}
132+
},
133+
{
134+
"__comment": "Nook8",
135+
"from": [ 1, 5, 1 ],
136+
"to": [ 3, 8, 3 ],
137+
"faces": {
137138
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture" },
138139
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
139140
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
140141
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" },
141142
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture" }
142-
}
143-
},
144-
{
145-
"__comment": "Nook2",
146-
"from": [ 15, -0.5, -1 ],
147-
"to": [ 17, 2.5, 1 ],
148-
"faces": {
143+
}
144+
},
145+
{
146+
"__comment": "Nook2",
147+
"from": [ 15, -0.5, -1 ],
148+
"to": [ 17, 2.5, 1 ],
149+
"faces": {
149150
"down": { "uv": [ 11.5, 0, 12.5, 1 ], "texture": "#texture", "cullface": "east" },
150151
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture", "cullface": "east" },
151152
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
152153
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
153154
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
154155
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" }
155-
}
156-
},
157-
{
158-
"__comment": "Nook3",
159-
"from": [ 15, -0.5, 15 ],
160-
"to": [ 17, 2.5, 17 ],
161-
"faces": {
156+
}
157+
},
158+
{
159+
"__comment": "Nook3",
160+
"from": [ 15, -0.5, 15 ],
161+
"to": [ 17, 2.5, 17 ],
162+
"faces": {
162163
"down": { "uv": [ 11.5, 0, 12.5, 1 ], "texture": "#texture", "cullface": "east" },
163164
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture", "cullface": "east" },
164165
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
165166
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
166167
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" },
167168
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "east" }
168-
}
169-
},
170-
{
171-
"__comment": "Nook4",
172-
"from": [ -1, -0.5, 15 ],
173-
"to": [ 1, 2.5, 17 ],
174-
"faces": {
169+
}
170+
},
171+
{
172+
"__comment": "Nook4",
173+
"from": [ -1, -0.5, 15 ],
174+
"to": [ 1, 2.5, 17 ],
175+
"faces": {
175176
"down": { "uv": [ 11.5, 0, 12.5, 1 ], "texture": "#texture", "cullface": "west" },
176177
"up": { "uv": [ 10, 0, 11, 1 ], "texture": "#texture", "cullface": "west" },
177178
"north": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
178179
"south": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
179180
"west": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" },
180181
"east": { "uv": [ 8.5, 0, 9.5, 1.5 ], "texture": "#texture", "cullface": "west" }
182+
}
181183
}
182-
}
183-
]
184+
]
184185
}

0 commit comments

Comments
 (0)