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

Update to 1.19.2 and fix various bugs #22

Open
wants to merge 9 commits into
base: 1.18.x
Choose a base branch
from

Conversation

Ampflower
Copy link

@Ampflower Ampflower commented Nov 26, 2022

A few updates to FastBench to bring it up to speed (not really required, as it worked as is on 1.19.2), fix some odd issues, and try to see if it's possible to not require the client component of this mod, rendering it entirely server-side.

This uses a somewhat primitive check of seeing if the container ID is not-negative for determining if it should send at all.
On 1.19.2, testing locally with single player and LAN, it does
seem to work perfectly fine with no additional packets, just
let the client component of ResultSlot set the ItemStack when
it's installed on the client.

This also removes a dependency on Fabric API entirely, as it
is now not needed for this mod to function.
@Ampflower
Copy link
Author

It appears that there's still some bad interaction with the manufactory halo, will take the time to investigate it some more.

FastBench is somehow consistently hitting the slow route with the manufactory halo failing to internally place items?

Fixes the expensive 20 ticks a second recipe search by not doing the recipe search when the access doesn't require it.

This mimics Vanilla, and again doesn't appear to change behaviour when it shouldn't.
…ame.

Makes it less confusing when looking for the mixin from stack.
…lla name.

Makes it less confusing when looking for the mixin from stack.
@Ampflower
Copy link
Author

Found that it was because Vanilla called access to evaluate it, which normally is populated by a crafting table, but not by Botania's manufactory halos or any other auto-crafters that do a fixed recipe lookup.

This has been changed to also use access as a gate to only evaluate it when there's actually a player looking at the inventory, and to not otherwise.

There's still some potential optimisation left with having clear not send slot updates or attempt to evaluate recipes 9 times.

@Ampflower
Copy link
Author

Perhaps calling the method to stop matrix updates on ServerPlaceRecipe#clearGrid(boolean) would be a good start? Then letting it do matrix updates after the final clear call.

This prevents the server from doing an expensive check of if the
crafting grid matches a valid recipe at every stack when it'll
just be cleared right after.
@Ampflower
Copy link
Author

And it appears I managed to accidentally deoptimise the packet spam, I wonder if the attempt to smartly optimise clearGrid did something wrong.

I blame the Minecraft Dev plugin.
Now recipes you use will be awarded as expected.
@Ampflower
Copy link
Author

Seems no more unexpected issues are coming up. Is working fine in a modded environment without tanking the TPS in unexpected ways or spamming packets, while still retaining vanilla features.

@EGOIST1372
Copy link

@Tfarcenim any news on merging this?
thanks in advance <3

@MJRamon
Copy link

MJRamon commented Jul 9, 2023

Can you please merge and release 1.19.2? @Tfarcenim

@TheStaticVoid
Copy link

This project seems unmaintained for some time. The project is CC0 licensed meaning that a forked release could be made to provide updates to newer versions. @Ampflower have you had any thoughts on re-releasing and becoming the maintainer for this mod as you seem to have interest in fixing it up?

@Ampflower
Copy link
Author

This project seems unmaintained for some time. The project is CC0 licensed meaning that a forked release could be made to provide updates to newer versions. @Ampflower have you had any thoughts on re-releasing and becoming the maintainer for this mod as you seem to have interest in fixing it up?

I'll take a look into it; shouldn't be much but I'll need a new name for the mod

@EGOIST1372
Copy link

EGOIST1372 commented Sep 5, 2023 via email

@TheStaticVoid
Copy link

This project seems unmaintained for some time. The project is CC0 licensed meaning that a forked release could be made to provide updates to newer versions. @Ampflower have you had any thoughts on re-releasing and becoming the maintainer for this mod as you seem to have interest in fixing it up?

I'll take a look into it; shouldn't be much but I'll need a new name for the mod

FastBench: Even Faster

@Ampflower
Copy link
Author

Hm, looking around at the based off of codebase, https://github.com/Shadows-of-Fire/FastWorkbench, it appears that it's supposed to be MIT-licensed.

I'd still consider that safe although I'd need to try to trace out licensing in such a case regardless.

@Tfarcenim Curious, did you mean to license your own changes and adaptation as CC0 or MIT? Mainly so I know what to credit as.

@Ampflower
Copy link
Author

Okay, consulting the codebase a bit and comparing with Shadows of Fire's, I can tell a fair amount should've been under the MIT license, so I shall assume it was intended to be that and that CC0 was a left over from the template.

@Ampflower Ampflower closed this Sep 12, 2023
@Ampflower Ampflower deleted the pr/1.19.x branch September 12, 2023 10:58
@Ampflower Ampflower restored the pr/1.19.x branch September 12, 2023 10:59
@Ampflower
Copy link
Author

I suppose that's one way to close a PR lol; renamed the branch which technically deletes it

@Ampflower Ampflower reopened this Sep 12, 2023
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.

4 participants