Package codechicken.lib.render.particle
Class CustomParticleHandler
java.lang.Object
codechicken.lib.render.particle.CustomParticleHandler
Created by covers1624 on 21/11/2016.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBlockDestroyEffects(net.minecraft.world.level.Level world, Cuboid6 bounds, List<net.minecraft.client.renderer.texture.TextureAtlasSprite> icons, net.minecraft.client.particle.ParticleEngine particleManager) static voidaddBlockHitEffects(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 voidaddLandingEffects(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, Vector3 entityPos, int numParticles) static booleanhandleDestroyEffects(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) Provided the model bound is an instance of IModelParticleProvider, you will have landing particles just handled for you.invalid reference
IClientBlockExtensions#addHitEffectsstatic booleanhandleHitEffects(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 fromIBlockExtension.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 booleanhandleLandingEffects(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.LivingEntity entity, int numParticles) Call fromIBlockExtension.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 booleanhandleRunningEffects(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)
-
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 fromIBlockExtension.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
IBlockExtension.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 fromIBlockExtension.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
IBlockExtension.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) 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.invalid reference
IClientBlockExtensions#addHitEffects- 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
invalid reference
IClientBlockExtensions#addHitEffects
-
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
-