Interface StandardPartParticleHandler<P extends MultiPart>

All Superinterfaces:
PartParticleHandler<P>
All Known Implementing Classes:
McStatePartParticleHandler

public interface StandardPartParticleHandler<P extends MultiPart> extends PartParticleHandler<P>
A simple and standard implementation of PartParticleHandler.

Created by covers1624 on 7/26/26.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    addDestroyEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine)
    Add particles and other effects when a player finishes breaking this part.
    default void
    addHitEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine)
    Add particles and other effects when a player is mining this part.
    default void
    addLandingEffects(P part, PartRayTraceResult hit, codechicken.lib.vec.Vector3 entity, int numberOfParticles)
    Add particles and other effects when a player lands on this part.
    default void
    addRunningEffects(P part, PartRayTraceResult hit, net.minecraft.world.entity.Entity entity)
    Add particles and other effects when a player runs over this part.
    default boolean
    When spawning breaking particles, if the number/locations of particles spawned should be based on the volume of your part.
    codechicken.lib.vec.Cuboid6
    getBounds(P part)
    Get the bounds of the part.
    List<net.minecraft.client.renderer.texture.TextureAtlasSprite>
    Get all the textures to use when your part is broken.
    @Nullable net.minecraft.client.renderer.texture.TextureAtlasSprite
    Get the texture to use when breaking/running/landing on a part.
  • Method Details

    • getBounds

      codechicken.lib.vec.Cuboid6 getBounds(P part)
      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

      default boolean enableVolumetricBreaking(P part)
      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 null to disable.
    • getBrokenTextures

      List<net.minecraft.client.renderer.texture.TextureAtlasSprite> getBrokenTextures(P part)
      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: PartParticleHandler
      Add particles and other effects when a player is mining this part.
      Specified by:
      addHitEffects in interface PartParticleHandler<P extends MultiPart>
      Parameters:
      hit - The PartRayTraceResult hit result.
      engine - The ParticleEngine to spawn particles.
    • addDestroyEffects

      default void addDestroyEffects(P part, PartRayTraceResult hit, net.minecraft.client.particle.ParticleEngine engine)
      Description copied from interface: PartParticleHandler
      Add particles and other effects when a player finishes breaking this part.
      Specified by:
      addDestroyEffects in interface PartParticleHandler<P extends MultiPart>
      Parameters:
      hit - The PartRayTraceResult hit result.
      engine - The ParticleEngine to spawn particles.
    • addLandingEffects

      default void addLandingEffects(P part, PartRayTraceResult hit, codechicken.lib.vec.Vector3 entity, int numberOfParticles)
      Description copied from interface: PartParticleHandler
      Add particles and other effects when a player lands on this part.
      Specified by:
      addLandingEffects in interface PartParticleHandler<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: PartParticleHandler
      Add particles and other effects when a player runs over this part.

      This is called on both the client and the server.

      Specified by:
      addRunningEffects in interface PartParticleHandler<P extends MultiPart>
      Parameters:
      hit - The hit directly bellow the players feet.
      entity - The entity running.