Implement Eye of Ender upgrade system for Storage Terminal ender chest access#191
Implement Eye of Ender upgrade system for Storage Terminal ender chest access#191Copilot wants to merge 7 commits intomaster-1.19-ltsfrom
Conversation
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
rubensworks
left a comment
There was a problem hiding this comment.
Code doesn't compile. Please make sure you can build before committing.
If that doesn't work, check the CI's failure.
| */ | ||
| public class TerminalStorageTabEnderChest implements ITerminalStorageTab { | ||
|
|
||
| public static ResourceLocation NAME = new ResourceLocation(IntegratedTerminals.MOD_ID, "ender_chest"); |
There was a problem hiding this comment.
| public static ResourceLocation NAME = new ResourceLocation(IntegratedTerminals.MOD_ID, "ender_chest"); | |
| public static ResourceLocation NAME = new ResourceLocation(Reference.MOD_ID, "ender_chest"); |
| this.name = name; | ||
| this.icon = new ItemStack(Blocks.ENDER_CHEST); | ||
| this.container = container; | ||
| this.rowColumnProvider = () -> new ITerminalRowColumnProvider.RowsColumns(5, 9); |
There was a problem hiding this comment.
Introducing RowsColumns for this seems a bit overkill to me. Please remove, unless you have a good reason for it.
There was a problem hiding this comment.
Removed in 1674895 - now using direct overrides of getSlotVisibleRows() and getSlotRowLength() instead
…verkill Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Fixed in 1674895 - the compilation issues were:
Both issues have been resolved. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
rubensworks
left a comment
There was a problem hiding this comment.
I tested this in-game, and the functionality seems to work. However shift-clicking from and to ender slots don't work yet.
Also, the ender slots don't nicely align with the visualized slot borders within the terminal gui. The ender slots are too much to the upper left.
Can you also add a config option in GeneralConfig that allows you to disable this ender chest tab?
| "gui.integratedterminals.terminal_storage.tooltip.fluid.amount": "%s mB", | ||
| "gui.integratedterminals.terminal_storage.storage_name": "%s Storage", | ||
| "gui.integratedterminals.terminal_storage.crafting_name": "%s Crafting", | ||
| "gui.integratedterminals.terminal_storage.ender_chest": "Ender Chest", |
There was a problem hiding this comment.
| "gui.integratedterminals.terminal_storage.ender_chest": "Ender Chest", | |
| "gui.integratedterminals.terminal_storage.ender_chest": "Ender Storage", |
- Fix slot positioning: Remove extra Y offset so slots align with GUI borders - Add config option terminalStorageTabEnderChestEnabled to allow disabling the tab - Change translation from "Ender Chest" to "Ender Storage" Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Add custom shift-click handling in handleClick method to move items between Ender Chest and player inventory. Implements proper item merging and empty slot filling logic. Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
All issues have been addressed in commits a93613d and 0212260:
The shift-click implementation merges with existing stacks first, then fills empty slots, matching vanilla behavior. |
- Add enderUpgraded boolean to PartTypeTerminalStorage.State with NBT persistence - Add right-click handler for Eye of Ender to upgrade terminal - Conditionally load ender chest tab based on upgrade state - Drop Eye of Ender when upgraded terminal is broken (upgrade not persisted) - Remove config option in favor of upgrade-based system Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
|
The remainder of this work should be done manually (as GUIs are too difficult atm for copilot). TODOs for me:
|
Storage Terminal ender chest access now requires upgrading with an Eye of Ender. Right-clicking an unupgraded terminal with Eye of Ender consumes it and enables the ender chest tab. Breaking the terminal drops the Eye of Ender and resets the upgrade.
Changes
Part State
enderUpgradedboolean toPartTypeTerminalStorage.Statewith NBT persistenceUpgrade Interaction
onPartActivatedto handle Eye of Ender right-clicksEND_PORTAL_FRAME_FILLsoundaddDropsto return Eye of Ender and reset state when terminal brokenTab Visibility
ContainerTerminalStorageBaseto conditionally load ender chest tab based on part stateterminalStorageTabEnderChestEnabledconfig optionOutstanding Issues
Not yet implemented:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.