Item model patterns

This commit is contained in:
Aleksey 2020-11-20 15:51:35 +03:00
parent 73a0cb890c
commit d9a60fc7f2
15 changed files with 48 additions and 50 deletions

View file

@ -46,7 +46,7 @@ public class BlockDoor extends DoorBlock implements IRenderTypeable, BlockPatter
public String getModelPattern(String block) {
String blockId = Registry.BLOCK.getId(this).getPath();
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_MODEL, blockId);
return Patterns.createJson(Patterns.ITEM_GENERATED, block);
}
if (block.contains("top_hinge")) {
return Patterns.createJson(Patterns.BLOCK_DOOR_TOP_HINGE, blockId, blockId);

View file

@ -160,10 +160,9 @@ public class BlockSign extends AbstractSignBlock implements BlockPatterned {
@Override
public String getModelPattern(String path) {
Identifier blockId = Registry.BLOCK.getId(this);
Identifier parentId = Registry.BLOCK.getId(parent);
if (path.contains("item")) {
return Patterns.createJson(Patterns.ITEM_MODEL, blockId.getPath());
return Patterns.createJson(Patterns.ITEM_GENERATED, path);
}
return Patterns.createJson(Patterns.BLOCK_EMPTY, parentId.getPath());
}