Added codec support to some blocks
This commit is contained in:
parent
72003aa94b
commit
af56c07a36
2 changed files with 24 additions and 0 deletions
|
@ -6,6 +6,7 @@ import org.betterx.bclib.client.render.BCLRenderLayer;
|
|||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -25,6 +26,17 @@ import net.minecraft.world.level.material.Fluids;
|
|||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
public class CrystalMossCoverBlock extends MultifaceBlock implements BonemealableBlock, SimpleWaterloggedBlock, RenderLayerProvider, BehaviourShearablePlant {
|
||||
public static final MapCodec<CrystalMossCoverBlock> CODEC = simpleCodec(CrystalMossCoverBlock::new);
|
||||
|
||||
private CrystalMossCoverBlock(Properties settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends CrystalMossCoverBlock> codec() {
|
||||
return CODEC;
|
||||
}
|
||||
|
||||
private static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
private final MultifaceSpreader spreader = new MultifaceSpreader(this);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import org.betterx.bclib.interfaces.TagProvider;
|
|||
import org.betterx.ui.ColorUtil;
|
||||
import org.betterx.worlds.together.tag.v3.CommonBlockTags;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
@ -24,6 +25,17 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
public class EndstoneDustBlock extends FallingBlock implements TagProvider, BehaviourSand {
|
||||
public static final MapCodec<EndstoneDustBlock> CODEC = simpleCodec(EndstoneDustBlock::new);
|
||||
|
||||
private EndstoneDustBlock(Properties settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends EndstoneDustBlock> codec() {
|
||||
return CODEC;
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue