Compare commits

..

No commits in common. "a841121dde1a1162575bff0f9d63f42d35f13df9" and "99e166337bdaadb96140d098d9dde17a9cba9207" have entirely different histories.

9 changed files with 10 additions and 9 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.SUCCESS;
return InteractionResult.CONSUME;
}
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.SUCCESS;
return InteractionResult.CONSUME;
}
return this.openGui(world, player, pos, TileEntityBreaker.class);

View file

@ -76,7 +76,7 @@ public class BlockDisplayStand extends BlockContainerBase {
heldItem.shrink(1);
else
player.swing(hand, true);
return InteractionResult.SUCCESS;
return InteractionResult.CONSUME;
} else if (ItemUtil.canBeStacked(heldItem, stackThere)) {
int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount());
if (maxTransfer > 0) {
@ -87,7 +87,7 @@ public class BlockDisplayStand extends BlockContainerBase {
ItemStack newStackThere = stackThere.copy();
newStackThere.shrink(maxTransfer);
stand.inv.setStackInSlot(0, newStackThere);
return InteractionResult.SUCCESS;
return InteractionResult.CONSUME;
}
}
} else {

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.SUCCESS;
return InteractionResult.CONSUME;
}
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.SUCCESS;
return InteractionResult.PASS;
}
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.SUCCESS;
return InteractionResult.PASS;
}
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.SUCCESS;
return InteractionResult.PASS;
}
return this.openGui(world, player, pos, TileEntityRangedCollector.class);

View file

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

View file

@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"textures": {
"base": "actuallyadditions:block/base_texture",
"back": "actuallyadditions:block/firework_box_side",
"back": "actuallyadditions:block/farmer_side",
"particle": "actuallyadditions:block/firework_box_side",
"side": "actuallyadditions:block/firework_box_side",
"top": "actuallyadditions:block/firework_box_top"