Fixing the gray particles issue

What about randomly selecting particles based on the sandwich’s contents? Steve is a very messy eater yet somehow manages to not drop any crumbs of whatever’s between the bread.

3 Likes

I can 100% live with bread particles from eating sandwiches. The only issue left are all the tile entity machines and blocks having gray particles. And the fact that i realised that in minecraft you aren’t picking up the machines but you are literally breaking them with a tool and visible cracks (which can be ok to keep things simple).

3 Likes

I’m in camp #LiterallyBreaking because smashing large metal blocks until they explode into a million pieces is a lot more badass than just picking them up. Call me old-fashioned but I like my mini explosions.

3 Likes

public IIcon getIconFromDamage(int aMeta)

As you can see, this is PURE metadata, and the Sandwich has 16 Slots for its contents, so you can probably guess how you cannot fit that into the 16 bit of MetaData you get…

Obviously ASM might be an option, but I dont like to use it as a Universal Hammer on Screws.

3 Likes

Both EntityPlayer.updateItemUse(ItemStack, int) and Item.onUsingTick(ItemStack, EntityPlayer, int) are being called in EntityPlayer.onUpdate() under similar conditions on both sides, and updateItemUse is what spawns the particles (“iconcrack_<item id>_<meta>”), so I’d assume it should be as easy as spawning additional particles in the sandwich’s onUsingTick(ItemStack, EntityPlayer, int) using the world instance’s spawn particle function. Since onUsingTick provides the whole stack, it should also contain the NBT for deciding what ingredients are in the sandwich.

3 Likes

Ey, aren’t you the authour of HBM nuclear tech mod? I haven’t played it much but i just know that mod is cool.

2 Likes