Is your feature request related to a problem?
I am developing a fishing plugin and would like to implement fishing in lava.
However, the TagKey<Fluid> referenced by the NMS FishingHook class is hardcoded. To allow fishing in lava, I would have to completely reimplement the vanilla water fishing mechanics from scratch. This would require significant effort and could negatively impact server performance.
Describe the solution you'd like.
- Add a TagKey field to the
FishingHook class and set its default value to FluidTags.WATER.
- Modify references to
FluidTags.WATER within the FishingHook class to use the newly added field instead.
- Add two methods to the Bukkit
FishHook class:
TagKey<Fluid> getBobbingFluids()
void setBobbingFluids(TagKey<Fluid> fluids)
- Implement these methods in
CraftFishHook. (Would parsing with PaperRegistries.toNms be the appropriate implementation?)
I considered adding this as a World Configuration option, but since the demand for this feature is limited and the runtime cost for plugins is low, I believe it is unnecessary.
If this request is accepted, I am willing to submit a PR myself :)
Describe alternatives you've considered.
- Reimplement vanilla water fishing mechanics for lava fishing within the plugin.
- This could lead to inconsistencies between versions.
- It may negatively impact performance.
- Attempted to modify
FluidState using ServerTickStartEvent, but it didn't work.
- Even if it worked, it would negatively impact performance.
- Use a data pack to modify
fluid/water.json in fluid tags by adding flowing_lava and lava. (This is the closest to an ideal implementation.)
- However, it would affect other game mechanics that rely on fluid tags. Reference
- Implement a
CustomFishingHook class.
- This would involve copying the NMS
FishingHook class and modifying only a few lines in the tick method. However, publishing this code on GitHub or including it in a JAR could violate Mojang Mappings licensing terms.
- Additionally, using NMS directly introduces compatibility issues across versions.
- Fork Paper and modify the
FishingHook class directly.
Other
No response
Is your feature request related to a problem?
I am developing a fishing plugin and would like to implement fishing in lava.
However, the
TagKey<Fluid>referenced by the NMSFishingHookclass is hardcoded. To allow fishing in lava, I would have to completely reimplement the vanilla water fishing mechanics from scratch. This would require significant effort and could negatively impact server performance.Describe the solution you'd like.
FishingHookclass and set its default value toFluidTags.WATER.FluidTags.WATERwithin theFishingHookclass to use the newly added field instead.FishHookclass:TagKey<Fluid> getBobbingFluids()void setBobbingFluids(TagKey<Fluid> fluids)CraftFishHook. (Would parsing withPaperRegistries.toNmsbe the appropriate implementation?)I considered adding this as a World Configuration option, but since the demand for this feature is limited and the runtime cost for plugins is low, I believe it is unnecessary.
If this request is accepted, I am willing to submit a PR myself :)
Describe alternatives you've considered.
FluidStateusingServerTickStartEvent, but it didn't work.fluid/water.jsonin fluid tags by addingflowing_lavaandlava. (This is the closest to an ideal implementation.)CustomFishingHookclass.FishingHookclass and modifying only a few lines in the tick method. However, publishing this code on GitHub or including it in a JAR could violate Mojang Mappings licensing terms.FishingHookclass directly.Other
No response