Skip to content

Commit

Permalink
Fix collision not damaging the entity
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Jan 5, 2025
1 parent 5d19867 commit 120ec0a
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,8 @@ public void checkForCollisionsAndWakeUp() {

if (!nearbyEntities.isEmpty()) {
for (Entity collidingEntity : nearbyEntities) {
if ((!this.isSleeping() && !this.isHiding()) || collidingEntity instanceof PiranhaPlantEntity
|| collidingEntity.getY() >= this.getY() + this.getEyeHeight()
|| !(collidingEntity.getDeltaMovement().horizontalDistance() > 0)
|| !collidingEntity.getPersistentData().getBoolean("marioverse:has_super_star"))
if (collidingEntity instanceof PiranhaPlantEntity
&& !(collidingEntity.getType().is(TagRegistry.PIRANHA_PLANT_CAN_ATTACK)))
return;

this.doHurtTarget(collidingEntity);
Expand Down

0 comments on commit 120ec0a

Please sign in to comment.