Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2a6a1b9
maven例子
westernat Aug 4, 2025
69be8f4
修lib不能单独染色稀有度的问题
westernat Aug 4, 2025
1554bb9
渐变稀有度的更新转移到lib
westernat Aug 4, 2025
cabb713
0.0.2a
westernat Aug 4, 2025
4fe6815
注释掉lombok生成的代码
westernat Aug 4, 2025
b00c771
移除lombok
westernat Aug 6, 2025
211cfdd
使IdFixer支持多次历史变动
westernat Aug 6, 2025
2d4ce4b
神秘的注释内getPrefab
westernat Aug 7, 2025
8828f94
晶洞自动选择深板岩变种
westernat Aug 9, 2025
8d07460
关于游戏时间的工具移到lib
westernat Aug 9, 2025
2767c13
长矛连续攻击、添加攻击间隔参数
westernat Aug 10, 2025
1ea08a2
1.1.5.1
westernat Aug 11, 2025
5d70f43
DPS大修
westernat Aug 11, 2025
f74500b
调整
westernat Aug 12, 2025
44cdc70
向下兼容
westernat Aug 13, 2025
c0dd0d2
爆炸兔合成
westernat Aug 14, 2025
d60a436
环境检测合成改为数据驱动
westernat Aug 14, 2025
a6a190b
工匠作坊直接加上环境检测
westernat Aug 15, 2025
6f702b0
补上树妖的交易
westernat Aug 16, 2025
85159a6
钓鱼任务基本功能
westernat Aug 16, 2025
fcdae8c
星之力成就位置移到钩爪前面,安静的邻里
westernat Aug 16, 2025
c396168
JEI环境合成条件显示
westernat Aug 17, 2025
3e7aea8
区分灵雾与墓地
westernat Aug 17, 2025
74849d8
渔夫阶段性战利品表
westernat Aug 17, 2025
6ca461b
Update gradle.properties
cooobird Aug 24, 2025
1100fb1
向导巫毒娃娃光效
westernat Aug 26, 2025
6b685de
自动合并en_us.json
westernat Aug 27, 2025
9e17de2
过滤一些不需要合并的
westernat Aug 27, 2025
a654dbb
不小心优化import了
westernat Aug 28, 2025
d1b8301
打草爆虫子
westernat Aug 29, 2025
aa2cb4e
织布机,引爆器(都是半成品)
westernat Aug 30, 2025
aeccb69
提接口
westernat Sep 1, 2025
31cd751
各种东西
westernat Sep 1, 2025
cf5a186
先写一部分功能
westernat Sep 2, 2025
29d2e59
完整的en_us和zh_cn
westernat Sep 6, 2025
f17f3d2
根据游戏阶段改变生物属性的datamap
westernat Sep 6, 2025
572e586
修三本保护书
westernat Sep 7, 2025
c971e1e
完善风暴长矛
westernat Sep 7, 2025
a63c6bb
成就仅同步是否隐藏连线
westernat Sep 9, 2025
58097d6
改StreamCodec
westernat Sep 9, 2025
d2f3182
为4x合成添加物品转移支持
westernat Sep 11, 2025
daefad5
非开发环境的创造模式物品栏不显示WIP物品
westernat Sep 11, 2025
4f077d9
允许通过配置开关wip物品显示
westernat Sep 12, 2025
837c927
物品稀有度颜色现在兼容传说物品提示
westernat Sep 12, 2025
3b025dc
物品稀有度颜色现在兼容物品边框
westernat Sep 12, 2025
42ed8de
反转重力键位改为↑,允许反转重力跳跃
westernat Sep 12, 2025
d9dbeca
怪物图鉴基础内容
westernat Sep 13, 2025
378132d
客户端怪物图鉴datagen
westernat Sep 14, 2025
97ace22
重写香蒲
westernat Sep 14, 2025
51a7d63
更新版本号
cooobird Sep 15, 2025
4082e82
完善
westernat Sep 15, 2025
63d1b5a
补大部分条目
westernat Sep 19, 2025
6af47f8
房屋写一半
westernat Sep 20, 2025
7779e57
添加可以摇晃的大型吊灯
MakerTechno Sep 21, 2025
9c2d906
额外栏信息开关按钮
westernat Sep 22, 2025
ad89161
修复吊灯相关问题并优化结构
MakerTechno Sep 27, 2025
3c4bf0e
更新指路石
westernat Sep 27, 2025
069b5f3
骑枪计算相对速度
westernat Sep 28, 2025
d2a21d3
改吊挂盆为多方块并添加光照支持
MakerTechno Oct 3, 2025
dbb4f4b
地物中的毒镖现在会检查是否越界
westernat Oct 3, 2025
79f1ff1
允许部分剑以80%原伤害进行横扫,且允许空挥
westernat Oct 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }


