Jump to content

Recommended Posts

Posted

i want to make a 3d item model, i already have the model, the texture and the tool class but i dont know where to start on making the model for the item in game appear. anyone know how to make a 3d tool that renders when held and dropped?

Posted

also i want to make a tool procedurally generated when crafted, like starbound tools are randomized. for example you craft a pickaxe from a single recipe, and a random one comes up, randomized textures random enchants (if lucky) and maybe random names from a list of words EDIT: and you can find really rare ones in dungeon chests and rare mob drops

Posted

Override Item.onCreated for the latter. It is called when an item is pulled out of the crafting or furnace result slot. You get the Itemstack to modify to your liking

not sure what you mean by that.... and im not sure if you understood, i meant one crafting recipe for multiple items, but only one. kind of like tinkers construct tool building but completely random with specific materials. for example, i make a pickaxe recipe with sticks and a custom material, the recipe chooses from a random set of parts, like one of 5 different handles and one of 8 different pickaxe heads. and makes up a name based on a list of words

 

 

EDIT: i got the item model in the game, but it wont load the texture, its invisible. it thinks theres no texture in the path when i put the texture in the path

Texture code:

 

	public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
	switch(type){
	case EQUIPPED_FIRST_PERSON:
	case EQUIPPED:
		GL11.glPushMatrix();
		Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(EtherealStrings.modid, "textures/models/EMMModelTex.png")); 

		GL11.glTranslatef(-6.0F, 11.0F, -0.5F);
		GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);

		ModelTool.render((Entity)data[1], 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f);

		GL11.glPopMatrix();
	default:
		break;
	}

 

Texture load error:

 

[18:08:56] [Client thread/WARN]: Failed to load texture: Ethereal:textures/models/EMMModelTex.png

java.io.FileNotFoundException: Ethereal:textures/models/EMMModelTex.png

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:71) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) ~[simpleTexture.class:?]

at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]

at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) [TextureManager.class:?]

at net.Ethereal.main.ItemRenderEMM.renderItem(ItemRenderEMM.java:44) [itemRenderEMM.class:?]

at net.minecraftforge.client.ForgeHooksClient.renderEquippedItem(ForgeHooksClient.java:232) [ForgeHooksClient.class:?]

at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:86) [itemRenderer.class:?]

at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:511) [itemRenderer.class:?]

at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:797) [EntityRenderer.class:?]

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1437) [EntityRenderer.class:?]

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) [EntityRenderer.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

 

 

Texture path in windows:

Cp5dSD4.png

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.