Skip to content

Commit

Permalink
Added travel using an elytra feature, the RepairToolTask and some edi…
Browse files Browse the repository at this point in the history
…ts around that

gaucho-matrero#194
  • Loading branch information
awesomecat2011 committed Jun 24, 2022
1 parent 63e7e73 commit 0f6ce2b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/adris/altoclef/util/helpers/EntityHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ public static boolean isTradingPiglin(Entity entity) {
return false;
}

/**
* Return true if the entity is on ground (or in water)
*/
public static boolean isGrounded(AltoClef mod, Entity entity) {
return entity.isSwimming() || entity.isTouchingWater() || entity.isOnGround();
}
public static boolean isGrounded(AltoClef mod) {
return isGrounded(mod,mod.getPlayer());
}

/**
* Calculate the resulting damage dealt to a player as a result of some damage.
* If this player were to receive this damage, the player's health will be subtracted by the resulting value.
Expand Down

0 comments on commit 0f6ce2b

Please sign in to comment.