Commit Graph

45 Commits

Author SHA1 Message Date
DaPorkchop_ 7d2745dee6
Faster chunk conversion (#1400)
* BlockStorage is never used concurrently, no need to synchronize

* initial, semi-functional, faster chunk conversion

* faster chunk conversion works well for every situation except spigot

* delete unused ChunkPosition class

* preallocate and pool chunk encoding buffers

* make it work correctly on spigot

* make field naming more consistent

* attempt to upgrade to latest MCProtocolLib

* remove debug code

* compile against my MCProtocolLib fork while i wait for my upstream PR to be accepted

* return to Steveice10 MCProtocolLib
2020-10-15 01:30:25 -05:00
DaPorkchop_ 73bec588fa
fix some NPEs caused by race conditions in chunk conversion (#1396)
* fix some NPEs caused by race conditions in chunk conversion

tbh the whole session should be read-write locked for every operation

* fix code style issues
2020-10-13 11:11:52 -04:00
Camotoy 5b76a85895
Non-full-chunk support (#574)
This commit adds non-full chunk support if chunk caching is enabled.
2020-09-03 19:00:36 -04:00
Camotoy 8b7165a564
Implement (hopefully) temporary dimension switching fix (#1188)
This fixes rare (?) instances where dimension switching doesn't finish loading on the client. Ideally a proper fix would send the finishing packets in the correct order but I didn't get far in this regard.

Fixes #1154 and #1072.

Other miscellaeous chunk-related fixes have also been included here.
2020-08-24 09:31:21 -04:00
RednedEpic da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00
DoctorMacc d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
Luke 7195d20fae
Implement helper methods for sending packets (#487)
* Implement helper methods for sending packets, fixes an NPE when chatting before connecting to the remote server

* Change method names

* Add a space between doc comment lines

* Add debug messages
2020-05-05 10:51:43 -05:00
RednedEpic 31be608038 Add block break sounds for blocks with 0 hardness, and refactor some things
The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
2020-04-29 15:01:53 -05:00
Camotoy 94ecb2c6c7
Block entity rewrite (#382)
* Initial attempt

* Rewrite of the rewrite

* First working implementation

* Far better working implementation

* Clean up imports

* Remove commented code

* Cleanup code; change things

* Remove unused imports

* Cleanup code

* Add licenses; add comment

* More cleanup

* Clarifications

* It complained about a JavaDoc comment

* Update access permissions

* Switch from reflections to iteration over BlockEntityTranslators
2020-04-21 00:32:32 -05:00
OnlyBMan 08eb99fa94 Implement skulls and heads 2020-04-14 18:33:55 -04:00
DoctorMacc d547b31b38 Fix first load crashing; fix NPE 2020-04-10 16:36:41 -04:00
DoctorMacc a392e54447 Fix requested changes 2020-04-06 16:27:09 -04:00
DoctorMacc 81c9e4f165 Fix beds and signs 2020-04-06 11:16:16 -04:00
RednedEpic 392b0b5727 Merge branch 'master' into inventory 2020-04-04 03:12:23 -05:00
Redned ddf2f471ea
Merge branch 'master' into chunk-fix 2020-04-04 02:00:18 -05:00
RednedEpic e76b67265a Rebase 2020-04-02 17:53:45 -05:00
RednedEpic be9396f585 Merge branch 'master' into inventory 2020-04-02 17:01:17 -05:00
BuildTools 5301c8c3f6 Implement bed colors
Java Edition includes the bed color in the namespaced ID; in Bedrock edition it's one of the tag values as a block entity. This code involves creating a table between block states and bed color numbers and looking that up on chunk load or block update.
2020-03-25 22:03:46 -04:00
Ender bbf6683bd8 Make all translators annotation based 2020-03-23 23:24:17 -05:00
AJ Ferguson f71c70224b Only translate full chunks 2020-03-05 17:55:22 -09:00
RednedEpic 418026dbe6 Merge branch 'block-entities' into inventory 2020-03-05 20:00:14 -06:00
AJ Ferguson eaf45ff6f7 Fix chunk view position bugs on some servers 2020-03-05 16:26:36 -09:00
AJ Ferguson 223e94a31d Revert non-full chunk fix
This fix causes far too much lag on big non-full chunk updates
2020-03-05 10:45:50 -09:00
RednedEpic 2bdf3d4d7f Merge branch 'master' into plugin 2020-02-26 19:31:19 -06:00
RednedEpic 41a24ca6ab Merge branch 'master' into plugin 2020-02-16 13:25:37 -06:00
AJ Ferguson 9008036ee4 Merge remote-tracking branch 'remotes/upstream/master' into chunk-fix
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/block/BlockTranslator.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaChunkDataTranslator.java
#	connector/src/main/java/org/geysermc/connector/utils/ChunkUtils.java
#	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
2020-02-10 17:38:56 -09:00
AJ Ferguson 516fc51162 Small changes 2020-02-05 20:23:06 -09:00
AJ Ferguson e4ab4b336c Chunk fixes 2020-02-05 19:32:33 -09:00
OnlyBMan 4dff067faa Add biomes 2020-02-05 21:10:34 -05:00
RednedEpic 6bb478bda4 Merge branch 'master' into block-entities 2020-01-19 22:35:33 -06:00
RednedEpic 52b23950ea Merge branch 'master' into plugin (should fix building) 2020-01-18 16:46:07 -06:00
RednedEpic dc594ee22c Update license headers
Certain headers for classes that are to be removed (e.g. plugin api) were not updated to prevent merge conflicts.
2020-01-08 21:05:42 -06:00
RednedEpic da8bd8a659 Actually fix signs and start on campfire/container translators
Since signs are not sent as block (tile) entities in chunks when it comes to later Minecraft versions, caching and sending the signs after the chunk packet has been sent was the only way to fix this. Sign data sending has intentionally been delayed in JavaUpdateTileEntityTranslator in the event that a chunk takes a long time to send and the block entity data is sent first.
2019-12-30 21:55:17 -06:00
RednedEpic e38322a3ec Nuke plugin API
https://media.giphy.com/media/oe33xf3B50fsc/giphy.gif
2019-12-21 11:35:48 -06:00
RednedEpic ebf6050d44 Start work on block entities (partially-functioning)
Most block entities should now *show up*. Some like signs will not as of yet, however when another player places one, they will display. Block entities are not yet fully functional and may only just be visible for the time being.
2019-11-30 18:22:11 -06:00
RednedEpic 20dda985bc Comment out unneeded collision code
This may be handy in the future, but right now it serves no purpose.
2019-10-16 13:10:27 -05:00
Tim203 15506cf5b4 Edited PlayerInit behavior and updated protocol lib to 2.3.0 2019-10-09 20:39:38 +02:00
Tim203 cbdf4f7633 Made paintings not crash the client, bugfixes and improvements 2019-09-21 09:42:44 +02:00
Redned 7f051bd6bc Start work on a basic chunk cache and block collision detection 2019-09-15 18:34:14 -05:00
RednedEpic 03bf12ee65 Implement more block mappings 2019-09-13 18:49:46 -05:00
SupremeMortal c9be13d487
Fix AIOOBE and remove PlayerSession usage. 2019-09-13 15:45:55 +01:00
SupremeMortal 9a9f67b45f
Get chunks working to some degree. 2019-09-13 11:49:18 +01:00
SupremeMortal ed7213d7c7
Remove IntelliJ files @EOT3000 added... and more chunk changes. 2019-09-13 10:39:38 +01:00
SupremeMortal 7a6d3f4604
Various chunk tweaks. 2019-09-13 10:08:48 +01:00
RednedEpic 383429d71b Fix a few chunk errors
This does not fix chunks on its own, they're still very much a work in progress, however this commit should hopefully resolve a few issues. The client might still crash due to some invalid mappings (most likely), but this should bring us one step closer.

With hardcoded values for the chunks, the client wouldn't crash (which leads me to the conclusion stated above) and on the occasions that it would not time out, the chunks were empty.

Co-authored-by: SupremeMortal <suprememortal@users.noreply.github.com>
2019-09-08 15:46:10 -05:00