Skip to content

Commit

Permalink
knockback explosions are now more potent on non-players
Browse files Browse the repository at this point in the history
  • Loading branch information
MoriyaShiine committed Oct 18, 2024
1 parent 64e7fd5 commit 9a8cca2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public void affectWorld(boolean particles) {
double strength = (1 - distance) * getExposure(source, entity);
if (entity instanceof PlayerEntity player) {
getAffectedPlayers().put(player, new Vec3d(dX * strength, dY * strength, dZ * strength));
} else {
strength *= 2;
}
if (entity instanceof LivingEntity living) {
strength *= 1 - living.getAttributeValue(EntityAttributes.GENERIC_EXPLOSION_KNOCKBACK_RESISTANCE);
Expand Down

0 comments on commit 9a8cca2

Please sign in to comment.