Tiny Redstone

Tiny Redstone

11M Downloads

[Enhancement] allow each cell/cover accept a right click with a item

lublak opened this issue ยท 3 comments

commented

Currently it is complete hardcoded.

That is okay:

https://github.com/dannydjdk/Tiny-Redstone/blob/master/src/main/java/com/dannyandson/tinyredstone/blocks/PanelBlock.java#L357
https://github.com/dannydjdk/Tiny-Redstone/blob/master/src/main/java/com/dannyandson/tinyredstone/blocks/PanelBlock.java#L360

But it would be nice to have a method on each cell and cover thats accept a right click item.

  1. for plugins this would be very advantageous
  2. camouflage blocks could be a thing
commented

Also, the player entity and/or hand should be passed to the cell on activate, so it can query the player's hand.

commented

IPanelCell interface's onBlockActivated now passes PlayerEntity. I opened another issue (#69) for the covers. I'm closing this as I believe it is sufficiently addressed now.

commented

We do have the onBlockActivated method in the IPanelCell interface. Only the color selection is hardcoded to allow all IColorablePanelCell components to share the same code. The second link is for coloring the panel itself.
We could improve this by allowing onBlockActivated to be able to indicate whether or not the event was handled to allow more varied conditional handling.
As for camouflage, I'm not sure the best approach would be to allow interaction with the cover. That seems a bit confusing. Perhaps simply crafting the cover with a block causes the cover to take on that block's texture. Then, you would just install the textured cover the same way you do now. That's probably more in line with how people are used to doing it with other mods.