Changes to color-Methods

This commit is contained in:
Frank 2023-05-17 14:49:32 +02:00
parent 37e69ca6b2
commit 2f878800ca
7 changed files with 9 additions and 13 deletions

View file

@ -43,7 +43,7 @@ public abstract class BaseAnvilBlock extends AnvilBlock implements BlockModelPro
public IntegerProperty durability; public IntegerProperty durability;
public BaseAnvilBlock(MapColor color) { public BaseAnvilBlock(MapColor color) {
this(Properties.copy(Blocks.ANVIL).color(color)); this(Properties.copy(Blocks.ANVIL).mapColor(color));
} }
public BaseAnvilBlock(BlockBehaviour.Properties properties) { public BaseAnvilBlock(BlockBehaviour.Properties properties) {

View file

@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
public class BaseChainBlock extends ChainBlock implements BlockModelProvider, RenderLayerProvider { public class BaseChainBlock extends ChainBlock implements BlockModelProvider, RenderLayerProvider {
public BaseChainBlock(MapColor color) { public BaseChainBlock(MapColor color) {
this(Properties.copy(Blocks.CHAIN).color(color)); this(Properties.copy(Blocks.CHAIN).mapColor(color));
} }
public BaseChainBlock(BlockBehaviour.Properties properties) { public BaseChainBlock(BlockBehaviour.Properties properties) {

View file

@ -1,6 +1,7 @@
package org.betterx.bclib.blocks; package org.betterx.bclib.blocks;
import org.betterx.bclib.client.render.BCLRenderLayer; import org.betterx.bclib.client.render.BCLRenderLayer;
import org.betterx.bclib.complexmaterials.BehaviourBuilders;
import org.betterx.bclib.interfaces.BlockModelProvider; import org.betterx.bclib.interfaces.BlockModelProvider;
import org.betterx.bclib.interfaces.RenderLayerProvider; import org.betterx.bclib.interfaces.RenderLayerProvider;
import org.betterx.bclib.interfaces.TagProvider; import org.betterx.bclib.interfaces.TagProvider;
@ -38,13 +39,8 @@ public class BaseLeavesBlock extends LeavesBlock implements BlockModelProvider,
protected final Block sapling; protected final Block sapling;
private static BlockBehaviour.Properties makeLeaves(MapColor color) { private static BlockBehaviour.Properties makeLeaves(MapColor color) {
return BlockBehaviour.Properties return BehaviourBuilders.createLeaves(color)
.copy(Blocks.OAK_LEAVES) .copy(Blocks.OAK_LEAVES);
.color(color)
//.requiresTool()
.isValidSpawn((state, world, pos, type) -> false)
.isSuffocating((state, world, pos) -> false)
.isViewBlocking((state, world, pos) -> false);
} }
public BaseLeavesBlock( public BaseLeavesBlock(

View file

@ -22,7 +22,7 @@ public class BaseStripableLogBlock extends BaseRotatedPillarBlock {
private final Block striped; private final Block striped;
public BaseStripableLogBlock(MapColor color, Block striped) { public BaseStripableLogBlock(MapColor color, Block striped) {
super(Properties.copy(striped).color(color)); super(Properties.copy(striped).mapColor(color));
this.striped = striped; this.striped = striped;
} }

View file

@ -55,7 +55,7 @@ public class BaseTerrainBlock extends BaseBlock {
public BaseTerrainBlock(Block baseBlock, MapColor color) { public BaseTerrainBlock(Block baseBlock, MapColor color) {
super(Properties super(Properties
.copy(baseBlock) .copy(baseBlock)
.color(color) .mapColor(color)
.sound(BlockSounds.TERRAIN_SOUND) .sound(BlockSounds.TERRAIN_SOUND)
.randomTicks() .randomTicks()
); );

View file

@ -21,7 +21,7 @@ public class StripableBarkBlock extends BaseBarkBlock {
private final Block striped; private final Block striped;
public StripableBarkBlock(MapColor color, Block striped) { public StripableBarkBlock(MapColor color, Block striped) {
super(Properties.copy(striped).color(color)); super(Properties.copy(striped).mapColor(color));
this.striped = striped; this.striped = striped;
} }

View file

@ -44,7 +44,7 @@ public class TripleTerrainBlock extends BaseTerrainBlock {
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE; public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
public TripleTerrainBlock(Block baseBlock) { public TripleTerrainBlock(Block baseBlock) {
super(baseBlock, baseBlock.defaultMaterialColor()); super(baseBlock, baseBlock.defaultMapColor());
this.registerDefaultState(defaultBlockState().setValue(SHAPE, TripleShape.BOTTOM)); this.registerDefaultState(defaultBlockState().setValue(SHAPE, TripleShape.BOTTOM));
} }