CC: Tweaked

CC: Tweaked

57M Downloads

Use Minecraft Nametags to set a peripherals network name.

Jason-c-o opened this issue ยท 4 comments

commented
  • When a peripheral or computer is connected to a network, it is connected using a name set by the user with a name tag. Eg instead of minecraft:chest_7 it will appear is cobbleChest

  • Some rationale/use case for a feature: You could move a peripheral to a new network and as long as the programs use the same name it would just immediately function . You wouldn't have to wrap them in every single program; you could just do nameTag.method()

  • Alternative: Allow aliasing to set an NBT data tag that is remembered across networks. For things like monitors, if one computer gives it an alias let it be known by that alias by all computers on the network automatically. networkAlias.method()

No more manually finding and wrapping each and every peripheral unless necessary.

commented

You could just use the set command and the settings API for letting the user specify the peripherals.

commented

You could just use the set command and the settings API for letting the user specify the peripherals.

Aren't settings unique to each computer? How would that help?

The idea is to have a peripheral, plug it into a network, and its already named. Like IRL my phone is "Jason's Phone" on any network it appears. A persistent network ID, like computers have persistent IDs.

commented

One solution would be to have a generic peripheral method called something like name() that takes an INameable and returns the custom name if it exists. Then, peripherals and chests and whatever that are named in an anvil can have their names queried. I included this in a pull request on the fabric port (see addition to InventoryMethods.java in commit f6a26f7) It probably shouldn't be merged into the fabric port until something of the sort is implemented here. The downside is you still have to query the name of all the available peripherals to find the one you want. So the solution is still a bit tedious for testing things in interactive interpreter sessions but isn't a big deal in scripts.

A solution that allows truly arbitrary names to be used directly as peripheral IDs would have to handle collisions somehow. (This is why that "_#" is added to every peripheral automatically.)

commented

Related: #78.

Edit: Woops, wrong button.