CIT Resewn

CIT Resewn

14M Downloads

Enchantment Check for Tridents? [Enhancement]

JuceInUse opened this issue ยท 7 comments

commented

Hey! I really like this mod, it was one of the first Optifine Replacement mods I ever discovered. I thought one thing that might be really good for it is if there was an enchantment check for tridents, which would also give it a leg up on its Optifine counterpart. I was talking to Traben (Creator of ETF) about it and they said you would be free to use their source code for a reference if you needed to!

commented

One of the issues with tridents is that the server side doesn't sync down the item from trident entities so simply put the client doesn't have the ability to apply cit stuff to trident entities.

With all that said however, I do have a plan for a workaround that might work and it's already planned.

For now though I'm closing the issue as it's already a planned feature in the Future Plans column here:
https://github.com/SHsuperCM/CITResewn/projects/1#card-75934192

commented

To be fair, it is a datapack because it applies the names to the tridents AFTER they're thrown, but I just mean like how does the enchantment glint show up if it doesn't send it to the client? Or did you mean more that you couldn't get all the info that you wanted

commented

Sorry, I am just genuinely confused as to how some of this works

commented

Really? If enchantments aren't sent client-side, how come enchanted trident entities have an enchantment glint and if you asign them a name Optifine lets you customize the textures? For reference, here's a datapack called "Visual Tridents" I helped make as an add-on to Siscu's Visual Enchantments
image

commented

Can you send me the pack? in my testing I couldn't get the item out of the trident in the item.

commented

Oh wait Visual Tridents nvm

commented

Ohhh, just opened the datapack, it's like you said, it changes the trident entity's name to match its enchantments.

execute at @e[tag=VEC,tag=!VEI,tag=!VEL,tag=!VEM,tag=!VEU,tag=!VEV,tag=!VEChecked] run data merge entity @e[sort=nearest,limit=1,type=trident] {CustomName:'{"text":"VE_C"}'}

Entity names are sent to the client.

About the general enchantment glint, the server only sends the "is enchanted" property to save on networking since that's the only extra thing vanilla clients need from trident entities.