Integrated Dynamics

Integrated Dynamics

63M Downloads

Breaking cables with attachments has issues with certain mods

Belgabor opened this issue ยท 2 comments

commented

As reported on Ellpeck/ActuallyAdditions#431, there are issues breaking cables with attachments (like eg. importers) with the AA drill and TiCo hammers.

commented

@Belgabor Here's a new dev build fixing the issue with the AA dril. Didn't have time yet to test TCon hammers, I assume they had the same problem: https://dl.bintray.com/cyclopsmc/dev/org/cyclops/integrateddynamics/IntegratedDynamics/1.10.2-0.6.4-368/IntegratedDynamics-1.10.2-0.6.4-368.jar
Let me know if it works properly on your end as well.

@Ellpeck For some reason, your code is invoking Block#removedByPlayer twice, right after each other, as can be seen from the dump traces here: http://pastebin.com/Qz7KsXG7
Not sure if this is your fault or Vanilla's, since the two stacks are exactly the same. This does not occur for vanilla tools.

This was causing invalid ray trace results to be produced, which made the blocks think they had to be completely removed, even when there were still parts around.

commented

It shouldn't be called twice, but it is being called both on the server and the client, which is Vanilla Behavior.
Twice on the server is weird though. I am overriding onBlockStartBreak with my own breaking code, and if onBlockStartBreak returns true, which it does whenever I run my custom breaking code, the removedByPlayer method shouldn't be called again by vanilla. So this has to be a Drill with a 3x3 upgrade mining multiple blocks next to each other, hence the method being called multiple times. Otherwise I wouldn't have an explanation for this.