Generate red string blocks' models

This commit is contained in:
Vincent Lee committed 2020-06-29 22:33:10 -05:00
1 parent 967e88e160
commit 78317f6c2a
20 files changed
+66 -62

No files matched your search

@@ -167,7 +167,10 @@ public class BlockstateProvider extends BlockStateProvider {
}
private void redStringBlock(Block b) {
ModelFile file = models().getExistingFile(prefix("block/" + Registry.BLOCK.getKey(b).getPath()));
String name = Registry.BLOCK.getKey(b).getPath();
ResourceLocation selfName = prefix("block/" + name);
ResourceLocation front = prefix("block/red_string_sender");
ModelFile file = models().orientable(name, selfName, front, selfName);
getVariantBuilder(b)
.partialState().with(BlockStateProperties.FACING, Direction.NORTH).setModels(new ConfiguredModel(file))
.partialState().with(BlockStateProperties.FACING, Direction.SOUTH).setModels(new ConfiguredModel(file, 0, 180, false))