-
Notifications
You must be signed in to change notification settings - Fork 102
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
Hard to break certain blocks #628
Comments
I confirm: For some blocks ModularPowersuits tool not recognized as pickaxe. |
Confirming, but with Axe and Binnie Mods trees. It seems that wood in that mod is somehow checking that class of tool that tries to break it is a child class of some axe. Why i think so? Because Omnitools from Electro-Magic tools and Axe of Stream from Thaumcraft works fine. Unfortunately i can not prove my words, because Binnie Mods is closed-source :-( About pickaxe troubles, i use this workaround - Pinkbyte/MachineMusePowersuits@499703857d7328754652da6bbc99c74f78fc8aa7 Yeah, i know, this code does not make much sense, but for some reason - it works :-) |
it does kinda make sense - there are a billion ways to check if a block can be mined and it's hard to tell where you're supposed to hook in in order to make it work. In any case, I changed the code to use the one you suggested. Hopefully it will work now. I currently don't have a computer I can test it with sadly, so please let me know! |
Fixed in 0.11.0.282, thanks Pinkbyte & MachineMuse |
forge : 10.13.4.1517 hmm, it's fixed for bricks or stone brick stairs but not for wooden fence or wooden stairs (full overclock + diamond drill) |
Code changes applied to pickaxe case, maybe need similar changes for axe case also |
ok, I probably should have done this in the first place but I changed those around as well. Should be good? |
I am personally no has early problems with axe case. So can't test it. But after last build update I see problem with dig dirt. Now speed decrease to empty hand dig speed. |
I can't get the shovel to mine things like dirt, gravel or sand as expected. Regardless of overclocking or toggling the shovel on/off it mines them the same speed as using your fist. Tested with: |
I'm having issues with the shovel and axe not digging/chopping at the rates they should be. With full overclock they work just as fast as your hands. I have tried making another power tool and only installing the axe module into it and it still doesn't fix the problem. Tested with: |
Same issue as stated above. Upgraded to MPS 0.11.0.283 and now pick/shovel/axe are digging at normal open had speed. It you try and use the pick on anything above stone level it will destroy the item as if it was done with an open hand. |
Meh, it seems that blind applying for pickaxe to axe and shovel just broke those modules(though i did not check it myself yet) |
I'm on MPS's latest build 284, all vanilla and mod blocks treat the power fist as tooled but minimum overclock setting still. no overclocking seems to modify anything except the energy drained per block. it otherwise does mine block appropriately. |
In my case with 284 power fist stop mine many vinilla/mods stone/brick blocks that required pickaxe. |
Running build 290 and seeing this issue on a dedicated server. I have a lot of users reporting the same thing, but I don't know what to look for in logs or anything to provide you with. Is there anything we can help you do to diagnose this problem? |
I'm also having the issue with shovel and axe modules not functioning at all. mps build 290, numina build 131. Went back to build 281 to restore functionality. |
I can confirm that in 290 problem reversed one more time: now pickaxe case work but shovel stop working. I see round moving from pickaxe to shovel/axe and back with new builds. ( |
If the old code worked for some things while the new code only worked for others, then the easiest solution would be to combine the 2 into something like Edit: like this (several edits later) |
weird, the wooden stairs are still an issue. |
Is Tinker's Construct open source? If so, maybe look at how they do it, since I've never had a problem like this with tools from that mod. |
observations: |
I added a material based check. It needs some testing and probably some fine tuning before I submit a P.R.: lehjr@e8bf541 Test build here: https://github.com/lehjr/MachineMusePowersuits/releases/tag/290a |
@lehjr Tested it just now, stone/wood stairs are working fine, as well as digging dirt/sand. I did notice power glove on action bar had a grey background that isn't present on 290 |
@binnesman Thanks for testing. Weird though, as there shouldn't be any visual changes. |
Looks like the stuff listed here has been fixed, however, I do have a couple new items, namely tracks and things like EnderIO machines, maybe more. ATM, it's actually faster to break a track barehanded, and EnderIO machines can be broken down with a stone pickaxe, though the preferred tool is a wrench. |
Does the omniwrench module not work on EnderIO stuff? |
Yep, i just updated my server to the new version. Dirt and things like On Sat, Dec 19, 2015 at 1:00 PM, lehjr notifications@github.com wrote:
Thanks |
So glad to see some activity on this issue since the last time it was raised up and closed. Since there are a lot of ways to check if a block is supposed to be mineable, we may need to check all of them. I know that there were versions where this worked just fine on all blocks, I believe back in a 1.4 or 1.5 version of Minecraft, but obviously Forge has changed since then as well. |
yeah, a lot of different hooks were added since then, and some mods may or may not have been updated to use any of them. So it's quite frustrating :P |
I've been experimenting with different solutions, none of them really produce the results I'm looking for, a consistent speed for a breaking a stair and a block of the same type, and to be able to break blocks at the same speed as an Iron pickaxe or axe. I don't know if it's possible, but that's what I'm currently looking at. |
Maybe look at how Tinker's Construct does it? I've never had problems with the tools from that mod. |
Thanks, but I already looked at it. It's kind of a wall of code. I also looked at the Atomic Disassembler from Mekanism, but that just breaks all blocks not bedrock. The trick is to be able to fix the problem while working in the confines of the modular framework. Each module has to be limited to breaking the type of block that the vanilla tool of that type can break. It would probably be almost effortless to just create a "Paxel" type module that handles all blocks in one module. I just don't really think it fits well with the theme of MPS, even if it had tiered upgrades. |
Exactly. To do it the way TConstruct or Mekanism does it, we would have to make multiple 'power tool' items - one for each permutation of harvest levels & types. I decided that was too hacky even for me, and so fought hard to get hooks in Forge to allow a given item's harvest level/type to vary based on the metadata of the item (mDiyo pushed for this too, but only for the harvest level - he still had different item IDs for different harvest types). But only some people had written their code in a way that could be used by the new hooks, while others had overridden other methods and thus ignored them; then the Forge Event system came along and resulted in another set of hooks which could be overridden, and it is all quite a big mess now which only MPS apparently suffers from (everyone else just works around it by having static item harvest types or doesn't need to care). |
Draconic Evolution has some tools that can be used on more then one type of On Mon, Dec 21, 2015 at 3:42 PM, Claire notifications@github.com wrote:
Thanks |
No, it is not. The hard part is that the power tool varies what types of blocks it can mine, depending on what modules are installed. Making a tool that can just mine any block is easy. |
I understand that it would be a lot of code(and it will possibly break class hierarchy), but how about to inherit Axe, Pickaxe and so on classes in main PowerTool class and then - override apropriate methods(called on use), which, in turn, will check if upgrade for mining(Axe, Pickaxe) is installed or not. Yeah, as i said before - code will be ugly :-/ But in case when many mods check if current tool class is inherited from Foo(and when they do not provide any API to override this behaviour) i think that it would be the best option. |
Java doesn't support multiple inheritance. Scala emulates it with mixins but the ultimate result is not truly multi-inherited and the mixins must still be traits (interfaces). |
Hm... Let's take some examples. There is a mod, called Electro-Magic-Tools. There are some tools in it, called OmniTools, which can act both as Axe and Pickaxe. Let's see how it's working: So, you are right. IronOmniTools class extends only ItemPickaxe. No ideas then :-( I doubt that moving all checking code in one function will improve anything. But it will surely degrade modularity of code. |
The hard part is that the power tool varies what types of blocks it can mine, depending on what modules are installed. |
The biggest issue in the current setup is trying to emulate the equivalent vanilla tool. What makes it hard is there isn't a consistent way to check if each of those tools can break a certain block. For instance, not all blocks have a default harvest tool set, blocks like vanilla stairs return null for a default tool.
and
which should be functionally equivalent, should return true for a vanilla oak tree, should, but they don't, nor do the same functions work with dirt or any diggable block when replacing "Items.iron_axe." with "Items.iron_shovel." Mekanism's Atomic Disassembler just returns true for every block but bedrock: And that's great for what that tool is, but it isn't modular. As for MPS, I was messing around with overriding getToolClasses from inside of ItemPowerFist and early testing seems to produce some interesting results, though I haven't had a chance to thoroughly test everything or change it based on installed modules.
|
Have any of these inconsistent results with harvest levels been reported as bugs? I understand that certain blocks really don't have default harvest levels since they can be harvested by hand, but a method that tells us what tool the block should be harvested by should never return null of there's an actual tool used to harvest it! |
Hard to say really, but since the focus is on 1.8, 1.7 bugs really won't get any attention now anyway. |
Bugs are bugs, but in the interest of getting things working, how is WAILA reporting effective tool on blocks, and can we use a similar method? |
is that in WAILA itself or an addon? |
Interesting idea. Waila Harvestability. Oh how clean it is: https://github.com/squeek502/WailaHarvestability/blob/1.7.10/java/squeek/wailaharvestability/helpers/BlockHelper.java |
good call. |
It would be nice to be able to get the hardness of the block without the coordinates. |
The reason for that is probably so that it can check its tile entity or metadata if it has one. Blocks may want to vary their harvest levels, too, just like our tool does :P |
Testing a some new code now. Good news is that so far the modules all seem to be working properly. Bad news is having to get the coordinates from inside of canHarvestBlock in order to get the hardness. I'll hold off on submitting a PR until it can be looked at and maybe a better way suggested. |
There, finally got something that seems to work well for everything except the axe module is too slow with Treecapitator Mod #674 Edit: works great in dev environment, but not in a game. Guess it will be a while longer. |
Fix for Hard to break certain blocks #628
Thank you for hard work at this issue! |
ok, cool :D going to close this then since it sounds like all the sub-tasks were solved. |
I still have to fix an issue with mining the meteors from AE2, but everything else seems to be OK. |
That's fine, we can't guarantee compatibility with every mod. |
Its extremly hard to break any : stone bricks or stairs even with max overclock
ModularPowersuits-0.11.0.281.jar
The text was updated successfully, but these errors were encountered: