-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modular tools #593
base: 1.20.x
Are you sure you want to change the base?
Modular tools #593
Conversation
- List energy converter max EUs - State baseline EU - Include module effects, stacking, and energy consumption
- Enchantments don't apply when tool is empty - Tool mining speed when out of energy is zero; inappropriate blocks are now mined at 1.0 speed - Tools now can't go negative in energy
Build seems to be failing for spotless violations around the license header - do you want me to apply the outdated and slightly incorrect header anyways? |
Regarding Sweeping Edge not working, I think I'd need to add the enchantment NBT tag dynamically; I guess I'd do this when the tool gets a rebuild? Nevermind - DynamicEnchantmentItem should already do this properly |
Aha - sweeping edge only works if the held item is a SwordItem |
Sweeping edge only works if the held item is an instanceof a SwordItem
I will be testing this. Be sure you correctly apply |
I'm aware spotless is failing - it's because I'm using a different license header. I think the one hardcoded for use is incorrect. |
I already found a bug : doing shift-click in the tool stations allows to put more than one battery or motor. |
Please use the hardcoded header, it is good enough. The year is just an annoyance and not really relevant for what we do here. (I doubt we'll get to 80 years after the death of both authors). And technically it should mention "and contributors" but in practice it doesn't matter either. |
Now can't place a whole stack into the tool's slot
Oops, how embarrassing. Fixed.
Fixed. |
Here's my attempt at a modular tools system.
The base item for a modular tool is a casing (in one of four tiers). Tool components consist of an energy converter (motor/pump), energy storage (battery/tank), and tool head (rotary blade or drill head). Tools also can have modules; these apply enchantment effects. Tools are modified at a tool station block, similar to the forge hammer. See https://github.com/AztechMC/Modern-Industrialization/blob/4f278b3717336ea17c364ddd53c0dcf4b67f3d33/docs/MODULAR_TOOLS.md for more details.
Note that battery capacity in portable storage units have been reduced so a battery has one and only one capacity, instead of one capacity in a PSU and one in a modular tool. I don't think this affects balance much. I might also consider a followup PR to reduce battery capacity in PSUs to 6 or so.
Open issues:
/enchant
command, so the game handles the conflict okay.) I guess I could put a check in the tool station to prevent conflicting modules like I currently prevent duplicate modules.Bugs to fix before merging: