Exopandora / ShoulderSurfing

Shoulder Surfing Reloaded is a highly configurable third person camera mod for minecraft.
MIT License
48 stars 9 forks source link

[Suggestion] Replace `ClipContext.Block.COLLIDER` with `ClipContext.Block.VISUAL` #128

Closed 70CentsApple closed 11 months ago

70CentsApple commented 11 months ago

Currently, the mod also collides with perspectives when encountering blocks such as glass, while in newer versions of Minecraft, the perspective does not collide with blocks such as glass.

The way to fix this is really simple, replace ClipContext.Block.COLLIDER with ClipContext.Block.VISUAL here. https://github.com/Exopandora/ShoulderSurfing/blob/93fec6f503487e3ed1dd87ebb0d6879bddefd567/common/src/main/java/com/teamderpy/shouldersurfing/client/ShoulderRenderer.java#L92

The definition of and difference between COLLIDER and VISUAL are shown below: 1.20.1: net.minecraft.world.level.ClipContext image

This little fix might not bring significant changes, but it fixes mods that modify camera collisions of blocks by modifying the BlockBehaviour.BlockStateBase::getVisualShape method (such as mine, Modify Camera Collision).

I could make a PR for this issue, but if there's any reason why I shouldn't, please let me know.

Exopandora commented 11 months ago

Thanks for the pointer! Feel free to make a PR.