Forgero - [Fabric]

Forgero - [Fabric]

85k Downloads

Handler fixes needed before handler branch release

JorisDeBeer opened this issue ยท 4 comments

commented
  • 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)
commented

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
        }
      },
commented

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"
          }
        }
      }
    ]
commented

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

commented

It can be done like this:

 {
        "type": "minecraft:on_hit",
        "on_hit": [
          {
            "type": "minecraft:fire",
            "duration": 5
          },
          {
            "type": "minecraft:particle",
            "particle": "minecraft:flame",
            "count": 50,
            "behavior": "OUTWARD",
            "offset": {"x": 0.0, "y": 1.5, "z": 0.0}
          }
        ]
      }