-
Notifications
You must be signed in to change notification settings - Fork 89
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 splash potions entity to Spawner module #1002
Add splash potions entity to Spawner module #1002
Conversation
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
The potion effects are now nested inside <spawners>
<spawner spawn-region="gold-apple" player-region="gold-apple" delay="5s">
<potion duration="10">
<effect amplifier="1">slowness</effect>
</potion>
</spawner>
<spawner spawn-region="arrows" player-region="arrows" delay="5s">
<potion duration="10" amplifier="3">
<effect>speed</effect>
<effect>jump_boost</effect>
</potion>
</spawner>
</spawners> |
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
The ThrownPotion entity now appears correctly by using NMS hacks, since its appearance can't be changed after spawning. The potion particles appear off centre (should be in centre of red wool) as you can see in the screenshot, but this is pretty minor. Currently the metadata isn't set to the splash potion entity, but other than that it's complete imo. |
Does the NMS hack work on Spigot as well? |
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
The entity does not spawn using Spigot 1.8.8. It returns this error:
|
Then you should adjust the NMSHack using the SportPaper check so it uses a Spigot compatible method. Not a real worry since its only potion colors right? |
Luckily it looks like it was just a building error on my end, using the PGM compiled by the GitHub Builds shows it spawning the potion properly without any errors in Spigot. |
Signed-off-by: Patrick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good in general, just a few more tweaks
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/spawner/objects/SpawnablePotion.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick <[email protected]>
This reverts commit 6003eff.
This PR adds falling potions (splash potions) as a droppable entity that can be configured with the XML spawner. These are automatically used when using
<effect> <effects> <potion> <potions>
. Some work needs to be done on it first, like fixing the positions that the potions spawn, flame effects, potion colour and so on.