[SPIGOT-6625] Add basic fluid api for entities Created: 06/Jul/21 Updated: 21/Jul/21 |
|
Status: | Open |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Liquake | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 1 |
Labels: | Spigot |
Version: | This server is running CraftBukkit version git-Spigot-a99063f-8ea9b13 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Basically just add the basic fluid API PaperSpigot has
I noticed isInLava etc were missing in spigot, and I think this makes sense to have in the API.
Plus, the code is done: Thanks |
Comments |
Comment by Doc [ 21/Jul/21 ] |
Created PR for this feature. craftbukkit#896 and bukkit#645 i only make the PR for the methods isInLava, isInBubbleColumn and isInRain because the other methods in NMS and Paper are redundant (you can use a || operator with the methods created in PR like NMS) |
Comment by Doc [ 06/Jul/21 ] |
Sounds good have this methods (IsInLava, IsInWater, IsInBubbleColumn, isInRain) and not check the relative blocks (like block in head or feet) in Entity for check this cases. methods like (isInWaterOrRain, isInWaterOrBubbleColumn, isInWaterOrRainOrBubbleColumn) i think are not necesary if can use the another methods (i mean the || comparator is for this). |
Comment by Liquake [ 06/Jul/21 ] |
If a player is in Lava, their getBlock could be air. Player's touching liquid should be identified by API, getBlock is not sufficient for these cases.
If a player is touching bubblecolumn their getBlock for their location could be air.
Etc etc.
And while I'm sorry about linking that PR, it did have basically all the methods that make sense. I could get the list? |
Comment by md_5 [ 06/Jul/21 ] |
Please don't share code outside of pull requests. |