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

Cut items do not take on the color of the source block #127

Open
VanessaE opened this issue Aug 23, 2018 · 1 comment
Open

Cut items do not take on the color of the source block #127

VanessaE opened this issue Aug 23, 2018 · 1 comment

Comments

@VanessaE
Copy link
Contributor

Which is to say, if for example I put a node that's been colored red via the engine's "colored itemstacks" feature, assuming of course I've registered that node with the table saw, the cut objects produced by the saw all come out white.

If I had to guess, I'd say the saw is discarding the block's itemstack metadata when creating the cut items in the formspec. If I understand the feature correctly, you just need to copy the "palette_index" key from the source itemstack to the inventory items.

@fluxionary
Copy link

fluxionary commented Jun 15, 2022

cut nodes cannot reflect the original node's color value when using paramtype2 = "color", because they must be rotatable/orient-able (paramtype2 = "facedir"). there is a paramtype2 = "colorfacedir", but this only supports 8 colors.

there's a number of ways to resolve this:

  1. register 32 variants of every shape so as to support cutting all possible colored nodes. i'm not certain how one could break up the palate to make this work right, but so far as i know, it's theoretically possible. however, you'd end up w/ 1550 new node ids for every such source node.
  2. register separate nodes for every possible facedir, and allow them to be colored. this results in only 1176 node ids (or possibly somewhat fewer, if you account for rotations that yield identical shapes).
  3. explicitly throw an error when someone tries to register a node with stairsplus which has paramtype2 = "color" (my preferred solution, and what i'm going with in partial rewrite and major bugfix #191)
  4. deep and breaking changes to the fundamental data structures of the game

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

2 participants