Jump to content

[1.8] Texture an item WITHOUT needing a model


benloz10

Recommended Posts

I just started modding Minecraft 2 days ago, with a little teeny bit of experience behind me.

I already have the Proxies set up, an item created (ingot) , a block (ore) that smelts into the ingot. Im wanting a 2D texture just like everything else in minecraft, and in tutorials it used to be simply add setTextureName() now I can't find anything not talking about creating a model and making a .json file for it. I think it's a bit much to create a model and everything for an Ingot. I need to know if there is still a way to simply texture an item without a model. And if so, how.

Link to comment
Share on other sites

Your misunderstanding 1.8 models. Every single item uses a model, even the ones with just textures. Look at the iron ingot model JSON - it uses the built-in / generated model (all models using the texture as the model should use this). Copy the iron ingot JSON and rename everything. Register it to the ItemModelMesher in FMLInitializationEvent on the client to your item. Provide the given texture listed in the JSON. You can watch tutorials on this, but it should be very straight forward.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Link to comment
Share on other sites

Thank you, so if i decide to create an item not shaped like a default minecraft item, i assume i would need to create my own. Not a problem as long as i find a good program for doing such a thing.

 

EDIT: Just re-read your post. So the .json for the iron ingot automaticaly forms to the texture? if so thats pretty nice.

Link to comment
Share on other sites

Correct. When Minecraft bakes your built-in / generated model, it automatically forms to your texture and adds width to the model so that it isn't just a plane. For creating 3D item models, I strongly recommend MrCrayfish's Model creator, and also TheGreyGhost's item in-game transformer - that allows you to position any model in-game with an easy user interface. Those two tools allow you to use the new rendering system and make 3D items (even complex models) just as you did in Techne in  prev-1.7.10.

 

.JSON Model Creator

www.mrcrayfish.com

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Link to comment
Share on other sites

If you're willing to let something be shaped like a vanilla object, then you often don't even need to copy its model. See if it uses a parent independent of texture. If so, then you can refer to the same and put your own texture(s) on it.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

If you're willing to let something be shaped like a vanilla object, then you often don't even need to copy its model. See if it uses a parent independent of texture. If so, then you can refer to the same and put your own texture(s) on it.

 

You can only copy 4 things on a model in JSON - parent model, texture, elements, and transform. Copying "built-in/generated" is not making a model look like the model you copied it from - built-in / generated tells Minecraft to bake your model with the given texture by providing the needed baked quads (elements) for you with added width so that your item is not a plane like element with a texture. The reason I say copy the iron ingot model is because it uses built-in / generated, but mainly because he needs the transforms there (unless he wants his own). All you would need to do is rename the texture and provide your modid (path to your texture). Usually, all vanilla built-in / generated models use the same transforms , excluding tools / weapons, etc.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Link to comment
Share on other sites

Alright, i understand the .json files more now. I assume i can cooy the json file for different 2D items and rename it and the texture and it would work. Also, i managed to texture a block as well. Just some troubles trying to get different textures on different sides (its a grass block) as it doesnt seem to be as simple as changing "all" to "top" and adding "sides" "bottom" (or even with "particles" and "overlay") as it reverts to purple and black.

Link to comment
Share on other sites

Alright, i understand the .json files more now. I assume i can cooy the json file for different 2D items and rename it and the texture and it would work. Also, i managed to texture a block as well. Just some troubles trying to get different textures on different sides (its a grass block) as it doesnt seem to be as simple as changing "all" to "top" and adding "sides" "bottom" (or even with "particles" and "overlay") as it reverts to purple and black.

 

You are wanting a multi-textured block. This is all handled in your block model .JSON. Check out MinecraftByExample by TheGreyGhost on GitHub, showing you how to use different textures based on different sides. Just rename the .JSON to your needing (name, modid, texture paths). Here's the link:

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/resources/assets/minecraftbyexample/models/block/mbe01_block_simple_model.json

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.