Skip to content

Commit

Permalink
Merge pull request #609 from ferriarnus/magnet-fix
Browse files Browse the repository at this point in the history
Fix electromagnet in spectator
  • Loading branch information
Rover656 committed Feb 7, 2024
2 parents e6f6bc9 + 6c6b74a commit c043898
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ private boolean isMagnetable(Entity entity) {

@Override
protected void onTickWhenActive(Player player, ItemStack pStack, Level pLevel, Entity pEntity, int pSlotId, boolean pIsSelected) {

if (player.isSpectator()) {
return;
}

int range = getRange();
AABB bounds = new AABB(player.getX() - range, player.getY() - range, player.getZ() - range, player.getX() + range, player.getY() + range,
player.getZ() + range);
Expand Down

0 comments on commit c043898

Please sign in to comment.