Skip to content

Commit

Permalink
Fix in-world interaction with reactors and buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Jul 21, 2024
1 parent e4fcf81 commit 68ac595
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/owmii/powah/block/reactor/ReactorBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ public BlockState getStateForPlacement(BlockPlaceContext context) {
protected ItemInteractionResult useItemOn(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand,
BlockHitResult pHitResult) {
BlockEntity tileentity = pLevel.getBlockEntity(pPos);
if (tileentity instanceof ReactorTile reactor) {
if (tileentity instanceof ReactorPartTile reactor) {
if (reactor.isBuilt() && reactor.core().isPresent()) {
return reactor.getBlock().useItemOn(pStack, pState, pLevel, reactor.getCorePos(), pPlayer, pHand, pHitResult);
}
} else if (tileentity instanceof ReactorTile reactor) {
if (reactor.isBuilt()) {
Tank tank = reactor.getTank();
if (FluidUtil.interactWithFluidHandler(pPlayer, pHand, tank)) {
Expand Down

0 comments on commit 68ac595

Please sign in to comment.