com.github.fierioziy.asm.utils.ParticleVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ParticleNativeAPI Show documentation
Show all versions of ParticleNativeAPI Show documentation
Provides API for spawning particles on Spigot server.
package com.github.fierioziy.asm.utils;
import com.github.fierioziy.api.Particles_1_13;
import com.github.fierioziy.api.Particles_1_8;
import org.objectweb.asm.Type;
/**
* An enum used by ParticleNode
class to store
* particle version.
*
* It also provides interface class associated with certain
* particle version.
*/
public enum ParticleVersion {
V1_7(Particles_1_8.class),
V1_8(Particles_1_8.class),
V1_13(Particles_1_13.class);
private Class> particleTypesClass;
private Type superType;
private Type implType;
ParticleVersion(Class> particleTypesClass) {
this.particleTypesClass = particleTypesClass;
superType = Type.getType(particleTypesClass);
implType = Type.getObjectType(superType.getInternalName() + "_Impl");
}
/**
* Gets interface class associated with particle version.
* @return an interface class.
*/
public Class> getParticleTypesClass() {
return particleTypesClass;
}
/**
* Gets Type
object associated with interface class.
* @return a Type
object representing interface class.
*/
public Type getSuperType() {
return superType;
}
/**
* Gets Type
object associated with class implementing interface.
* @return a Type
object representing class implementing interface.
*/
public Type getImplType() {
return implType;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy