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

Add power attribute for projectiles #1237

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Add power attribute for projectiles #1237

merged 1 commit into from
Sep 16, 2023

Conversation

cswhite2000
Copy link
Member

@cswhite2000 cswhite2000 commented Sep 10, 2023

Resolves #1232

Adds a power attribute for projectiles. If the projectile implements Explosive and a power is supplied it will set the explosive power to the specified amount.

Example usage:

<projectile id="throwable-fireball" name="Fireball" projectile="Fireball" power="5" velocity=".5" click="right" damage="8" cooldown="2s"/>

@cswhite2000 cswhite2000 added the feature New feature or request label Sep 10, 2023
@Pablete1234
Copy link
Member

Pablete1234 commented Sep 10, 2023

I believe yield is the probability of items dropping, 1=100% of items, 0.5=50% items etc, not the power of the explosion

@arcadeboss
Copy link
Contributor

I believe yield is the probability of items dropping, 1=100% of items, 0.5=50% items etc, not the power of the explosion

We did a test on CS's test server last night where he had hard-coded the value to 10. It was super explosive in both destruction of materials and allowing high Fireball jumping.

@cswhite2000
Copy link
Member Author

I believe yield is the probability of items dropping, 1=100% of items, 0.5=50% items etc, not the power of the explosion

So the setYield on Explosive sets the explosion's power / explosion size.
While setYield on EntityExplodeEvent sets the block drop rate.

@Pablete1234
Copy link
Member

I believe yield is the probability of items dropping, 1=100% of items, 0.5=50% items etc, not the power of the explosion

So the setYield on Explosive sets the explosion's power / explosion size. While setYield on EntityExplodeEvent sets the block drop rate.

Well, that sounds like a stupid decision on the bukkit api or other upstream sources, can we avoid passing it down to pgm?
What i mean by that is, can we not call it yield="x"?
Currently pgm has

<tnt>
  <power>5</power>
  <yield>0.5</yield>
</tnt>

and i wouldn't want that yield and this one to be confused.

Maybe just call it power (like tnt has)?

@cswhite2000
Copy link
Member Author

Sure will do

Signed-off-by: Christopher White <[email protected]>
@Pablete1234 Pablete1234 changed the title Add yield attribute for projectiles Add power attribute for projectiles Sep 13, 2023
@Electroid Electroid merged commit d3e8c4e into dev Sep 16, 2023
2 checks passed
@Electroid Electroid deleted the projectile-yield branch September 16, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

Successfully merging this pull request may close these issues.

Custom Projectile - Explosiveness Control
4 participants