Skip to content
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

Adjust tank indexing in the Transposer's transferFluid method #3659

Open
wants to merge 1 commit into
base: master-MC1.12
Choose a base branch
from

Conversation

yut23
Copy link

@yut23 yut23 commented Sep 15, 2023

This updates the sourceTank parameter to be 1-based when called from Lua.

@@ -48,7 +48,7 @@ trait InventoryTransfer extends traits.WorldAware with traits.SideRestricted {
val sinkSide = checkSideForAction(args, 1)
val sinkPos = position.offset(sinkSide)
val count = args.optFluidCount(2)
val sourceTank = args.optInteger(3, -1)
val sourceTank = args.optInteger(3, -1) - 1
Copy link
Contributor

@asiekierka asiekierka Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@repo-alt What do you think? This is a change we pulled from GT:NH in 2022, and using 1-based indexes does make sense, but how much production code would breaking this break?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will break some code of course, and there is no easy way to notify the user about that change, but the change makes sense indeed, so I don't think you should look back at us.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. In this case I'll probably keep it for a larger release, like 1.9.0 (if it ever happens - at this rate, I doubt it!).

@yut23
Copy link
Author

yut23 commented Apr 3, 2024

I'm fine with removing the indexing change for now, but the transfer limit fix is pretty important for precise fluid movement (I originally found it when trying to automate a Tinker's smeltery).

@asiekierka
Copy link
Contributor

Understood. I'll try to ship a patch release soon. I apologize for taking so long; the mod no longer has active maintainers, and I don't have much of an interest in Minecraft mod development anymore.

This updates the `sourceTank` parameter to be 1-based when called from
Lua.
@yut23 yut23 force-pushed the fix_transposer_bugs branch from d1ffc5d to 2fea540 Compare April 7, 2024 20:48
@yut23 yut23 changed the title Fix some bugs in the Transposer's transferFluid method Adjust tank indexing in the Transposer's transferFluid method Apr 7, 2024
@yut23
Copy link
Author

yut23 commented Apr 7, 2024

I just rebased and updated the PR description to reflect just the indexing change. Thanks for the maintenance you are doing, however minimal it may be 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants