Skip to content

Commit

Permalink
stop werewolf players to transform if there is no space for the new m…
Browse files Browse the repository at this point in the history
…odel
  • Loading branch information
Cheaterpaul committed Jun 7, 2024
1 parent bf0da66 commit 59d013b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ public boolean canBeUsedBy(IWerewolfPlayer werewolf) {
return true;
}
} else {
if (this.form.getSize(werewolf.asEntity().getPose()).map(dimensions -> dimensions.makeBoundingBox(werewolf.asEntity().position())).filter(s -> werewolf.asEntity().level().collidesWithSuffocatingBlock(werewolf.asEntity(), s)).isPresent()) {
return false;
}
if (werewolf.getForm().isTransformed()) {
return true;
} else {
Expand Down

0 comments on commit 59d013b

Please sign in to comment.