Farmer's Delight

Farmer's Delight

97M Downloads

Missing Cutting Board Particles (I don't get it either man)

davidjjung opened this issue ยท 5 comments

commented

Minecraft version

1.20.1

Farmer's Delight version

1.2.4

NeoForge version

47.1.3

Description

Alright, chopping turkey blocks from Autumnity has been returning missing texture particles since 2021, and I lack the patience to understand why. Running through an analysis of the cutting board, itemparticleoptions, etc. idk what confluence of conditions allows this to take place. Nothing is returning as null! Bizarre. Something like

if stack.getItem() instanceof BlockItem block
send BlockParticleOption of block.getBlock().getDefaultBlockState() to client/server instead of an ItemParticleOption

would work for spawnCuttingParticles() in CuttingBoardBlock. This has no real consequences from what I can tell. In this way it's infinitesimally more robust than the existing mechanism. If you don't feel that fix is necessary that's also fair. I haven't the heart to give the problem any more of its undue diligence, so I humbly place this Band-Aid solution in your hands and rid myself of this self-ordained responsibility.

Coding tires me. Good day, sir.

Steps to reproduce

  1. Place turkey/cooked turkey blocks from Autumnity on a cutting board
  2. Cut it up with a knife (Abnormals Delight has the recipe but frankly it doesn't matter, I made my own)
  3. Voila. Bad Particles

Mod list

Autumnity (turkey blocks are the only example I can find of this..weirdness)
Farmer's Delight

Logs

N/A

Minimal instance

  • I have tested this on a minimal instance

Performance and shader mods

  • I am using performance or shader mods
commented

Yeah, I'm investigating Autimnity code right now.

And finding/found nothing... whatever, I'm not experienced in forge code anyhoo.

commented

So, have you ever noticed this problem for anything else, or is it just turkey?

commented

Back when I fixed these items rendering upright, I likely never tried actually cutting them to see the lack of particles.

So, I tested this a few times just now:

  • Adding a Create Mixing recipe for Turkey;
  • Adding a cutting recipe for Spyglass, another item which needed special casing for cutting board rendering;

In both cases, the particles also had a missing texture. It seems that for such items, creating a new ItemParticleOption() doesn't seem to be working out. However, the actual Turkey block itself has normal particles, which means that at least block particles are fine.

I might need to see if such items also require a different particle creation. But it doesn't seem to be a problem exclusive to FD, as Create also generated missing particles. This may need another special casing.

commented

Yeah, I'm investigating Autimnity code right now.

commented

The issue happens inside of BreakingItemParticle, because none of those items ever define a texture which could be used for particles. Turkey doesn't define one on its block model, and trident/spyglass use a hand model with a 3D texture sheet.

While I cannot fix the particles on such items, I can at least cancel them by checking if their BakedModel's sprite is a missing texture. At least it will look much less broken than currently. ๐Ÿ˜†