Fixed structure features and code style

This commit is contained in:
paulevsGitch 2021-07-10 16:07:44 +03:00
parent d431f2555c
commit 5a9365e2bb
153 changed files with 2304 additions and 2459 deletions

View file

@ -1,23 +1,23 @@
package ru.bclib.blocks;
import java.util.Optional;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import ru.bclib.client.models.BasePatterns;
import ru.bclib.client.models.PatternsHelper;
import java.util.Optional;
public class BaseBarkBlock extends BaseRotatedPillarBlock {
public BaseBarkBlock(Properties settings) {
super(settings);
}
@Override
protected Optional<String> createBlockPattern(ResourceLocation blockId) {
blockId = Registry.BLOCK.getKey(this);
return PatternsHelper.createJson(BasePatterns.BLOCK_BASE, replacePath(blockId));
}
private ResourceLocation replacePath(ResourceLocation blockId) {
String newPath = blockId.getPath().replace("_bark", "_log_side");
return new ResourceLocation(blockId.getNamespace(), newPath);