Class CustomParticleHandler

java.lang.Object
codechicken.lib.render.particle.CustomParticleHandler

public class CustomParticleHandler extends Object
Created by covers1624 on 21/11/2016.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addBlockDestroyEffects(net.minecraft.world.level.Level world, Cuboid6 bounds, List<net.minecraft.client.renderer.texture.TextureAtlasSprite> icons, net.minecraft.client.particle.ParticleEngine particleManager)
     
    static void
    addBlockHitEffects(net.minecraft.world.level.Level world, Cuboid6 bounds, net.minecraft.core.Direction side, net.minecraft.client.renderer.texture.TextureAtlasSprite icon, net.minecraft.client.particle.ParticleEngine particleManager)
     
    static void
    addLandingEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, Vector3 entityPos, int numParticles)
     
    static boolean
    handleDestroyEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.particle.ParticleEngine manager)
    IClientBlockExtensions.addHitEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.Level, net.minecraft.world.phys.HitResult, net.minecraft.client.particle.ParticleEngine) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you.
    static boolean
    handleHitEffects(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.world.phys.HitResult traceResult, net.minecraft.client.particle.ParticleEngine manager)
    Call from IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you.
    static boolean
    handleLandingEffects(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.LivingEntity entity, int numParticles)
    Call from IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you.
    static boolean
    handleRunningEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.Entity entity)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomParticleHandler

      public CustomParticleHandler()
  • Method Details

    • handleLandingEffects

      public static boolean handleLandingEffects(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.LivingEntity entity, int numParticles)
      Call from IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you.
      Parameters:
      world - The world.
      pos - The position of the block.
      entity - The entity.
      numParticles - The number of particles to spawn.
      Returns:
      Always true for this, basically just return the result of this method inside IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int)
    • handleRunningEffects

      public static boolean handleRunningEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.Entity entity)
    • handleHitEffects

      public static boolean handleHitEffects(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.world.phys.HitResult traceResult, net.minecraft.client.particle.ParticleEngine manager)
      Call from IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you. Use the default PerspectiveModel implementations in CCL, Hit effects will be polled from your model based on your bounding box hit.
      Parameters:
      state - The state.
      world - The world.
      traceResult - The trace result.
      manager - The ParticleManager.
      Returns:
      True if particles were added, basically just return the result of this method inside IForgeBlock.addLandingEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.entity.LivingEntity, int)
    • handleDestroyEffects

      public static boolean handleDestroyEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.particle.ParticleEngine manager)
      IClientBlockExtensions.addHitEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.Level, net.minecraft.world.phys.HitResult, net.minecraft.client.particle.ParticleEngine) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you. Use the default PerspectiveModel implementations inside CCL, Destroy effects will just be handled for you.
      Parameters:
      world - The world.
      pos - The position of the block.
      manager - The ParticleManager.
      Returns:
      True if particles were added, basically just return the result of this method inside IClientBlockExtensions.addHitEffects(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.Level, net.minecraft.world.phys.HitResult, net.minecraft.client.particle.ParticleEngine)
    • addLandingEffects

      public static void addLandingEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, Vector3 entityPos, int numParticles)
    • addBlockHitEffects

      public static void addBlockHitEffects(net.minecraft.world.level.Level world, Cuboid6 bounds, net.minecraft.core.Direction side, net.minecraft.client.renderer.texture.TextureAtlasSprite icon, net.minecraft.client.particle.ParticleEngine particleManager)
    • addBlockDestroyEffects

      public static void addBlockDestroyEffects(net.minecraft.world.level.Level world, Cuboid6 bounds, List<net.minecraft.client.renderer.texture.TextureAtlasSprite> icons, net.minecraft.client.particle.ParticleEngine particleManager)