Create a Fluid Flow API#74
Conversation
# Conflicts: # settings.gradle
LambdAurora
left a comment
There was a problem hiding this comment.
I'm not sure if it's useful to get an event depending on the direction?
Especially if you iterate through every directions anyway.
Co-authored-by: LambdAurora <aurora42lambda@gmail.com>
|
Thats a good point, ill have the direction be a parameter |
EnnuiL
left a comment
There was a problem hiding this comment.
So far, the PR looks good; Just apply these tiny changes and all will be fine
Co-authored-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
EnnuiL
left a comment
There was a problem hiding this comment.
I just realized that the onFlow event's parameter names might be a bit too verbose? but yeah, I can't think of any alternative shorter names that didn't sacrifice readability; Oh well
Here's the Ennui's Stamp of Approval
|
This needs to be updated to newest code + maybe can be made into an REA? |
|
This can't easily be made into a REA, but yeah I can update it. |
|
And by easily I mean it shouldn't. It's an event, not a property because there are too many variables |
EnnuiL
left a comment
There was a problem hiding this comment.
I still have no objections, however, here's a few nitpicks; Consider the general PR approved though
Co-authored-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
…low/api/FluidFlowEvents.java
| * @param interactionBlock the block it interacts with | ||
| * @return an event if the conditions are met, otherwise {@code null} | ||
| */ | ||
| public static @Nullable Event<FluidFlowInteractionCallback> getEvent(Block flowingBlock, Block interactionBlock) { |
There was a problem hiding this comment.
Do we have a standardization on whether @Nullable goes here or on the whole method declaration?
| return null; | ||
| } | ||
|
|
||
| public interface FluidFlowInteractionCallback { |
There was a problem hiding this comment.
| public interface FluidFlowInteractionCallback { | |
| @FunctionalInterface | |
| public interface FluidFlowInteractionCallback { |
# Conflicts: # settings.gradle
This copies from https://github.com/FabricMC/fabric/pulls/1402, however, as I am the authors of said PRs, I allow my code to be added to QSL.
The testmod is a good example of how to add a new fluid flow event.
Questions to be asked:
Before this is merged, I would like to merge in a game test api to ensure vanilla behavior remains and to have a more effective test than currently having to go into a world to view the change.