Package net.minecraft.client.particle
Class ParticleEngine
java.lang.Object
net.minecraft.client.particle.ParticleEngine
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
static interface
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addBlockHitEffects
(BlockPos pos, BlockHitResult target) private void
void
close()
void
createParticle
(ParticleOptions p_107371_, double p_107372_, double p_107373_, double p_107374_, double p_107375_, double p_107376_, double p_107377_) void
createTrackingEmitter
(Entity p_107330_, ParticleOptions p_107331_) void
createTrackingEmitter
(Entity p_107333_, ParticleOptions p_107334_, int p_107335_) void
destroy
(BlockPos p_107356_, BlockState p_107357_) private boolean
hasSpaceInParticleLimit
(ParticleGroup p_172280_) void
iterateParticles
(Consumer<Particle> consumer) private Optional
<List<ResourceLocation>> loadParticleDescription
(ResourceLocation p_250648_, Resource p_248793_) private <T extends ParticleOptions>
ParticlemakeParticle
(T p_107396_, double p_107397_, double p_107398_, double p_107399_, double p_107400_, double p_107401_, double p_107402_) <T extends ParticleOptions>
voidregister
(ParticleType<T> p_107379_, ParticleEngine.SpriteParticleRegistration<T> p_107380_) Deprecated.<T extends ParticleOptions>
voidregister
(ParticleType<T> p_273423_, ParticleProvider.Sprite<T> p_273134_) Deprecated.Register viaRegisterParticleProvidersEvent
<T extends ParticleOptions>
voidregister
(ParticleType<T> p_107382_, ParticleProvider<T> p_107383_) Deprecated.Register viaRegisterParticleProvidersEvent
private void
reload
(PreparableReloadListener.PreparationBarrier p_107305_, ResourceManager p_107306_, ProfilerFiller p_107307_, ProfilerFiller p_107308_, Executor p_107309_, Executor p_107310_) void
render
(LightTexture p_107339_, Camera p_107340_, float p_107341_) Deprecated.Neo: userender(LightTexture, Camera, float, net.minecraft.client.renderer.culling.Frustum, java.util.function.Predicate)
with additional parametersvoid
render
(LightTexture p_107339_, Camera p_107340_, float p_107341_, Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) void
setLevel
(ClientLevel p_107343_) void
tick()
private void
tickParticle
(Particle p_107394_) private void
tickParticleList
(Collection<Particle> p_107385_) private void
updateCount
(ParticleGroup p_172282_, int p_172283_) 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> p_107382_, ParticleProvider<T> p_107383_) Deprecated.Register viaRegisterParticleProvidersEvent
-
register
@Deprecated public <T extends ParticleOptions> void register(ParticleType<T> p_273423_, ParticleProvider.Sprite<T> p_273134_) Deprecated.Register viaRegisterParticleProvidersEvent
-
register
@Deprecated public <T extends ParticleOptions> void register(ParticleType<T> p_107379_, ParticleEngine.SpriteParticleRegistration<T> p_107380_) Deprecated.Register viaRegisterParticleProvidersEvent
-
reload
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier p_107305_, ResourceManager p_107306_, ProfilerFiller p_107307_, ProfilerFiller p_107308_, Executor p_107309_, Executor p_107310_) - Specified by:
reload
in interfacePreparableReloadListener
-
close
public void close() -
loadParticleDescription
private Optional<List<ResourceLocation>> loadParticleDescription(ResourceLocation p_250648_, Resource p_248793_) -
createTrackingEmitter
-
createTrackingEmitter
-
createParticle
@Nullable public Particle createParticle(ParticleOptions p_107371_, double p_107372_, double p_107373_, double p_107374_, double p_107375_, double p_107376_, double p_107377_) -
makeParticle
@Nullable private <T extends ParticleOptions> Particle makeParticle(T p_107396_, double p_107397_, double p_107398_, double p_107399_, double p_107400_, double p_107401_, double p_107402_) -
add
-
tick
public void tick() -
tickParticleList
-
updateCount
-
tickParticle
-
render
Deprecated.Neo: userender(LightTexture, Camera, float, net.minecraft.client.renderer.culling.Frustum, java.util.function.Predicate)
with additional parameters -
render
public void render(LightTexture p_107339_, Camera p_107340_, float p_107341_, @Nullable Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) -
setLevel
-
destroy
-
crack
-
countParticles
-
iterateParticles
-
addBlockHitEffects
-
hasSpaceInParticleLimit
-
clearParticles
private void clearParticles()
-
RegisterParticleProvidersEvent