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

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

Open
Xaidee opened this issue Jul 22, 2022 · 1 comment

Comments

@Xaidee
Copy link

Xaidee commented Jul 22, 2022

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.

@SeanChengN
Copy link

Seconded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants