VoxelGadget2

(Redirected from VoxelGadget)

VoxelGadget2.png
An official Bukkit plugin from the VoxelBox suite
Lead Programmer & Designer: CalDaBeast
Documentation: CalDaBeast
Public Relations: CalDaBeast
BukkitDev Link: Not yet on BukkitDev.
Tested Compatible With: Developed for #1.6.2
Tested working for #1.7.2
Source: Github
Issue Tracker: Github Issue Tracker
Download: Not yet available.
Currently live on The Voxel Box.


Contents

Overview

There is both Video and In-Game accompaniment to this Documentation. For Video, either see the bottom of this page of the VoxelGadget2 Playlist on YouTube. For In-Game, visit the Voxel Gadget Showroom, currently accessible via the portal at spawn.

VoxelGadget is a series of small, simple tools that allow additional functionality for the dispenser block. "Vanilla" redstone devices allow for automated pushing of blocks around and complex logic, but somewhat bafflingly, it does not easily allow automated placement of blocks or destruction of blocks. This severely cripples the creative possibilities of machinery in Minecraft, since most of the game is about placing or destroying blocks.

VoxelGadget allows simple arrangements of certain block types to allow dispensers to take items from inside their inventory or elsewhere, and place them into or pick them up from the world. It allows devices headed by dispensers that are constructed in-game along your regular redstone to:

  • place (or delete) blocks into the world relative to the dispenser
  • place items into a targeted container blocks (like chests or other dispensers)

What's New in VoxelGadget2?

VoxelGadget2 is a complete rewrite of the original VoxelGadget plugin. It retains backwards compatibility with most Gadgets made using the original VoxelGadget while simultaneously allowing new modifiers and other features to be added much easier than before. Over 20 new modifiers have been added and most of the old ones have new features.

VoxelGadget Commands

There are "absolutely no chat commands associated with VoxelGadget"*. It simply runs in the background and allows any dispenser with the correct blocks attached to function in special ways.

  • Tip: Security concerns should be handled by restricting unwanted users from placing or destroying dispensers at all, and/or by restricting the block types that perform special actions (which are configurable).
  • *This is a slight lie, as there is a command designed for advanced Voxel Gadget users. For documentation on this command continue on to the documentation for the 3D Offset Modifier and Blueprints.


Special Blocks

The plugin is activated when a dispenser:

  • Has something inside of it (empty dispensers will not perform special actions)
  • Receives redstone power (in any standard way for a dispenser), AND
  • Has an iron block, a diamond block, or a lapis lazuli block beside it.

Thus, iron, diamond, and lapis lazuli are the first three "special" blocks. Specifically, they are "mode" blocks. One or the other is required next to the dispenser for it to activate as a VoxelGadget. Other modifier blocks go behind the mode block.

  • Tip: It may be helpful to think of this chain of modifier blocks behind your dispenser as a "tail" extending away from the dispenser in the opposite direction to where you will be affecting your world.


Some of the blocks significant to VoxelGadget


Iron Block: Place Mode

An iron block placed next to a dispenser with something in it will cause the dispenser to either: 1) Place a block on the opposite side of the dispenser, if that location holds anything other than a chest or another dispenser
G2 ModePlaceOff.PNG
G2 ModePlaceOn.PNG
2) OR Move an item into the inventory of another chest or dispenser, if one of those containers is in the position where a block would have been placed.
G2 ModePlaceChest.PNG
The dirt block is placed inside of the chest.

Diamond Block: Remove Mode

A diamond block placed next to a dispenser with something in it will cause the dispenser to destroy the block on the opposite side, unless that block is another dispenser or a chest (in which case, nothing will happen).
G2 ModeRemoveOff.PNG
G2 ModeRemoveOn.PNG

Lapis Lazuli Block: Toggle Mode

A lapis block placed next to a dispenser with something in it will cause the dispenser to toggle between placing and destroying the block inside the dispenser. It functions exactly like an iron block except if the block being placed it already in the spot it would be placed it, the block is instead destroyed and replaced with air.
G2 ModeToggleOff.PNG
G2 ModeToggleOn.PNG
G2 ModeToggleOff.PNG

Modifier Block: Offsets

Addition

Different colors of blue wool will cause mode blocks to target blocks further away than just the block immediately opposite the dispenser.

Cyan wool [Wool ink 9] will offset by 1 block:
G2 ModiOff1.PNG

Blue wool [Wool ink 11] will offset by 5 blocks:
G2 ModiOff5.PNG

Purple wool [Wool ink 10] will offset by 10 blocks:
G2 ModiOff10.PNG

Light blue wool [Wool ink 3] will offset by 25 blocks:
G2 ModiOff25.PNG

  • Tip: You can stack modifiers along the tail of the gadget to compound their effects. A cyan wool and a blue wool used together would create an offset of 6 blocks:


G2 ModiOff6.PNG

Subtraction

Grayscale wools (on the Palceon Pack) cause the offset of the dispenser to be decreased by the number specifier, bringing them closer to the Dispenser.

  • Tip: You can use subtraction modifiers to allow smaller tails for your gadget. Without subtraction modifiers, an offset of 24 would require six blocks (Two purple wool + Four blue wool) but with subtraction modifiers it requires only two (One light blue wool + one lime wool).
  • Note: The minimum offset for a gadget is zero and the maximum offset is one hundred. This means that you cannot place blocks behind the dispenser or one hundred blocks or more away from the dispenser.

Lime wool [Wool ink 5, Light gray wool in the Palceon pack] will decrease the offset by one block:
G2 ModiOff-1.PNG

Black wool [Wool ink 15, Shale in the Palceon pack] will decrease the offset by five blocks:
G2 ModiOff-5.PNG

Modifier Block: Inventory Offset

The inventory of the dispenser in the first set of photos.
The inventory of the dispenser in the second set of photos.

Brown wool [Wool ink 12, Crate in the Palceon pack] will override any offset modifiers preceding it in the tail of the gadget. The offset will become the amount of items in the stack that was placed by the Gadget. This allows for offsets ranging from 1 block to 64 blocks (which would normally require five blocks : 25 + 25 + 10 + 5 - 1) can now all be done without the use of lengthy offset modifier trains.

  • Tip: Offset blocks after the Inventory Offset block in the tail of the gadget will continue to adjust the offset of the block. If you want an offset of 65, you can place an inventory offset followed by a cyan wool and have a full 64 stack of the block in the dispenser. 64 + 1 = 65!
  • Tip: You could use the Inventory Offset modifier coupled with the Finite Block modifier to create Gadgets that place blocks a block closer every use.
  • Note: Inventory Offsets cannot add together with themselves. If you have two Inventory Offset blocks, only the first one has any effect.


G2 ModiInventory1.PNG
G2 ModiInventory2.PNG

  • Tip: Each item stack in the dispenser can have a different amount of blocks in it, or the same amount of blocks in it. Using this to your advantage, you could make it so that a gadget would place one block a certain distance away and another block a different distance away, all by using just one modifier.
  • Note: In the following images, the gadget has been run multiple times. This gadget does not place multiple blocks at once.


G2 ModiInventory3.PNG
G2 ModiInventory4.PNG


Modifier Block: Override Block

The inventory of the dispenser in these images.

Red wool [Wool ink 14] signals to VoxelGadget that the next block in the train of modifiers is an "override" block. Whichever block would have been placed by the dispenser is replaced with the block designated by the override. In the following image, the dispenser has dirt in it, but since a stone block is present, the dirt gets overriden and becomes stone instead:
G2 ModiOver1.PNG

  • Tip: Since colored ice and glowstone are only funny client magic, you cannot put the blocks inside the inventory of a dispenser. The same goes for blocks such as redstone and torches that start as an item in the player's hand but become a block when placed. Put these blocks behind the red wool, though and the dispenser will be able to recognize it!

The Override Block and Toggle Mode

If used in conjunction with Toggle mode (a lapis lazuli block), the override block changes its properties. If the override block is used as normal, with the block to be overridden coming after the red wool, then instead of toggling between the block in the dispenser and air, the gadget will toggle between the override block and air.
G2 ModiOverToggle1.PNG
G2 ModiOverToggle2.PNG
G2 ModiOverToggle1.PNG

If you add an extra red wool after the override block, however, the gadget will instead toggle between the block in the dispenser and the override block itself.
G2 ModiOverToggle3.PNG
G2 ModiOverToggle4.PNG
G2 ModiOverToggle3.PNG

Modifier Block: Filter Block

The inventory of the dispenser in these images.

Yellow wool [Wool ink 4] designates a filter block. Much like the override block, whatever block is behind the yellow wool in the modifier tail will become the gadget's "filter." The dispenser will ONLY function (in any way) if the target of the dispenser is the same material and data value as the filter.
G2 ModiFilter1.PNG
G2 ModiFilter3.PNG
G2 ModiFilter3.PNG

  • Tip: If you want to make it so that your dispenser does not overwrite blocks, just add a filter modifier, with air behind it. The dispenser will only place blocks if the target space is empty and then not overwrite whatever is placed.

Modifier Block: Skip Block

White wool [Wool ink 0, Horizontal log in the Palceon Pack] acts just like red wool, except it doesn't override anything. It just skips a spot in the modifier train. This is useful if you need to pass a redstone wire through the modifier train, or if you want to put a piston in the middle of the train to manipulate the modifiers during operation.
G2 ModiSkip.PNG

Modifier Block: Dummy Block

Pink wool [Wool ink 6, Sea-Green in the Palceon Pack] acts similar to a skip block except instead of skipping the block behind it in the tail, the dummy only skips itself. This is useful if you need to switch in and out a modifier from the train, as you can use the dummy block as a placeholder when the modifier with the function you desire is not present.
G2 ModiDummy.PNG

Modifier Block: No Physics Block

Light gray wool [ink 8, Stucco in the Palceon Pack] functions just as the name suggests: it disables physics updates on the surrounding blocks when your gadget modifies the world. This does not, however, let you put blocks in places that they can't normally be, such as a torch floating in mid-air (due to a limitation in Minecraft itself), but you can remove the block the torch is sitting on and the torch will remain in place.
G2 ModiNoPhys1.PNG
G2 ModiNoPhys2.PNG

Advanced Modifier Block: Line Block

  • Note: In order to preserve backwards compatibility with VoxelGadget1, the offset will be increased by one so that there is an empty space between the line and the dispenser. You can negate this by using a -1 offset, though.

Magenta wool [Wool ink 2, Wine wool in the Palceon Pack] designates a line block. Unlike all other modifiers, the Line Modifier (as well as other advanced modifiers) split offsets of the tail into two parts: the change's offset and some parameter useful to the modifier itself. All offset modifiers before the advanced block adjust its special parameter and any after adjust its offset.
In the case of the line block, all offset modifiers before the wine wool adjust the line's length and all offset modifiers after adjust the line's distance from the dispenser (with an extra unit of offset added to preserve compatibility). As said on the warning label, you can negate this automatic adjustment by using a -1 offset.


G2 ModiLine1.PNG
G2 ModiLine2.PNG

G2 ModiLine3.PNG
G2 ModiLine4.PNG

  • Note: The maximum length of a line placed by the Line Modifier is 100 blocks long. This is to prevent excessive lag-causing block updates.
  • Note: The Area and Line Modifiers are incompatible with each other. If you try to use both at the same time, it will instead use whichever was set last in the tail.

Advanced Modifier Block: Area Block

Orange wool [Wool ink 1] designates a line block. Like the Line Modifier, the Area Modifier split offsets of the tail into two parts: the offset of the square and its "radius." All offset modifiers before the advanced block adjust its radius and any after adjust its offset.
The square is placed perpendicular to the tail of the gadget, making the Area Modifier the only modifier to work in all three dimensions, and thus not be able to shown in the same format as for a standard gadget. The following images show a side view in the normal format:
G2 ModiArea1.PNG
G2 ModiArea2.PNG

and the following images show a view of the gadget from in front of the dispenser:
G2 ModiArea3.PNG
G2 ModiArea4.PNG

  • Note: The square is 3x3. The side length of a square generated by an Area Modifier is r + r + 1 and the square is centered on the dispenser.
  • Note: The maximum "radius" of the square is five blocks, which would be an 11x11 square. This is to prevent excessive lag-causing block updates.
  • Note: The Area and Line Modifiers are incompatible with each other. If you try to use both at the same time, it will instead use whichever was set last in the tail.

Advanced Modifier Block: Timer Block

Gray wool [Wool ink 7, Pea wool in the Palceon Pack] designates a timer block. The Timer Modifier causes the gadget to be fired again x redstone ticks (0.1 seconds) after it is originally fired. Like the line and area modifiers, it uses offset blocks to determine its delay. Unlike them, however, only blocks after the timer block affect the delay of the timer.
All offset blocks placed after a timer block adjust the delay. After the gadget is fired, it will be fired again a number of redstone ticks, equal to the delay, later. A redstone tick is equivalent to two regular ticks, thus equaling 0.1 seconds each.

  • Tip: One click on a redstone repeater is equal to one redstone tick. You can use this to synchronize with your gadgets' timers.

G2 ModiTimer1.PNG
The gadget is fired once, the delay is 10.
G2 ModiTimer2.PNG
The gadget is fired again 1 (10 * 0.1) second later.
G2 ModiTimer1.PNG

  • Note: A delay of less than or equal to zero will case the gadget to fire twice in the same tick.
  • Note: The Timer Modifier is compatible with all other modifiers, including the line and area modifiers.

Timer Mode: Skip First

