mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fix errors
This commit is contained in:
parent
75e50f72d6
commit
3795e11ff5
1 changed files with 2 additions and 2 deletions
|
@ -386,13 +386,13 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
|||
ItemStack glasses = GlassesItem.getForEntity(entity).stack();
|
||||
BreaksIntoItemComponent afterBroken = glasses.get(UDataComponentTypes.ITEM_AFTER_BREAKING);
|
||||
|
||||
if (afterBroken != null && afterBroken.damageType().contains(magical.getTypeRegistryEntry())) {
|
||||
if (afterBroken != null && magical.isIn(afterBroken.damageType())) {
|
||||
if (afterBroken != null) {
|
||||
afterBroken.getItemAfterBreaking().ifPresent(b -> {
|
||||
ItemStack broken = glasses.withItem(b);
|
||||
TrinketsDelegate.getInstance(entity).setEquippedStack(entity, TrinketsDelegate.FACE, broken);
|
||||
afterBroken.getBreakingSound().ifPresent(sound -> {
|
||||
playSound(USounds.ITEM_SUNGLASSES_SHATTER, 1, 1);
|
||||
playSound(sound, 1, 1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue