5446 Commits
Author SHA1 Message Date
Moritz Zwerger d04f7bbb04 big chunk renderer refactor
Not ready at all, but touches a lot and removes all the garbage junk around it. There are some todos left, but it is way cleaner (probably faster) and probably resolves various bugs
2025-11-19 22:29:50 +01:00
Moritz Zwerger 2f1bdfbb2a deprecate a lot of chunk renderer functions
To be replaced
2025-11-19 22:29:49 +01:00
Moritz Zwerger 2db9acecf2 remove a lot of chunk crap 2025-11-19 22:29:49 +01:00
Moritz Zwerger c9c66ee2bb minor split and cleanup start of chunk rendering 2025-11-19 22:29:48 +01:00
Moritz Zwerger 3f2d6177f2 update chunk mesh details 2025-11-19 22:29:48 +01:00
Moritz Zwerger 5db4d103f8 mesh details: remove fast bedrock, full opaque culling
Fast bedrock is generalized as SIDE_DOWN, this is way easier and not a special case anymore.
2025-11-19 22:29:47 +01:00
Moritz Zwerger 6b332e10e0 chunk mesh details: hide faces that are impossible to see 2025-11-19 22:29:46 +01:00
Moritz Zwerger 79c0f64c99 more chunk details, chunk mesher: set according to distance 2025-11-19 22:29:46 +01:00
Moritz Zwerger 4e64bc05ad chunk meshing: hide specific details 2025-11-19 22:29:45 +01:00
Moritz Zwerger 8b832ff84f mesh details 2025-11-19 22:29:42 +01:00
Moritz Zwergerandpolarite b72fc1400a item stack: ignore durability if item has no durability + tests
This actually just ignores it when loading it from network. When you try to create an ItemStack with durability it is enforced that the item is durable

Co-authored-by: polarite
2025-11-19 20:07:08 +01:00
Moritz Zwerger d7c4bee347 vectors: fix bad assert in _Vec3i::plusZ 2025-11-19 20:07:04 +01:00
Moritz Zwerger 9e670cca70 world occlusion: mark graph as valid
Otherwise we calculate it every frame. Bad.
2025-11-18 16:30:52 +01:00
Moritz Zwerger 9ffbf590cd occlusion tracing: don't remove graph when invalidating
No graph means that the chunks/sections are not occluded. That makes the chunk renderer do A LOT of unneeded work and it gets optimized out a lot later. That is really stupid.
2025-11-18 16:26:40 +01:00
Moritz Zwerger 70c8899770 entity data: cast numbers to booleans 2025-11-17 21:14:24 +01:00
Moritz Zwerger 0a7cef0a58 network legacy: fix reddust particle reading 2025-11-17 15:09:27 +01:00
Moritz Zwerger 2da51aedc7 cleanup ParticleS2CP 2025-11-17 15:09:25 +01:00
Moritz Zwerger b1de73e0d3 network: fix entity spawn reading in <= 1.7 2025-11-17 15:09:22 +01:00
Moritz Zwerger 43a4b1b98b remove wrong cherry picked test 2025-11-14 13:55:27 +01:00
Moritz Zwerger f59c4f8dcc take screenshot at end of frame
Otherwise it is just black
2025-11-14 13:46:43 +01:00
Moritz Zwerger df5002bdf6 fix memory leak in texture buffer
This could be done better, manual freeing it
2025-11-14 13:46:41 +01:00
Moritz Zwerger 8bf32609c6 chunk mesher: don't drop entity cache if interrupted 2025-11-14 13:46:34 +01:00
Moritz Zwerger 1cb75cdd21 occlusion tracer: increase limits
It is sooo fast now, this prevents sometimes chunks being loaded later
2025-11-14 13:46:21 +01:00
Moritz Zwerger 26328b86fa chunk manger: only calculate light once
This should be a LOT faster now, all the lag stuttering is gone
2025-11-13 14:45:23 +01:00
Moritz Zwerger f0385adbdf test biomes 2025-11-13 14:44:57 +01:00
Moritz Zwerger 78a9dde8c0 chunk manager: calculate light async
The chunk renderer set the neighbours for the chunk (locked) and calculated the light during that time. That was really causing lag stuttering and took way too long.

Now it is async, but there is still some smell, the light is calculated 8x instead of just once. Not sure why. To be investigated.
2025-11-13 00:13:05 +01:00
Moritz Zwerger 21a1d57516 section light: don't lock chunk
Might lead to deadlocks and is really not needed at all, worst case would be a race to the same data.
2025-11-13 00:13:05 +01:00
Moritz Zwerger 0465aa41d8 water filled blocks: fix wrong light property 2025-11-13 00:13:05 +01:00
Moritz Zwerger 8d7e4f848c chunk manager: fix potential deadlock when unloading chunks
Neighbours are updated when unloading the chunk while the world lock is held. Meanwhile it is possible to tick, which holds the chunk lock and that somehow leads to a deadlock.
2025-11-13 00:13:05 +01:00
Moritz Zwerger e954defde5 chunk blocks: cache how many entity blocks are available
Then we don't need to uselessly scan when updating block entities
2025-11-13 00:13:05 +01:00
Moritz Zwerger f004910583 chunk queue: force unload if neighbours unavailable 2025-11-13 00:13:04 +01:00
Moritz Zwerger 9a3c58d97b ambient occlusion: fix wrong side flipping on east at chunk border
Edge case, did not notice it
2025-11-13 00:13:04 +01:00
Moritz Zwerger 9c8e3e1b3e ambient occlusion: use full opaque cache 2025-11-13 00:13:04 +01:00
Moritz Zwerger ca1d9f6f45 lots of (test) fixes 2025-11-13 00:13:04 +01:00
Moritz Zwerger 05509269bc cleanup opaque, transparent, outlined, full, collidable block
This is now way less goofy, more to follow...
2025-11-13 00:13:04 +01:00
Moritz Zwerger fa144004f9 aabb: remove float constructor
Physics work with doubles, no need to convert datatypes
2025-11-13 00:13:03 +01:00
Moritz Zwerger 6e7e5d1057 use more block flags 2025-11-13 00:13:03 +01:00
Moritz Zwerger 97c8bc0606 solid mesher: don't render if all blocks around it are full opaque
It will always be invisible, so don't even bother retrieving blocks or neighbours and do all the culling (same result). This is an edge case, but it is very likely in worlds.
2025-11-13 00:13:03 +01:00
Moritz Zwerger 18474ed578 more occlusion tests 2025-11-13 00:13:03 +01:00
Moritz Zwerger fed7a149c3 some occlusion test improvements 2025-11-13 00:13:03 +01:00
Moritz Zwerger 148b32508d section occlusion: cache full opaque as bit set 2025-11-13 00:13:03 +01:00
Moritz Zwerger 0238779bb5 improve section occlusion 2025-11-13 00:13:02 +01:00
Moritz Zwerger e825ab7078 integration tests: don't load data if not neeeded (blocks) 2025-11-13 00:13:02 +01:00
Moritz Zwerger bae0f5b116 occlusion tracer: use IntInlineSet for side regions
The overhead of them is so much smaller and checking the side regions is also just a binary operation. So much faster and cleaner.
2025-11-13 00:13:02 +01:00
Moritz Zwerger c7d8cde40d section occlusion tracer: use byte array with fixed region ids
Dynamic ids are really not needed, they can be totally fixed (by the side where the tracing started). Then same side regions are automatically merged to one (this will make the checking a lot easier)
2025-11-13 00:13:02 +01:00
Moritz Zwerger 0eb9c6926d registry items: remove overloading equals, hashCode and toString methods
They are provided by the base class, no need for them
2025-11-12 23:59:14 +01:00
Moritz Zwerger 01bf405bf3 integration tests: crash instantly if setup fails 2025-11-12 23:59:05 +01:00
Moritz Zwerger b8cbf80704 more java11 fixes 2025-11-12 23:58:25 +01:00
Moritz Zwerger a96799b4d4 use backports random in range
Otherwise it prefers java 16+ bound int, which behaves differently and it will fail to execute on java 11.
2025-11-12 23:58:20 +01:00
Moritz Zwerger e8e174abba entity position info: don't lock world
That is super slow
2025-11-12 23:58:11 +01:00