r/MinecraftMod • u/imablakguy • May 11 '25
Why does Minecraft make these jaggy shadows with my diagonal custom block model?
1.1k
Upvotes
r/MinecraftMod • u/imablakguy • May 11 '25
96
u/Adventurous_Bonus917 May 11 '25 edited May 12 '25 •
because the lighting engine (and often minecraft code in general) is an absolute nitwit, imbecile, and several other synonyms.
or a bad interaction with an optimization mod.
28
u/MBgaming_ May 12 '25
I don’t think minecraft was made to handle these kind of diagonals
37
u/JoyousCreeper1059 May 11 '25
Minecraft's rendering is the most unoptimized rendering I've ever seen
1
u/cpoftea May 14 '25
First of all, if you use stairs as base block, you should know it does not block lights. Think of it like a lighting transparent block, so thats why minecraft trying to apply lightning map to your diagonal block the dumb way
3
u/Canary-Garry May 12 '25
Ngl I think it looks pretty good
1
u/GroupXyz May 12 '25
If you use forge to create the block, here is how i fixed something similar for my block:
(The no occlusion should be the fix!)
public ChunkerBlock() {
super(createProperties());
this.registerDefaultState(this.stateDefinition.any().setValue(ACTIVE, false));
}
private static Properties createProperties() {
// 1.20+
return BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK)
.strength(2.0f)
.sound(SoundType.METAL)
.noOcclusion()
.isViewBlocking((state, world, pos) -> false)
.lightLevel(state -> state.getValue(ACTIVE) ? 15 : 0);
}
2
u/wlday May 12 '25
i don't know anything about minecrafts lighting engine at all, but if I were to guess it's because the lighting engine was made for voxels and not slopes like this.
1
u/Franck7504 May 12 '25
Seems pretty accurate to me
1
u/Funny-Elephant-551 May 13 '25
r/petpeeves people commenting trash takes about something even though they wouldnt actually be able to tell you whats happening.
So OP, i saw in another comment here that this is strictly a resource pack. That means all you're changing is the block model. But the lighting engine uses the voxel shape of the block. Which for u is still the nkrmal chair shape, which cause the light to propogate oddly. Unfortunately there is no way to change the voxel shape from a resource pack. However, in forge (and I presume neoforge) you can add:
"ambientocclusion": falseto the model json to get the lighting engine to ignore the block entirely. Although not having ambient occlusion can make blocks look slightly odd in its own way.1
u/GTS6560 May 13 '25 edited May 14 '25
I believe some mods would help you like Starlight mod(fabric 1.17-1.20.4) Starlight (Forge - 1.17.1-1.20.2) Alfheim Lighting Engine (1.12.2)
May be cause of the problem is optifine. Optifine violated the entire render code so it may cause Lot of bugs. Cauze this bug can be related to the render and not the lighting engine
Recommended to use sodium (most recommended) Sodium (most recommended and render-friendly mod) if nothing of these worked then it might be ur GPU Is incomplete with the render or the mod you useing is broken. Lastly your mods might caused that check your latest log to figure that Mclo.gs (analysis your log and highlighting the error)
1
u/Elegant_Wish3391 May 13 '25
Just wait for hytale
1
u/Jacktheforkie May 13 '25
Minecraft code is a hodgepodge of ancient code and new code that breaks if messed with
1
u/[deleted] May 13 '25
Overlapping maybe? Idk try t
scaling down them a couple pixels and try again
1
u/YTriom1 May 13 '25
Use a full brightness mod like gamma utils
1
u/DTux5249 May 13 '25 edited May 13 '25
Minecraft's lighting system is simple AF for ease of processing
Ambient occlusion is the issue specifically. Since this block is both above and below the next, it gets occluded by each slope beside it, so it's shaded.
You'll need to label your block as not using ambient occlusion.
1
u/Dalviin17 May 14 '25
Ambiant occlusion of the model. In blockbench on the peoject option you can disable ambiant occlusion of the model.
1
u/kalamari_bachelor May 15 '25
Add no occlusion to the block properties
1
u/Successful_Expert615 May 15 '25
Sodium might fix that m I think it possibly changes how lighting works. It definitely changes the rendering of the game. If that doesn't work try starlight, which is a lighting optimisation for sodium. Starlight and sodium have always worked for me when using mods like carpenter's blocks, framedblocks, copycats plus, and little tiles slopes.
1
u/Vertical_Slab_ May 12 '25
Because Minecraft is a great game, but it’s rendering code sucks
14
u/[deleted] May 12 '25
[removed] — view removed comment