Patterns refactor
This commit is contained in:
parent
ce8ae2e7fe
commit
14434e4028
33 changed files with 397 additions and 356 deletions
|
@ -10,9 +10,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 BlockLeaves extends LeavesBlock implements Patterned, IRenderTypeable {
|
||||
public class BlockLeaves extends LeavesBlock implements BlockPatterned, IRenderTypeable {
|
||||
public BlockLeaves(MaterialColor color) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES)
|
||||
.allowsSpawning((state, world, pos, type) -> { return false; })
|
||||
|
@ -32,19 +33,19 @@ public class BlockLeaves extends LeavesBlock implements Patterned, IRenderTypeab
|
|||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(data, blockId, blockId.getPath());
|
||||
String blockId = Registry.BLOCK.getId(this).getPath();
|
||||
return Patterns.createJson(data, blockId, blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterned.createJson(Patterned.BLOCK_BASE, blockId, blockId.getPath());
|
||||
String blockId = Registry.BLOCK.getId(this).getPath();
|
||||
return Patterns.createJson(Patterns.BLOCK_BASE, blockId, blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterned.STATE_SIMPLE;
|
||||
return Patterns.STATE_SIMPLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue