TeamDman / SuperFactoryManager

Mozilla Public License 2.0
36 stars 15 forks source link

Block gate drops items rather than placing them #1

Closed TeamDman closed 4 years ago

MarcoRauscher commented 5 years ago

Where do you get this issue? For me block placement is working fine, at least in the sense of "it works the same as in 1.7.10". Do you want to rewrite block placement logic for the block gate? If so, I could help.

Saereth commented 5 years ago

I tested this as well and didnt have any problem with this. placed blocks fine

MarcoRauscher commented 5 years ago

I just recognized that it's not consistent and indeed not working correctly sometimes.

I placed the block gate so that the front side is opposite of the facing side. Thus the block should be placed against the block gate itself. Then I set up a simple system: chest -> machine inventory manager -> block gate

Tested 2 programs: Trigger -> Input (exactly 1 cobblestone from chest) -> Output (exactly 1 cobblestone to blockgate)

Trigger -> Input (exactly 1 smoothstone from chest) -> Output (exactly 1 smoothstone to blockgate)

First program worked fine (not dropping any items ever) whereas the second program placed 1 smoothstone at first trigger and then after every trigger dropped 1 smoothstone into the world.

Unfortunately I haven't looked at the source code much to give an estimation why this is happening. Seems like there's code somewhere which checks for result of breaking the block and compares it to the input block.

Same thing happens with this program: Trigger -> Input (exactly 1 cobblestone from chest, exactly 1 dirt from chest) -> Output (exactly 1 cobblestone to blockgate, exactly 1 dirt to blockgate) When there's a dirtblock placed, it starts dropping cobble into the world. When there's cobble placed, it drops dirt.

Do you know why the whole dropping mechanic exists? It doesn't make much sense to me that it's coded this way because it's not the purpose of this block at all.

The-Key commented 5 years ago

There are probably improvements to be made, but I don't believe it's bugged. Whitelisting one match all on the block gate makes it work nicely. 1 cobble and 1 dirt means that you are sending it two items and it can only 'hold' one. It sees its inventory as the result of breaking the block without silk touch. Nothing that I've seen while playing contradicts this video of its functionality: Link

MarcoRauscher commented 5 years ago

I have tested the first issue I described (1 skoothstone to block gate, e.g. for Botania Livingstone setup) in 1.7.10 and it works differently (as in correctly) compared to here. It should not spit out the additional smoothstone when a smoothstone is already placed by the gate.

TeamDman commented 4 years ago

For now, I agree that it seems to be working as intended. Documentation surrounding its behaviour is lacking, which seems to be the main source of confusion for myself and others. For now, the functionality will remain as it is. Using conditional filters or by specifying a quantity on the output block gate will prevent it from dropping items on the ground.

Fun fact: you can also use hoppers with block gates to place or break blocks.