Fixed all compile errors
This commit is contained in:
parent
60e7489fa4
commit
54bbb75d77
1 changed files with 4 additions and 5 deletions
|
@ -7,6 +7,7 @@ import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.commands.arguments.item.ItemInput;
|
import net.minecraft.commands.arguments.item.ItemInput;
|
||||||
import net.minecraft.commands.arguments.item.ItemParser;
|
import net.minecraft.commands.arguments.item.ItemParser;
|
||||||
|
import net.minecraft.core.HolderLookup;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.particles.ParticleOptions;
|
import net.minecraft.core.particles.ParticleOptions;
|
||||||
import net.minecraft.core.particles.ParticleType;
|
import net.minecraft.core.particles.ParticleType;
|
||||||
|
@ -25,11 +26,9 @@ public class InfusionParticleType extends ParticleType<InfusionParticleType> imp
|
||||||
public static final ParticleOptions.Deserializer<InfusionParticleType> PARAMETERS_FACTORY = new ParticleOptions.Deserializer<InfusionParticleType>() {
|
public static final ParticleOptions.Deserializer<InfusionParticleType> PARAMETERS_FACTORY = new ParticleOptions.Deserializer<InfusionParticleType>() {
|
||||||
public InfusionParticleType fromCommand(ParticleType<InfusionParticleType> particleType, StringReader stringReader) throws CommandSyntaxException {
|
public InfusionParticleType fromCommand(ParticleType<InfusionParticleType> particleType, StringReader stringReader) throws CommandSyntaxException {
|
||||||
stringReader.expect(' ');
|
stringReader.expect(' ');
|
||||||
ItemParser itemStringReader = new ItemParser(stringReader, false).parse();
|
ItemParser.ItemResult itemResult = ItemParser.parseForItem(HolderLookup.forRegistry(Registry.ITEM), stringReader);
|
||||||
ItemStack itemStack = new ItemInput(
|
ItemStack itemStack = new ItemInput(itemResult.item(), itemResult.nbt()).createItemStack(1, false);
|
||||||
itemStringReader.getItem(),
|
|
||||||
itemStringReader.getNbt()
|
|
||||||
).createItemStack(1, false);
|
|
||||||
return new InfusionParticleType(particleType, itemStack);
|
return new InfusionParticleType(particleType, itemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue