From ec7c6e355e069f7bd67d7c0f24defb55a24887aa Mon Sep 17 00:00:00 2001 From: MrTJP Date: Sat, 24 Jun 2023 16:08:24 -0400 Subject: [PATCH] fix: wires not connecting to lamps --- .../illumination/block/IllumarLampBlock.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/illumination/src/main/java/mrtjp/projectred/illumination/block/IllumarLampBlock.java b/illumination/src/main/java/mrtjp/projectred/illumination/block/IllumarLampBlock.java index 83a8facf5..e0d8c51cc 100644 --- a/illumination/src/main/java/mrtjp/projectred/illumination/block/IllumarLampBlock.java +++ b/illumination/src/main/java/mrtjp/projectred/illumination/block/IllumarLampBlock.java @@ -1,10 +1,12 @@ package mrtjp.projectred.illumination.block; +import codechicken.multipart.api.RedstoneConnectorBlock; import mrtjp.projectred.illumination.tile.IllumarLampTile; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.RedstoneTorchBlock; @@ -18,7 +20,7 @@ import javax.annotation.Nullable; import java.util.Random; -public class IllumarLampBlock extends Block implements EntityBlock { +public class IllumarLampBlock extends Block implements EntityBlock, RedstoneConnectorBlock { public static final BooleanProperty LIT = RedstoneTorchBlock.LIT; @@ -86,4 +88,16 @@ public void tick(BlockState state, ServerLevel world, BlockPos pos, Random rand) public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new IllumarLampTile(color, inverted, pos, state); } + + //region Redstone Connector block + @Override + public int getConnectionMask(LevelReader world, BlockPos pos, int side) { + return 0x1F; + } + + @Override + public int weakPowerLevel(LevelReader world, BlockPos pos, int side, int mask) { + return 0; + } + //endregion }