You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #981 I stumbled across some difficulties/inconsistencies using the inventory mocks. This feature request aims to solve these problems as well as to add mocking of new inventories (all in the style of #972).
Each inventory will have its own mock implementation and own simulation class (which receives a mocked instance). This class then has methods like simulatePlayerClickResult. These methods all reduce to a call to simulateInventoryClick in PlayerSimulation with appropriate parameters. @Thorinwasher Should the simulation implementation be in the simulation class or mock class? You implemented it in the mock class, so I'm unsure what the purpose of the simulation classes are.
Below is a list of features. Mainly I will try to copy the behaviour of InventoryView#getSlotType. A useful overview for the different indicies in inventories is this resource.
Workbench
Differentiate between matrix and result index
Chest
Dispenser
Dropper
Furnace
Differentiate between input ("crafting"), fuel and result index
Enchanting
Brewing
Differentiate between fuel and ingredient
I will add more depending on the complexity. Right now I cannot guess how complicated everything will be and I will try to move one step at a time.
The text was updated successfully, but these errors were encountered:
Should the simulation implementation be in the simulation class or mock class? You implemented it in the mock class, so I'm unsure what the purpose of the simulation classes are.
It should be in the simulation class. I moved most of code over to the simulation classes, but in some cases it was too much work, so I put it up for later (Whenever / if the simulate method in the mock class get's removed)
To clarify: I think the thoughtprocess behind simulate classes was to lessen class bloat. The simulate methods that are left in their mock classes are only left so due to backwards compatibility.
Is there an existing issue for this?
Describe the feature
In #981 I stumbled across some difficulties/inconsistencies using the inventory mocks. This feature request aims to solve these problems as well as to add mocking of new inventories (all in the style of #972).
Each inventory will have its own mock implementation and own simulation class (which receives a mocked instance). This class then has methods like
simulatePlayerClickResult
. These methods all reduce to a call tosimulateInventoryClick
inPlayerSimulation
with appropriate parameters.@Thorinwasher Should the simulation implementation be in the simulation class or mock class? You implemented it in the mock class, so I'm unsure what the purpose of the simulation classes are.
Below is a list of features. Mainly I will try to copy the behaviour of
InventoryView#getSlotType
. A useful overview for the different indicies in inventories is this resource.I will add more depending on the complexity. Right now I cannot guess how complicated everything will be and I will try to move one step at a time.
The text was updated successfully, but these errors were encountered: