Patterns refactor
This commit is contained in:
parent
ce8ae2e7fe
commit
14434e4028
33 changed files with 397 additions and 356 deletions
|
@ -15,9 +15,10 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.interfaces.Patterned;
|
||||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockTrapdoor extends TrapdoorBlock implements IRenderTypeable, Patterned {
|
||||
public class BlockTrapdoor extends TrapdoorBlock implements IRenderTypeable, BlockPatterned {
|
||||
public BlockTrapdoor(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
}
|
||||
|
@ -34,15 +35,15 @@ public class BlockTrapdoor extends TrapdoorBlock implements IRenderTypeable, Pat
|
|||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(data, blockId, blockId.getPath());
|
||||
String block = Registry.BLOCK.getId(this).getPath();
|
||||
return Patterns.createJson(data, block, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
String name = blockId.getPath();
|
||||
return Patterned.createJson(Patterned.BLOCK_TRAPDOOR, new HashMap<String, String>() {
|
||||
return Patterns.createJson(Patterns.BLOCK_TRAPDOOR, new HashMap<String, String>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
put("%block%", name);
|
||||
|
@ -53,6 +54,6 @@ public class BlockTrapdoor extends TrapdoorBlock implements IRenderTypeable, Pat
|
|||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.STATE_TRAPDOOR;
|
||||
return Patterns.STATE_TRAPDOOR;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue