Double slab model fix
This commit is contained in:
parent
e60f8f7d9d
commit
72e7be7ace
4 changed files with 9 additions and 4 deletions
|
@ -49,7 +49,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue