Base blocks (WIP)

This commit is contained in:
Aleksey 2021-05-26 18:00:55 +03:00
parent feb6c5172c
commit c4a510bd2e
56 changed files with 4418 additions and 1 deletions

View 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");
}
}