CC: Tweaked

CC: Tweaked

42M Downloads

Just Enough Block Drops - Network Cable Drops Modem?

Nerdpie opened this issue ยท 4 comments

commented

Pack information is on Modlister

As mentioned on Discord, I ran into this peculiar behavior: https://cdn.discordapp.com/attachments/477911902152949771/559541483200577546/2019-03-24_20.56.32.png

In short, Just Enough Block Drops thinks that breaking a Network Cable will drop a Wired Modem. A quick test shows that this is not, in fact, the case, with a Cable dropping as expected. Further, JEBD does not have an entry for breaking a Modem, and breaking a modem on its own drops the Modem as expected.

Aside from possible misinterpretation of the multipart code by JEBD, I am also using Just Enough IDs, which may impact how the block and item IDs are being handled.

ETA: I'm not sure if this would be related. I should note that the pack originally had Not Enough IDs, and I swapped it out for JEIDs; if the list was pre-generated and shipped with the pack, this could easily be the issue.

commented

Checking the blockdrops.txt file, this is the relevant entry

  {
    "name": "computercraft:cable",
    "meta": 0,
    "length": 1,
    "name0": "computercraft:cable",
    "meta0": 1,
    "0chance0": 100.0,
    "1chance0": 100.0,
    "2chance0": 100.0,
    "3chance0": 100.0,
    "0pair0": "{\n  \"left\": 1,\n  \"right\": 1\n}",
    "1pair0": "{\n  \"left\": 1,\n  \"right\": 1\n}",
    "2pair0": "{\n  \"left\": 1,\n  \"right\": 1\n}",
    "3pair0": "{\n  \"left\": 1,\n  \"right\": 1\n}"
  }

This does match the in-game meta values for cable and modems, so that suggests that JEID is not at fault. I may try regenerating the file later; the pack takes quite some time to load as it is. ๐Ÿ˜…

commented

I went ahead and appended .bak to the blockdrops.txt file's name, and the regenerated file is empty. At this point, I'm wondering if the pack dev manually defined the file, and had slipped up with a bit of copy/paste.

ETA: Of course, it could also have been that the editor remembered the body of my post, and didn't refresh when I reopened this browser profile... >_< Still, the empty generated file does suggest user error.

commented

OK, did some further looking into this. The problem here is that there are several states in the cable block which will drop both a cable and a modem. Now, as cables are the default item, it associates the extra modem with the cable.

Honestly, I'm not sure there's a nice way to fix this - JEBD doesn't have an API we can hook into.

commented

That makes sense. When I had originally shared the issue on Discord, it was a mix of "that's an amusing little bug", so I would have no issue with closing this as "Can't Fix". At least we are aware of the issue, and if anyone is overly annoyed by it, they can fix the metadata in the blockdrops.txt config file.