Fixed anvil sound not playing when hitting celestia on the head

This commit is contained in:
Sollace 2023-09-10 18:53:32 +01:00
parent 3957c739f3
commit eace54f36a
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -11,6 +11,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundCategory;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
@ -37,7 +38,7 @@ public class DragonBreathScrollItem extends Item {
if (count == 1 && "dings_on_celestias_head".equals(counterName)) {
UnicopiaWorldProperties properties = UnicopiaWorldProperties.forWorld((ServerWorld)world);
properties.setTangentalSkyAngle(properties.getTangentalSkyAngle() + 15);
player.playSound(USounds.Vanilla.BLOCK_ANVIL_HIT, 0.3F, 1);
world.playSound(null, player.getBlockPos(), USounds.Vanilla.BLOCK_ANVIL_HIT, SoundCategory.NEUTRAL, 0.3F, 1);
}
});
DragonBreathStore.get(world).put(recipient, payload.split(1));