Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.5] Transparency Render Issue With Entity Layers

Recommended Posts

What I've been trying to do is I have been attempting to implement an item that can create a transparent blue layer around the entire player. I am using Curios' API for this, as the item is meant to be an equippable accessory. There are also other accessories I have implemented to the mod using the API. I have been able to implement everything that handles this rendering with the accessory item, however I've become stuck after running into a specific issue: when the transparent blue layer is active, it will prevent any accessories specifically on the player's arms from rendering.

As far as I can tell, this only happens with the accessories on the player's arms (such as the gloves or even Curios' template knuckles item), as accessories rendering on the player's body for some reason render just fine under the transparent layer. Images for better context:



I have been at this for quite awhile but haven't able to figure out what is causing this issue, especially since the inconsistency between rendering for body parts has made me even more confused. It could be a Curios issue, but nothing in its accessory layer code exactly stands out as a cause (if it is indeed Curios' fault though it would at least be good to know what the issue is to pass on to the mod dev). The pendant and glove accessories both render with the same RenderType and render buffer, which I duplicated based on the vanilla armor layer's choices for that, as the vanilla armor layer is also immune to the transparency issue on the arm model part:


The relevant code for items and renderers can be found below:


- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/pendant/PendantItem.java

- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/PendantModel.java


- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/gloves/GlovesItem.java

- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/GlovesModel.java

Repulsion Shield (the item creating the transparency layer):

- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/misc/RepulsionShieldItem.java

- https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/RepulsionShieldModel.java

and, if necessary,

Curios' Accessory Layer (code not mine, obviously):

- https://github.com/TheIllusiveC4/Curios/blob/1.16.x-forge/src/main/java/top/theillusivec4/curios/client/render/CuriosLayer.java

Any help would be appreciated, as I've run out of ideas for what could be causing this issue and how I could fix it. I can provide more information if needed.

Link to post
Share on other sites

Ended up figuring out the issue, just had to resort to creating a new layer not dependent on Curios to handle the rendering. Also had to make sure to put the code that added the layer to the player into enqueueWork in the event I used, or else the same issue continued happening.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I never had forge before, I am a first-time-installer and installed it, nevest version and still experience it. Changed attack key to LeftCtrl key, not mouse button. How can I fix that there? MC 1.16.5 forge-36.1.17 No attack problems in Minecraft Vanilla version with attack key set to LeftCtrl.
    • Elaborate on "won't open".
    • I have a problem with the installer but it won't open for me from mac and windows....
    • That is one use case, yes. Capabilities attached to "foreign objects" such as the player entity using AttachCapabilityEvent can be used to store data associated with that object.   You're referring to IItemHandler here, one capability. The benefits of using capabilities over directly implemented interfaces on TileEntities (or other objects) are mostly decoupling and code-reuse. Instead of implementing the inventory mechanics from scratch every time you simply create a new ItemStackHandler, which is a ready-made inventory implementation. Additionally, you are not forced to implement the interface yourself, getCapability can return whatever instance you want. It could even delegate to some other tile entity nearby, or whatever.   I think I answered this above already.
    • I use a translator, so I'm sorry if my English is unnatural. Well, as the title says, I'm pretty sure I understand what Capability is, but there are a few things I don't understand. -Is it correct to understand that Capability is for holding arbitrary data by associating it with an object such as a player or TileEntity? -In many cases, it seems recommended to use Capability instead of implementing IInventory when creating a TileEntity with an inventory, why? What are the drawbacks of implementing Vanilla's I Inventory and what are the benefits of using Capability? -Although it overlaps a little with the second question, when implementing Magic Point in Player, of course it is not possible to rewrite the Vanilla Player class, so it is necessary to link the player and Magic Point instance using Capability. I understand that. But should I use Capability for new entity and tile entities as well? Is it even a very simple inheritance of Vanilla's ChestTileEntity?
  • Who's Online (See full list)

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.