Minecraft Data Packs / Game Mechanic

ML Particle Generator - Minecraft 1.20.4

  • check_circle Advancements
  • check_circle Functions
  • 2,275 views, 11 today
  • 87 downloads, 1 today
  • 17
  • 12
Required Resource Pack
michaelslife's Avatar michaelslife
Level 39 : Artisan Theorist
23
ML Particle Generator For Minecraft 1.20.4+

The ML Particle Generator allows for more dynamic and customizable particles in Minecraft.

Features:
  • Use items as particles, with the option to set the CustomModelData for a particle in order to use custom png files.
  • Set emitter options like radius, direction, particle count, etc.
  • Set visual options like item, scale, brightness, etc.
  • Set behavior options like life span, speed, collision, gravity, rotation, etc.
  • Set callback commands for events like particle emit, particle tick, and generator trigger.
  • Set a trigger area for a player to start the particle generator when in range, and stop when out of range.

Note: The resource pack is only necessary if using the preset particles.

Here are the steps to install the data pack and the resource pack (contained in the zip file download):
- Step 1: Unzip the MLParticle.zip file in your downloads folder.
- Step 2: Place the ml_particle and ml_ces folders into your Minecraft world's datapacks folder.
- Step 3: Place the resources.zip file into the main directory of your Minecraft world if you want to use the preset particles.

***

# Editor Setup: First Steps

- You must first run this function to be an editor for the Particle Generator System:
/function ml_particle:editor

- Once you receive the Particle Editor item, right-click it to create a particle generator at your location.
- You can also right-click the Particle Editor item when close to an existing particle generator to bring up the main menu.

- Once you are done editing a generator, click the [Enabled] option next to Location Icon in the main menu to turn off the visual icon for the generator. When the icon is disabled, you won't be able to move the generator around, but you can use your Particle Editor item when near the generator to bring up the menu again.

***

# Generator Options:

- Click the [Triggers] option to view the menu where you can enable/disable the trigger for a particle generator. When a player is in range of a trigger, it will start the generator.

- Click the [Presets] option to load various presets for the generator. These can be helpful to understand how the generator works with different settings.

- Click the [Commands] option to view the menu where you can get various commands to use that will perform different actions on the generator, such as start, stop, trigger, summon, or delete.

## Emitter Menu: Controls how the generator will emit particles

  • The Radius determines how far away from the generator's position a particle can be emitted at random.
  • The Direction determines which direction a particle will face when emitted.
  • The Max count is the maximum amount of active particles the generator can have at any given time.
  • The Burst is how many particles will be emitted at one time.
  • The Wait time is how long the generator will wait before emitting another particle.
  • The Timer amount is how long the generator will run before it turns itself off.

## Visual Menu: Controls what the particles will look like

  • The Item Name and CMD values determine which item will be used for the particle.
  • The Start and End Scale values determine the size of a particle over time.
  • The Billboard option determines if and how the particle will face the player.
  • The Brightness value determines how bright the particle will be. If set to Auto, the brightness is determined by the amount of light in the world at the generator's position.
  • The Random 2D Rotation option is useful to create a random rotation on the Z axis for particles that always face the player.

## Behavior Menu: Controls how the particles will behave

  • The Life Span value determines how long the particle will live for.
  • The Speed value determines how fast the particle will move, and the Damp value determines if it will slow down or speed up over time.
  • The Collision value determines if the particles will collide with blocks in the world.
  • The Gravity value determines how fast the particle will move downward, or upward if using a negative value.
  • The Turn value determines how fast the particle will turn during its life span.
  • The Emit and Tick commands are useful for setting a command that will run when each particle is emitted or on every tick while the particle is active.

***

# Save/Load:

- Use the [Save] option in the main menu to save the particle generator in order to summon it or load it on another generator. Once saved, click the [​Commands] option in the main menu to view the summon commands.
- Use the [Load] option to get the command that will load the data from a saved generator.

***

# Actions:

- There are various commands in the datapack that can be ran on a particle generator to perform different actions.

- Start: starts the generator
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/start

- Stop: stops the generator
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/stop

- Trigger: triggers the generator once, which will stop when it reaches the Max count
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/trigger

- Trigger Reset: resets the trigger so it can be triggered again in case the amount of times has ran out
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/trigger_reset

- Trigger Disable: disables the trigger so that it cannot be triggered by a player
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/trigger_disable

- Trigger Enable: enables the trigger so that a player can trigger it
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/trigger_enable

- Load: loads a saved generator by name - replace NAME with the generator save name
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/load {name:"NAME"}

- Delete: deletes a particle generator
/execute as @e[​tag=ml_particle.generator,limit=1,sort=nearest] run function ml_particle:run/delete

## Summon Actions:

- Summon: summons a new particle generator at the command location - replace NAME with the generator save name
/function ml_particle:summon {name:"NAME"}

- Summon & Start: summons a new particle generator at the command location, and starts it - replace NAME with the generator save name
/function ml_particle:summon_start {name:"NAME"}

- Summon Once: summons a new particle generator at the command location, starts it, then deletes it when its finished emitting - replace NAME with the generator save name
/function ml_particle:summon_once {name:"NAME"}

***

# Important Notes:

- This datapack force loads the chunk at position 0 0.
- This datapack uses the MLCES datapack.
- This datapack sets the game rule commandBlockOutput to false
- To unload the datapack, run this function:
/function ml_particle:system/unload
- Add the tag debug to yourself if you want to receive debug warnings or error messages for this datapack.
CreditThanks to OpaJones for help with particles and testing!
CompatibilityMinecraft 1.20
Tags

1 Update Logs

Update #1 : by michaelslife 02/25/2024 10:51:38 amFeb 25th

The MLCES datapack was updated to fix an issue that prevented other datapacks from checking interactions/attacks on interaction entities.

If updating to this datapack from an older version, stand in an area where your particles are loaded in the world and run the reload command:
/reload

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome