@@ -105,9 +105,9 @@ public final class %%classname%% implements DataProvider, IModel<%%classname%%>
105
105
}
106
106
107
107
private <T extends Block> %%classname%% cubeAll(Supplier<T> block) {
108
- . ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get());
108
+ ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get());
109
109
ResourceLocation blockKey = key.withPrefix("block/");
110
- MODELS.put(blockKry , Map.of(
110
+ MODELS.put(blockKey , Map.of(
111
111
"parent", "minecraft:block/cube_all",
112
112
"textures", Map.of(
113
113
"all", blockKey.toString()
@@ -124,28 +124,82 @@ public final class %%classname%% implements DataProvider, IModel<%%classname%%>
124
124
}
125
125
126
126
private <T extends Block> %%classname%% stairsBlock(Supplier<T> block, String bottom, String side, String top) {
127
- ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get()).withPrefix("block/");
128
- MODELS.put(key, Map.of(
127
+ ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get());
128
+ ResourceLocation blockKey = key.withPrefix("block/");
129
+ ResourceLocation inner = blockKey.withSuffix("_inner");
130
+ ResourceLocation outer = blockKey.withSuffix("_outer");
131
+ MODELS.put(blockKey, Map.of(
129
132
"parent", "minecraft:block/stairs",
130
133
"textures", Map.of(
131
- "bottom", bottom.isEmpty() ? key .toString() : bottom,
132
- "side", side.isEmpty() ? key .toString() : side,
133
- "top", top.isEmpty() ? key .toString() : top
134
+ "bottom", bottom.isEmpty() ? blockKey .toString() : bottom,
135
+ "side", side.isEmpty() ? blockKey .toString() : side,
136
+ "top", top.isEmpty() ? blockKey .toString() : top
134
137
)));
135
- MODELS.put(key.withSuffix("_inner") , Map.of(
138
+ MODELS.put(inner , Map.of(
136
139
"parent", "minecraft:block/inner_stairs",
137
140
"textures", Map.of(
138
- "bottom", bottom.isEmpty() ? key .toString() : bottom,
139
- "side", side.isEmpty() ? key .toString() : side,
140
- "top", top.isEmpty() ? key .toString() : top
141
+ "bottom", bottom.isEmpty() ? blockKey .toString() : bottom,
142
+ "side", side.isEmpty() ? blockKey .toString() : side,
143
+ "top", top.isEmpty() ? blockKey .toString() : top
141
144
)));
142
- MODELS.put(key.withSuffix("_outer") , Map.of(
145
+ MODELS.put(outer , Map.of(
143
146
"parent", "minecraft:block/outer_stairs",
144
147
"textures", Map.of(
145
- "bottom", bottom.isEmpty() ? key .toString() : bottom,
146
- "side", side.isEmpty() ? key .toString() : side,
147
- "top", top.isEmpty() ? key .toString() : top
148
+ "bottom", bottom.isEmpty() ? blockKey .toString() : bottom,
149
+ "side", side.isEmpty() ? blockKey .toString() : side,
150
+ "top", top.isEmpty() ? blockKey .toString() : top
148
151
)));
152
+ BLOCKSTATES.put(key, Map.of(
153
+ "variants", Map.of(
154
+ "facing=east,half=bottom,shape=inner_left", Map.of(
155
+ "model", inner.toString(),
156
+ "uvlock", true,
157
+ "y", 270
158
+ ),
159
+ "facing=east,half=bottom,shape=inner_right", Map.of(
160
+ "model", inner.toString()
161
+ ),
162
+ "facing=east,half=bottom,shape=outer_left", Map.of(
163
+ "model", outer.toString(),
164
+ "uvlock", true,
165
+ "y", 270
166
+ ),
167
+ "facing=east,half=bottom,shape=outer_right", Map.of(
168
+ "model", outer.toString()
169
+ ),
170
+ "facing=east,half=bottom,shape=straight", Map.of(
171
+ "model", blockKey.toString()
172
+ ),
173
+ "facing=east,half= top,shape=inner_left", Map.of(
174
+ "model", inner.toString(),
175
+ "uvlock", true,
176
+ "x", 180
177
+ ),
178
+ "facing=east,half=top,shape=inner_right", Map.of(
179
+ "model", inner.toString(),
180
+ "uvlock", true,
181
+ "x", 180,
182
+ "y", 90
183
+ ),
184
+ "facing=east,half=top,shape=outer_left", Map.of(
185
+ "model", outer.toString(),
186
+ "uvlock", true,
187
+ "z", 180
188
+ ),
189
+ "facing=east,half=top,shape=outer_right", Map.of(
190
+ "model", outer.toString(),
191
+ "uvlock", true,
192
+ "x", 180,
193
+ "y", 90
194
+
195
+ ),
196
+ "facing=east,half= top,shape=straight", Map.of(
197
+ "model", blockKey.toString(),
198
+ "uvlock", true,
199
+ "x", 180
200
+ )
201
+ )
202
+ ));
149
203
return this;
150
204
}
151
205
0 commit comments