The Timer Modifier normally fires once initially and then again X redstone ticks later but if you add a Skip Modifier anywhere after the Timer Modifier then the Gadget will skip the first trigger of the Gadget and it will instead only fire once after X redstone ticks have passed.

Timer Mode: Delay Extension

If a Gadget with a Timer Modifier is triggered while a Timer is already in progress for that Gadget, a new Timer will normally begin so that there are two delays active at once. If you add a second Timer Modifier anywhere after the first one in the tail of the Gadget then a Gadget will instead start over its in-progress Timer.

Advanced Modifier: 3D Offset Block

Green wool [Wool ink 13] is perhaps one of the most powerful blocks within VoxelGadget. The 3D Offset block requires a block with an inventory (such as a chest, dispenser, or even brewing stand) to be placed behind it in the gadget's tail, much like the override block requires another block placed behind it. The 3D Offset modifier reads the size of the first three slots of the inventory and translates this to an X, Y, and Z offset from the dispenser. Because you cannot have negative Item Stack sizes, 32 is subtracted from the offset. This makes (32, 32, 32) point to the dispenser itself, (64, 64, 64) point to 32 blocks positive on all axes, and (0, 0, 0) point to 32 blocks negative on all axes. The relative location as specified by the values loaded from the chest is set as the target of the dispenser.

  • Note: The 3D Offset disregards all other offset modifiers.
  • Tip: All other modifiers (excluding offset modifiers) function as expected with a 3D offset

The /gadget offset save command

The /gadget offset save command is designed to make is quick and easy to use the 3D Offset Modifier and most of all not have to count out blocks or Items. To use it, you first have to select three points. 'VoxelGadget2 uses the book (item id 340) as a selection tool. The three points you have to select are as the following:

  1. Left-Click the main dispenser of the Gadget you are using a 3D Offset with
  2. Right-Click the block you want the 3D Offset to make the Gadget target.
  3. Shift(Sneak)-Click the inventory-holding block behind the 3D Offset Modifier (Green Wool). The blocks identifying the offset between the main dispenser and the target block will be stored in this block's inventory.

After selecting the blocks for each point, you can run the command and Voxel Gadget will place blocks in the desired inventory representing the X, Y, and Z of the offset.

  • Tip: /gadget offset save will by default use Stone, Dirt, and Grass for the X, Y, and Z offsets (respectively). You can change what blocks are used by adding their Item IDs to the command. For example, /gadget offset save 46 49 89 will save as TNT, Obsidian, and Glowstone instead.


Advanced Modifier: Patch Block

Purple stained clay [Stained clay ink 5] designates the Patch Modifier. The Patch Modifier uses a 3D Offset to target a nearby Patch Block. All Modifier Blocks following the targeted Patch Block will be added to the tail of the Gadget. This allows for the tail of the Gadget to turn in a different direction or continue in a different place, as well as allowing for an infinite number of Gadgets to reference a single set of modifiers.

  • Tip: You can use /gadget offset save with the Patch Modifier with the following selections:
    • Left-Click the Patch Block
    • Right-Click the target Patch Block you want the Gadget to patch into.
    • Shift(Sneak)-Click the Inventory-Holding block behind the Patch Block. The blocks identifying the 3D Offset between the two Patch Blocks will be stored inside this block's inventory.
  • Note: The Target Block of the 3D Offset must be a Patch Block.
  • Note: Check Modifiers inside of a Train Patch are ignored.


Advanced Modifier: Decoder Block

Yellow stained clay [Stained clay ink 5], is recognized as a Decoder block. The decoder block, like the 3D Offset block requires a block with an inventory (such as a chest, dispenser, or even brewing stand) to be placed behind it in the gadget's tail. The Decoder modifier takes the amount in the item stack dispensed and gets the slot in the inventory of the chest that corresponds with that number. For example, if the dispenser dispensed an Item Stack with five blocks in it, the decoder modifier would select the fifth slot of the inventory behind its block. The item contained in the selected slot replaces the original dispensed item and causes the gadget to output that given item.

  • Tip: You can use this with Blueprints to easily create with one dispenser a display that would normally be rather large.

Advanced Modifier: Check Modifiers

The introduction of check modifiers is one of the most powerful new features in VoxelGadget2. Check modifiers run a check that returns either a true or a false which can be acted on using redstone or other gadgets. A Check Modifier has two important blocks: the block that the dispenser is targeting and the block directly following the last block in the gadget's train.

The Gadget's target block will be referenced for each different check modifier's individual expression. The expression will return a true or false. The block directly following the last block in the Gadget's train will then be modified based on the mode of the gadget. If the Gadget is in Place or Remove mode then the block will change to a redstone block (which emits a redstone signal) if the expression returned true and will change to glass if the expression returned false. If the Gadget is in toggle mode, however, the Gadget will pulse a redstone block into existence for a single tick if the expression returned true and will do nothing if the expression returned false.

  • For an in-depth look at each Check Modifier's individual expression, read the following sections.
  • NOTE: If a Check modifier references an inventory within the Gadget itself it will use the inventory of the Gadget's main dispenser UNLESS there is an inventory-holding block following the Check Modifier itself in which case that block will be referenced instead.

Check Modifier: Block Exists

The Check Block Exists modifier [Stained clay ink 9, Sky Blue Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   the block that the Gadget is targeting is not air.


  • Tip: You can convert it to a Block Doesn't Exist modifier by using the Invert Check Modifier.


Check Modifier: Block Equals

The Check Block Exists modifier [Stained clay ink 12, Navy Blue Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   the block that the Gadget is targeting is of the same type as the block dispensed by the dispenser.


Check Modifier: Player

The Check Player modifier [Stained clay ink 10, Royal Red Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   a player is inside the target block.


  • Tip: You can use the Check Player modifier with the Area modifier to check if a player exists in a sphere with that radius around the target.


Check Modifier: Equals (Inventory)

The Check Equals modifier [Stained clay ink 7, Cyan Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   every stack of items contained inside of the Gadget's referenced inventory is also contained inside the targeted inventory. 
   (Both amount and type are taken into consideration.)


Check Modifier: Less

The Check Less modifier [Stained clay ink 15, Magenta Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   every stack of items contained inside of the Gadget's referenced inventory is contained inside the targeted inventory 
   BUT has an amount of less than the stack that was in the Gadget's inventory.


Check Modifier: Greater

The Check Greater modifier [Stained clay ink 2, Wine Shaping in the Palceon Pack] returns true, thus outputting a redstone signal as decided by the mode of the Gadget, if:

   every stack of items contained inside of the Gadget's referenced inventory is contained inside the targeted inventory 
   BUT has an amount greater than the stack that was in the Gadget's inventory.


Advanced Modifier: Invert Check

While not technically a Check Modifier seeing as it doesn't check anything, the Invert Check modifier [Stained clay ink 14, Red Shaping in the Palceon Pack] sets the value of the Gadget to the opposite of what it currently is. This allows you to create Modifiers such a "Check Block Does Not Exist" even though it doesn't exists by combining a Check Block Exists and an Invert Check Modifier.

Advanced Modifiers: Set Inventory, Get Inventory, and Get Block

Documentation soon to be written.

Advanced Modifier: Random Block Modifier

Documentation soon to be written.

Advanced Modifier: Random Number Modifier

Documentation soon to be written.

Special Block Use Cases

TNT

Currently TNT is the only block with a special use case currently bundled with Gadget. When placed from inside the gadget's inventory, the TNT is placed as a PrimedTNT Entity (as if the block had received a redstone signal) which will fall and explode (unless the server has protection). If you would like to use TNT as a block instead of the PrimedTNT entity, place the TNT as an override block in the train instead of as an item in the inventory.

Blueprints

Blueprints are a completely new feature in VoxelGadget2. They allow large structures to be saved as books, nearly identically to how WorldEdit works with Schematics and VoxelSniper works with Stencils, which can be placed inside of Gadgets. The Gadget will then be able to place, remove, and toggle the entire structure saved in the Blueprint.
Documentation soon to be completed.

Why so much of this Documentation is incomplete.

VoxelGadget2 by CalDaBeast

What's new in VoxelGadget2? VoxelGadget2 is a complete rewrite of the original VoxelGadget plugin. It retains backwards compatibility with Gadgets made using the original VoxelGadget while simultaneously allowing new modifiers and other features to be added much easier than before.

Additions in VoxelGadget2 include:

  • Toggle mode
  • A new Addition Offset (10 blocks)
  • Subtract Offset Modifiers
  • Inventory Offset Modifier
  • Dummy Modifier
  • No Physics Modifier
  • Area Modifier
  • Timer Modifier
  • Blueprints (Miniature schematics)
  • 3D Offset Modifier
  • Decoder Modifier
  • Check Modifiers:
    • Check Player (Presence)
    • Check Block Exists
    • Check Block Equals
    • Check Equals
    • Check Greater
    • Check Less
  • Patch Modifier
  • Set Inventory Modifier
  • Get Inventory Modifier
  • Get Block Modifier
  • Random Block Modifier
  • Random Number Modifier
Wow look at all of those features! For in-game information and examples, step through the portal to your right. For full documentation, visit the VoxelGadget2 page on the wiki.