Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 14:30:17 +01:00
Fix NPE in TippedArrow when it has no components (#4694)
Dieser Commit ist enthalten in:
Ursprung
5f7a31a1d8
Commit
cb0488a271
@ -41,6 +41,7 @@ public class TippedArrowItem extends ArrowItem {
|
||||
|
||||
@Override
|
||||
public ItemData.Builder translateToBedrock(int count, DataComponents components, ItemMapping mapping, ItemMappings mappings) {
|
||||
if (components != null) {
|
||||
PotionContents potionContents = components.get(DataComponentType.POTION_CONTENTS);
|
||||
if (potionContents != null) {
|
||||
TippedArrowPotion tippedArrowPotion = TippedArrowPotion.of(potionContents.getPotionId());
|
||||
@ -52,6 +53,7 @@ public class TippedArrowItem extends ArrowItem {
|
||||
}
|
||||
GeyserImpl.getInstance().getLogger().debug("Unknown Java potion (tipped arrow): " + potionContents.getPotionId());
|
||||
}
|
||||
}
|
||||
return super.translateToBedrock(count, components, mapping, mappings);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren