Fixing redstone things

This commit is contained in:
Flanks255 2024-06-02 17:40:08 -05:00
parent 99e166337b
commit 5ce4f9a73c
7 changed files with 6 additions and 7 deletions

View file

@ -64,7 +64,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
ItemStack heldItem = player.getItemInHand(hand);
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.CONSUME;
return InteractionResult.SUCCESS;
}
if (!world.isClientSide) {
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getBlockEntity(pos);

View file

@ -57,7 +57,7 @@ public class BlockBreaker extends FullyDirectionalBlock.Container {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.CONSUME;
return InteractionResult.SUCCESS;
}
return this.openGui(world, player, pos, TileEntityBreaker.class);

View file

@ -49,7 +49,7 @@ public class BlockDropper extends FullyDirectionalBlock.Container {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.CONSUME;
return InteractionResult.SUCCESS;
}
return this.openGui(world, player, pos, TileEntityDropper.class);

View file

@ -36,7 +36,7 @@ public class BlockFireworkBox extends BlockContainerBase {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.PASS;
return InteractionResult.SUCCESS;
}
return this.openGui(world, player, pos, TileEntityFireworkBox.class);

View file

@ -49,7 +49,7 @@ public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.PASS;
return InteractionResult.SUCCESS;
}
return this.openGui(world, player, pos, TileEntityLongRangeBreaker.class);

View file

@ -49,7 +49,7 @@ public class BlockRangedCollector extends BlockContainerBase {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
if (this.tryToggleRedstone(world, pos, player)) {
return InteractionResult.PASS;
return InteractionResult.SUCCESS;
}
return this.openGui(world, player, pos, TileEntityRangedCollector.class);

View file

@ -59,7 +59,6 @@ public class CommonEvents {
event.setUseItem(Event.Result.DENY);
event.setUseBlock(Event.Result.ALLOW);
}
}
@SubscribeEvent