[Feature] Slot for wooden walls
This commit is contained in:
parent
b3e7b22f15
commit
5227038633
2 changed files with 46 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package org.betterx.bclib.blocks;
|
package org.betterx.bclib.blocks;
|
||||||
|
|
||||||
|
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||||
import org.betterx.bclib.behaviours.interfaces.BehaviourWood;
|
import org.betterx.bclib.behaviours.interfaces.BehaviourWood;
|
||||||
import org.betterx.bclib.client.models.BasePatterns;
|
import org.betterx.bclib.client.models.BasePatterns;
|
||||||
import org.betterx.bclib.client.models.ModelsHelper;
|
import org.betterx.bclib.client.models.ModelsHelper;
|
||||||
|
@ -125,9 +126,15 @@ public abstract class BaseWallBlock extends WallBlock implements BlockModelProvi
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Stone extends BaseWallBlock implements BehaviourWood {
|
public static class Stone extends BaseWallBlock implements BehaviourStone {
|
||||||
public Stone(Block source) {
|
public Stone(Block source) {
|
||||||
super(source);
|
super(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Wood extends BaseWallBlock implements BehaviourWood {
|
||||||
|
public Wood(Block source) {
|
||||||
|
super(source);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
package org.betterx.bclib.complexmaterials.set.wood;
|
||||||
|
|
||||||
|
import org.betterx.bclib.blocks.BaseWallBlock;
|
||||||
|
import org.betterx.bclib.complexmaterials.ComplexMaterial;
|
||||||
|
import org.betterx.bclib.complexmaterials.WoodenComplexMaterial;
|
||||||
|
import org.betterx.bclib.complexmaterials.entry.MaterialSlot;
|
||||||
|
import org.betterx.bclib.complexmaterials.set.common.AbstractWall;
|
||||||
|
import org.betterx.bclib.recipes.BCLRecipeBuilder;
|
||||||
|
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class Wall extends AbstractWall<WoodenComplexMaterial> {
|
||||||
|
@Override
|
||||||
|
protected @NotNull Block createBlock(WoodenComplexMaterial parentMaterial, BlockBehaviour.Properties settings) {
|
||||||
|
return new BaseWallBlock.Wood(parentMaterial.getBlock(getSourceBlockSlot()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected @Nullable void makeRecipe(ComplexMaterial parentMaterial, ResourceLocation id) {
|
||||||
|
BCLRecipeBuilder.crafting(id, parentMaterial.getBlock(suffix))
|
||||||
|
.setOutputCount(6)
|
||||||
|
.setShape("* *", "|||")
|
||||||
|
.addMaterial('*', parentMaterial.getBlock(WoodSlots.PLANKS))
|
||||||
|
.addMaterial('|', parentMaterial.getBlock(WoodSlots.FENCE))
|
||||||
|
.setGroup("wall")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected @Nullable MaterialSlot<WoodenComplexMaterial> getSourceBlockSlot() {
|
||||||
|
return WoodSlots.PLANKS;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue