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 classstatic interfaceNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClientLevelprivate static final org.slf4j.Loggerprivate static final intprivate static final FileToIdConverterprivate final Map<ParticleRenderType, Queue<Particle>> private static final ResourceLocationprivate final Map<ResourceLocation, ParticleProvider<?>> private final RandomSourceprivate static final List<ParticleRenderType> private final Map<ResourceLocation, ParticleEngine.MutableSpriteSet> private final TextureAtlasprivate final TextureManagerprivate final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<ParticleGroup> private final Queue<TrackingEmitter> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddBlockHitEffects(BlockPos pos, BlockHitResult target) private voidvoidclose()voidAdds block hit particles for the specified blockcreateParticle(ParticleOptions pParticleData, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) voidcreateTrackingEmitter(Entity pEntity, ParticleOptions pParticleData) voidcreateTrackingEmitter(Entity pEntity, ParticleOptions pData, int pLifetime) voiddestroy(BlockPos pPos, BlockState pState) private booleanhasSpaceInParticleLimit(ParticleGroup pGroup) voiditerateParticles(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 viaRegisterParticleProvidersEventprivate voidreload(PreparableReloadListener.PreparationBarrier p_107305_, ResourceManager p_107306_, Executor p_107309_, Executor p_107310_) voidrender(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource) Deprecated.voidrender(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) private static voidrenderCustomParticles(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, Queue<Particle> pParticles) private static voidrenderCustomParticles(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, Queue<Particle> pParticles, Frustum frustum) private static voidrenderParticleType(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, ParticleRenderType pParticleType, Queue<Particle> pParticles) private static voidrenderParticleType(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, ParticleRenderType pParticleType, Queue<Particle> pParticles, Frustum frustum) voidsetLevel(ClientLevel pLevel) voidtick()private voidtickParticle(Particle pParticle) private voidtickParticleList(Collection<Particle> pParticles) private voidupdateCount(ParticleGroup pGroup, int pCount) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 p_107305_, ResourceManager p_107306_, Executor p_107309_, Executor p_107310_) - Specified by:
reloadin 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 public void render(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource) Deprecated. -
render
public void render(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, @Nullable Frustum frustum, Predicate<ParticleRenderType> renderTypePredicate) -
renderParticleType
@Deprecated private static void renderParticleType(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, ParticleRenderType pParticleType, Queue<Particle> pParticles) -
renderParticleType
private static void renderParticleType(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, ParticleRenderType pParticleType, Queue<Particle> pParticles, @Nullable Frustum frustum) -
renderCustomParticles
@Deprecated private static void renderCustomParticles(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, Queue<Particle> pParticles) -
renderCustomParticles
private static void renderCustomParticles(Camera pCamera, float pPartialTick, MultiBufferSource.BufferSource pBufferSource, Queue<Particle> pParticles, @Nullable Frustum frustum) -
setLevel
-
destroy
-
crack
Adds block hit particles for the specified block -
countParticles
-
iterateParticles
-
addBlockHitEffects
-
hasSpaceInParticleLimit
-
clearParticles
private void clearParticles()
-
RegisterParticleProvidersEvent