[Feature request] Set spawnpoint from machine inside GUI
4rz0 opened this issue ยท 4 comments
Compact Machines version: compactmachines3-1.12.2-3.0.18-b278
Forge version: 1.12.2 - 14.23.5.2854
I am not using Optifine: no (irrelevant)
Link to Crashlog: none
Screenshot (if possible): does not apply
Description of the problem including expected versus actual behavior:
Misplacing a spawnpoint inside a compact machine is devastating, usually leading to not being able to use the machine ever again.
I recommend adding a feature to set the spawnpoint inside a compact machine from its "inside view" GUI.
Steps to reproduce:
Here's how:
You open the "inside view" GUI of the compact machine.
There's a new button "set spawnpoint". You press it and it shows the current set spawnpoint as a square on the block you spawn on.
You'll now also be able to click any of the bottom blocks of the compact machine. This will change the spawnpoint to that block column. Some logic will check if in that colum there's at least 2 blocks of empty space and then change the spawnpoint to that space.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Might be able to build this into CM4 when I re-create the preview GUI. Going to have to do all that rendering ground-up anyway, so it'd be a good chance to add this as well.
This seems very hard to detect what block the user actually clicks in the GUI. Logic to check for air blocks or non-full blocks could instead be added to try to place the user where they would not suffocate. This could be a button to reset the spawn point to the nearest "safe point" which prioritizes finding 2 air blocks vertically and if not, finding 1 air block that isn't on the floor so as to not place them inside the floor. Finally, if no air blocks could be found or only air blocks on the floor could be found, error out and say a safe point couldn't be found.
Non-full blocks could also possibly be detected, but it is more work. A normal survival CM room should contain at least 2 air blocks since the user has to have a place to stand to leave. In later versions, only one block would be needed because of swimming mechanics.
Since this takes a lot of block scanning and is intensive, this would only run if the user requests it. I'll look into implementing this.
This is fixed by #446.