KubeJS Create

KubeJS Create

26M Downloads

[Suggestion] Ability to register items and blocks as potato cannon projectiles

Xaidee opened this issue ยท 1 comments

commented

Would love to see this implemented if possible, it would've been nice if Create used a data based system with the way the potato cannon registers projectiles but it doesn't so maybe this mod would be perfect for allowing mod-pack developers to add projectiles using JavaScript.

An example user-end implementation could look something like this:

onEvent('create.potato_cannon', event => {
     event.create('example_projectile')
          .damage(8)
          .reloadTicks(15)
          .knockback(0.1)
          .velocity(1.1)
          .renderTumbling()
          .sticky()
          .soundPitch(1.0)
          .ammo('item_or_block_id')
}

An example Java class of this implementation from a separate mod can be found here and the class itself responsible for registering potato cannon projectiles can be found here for reference.

I might have a go at creating an implementation and pull request myself if I find the time but I'm not super familiar with KubeJS's code and structure so I thought it would be good to put this here in the mean time.

commented

Seconded