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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • For the moment it seems fixed. I deleted the JEI Config file, the Journeymap Server Config file, and disabled both the mods (even while disabled, it would still crash until those config files were gone). They're useful mods and I'd hate to not use it, would just deleting and redownloading the mods work?
    • For hours I have been trying to just instal Mr. Crayfish's Refurbished Furniture Mod, but each step to fix the error codes, the more problems arise. The farthest I got through the steps was getting to the Forge Installer, but once I had selected the file, an error saying "The directory is missing a launcher profile. Please run the minecraft launcher first". At this point I don;'t know what more I can do. Please help.
    • I create my mod pack,yesterday my mod pack is fine but i add one mod and error. I'm delete this mmod but minecraft is still stop on CONFIG_LOAD then I tried to delete config and restart it but again. If you can pleace help me. https://imgur.com/ngZBzuv
    • game crashes before even opening (log:https://mclo.gs/M8xvX7c)
    • I have created a custom entity that extends "TamableAnimal", but I am wanting to have it spawn in the ocean. I have it spawning right now, but it spawns way too frequently even with weight set to 1. I am guessing it is because it is rolling in the spawn pool of land animals since TameableAnimal extends Animal and is different than WaterAnimal, and since no land animals spawn in the ocean it just fills every inch up with my custom entity. I have followed basic tutorials for spawning entities with Forge, but I feel like I am missing something about how to change what spawn pool this custom entity ends up in. Is it possible to change that or do I need to refactor it to be based off of WaterAnimal to get those spawn? My biome modifier JSON file: { "type": "forge:add_spawns", "biomes": "#minecraft:is_ocean", "spawners": { "type": "darwinsmysticalmounts:water_animal", "weight": 20, "minCount": 1, "maxCount": 1 } } My client event: event.register(ModEntityTypes.WATER_ANIMAL.get(), SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaterWyvernEntity::checkCustomWaterAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.REPLACE); And the actual custom spawn rule that makes it spawn in the water: public static boolean checkCustomWaterAnimalSpawnRules(EntityType<WaterAnimalEntity> pAnimal, LevelAccessor pLevel, MobSpawnType pSpawnType, BlockPos pPos, RandomSource pRandom) { return pPos.getY() > pLevel.getSeaLevel() - 16 && pLevel.getFluidState(pPos.below()).is(FluidTags.WATER); }  
  • Topics

×
×
  • Create New...

Important Information

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