crafting-dead icon indicating copy to clipboard operation
crafting-dead copied to clipboard

Disable Offhand in Crafting Dead

Open 0xE69 opened this issue 1 year ago • 7 comments

Add an ability to disable the offhand in Crafting Dead through the server configuration files.

0xE69 avatar Apr 03 '24 19:04 0xE69

Can be achieved using a Mixin

https://gist.github.com/H0Imes/0c32bdc0bf80846aea19963a192a357a

H0Imes avatar Oct 22 '24 12:10 H0Imes

Issue is, there are multiple other places you can swap hands, you can also change the default main hand to be the left hand which also causes rendering issues. It all boils down to two underlying problems - firstly, people shouldn't be able to hold two guns at once and secondly, guns aren't rendered correctly when in the left hand.

josephtarbit avatar Oct 22 '24 12:10 josephtarbit

Instead of using the "Y" or "Z" keys to open the Crafting Dead inventory, we can change the default settings to let players use the "E" key instead. This makes the controls easier for players and solves the problem of them putting items in the offhand slot. The only remaining issue is that players can still access the offhand slot when they are in Creative mode (which has a different inventory). However, this isn’t a big problem since players shouldn’t have access to Creative mode on official servers anyway.

H0Imes avatar Oct 22 '24 12:10 H0Imes

That would only be a solution for official servers and is also a bit extreme completely preventing off-hand usage. We need a solution that still allows the off-hand to be used, just not for guns, especially for the players outside the official modpack as they won't want a mod interfering with their inventory or off-hand.

josephtarbit avatar Oct 22 '24 13:10 josephtarbit

We could make it like that:

https://gist.github.com/H0Imes/0c32bdc0bf80846aea19963a192a357a

H0Imes avatar Oct 22 '24 13:10 H0Imes

Yeah that would work.

josephtarbit avatar Oct 22 '24 13:10 josephtarbit

Are you okay with also having the option to completely turn it off in the config?

H0Imes avatar Oct 22 '24 19:10 H0Imes