Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Minecraft Forge
  • Support & Bug Reports
  • Client sided optifine like CIT implementation
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
FloweyTF

Client sided optifine like CIT implementation

By FloweyTF, January 9 in Support & Bug Reports

  • Reply to this topic
  • Start new topic

Recommended Posts

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 9

Background:
I am writing a mod for all things hypixel. When it come down to hypixel skyblock, it adds a large number of custom weapons and such.

Anyways, the main question is: How do I write a client-sided mod that changes the texture of an item given its name?

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 9

Item textures are controlled my models, which are controlled by resource packs (mods are also resource packs).

If you really just want to change the texture, there is no reason to make a mod, you can just make a resource pack. If you need custom model rendering, you need a custom model loader as well.

  • Quote

Share this post


Link to post
Share on other sites

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 9

No, its not the only reason for this mod, its just a feature. Is there any way I can code it so that it works like this?

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 9

I already told you what you need to do. Have you tried anything?

  • Quote

Share this post


Link to post
Share on other sites

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 10
7 hours ago, diesieben07 said:

I already told you what you need to do. Have you tried anything?

I dont really know what to do

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 10

Put whatever models / textures you want to override with your mod in src/main/resources and then the same path they have in vanilla Minecraft.

Tada, you have changed a vanilla texture with your mod.

  • Quote

Share this post


Link to post
Share on other sites

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 10

Well, I know that much. However, it doesn't allow the item texture to be changed dynamically based off of the item name

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 10
1 hour ago, FloweyTF said:

Well, I know that much. However, it doesn't allow the item texture to be changed dynamically based off of the item name

You need a custom model loader which changes the model based on the item name then. 

  • Quote

Share this post


Link to post
Share on other sites

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 12

Do you have some example code that I could look at?

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 12
12 minutes ago, FloweyTF said:

Do you have some example code that I could look at?

Forge has a "separate-perspective" model, which allows you to embed several models based on perspective: https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/main/java/net/minecraftforge/client/model/SeparatePerspectiveModel.java. You can do something similar but allow embedding models based on item name.

  • Quote

Share this post


Link to post
Share on other sites

FloweyTF    0

FloweyTF

FloweyTF    0

  • Tree Puncher
  • FloweyTF
  • Members
  • 0
  • 10 posts
Posted January 12

does it have to implement IModelGeometry?

  • Quote

Hello i am dead

Share this post


Link to post
Share on other sites

diesieben07    7621

diesieben07

diesieben07    7621

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7621
  • 55263 posts
Posted January 12

Yes, IModelGeometry is the forge version of an "unbaked" model, i.e. just the model data loaded into memory. This will then be baked into a BakedModel, which is basically just a list of quads to be uploaded to the GPU.

  • Quote

Share this post


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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • domi0908
      fix hitbox red baby mobs version forge

      By domi0908 · Posted 10 minutes ago

      fix baby mobs hitboxes red raised up          no villager baby no villager zombie baby strider baby wolf baby sheep baby pig baby ozelot llama baby chicken baby cow
    • diesieben07
      "Reflections" Documentation?

      By diesieben07 · Posted 23 minutes ago

      A good way to do this is to simply store a RegistryObject in a static final field using its of factory method.
    • diesieben07
      [1.15.2] Recipes don't work

      By diesieben07 · Posted 28 minutes ago

      Post debug.log and a Git repo of your mod.
    • diesieben07
      Modded server loading as vanilla server.

      By diesieben07 · Posted 29 minutes ago

    • diesieben07
      'Shutting down internal server'

      By diesieben07 · Posted 30 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • domi0908
      4
      fix hitbox red baby mobs version forge

      By domi0908
      Started Tuesday at 03:04 PM

    • SleepyCatGuy
      2
      "Reflections" Documentation?

      By SleepyCatGuy
      Started 7 hours ago

    • sixze
      1
      [1.15.2] Recipes don't work

      By sixze
      Started 1 hour ago

    • huskies709
      14
      Modded server loading as vanilla server.

      By huskies709
      Started November 26, 2018

    • aryagon
      1
      'Shutting down internal server'

      By aryagon
      Started 10 hours ago

  • Who's Online (See full list)

    • Sterling00
    • Kapibara1
    • DavidQF555
    • davidsks09
    • diesieben07
    • WildZora
    • Rinowie
    • xd_Tim_dx
    • QWERTY 52 38
    • Zemelua
    • Yuqera
    • zOnlyKroks
  • All Activity
  • Home
  • Minecraft Forge
  • Support & Bug Reports
  • Client sided optifine like CIT implementation
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community