Drill Weird Behaviour
temp1011 opened this issue ยท 13 comments
I would fix it by making the break speed slower if it contains blocks that shouldn't be broken:
This can be done in the Block Break Event, see an example here: https://github.com/TechReborn/TechReborn/blob/1.12/src/main/java/techreborn/events/BlockBreakHandler.java#L94
Should this carry over to everything eg - drill mining a mix of stone and obsidian will mine at the speed of mining obsidian?
Yeah, I would say so. But I would ensure that its not going to take ages if you are mining a 9x9 of obsidian as I dont think it needs to be very slow.
I was just planning to break at the speed of the slowest block but I guess the speed drop could be cumulative.
I've got to this point but unfortunately I don't get the right effect yet. Any idea what I've done wrong?
I can PR this but it's not good at the moment. https://github.com/TechReborn/TechReborn/compare/1.12...temp1011:drill?expand=1
I dont see anything wrong with it just by looking at it. When I get a chance (Later tonight, or later in the week) ill clone it down and take a better look.
My guess is super.getDestroySpeed(stack,state);
isnt returning the correct speed.
I'll have a look again from a fresh perspective. Not sure if I'll get anywhere though.
Hmm, still not sure. Something is wrong somewhere but I'm not sure what. I don't know if it's easier/more useful to open a PR or not.
If you open a PR I can take a look at what you have done, and then we can go from there.
break speed is being worked on in this issue: #1463