Wrench in the Works is a little side project of mine made with the intent of making working with pistons, stairs, and other things that turn less of a royal pain in the neck. It was inspired by one of
Welsknight's Kingdoms videos (which I have since been unable to find) where he mentioned that if there was one thing he'd add to vanilla Minecraft, it would be a wrench that rotated things. I thought, "Hey, I could make that!", and here we are.
Note: as of right now, WitW is only for MC 1.11 and 1.10. Older versions are highly unlikely. Newer versions will happen as they come out.
Out of the box, WitW simply adds one item, the Wrench. Right-clicking with the Wrench on most rotatable blocks will cycle through the possible rotations. This includes stairs, pistons, slabs, observers, chests, and so on. It is crafted like this:
However, where WitW really shines is it's configurability. Any and all rotations can be defined through the config file, which can be accessed through the ingame Mod Options menu. You can completely configure which blocks can be rotated, and which properties to actually "rotate". WitW comes pre-configured to work with most vanilla blocks that make sense to be rotatable, however working with other mods may require a bit of configuration. I will be working on expanding the default config to work reliably with some of the more popular mods eventually.
Default Whitelist/Blacklist:
Spoiler (click to hide)
Whitelist:
- Any block with the properties facing, axis, half, or rotation
Blacklist:
- Beds
- Banners and signs hung on the wall
- Buttons and levers
- Torches/Redstone Torches
- Tripwire Hooks
- End Portal Frames
- Nether Portals
- Extended pistons
How to configure:
Spoiler (click to hide)
The blacklist and whitelist each take the form of a list of entries. Blocks/properties must be whitelisted to be considered, and the blacklist will override the whitelist.
Valid input takes the form:
<domain>:<name>[<property name>,<filter name>=<opt1>|<opt2>|<opt3>...]
where
- <> mark named segments and should not be included
- all segments may only contain alphanumeric characters and underscores
- domain and name are optional
- if only one of domain/name is present, it is assumed to be name
- if domain is not present, the colon must not be present
- if domain is not present, is is assumed to be "minecraft" (vanilla Minecraft)
- domain/name can contain or be replaced with * as a wildcard
- the [] are optional, but cannot be empty
- the [] can contain any number and combination of comma-separated properties or filters
- filters may have any number of pipe-separated options
<domain>:<name> forms the registry name of a block to match.
- If omitted, any block will be matched.
- Putting * anywhere in either will act as a wildcard that will match any valid string of any length.
Properties define the blockstate properties that the wrench can rotate. For example:
- piston[facing] will allow the wrench to cycle the facing property of pistons.
- [rotation,axis] will allow the wrench to cycle the rotation or axis properties of any block that has them.
Filters define blockstate properties and values that must match for the entry to apply. For example:
- piston[extended=true] will only match if the block is an extended piston base.
- [rotation=0|1|2] will only match if the block's rotation property is 0, 1, or 2.
Note the wildcards are very inefficient as of right now and should be used sparingly.
As of right now, filters are added separately from the properties they are defined with; this means that blacklisting piston[facing,extended=true] will blacklist both piston[facing] and piston[extended=true]. This will change later to more properly reflect how I originally wanted it to work.