mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Fix right clicking the coffee maker being wonky
This commit is contained in:
parent
d4cc7b0737
commit
09673dd118
1 changed files with 4 additions and 3 deletions
|
@ -35,16 +35,17 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
|
|||
|
||||
@Override
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (!world.isClientSide) {
|
||||
if (world.isClientSide) {
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos);
|
||||
if (tile != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
|
||||
player.openMenu(tile, pos);
|
||||
}
|
||||
}
|
||||
return InteractionResult.PASS;
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
return super.use(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Reference in a new issue