Packages

Packages

1M Downloads

(Forge 1.18.2/3.1) Weird Display Item Lighting on Create Contraptions

Bobisnotap opened this issue ยท 2 comments

commented

The display items of packages on create contraptions appear to ignore skylight, but are affected by block light on contraptions.
image
image
No fancy render changing mod being used, might be worth testing on other versions/loaders.

commented

I'm astonished they work at all.

Like, no seriously - this could just as easily be a bug like "packages are invisible on create contraptions", or "packages render with my fallback pink-and-black terracotta model i use when i can't determine the model", or "packages on Create contraptions crash the game"

The bug being about something as banal as lighting? Serious props to the Create team

commented

I intentionally query LevelRenderer#getLightColor myself instead of trusting the light parameter because the blocks are opaque. Without this line you always get black items even outside of a contraption.

//The block is solid, so has no light inside; use the light of whatever's in front instead.
light = LevelRenderer.getLightColor(world, blockEntity.getBlockPos().relative(packageTwelveDir.primaryDirection));

What's really surprising to me is that it works with block light but not sky light, because I don't treat them differently - getLightColor returns combined light. If Create has a custom implementation of this method it might be broken; if it doesn't, maybe this method is just bugged when calling it from whatever context Create is rendering things in and always returns zero skylight.

I don't know anything about how contraption rendering works, btw, Flywheel is insanely complicated.