Capsule mod for Minecraft 1.8
for use with Forge 1.8-11.14.3.1493 or compatible
This mod allows you to capture a region containing any blocks or machines, then deploy and undeploy it at will. It is inspired by Dragon Ball capsules.
Basics
Items and blocks
Capture Base
Used for the initial capture. You'll be able to capture the region on the top of it. Place it somewhere under what you want to capture, or in a free space and build on top of it.
"Capture Base" recipe
Empty Capsule
Capture the zone defined by the capture base, the capture zone will be visualized when holding the Empty Capsule.
Usage : throw the activated capsule against the zone to capture.
- Right click : activate
- Right click (or drop button) while activated : throw the capsule.
"Iron Empty Capsule" recipe, capture size : 3x3x3
"Gold Empty Capsule" recipe, capture size : 5x5x5
"Diamond Empty Capsule" recipe, capture size : 7x7x7
Unlabeled Capsule
Once the content is captured, the capsule can be deployed or undeployed at will.
Note that all the capsule can be died (affect the label color).
Usages :
- Deploy : Right click once to activate, right click again (or "drop") to throw the capsule and deploy where is collides.
- Undeploy : Right click the "Deployed" capsule and the content will be stored again into the capsule.
- Label : Sneak + Right click to open the label editing screen.
Recovery Capsule
One-use capsule that can retrieve the content of a referenced capsule.
Can be used to backup a capsule and retrieve the content in case of lost.
The content of the original capsule will be emptied.
"Recovery Capsule" recipe
Enchantment
This mod adds a unique enchantment : Recall.
Cost : 1 level.
Max : Recall I.
Effect : Whenever a recall enchanted item is dropped and touches the ground, it come back into the thrower inventory after a last update.
Immediate recall when in contact of water or lava (prevent burning).
This enchant is of courses intended to be used on capsules. Without this enchantment you have to pick up the thrown capsule manually.
It can as well be applied by default (configurable) on any enchantable item. Can be usefull to fight against inventory dropping monsters of to prevent unintentional drop.
Demonstration
Safety first
If you lose your capsule, the content might be lost forever.
To avoid this, here are a few safety tips for you :
- create a recevory capsule and keep it in a safe place;
- enchant your capsule with Recall I to avoid to fall into lava or in an unaccessible pit;
- as a final workaround, you can use in creative mode the "Creative player2capsule teleporter". Right click to TP to the capsule special dimension, Right clic kagain to come back.
Modpack makers
I got a few things for you :
- The mod is shipped with 3 sizes of capsules (3x3x3, 5x5x5, 7x7x7) but you can create custom capsule recipes using you favorite recipe injection mod by configuring it's meta + NBTCompoundTag.
- This includes a special "Reward" mode, wich is basically a one-use capsule that duplicate source content. The content will not be teleported but duplicated : several identicial reward caspules can be used by players to retrieve the reward.
How to - quick customization
Create a custom capsule by exemple
Tip: you can convert RGB color hexa using
http://www.binaryhexconverter.com/hex-to-decimal-converter. ex: FF0000 will give you the decimal value for red (16711680).
# 17x17x17 black Empty Capsule with Recall I
/give @p capsule:capsule 1 0 {color:0, size:17, ench:{id:101,lvl:1}}
# 9x9x9 green labeled, black Empty Capsule, named "Redstone Capsule". Label and name will appear once some content is captured.
/give @p capsule:capsule 1 0 {color:16711680, size:9, label:"Redstone", display:{color:65280}}
# 69x69x69 black labeled, white Empty Capsule with Recall I. Label will appear once some content is captured.
/give @p capsule:capsule 1 0 {color:16777215, size:69, ench:{id:101,lvl:1}, display:{color:0}}
Create a reward capsule
- Spawn or craft an empty capsule (exemples of custom empty capsule in the previous paragraph)
- Capture content on a capture base
- Craft a Recovery capsule using your capsule and a glass_bottle
- With the Recovery capsule in hand, use the command /capsule isReward true
If it worked, the capsule should be name "One Use <label> Capsule". Use this item as reward.
Capsule item full documentation
Capsule item id : "capsule:capsule"
Capsule item Meta:
- 0 - Empty capsule (The state you want to use in the first place for a custom capsule with standard behaviour)
- 5 - One-Use Empty capsule (The state you want to use in the first place while creating for a custom recovery or reward capsule with one-use behaviour)
Capsule item other Meta, for information :
- 1 - Empty-Activated capsule (internal state, do not create capsule with this state)
- 2 - Linked capsule (means that the capsule has a content, use only if you know what you are doing)
- 3 - Deployed capsule (means that the capsule has a deployed content, use only if you know what you are doing)
- 4 - Linked-Activated capsule (internal state, do not create capsule with this state)
- 6 - One-Use-Activated capsule (internal state, do not create capsule with this state)
Capsule NBTTagCompound :
{
color,
#Color of the capsule material. Will affect capsule item color and capture preview wireframes color. RGB 24 bits integer. Ex: 16711680.
size,
#Size of the capsule, must be an odd number between 1 and 69 included. There is a hard limit to prevent numbers higher than 69 and even numbers. ex: 17.
label,
#Label of the capsule. The capsule will indicate "Unlabeled" in the name if not existing, or will use the value otherwise. Ex: "AnytimeLadder".
ench: { # Vanilla enchant format for items (compound tag with id and lvl). 101 is the Recall enchant and it has only one level.
id: 101,
lvl: 1
},
display: { # Vanilla way of indicating a died item. Color of the label. Will affect capsule item label color only. RGB 24 bits integer. Ex: 16711680.
color
},
oneUse, # If the capsule should be destroyed once deployed. If true, the capsule will be considered as a Recovery capsule. 0 or ommited for false, 1 for true.
isReward # If the capsule should deploy a duplicated content. If true, the capsule will be considered as a Reward capsule. Won't work if the capsule is not oneUse as well. 0 or ommited for false, 1 for true.
}
Other Tags are used as internal state. To have them properly created on your item, you should simply always spawn an empty capsule, then have it in the state you want by using it (capturing, deploying, etc.).
FAQ
Can I use in my modpack ?
Yes, please simply give a link to this page and mention
Lythom as the mod author.
Is this open source ?
Yes, there :
https://bitbucket.org/Lythom/mccapsule.
License :
http://creativecommons.org/licenses/by/3.0/.
License TLDR : No guarranties, for legal use only, give proper credit, indicate if and what changes were made.
Pull request are welcome if it fits the capsule feature, but please notify me by PM before coding so that I give you a direct feedback on the PR acception chances.
Will there be new features ?
I plan to add more configuration options (
ie. overridables and forbidden are currently hard coded).
You can make suggestions, be aware that I intend to keep the mod as simple and essential as possible.