Compiler issues v2

This commit is contained in:
Bjarne Koll
2024-10-25 13:52:04 +02:00
parent cc0308bf1d
commit c6a0ad379d
20 changed files with 35 additions and 49 deletions

View File

@@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2));
- Dolphin.this.level().addFreshEntity(entityitem);
+ Dolphin.this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
+ Dolphin.this.spawnAtLocation(getServerLevel(Dolphin.this), entityitem); // Paper - Call EntityDropItemEvent
}
}
}
@@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setThrower(this);
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
- this.level().addFreshEntity(entityitem);
+ this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
+ this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), entityitem); // Paper - Call EntityDropItemEvent
}
}
@@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), stack);
- this.level().addFreshEntity(entityitem);
+ this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
+ this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), entityitem); // Paper - Call EntityDropItemEvent
}
@Override
@@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.level().addFreshEntity(entityitem);
- return true;
+ return this.spawnAtLocation(entityitem) != null; // Paper - Call EntityDropItemEvent
+ return this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), entityitem) != null; // Paper - Call EntityDropItemEvent
}
}
@@ -79,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setDefaultPickUpDelay();
this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null);
+ if (this.spawnAtLocation(entityitem) != null) { // Paper - Call EntityDropItemEvent
+ if (this.spawnAtLocation(world, entityitem) != null) { // Paper - Call EntityDropItemEvent
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
- world.addFreshEntity(entityitem);
+ } // Paper - Call EntityDropItemEvent