Tech Reborn

Tech Reborn

30M Downloads

Drill Weird Behaviour

temp1011 opened this issue ยท 13 comments

commented

I am creating this issue before I start breaking things.

At the moment the Advanced Drill will mine blocks very fast that it shouldn't really.
before
after With drill aiming at dirt next to logs.
I am aiming to fix this by considering which blocks should be broken.

commented

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

commented

Should this carry over to everything eg - drill mining a mix of stone and obsidian will mine at the speed of mining obsidian?

commented

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.

commented

I was just planning to break at the speed of the slowest block but I guess the speed drop could be cumulative.

commented

that would work. Whatever feels right is fine.

commented

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

commented

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.

commented

Any progress on this? or shall I take a look?

commented

I'll have a look again from a fresh perspective. Not sure if I'll get anywhere though.

commented

Ok, cool. Let me know if you want me to take a peek at this issue. Thanks.

commented

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.

commented

If you open a PR I can take a look at what you have done, and then we can go from there.

commented

break speed is being worked on in this issue: #1463