Fix the dragon breath scroll

This commit is contained in:
Sollace 2024-12-19 18:18:51 +01:00
parent 30cf83e860
commit d5ee43abee
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -30,9 +30,9 @@ public class DragonBreathScrollItem extends Item {
return TypedActionResult.fail(stack); return TypedActionResult.fail(stack);
} }
stack.split(1); ItemStack scroll = stack.split(1);
if (!world.isClient) { if (!world.isClient) {
String recipient = stack.get(DataComponentTypes.CUSTOM_NAME).getString(); String recipient = scroll.get(DataComponentTypes.CUSTOM_NAME).getString();
UCriteria.SEND_DRAGON_BREATH.triggerSent(player, payload, recipient, (counterName, count) -> { UCriteria.SEND_DRAGON_BREATH.triggerSent(player, payload, recipient, (counterName, count) -> {
if (count == 1 && "dings_on_celestias_head".equals(counterName)) { if (count == 1 && "dings_on_celestias_head".equals(counterName)) {
UnicopiaWorldProperties properties = UnicopiaWorldProperties.forWorld((ServerWorld)world); UnicopiaWorldProperties properties = UnicopiaWorldProperties.forWorld((ServerWorld)world);