dependencies {
compileOnly 'org.projectlombok:lombok:1.18.38'
annotationProcessor 'org.projectlombok:lombok:1.18.38'
// Example mod dependency with JEI
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ mod_name=Confluence Magic Lib
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=0.0.2-SNAPSHOT
###### remove '-SNAPSHOT' when merge to main branch ######
mod_version=0.0.2d-SNAPSHOT
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
17 changes: 12 additions & 5 deletions src/main/java/org/confluence/lib/ConfluenceMagicLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.confluence.lib.common.recipe.AmountIngredient;
import org.confluence.lib.common.worldgen.structure.GridPiece;
import org.confluence.lib.common.worldgen.structure.SimpleTemplatePiece;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -35,21 +36,21 @@ public class ConfluenceMagicLib {
public static final String LIB_ID = "confluence_magic_lib";
public static final String CONFLUENCE_ID = "confluence";
public static final Logger LOGGER = LoggerFactory.getLogger("Confluence Magic Lib");
public static final com.google.common.base.Supplier<Boolean> IS_CONFLUENCE_LOADED = Suppliers.memoize(() -> ModList.get().isLoaded(CONFLUENCE_ID));
public static final Supplier<Boolean> IS_CONFLUENCE_LOADED = Suppliers.memoize(() -> ModList.get().isLoaded(CONFLUENCE_ID));

public static final DeferredRegister<IngredientType<?>> INGREDIENT_TYPES = DeferredRegister.create(NeoForgeRegistries.Keys.INGREDIENT_TYPES, LIB_ID);
private static final DeferredRegister<IngredientType<?>> INGREDIENT_TYPES = DeferredRegister.create(NeoForgeRegistries.Keys.INGREDIENT_TYPES, LIB_ID);
public static final Supplier<IngredientType<AmountIngredient>> AMOUNT_INGREDIENT_TYPE = INGREDIENT_TYPES.register("amount_ingredient", () -> new IngredientType<>(AmountIngredient.CODEC, AmountIngredient.STREAM_CODEC));

public static final DeferredRegister<StructurePieceType> PIECE_TYPES = DeferredRegister.create(BuiltInRegistries.STRUCTURE_PIECE, LIB_ID);
private static final DeferredRegister<StructurePieceType> PIECE_TYPES = DeferredRegister.create(BuiltInRegistries.STRUCTURE_PIECE, LIB_ID);
public static final Supplier<StructurePieceType.StructureTemplateType> SIMPLE_TEMPLATE_PIECE = PIECE_TYPES.register("simple_template_piece", () -> SimpleTemplatePiece::new);
public static final Supplier<StructurePieceType.ContextlessType> GRID_PIECE = PIECE_TYPES.register("grid_piece", () -> GridPiece::new);

public static final DeferredRegister.DataComponents DATA_COMPONENT_TYPES = DeferredRegister.createDataComponents(Registries.DATA_COMPONENT_TYPE, LIB_ID);
private static final DeferredRegister.DataComponents DATA_COMPONENT_TYPES = DeferredRegister.createDataComponents(Registries.DATA_COMPONENT_TYPE, LIB_ID);
public static final Supplier<DataComponentType<ModRarity>> MOD_RARITY = DATA_COMPONENT_TYPES.registerComponentType("mod_rarity", builder -> builder.persistent(ModRarity.CODEC).networkSynchronized(ModRarity.STREAM_CODEC));
public static final Supplier<DataComponentType<ToolMode>> TOOL_MODE = DATA_COMPONENT_TYPES.registerComponentType("tool_mode", builder -> builder.persistent(ToolMode.CODEC).networkSynchronized(ToolMode.STREAM_CODEC));
public static final Supplier<DataComponentType<NbtComponent>> NBT = DATA_COMPONENT_TYPES.registerComponentType("nbt", builder -> builder.persistent(NbtComponent.CODEC).networkSynchronized(NbtComponent.STREAM_CODEC));

public static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(BuiltInRegistries.PARTICLE_TYPE, LIB_ID);
private static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(BuiltInRegistries.PARTICLE_TYPE, LIB_ID);
public static final Supplier<ParticleType<CrossDustParticleOptions>> CROSS_DUST_PARTICLE = PARTICLES.register("cross_dust", () -> new ParticleType<>(false) {
@Override
@NotNull
Expand All @@ -74,4 +75,10 @@ public ConfluenceMagicLib(IEventBus modEventBus, ModContainer modContainer) {
public static ResourceLocation asResource(String path) {
return ResourceLocation.fromNamespaceAndPath(LIB_ID, path);
}

@Deprecated(since = "1.2.0", forRemoval = true)
@ApiStatus.ScheduledForRemoval(inVersion = "1.3.0")
public static boolean isConfluenceLoaded() {
return IS_CONFLUENCE_LOADED.get();
}
}
21 changes: 14 additions & 7 deletions src/main/java/org/confluence/lib/client/AntiPushPoseStack.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
package org.confluence.lib.client;

import com.mojang.blaze3d.vertex.PoseStack;
import org.confluence.lib.mixed.IPoseStack;

public class AntiPushPoseStack extends PoseStack {
public class AntiPushPoseStack extends PoseStack implements IPoseStack {
@Override
public void popPose(){
public void popPose() {
popPose(false);
}

@Override
public void pushPose(){
public void pushPose() {
pushPose(false);
}

public void popPose(boolean real){
if(real){
public void popPose(boolean real) {
if (real) {
super.popPose();
}
}
public void pushPose(boolean real){
if(real){

public void pushPose(boolean real) {
if (real) {
super.pushPose();
}
}

@Override
public boolean confluence$isAntiPush() {
return true;
}
}
35 changes: 33 additions & 2 deletions src/main/java/org/confluence/lib/client/event/LibGameEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,49 @@
import com.mojang.datafixers.util.Either;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.FormattedText;
import net.minecraft.world.inventory.tooltip.TooltipComponent;
import net.minecraft.world.item.ItemStack;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.EventPriority;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.neoforge.client.event.RenderTooltipEvent;
import org.confluence.lib.ConfluenceMagicLib;
import org.confluence.lib.client.animate.ExpertColorAnimation;
import org.confluence.lib.client.animate.MasterColorAnimation;
import org.confluence.lib.common.LibTags;
import org.confluence.lib.common.component.ModRarity;

import java.util.List;
import java.util.Optional;

@EventBusSubscriber(modid = ConfluenceMagicLib.LIB_ID, bus = EventBusSubscriber.Bus.GAME, value = Dist.CLIENT)
public final class LibGameEvents {
@SubscribeEvent
public static void clientTick$Post(ClientTickEvent.Pre event) {
ExpertColorAnimation.INSTANCE.updateColor();
MasterColorAnimation.INSTANCE.updateColor();
}

@SubscribeEvent(priority = EventPriority.HIGHEST)
public static void renderTooltip$GatherComponents(RenderTooltipEvent.GatherComponents event) {
if (event.getItemStack().isEmpty() || !event.getItemStack().is(LibTags.Items.WIP)) return;
event.getTooltipElements().add(1, Either.left(Component.translatable("tooltip.confluence.work_in_progress").withStyle(ChatFormatting.RED)));
ItemStack itemStack = event.getItemStack();
if (itemStack.isEmpty()) return;

List<Either<FormattedText, TooltipComponent>> tooltipElements = event.getTooltipElements();
if (tooltipElements.isEmpty()) return;
Optional<FormattedText> displayName = tooltipElements.getFirst().left();
if (displayName.isPresent() && displayName.get() instanceof Component component) {
ModRarity rarity = ModRarity.getRarity(itemStack);
if (rarity != null) {
tooltipElements.set(0, Either.left(component.copy().withColor(rarity.color())));
}
}

if (itemStack.is(LibTags.Items.WIP)) {
event.getTooltipElements().add(1, Either.left(Component.translatable("tooltip.confluence.work_in_progress").withStyle(ChatFormatting.RED)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public CrossDustParticle(ClientLevel level, double x, double y, double z, CrossD
super(level, x, y, z);
this.sprites = sprites;
this.options = options;
this.lifetime = options.getLifetime();
this.gravity = options.isNoGravity() ? 0 : 0.7f;
this.hasPhysics = !options.isNoPhysics();
this.quadSize = 0.1f;
setScale(options.isPulse() ? 0 : options.getScale());
quadSizeOld = quadSize;
xd = options.getVelocity().x;
yd = options.getVelocity().y;
zd = options.getVelocity().z;
age = 1;
this.lifetime = options.lifetime;
this.gravity = options.noGravity ? 0 : 0.7F;
this.hasPhysics = !options.noPhysics;
this.quadSize = 0.1F;
setScale(options.pulse ? 0 : options.scale);
this.quadSizeOld = quadSize;
this.xd = options.velocity.x;
this.yd = options.velocity.y;
this.zd = options.velocity.z;
this.age = 1;
}

@Override
Expand All @@ -50,37 +50,38 @@ public void render(VertexConsumer buffer, Camera renderInfo, float partialTicks)
public void tick() {
float lastProgress = ((float) age - 1) / lifetime;
float progress = (float) age / lifetime;
if (options.isNoGravity()) {
accelOld = accel;
accel = LibUtils.cubicBezier(progress, options.getSpeedCurve().x, options.getSpeedCurve().y, options.getSpeedCurve().z, options.getSpeedCurve().w);
if (options.noGravity) {
this.accelOld = accel;
this.accel = LibUtils.cubicBezier(progress, options.speedCurve.x, options.speedCurve.y, options.speedCurve.z, options.speedCurve.w);
float k = (accel - accelOld) / (progress - lastProgress);
xd = options.getVelocity().x * k;
yd = options.getVelocity().y * k;
zd = options.getVelocity().z * k;
this.xd = options.velocity.x * k;
this.yd = options.velocity.y * k;
this.zd = options.velocity.z * k;
}
oRoll = roll;
rollDeltaOld = rollDelta;
rollDelta = LibUtils.cubicBezier(progress, options.getRollCurve().x, options.getRollCurve().y, options.getRollCurve().z, options.getRollCurve().w);
this.oRoll = roll;
this.rollDeltaOld = rollDelta;
this.rollDelta = LibUtils.cubicBezier(progress, options.rollCurve.x, options.rollCurve.y, options.rollCurve.z, options.rollCurve.w);
float k = (rollDelta - rollDeltaOld) / (progress - lastProgress);
roll += options.getRoll() * k * Mth.DEG_TO_RAD;
this.roll += options.roll * k * Mth.DEG_TO_RAD;

quadSizeOld = quadSize;
if (options.isPulse()) {
this.quadSizeOld = quadSize;
if (options.pulse) {
if (progress < 0.5f) {
setScale(options.getScale() * progress * 2);
}else{
setScale(options.getScale() * (1 - progress) * 2);
setScale(options.scale * progress * 2);
} else {
setScale(options.scale * (1 - progress) * 2);
}
}else{
setScale(options.getScale() * (1 - progress));
} else {
setScale(options.scale * (1 - progress));
}

super.tick();
}

public void setScale(float scale) {
quadSize = scale * 0.1f;
setSize(scale * 0.2f, scale * 0.2f);
this.quadSize = scale * 0.1F;
scale = quadSize + quadSize;
setSize(scale, scale);
}

@Override
Expand All @@ -89,33 +90,25 @@ public float getQuadSize(float partialTicks) {
}

protected void useCenterSprite() {
setSprite(sprites.get(options.isLarge() ? 3 : 1, 4));
float a = (options.getCenterColor() >>> 24 & 0xff) / 255f;
float r = (options.getCenterColor() >>> 16 & 0xff) / 255f;
float g = (options.getCenterColor() >>> 8 & 0xff) / 255f;
float b = (options.getCenterColor() & 0xff) / 255f;
this.alpha = a;
this.rCol = r;
this.gCol = g;
this.bCol = b;
setSprite(sprites.get(options.large ? 3 : 1, 4));
this.alpha = (options.centerColor >>> 24 & 0xFF) / 255F;
this.rCol = (options.centerColor >>> 16 & 0xFF) / 255F;
this.gCol = (options.centerColor >>> 8 & 0xFF) / 255F;
this.bCol = (options.centerColor & 0xFF) / 255F;
}

protected void useEdgeSprite() {
setSprite(sprites.get(options.isLarge() ? 4 : 2, 4));
float a = (options.getEdgeColor() >>> 24 & 0xff) / 255f;
float r = (options.getEdgeColor() >>> 16 & 0xff) / 255f;
float g = (options.getEdgeColor() >>> 8 & 0xff) / 255f;
float b = (options.getEdgeColor() & 0xff) / 255f;
this.alpha = a;
this.rCol = r;
this.gCol = g;
this.bCol = b;
setSprite(sprites.get(options.large ? 4 : 2, 4));
this.alpha = (options.edgeColor >>> 24 & 0xFF) / 255F;
this.rCol = (options.edgeColor >>> 16 & 0xFF) / 255F;
this.gCol = (options.edgeColor >>> 8 & 0xFF) / 255F;
this.bCol = (options.edgeColor & 0xFF) / 255F;
}

@Override
protected int getLightColor(float partialTick) {
if (options.isFullBrightness()) {
return 15 << 20 | 15 << 4;
if (options.fullBrightness) {
return 0xF000F0;
}
return super.getLightColor(partialTick);
}
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/confluence/lib/color/FloatRGB.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

public record FloatRGB(float red, float green, float blue) {
public static final FloatRGB ZERO = new FloatRGB(0.0F, 0.0F, 0.0F);
public static final FloatRGB DEMON_A = new FloatRGB(0.5F, 0.3F, 1.0F);
public static final FloatRGB DEMON_B = new FloatRGB(1.0F, 0.3F, 0.0F);

public static FloatRGB fromVector(Vector3f vector3f) {
return new FloatRGB(vector3f.x, vector3f.y, vector3f.z);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/confluence/lib/color/GlobalColors.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.confluence.lib.color;

public class GlobalColors {
public final class GlobalColors {
public static final IntegerRGB NPC_ARRIVED = IntegerRGB.of(0x327dff);
public static final IntegerRGB NPC_SLAIN = IntegerRGB.of(0xff1919);
public static final IntegerRGB MESSAGE = IntegerRGB.of(0x32ff82);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.confluence.lib.common.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.context.BlockPlaceContext;
Expand All @@ -14,14 +15,20 @@
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;

public abstract class HorizontalDirectionalWaterloggedBlock extends HorizontalDirectionalBlock implements SimpleWaterloggedBlock {
public class HorizontalDirectionalWaterloggedBlock extends HorizontalDirectionalBlock implements SimpleWaterloggedBlock {
public static final MapCodec<HorizontalDirectionalWaterloggedBlock> CODEC = simpleCodec(HorizontalDirectionalWaterloggedBlock::new);
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;

public HorizontalDirectionalWaterloggedBlock(Properties properties) {
super(properties);
registerDefaultState(stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false));
}

@Override
protected MapCodec<? extends HorizontalDirectionalWaterloggedBlock> codec() {
return CODEC;
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(FACING, WATERLOGGED);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.confluence.lib.common.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.LivingEntity;
Expand All @@ -14,14 +15,20 @@
import net.minecraft.world.level.material.PushReaction;
import org.jetbrains.annotations.Nullable;

public abstract class HorizontalDirectionalWithForwardTwoPartBlock extends HorizontalDirectionalBlock {
public class HorizontalDirectionalWithForwardTwoPartBlock extends HorizontalDirectionalBlock {
public static final MapCodec<HorizontalDirectionalWithForwardTwoPartBlock> CODEC = simpleCodec(HorizontalDirectionalWithForwardTwoPartBlock::new);
public static final EnumProperty<StateProperties.ForwardTwoPart> PART = StateProperties.FORWARD_TWO_PART;

public HorizontalDirectionalWithForwardTwoPartBlock(Properties properties) {
super(properties);
registerDefaultState(stateDefinition.any().setValue(PART, StateProperties.ForwardTwoPart.BASE).setValue(FACING, Direction.NORTH));
}

@Override
protected MapCodec<? extends HorizontalDirectionalWithForwardTwoPartBlock> codec() {
return CODEC;
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(StateProperties.FORWARD_TWO_PART, FACING);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.confluence.lib.common.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.LivingEntity;
Expand All @@ -16,14 +17,20 @@

import java.util.Map;

public abstract class HorizontalDirectionalWithHorizontalFourPartBlock extends HorizontalDirectionalBlock {
public class HorizontalDirectionalWithHorizontalFourPartBlock extends HorizontalDirectionalBlock {
public static final MapCodec<HorizontalDirectionalWithHorizontalFourPartBlock> CODEC = simpleCodec(HorizontalDirectionalWithHorizontalFourPartBlock::new);
public static final EnumProperty<StateProperties.HorizontalFourPart> PART = StateProperties.HORIZONTAL_FOUR_PART;

protected HorizontalDirectionalWithHorizontalFourPartBlock(Properties properties) {
super(properties);
registerDefaultState(stateDefinition.any().setValue(PART, StateProperties.HorizontalFourPart.BASE).setValue(FACING, Direction.NORTH));
}

@Override
protected MapCodec<? extends HorizontalDirectionalWithHorizontalFourPartBlock> codec() {
return CODEC;
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(StateProperties.HORIZONTAL_FOUR_PART, FACING);
Expand Down
Loading