Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handler fixes needed before handler branch release #1082

Open
3 of 4 tasks
Tracked by #1091
JorisDeBeer opened this issue Sep 8, 2024 · 3 comments
Open
3 of 4 tasks
Tracked by #1091

Handler fixes needed before handler branch release #1082

JorisDeBeer opened this issue Sep 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@JorisDeBeer
Copy link
Collaborator

JorisDeBeer commented Sep 8, 2024

  • Handlers on item also proc on the item itself without it being used on a tool.
  • Feature section in the tooltip works fine on arrows, not on normal tools.
  • Need a way to synchronize the random predicate for sounds, particles and the effect itself.
  • Particle do not seem to work with arrows? (sounds do work fine)
@Steveplays28 Steveplays28 added the bug Something isn't working label Sep 10, 2024
@SigmundGranaas
Copy link
Owner

Here's an example of using sounds and particles with a random predicate as a swing feature.

 {
        "type": "minecraft:on_swing",
        "swing": [
          {
            "type": "minecraft:particle",
            "particle": "minecraft:flame",
            "count": 50,
            "behavior": "OUTWARD",
            "offset": {"x": 0.0, "y": 1.5, "z": 0.0}
          },
          {
            "type": "minecraft:play_sound",
            "sound": "minecraft:item.firecharge.use",
            "volume": 1,
            "pitch": 1.2
          }
        ],
        "predicate": {
          "type": "forgero:random",
          "seed": ["world_time"],
          "world_time_quantization": 10,
          "value": 0.5
        }
      },

@SigmundGranaas
Copy link
Owner

Here's an example of adding particle effects to arrows when it fired.

 "features": [
      {
        "type": "minecraft:entity_tick",
        "handler": [
          {
            "type": "minecraft:particle",
            "particle": "minecraft:flame",
            "count": 50,
            "behavior": "OUTWARD",
            "offset": {"x": 0.0, "y": 1.5, "z": 0.0}
          }
        ],
        "predicate": {
          "type": "minecraft:entity",
          "entity_type": {
            "id": "forgero:dynamic_arrow"
          }
        }
      }
    ]

@JorisDeBeer
Copy link
Collaborator Author

I need particles to show when it hits tho is that also possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants