Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
added way to set output mode on mass storages and item barrels
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Oct 25, 2023
1 parent adc5636 commit b8ec158
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ public InteractionResult onInteractServer(BlockState state, Level world, BlockPo
Utils.damageStack(player.getItemInHand(hand), hand, player);
return InteractionResult.SUCCESS;
}
if (type == AntimatterDefaultTools.WRENCH){
Direction hitSide = Utils.getInteractSide(hit);
if (hitSide == this.getFacing() || hit.getDirection().getAxis().isVertical()){
output = !output;
//TODO: translation component
player.sendMessage(Utils.literal(output ? "Auto output on" : "Auto output off"), player.getUUID());
Utils.damageStack(player.getItemInHand(hand), hand, player);
return InteractionResult.SUCCESS;
}
}

if (hit.getDirection().getAxis().isHorizontal() && hit.getDirection() == this.getFacing() && handler != null){
double x = hit.getDirection().getAxis() == Direction.Axis.Z ? vec.x() - hit.getBlockPos().getX() : vec.z() - hit.getBlockPos().getZ(), y = vec.y() - hit.getBlockPos().getY();
int amountToExtract = 0;
Expand Down

0 comments on commit b8ec158

Please sign in to comment.