Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the collision hitbox of chairs. #66

Open
abovearth opened this issue Feb 7, 2023 · 0 comments
Open

Optimize the collision hitbox of chairs. #66

abovearth opened this issue Feb 7, 2023 · 0 comments

Comments

@abovearth
Copy link

The chairs are getting the shape calculated exactly, which in my opinion isn't exactly necessary. Is it possible to optimize the collision hitbox, such that mobs colliding with the chair take up less cpu time?

From a spark profile I ran:
afbeelding

or as text:
Server thread7.30%22918.61ms

com.mrh0.buildersaddition.blocks.Chair.getShape()7.20%
    com.mrh0.buildersaddition.blocks.Chair.getLegsShape()3.78%
        net.minecraft.world.phys.shapes.Shapes.or()3.75%
            java.util.stream.ReferencePipeline.reduce()3.75%
                java.util.stream.AbstractPipeline.evaluate()3.75%
                    java.util.stream.ReduceOps$ReduceOp.evaluateSequential()3.75%
                        java.util.stream.AbstractPipeline.wrapAndCopyInto()3.75%
                            java.util.stream.AbstractPipeline.copyInto()3.75%
                                java.util.Spliterators$ArraySpliterator.forEachRemaining()3.75%
                                    java.util.stream.ReduceOps$1ReducingSink.accept()3.75%
                                        net.minecraft.world.phys.shapes.Shapes$$Lambda$1355.0x00000008011c97a0.apply()3.74%
                                        itable stub (native)0.00%
                                    itable stub (native)0.00%
                                itable stub (native)0.00%
        com.mrh0.buildersaddition.blocks.Chair.getLegShape()0.02%
    net.minecraft.world.phys.shapes.Shapes.or()3.42%
    com.mrh0.buildersaddition.blocks.Chair.getBackShape()0.00%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant