Slimefun4
Slimefun4 copied to clipboard
Fix Miner Android
Description
While trying to automate Osmium and Segganesson, @Boomer-1 and I found that Miner Androids completely ignore allowAndroids in BlockBreakHandler and just not mine regardless of whether the flag is set. I fixed this too.
Proposed changes
- Miner Androids respect
allowAndroidsinBlockBreakHandlernow - Added a
dropsfield inAndroidMineEvent
Related Issues (if applicable)
N/A
Checklist
- [x] I have fully tested the proposed changes and promise that they will not break everything into chaos.
- [x] I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
- [x] I followed the existing code standards and didn't mess up the formatting.
- [x] I did my best to add documentation to any public classes or methods I added.
- [ ] I added sufficient Unit Tests to cover my code.
That is definitely not the build 👀
No, but seriously speaking: This PR is far from a "fix", it changes a mechanic quite substantially with huge implications for performance. I wouldn't advise merging this without any proper testing and proofing that this won't hurt performance...
Since the BlockStorage isn't exactly performance-friendly...
Also, this should 100% have been two seperate PRs...
Okie so I unded the indus miner changes, and then I noticed that in MiningAndroidListener we already do the BlockStorage check. So I just stuck the code under there. I did not test it but I think the performance is much lower then it would have been earlier in my PR.
Ah, I thought it was in MinerAndroid
Generally looks fine to me, but before approving merging would like a test undertaken to be sure, given the time it’s been since it was first raised - sorry it’s taken so long here.
Marking this as stale. Would be a nice fix to have :D
Marking this as stale. Would be a nice fix to have :D
Time to actually work on it then :D
Slimefun preview build
A Slimefun preview build is available for testing! Commit: 51a8c173
https://preview-builds.walshy.dev/download/Slimefun/3356/51a8c173
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
I sadly can't test it for a while, life is in the way
i'll test it shortly
in testing it did mine ores, while leaving slimefun items made from ores and did not break them.
except for imports lgtrm
@J3fftw1 What's wrong with the imports?
in testing it did mine ores, while leaving slimefun items made from ores and did not break them.
@Boomer-1 have you tried mining SFW meteors? it should mine them
@Seggan referring to import order
@JustAHuman-xD what wrong with it? Which order should they be in?
@JustAHuman-xD what wrong with it? Which order should they be in?
@Seggan in top to bottom order Java, javax, bukkit, slimefun, deprecated slimefun
With an empty line between each of the different categories, look at the second class you changed for an example
sorry, i tested wrong machine. the android did mine the blocks of segganesson and osmium, but did not have any ores in its inventory. they disappeared, were not dropped or stored.
Marking this as stale.
Closing this since its stale