Add hardcoded entities and player_cape (#1327)

This commit is contained in:
Eclipse-Sol authored and GitHub committed 2026-01-30 14:53:26 -08:00
1 parent 74843cb1f9
commit 90eabb5d40
17 files changed
+503 -357

No files matched your search

@@ -0,0 +1,33 @@
package net.coderbot.iris.uniforms;
import net.minecraft.item.ItemStack;
/**
* Helper class to manage the currentRenderedItem ID uniform.
*/
public class ItemIdManager {
/**
* Set the item ID for an armor piece or held item.
* If the ItemStack is null/empty, resets to 0.
* Otherwise, looks up the material ID and sets it.
*
* @param itemStack The armor or item being rendered
*/
public static void setItemId(ItemStack itemStack) {
if (itemStack == null || itemStack.getItem() == null) {
CapturedRenderingState.INSTANCE.setCurrentRenderedItem(0);
return;
}
int id = ItemMaterialHelper.getMaterialId(itemStack);
CapturedRenderingState.INSTANCE.setCurrentRenderedItem(id);
}
/**
* Reset the item ID to 0.
* Used when entering/exiting render sections or before glint rendering.
*/
public static void resetItemId() {
CapturedRenderingState.INSTANCE.setCurrentRenderedItem(0);
}
}