Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add support for MineClone's container groups. #23

Open
ThePython10110 opened this issue Nov 27, 2023 · 1 comment
Open

Comments

@ThePython10110
Copy link

This mod should support MineClone's container groups. This would make it compatible with any containers that support MineClone's hoppers (and therefore most mods that support MineClone).

From MineClone's GROUPS.md:

  • container: Node is a container which physically stores items within and has at least 1 inventory
    • container=2: Has one inventory with list name "main". Items can be placed and taken freely
    • container=3: Same as container=2, but shulker boxes can not be inserted
    • container=4: Furnace-like, has lists "src", "fuel" and "dst".
      It is expected that this also reacts on on_timer;
      the node timer must be started from other mods when they add into "src" or "fuel"
    • container=5: Left part of a 2-part horizontal connected container. Both parts have a "main" inventory
      list. Both inventories are considered to belong together. This is used for large chests.
    • container=6: Same as above, but for the right part.
    • container=7: Has inventory list "main", no movement allowed
    • container=1: Other/unspecified container type

You could do this fairly easily, something like this:

-- This pretty much makes it so that anything that works with MineClone hoppers will
-- automatically work with other hoppers.

hopper:add_container({
	{"top", "group:container=2", "main"},
	{"bottom", "group:container=2", "main"},
	{"side", "group:container=2", "main"},
})

-- The mod already checks the `allow_metadata_inventory_<whatever>` functions, so this works.
hopper:add_container({
	{"top", "group:container=3", "main"},
	{"bottom", "group:container=3", "main"},
	{"side", "group:container=3", "main"},
})

hopper:add_container({
	{"top", "group:container=4", "dst"},
	{"side", "group:container=4", "fuel"},
	{"bottom", "group:container=4", "src"},
})

-- Hoppers will only be able to insert into one side of a double chest (I think); maybe do something about this.
hopper:add_container({
	{"top", "group:container=5", "main"},
	{"bottom", "group:container=5", "main"},
	{"side", "group:container=5", "main"},
})
hopper:add_container({
	{"top", "group:container=6", "main"},
	{"bottom", "group:container=6", "main"},
	{"side", "group:container=6", "main"},
})
@ThePython10110
Copy link
Author

MineClone2 has now changed their container groups to be almost meaningless, and they have a new API system that would be quite a bit harder to port. Mineclonia still uses this system, though. It would be great if both were supported, but if only the container groups are added, that's fine with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant