public class ParticleManager extends java.lang.Object implements IFutureReloadListener
Modifier and Type | Class and Description |
---|---|
(package private) class |
ParticleManager.AnimatedSpriteImpl |
static interface |
ParticleManager.IParticleMetaFactory<T extends IParticleData> |
IFutureReloadListener.IStage
Modifier and Type | Field and Description |
---|---|
private AtlasTexture |
atlas |
private java.util.Map<IParticleRenderType,java.util.Queue<Particle>> |
byType |
private java.util.Map<ResourceLocation,IParticleFactory<?>> |
factories |
private java.util.Queue<EmitterParticle> |
particleEmitters |
private java.util.Queue<Particle> |
queue |
private java.util.Random |
rand |
private TextureManager |
renderer |
private java.util.Map<ResourceLocation,ParticleManager.AnimatedSpriteImpl> |
sprites |
private static java.util.List<IParticleRenderType> |
TYPES |
protected World |
world |
Constructor and Description |
---|
ParticleManager(World worldIn,
TextureManager rendererIn) |
Modifier and Type | Method and Description |
---|---|
void |
addBlockDestroyEffects(BlockPos pos,
BlockState state) |
void |
addBlockHitEffects(BlockPos pos,
BlockRayTraceResult target) |
void |
addBlockHitEffects(BlockPos pos,
Direction side) |
void |
addEffect(Particle effect) |
Particle |
addParticle(IParticleData particleData,
double x,
double y,
double z,
double xSpeed,
double ySpeed,
double zSpeed) |
void |
addParticleEmitter(Entity entityIn,
IParticleData particleData) |
void |
clearEffects(World worldIn) |
void |
close() |
void |
emitParticleAtEntity(Entity entityIn,
IParticleData dataIn,
int lifetimeIn) |
java.lang.String |
getStatistics() |
private void |
loadTextureLists(IResourceManager manager,
ResourceLocation particleId,
java.util.Map<ResourceLocation,java.util.List<ResourceLocation>> textures) |
private <T extends IParticleData> |
makeParticle(T particleData,
double x,
double y,
double z,
double xSpeed,
double ySpeed,
double zSpeed) |
private void |
registerFactories() |
<T extends IParticleData> |
registerFactory(ParticleType<T> particleTypeIn,
IParticleFactory<T> particleFactoryIn) |
<T extends IParticleData> |
registerFactory(ParticleType<T> particleTypeIn,
ParticleManager.IParticleMetaFactory<T> particleMetaFactoryIn) |
java.util.concurrent.CompletableFuture<java.lang.Void> |
reload(IFutureReloadListener.IStage stage,
IResourceManager resourceManager,
IProfiler preparationsProfiler,
IProfiler reloadProfiler,
java.util.concurrent.Executor backgroundExecutor,
java.util.concurrent.Executor gameExecutor) |
void |
renderParticles(MatrixStack matrixStackIn,
IRenderTypeBuffer.Impl bufferIn,
LightTexture lightTextureIn,
ActiveRenderInfo activeRenderInfoIn,
float partialTicks) |
void |
tick() |
private void |
tickParticle(Particle particle) |
private void |
tickParticleList(java.util.Collection<Particle> particlesIn) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
func_225594_i_
private static final java.util.List<IParticleRenderType> TYPES
protected World world
private final java.util.Map<IParticleRenderType,java.util.Queue<Particle>> byType
private final java.util.Queue<EmitterParticle> particleEmitters
private final TextureManager renderer
private final java.util.Random rand
private final java.util.Map<ResourceLocation,IParticleFactory<?>> factories
private final java.util.Queue<Particle> queue
private final java.util.Map<ResourceLocation,ParticleManager.AnimatedSpriteImpl> sprites
private final AtlasTexture atlas
public ParticleManager(World worldIn, TextureManager rendererIn)
private void registerFactories()
public <T extends IParticleData> void registerFactory(ParticleType<T> particleTypeIn, IParticleFactory<T> particleFactoryIn)
public <T extends IParticleData> void registerFactory(ParticleType<T> particleTypeIn, ParticleManager.IParticleMetaFactory<T> particleMetaFactoryIn)
public java.util.concurrent.CompletableFuture<java.lang.Void> reload(IFutureReloadListener.IStage stage, IResourceManager resourceManager, IProfiler preparationsProfiler, IProfiler reloadProfiler, java.util.concurrent.Executor backgroundExecutor, java.util.concurrent.Executor gameExecutor)
reload
in interface IFutureReloadListener
public void close()
private void loadTextureLists(IResourceManager manager, ResourceLocation particleId, java.util.Map<ResourceLocation,java.util.List<ResourceLocation>> textures)
public void addParticleEmitter(Entity entityIn, IParticleData particleData)
public void emitParticleAtEntity(Entity entityIn, IParticleData dataIn, int lifetimeIn)
@Nullable public Particle addParticle(IParticleData particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed)
@Nullable private <T extends IParticleData> Particle makeParticle(T particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed)
public void addEffect(Particle effect)
public void tick()
private void tickParticleList(java.util.Collection<Particle> particlesIn)
private void tickParticle(Particle particle)
public void renderParticles(MatrixStack matrixStackIn, IRenderTypeBuffer.Impl bufferIn, LightTexture lightTextureIn, ActiveRenderInfo activeRenderInfoIn, float partialTicks)
public void clearEffects(@Nullable World worldIn)
public void addBlockDestroyEffects(BlockPos pos, BlockState state)
public java.lang.String getStatistics()
public void addBlockHitEffects(BlockPos pos, BlockRayTraceResult target)