Commit Graph

5545 Commits

Author SHA1 Message Date
DeidaraMC
ded0721b23
fix: Aerodynamics#withAirResistance not updating correctly (#2121) 2024-05-02 01:49:18 +00:00
DeidaraMC
ea4769817d fix: simulate phyiscs updating player onGround when it should not 2024-05-01 21:46:26 -04:00
DeidaraMC
5c050c66ca fix: Entity#onGround returning true when entities aren't actually on ground 2024-04-30 23:06:41 -04:00
DeidaraMC
5bf4b4445a fix: projectile entities positions becoming desynced from the client 2024-04-30 20:36:51 -04:00
mworzala
fe8a230abb
fix: correct entity opt_block_state metadata serializer 2024-04-30 16:50:46 -04:00
mworzala
e18d7fb798
fix: do not process disconnected queued config->play transition players 2024-04-30 13:56:38 -04:00
Alexander
2a7df1ab55
Lighting fix 35 (#2044)
* optimize light compute

* fix broken sections

* encodeHeightmap without magic

* separate heightmaps without empty sections optimization

* empty sections skip optimization

* working but not the best architecture

* AbstractHeightmap

* Anvil loading heightmaps.

* refactor

* Refactor

* some refactoring after refactoring

* test + cleanup

* refactor

* refactor

* refactor

* remove HeightMapContainer

---------

Co-authored-by: iam4722202468 <aceparent@gmail.com>
2024-04-30 03:52:21 +00:00
DeidaraMC
d0c7d7350e
fix: don't simulate movement if the chunk isn't loaded (#2112)
* fix: don't simulate movement if the chunk isn't loaded

* chore: changed wrong thing
2024-04-29 14:20:23 -04:00
Zax71
3de64aafd8
Sonatype -> mvnrepository (#2109)
The sonatype UI is broken for getting the latest version
2024-04-29 00:16:44 -04:00
oglass
5c23713c03
Use PlayerInstanceEvent instead of PlayerEvent (#2102) 2024-04-24 16:27:42 +00:00
mworzala
129fd8ca0f
fix: properly return missing optvarint 2024-04-23 23:20:27 -04:00
mworzala
f76d421744
fix: write metadata optvarint as varint + 1 || 0 2024-04-23 23:17:50 -04:00
DeidaraMC
e28adbca3e
fix: arrow meta shooter id set correctly (#2105) 2024-04-23 22:47:35 -04:00
mworzala
e8e22a2b15
fix: close current inventory when opening a book 2024-04-14 20:34:26 -04:00
Maxim Breitman
7daf8d69b7
fix typo in Server#stop (#2093) 2024-04-11 22:25:50 +02:00
Maxim Breitman
f1a4882572
fix typo in Worker#close (#2092) 2024-04-11 21:33:15 +02:00
mworzala
54212ebc97
fix: death location type to WorldPos (same type as metadata), fix missing world pos serialization (was npe) 2024-04-10 08:31:47 -04:00
TheMode
b5c35e0144
NetworkBuffer.Type refactor (#2078)
* Refactor network buffer types

* Remove magical -1 return

* Style

* Type doesnt need to be sealed
2024-04-10 01:41:03 +00:00
Samuel
2442f14b3d
Add a Scheduler::scheduleTask with period supplier AND delay (#2082) 2024-04-09 17:25:17 -04:00
GreatWyrm
877e2bb4f2
chore: Cleanup some deprecations in the project (#2084) 2024-04-09 21:14:29 +00:00
GoldenStack
97b7f61def
Invalidate previous physics result on instance change (#2086) 2024-04-06 17:02:02 -04:00
iam
9a0d61755e
Simplify Chat Event (#2085) 2024-04-06 20:33:55 +00:00
Samuel
0c9527118a
Add unstable API for custom Login Plugin Messages (#2074)
* Add LoginPluginMessageBox to allow sending custom login plugin messages

* throw in ConnectionManager because AsyncUtils has a try catch

* Stack requests in AsyncPlayerPreLoginEvent so the user-facing API is scoped to the login stage

* Fix addPluginRequest javadoc

* feat: encapsulate velocityproxy logic, other minor tweaks

* fix: revert velocityproxy changes

---------

Co-authored-by: mworzala <mattheworzala@gmail.com>
2024-04-01 16:36:13 -04:00
DeidaraMC
63f02929ed chore: point position/offset particle packet construtors 2024-03-31 01:33:55 -04:00
DeidaraMC
b71edf2706
feat: player support for lookAt and setView methods (#2072) 2024-03-31 03:54:27 +00:00
DeidaraMC
a9f6d9f02b
feat: add TICK_END execution type to scheduler api (#2045)
* feat: implement TICK_END scheduler ExecutionType

* feat: add TICK_END scheduler ExecutionType

* fix: call processTickEnd on entity/instances, SchedulerImpl code cleanup

* deprecate ExecutionType#SYNC, replace with TICK_START

* chore: update scheduler test

* chore: scheduleEndOfTick cleanup

---------

Co-authored-by: iam <iam4722202468@users.noreply.github.com>
2024-03-30 23:51:08 -04:00
DeidaraMC
154059468e fix: server has no tick catch up limit 2024-03-30 23:04:56 -04:00
AmGone_
b0e38f14b9 Remove obsolete scale and depth fields for biomes 2024-03-29 17:04:54 -04:00
mworzala
452943df23
chore: reapply #2027, throw if adding viewer before entity is active 2024-03-29 12:43:25 -04:00
mworzala
5b027599c5
fix: missing import in revert commit (somehow) 2024-03-29 12:07:21 -04:00
mworzala
ba1aaa7823
Revert "fix: send entity metadata immediately (#2027)"
This reverts commit e5cb2f7a1d.
2024-03-29 11:37:29 -04:00
DeidaraMC
832f0e7f5a
feat: proper passenger position handling for most entities, fix passengers not always being applied to the client, don't sync passengers (#2060)
* feat: proper passenger position handling for most entities, fix passengers not being applied properly on the client sometimes

* chore: ditch the complex passenger solution as 1.20.5 makes this much simpler

* chore: change EntityViewer to check for a vehicle rather than isViewer, add a test case for this bug

* fix: test only worked in isolation

* chore: revert additional pos allocation

* chore: this instead of vehicle
2024-03-29 15:11:16 +00:00
DeidaraMC
dc17d171ce
feat: vanilla style Instance#setWeather method overload, weather api improvements (#2064)
* feat: weather update

* chore: Weather#createIsRainingPacket use isRaining
2024-03-29 10:12:45 -04:00
TheMode
9f72bf4c44
JDK 21 (#2058) 2024-03-28 17:09:18 +01:00
DeidaraMC
f09d3db999
fix: entity onGround applies correctly (#2059) 2024-03-28 08:22:21 +00:00
GreatWyrm
f95d73eca8
Name magic values, respect client view distance setting (#2051)
* Name some magic values, replace getChunkViewDistance with ServerFlag.CHUNK_VIEW_DISTANCE, and respect client view distance settings (by using effective view distance when sending chunks)

* Attempt to fix test

* Preload chunks in test

* Fix OOM error for tests

* Rename constants and skin parts method

* Rename method
2024-03-27 22:08:36 -04:00
DeidaraMC
204b447cdb
feat: use ticks for potion duration instead of system time (#2050)
* feat: use ticks for potion duration instead of system time

* chore: remove redudant getter
2024-03-28 01:48:58 +00:00
DeidaraMC
59ea880d26
feat: added player#teleportWithFlags for relative teleportation (#2029)
* feat: added player#teleportWithFlags for relative teleportation

* requested changes and improvements

* add the new teleport method override player

* chore: cleanup

* chore: change relative flags from enums to constants

---------

Co-authored-by: DeidaraMC <DeidaraMC>
2024-03-28 01:45:55 +00:00
DeidaraMC
621f38c6a3
feat: justice for z (#2056) 2024-03-27 15:40:10 -04:00
DeidaraMC
f034296f28
feat: add aerodynamics record and the capability to set custom horizontal air resistance (#2053)
* feat: add aerodynamics record and the ability to set horizontal drag

* feat: entity physics simulation overhaul

* fix: made physics utils private, renamed to match other utils

* chore: separate concept of chunks and tps from PhysicsUtils, remove bad PhysicsResult constants

* chore: remove synchronization from PhysicsUtils, SYNCHRONIZE_ONLY_ENTITIES collection > set

* chore: remove extra vec allocations

* chore: improved flyingVelocity test

* chore: add all entities with client side prediction to SYNCRHONIZE_ONLY_ENTITIES, refactor velocity

---------

Co-authored-by: iam <iam4722202468@users.noreply.github.com>
2024-03-27 19:21:07 +00:00
DeidaraMC
d04e9e3e71
feat: improve server ticking accuracy, transition to Thread#sleep and… (#2054)
* feat: improve server ticking accuracy, transition to Thread#sleep and compensate for ticks that take too long

* feat: use nano time instead of milliseconds and add compensation for the rare case of the server oversleeping
2024-03-27 03:14:40 -04:00
DeidaraMC
ceeab08a2a
chore: minor entity class warning cleanup (#2049) 2024-03-25 23:33:24 -04:00
DeidaraMC
115f9c1355
chore: expose previous position with a getter (#2046) 2024-03-25 19:52:26 -04:00
DeidaraMC
c27ab180a5
fix: don't send EntityHeadLook/Rotation packets to self (#2048) 2024-03-25 23:47:56 +00:00
DeidaraMC
4f1017d398
feat: configurable entity synchronization interval (#2047)
* feat: entity synchronization overhaul

* chore: add getter for sync interval

---------

Co-authored-by: mworzala <mattheworzala@gmail.com>
2024-03-25 23:44:27 +00:00
mworzala
4d2e78e7cf
fix: do not add a 1,1,1->0,0,0 collision shape if no boundingbox is present 2024-03-25 19:02:12 -04:00
GreatWyrm
fa0cd40ac1
Add bounds check to CreativeInventoryListener (#2042)
* Add bounds check to CreativeInventoryListener

* Add test and change bounds check to exclude crafting output slot
2024-03-25 05:47:12 +00:00
mworzala
ee17c032e7
fix: use collision shape for Shape#isFaceFull instead of occlusion shape 2024-03-24 21:50:54 -04:00
iam
6e179dbd8a
Fix Lighting Invalidation (#2041)
-  Fix invalid lighting being sent to clients
-  Add cherry leaves to occludes
-  Fix lighting being generated when using loaded lighting
-  Send lighting to clients on block changes
-  Cleanup unused methods
-  Add sky lighting test for short grass
2024-03-24 16:23:26 -04:00
Samuel
17fd82a5c1
Scheduler try catch (#2037)
* try catch in SchedulerImpl to individually fail tasks

* Use exception manager

* chore: add a test

---------

Co-authored-by: mworzala <mattheworzala@gmail.com>
2024-03-21 21:42:24 +00:00