Package net.minecraft.client.particle
Class ParticleEngine
java.lang.Object
net.minecraft.client.particle.ParticleEngine
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
static interface
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClientLevel
private static final org.slf4j.Logger
private static final int
private static final FileToIdConverter
private final Map
<ParticleRenderType, Queue<Particle>> private static final ResourceLocation
private final Map
<ResourceLocation, ParticleProvider<?>> private final RandomSource
private static final List
<ParticleRenderType> private final Map
<ResourceLocation, ParticleEngine.MutableSpriteSet> private final TextureAtlas
private final TextureManager
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap
<ParticleGroup> private final Queue
<TrackingEmitter> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addBlockHitEffects
(BlockPos pos, BlockHitResult target) private void
void
close()
void
Adds block hit particles for the specified blockcreateParticle
(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) void
createTrackingEmitter
(Entity pEntity, ParticleOptions pParticleData) void
createTrackingEmitter
(Entity pEntity, ParticleOptions pData, int pLifetime) void
destroy
(BlockPos pPos, BlockState pState) private boolean
hasSpaceInParticleLimit
(ParticleGroup pGroup) void
iterateParticles
(Consumer<Particle> consumer) private Optional
<List<ResourceLocation>> loadParticleDescription
(ResourceLocation pRegistryName, Resource pResource) private <T extends ParticleOptions>
ParticlemakeParticle
(T pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) <T extends ParticleOptions>
voidregister
(ParticleType<T> pParticleType, ParticleEngine.SpriteParticleRegistration<T> pParticleMetaFactory) Deprecated.<T extends ParticleOptions>
voidregister
(ParticleType<T> pParticleType, ParticleProvider.Sprite<T> pSprite) Deprecated.Register viaRegisterParticleProvidersEvent
<T extends ParticleOptions>
voidregister
(ParticleType<T> pParticleType, ParticleProvider<T> pParticleFactory) Deprecated.Register viaRegisterParticleProvidersEvent
private void
reload
(PreparableReloadListener.PreparationBarrier pStage, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) void
render
(LightTexture pLightTexture, Camera pCamera, float pPartialTick) Deprecated.void
render
(LightTexture pLightTexture, Camera pCamera, float pPartialTick, Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) void
setLevel
(ClientLevel pLevel) void
tick()
private void
tickParticle
(Particle pParticle) private void
tickParticleList
(Collection<Particle> pParticles) private void
updateCount
(ParticleGroup pGroup, int pCount) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PARTICLE_LISTER
-
PARTICLES_ATLAS_INFO
-
MAX_PARTICLES_PER_LAYER
private static final int MAX_PARTICLES_PER_LAYER- See Also:
-
RENDER_ORDER
-
level
-
particles
-
trackingEmitters
-
textureManager
-
random
-
providers
-
particlesToAdd
-
spriteSets
-
textureAtlas
-
trackedParticleCounts
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ParticleGroup> trackedParticleCounts
-
-
Constructor Details
-
ParticleEngine
-
-
Method Details
-
registerProviders
private void registerProviders() -
register
@Deprecated public <T extends ParticleOptions> void register(ParticleType<T> pParticleType, ParticleProvider<T> pParticleFactory) Deprecated.Register viaRegisterParticleProvidersEvent
-
register
@Deprecated public <T extends ParticleOptions> void register(ParticleType<T> pParticleType, ParticleProvider.Sprite<T> pSprite) Deprecated.Register viaRegisterParticleProvidersEvent
-
register
@Deprecated public <T extends ParticleOptions> void register(ParticleType<T> pParticleType, ParticleEngine.SpriteParticleRegistration<T> pParticleMetaFactory) Deprecated.Register viaRegisterParticleProvidersEvent
-
reload
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier pStage, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
close
public void close() -
loadParticleDescription
private Optional<List<ResourceLocation>> loadParticleDescription(ResourceLocation pRegistryName, Resource pResource) -
createTrackingEmitter
-
createTrackingEmitter
-
createParticle
@Nullable public Particle createParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
makeParticle
@Nullable private <T extends ParticleOptions> Particle makeParticle(T pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) -
add
-
tick
public void tick() -
tickParticleList
-
updateCount
-
tickParticle
-
render
Deprecated. -
render
public void render(LightTexture pLightTexture, Camera pCamera, float pPartialTick, @Nullable Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) -
setLevel
-
destroy
-
crack
Adds block hit particles for the specified block -
countParticles
-
iterateParticles
-
addBlockHitEffects
-
hasSpaceInParticleLimit
-
clearParticles
private void clearParticles()
-
RegisterParticleProvidersEvent