Base blocks
This commit is contained in:
parent
c4a510bd2e
commit
856f7fe3b9
50 changed files with 374 additions and 771 deletions
|
@ -4,21 +4,22 @@ import java.util.Optional;
|
|||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
import ru.bclib.client.models.BasePatterns;
|
||||
import ru.bclib.client.models.PatternsHelper;
|
||||
|
||||
public class BarkBlock extends EndPillarBlock {
|
||||
public BarkBlock(Properties settings) {
|
||||
public class BaseBarkBlock extends BaseRotatedPillarBlock {
|
||||
public BaseBarkBlock(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());
|
||||
return PatternsHelper.createJson(BasePatterns.BLOCK_BASE, replacePath(blockId));
|
||||
}
|
||||
|
||||
private String getName(ResourceLocation blockId) {
|
||||
String name = blockId.getPath();
|
||||
return name.replace("_bark", "_log_side");
|
||||
private ResourceLocation replacePath(ResourceLocation blockId) {
|
||||
String newPath = blockId.getPath().replace("_bark", "_log_side");
|
||||
return new ResourceLocation(blockId.getNamespace(), newPath);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue