mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-19 11:02:33 +00:00
Merge branch 'master' into dev/7.0-2
This commit is contained in:
commit
af1e9de474
@ -6,10 +6,15 @@ import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
|||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import net.minecraft.commands.arguments.ParticleArgument;
|
import net.minecraft.commands.arguments.ParticleArgument;
|
||||||
|
import net.minecraft.core.HolderLookup;
|
||||||
import net.minecraft.core.HolderLookup.Provider;
|
import net.minecraft.core.HolderLookup.Provider;
|
||||||
|
import net.minecraft.core.HolderLookup.RegistryLookup;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.world.level.biome.AmbientParticleSettings;
|
import net.minecraft.world.level.biome.AmbientParticleSettings;
|
||||||
|
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
|
||||||
public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientParticleSettings> {
|
public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientParticleSettings> {
|
||||||
@Value("particle")
|
@Value("particle")
|
||||||
@ -28,7 +33,7 @@ public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientPartic
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return new AmbientParticleSettings(ParticleArgument.readParticle(new StringReader(particle),
|
return new AmbientParticleSettings(ParticleArgument.readParticle(new StringReader(particle),
|
||||||
(Provider) BuiltInRegistries.PARTICLE_TYPE.asHolderIdMap()), probability);
|
HolderLookup.Provider.create(Stream.of(BuiltInRegistries.PARTICLE_TYPE))), probability);
|
||||||
} catch(CommandSyntaxException e) {
|
} catch(CommandSyntaxException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user