Jump to content

[1.8] Crash on getting breaking particles from an Item w/ NBT based textures


SackCastellon

Recommended Posts

Hi, I have created a bunch of Item variants based on NBT Tags, i have also created an "ItemSoup" item, which generates particles from the item texture on being eaten, this far so good, but the real problem is that on the way the texture is requested, the ItemStack where the NBT Tags are stored, is reseted.

 

Basically what minecraft does to get the texture of an item to later generate particles is, oversimplified, the following:

 

"ItemSoup" is used --{ onUpdate() }--> ItemStack w/ NBT Tag --{ getIdFromItem(ItemStack.getItem()), getItemDamage() }--> ID, Damage --{ getItemFromId() }--> Item, Damage --{ new ItemStack(Item, 0, Damage) }--> ItemStack w/o NBT

 

So it erases all the possible information stored on the NBT Tags, what from my point of view is no sense.

 

Finally my question is:

Is there any workaround to get what I'm looking for? or must I create a pull request?

 

Thank in advance for helping :)

Link to comment
Share on other sites

 

wow

but i m intriged why you use nbt tags and not metaitems how many sub items are you pretending to make ?

 

I'm creating wood based item variations (only wooden items), for example: Stick --> Oak Stick, Spruce Stick, ... , Acacia Stick; and I also have thought about adding support for other mods by the way that if we only consider Vanilla, Extrabiomes XL and Biomes o' Plenty with their respective wood we'd have about 30 different wood types, which implies 30 sticks, 30 bowls, etc.

But the greatness comes with the tools, because on them what variates is the head and the handle, so only with the Swords we already have 30*30=900 variations!! now apply it to the rest of tools ;);D ;D

Link to comment
Share on other sites

The problem is that the way particles work there is no way to tell them "hey, spawn the particle for this ItemStack". They only take numbers.

If you want this to work you will have to spawn the particles manually somehow.

 

Ok, I have decide to return a texture of the soup but without the bowl so it can work with all the soup variants  :)

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.