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.
Mods: Pure mods: (These don't edit core Minecraft classes and can be placed in your .minecraft/mods/ folder)
*Toggle Blocks (Download)
*Secret Switches (Download)
*Double Slab Tweak (Download) Core mods: (These edit core Minecraft classes and must be placed in your minecraft.jar)
*Sign Edit(Edits ahs.class, ajg.class, aqx.class, dy.class) (Download)
Frequently Asked Questions:
Q: Do these mods work in SMP?
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.
General Disclaimers:
*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.
Install Instructions:
(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 »
Installation Windows:
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!
Macintosh:
1) Go to Applications>Utilities and open terminal.
2) Type in the following, line by line:
cd ~
mkdir mctmp
cd mctmp
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:
rm META-INF/MOJANG_C.*
jar uf ~/Library/Application\ Support/minecraft/bin/minecraft.jar ./
cd ..
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.)
Setup:
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.
Enjoy!
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).
Done!
Errors
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.
Alignment
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)
Stairs
Furnaces and Dispensers
Ladders
Levers
Buttons
Doors
Pumpkins and Jack-o-Lanterns
Arrows, Eggs, and Snowballs
Beds
Redstone Repeaters
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
Extra notes:
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.
Replenishment
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.)
Other containers can be added to the configuration for replenishment.
(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)
Configuration
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.
Item Flags:
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.
Priority:
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.
1: -v
2: --Increasingly higher priorities
3: -^
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.
Miscellaneous
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.
Known Issues
None as of right now.
Videos
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.
Usage
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).
Enjoy!
Configuration
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.
Notes
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.
Sign Edit(1.3.2)
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.
So, are you saying it will fire arrow, snowballs, and eggs as if from a dispenser? Awesome...
I can only begin to imagine the awesomeness. Automatic farms, invisible traps, chicken machine (lolwut?)
I am so downloading once I have time to install and test it!
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.
can Toggle Blocks be used with ControllerBlock installed? i hope so :smile.gif:
I haven't tested it, but AFAIK they don't conflict in either block IDs or recipes (the temporary recipe is for compatibility in part with ControllerBlock and in part with SDK's gun mod).
Quote from NeonJ »
Sadface. I decided to make a wall like this:
-snip-
Apparently the TOGGLEBLOCK can't stack fences, yet the CONTROLLERBLOCK can! [I was porting my stuff, see..]
The top two fences aren't affected by the toggleblock. They're just there.
I think I know what's causing this. I'll take a look at it.
Rollback Post to RevisionRollBack
Disclaimer: user may not actually be apathetic. ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
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.
Thanks!
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...
-snip- EDIT:
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.
this is amazing, im using this with the ssp commands and noticed that the blocks act as wool!
e.g. /give wool 1 [wool color id]
e.g. /give 121 1 [1-5? type of block]
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.
I've noticed 2 bugs:
1. if you set an empty spot to "Overide" the game crashes
2. there's no delay, so if you have something that when the device's input is on it power's off and when the device's input is off it turns on, this causes the game to crash(this is my belief, could have been the levers, or the redstone( btw I had a redstone controll block ontop of a redstone/wood controll blck)
I got no crash report, and my world wasn't saved
Rollback Post to RevisionRollBack
"The world is but a figment of combined imaginations."
It gives some error messages related to 'conflicts' with block ids -134 and -135
I figured out what was causing these messages (thanks to _303 in #risucraft). It isn't game-breaking, but I fixed it for completeness.
Quote from TreeTopSky »
this is amazing, im using this with the ssp commands and noticed that the blocks act as wool!
e.g. /give wool 1 [wool color id]
e.g. /give 121 1 [1-5? type of block]
I used similar code to the wool in order to keep the Toggle Block as one block ID. As of right now, the range is 0 (Tiny) to 5 (Large Gold).
Quote from salisburymistake »
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.
I was planning on adding signs along with general container support, but I'll add them to the next version. They won't support text yet, but you will be able to place them.
Quote from raydeejay »
I've already built some nice things, and I'm considering making a video showing some of them and how they're built so people can get a grasp of what's possible (almost anything) to do with it.
If you do, I'll add it to either the OP or second post.
Quote from raydeejay »
Would it be possible to make it use a hoe/shovel in the direction it's pointing to, instead of dropping the item? Maybe just gold tools, or wood tools.
I'm not sure, as this seems too limited in use (unless you had another idea in mind that I missed).
Quote from natedogith1 »
I've noticed 2 bugs:
1. if you set an empty spot to "Overide" the game crashes
2. there's no delay, so if you have something that when the device's input is on it power's off and when the device's input is off it turns on, this causes the game to crash(this is my belief, could have been the levers, or the redstone( btw I had a redstone controll block ontop of a redstone/wood controll blck)
I got no crash report, and my world wasn't saved
As for #1, I found out what was causing it (I changed some internal code without checking its use everywhere) and fixed it.
As for #2, can you elaborate? I'm not sure what you're getting at.
For the crash report: read this to run Minecraft from the command line.
===== =====
P.S. I modified the Change Block GUI so it shows items waiting for replenishment. You can't grab it (as it's only graphical) and it shows the mouse-over text as well. Also, Change Blocks are no longer considered empty when an item is waiting for replenishment, so only truly empty Change Blocks will fail the error checks. The next update should come by the end of the weekend.
Rollback Post to RevisionRollBack
Disclaimer: user may not actually be apathetic. ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
i read through the entire thing; and now my brain is smoking, i think you just need to add a video, cause i have read and re-read it a few times, i don't really grasp the concept :tongue.gif:
seems like a great mod though..
Some quick notes:
Mods:
Pure mods:
(These don't edit core Minecraft classes and can be placed in your .minecraft/mods/ folder)
*Toggle Blocks (Download)
*Secret Switches (Download)
*Double Slab Tweak (Download)
Core mods:
(These edit core Minecraft classes and must be placed in your minecraft.jar)
*Sign Edit (Edits ahs.class, ajg.class, aqx.class, dy.class) (Download)
Frequently Asked Questions:
*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:
(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.)
===== =====
Toggle Blocks (1.3.2)
Most recent version: v3.0
Changes from v2.9
Download
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.
Table of Contents
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.)
Setup:
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:
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:
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.)
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:
(Note that in Creative mode, blocks and items don't need replenishing.)
Other containers can be added to the configuration for replenishment.
(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:
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:
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:
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:
Setting Expected Blocks:
Although it is unlikely, as Toggle Blocks usually automatically deduces them, if you need to set expected blocks:
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:
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.
1: -v
2: --Increasingly higher priorities
3: -^
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:
Miscellaneous
None as of right now.
Videos
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):
Downloads
Toggle Blocks v3.0 for 1.3.2
Old versions:
v2.8 for 1.0.0
v2.7 for Beta 1.8.1
v2.6 for Beta 1.7.3
v2.5 for Beta 1.7.2
v2.41 for Beta 1.6.6
v2.2 for Beta 1.5_01
v1.1 for Beta 1.4_01
RC4 for Beta 1.3_01 (ModLoader 1.3_01v5)
RC4 for Beta 1.3_01 (ModLoader 1.3_01v4)
Changelog
26 Jul 2012: v2.9: Updated to 1.2.5, unlimited Edit mode Toggle Blocks
7 Dec 2011: v2.8: Updated to 1.0.0
27 Sep 2011: v2.7: Updated to Beta 1.8.1, Creative mode support
17 Aug 2011: v2.6: Added entity interaction, compatibility, and various
5 Jul 2011: v2.5: Updated to Beta 1.7.2, added Configuration GUI
16 Jun 2011: v2.41: Fixes to metadata-related bugs
11 Jun 2011: v2.4: Added Ready mode GUI, ability to hide Toggle Blocks in the world
28 May 2011: v2.3: Updated to Beta 1.6.4
4 May 2011: v2.2: Bugfixes
27 Apr 2011: v2.1: Bugfixes, compatibility with Single Player Commands
25 Apr 2011: v2.0: Updated to Beta 1.5_01, added mod blocks and items support
6 Apr 2011: v1.1: Updated to Beta 1.4_01
3 Apr 2011: v1.01: Furnace and Redstone torch bugfix
2 Apr 2011: v1.0: Container and ModLoader.DispenseEntity() support, bugfixes
20 Mar 2011: RC4: Various
15 Mar 2011: RC3: Configuration file
11 Mar 2011: RC2: Bugfixes
07 Mar 2011: RC1: First release
Credits
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
Most recent version: v1.8
Changes from v1.7
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.
Usage
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.
Notes
Secret Switches v1.8
Old versions:
v1.6 for 1.0.0
v1.5 for Beta 1.8.1
v1.4 for Beta 1.7.3
v1.3 for Beta 1.7.2
v1.2 for Beta 1.6.6
v1 for Beta 1.5_01
Changelog
26 Jul 2012: v1.7: Updated to 1.2.5
7 Dec 2011: v1.6: Updated to 1.0.0
27 Sep 2011: v1.5: Updated to Beta 1.8.1, Creative mode support
16 Aug 2011: v1.4: Added Secret Light Sensor
5 Jul 2011: v1.3: Updated to Beta 1.7.2, graphical fix for buttons
16 Jun 2011: v1.2: Bugfixes
28 May 2011: v1.1: Updated to Beta 1.6.4
20 May 2011: v1: First Release
===== =====
Sign Edit (1.3.2)
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.)
Downloads
Sign Edit for 1.3.2
Old versions:
1.0.0
Beta 1.8.1
Beta 1.7.2/1.7.3
Beta 1.6.6 (Regular) (Sign Tags-compatible)
v1 for Beta 1.5_01 (Regular) (Sign Tags-compatible)
Changelog
26 Jul 2012: 1.2.5: Updated to 1.2.5
7 Dec 2011: 1.0.0: Updated to 1.0.0
27 Sep 2011: 1.8.1: Updated to Beta 1.8.1, optional sign edit GUI copy/cut/paste
5 Jul 2011: 1.7.2: Updated to Beta 1.7.2, automatic Sign Tags compatibility
28 May 2011: 1.6.4: Updated to Beta 1.6.4
20 May 2011: v1: First Release
===== =====
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.
Downloads
Double Slab Tweak for 1.3.2
Old versions:
1.0.0
Beta 1.8.1
Beta 1.7.3
Changelog
26 Jul 2012: 1.2.5: Updated to 1.2.5
7 Dec 2011: 1.0.0: Updated to 1.0.0
27 Sep 2011: 1.8.1: Updated to Beta 1.8.1
17 Aug 2011: 1.7.3: First Release
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
I'm so cool cause I say I'm cool like all the cool kids.
So, are you saying it will fire arrow, snowballs, and eggs as if from a dispenser? Awesome...
I can only begin to imagine the awesomeness. Automatic farms, invisible traps, chicken machine (lolwut?)
I am so downloading once I have time to install and test it!
I haven't tested it, but AFAIK they don't conflict in either block IDs or recipes (the temporary recipe is for compatibility in part with ControllerBlock and in part with SDK's gun mod).
I think I know what's causing this. I'll take a look at it.
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
http://dl.dropbox.com/u/20546786/Photos/one.png
http://dl.dropbox.com/u/20546786/Photos/two.png
EDIT:
Restarted Minecraft - it fixed self somehow...
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.
Thanks!
Sorry if this made little sense; tired at time of typing.
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.
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.
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.
Download is in OP here.
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
Yay thanks for the bug fix!
[*: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.
Download is in OP here.
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
e.g. /give wool 1 [wool color id]
e.g. /give 121 1 [1-5? type of block]
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.
1. if you set an empty spot to "Overide" the game crashes
2. there's no delay, so if you have something that when the device's input is on it power's off and when the device's input is off it turns on, this causes the game to crash(this is my belief, could have been the levers, or the redstone( btw I had a redstone controll block ontop of a redstone/wood controll blck)
I got no crash report, and my world wasn't saved
I figured out what was causing these messages (thanks to _303 in #risucraft). It isn't game-breaking, but I fixed it for completeness.
I used similar code to the wool in order to keep the Toggle Block as one block ID. As of right now, the range is 0 (Tiny) to 5 (Large Gold).
I was planning on adding signs along with general container support, but I'll add them to the next version. They won't support text yet, but you will be able to place them.
If you do, I'll add it to either the OP or second post.
I'm not sure, as this seems too limited in use (unless you had another idea in mind that I missed).
As for #1, I found out what was causing it (I changed some internal code without checking its use everywhere) and fixed it.
As for #2, can you elaborate? I'm not sure what you're getting at.
For the crash report: read this to run Minecraft from the command line.
===== =====
P.S. I modified the Change Block GUI so it shows items waiting for replenishment. You can't grab it (as it's only graphical) and it shows the mouse-over text as well. Also, Change Blocks are no longer considered empty when an item is waiting for replenishment, so only truly empty Change Blocks will fail the error checks. The next update should come by the end of the weekend.
ApatheticMods (Toggle Blocks, Secret Switches, Sign Edit)
seems like a great mod though..