Anvil crafting fixes
This commit is contained in:
parent
c5182a4418
commit
7e367a1971
9 changed files with 76 additions and 83 deletions
|
@ -25,7 +25,7 @@ import ru.betterend.patterns.Patterns;
|
|||
|
||||
public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
||||
public static final IntProperty DESTRUCTION = BlockProperties.DESTRUCTION;
|
||||
private final int level;
|
||||
protected final int level;
|
||||
|
||||
public EndAnvilBlock(MaterialColor color, int level) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ANVIL).materialColor(color));
|
||||
|
@ -38,6 +38,10 @@ public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
|||
builder.add(DESTRUCTION);
|
||||
}
|
||||
|
||||
public IntProperty getDestructionProperty() {
|
||||
return DESTRUCTION;
|
||||
}
|
||||
|
||||
public int getCraftingLevel() {
|
||||
return level;
|
||||
}
|
||||
|
@ -61,8 +65,8 @@ public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
|||
map.put("%top%", getTop(blockId, block));
|
||||
return Patterns.createJson(Patterns.BLOCK_ANVIL, map);
|
||||
}
|
||||
|
||||
private String getTop(Identifier blockId, String block) {
|
||||
|
||||
protected String getTop(Identifier blockId, String block) {
|
||||
if (block.contains("item")) {
|
||||
return blockId.getPath() + "_top_0";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue