Fixed feathers dropping on the client. Fixes #383

This commit is contained in:
Sollace 2024-09-16 17:56:55 +01:00
parent 6f9af46060
commit 7c779eb2e3
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -463,7 +463,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
entity.damage(entity.getDamageSources().generic(), 0.5F);
}
if (type.isAvian()) {
if (type.isAvian() && !entity.getWorld().isClient) {
if (pony.getObservedSpecies() != Race.BAT && entity.getWorld().random.nextInt(9000) == 0) {
entity.dropItem(pony.getObservedSpecies() == Race.HIPPOGRIFF ? UItems.GRYPHON_FEATHER : UItems.PEGASUS_FEATHER);
playSound(USounds.ENTITY_PLAYER_PEGASUS_MOLT, 0.3F, 1);