Bassebombecraft

Bassebombecraft

18.5k Downloads

1.14.3: mapping of particle types in configuration file to MC particle types

Closed this issue ยท 2 comments

commented

The ParticleType doesn't contain a method for mapping particle name/IDs to particles.
Problematic class:

public class ConfigUtils {

	public static ParticleRenderingInfo[] createFromConfig(String key) {
		Config configuration = getBassebombeCraft().getConfiguration();
		BasicParticleType particleType = ParticleTypes.getByName(configuration.getString(key + ".Particles.Type"));
...

commented

Solution is to use the particle repository to map the from IDs to particles:

Optional<ParticleType<? extends IParticleData>> particleType = Registry.PARTICLE_TYPE.getValue(key2);

commented

Closed with commit 25b9987.