Merge commit 'befdd2c10a' into 1.17.1

This commit is contained in:
Frank Bauer 2021-07-07 13:27:01 +02:00
commit 24e16a1850
4 changed files with 13 additions and 1 deletions

View file

@ -50,7 +50,12 @@ public class BaseSlabBlock extends SlabBlock implements BlockModelProvider {
@Environment(EnvType.CLIENT)
public @Nullable BlockModel getBlockModel(ResourceLocation blockId, BlockState blockState) {
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
Optional<String> pattern = PatternsHelper.createJson(BasePatterns.BLOCK_SLAB, parentId);
Optional<String> pattern;
if (blockState.getValue(TYPE) == SlabType.DOUBLE) {
pattern = PatternsHelper.createBlockSimple(parentId);
} else {
pattern = PatternsHelper.createJson(BasePatterns.BLOCK_SLAB, parentId);
}
return ModelsHelper.fromPattern(pattern);
}