optifine icon indicating copy to clipboard operation
optifine copied to clipboard

CEM Entity Projectile Support

Open TheVoyde opened this issue 6 years ago • 13 comments

On the CEM document provided here, there is support for numerous entities with many still being added. But a set of entities that have constantly not been supported are the projectiles. These include(I may miss a few) arrows, tridents, potions(splash and lingering), fishing hook, and ender pearls/eyes of ender. All of these except the arrow and trident always face the player so those may not work, but having custom trident and arrow models would be really nice for creators.

TheVoyde avatar Jul 31 '19 02:07 TheVoyde

The missing entities don't use the standard entity models which can be customized. Their rendering is hardcoded in the render classes and each one of them would need a special treatment in order to allow a custom CEM model.

The trident uses the standard model and it can be added.

sp614x avatar Jul 31 '19 08:07 sp614x

Relevant #2634, #1657, #279.

sp614x avatar Jul 31 '19 08:07 sp614x

Okay, thank you for your clarification.

TheVoyde avatar Aug 02 '19 05:08 TheVoyde

Hello, I am also interested in this matter and would like to know where I can find Updates on this. Announcements on whether this will be implemented for optifine CEM, especially for Trident entities

Jkap038 avatar Aug 18 '19 07:08 Jkap038

does this mean we can custom trident projectiles?

Locxes avatar Dec 04 '19 07:12 Locxes

edit:" I searched a bit and found a shader that enables the transparency here https://bugs.mojang.com/browse/MC-164001?jql=text%20~%20%22trident%20transparency%22

I still have the issue however of the item in hand not changing the texture when applying a name to it via an anvil. I have tried adding custom textures via random mobs but I guess the name is stored differently there so renaming in an anvil doesn't really apply the name to be recognized by random mobs? Would there be a way to connect the name given by the anvil to be recognized by the random_entity file so I can change the texture of the renamed trident, held in hand, to the one the item has? Here is what the result is currently where the item is renamed and changed its texture and the model in hand is just the unchanged entity texture (even tho I added random entity properties that have the same name to load a different texture) image "

Would it be possible to enable transparency for the trident projectile model considering you hold the "projectile" in your hand changing the item texture via cit results in a widely different looking result than expected (in the past that wasn't a problem ofc since the handheld item used the same rendering as the item itself image this is what it looks like currently when adding a custom model to the trident. or is there a way to do this already that I didn't see yet?

Monsterfisch avatar Dec 25 '21 23:12 Monsterfisch

Changing the item texture for the trident is done through CIT, while the in-hand model is an entity. I'm assuming you've set the trident CEM file to reference the trident item texture, so there must be some disparity between how the changing item texture affects different models. Using random or mob wouldn't work since the trident entity doesn't hold a custom name, it has NBT data that represents the item's NBT data including its name. The only fixes would be for entity textures to be changeable from NBT data, or for CIT to change the root texture for the item (I'm not entirely familiar with all of the texture and modeling mechanics of the game so forgive me if I've made incorrect statements or assumptions).

TheVoyde avatar Dec 29 '21 00:12 TheVoyde

You are about right in that yes. However, I did a test and it seems like the trident doesn't seem to have random entity support, to begin with? (tried assigning a random texture to it and it didn't show up) might be worth looking into that and then also make sure to make it connect with the cit in a way so that it works together considering it is a special case where an item is also an entity etc.

Monsterfisch avatar Dec 29 '21 02:12 Monsterfisch

Are custom named trident models available to work with currently? If yes, is there any examples out there that connects the cem .jem file with the .properties files?

Destroyer0201 avatar Apr 17 '22 05:04 Destroyer0201

I still have the issue however of the item in hand not changing the texture when applying a name to it via an anvil. I have tried adding custom textures via random mobs but I guess the name is stored differently there so renaming in an anvil doesn't really apply the name to be recognized by random mobs? Would there be a way to connect the name given by the anvil to be recognized by the random_entity file so I can change the texture of the renamed trident, held in hand, to the one the item has? Here is what the result is currently where the item is renamed and changed its texture and the model in hand is just the unchanged entity texture (even tho I added random entity properties that have the same name to load a different texture) image "

I see we were hoping to the exact same thing, though your Lance of Longinus looks way better than mine, hope this issue can be resolved soon so that I can hopefully get your version of your ressourcepack, as it will probably look cooler lol. Sadly I doubt that would be possible unless there's a big revamp when it comes to projectile entities, like we're hoping for... be it minecraft side or optifine side

0Smanthus-0Smium avatar Jun 11 '22 19:06 0Smanthus-0Smium

Hello, is it possible to change the texture of a trident via CEM based on name yet? I tried using random entities and it didn't work.

mybe avatar Nov 11 '22 23:11 mybe

Added CEM support for arrow and spectral arrow.

sp614x avatar Mar 21 '24 21:03 sp614x

the other mentioned projectiles actually use the block/item model

ewanhowell5195 avatar Sep 13 '24 11:09 ewanhowell5195