Jump to content

[1.10.2] Model Item loose textures when picked up


Dustpuppy

Recommended Posts

Hi again,

it's me...the learner :D

 

I have a problem with a model, when i pick it up. It's a machine, that uses a block, a tile entity, a container and a special render.

No errors or warnings in console.

Let me know, what you need to help me.

 

Best to explain is a short video(15sec)

 

Edited by Dustpuppy
Link to comment
Share on other sites

You don't need all of these:

https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/magic_extractor.json#L4

For any model unless you want the model to be different than the default values present in item/generated. Similarly...

https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/iron_wand_0.json#L2

Use item/generated not builtin/generated.

 

Third:

Post your log. If models don't load, there's always an error.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

4 minutes ago, Dustpuppy said:

Without all the display stuff in the json file for the item, it looks terrible in inventory, because it renders flat.

 

Read point #2:

Use item/generated not builtin/generated.

 

Look at this. LOOK AT IT. LOOK AT HOW GLORIOUSLY SIMPLE IT IS.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

item/handheld

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Haaaaaaaa!!!!!         Found it!!!!!

 

This is wrong. It only works for normal blocks without different meta data.

	@Override
	public final ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
		int meta = state.getBlock().getMetaFromState(state);
	  	ItemStack ret = new ItemStack(this, 1, meta);
	  	NBTTagCompound compound = new NBTTagCompound();
	  	TileEntityExtractor tileEntity = (TileEntityExtractor) world.getTileEntity(pos);
	  	NBTTagCompound tileEntityTag = new NBTTagCompound();
	  	tileEntity.writeToNBT(tileEntityTag);
	  	compound.setTag("BlockEntityTag", tileEntityTag);
	  	ret.setTagCompound(compound);
	  	return Lists.newArrayList(ret);
	}

 

Fix was really simple.

	@Override
	public final ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
//		int meta = state.getBlock().getMetaFromState(state);
	  	ItemStack ret = new ItemStack(this, 1, 0);
	  	NBTTagCompound compound = new NBTTagCompound();
	  	TileEntityExtractor tileEntity = (TileEntityExtractor) world.getTileEntity(pos);
	  	NBTTagCompound tileEntityTag = new NBTTagCompound();
	  	tileEntity.writeToNBT(tileEntityTag);
	  	compound.setTag("BlockEntityTag", tileEntityTag);
	  	ret.setTagCompound(compound);
	  	return Lists.newArrayList(ret);
	}

 

Took out the line, where the meat data is get and set it for the new itemstack just to 0.

 

Link to comment
Share on other sites

31 minutes ago, Dustpuppy said:

Same wand just with item/handheld

Ok, so your wands need the values, which I'd even said:

1 hour ago, Draco18s said:

For any model unless you want the model to be different than the default values

But the rest of your items don't.

 

You also don't need to supply "ground" (etc.) overrides if they're the same, you can just omit them.

 

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

×
×
  • Create New...

Important Information

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