Posted July 30, 20178 yr Hello, do the thing which you can change in the game(creates a new stack and change certain data). I want to do to you during the game to replace the path to textures/models without rejoining the game. Earlier in 1.7 this can be done using the IItemRenderer, but now I don't see a solution. Code 1.7 - icon: @SideOnly(Side.CLIENT) public final class IconRenderer implements IItemRenderer { public static final IconRenderer INSTANCE = new IconRenderer(); @Override public boolean handleRenderType(final ItemStack item, final ItemRenderType type) { return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON; } @Override public boolean shouldUseRenderHelper(final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper) { return false; } @Override public void renderItem(final ItemRenderType type, final ItemStack stack, final Object... data) { GL11.glPushMatrix(); final Tessellator tess = Tessellator.instance; final EntityLivingBase entityliving = (EntityLivingBase) data[1]; final IIcon icon = entityliving.getItemIcon(stack, 0); final float tickness = 0.0625F; ItemRenderer.renderItemIn2D(tess, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), tickness); GL11.glPopMatrix(); } } How is this done?
July 30, 20178 yr You can do it the same way as a resourcepack would. Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
July 30, 20178 yr Author 28 minutes ago, Kokkie said: You can do it the same way as a resourcepack would. And even if NBT will indicate a new path to textures?
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.