mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Use instanceof instead of casting
This commit is contained in:
parent
b3d05a4b57
commit
4a9ec0d4ef
1 changed files with 2 additions and 2 deletions
|
|
@ -151,8 +151,8 @@ public final class ItemTranslator {
|
|||
|
||||
// Fixes fireworks crafting recipe: they always contain a tag
|
||||
// TODO remove once all items have their default components
|
||||
if (javaItem instanceof BedrockRequiresTagItem) {
|
||||
((BedrockRequiresTagItem) javaItem).addRequiredNbt(session, components, nbtBuilder);
|
||||
if (javaItem instanceof BedrockRequiresTagItem requiresTagItem) {
|
||||
requiresTagItem.addRequiredNbt(session, components, nbtBuilder);
|
||||
}
|
||||
|
||||
Rarity rarity = javaItem.rarity();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue