Package net.minecraft.client.particle
Class ParticleManager
java.lang.Object
net.minecraft.client.particle.ParticleManager
- All Implemented Interfaces:
ResourceReloader
- Mappings:
Namespace Name official enj
intermediary net/minecraft/class_702
named net/minecraft/client/particle/ParticleManager
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
private static interface
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Int2ObjectMap<ParticleFactory<?>>
private final Object2IntOpenHashMap<ParticleGroup>
private static final int
private final Queue<EmitterParticle>
private static final List<ParticleTextureSheet>
private final SpriteAtlasTexture
private final Map<ParticleTextureSheet,
Queue<Particle>> private final Random
private final Map<Identifier,
ParticleManager.SimpleSpriteProvider> private final TextureManager
protected ClientWorld
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlockBreakingParticles
(BlockPos pos, Direction direction) void
addBlockBreakParticles
(BlockPos pos, BlockState state) void
addEmitter
(Entity entity, ParticleEffect parameters) void
addEmitter
(Entity entity, ParticleEffect parameters, int maxAge) void
addParticle
(Particle particle) addParticle
(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) private void
addTo
(ParticleGroup group, int count) private boolean
canAdd
(ParticleGroup group) Returns whether another particle fromgroup
can be rendered by this manager.void
private <T extends ParticleEffect>
@Nullable ParticlecreateParticle
(T parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) private void
loadTextureList
(ResourceManager resourceManager, Identifier id, Map<Identifier, List<Identifier>> result) private void
private <T extends ParticleEffect>
voidregisterFactory
(ParticleType<T> type, ParticleFactory<T> factory) private <T extends ParticleEffect>
voidregisterFactory
(ParticleType<T> type, ParticleManager.SpriteAwareFactory<T> factory) reload
(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload.void
renderParticles
(MatrixStack matrices, VertexConsumerProvider.Immediate vertexConsumers, LightmapTextureManager lightmapTextureManager, Camera camera, float tickDelta) void
setWorld
(@Nullable ClientWorld world) void
tick()
private void
tickParticle
(Particle particle) private void
tickParticles
(Collection<Particle> particles) Ticks all particles belonging to the same texture sheet.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
MAX_PARTICLE_COUNT
private static final int MAX_PARTICLE_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lenj;b:I
intermediary field_32657
Lnet/minecraft/class_702;field_32657:I
named MAX_PARTICLE_COUNT
Lnet/minecraft/client/particle/ParticleManager;MAX_PARTICLE_COUNT:I
-
PARTICLE_TEXTURE_SHEETS
- Mappings:
Namespace Name Mixin selector official c
Lenj;c:Ljava/util/List;
intermediary field_17820
Lnet/minecraft/class_702;field_17820:Ljava/util/List;
named PARTICLE_TEXTURE_SHEETS
Lnet/minecraft/client/particle/ParticleManager;PARTICLE_TEXTURE_SHEETS:Ljava/util/List;
-
world
- Mappings:
Namespace Name Mixin selector official a
Lenj;a:Lell;
intermediary field_3834
Lnet/minecraft/class_702;field_3834:Lnet/minecraft/class_638;
named world
Lnet/minecraft/client/particle/ParticleManager;world:Lnet/minecraft/client/world/ClientWorld;
-
particles
- Mappings:
Namespace Name Mixin selector official d
Lenj;d:Ljava/util/Map;
intermediary field_3830
Lnet/minecraft/class_702;field_3830:Ljava/util/Map;
named particles
Lnet/minecraft/client/particle/ParticleManager;particles:Ljava/util/Map;
-
newEmitterParticles
- Mappings:
Namespace Name Mixin selector official e
Lenj;e:Ljava/util/Queue;
intermediary field_3837
Lnet/minecraft/class_702;field_3837:Ljava/util/Queue;
named newEmitterParticles
Lnet/minecraft/client/particle/ParticleManager;newEmitterParticles:Ljava/util/Queue;
-
textureManager
- Mappings:
Namespace Name Mixin selector official f
Lenj;f:Lezs;
intermediary field_3831
Lnet/minecraft/class_702;field_3831:Lnet/minecraft/class_1060;
named textureManager
Lnet/minecraft/client/particle/ParticleManager;textureManager:Lnet/minecraft/client/texture/TextureManager;
-
random
- Mappings:
Namespace Name Mixin selector official g
Lenj;g:Ljava/util/Random;
intermediary field_3832
Lnet/minecraft/class_702;field_3832:Ljava/util/Random;
named random
Lnet/minecraft/client/particle/ParticleManager;random:Ljava/util/Random;
-
factories
- Mappings:
Namespace Name Mixin selector official h
Lenj;h:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
intermediary field_3835
Lnet/minecraft/class_702;field_3835:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
named factories
Lnet/minecraft/client/particle/ParticleManager;factories:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-
newParticles
- Mappings:
Namespace Name Mixin selector official i
Lenj;i:Ljava/util/Queue;
intermediary field_3836
Lnet/minecraft/class_702;field_3836:Ljava/util/Queue;
named newParticles
Lnet/minecraft/client/particle/ParticleManager;newParticles:Ljava/util/Queue;
-
spriteAwareFactories
- Mappings:
Namespace Name Mixin selector official j
Lenj;j:Ljava/util/Map;
intermediary field_18300
Lnet/minecraft/class_702;field_18300:Ljava/util/Map;
named spriteAwareFactories
Lnet/minecraft/client/particle/ParticleManager;spriteAwareFactories:Ljava/util/Map;
-
particleAtlasTexture
- Mappings:
Namespace Name Mixin selector official k
Lenj;k:Lezq;
intermediary field_18301
Lnet/minecraft/class_702;field_18301:Lnet/minecraft/class_1059;
named particleAtlasTexture
Lnet/minecraft/client/particle/ParticleManager;particleAtlasTexture:Lnet/minecraft/client/texture/SpriteAtlasTexture;
-
groupCounts
- Mappings:
Namespace Name Mixin selector official l
Lenj;l:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
intermediary field_29072
Lnet/minecraft/class_702;field_29072:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
named groupCounts
Lnet/minecraft/client/particle/ParticleManager;groupCounts:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
-
-
Constructor Details
-
ParticleManager
- Mappings:
Namespace Name Mixin selector official <init>
Lenj;<init>(Lell;Lezs;)V
intermediary <init>
Lnet/minecraft/class_702;<init>(Lnet/minecraft/class_638;Lnet/minecraft/class_1060;)V
named <init>
Lnet/minecraft/client/particle/ParticleManager;<init>(Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/client/texture/TextureManager;)V
-
-
Method Details
-
registerDefaultFactories
private void registerDefaultFactories()- Mappings:
Namespace Name Mixin selector official e
Lenj;e()V
intermediary method_3062
Lnet/minecraft/class_702;method_3062()V
named registerDefaultFactories
Lnet/minecraft/client/particle/ParticleManager;registerDefaultFactories()V
-
registerFactory
private <T extends ParticleEffect> void registerFactory(ParticleType<T> type, ParticleFactory<T> factory) - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lhw;Lenk;)V
intermediary method_3043
Lnet/minecraft/class_702;method_3043(Lnet/minecraft/class_2396;Lnet/minecraft/class_707;)V
named registerFactory
Lnet/minecraft/client/particle/ParticleManager;registerFactory(Lnet/minecraft/particle/ParticleType;Lnet/minecraft/client/particle/ParticleFactory;)V
-
registerFactory
private <T extends ParticleEffect> void registerFactory(ParticleType<T> type, ParticleManager.SpriteAwareFactory<T> factory) - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lhw;Lenj$b;)V
intermediary method_18834
Lnet/minecraft/class_702;method_18834(Lnet/minecraft/class_2396;Lnet/minecraft/class_702$class_4091;)V
named registerFactory
Lnet/minecraft/client/particle/ParticleManager;registerFactory(Lnet/minecraft/particle/ParticleType;Lnet/minecraft/client/particle/ParticleManager$SpriteAwareFactory;)V
-
reload
public CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload. Returns a future that is completed when the reload is completed.In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the
synchronizer
. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result ofthenAcceptAsync
.- Specified by:
reload
in interfaceResourceReloader
- Parameters:
synchronizer
- the synchronizermanager
- the resource managerprepareProfiler
- the profiler for prepare stageapplyProfiler
- the profiler for apply stageprepareExecutor
- the executor for prepare stageapplyExecutor
- the executor for apply stage- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Laff;a(Laff$a;Lafk;Lash;Lash;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
intermediary method_25931
Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
named reload
Lnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
clearAtlas
public void clearAtlas()- Mappings:
Namespace Name Mixin selector official a
Lenj;a()V
intermediary method_18829
Lnet/minecraft/class_702;method_18829()V
named clearAtlas
Lnet/minecraft/client/particle/ParticleManager;clearAtlas()V
-
loadTextureList
private void loadTextureList(ResourceManager resourceManager, Identifier id, Map<Identifier, List<Identifier>> result) - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lafk;Lyh;Ljava/util/Map;)V
intermediary method_18836
Lnet/minecraft/class_702;method_18836(Lnet/minecraft/class_3300;Lnet/minecraft/class_2960;Ljava/util/Map;)V
named loadTextureList
Lnet/minecraft/client/particle/ParticleManager;loadTextureList(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/Identifier;Ljava/util/Map;)V
-
addEmitter
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lawt;Lhv;)V
intermediary method_3061
Lnet/minecraft/class_702;method_3061(Lnet/minecraft/class_1297;Lnet/minecraft/class_2394;)V
named addEmitter
Lnet/minecraft/client/particle/ParticleManager;addEmitter(Lnet/minecraft/entity/Entity;Lnet/minecraft/particle/ParticleEffect;)V
-
addEmitter
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lawt;Lhv;I)V
intermediary method_3051
Lnet/minecraft/class_702;method_3051(Lnet/minecraft/class_1297;Lnet/minecraft/class_2394;I)V
named addEmitter
Lnet/minecraft/client/particle/ParticleManager;addEmitter(Lnet/minecraft/entity/Entity;Lnet/minecraft/particle/ParticleEffect;I)V
-
addParticle
@Nullable public @Nullable Particle addParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lhv;DDDDDD)Lenh;
intermediary method_3056
Lnet/minecraft/class_702;method_3056(Lnet/minecraft/class_2394;DDDDDD)Lnet/minecraft/class_703;
named addParticle
Lnet/minecraft/client/particle/ParticleManager;addParticle(Lnet/minecraft/particle/ParticleEffect;DDDDDD)Lnet/minecraft/client/particle/Particle;
-
createParticle
@Nullable private <T extends ParticleEffect> @Nullable Particle createParticle(T parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) - Mappings:
Namespace Name Mixin selector official b
Lenj;b(Lhv;DDDDDD)Lenh;
intermediary method_3055
Lnet/minecraft/class_702;method_3055(Lnet/minecraft/class_2394;DDDDDD)Lnet/minecraft/class_703;
named createParticle
Lnet/minecraft/client/particle/ParticleManager;createParticle(Lnet/minecraft/particle/ParticleEffect;DDDDDD)Lnet/minecraft/client/particle/Particle;
-
addParticle
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lenh;)V
intermediary method_3058
Lnet/minecraft/class_702;method_3058(Lnet/minecraft/class_703;)V
named addParticle
Lnet/minecraft/client/particle/ParticleManager;addParticle(Lnet/minecraft/client/particle/Particle;)V
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official b
Lenj;b()V
intermediary method_3057
Lnet/minecraft/class_702;method_3057()V
named tick
Lnet/minecraft/client/particle/ParticleManager;tick()V
-
tickParticles
Ticks all particles belonging to the same texture sheet.- Parameters:
particles
- a collection of particles from the same sheet- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Ljava/util/Collection;)V
intermediary method_3048
Lnet/minecraft/class_702;method_3048(Ljava/util/Collection;)V
named tickParticles
Lnet/minecraft/client/particle/ParticleManager;tickParticles(Ljava/util/Collection;)V
-
addTo
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lhu;I)V
intermediary method_34022
Lnet/minecraft/class_702;method_34022(Lnet/minecraft/class_5878;I)V
named addTo
Lnet/minecraft/client/particle/ParticleManager;addTo(Lnet/minecraft/client/particle/ParticleGroup;I)V
-
tickParticle
- Mappings:
Namespace Name Mixin selector official b
Lenj;b(Lenh;)V
intermediary method_3059
Lnet/minecraft/class_702;method_3059(Lnet/minecraft/class_703;)V
named tickParticle
Lnet/minecraft/client/particle/ParticleManager;tickParticle(Lnet/minecraft/client/particle/Particle;)V
-
renderParticles
public void renderParticles(MatrixStack matrices, VertexConsumerProvider.Immediate vertexConsumers, LightmapTextureManager lightmapTextureManager, Camera camera, float tickDelta) - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Ldsj;Lepl$a;Lepk;Ldwy;F)V
intermediary method_3049
Lnet/minecraft/class_702;method_3049(Lnet/minecraft/class_4587;Lnet/minecraft/class_4597$class_4598;Lnet/minecraft/class_765;Lnet/minecraft/class_4184;F)V
named renderParticles
Lnet/minecraft/client/particle/ParticleManager;renderParticles(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;Lnet/minecraft/client/render/LightmapTextureManager;Lnet/minecraft/client/render/Camera;F)V
-
setWorld
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lell;)V
intermediary method_3045
Lnet/minecraft/class_702;method_3045(Lnet/minecraft/class_638;)V
named setWorld
Lnet/minecraft/client/particle/ParticleManager;setWorld(Lnet/minecraft/client/world/ClientWorld;)V
-
addBlockBreakParticles
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lgh;Lcoc;)V
intermediary method_3046
Lnet/minecraft/class_702;method_3046(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named addBlockBreakParticles
Lnet/minecraft/client/particle/ParticleManager;addBlockBreakParticles(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
addBlockBreakingParticles
- Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lgh;Lgm;)V
intermediary method_3054
Lnet/minecraft/class_702;method_3054(Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)V
named addBlockBreakingParticles
Lnet/minecraft/client/particle/ParticleManager;addBlockBreakingParticles(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)V
-
getDebugString
- Mappings:
Namespace Name Mixin selector official d
Lenj;d()Ljava/lang/String;
intermediary method_3052
Lnet/minecraft/class_702;method_3052()Ljava/lang/String;
named getDebugString
Lnet/minecraft/client/particle/ParticleManager;getDebugString()Ljava/lang/String;
-
canAdd
Returns whether another particle fromgroup
can be rendered by this manager.- Returns:
- whether another particle from
group
can be rendered by this manager - Mappings:
Namespace Name Mixin selector official a
Lenj;a(Lhu;)Z
intermediary method_34021
Lnet/minecraft/class_702;method_34021(Lnet/minecraft/class_5878;)Z
named canAdd
Lnet/minecraft/client/particle/ParticleManager;canAdd(Lnet/minecraft/client/particle/ParticleGroup;)Z
-