-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement Powder Snow #6857
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
base: minor-next
Are you sure you want to change the base?
Implement Powder Snow #6857
Conversation
|
I think this seems to be something missing in pocketmine, Slime block should also not deal damage if there is carpet on top of it. Jumping on a Carpet can also damage Farmland and on Beds it also gives a bouncing effect if they are under it. |
Hmm, not sure. Maybe leave that out of this PR then. |
|
I'm not very clear how powder snow is supposed to work. Are there any non-mobs affected by it? It seems weird to me that general entities should be affected. |
|
Freezing a burning entity should extinguish its fire, such as an arrow fired with the flame enchantment. However, we handle it in the PowderSnow block here. |
|
Yeah, I think so. Unless there are any non-living entities that can have the freeze effects. |
|
I've attached a plugin to the test section for plugin developers who want to try it out, in case they want to create a troll plugin or custom enchant. Any suggestions would be helpful. |
dktapps
left a comment
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.
From what I can gather, the implementation seems mostly OK. My main issues are with the API design.
dktapps
left a comment
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.
This is looking mostly done now I think
|
This looks good now. Will test soon and feedback |
|
Looks like we have a simulation issue with the collision boxes. Since the collision AABB is different if the entity is wearing leather boots or not (they should be able to stand on the powder snow). For non player entities I don't think this will work currently. I'm not too sure how that should be addressed though, since we don't really have the systems to deal with that... |
|
Hmm... Some mobs like foxes can also stand on powder snow (unless it does a jumping attack on a chicken in the powder snow). This might be a problem if we want to implement Scaffolding block. I think the collision is just as complex because it only prevents falling, but allows for passing from the side. |
|
No, that would prevent regular mobs from falling inside it. This needs to be fixed properly with a more general solution. I have a rough idea how to deal with it, but collision detection is very performance-sensitive code, so it needs to be handled carefully. |
This pull request adds support for powder snow as a block and item, including its interactions with entities and buckets.
Powder Snow Block and Item Implementation
PowderSnowblockThis PR does not implement:
1.17.0 - Caves & Cliffs
Related issues & PRs
#5964
#5163
Changes
API changes
PowderSnowclassSolidBucketclassLiving::getFreezeProgressTicks()Living::setFreezeProgressTicks(int $freezeProgressTicks)Living::getFreezeProgressRatio()Living::getFreezeThresholdTicks()Living::getFreezeProgressState()Living::setFreezeProgressState(?bool $state)Living::canFreeze()EntityDamageEvent::CAUSE_FREEZETests
https://www.youtube.com/watch?v=QVkKMMUlHjE
Plugin:
https://gist.github.com/DavyCraft648/ca56d2587da2b08a983cf3e648e5c0c8