Interface StandardPartParticleHandler<P extends MultiPart>
- All Superinterfaces:
PartParticleHandler<P>
- All Known Implementing Classes:
McStatePartParticleHandler
A simple and standard implementation of
PartParticleHandler.
Created by covers1624 on 7/26/26.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddDestroyEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine) Add particles and other effects when a player finishes breaking this part.default voidaddHitEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine) Add particles and other effects when a player is mining this part.default voidaddLandingEffects(P part, PartRayTraceResult hit, codechicken.lib.vec.Vector3 entity, int numberOfParticles) Add particles and other effects when a player lands on this part.default voidaddRunningEffects(P part, PartRayTraceResult hit, net.minecraft.world.entity.Entity entity) Add particles and other effects when a player runs over this part.default booleanenableVolumetricBreaking(P part) When spawning breaking particles, if the number/locations of particles spawned should be based on the volume of your part.codechicken.lib.vec.Cuboid6Get the bounds of the part.List<net.minecraft.client.renderer.texture.TextureAtlasSprite> getBrokenTextures(P part) Get all the textures to use when your part is broken.@Nullable net.minecraft.client.renderer.texture.TextureAtlasSpritegetParticleTexture(P part, PartRayTraceResult hit) Get the texture to use when breaking/running/landing on a part.
-
Method Details
-
getBounds
Get the bounds of the part.For breaking, places the crumbling particles on the faces of the supplied cuboid.
For broken, enables spawning particles based on the size/location of the cuboid.
- Parameters:
part- The part.- Returns:
- The bounds.
-
enableVolumetricBreaking
When spawning breaking particles, if the number/locations of particles spawned should be based on the volume of your part.- Parameters:
part- The part.- Returns:
- If volumetric breaking particles should be used.
-
getParticleTexture
@Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite getParticleTexture(P part, PartRayTraceResult hit) Get the texture to use when breaking/running/landing on a part.In the case of running/landing a hit result will be spawned from the players feet to hit your part.
- Parameters:
part- The part.hit- The current hit result.- Returns:
- The texture. May be
nullto disable.
-
getBrokenTextures
Get all the textures to use when your part is broken.The textures will be randomly mixed together.
- Parameters:
part- The part.- Returns:
- The textures.
-
addHitEffects
default void addHitEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine) Description copied from interface:PartParticleHandlerAdd particles and other effects when a player is mining this part.- Specified by:
addHitEffectsin interfacePartParticleHandler<P extends MultiPart>- Parameters:
hit- ThePartRayTraceResulthit result.engine- TheParticleEngineto spawn particles.
-
addDestroyEffects
default void addDestroyEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine) Description copied from interface:PartParticleHandlerAdd particles and other effects when a player finishes breaking this part.- Specified by:
addDestroyEffectsin interfacePartParticleHandler<P extends MultiPart>- Parameters:
hit- ThePartRayTraceResulthit result.engine- TheParticleEngineto spawn particles.
-
addLandingEffects
default void addLandingEffects(P part, PartRayTraceResult hit, codechicken.lib.vec.Vector3 entity, int numberOfParticles) Description copied from interface:PartParticleHandlerAdd particles and other effects when a player lands on this part.- Specified by:
addLandingEffectsin interfacePartParticleHandler<P extends MultiPart>- Parameters:
hit- The hit directly bellow the entities feet.entity- The position of the entity.numberOfParticles- The number of particles to spawn.
-
addRunningEffects
default void addRunningEffects(P part, PartRayTraceResult hit, net.minecraft.world.entity.Entity entity) Description copied from interface:PartParticleHandlerAdd particles and other effects when a player runs over this part.This is called on both the client and the server.
- Specified by:
addRunningEffectsin interfacePartParticleHandler<P extends MultiPart>- Parameters:
hit- The hit directly bellow the players feet.entity- The entity running.
-