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

Changing item's texture


Recommended Posts


I need to change the texture of some items when its itemstack has a special tag. These are the trident, the shield and the other items rendered with the vanilla ItemStackTileEntityRenderer. I tried to look for the field name of the ItemStackTileEntityRenderer ister in Item.class in order to put my CustomItemStackTileEntityRenderer through reflection but I failed. So how can I achieve this ?

Have a good day.

Edited by Speeds_Arrow
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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

    • Game crashes as soon as i load a chunk with my MineColonies City. https://pastebin.com/VNKgTV4T With forge-39.0.7 works well. Tested on 39.0.20 with the same behaviour (crash).
    • also there is a program called bearded octo nemesis that deobfuscate any .class files(is made for minecraft) but it doesnt work
    • I was intending to port it to 1.16.5 anyways, so yes. I am just porting my base to 1.16.5. All i am here for is to collect a few approaches on how you could achieve this.
    • oh i know that the mod didnt obfuscated the methods, maybe minecraft did, an example is: world.func_numbers or player.func_numbers, this is from a mod called deathnote mod public class DeathNoteGUIGui extends DeathnoteModElements.ModElement { public static HashMap guistate = new HashMap<>(); private static ContainerType<GuiContainerMod> containerType = null; public DeathNoteGUIGui(DeathnoteModElements instance) { super(instance, 5); this.elements.addNetworkMessage(ButtonPressedMessage.class, ButtonPressedMessage::buffer, net.neio.deathnote.gui.DeathNoteGUIGui.ButtonPressedMessage::new, ButtonPressedMessage::handler); this.elements.addNetworkMessage(GUISlotChangedMessage.class, GUISlotChangedMessage::buffer, net.neio.deathnote.gui.DeathNoteGUIGui.GUISlotChangedMessage::new, GUISlotChangedMessage::handler); containerType = new ContainerType((ContainerType.IFactory)new GuiContainerModFactory()); FMLJavaModLoadingContext.get().getModEventBus().register(this); } @OnlyIn(Dist.CLIENT) public void initElements() { DeferredWorkQueue.runLater(() -> ScreenManager.func_216911_a(containerType, net.neio.deathnote.gui.DeathNoteGUIGui.GuiWindow::new)); } @SubscribeEvent public void registerContainer(RegistryEvent.Register<ContainerType<?>> event) { event.getRegistry().register(containerType.setRegistryName("death_note_gui")); } private static void handleButtonAction(PlayerEntity entity, int buttonID, int x, int y, int z) { World world = entity.field_70170_p; if (!world.func_175667_e(new BlockPos(x, y, z))) return; if (buttonID == 0) { Map<String, Object> $_dependencies = new HashMap<>(); $_dependencies.put("entity", entity); $_dependencies.put("guistate", guistate); $_dependencies.put("x", Integer.valueOf(x)); $_dependencies.put("y", Integer.valueOf(y)); $_dependencies.put("z", Integer.valueOf(z)); $_dependencies.put("world", world); WriteProcedureProcedure.executeProcedure($_dependencies); } } private static void handleSlotAction(PlayerEntity entity, int slotID, int changeType, int meta, int x, int y, int z) { World world = entity.field_70170_p; if (!world.func_175667_e(new BlockPos(x, y, z))) return; } } as you can see func_numbers is seen after "something."
    • are you sure you have updated to 1.16.5?
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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