diff --git a/src/main/java/ru/betterend/particle/InfusionParticleType.java b/src/main/java/ru/betterend/particle/InfusionParticleType.java index 5370d4fa..73e473f2 100644 --- a/src/main/java/ru/betterend/particle/InfusionParticleType.java +++ b/src/main/java/ru/betterend/particle/InfusionParticleType.java @@ -7,6 +7,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.commands.arguments.item.ItemInput; import net.minecraft.commands.arguments.item.ItemParser; +import net.minecraft.core.HolderLookup; import net.minecraft.core.Registry; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleType; @@ -25,11 +26,9 @@ public class InfusionParticleType extends ParticleType imp public static final ParticleOptions.Deserializer PARAMETERS_FACTORY = new ParticleOptions.Deserializer() { public InfusionParticleType fromCommand(ParticleType particleType, StringReader stringReader) throws CommandSyntaxException { stringReader.expect(' '); - ItemParser itemStringReader = new ItemParser(stringReader, false).parse(); - ItemStack itemStack = new ItemInput( - itemStringReader.getItem(), - itemStringReader.getNbt() - ).createItemStack(1, false); + ItemParser.ItemResult itemResult = ItemParser.parseForItem(HolderLookup.forRegistry(Registry.ITEM), stringReader); + ItemStack itemStack = new ItemInput(itemResult.item(), itemResult.nbt()).createItemStack(1, false); + return new InfusionParticleType(particleType, itemStack); }