Integrated Dynamics

Integrated Dynamics

63M Downloads

Cables broken via other means (non-player/non-wrench) drop nothing

Quezler opened this issue ยท 4 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

When a cable gets harvested (shift + right click) by a wrench it drops with ids
When a cable gets mined by a player it drops without ids

But when a cable gets mined by anything else it drops nothing at all:

  • ars noveau's "touch + break" spell drops nothing
  • the block breaker from engineer's decor drops nothing
  • it is said (in the enigmatica 6 discord) that modular routers drops nothing too

Steps to reproduce the problem:

A:

  1. place down a cable
  2. grab the creative tier 3 spell book
  3. rightclick it
  4. select the purple touch
  5. select the blue break
  6. close the book
  7. shift right click on the cable
  8. notice nothing drops

B:

  1. place the block breaker from engineer's decor
  2. place a cable in front of it
  3. wait a second
  4. notice nothing drops

Expected behaviour:

When a block gets broken through other means it should drop the items without ids

(Normally when playing modpacks the (fast) atomic disassembler from mekanism is readily available, now i'll either have to use a slow-ish pickace to mine configured cables one by one, or use the wrench for instant disassembly and have my inventory fill with id'd items i would have to reset one by one, the block breaker usecases above are just examples, my main goal is fixing it for the ars noveau spell book so i can instantly dissasemble it with a shift rightclick so i can get the (modpack expensive) items back without the extra work of time or resetting them)

Ideally any non-wrench breaking of the block should just drop it without ids, or alternatively a 2nd wrench (or switchable mode on the wrench) meant for disassembly without ids ๐Ÿค”


Versions:

  • This mod: 1.10.7
  • Minecraft: 1.16.5 (if this issue happens to be resolved, a release for this version would be appreciated)
  • Forge: 36.2.20
.
โ”œโ”€โ”€ CommonCapabilities-1.16.5-2.8.0.jar
โ”œโ”€โ”€ CyclopsCore-1.16.5-1.12.1.jar
โ”œโ”€โ”€ IntegratedDynamics-1.16.5-1.10.7-DEV.jar
โ”œโ”€โ”€ Patchouli-1.16.4-53.2.jar
โ”œโ”€โ”€ ars_nouveau-1.16.5-1.24.18.jar
โ”œโ”€โ”€ curios-forge-1.16.5-4.0.5.3.jar
โ”œโ”€โ”€ engineersdecor-1.16.5-1.1.16.jar
โ””โ”€โ”€ geckolib-forge-1.16.5-3.0.65.jar

Log file:

I did try to see if this triggered while a player was using the spell book by adding some System.out.println's in there, but it just seems that both magic (non-obvious) and mechanical (obvious) means of deconstruction aren't triggered as the player ๐Ÿšง

2022-03-09_11 00 57

commented

Thanks for reporting!

commented

Unfortunately MC's block breaking logic isn't that simple...

commented

ID cables do some raytracing to check what part on the cable is being removed.
If raytracing failed, it assumes no parts are being targeted, and returns false in removedByPlayer to indicate that no removal should take place.

I suspect that the mods you list are ignoring the return value of removedByPlayer, and just always break the block, which can result in a loss of items.

AFAIK, this is not something I can fix on my end, so I would suggest opening a report on the issue trackers of the listed mods. Be sure to point back to this issue (and this comment). (happy to make changes here if those would be needed)

commented

ID cables do some raytracing to check what part on the cable is being removed.

in case of the block being broken by other means just drop the cable and everything else attached to it inside the block?