Commit Graph

855 Commits

Author SHA1 Message Date
YHDiamond fb283fcce8
Add advancements GUI (#1579)
Using /geyser advancements, Bedrock clients can get a visual on their progress.

Co-authored-by: yehudahrrs <47502993+yehudahrrs@users.noreply.github.com>
Co-authored-by: Olivia <chew@chew.pw>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk>
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-01-11 21:23:09 -05:00
rtm516 1c0cc4622a
Microsoft account authentication (#1808)
Microsoft accounts can now use Geyser, while maintaining full backwards compatibility with Mojang accounts.

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-01-11 15:52:02 -05:00
Camotoy 6aa74a2322
Allow server pong to appear if MOTDs are too long (#1445)
* Prevent server pong from appearing if MOTDs are too long

If the server MOTDs are 340 characters or longer, they will not appear. If this is the case, we trim each.

* Implement a more exact fix
2021-01-11 15:37:37 -05:00
Camotoy ade4c14911
Block breaking refactors (#1336)
Client-side block animations and reach checks are now added.

This commit also includes cleanup in BlockChangeTranslator as well as proper Netherite tool support for calculating block breaking.

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 22:43:36 -05:00
Camotoy fe23c79053
Implement book editing (#1117)
* Implement book editing

Updates the PR created by @ForceUpdate1 for 1.16 support. Seems to work fine now that hand support is in MCProtocolLib.

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>

* Remove debug line

* Simplify code

Currently still borked for creative mode.

* Fix books on creative

* Bug fixes

* Fix NPE?

* Blind fixes

* Send Book update before any player actions

* Remove debug prints

* Fix out of bounds for page replace and add

* Fix editing desync and remove empty pages from the end

* Send edit packet after signing

* Refactor

* Clean up and fix creative

* Apply suggestions from code review

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

Co-authored-by: ForceUpdate1 <mneuhaus44@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Co-authored-by: David Choo <davchoo3@gmail.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2021-01-07 19:40:34 -05:00
Camotoy 92c86cf15b
Null check tick thread (#1812) 2021-01-05 23:28:31 -05:00
Camotoy 0641800be7
Add Tickable interface (#1790)
* Add Tickable interface

By having a tickable interface, we're only dedicating one thread to ticking entities and running tasks as opposed to several. This will also help with implementing world border support.

* removeEntity already clears tickableEntities for us

* Only tick the entity if it's not being ticked
2021-01-05 18:41:20 -05:00
Camotoy 50b80a64d3
Dimension switching cleanup (#1694)
* Dimension switching cleanup

Cleans up dimension switching logic that should no longer be needed. Also fixes above Nether Bedrock building dimension switching.

* Clear thunder on dimension switch too

* Clarify fake dimension switch function name

* Javadoc that
2021-01-03 19:06:20 -05:00
YHDiamond 1a08e1104d
Fix stopsound bug (#1771)
* Fix stopsound not working bug

* removed extra imports

* Update JavaPlayerStopSoundTranslator.java

* Update JavaPlayerStopSoundTranslator.java

* Update JavaPlayerStopSoundTranslator.java

* Fix packet names and fix specific sounds not stopping

Co-authored-by: YHDiamond <47502993+yehudahrrs@users.noreply.github.com>
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2021-01-02 18:51:41 -05:00
Camotoy 396d1b6b61
Fix items on campfires (#1779) 2021-01-01 18:33:21 -05:00
Camotoy 186d94917a
Update copyright to 2021 (#1772)
* Update copyright to 2021

Free commit!

* These don't need a copyright

* Don't downgrade the mappings
2021-01-01 10:10:36 -05:00
Camotoy 77153e6d4a
Work around there being a void floor in Bedrock (#1405)
* Work around there being a void floor in Bedrock

If the player's Y coordinate is -38 or below, we teleport the player below the void floor and they can safely die. :)

* Don't teleport if below Y -40

* sigh

* Have floorY be its own variable

* Add more comment

* More comments

* Finish my thought
2020-12-31 20:05:00 -05:00
David Choo fe63a7f7ab
Fix pick block (#1753)
* Use pick_item mappings

* Update mappings

* Update mappings and fix wording
2020-12-29 18:09:42 -05:00
Camotoy d1c571d710
Fix anvil renaming (#1744)
Turns out it *was* our fault. Oops.
2020-12-26 19:51:11 -05:00
Camotoy eb5e4d79bb
Add visual damage support with thorns (#1728) 2020-12-26 15:39:46 -05:00
Camotoy 9fc6228fc0
GeyserSession: remove 32 render distance cap (#1546)
Having an incongruency between the server render distance and the client render distance appears to cause issues, and I have not been able to encounter such a crash.
2020-12-24 13:40:57 -05:00
Mark c67d91943c
HAProxy PROXY protocol support for downstream connections (#1688)
* Implement downstream PROXY protocol support

* Clarify the configuration version updating procedure

* Bump netty-resolver-dns to 4.1.56.Final

* Update Netty to .56

* Don't increase jar size by 2MB

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2020-12-23 20:47:29 -05:00
Camotoy dbfdae63f1
Add precautions to prevent stack traces on incomplete/unknown place sounds (#1717) 2020-12-20 20:42:14 -05:00
Camotoy b490dcfcbb
Improve doDaylightCycle translation (#1711)
Previously, we wouldn't send the time if the server was sending the same time with doDaylightCycle on. However, this isn't vanilla behavior (for Bedrock nor Java) and can occasionally cause irregularities. The time is now always sent to Bedrock clients, and a daylightCycle field is added to GeyserSession to keep track of the doDaylightCycle gamerule we need to send to Bedrock. Removing the map we used to store the time may also improve memory usage since this was never cleaned up.
2020-12-20 20:41:07 -05:00
Camotoy d69896b381
Fix NPE when no item can be found from a block (#1718)
This commit also removes an old map previously used for block entity translators
2020-12-20 20:40:21 -05:00
Camotoy c92150013f
Allow /help to work even if command suggestions are disabled (#1703)
* Allow /help to work even if command suggestions are disabled

This sends a minimal available commands packet to permit /help sending to the server.

* Fix whitespace

* Just send an empty packet

* Change variable name
2020-12-17 14:10:58 -05:00
Camotoy 82179797ab
Add proper ominous banner translation (#1692)
The ominous banner is a separate banner type in Bedrock. If we detect the ominous banner pattern, then we set the ominous banner type in NBT. This process is also checked vice-versa, allowing the ominous banner to be pulled from the Bedrock creative menu.
2020-12-16 12:50:16 -05:00
Camotoy 988fd66a85
Fix boat movement on land (#1668)
* Fix boat movement on land

1.16.100 appears to now take advantage of two newer entity metadata properties, IS_BUOYANT and BUOYANCY_DATA. Without the former, moving on land will not work properly. With the former and without the latter, moving in water no longer works.

* Use offset kind of
2020-12-15 13:09:40 -05:00
Camotoy aed1eef6e1
Update Adventure and fix some legacy hover events (#1681) 2020-12-15 11:24:02 -05:00
Camotoy 8b5ef7478c
Fix PS4 behavior with NetworkStackLatencyTranslator (#1678) 2020-12-14 15:47:17 -05:00
RednedEpic 31209be79e Ensure spawn radius is always 0 on the client's end
Fixes #1496 to the best of my knowledge. Any issue regarding the spawnpoint being off in terms of radius is up to the server at this point - would not be an us situation here.
2020-12-12 01:23:30 -06:00
RednedEpic 70031c65e7 Handle keepalives better (Closes #965)
Bedrock cuts off the last 3 digits consistently every time, meaning that the keepalive returned from bedrock is never fully accurate. However, if we multiply the value by 1000, then divide by 1000 when sending back to java, the proper value is returned.
2020-12-12 00:45:41 -06:00
RednedEpic a60ab4e80e Fix colored particles (Closes #1627) 2020-12-11 17:15:49 -06:00
Camotoy 87c52ad524
Add a config option for toggling showing coordinates (#1645) 2020-12-10 11:13:36 -05:00
rtm516 91cdda95db
Change version in query to use a more informative string (#1635)
* Change version in query to use a more informative string

* Fix removal of string

* Cleaner implementation of version

* Fix build

* Make more explicit what we're replacing

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-12-09 15:14:12 -05:00
Camotoy 8e274daa75
Change default protocol version to 422 (#1640)
* Change default protocol version to 422

* Update Protocol

* Actually update to Protocol 2.6.1-SNAPSHOT

* Keep languages commit the same
2020-12-09 11:30:59 -05:00
D3ATHBRINGER13 3bcdf4cca1
Add map and banner cloning and map extending (#1623)
* Add all the crafting multi uuids

* Remove BANNER_ADD_PATTERN

* Remove TODO
2020-12-07 14:27:42 -05:00
qlow a173005767
Added IGeyserPingPassthrough#getPingInformation(InetSocketAddress) to make logging of the pinging IPs possible (#1633)
Co-authored-by: qlow <info@qlow.eu>
2020-12-07 14:04:50 -05:00
Camotoy 2f294c9466
Fix player heads with a custom name (#1625) 2020-12-04 17:48:33 -05:00
OnlyBMan 2c0f3ec84d
Custom skull block support (#683)
Custom skulls are now implemented within the world when placed as a block. This is achieved by placing a fake player entity in the same spot.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: bundabrg <brendan@grieve.com.au>
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-12-04 16:55:24 -05:00
rtm516 2067143b57
Fix supported version display name (#1593)
* Fix supported version display name

* Update connector/src/main/java/org/geysermc/connector/network/BedrockProtocol.java
2020-12-03 19:21:32 -05:00
Camotoy f6a26410da
Supply a unique network ID for each recipe (#1615)
This fixes crashes in the Minecraft betas.
2020-12-02 15:39:24 -05:00
Camotoy ffd0c211fc
Fix villagers accepting books (#1605)
* Hopefully fix villagers accepting books

Fixes a couple of inconsistencies getting books from the creative menu.

* Fix fake news
2020-11-30 10:55:35 -05:00
rtm516 eb687e6638
Add check to fix NONE team color causing an NPE (#1602) 2020-11-28 15:10:19 +00:00
rtm516 da2dc69441
Update MCProtocolLib to Adventure migration (#1572)
* Use raw message data instead of converting the message

* Update MCProtocolLib to Adventure

* Ignore MCProtocolLib Adventure depend

* Remove unused dependency

* Fix isMessage handling `null` wrong.

* Update to adventure 4.2.0

* Clean-up isMessage

* Fix tests

* Clean-up of catch statements
2020-11-27 18:28:08 -05:00
Camotoy 11d9d30050
Fix mounts being unmountable with cache chunks (#1576)
Teleports need to be confirmed before riding
2020-11-27 17:56:32 -05:00
Carbuino 894275b8c4
Update UpstreamPacketHandler.java (#1570)
Changed the logging in message to display in the Action Bar instead of spamming the chat.
2020-11-24 11:14:02 -05:00
RednedEpic 896638ed84 Add support for latest beta (1.16.200.56) 2020-11-24 00:47:57 -06:00
rtm516 0268ef7d2b
Clean-up translation string implementation (#1567) 2020-11-21 00:44:33 +00:00
circuit10 a70d3e2150
Fix inconsistencies with movement and position (#699)
Movement is now significant better, especially on slabs, stairs, and other half-blocks.

Co-authored-by: RednedEpic <redned235@gmail.com>
Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
Co-authored-by: Tim203 <mctim203@gmail.com>
Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-20 14:56:39 -05:00
rtm516 4297215420
More chat fixes (#1557)
* Fix positional translation arguments not being handled

* Fix locale fallback

* Fix command completion

* Remove the expensive call to `containsKey`

* Unify adventure versions

* Fix some more formatting issues due to parity

* Fix and update tests

* Update adventure

* Add Javadoc for getCommandNames

* Formatting

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-18 23:18:36 +00:00
Camotoy 199778faea
Fix regressions from 1.16.100 (#1558)
* Fix regressions from 1.16.100

- Update mappings to fix recipe regressions and item differences
- Villager trading NBT now prefers the String identifier and not the integer ID

* Fix lodestone compass breaking
2020-11-18 01:10:49 -05:00
Camotoy 99558b61a6
Print reason for disconnect when outdated (#1556) 2020-11-17 13:28:08 -05:00
Camotoy 123b074cc7
Update to Bedrock 1.16.100 (#1552)
* Initial work on 1.16.100 - currently crashes the client

* Update runtime item states

* Use new Bedrock runtime IDs

Bedrock now hardcodes block runtime IDs in alphabetical order of the identifiers. This commit updates Geyser to accomodate.

- Remove runtime_block_states.dat and replace it with blockpalette.nbt
- Calculate the block runtime ID based on the order of the block palette
- Separate BlockTranslator.AIR into Bedrock and Java values
- Update the second layer of chunks to use air when not waterlogged
- Don't send item palette for now, as that's what crashes the game (will look into for v415)
- Other misc. changes

* Improve second layer chunk translation

* v415 support

- Add a message warning people they are on a beta version of Geyser

* Update to protocol v417

There are still some mappings changes that need to be gone through.

* Update runtime item states and clean up item frames

* Future-proof enchanment table

* Update for v418

* Update to v419

* Apply proper air ID to waterlogged chunk layer

* Fix missing import

* Remove beta warning

* Update mappings

* Manually patch runtime_item_states and send the ITEMS registry

* Update README

* Disable grindstone and smithing inventories (since they're broken)

* Use artifactory jenkins plugin (#1548)

* Use artifactory jenkins plugin

* Bump version to 1.2.0-SNAPSHOT

Co-authored-by: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com>
2020-11-17 11:03:12 -06:00
rtm516 512f8cd6c2
Rewrite message handling in MessageUtils to use Adventure (#1498)
* Rewrite message handling in MessageUtils to use Adventure

* Move to static Adventure commit to fix a bug

* Initial test implementation

* Add RGB downgrade test

* Move MessageUtils and rename

* Clean-up and fix tests

* Fixed sign and book content handling

* Fix blank signs causing NPEs

* Fix reset before message being stripped

* Add comment about the reset character

* Fix legacy style server motds

* Fix more messages being handled wrong

* Fix title packets being handled wrong

* Fix trailing formatting characters on the end of sign lines

* Add auto updating of Java locale files

* Add en_us locale updating and hash caching

* Changes to hash determining

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-11-16 23:57:57 +00:00