Applied Energistics 2

Applied Energistics 2

137M Downloads

Be smarter about directional interfaces

shartte opened this issue ยท 6 comments

commented

When switching an interface from omni-directional to directional, the first direction it switches to should be chosen in a smarter way.
I.e. in this scenario:

image

It should check every adjacent block, and check two things:

  • If a non-network-tile entity is adjacent, switch the direction to that first, exit.
  • If a network-tile-entity is adjacent, switch the direction to that first, exit.
  • Otherwise use the old approach.
commented

Could be nice, but it's annoying to implement for little benefit, so closing as we have other priorities.

commented

wouldn't be a pointer based rotation be more usefull? especially if there are multiple target candidates ina very compact build?! i can not remember which mod used to do this but rotation was based on quadrant and center where you were pointing at when right clicking to rotate to
this could also be employed for the chest and other blocks

the idea was, if you click the center, the "face" is pointed away from the clicked face and when ever you hit closer to any of the 4 edges the face would rotate to this side instead

grafik

commented

Most likely gregtech. My mod Modern Industrialization has a similar system, that would be much more useful indeed.

commented

image

Here is an example, here I am targeting the side to the right. Clicking the center targets the current side, and clicking a corner targets the opposite side. That way you can rotate every machine the way you want in a single click, and from any side.

commented

Oh interesting, that would indeed be nice too.

commented

Keep in mind it is not an actual rotation in case of the interface. All it does is to toggle between 7 different states. It also needs something like an unrotate case, which is not really anything rotatable uses

Personally I could see a couple options.

The "smart" option, which would take the adjacent blocks/tiles into account. Maybe even additional details like an item capability.
So in most cases it will just switch between omnidirectional and a single machine it's placed against. Further it could prioritize 1st party vs 3rd party tiles to always prefer the furnace over another interface. A downside would be that configuring it in advance would be impossible. Also it might appear to be a bit random.

A more directional approach, which takes the face into account and only toggles between facing this direction, the opposite, or back to omnidirectional. This would give the player a more precise control about what they want compared to currently click as often until it's the direction you want. Of course with missing it 1 or 2 twice the first time. Downside here would be that it might be restrictive in very compact builds, when you can't reach either side without tearing down the machine or some blocks on the opposite side.

Another option might be to move it (additionally) to a UI setting. But in my opinion that is never a great option in terms of visual feedback. Besides up/down I rarely can tell which cardinal direction a machine would be. Minecraft simply does not use it outside a debug screen to actually know it. Besides being able to see the sun/moon and have a rough guess about the current minecraft time. So quite often players would have to open the UI, click a couple times until they think it might be correct, close it and see it's wrong. This is really something which needs a preview similar to the old enderio config, which would render a translucent variant of every adjacent tile/block. Might be nice, but a lot of work for a minor feature.

Otherwise anything which actually rotates simply rotates around the axis perpendicular to the face clicked. Splitting it into different faces might be nice. iirc red power did use something similar. Maybe just for placing facades? Was a long time ago. However the outlines are way less flexible in 1.16 compared to most earlier version, so this needs a bunch of custom code like hooking into the render events.
Which will get even more tricky as we don't just have full blocks as machines. Models like the charger, inscriber, or wireless access points all have a custom model with holes inside them. which is usually nice to reach through them to interact with another block. Say to rotate it. Turning them into a full block for rotating them might prevent this functionality completely. And I am not aware of any mod which rotates a block when interaction with air.

A more distant problem here is that we try to shove everything into the wrench, which has basically a single button as we reserve shift right click to dismantle anything. So there is no way to use it for reversing the rotation direction. This would mean we either have to remove the dismantle functionality and move it to something else. Like an empty hand, which is always annoying as it will constantly fill up with the things you dismantle. Or attach a dozen modes to a wrench and force a player to constantly shift + right click into air to whatever mode they want. Ideally with no visual indication so to find out what the current mode is and require a full cycle through all modes to get back to the current one.
Simply not enough buttons or not enough hotbar slots to carry 4 tools for every mod around.