CC: Tweaked

CC: Tweaked

65M Downloads

Generic Peripheral for the Nameable interface

tehgreatdoge opened this issue ยท 1 comments

commented

Overview

The Nameable interface is used by containers and other blocks to display custom names when their menu is opened. Containers can be given names by naming their items in an anvil. This feature request proposes adding a generic peripheral that allows for getting the name of Nameable block entities. This would allow for automatic configuration of newly attached peripherals that have custom names. If this addition were implemented, it may also make sense to make more of CC:T's peripherals Nameable. (This does have the downside of being slightly unintuitive since currently the only peripherals that aren't Nameable are ones that lack menus and thus won't display their names once placed)

Example use cases:

  • Give friendly names to peripherals in a way that doesn't require manually inputting peripheral names or advanced programming skills.
  • Automatically mark inventories as "import buses"
  • Named groups of peripherals such as inventories that are used for a common purpose
    • designating a group of crushers/macerators as being used for ores
  • Creating chests that store a specific item just by naming said chest. Can even include stock levels if a user program allows for something like "minecraft:diamond*64"

With CC:Tweaked's peripherals being nameable

  • Automatically turning monitors named "Storage Interface" into displays of storage information
    • This is also applicable to things such as reactor and stargate monitors
  • Make per-peripheral configuration be done via naming the peripherals

Downsides

  • As with adding any generic peripheral, it may have method conflicts with addons.
  • May be a bit too meta for CC:T
  • May be weird for multiblock peripherals such as monitors.
  • May be too niche
  • Anvils suck
  • Maybe some blocks that previously weren't peripherals will become peripherals after this change. (Should be fairly limited in effect as generally blocks aren't Nameable unless they are containers and containers are already peripherals.)

Additional Remarks

There is a PR (#1114) that previously tried to implement this.
It would be nice to have a system similar to that of SFM instead, but that is out of scope/doesn't quite make sense for how CC:T peripherals currently work

commented

See also #1114.