Community listing page, reviews may not be monitored by the author.
CC: Bundles
No reviews yet
Allows CC: Tweaked turtles to equip and use vanilla Minecraft bundles.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Must be installed on both the client and the server.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
CC:Bundles
CC:Bundles allows CC:Tweaked turtles to equip and use vanilla Minecraft bundles as inventory peripherals.
- Regular bundles + all 16 dyed variants
- Preserves bundle color and contents when equipped/unequipped
- CC:Tweaked-style inventory API
- Bundle capacity utilities
bundleCostitem information- Direct access to the turtle's inventory
- Dump bundle contents into the world
API
| Method | Description |
|---|---|
size() |
Number of unique item variants |
list() |
List bundle contents |
getItemDetail(slot) |
Detailed item info, including bundleCost |
getItemLimit(slot) |
Item limit for a virtual slot |
pushItems(toName, fromSlot [, limit [, toSlot]]) |
Move items out of the bundle |
pullItems(fromName, fromSlot [, limit [, toSlot]]) |
Move items into the bundle |
slotsFull() |
Used capacity out of 64 |
slotsFree() |
Remaining capacity out of 64 |
dump() |
Dump all contents in front of the turtle |
Inventory methods follow the conventions of CC:Tweaked's generic inventory peripheral.
Using a Bundle
Once equipped, wrap the bundle as a peripheral:
local bundle = peripheral.wrap("left")
or:
local bundle = peripheral.wrap("right")
Virtual Slots
Bundles do not have fixed inventory slots.
Each unique stored item variant is exposed as a virtual slot:
{
[1] = {
name = "minecraft:oak_planks",
count = 12
},
[2] = {
name = "minecraft:diamond",
count = 3
}
}
Items with different components or stored data are separate variants.
Virtual slot numbers may change when contents change.
size() returns the number of current virtual slots, not a fixed inventory size.
bundleCost
getItemDetail(slot) includes:
bundleCost
Capacity used by one item:
64-stackable item = 1
16-stackable item = 4
non-stackable item = 64
Example:
local item = bundle.getItemDetail(1)
print(item.name)
print(item.count)
print(item.bundleCost)
CC:Bundles also adds bundleCost to:
turtle.getItemDetail(slot, true)
The second argument must be true.
local item = turtle.getItemDetail(4, true)
if item then
print(item.bundleCost)
end
This can be used with slotsFree() to determine how many items will fit:
local item = turtle.getItemDetail(4, true)
if item then
local maxFit = math.floor(bundle.slotsFree() / item.bundleCost)
bundle.pullItems(
"turtle",
4,
math.min(item.count, maxFit)
)
end
Moving Items
pullItems() moves items into the bundle:
bundle.pullItems(fromName, fromSlot [, limit [, toSlot]])
pushItems() moves items out of the bundle:
bundle.pushItems(toName, fromSlot [, limit [, toSlot]])
Both return the number of items moved.
Turtle Inventory
Turtle slot 4 → bundle:
bundle.pullItems("turtle", 4)
At most 8 items:
bundle.pullItems("turtle", 4, 8)
Bundle slot 1 → turtle:
bundle.pushItems("turtle", 1)
Into turtle slot 6:
bundle.pushItems("turtle", 1, 8, 6)
Other inventories use their normal peripheral names.
Bundle Capacity
bundle.slotsFull()
bundle.slotsFree()
Both use Minecraft's actual bundle capacity rules.
bundle.slotsFull() + bundle.slotsFree()
always equals:
64
Dumping Contents
local count = bundle.dump()
dump():
- Dumps the entire bundle in front of the turtle
Example: Find an Item
for slot, item in pairs(bundle.list()) do
if item.name == "minecraft:diamond" then
print(slot, item.count)
end
end
Documentation
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources