Everything is updated to 1.3.2. Let me know of any bugs you encounter.
Some quick notes:
GUIs which used to pause the game (the Toggle Block configuration GUI and the Sign Edit GUI) no longer do so. This was done in order to make them actually work. This also means that the Sign Edit GUI class is no longer optional.
For Double Slab Tweak, the recipe for Sandstone single-to-double is side-by-side instead of up-down due to a conflict with a vanilla recipe.
A: No, these mods are SSP only. This is largely because I want to ensure that my mods work properly in SSP before worrying about porting them over. SMP support is definitely coming, though.
Q: Certain blocks/items don't work with Toggle Blocks.
A: First, make sure you've set the proper flags. If you have, post what mod's blocks or items aren't working and the setup you're using. This will enable me to determine if it's a problem with Toggle Blocks and what fixes need to be applied if so.
Q: Something else is broken/it crashed.
A: If there's a crash, make sure you include a crash log, in spoiler tags if it's longer than a few lines. Don't forget to mention any mods not listed in the crash report or mod packs you are using.
*Mods labeled as "pure mods" above require Risugami's ModLoader. Read up to at least the ModLoader download. (Especially his disclaimer, as that applies here too.)
*Read this too. Providing a proper crash report will enable me to help you.
*As mentioned in Risugami's post, back up your saves and bin folder, just in case.
*Mods may not actually be apathetic.
Licensing/Legal stuff/etc. (As required by this post)
My mods are licensed under TheApathetic's "Golden Rule License". Specifically:
Give proper credit and attribution and link back to this page.
Redistribution and use in mod packs is permitted.
Decompiling is permitted.
Commercial use is permitted, provided you "share the wealth" using the donate link below.
(ModLoader 1.5_01v2 and later support placing the mod .zip's in the .minecraft/mods folder. All of my mods labeled as "pure mods" above support this feature, so it's preferred that you use this method if possible.)
Quote from Risugami »
1) Open up %appdata%, if you don't know how to do this, start>run, then type in %appdata%
2) Browse to .minecraft/bin
3) Open up minecraft.jar with WinRAR or 7zip.
4) Drag and drop the necessary files into the jar.
5) Delete the META-INF folder in the jar.
6) Run Minecraft, enjoy!
1) Go to Applications>Utilities and open terminal.
2) Type in the following, line by line:
jar xf ~/Library/Application\ Support/minecraft/bin/minecraft.jar
3) Outside of terminal, copy all the files and folders into the mctmp directory.
4) Back inside terminal, type in the following:
jar uf ~/Library/Application\ Support/minecraft/bin/minecraft.jar ./
rm -rf mctmp
5) Run Minecraft, enjoy!
(If you appreciate my mods and care to donate, you may do so below.)
Make sure you at least read the Basics and watch the video (Annotations must be on!), using the rest as a reference when needed. If you need clarification, ask. I or someone else will try to explain it to you.
Many of you are familiar with ControllerBlock. As functional as it is, its method of operation has led to some frustrations. Most notably, changing any of the affected blocks turned the Controller to gravel, which led to the loss of much iron if you were clumsy or simply unlucky. I understand the reason why Sunrise_78 implemented it this way (to prevent infinite resources), so I decided to use an alternate method to solve this problem.
Toggle Blocks is basically a ground-up rewrite of the original functionality of ControllerBlock, with a lot more added in to make the mod more versatile. Consider it a combination of a ControllerBlock and a Dispenser, then ratcheted up a notch.
Installing Toggle Blocks
See general install instructions above. Note: make sure you install the gui folder correctly too. There should be a changeblock.png, a toggleblock.png, a toggleblockassistant.png, and six cbalignment_*.png in that folder.
Using Toggle Blocks
(Make sure to watch this video and read the Basics section, at least.)
Basics (The following sections explain all of this in greater detail.)
There are six types of Toggle Blocks in four different sizes:
(I forgot to mention it in the picture, but you get 3, 10, 25, and 50 Change Blocks, respectively, for each size.)
Place the Toggle Block to put it into Edit mode.
Open up the GUI with a right-click:
Grab the Change Blocks. If desired, you can place blocks or items into the Quick-place slots. It's intended mostly for setups where most of the blocks are of one type.
Place the Change Block. Open its GUI with a right-click:
Place blocks or items in the slots as desired. On and Off refer to the powered and unpowered states, respectively.
When done, double-click the Toggle Block (or click the "Switch Mode" button if in Creative mode). If there are any errors, fix or ignore them and double-click again. Either way, the Toggle Block will switch to Ready mode, with the following occurrences:
Any Change Blocks you have on you will be removed.
Any blocks or items still in the Quick-place slots will be kicked out.
Hook up a circuit to the Toggle Block.
You can double-click the Toggle Block to return it to Edit mode.
Right-clicking a Ready mode Toggle Block will bring up this GUI:
You can change the radius to check for outside containers, plus there are replenishment slots so that outside containers aren't necessarily needed. In order to hide a Toggle Block in the world:
Click the corresponding button in the Ready mode GUI. (Make sure you have a free inventory slot!)
With the given Toggle Block Assistant item, right-click on the block you want to disguise the Toggle Block as (note that, like Secret Switches, the targeted block must be opaque).
If there are any problems, you will be notified and the Toggle Block will be in Error mode. When in Error mode, check the red-colored Change Blocks to fix. The Change Block GUI will show the error text.
The possible errors are:
Empty Change Blocks
Putting Toggle Blocks or other Change Blocks inside of a Change Block.
Switching out a container with another block or item.
Double-clicking the Toggle Block while in Error mode will force it into Ready mode, with the Change Blocks reacting accordingly:
Any empty Change Blocks will stay that way. This could be useful considering how Toggle Blocks handles encroaching blocks.
Any contained Toggle Blocks will be kicked out, and any contained Change Blocks destroyed.
If the replaced container had items in it, they will be kicked out.
Placing a Change Block sets its alignment. You can change it at any time by left-clicking the Change Block. Note that the alignment (and its subsequent block placement) is based off of which way you are looking:
You will have to get above or below the Change Block to set up/down alignment. Left-clicking the Change Block while the arrow is pointing away from you will turn it around to make it face you (and vice versa), useful for in-the-wall setups. The green check mark indicates the facing direction of the Change Block, the red X its opposite.
Alignment matters for the following vanilla blocks and items: ( indicates that up and down can be used. Also, Toggle Blocks supports most mod blocks and items.)
Torches (regular and Redstone)
Furnaces and Dispensers
Pumpkins and Jack-o-Lanterns
Arrows, Eggs, and Snowballs
Signs (Note that whether you'll get a wall sign or a sign post depends on whether there is a block in the alignment direction.)
Anything dropped as an item
For Torches, Ladders, Levers, and Buttons, the alignment set is the preferred one if there are several possible. If that alignment cannot be used, they will still be placed if possible, but with whatever alignment their internal code defaults them to.
When in Creative mode, you can click the respective button in the Change Block GUI to get a Change Block Aligner. Just right-click with it in hand to modify the Change Block's alignment.
If a block is destroyed, the Toggle Block will try to replenish it upon the next change to that respective state, in the following order:
From the Change Block's slot if more than one was put into the slot.
From the Toggle Block's own internal replenish inventory (filled via the Ready mode GUI).
From any outside containers. These containers will be searched for in a square centered on and at the same altitude as the Toggle Block. The square's radius is changeable via the Ready mode GUI, and the width of the square is (Container Checking Radius x 2 + 1).
If a block cannot be replenished, that block will simply fail to function until the necessary items are supplied and the system is cycled. Change Blocks that need replenishment will show the item in the GUI with a count of 0.
(Note that in Creative mode, blocks and items don't need replenishing.)
(Below is an example setup of Chests with the default container radius of 2.)
Use and Drop
Generally speaking, a Change Block set to Use will attempt to place or use the block or item. For items specifically:
First, the Toggle Block will attempt to use the item as though you were right-clicking on a block with said item in hand.
Second, the Toggle Block will attempt to use the item as before, but this time as though you were right-clicking into the air.
Third, the Toggle Block will attempt to interact with any entities in range. It will check for a few blocks in the Change Block alignment's direction. Note that Toggle Blocks will always try to interact with the closest entity it finds.
Fourth, the Toggle Block will attempt to use ModLoader's special dispenser functions. This supports mod items like Risugami's Elemental Arrows. Note that up and down alignments won't work here because dispensers (and, by implication, ModLoader's dispenser functions) don't support up and down.
If the item has no use, it will not be dropped unless it is set to drop.
The Drop function skips all of the above checks and drops the block or item. Certain items will drop regardless of whether the Change Block is set to Use, such as food and those set to drop in the configuration.
The following items in the Use state are specially handled and as such don't go through the above checks:
Water and Lava buckets (allows these to be used anywhere)
Flint and Steel (due to special handling, see Configuration below)
Arrows, Eggs, and Snowballs (allows up and down alignments)
Boats (allows boats to be created anywhere)
Signs (prevents the sign edit GUI from showing up)
The first time Toggle Blocks loads, it will create several configuration files, ToggleBlocks.properties in .minecraft/mods/ApatheticMods, and several others in the containing /ToggleBlocks folder. These files can be edited with any text editor. The settings available in ToggleBlocks.properties are:
toggleblockid (Default 171): the Toggle Block's block ID. Valid values for block IDs are any untaken IDs <= 255. You can get item and block IDs here.
changeblockid (Default 172): the Change Block's block ID.
maxcbdistance (Default 48): the maximum distance a Change Block can be placed from its owning Toggle Block. The valid range is from 1 to 127.
moveflintandsteel (Default true): if this is true:
When switching to Ready mode, the Toggle Block will move any found Flint & Steel inside the Change Blocks to nearby chests if there are any with empty slots.
When a Change Block needs to use a Flint & Steel, it uses one in the chests without taking it away.
If false, the Toggle Block will use the old behavior by keeping all Flint & Steel inside the Change Blocks and taking any available Flint & Steel from the chests as needed.
centeritemid (Default 331, Redstone dust): the item to use in the center of each Toggle Block recipe.
altmedironrecipe (Default false): when true, changes the medium Iron Toggle Block recipe to this:
ignoreemptycb (Default false): when true, ignore empty Change Blocks when checking for errors.
containercheckradius (Default 2): the default container checking radius for new Toggle Blocks or those converted from before v2.4. The valid range is from 0 to 5.
containerblocks (Default 54): a comma-delimited list of block IDs to use for container checking when searching for items to replenish. These containers will also be used for storing Flint & Steel if moveflintandsteel is true.
assitantitemid (Default 12100): the item ID for the Toggle Block Assistant Item. Valid values are any untaken item IDs from 400 to 31999.
stacktoggleblocks (Default false): when true, allows Toggle Blocks to stack up to 16. Note that you won't get the center item back when deconstructing or creating a Large Toggle Block from two Medium when this is set to true. Beware when changing this setting from true to false, as the center item rules apply and you might lose a whole stack of Toggle Blocks if you're not careful.
Here is a default configuration, in case you want to edit the block IDs before entering Minecraft:
For block and item properties, you can use the in-game Configuration GUI. Click the "+" button above any of the other GUI's to access it.
To set block and item information:
Click the respective block or item in the list.
Click on the respective settings. The sections are explained in greater detail below.
Click on "Save" to save the settings.
(Remember: Toggle Blocks deals in items, so if you are setting properties for a block placed by an item, like doors or beds, make sure you select the item.)
Setting Expected Blocks:
Although it is unlikely, as Toggle Blocks usually automatically deduces them, if you need to set expected blocks:
Click on the "Add Blocks" button.
Click on the blocks you want to add. If you accidentally add an incorrect block, you can click on its entry in the right-hand list to remove it. There is a limit of 5 expected blocks.
If you want to force an item to have no expected blocks (used for dyes to prevent bonemeal from adding expected blocks), make sure the list is clear and click "None". The text should change to "Set to None!".
Click on "Click When Done" or "Save" when done.
If any of your mods' items have special properties, they will have to be added here. Again, go by the item ID.
The flags as of v2.6 are:
Save: this saves the bits of metadata for this item. Note that you will not need to save the bits related to:
Alignment (e.g. furnaces, stairs)
Type of block (e.g. logs, wool)
If you don't know the save bits for the respective block or item, you can obtain a Toggle Block Scanner by clicking the "Get Scanner" button, using it as detailed below.
Place downward: this item is set to be placed downward, regardless of the Change Block's alignment. Use this for items that can only be placed on top of a block (e.g. doors, seeds).
Requires tilled soil: this item requires tilled soil below it in order to be placed. This allows the Toggle Block to till the soil prior to item placement if it can. Note that this also automatically sets "Place downward".
Drop as item: if set, the Toggle Block will not try to place or use this item, and will instead go straight to dropping it.
Double block: this item is a double block (e.g. doors, beds). If any of the "Save" flags are set, the metadata application will continue to the next block. If the item is set to "Place downward", the metadata application will go up to the next block, otherwise the next block will be that in the Change Block's alignment direction.
Uses up/down for alignment: this item uses up and down Change Block alignments to set up and down block alignments (e.g. pistons). Use this for blocks that set their alignment up or down if the player is above or below them.
Grows like melons/pumpkins: this item grows its plants out into an adjacent block. The Toggle Block will try to till the next block in the Change Block alignment's direction when planting.
If your mod's blocks or items need to be placed before or after other blocks, then put them here. Note that blocks are already sorted by altitude, so if your block or item only needs a block under it, it doesn't have to be added here. The priorities go in this order:
-1: Before everything else. This is used primarily for chests so that the Toggle Block can get items out of it if any are within range.
0: Everything else.
2: --Increasingly higher priorities
Toggle Block Scanner:
Clicking the "Get Scanner" button will give you a Toggle Block Scanner. Right-click on blocks to add them for scanning (up to 5 can be scanned at once). Alternately, you can right-click at a block from outside its normal activate range. This is useful for blocks that activate on right-click.
The Scanner text shows the block's ID, name, location, and metadata bits that correspond to those in the Configuration GUI (remember that for any blocks that are placed via items, like doors and beds, you need to set the item flags for the item itself). You can remove a block from being scanned by any one of the following:
Right-clicking on that block.
Destroying the block.
Clicking "Remove Scanner" in the Configuration GUI.
As of v2.9, you can also clear the list of scanned blocks by holding down right-click for one second.
Put a Toggle Block into the crafting window to get back the iron or gold used to make it (You also get the center item back if Toggle Blocks aren't set to be stackable in the configuration).
You will not enter the Change Block GUI with another Change Block in hand, and will instead place it. This is useful for easily placing one Change Block against another.
Anything dropped as an item will drop it as a stack. You can customize this by putting stacks of whatever size you want into the chests surrounding the Toggle Block.
If another type of block is encroaching on an occupied spot, it will be kicked out as an item upon the next state change.
If seeds are being planted and the below block isn't tilled, the Toggle Block will search the chests for a hoe to till the soil, using it up in the process.
None as of right now.
These videos demonstrate a few things that can be done with Toggle Blocks.
nhg1 shows off a house using Toggle Blocks to make gates and hidden passageways:
Minecrafter9 made this 20x20 pixel color TV using Toggle Blocks and Pistons:
kamtschatka made this automatic tree farm using Toggle Blocks and the Allocator:
moldy912 made this garage door that functions like the real thing (with stepped block placement and removal instead of all at once):
Ever wish your switches didn't stick out like sore thumbs? With this mod, you can now hide them. The supported switch types are buttons, levers, three pressure plates (wood, stone, and obsidian, which is player-only), and a light sensor.
Create your switch with the respective recipes: (the obsidian is for a player-only pressure plate, the torch for a light sensor)
Place your switch anywhere in the world to put it into edit mode (and yes, it is intentional that they stick out like that).
Right click to open up the GUI:
Use the buttons to set the direction of the block you want the switch to disguise as, or put a block in either or both slots.
Use the button in the upper right to set whether this switch makes a sound when activated or deactivated.
For light sensors only: Use the buttons in the upper left to set the cutoff light level and whether this is the minimum or maximum light level required to turn and keep the switch on.
Double-click the switch to put it into ready mode (or click the "Set Ready" button if in Creative mode).
When first started, Secret Switches will create a configuration file, SecretSwitches.properties, in .minecraft/mods/ApatheticMods/. A default configuration is shown below:
switchblockid is the Block ID for the Secret Switch, and the four sound* options determine whether switches of that type by default will make a sound when activated and deactivated. lightlevel determines the default cutoff level for the light sensor, and islightminimum determines whether the cutoff defaults to the minimum or maximum required to turn and keep the switch on.
The switch will only disguise as opaque blocks.
If there is nothing to disguise as, the switch will default to a stone texture.
If you put one block in either slot, the switch will use that block for both power states. If you put one block in each slot, the switch will use the block associated with its current power state.
The switches will produce the edit texture particles when hit. Consider this a "feature".
You must harvest the switch with a pickaxe in order to collect it.
Buttons and pressure plates will use the tick rate of their respective base switch types, so if you use a mod that alters them, the tick rate on the respective switch will change too.
So you put up a sign, set its text, close the GUI, then realize you misspelled something. Or perhaps you use signs for a constantly changing "To-do" list. Taking down and replacing signs just to edit the text gets annoying, so I modified the base signs so that right-clicking a placed sign brings up its edit GUI. Simple, no?
(Note that this will only work in SSP. For those of you running Bukkit servers, there is a plugin. I'm working on a vanilla SMP version, although I don't know when it will be finished.
Also, this is incompatible with any mod that edits ahs.class, ajg.class, aqx.class, or dy.class. As of Beta 1.7.2, Sign Edit has only one version that is automatically compatible with Sign Tags. Make sure you install this after Sign Tags.
Beta 1.8.1 adds the ability to use Control+C/Control+X/Control+V to copy/cut/paste sign text. Read the text file included in the zip for more details.)
Double Slab Tweak(1.3.2)
This is a simple tweak to the vanilla double slabs which allows them to be created in recipes and placed like single slabs. You can also reverse double to single slabs in the crafting window.
The default recipe for converting single to double slabs is:
Note that for Sandstone slabs, the above recipe conflicts with a vanilla recipe to make Sandstone, so the recipe for this is:
To reverse the conversion, just place double slabs in the crafting window.
How well does this work with mod items? I have a mod that adds basically a variation of reeds. The only difference (at least apparent difference, IDK about the actual code) is that it uses a different item ID (and block ID) and texture, but it's the same basis of it being an item when destroyed, but planted as a reed with right-click. Should this work with this mod?
P.S. It's PROWNE's gunpowder plant, if you're wondering.
Sorry if this made little sense; tired at time of typing.
Rollback Post to RevisionRollBack
Quote from A wise man once »
Religion is like a penis. It's ok to have one, and it's ok to be proud of it. But don't go waving it around in public, and don't try to shove it down kids' throats.
Quote from He also »
Ambition is a poor excuse for not having enough sense to be lazy.
When I try to place a change block, it says "ERROR: Not in edit mode!" yet the Change block opens as it was in Edit mode...
Restarted Minecraft - it fixed self somehow...
I occasionally got this during testing as well. As far as I can tell, part of the code that checks whether there is a Toggle Block in edit mode sometimes didn't want to work. In any case, I modified it so it shouldn't have those problems any more.
Quote from killgoblen »
How well does this work with mod items?
Toggle Blocks only works with vanilla items at the moment. One thing I'm planning on adding is support for ModLoader's DispenseEntity() function, so any items that use it (like Risugami's Elemental Arrows) will be 'dispensed' properly.
P.S. I fixed the fence problem. There should be an update within the next day or so (hopefully). I still have a couple of things to work on.
Rollback Post to RevisionRollBack
Disclaimer: user may not actually be apathetic. ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
[*:23vx3mim]Issues with the mod claiming a Toggle Block isn't in Edit Mode when it really is and the mod not taking away the player's Change Blocks when appropriate are fixed (hopefully).
[*:23vx3mim]Fences can now be stacked like in ControllerBlock.
[*:23vx3mim]Destroying a Ready mode Toggle Block with items/blocks out (namely those that support alignment and/or special metadata) will no longer spawn those items/blocks with damage.
[*:23vx3mim]The encroaching block check now properly runs when items with special functions were in the spot (it used to result in the block being outright deleted).
[*:23vx3mim]Added a check for obsidian when retrieving blocks. If there's a empty bucket in the Change Block at that spot, it gets returned to the bucket as lava. (This might be changed in the future.)
[*:23vx3mim]Cleaned up and optimized the code some.
[*:38zr7aoe]Issues with the mod claiming a Toggle Block isn't in Edit Mode when it really is and the mod not taking away the player's Change Blocks when appropriate are fixed (hopefully).
[*:38zr7aoe]Fences can now be stacked like in ControllerBlock.
[*:38zr7aoe]Destroying a Ready mode Toggle Block with items/blocks out (namely those that support alignment and/or special metadata) will no longer spawn those items/blocks with damage.
[*:38zr7aoe]The encroaching block check now properly runs when items with special functions were in the spot (it used to result in the block being outright deleted).
[*:38zr7aoe]Added a check for obsidian when retrieving blocks. If there's a empty bucket in the Change Block at that spot, it gets returned to the bucket as lava. (This might be changed in the future.)
[*:38zr7aoe]Cleaned up and optimized the code some.
[*:36fym29c]A configuration file has been added, allowing you to change the block IDs, the center item in the recipes, and a few other things.
[*:36fym29c]The default recipe for a medium Iron Toggle Block now has the Redstone dust in the center. You can switch it back to the old version by changing the configuration option 'altmedironrecipe' to true.
[*:36fym29c]The way that Flint & Steel works has been changed. When a Toggle Block goes into Ready mode, it will pull any Flint & Steel out of the Change Blocks and put it into a nearby chest, if possible. When a Change Block that's using Flint & Steel needs replenishment, it will use one from the chests without taking it away. If you prefer the old method, you can change the configuration option 'moveflintandsteel' to false.
[*:36fym29c]Fixed a bug with Hoes and Flint & Steel not being removed from their containing chests upon depletion.
Wow, the first time I saw this thread I think the description was a bit mangled and I wrote it off as too complicated, but now it makes perfect sense. It's everything I loved about Controller Block, but with added bonuses like being able to dictate block direction and use special blocks like doors and beds as well as blocks that rely on the damage value (colored wool, the new half step blocks, etc.).
I was a bit surprised that signs don't work. I wouldn't expect them to retain text (like how chests and such won't retain their inventory), but I was hoping to make a sort of toggleable couch using the "stairs with wall signs on the sides" method. The signs just drop as items when the switch is flipped, however.