Base blocks (WIP)
This commit is contained in:
parent
feb6c5172c
commit
c4a510bd2e
56 changed files with 4418 additions and 1 deletions
24
src/main/java/ru/bclib/blocks/BaseBarkBlock.java
Normal file
24
src/main/java/ru/bclib/blocks/BaseBarkBlock.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package ru.bclib.blocks;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
||||
public class BarkBlock extends EndPillarBlock {
|
||||
public BarkBlock(Properties settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Optional<String> createBlockPattern(ResourceLocation blockId) {
|
||||
blockId = Registry.BLOCK.getKey(this);
|
||||
return Patterns.createJson(Patterns.BLOCK_BASE, getName(blockId), blockId.getPath());
|
||||
}
|
||||
|
||||
private String getName(ResourceLocation blockId) {
|
||||
String name = blockId.getPath();
|
||||
return name.replace("_bark", "_log_side");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue