Deployer Train Renaming #576
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #575 (Partially)
This pull request partially resolves issue 575 for automatic renaming of trains.
It allows deployers to copy a train's name when holding a blank nametag and write to the train's name when the nametag held by the deployer has a custom name.
I've elected not to add the washing recipe as i'm not convinced this is the best solution balance wise. I'm open to suggestions as to how this could be done better. But for now it can very easily be achieved with a simple datapack.
There's also a few issues with the pull request itself.
Mainly that the mixin injection for the deployersNameTag method is currently injecting at
HEAD
instead of at the second use of theonBlockEntityUse
method call from the base. this is because this mixin injection didn't seem to work with the built jar that gradle outputs, even though it works perfectly with the built in client that can be launched through the IDE.Help is welcome.
I'd be happy to make any adjustments if needed and wouldn't be disappointed or angry if this ends up not getting merged as i didn't wait for an official go to start coding this feature.
Worst case scenario, I had some fun coding the feature and learnt some new skills.