Commit Graph

252 Commits

Author SHA1 Message Date
mworzala 6f01aa51ff
fix: always execute chunk load callback/event on the instance tick thread 2024-03-21 15:29:03 -04:00
iam4722202468 6d175c4ff9 expose internal and external lighting 2024-02-10 18:06:31 -05:00
mworzala 69aeb8e2ea fix: preserve instance tag on #copy() (fix #112)
(cherry picked from commit 5f49033842)
2024-02-09 14:27:43 -05:00
Matt Worzala c657be553f hollow-cube/prevent-block-placement-outside-world (#42)
* Prevent block place above 320

(cherry picked from commit d226c3994a)

* Move position of check

(cherry picked from commit ff7c4c108f)

* Add unit test

(cherry picked from commit 68500bf0d0)

* Add min y check

(cherry picked from commit 0ce77673a9)

---------

Co-authored-by: nucker <nuckermail@gmail.com>
(cherry picked from commit 8da8a70342)
2024-02-09 14:27:43 -05:00
mworzala ef075bec3f hollow-cube/block-update-changes
(cherry picked from commit 74ca1041f3)
2024-02-09 14:27:43 -05:00
mworzala bb6a93da89 hollow-cube/prevent-block-updates
(cherry picked from commit 55a1349049)
2024-02-09 14:27:43 -05:00
mworzala b4c41adb7d hollow-cube/dimension-names
(cherry picked from commit 7493b640b7)
2024-02-09 14:27:43 -05:00
mworzala 37f6877b0a hollow-cube/block-handler-in-chunk-setblock
(cherry picked from commit 54e839e58a)
2024-02-09 14:27:43 -05:00
mworzala f019fe69d0 hollow-cube/respectful-chunk-sending
(cherry picked from commit 9f3ee89506)
2024-02-09 14:27:43 -05:00
Matt Worzala 128c525b7c hollow-cube/placement-rule-improvement
* improve placement rule api and remove existing vanilla rules

* readme changes

(cherry picked from commit b0b640ccd7)
2024-02-09 14:27:43 -05:00
iam 912fb34f17 hollow-cube/lighting (#13)
* Lighting

* Remove invalidate

* Private

* Fix chunk loading

* Small fixes

* Fix loading light from anvil world

* Fix solid

* Temporary

* Fix tests, add seagrass and tall seagrass to diffusion list

* Make test faster, replace hephaistos

* Cleanup

* Assume failed test

* Fix chunk not getting invalidated

(cherry picked from commit f13a7b49fa)
2024-02-09 14:27:43 -05:00
emortaldev c995f9c3a9
Block event changes (#1675)
* Add cursor position to interact events

* Add block face to digging events

* Expose interact position in interact event
2023-01-16 18:57:18 -05:00
TheMode caa150d923 Use constant default anvil loader
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-27 15:52:59 +02:00
Xavier Niochaut f62d4e47fc
Heavily reduce memory consumption of AnvilLoader (#1005)
* (Heavily) Reduce memory consumption of AnvilLoader
/!\ requires building and publishing Hephaistos master to local Maven for now

* Cache biome mapping per chunk instead of per section

* Starting work on integration tests

* [AnvilLoader] Address issue #423

* [AnvilLoader] Use new Hephaistos saving API

* Use MavenCentral version of Hephaistos
2022-08-05 21:05:23 +02:00
TheMode 9a28e6ba87 Fix chunk invalidation during generation forking
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-30 23:12:42 +02:00
Noel Németh bcab1b199b
Limit chunk update packets (#1128) 2022-06-04 22:04:57 +02:00
TheMode f5dc048185 Fix block nbt update
Signed-off-by: TheMode <themode@outlook.fr>
2022-05-23 23:40:57 +02:00
emortal a78309a2b2
Fix block break packet using resultant block (#996) 2022-04-27 16:14:54 +02:00
TheMode afbc6d6a47 Fix potential NPE
Signed-off-by: TheMode <themode@outlook.fr>
2022-04-11 22:38:37 +02:00
TheMode b8b850fca1 Print problematic future
Signed-off-by: TheMode <themode@outlook.fr>
2022-04-08 12:20:17 +02:00
TheMode a70bb15146
Low level generation API (#574) 2022-04-08 07:19:52 +02:00
TheMode 1c9b6f3529 Do not call Chunk#removeViewer
Signed-off-by: TheMode <themode@outlook.fr>
2022-03-27 15:31:34 +02:00
themode 055cc409ed Ensure proper chunk synchronization 2022-03-17 00:14:12 +01:00
themode 9a7d5039a7 Change assert 2022-03-01 01:04:58 +01:00
themode e23de98587 InstanceContainer misc improvements 2022-03-01 00:35:55 +01:00
themode 2438393ce1 Remove GlobalHandles for better testability 2022-02-13 12:34:27 +01:00
TheMode 502db8ec5c Fix block entity packet not being sent on placement
Signed-off-by: TheMode <themode@outlook.fr>
2022-02-10 16:48:59 +01:00
TheMode 1ad013e02e Remove deprecated data/storage APIs
Signed-off-by: TheMode <themode@outlook.fr>
2022-02-09 23:07:18 +01:00
TheMode 91c06da68a
Basic testing framework (#594) 2022-01-19 21:41:25 +01:00
Eoghanmc22 0ccaa6a888
make isInVoid relative to the instance's min y (#584) 2022-01-12 09:39:59 +01:00
TheMode 5bbf4642e8 Server process (#550) 2022-01-10 16:51:21 +01:00
Mrln dcc079ed9c Fixed ArrayIndexOutOfBoundsException when placing or breaking a block close to max / min InstanceContainer height (#569) 2022-01-10 16:51:21 +01:00
TheMode 2c7aae6bec Dirty tracking (#547) 2022-01-10 16:51:21 +01:00
TheMode 895642dd44 Use flare thread-safe collections
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-10 16:51:21 +01:00
TheMode f52cc8d82b Prepare changes for the biome api
Signed-off-by: TheMode <themode@outlook.fr>
2022-01-10 16:51:21 +01:00
TheMode faa289a097
Entity tracking rework (#486) 2021-11-01 18:04:00 +01:00
Шандуренко Константин Владимирович 6c4eda3bb7 Chunk-related improvements 2021-09-07 19:24:24 +03:00
TheMode e99d8c6a6f Add BlockHandler.PlayerPlacement#getHand 2021-08-30 15:52:07 +02:00
TheMode 4d0924a522 Can now specify InstanceContainer chunk loader during initialization 2021-08-28 13:06:09 +02:00
TheMode 5ddd97cee2 Move optimized event calling inside ListenerHandle 2021-08-24 15:35:09 +02:00
TheMode 253c059614 Do not run chunk load callback in the instance thread 2021-08-22 16:44:24 +02:00
TheMode 129a39fc3d Proper place for global event ListenerHandles 2021-08-22 13:56:12 +02:00
TheMode a8d90955c7 Fix chunks being registered multiple times (weirdly only happen on Windows?)
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-22 09:57:39 +02:00
TheMode b6ab689b10 Style cleanup 2021-08-15 17:50:38 +02:00
TheMode 6c242cbc7f Simplify InstanceContainer 2021-08-15 05:58:53 +02:00
TheMode 4560f2e630 Change InstanceContainer#unloadChunk implementation to directly unload chunks instead of maintaining a set 2021-08-14 16:37:19 +02:00
TheMode cb7bccf26c Load `level.dat` nbt on instance init 2021-08-09 01:16:51 +02:00
TheMode e3520f4294 Use a fastutil map to store chunks, will be significantly slower when accessed from multiple threads but without generating any garbage, and better for single-threaded use. 2021-07-24 11:44:50 +02:00
TheMode a0bb437c4c Reduce chunk entities Set allocation 2021-07-21 22:21:43 +02:00
TheMode 94a96d7df1 Improve entity chunk switch 2021-07-21 08:25:44 +02:00