Reorganized Imports/Packages
This commit is contained in:
parent
cb9459f176
commit
3ee10482ab
721 changed files with 34873 additions and 33558 deletions
26
src/main/java/org/betterx/bclib/blocks/BaseBarkBlock.java
Normal file
26
src/main/java/org/betterx/bclib/blocks/BaseBarkBlock.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package org.betterx.bclib.blocks;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import org.betterx.bclib.client.models.BasePatterns;
|
||||
import org.betterx.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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue