ModificationStation / StationAPI

A general use API for Fabric Loader mods on legacy Minecraft versions.
86 stars 20 forks source link

Block items have different scale #49

Closed paulevsGitch closed 1 year ago

paulevsGitch commented 1 year ago

This issue is related to how vanilla items are rendered: for some reason Notch scaled not full blocks x2 times (probably for slabs), but as a result all custom not blocks will have upscaled models (compare right block with left ones). In vanilla this happens with cactusses

2023-06-24_11 53 03

Possible solution - disable that scaling at all. That will also fix some vanilla block rendering issues

mineLdiver commented 1 year ago

Is this really an issue though if it's vanilla behavior?

paulevsGitch commented 1 year ago

Yes, it is fine for vanilla items to be rendered upscaled, but when item was defined with json it should always be correct scale that is specified in this json (which is not happening since upscale modifies all item)

mineLdiver commented 1 year ago

Ah, fair. Gonna look into that.

mineLdiver commented 1 year ago

Actually, I can't seem to reproduce this with a json model? Neither do I see the code that'd apply this scale to json models.

paulevsGitch commented 1 year ago

It can be reproduced for blocks that have:

@Override
public boolean isFullCube() {
    return false;
}

@Override
public boolean isFullOpaque() {
    return false;
}

For example for blocks like these

paulevsGitch commented 1 year ago

Comparison of vanilla blocks, json model with incorrect scale and json model with correct scale

20 23-06-28_10 08 16

paulevsGitch commented 1 year ago

And these are lines that are responsible for that

mineLdiver commented 1 year ago

And these are lines that are responsible for that

Those lines are only executed for vanilla models though. And I have tried returning false in isFullCube and isFullOpaque in one of my json model blocks and didn't get the effect.

paulevsGitch commented 1 year ago

Looks like I forgot to add json items for that block, so it used vanilla renderer. I will fixed that. In that case scaling is not an issue since it is a vanilla feature