[Feature] Allow right click/shift-right click interactions through entangled blocks
Iris-xii opened this issue ยท 4 comments
Is your feature request related to a problem? Please describe.
It's not clear to me how easy (or otherwise) this would be to implement, it is possible I'm asking for something ridiculously complicated. In which case, feel free to ignore.
Sometimes I use entangled as a decoration mod of sorts, oddly enough. Being able to link up blocks like that allows me to put chests in visible areas with nothing coming out of them or connected to them and still have them be functional, for example. It'd be weird to have pipes sticking out of chests in the magic area.
In this particular example, I was trying to bonemeal a sapling remotely for Nature's Aura ritual, tried to use entangled for it, and found it didn't work.
As far as I know there aren't many mods available right now that allow for remote right-clicking interactions. Maybe it's difficult to implement? Either way, not a vital suggestion but it would be nice to have.
Describe the solution you'd like
Right clicking/shift-right clicking on the entangled block with anything but the entangled binder makes it as if the bound block itself had been right-clicked/shift-right clicked
Sorry for the late response. I don't have much time to work on mods currently.
Here are some of my thoughts on the suggestion:
I originally had it that way, but there are some problems with it mostly related to guis:
- All the vanilla inventory screens and most modded ones close when the player is more than 64 blocks away. This means that if the entangled block is far away, the inventory opens for a split second and then immediately closes.
- I would have to prevent the chunks from being unloaded while an inventory from an entangled block is open. Otherwise the chunk would unload while the player has it open and changes to the inventory won't get saved, leading to duplication or loss of items.
- Blocks expect an interacting player to be in the same dimension. This can have a lot of unintended effects like placing stuff at the player's coordinates in the wrong dimension.
I might be able to solve number 2 by temporarily keeping the chunk loaded, however 1 and 3 very much depend on the underlying mods' implementation, so I can't solve those. With the guis opening and closing instantly, it very much feels like a bug in the mod.
Sometimes I use entangled as a decoration mod of sorts, oddly enough. Being able to link up blocks like that allows me to put chests in visible areas with nothing coming out of them or connected to them and still have them be functional, for example. It'd be weird to have pipes sticking out of chests in the magic area.
This is what I personally really like to use Entangled blocks for, so I'm glad to hear others use them like that as well ๐
I'll leave the issue here to decide on when I have time to work on mods again.
Sorry didn't realize there was a similar suggestion already!
- Blocks expect an interacting player to be in the same dimension. This can have a lot of unintended effects like placing stuff at the player's coordinates in the wrong dimension.
Only solution I can think for this is to disallow the feature if the blocks are in different dimensions? Not sure what that would entail... hopefully it would not be difficult, adding a tool perhaps. Alternatively and this might be easier: make an Entangled Block that only works in the same dimension and have a higher tier one that works across dimensions, with the gui feature only available for the tier 1 Entangled Block?
I suppose issue one sort of would be address by the above?
That said it is a bit weird to have a higher tier block lose a feature but it could be called a trade off.
Sorry for the late response as well, github didn't notify me of a response so it took until I remembered 'oh that was a thing'.
That was a really in-depth and detailed response for what could've been simply a 'Would be way too hard' so thank you for the insights! Those do sound pretty tricky to deal with so I don't have much to say besides 'Yeah, that's fair'. Maybe some sort of whitelist/blacklist on which blocks can be right-clicked would work, but to be honest that seems like a terrible idea being either too restrictive to be any good or open to a thousand terrible bugs.
So in short, while if you found a way to make it work reasonably well by all means it would be great yeah, that's very fair, thank you for considering it.
Perhaps this can be restricted to only work if the chunk is already loaded. A lot of mods add chunk loaders (e.g. Mekanism has chunk loading via the Anchor upgrade).
For range limits maybe spoofing or temporarily modifying the player's position with a mixin? Or maybe even creating a temporary clone of the player positioned relative to the block, and having that "fake" player perform the action. (Quantum players in a way!)
Perhaps this could also be used to solve the chunk loading issue somehow, for example, if the quantum block is actively loaded, chunk loading will be mirrored around the quantum block by a cloned player. E.g. if a player is loading a 3x3 area of chunks, and the quantum block is in the middle chunk, the target block's chunk would be loaded as well as the touching chunks in the 3x3 area.
And to add a third level of potential complexity, maybe stepping it up from just players and creating fake clones of all entities around the target.
I'm not sure how feasible or realistic any of this would be, especially when it comes to mod compatability, but, it's definitely at least an idea that has been shown to be at least partially possible by other mods.