Enhancement: Shift-Clicking "Add Fuel" button in Adv. Dislocator should try to refuel more than 16 Ender Pearls
Lordmau5 opened this issue ยท 1 comments
Base information
- Minecraft version: 1.12.2
- Mod version: 2.3.18.329
- Minecraft Forge version: 14.23.5.2781
- Mod Pack: (if applicable) Enigmatica 2 Light
Suggestion
As it is right now, the Advanced Dislocator can be refueled either by a normal left-click which uses up one Ender Pearl, or a shift left-click which uses up 16, but only if it can find 16 pearls.
First off, having 16 hardcoded is not a good approach, seeing as there are mods that can increase the stack limit of items (and thus Ender Pearls) to either 64, or even up to 999 million (see StackUp by asie).
Instead I would suggest to refactor PacketDislocator to have a isStack
boolean or similar, which then just uses up as much as possible from the player inventory, or, alternatively, only the maximum stack size of the Ender Pearl.
The section in question is here:
https://github.com/brandon3055/Draconic-Evolution/blob/master/src/main/java/com/brandon3055/draconicevolution/client/gui/GuiDislocator.java#L458