-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Mob names stripped except for specific cases #22
Comments
Hey there, @TTFTCUTS! Thanks for reporting this issue. Unfortunately, I don't really know whether it is possible to solve this issue since there is another issue regarding custom names. Due to the fact that name tags rendring handled by entity's renderers, I have no choice as to dynamically set underlying entity's custom name to player's name and force rendering of entity's name tag. That would guarantee that players would be able to see morphed players' user names. Would that interfere with your mod? If you would get custom name from entityData, then it should solve it, right? |
Good question. I didn't know that there was an alternative way to get the entity name data. I'll give it a try and see. |
By the way, thank you very much for linking your mod! Now I know how to attach a resource pack with ability to detect packs reloading (in Blockbuster, if you would reload texture packs, all textures get purple black checkered! |
It still getting stripped, but I can disable it. |
I'm not seeing anything in the entity data when getting the tag via .getEntityData(), in general, that is - from anything. Possibly a client-side only issue? Edit: I think I might have found what you mean. |
Ok, so if you were to leave it in the data, would it still be retrievable by .getCustomNameTag()? If so, then I'll use that - it has the added effect of eliminating default named mobs from the checks. |
Additionally, by the looks of it you can cancel rendering of specific name tags by listening for a RenderLivingEvent.Specials.Pre and setting it as cancelled for the ones you wish to prevent. |
Alternatively, it would be fine if I could get the name of the player out of the rendered entity somehow so that the changes were based on that, but that means they wouldn't be collectable like the jeb_ sheep etc. Edit: I see that you set the custom name in the update, but I am reading no name when requesting it with .getCustomNameTag() |
Hm, I'm not sure about it, I think if there would be a custom name tag, then you will be, but the name won't be able to be rendered 😂 However that you mentioned the I'll try to figure out how to make player names visible on top of rendered player, and at the same time keep the entity's custom name. |
Well, if you need something to test against, ChickenShades is now uploaded, pending approval, with a dev jar in there too. You'd need to make your own resource pack for it to work though. Also, I can't work out why the entities don't have a custom name set - update is called on the player tick and sets the name if it isn't set, yet when I query the entity it returns empty. |
I'm not sure whether you're talking about the entity being null or |
I meant that the name is null, but I was curious as to why since it was being set here. I guess it must be being wiped between times? |
Entity is set after the first update. How do you access the name, though? You either will need to wait for entity to get set after first update, or use |
The name is accessed per frame by .getCustomNameTag() in a listener catching the event posted from the method called here. At least, that's the order as far as I am aware. |
Yeah, I might set player's name on render special event, but keep custom name to default. I'll need to experiment with it, though. |
@TTFTCUTS I think I got it working, the patch update is coming soon, I'll try to fix other bugs in the issue tracker. Thanks for suggestions! :) |
Nice. I'll give it a try when it's done and see if the issue is fully resolved in all cases. Thanks for looking into this. |
You're welcome! I'm going to release this update either today or tomorrow (as soon as I'll finish with most issues in the tracker). P.S.: your ATG mod rocks! 😄 |
Issue resolved. My only reservation is that the mob name in the morph menu does not include the custom name for the morph, so it can be hard to see which one is selected when the skins are similar. |
Stripping of custom names from mobs prevents any mods which hook entity rendering to add effects based on the mob name from being used as morphs.
I see from the code that all names except for the vanilla special cases are removed. It would be helpful if the others were also left for the aforementioned reason. I've been putting together an little mod (ChickenShades) which was primarily designed for telling players apart by sight in a pack using Metamorph (Vaygrim's Coop Life pack), but the name stripping prevents it from working.
Other mod mobs which are possibly affected include some animal special cases added (I think) by ExU, and possibly the Headcrumbs player copies, though I haven't specifically checked.
The text was updated successfully, but these errors were encountered: