Commit graph

1199 commits

Author SHA1 Message Date
6e127edfd6
Stop using TrigMath class (#753)
* Stop using TrigMath class

* Use MathUtils
2020-06-09 14:50:21 +02:00
Camotoy
891490a443
Relocate Jackson dependency (#678) 2020-06-08 20:23:15 -05:00
1da130ab07
Fix initial movement speed (#751)
Bedrock clients move very fast by default until they get an attribute packet correcting the speed.
2020-06-08 08:13:25 -04:00
Redned
bafe7d430a
Update README to not include villager trading in what needs to be implemented 2020-06-06 13:15:54 -05:00
Redned
96d47548f7
Merge pull request #740 from GeyserMC/feature/villager-trading
Add villager trading support
2020-06-06 13:15:15 -05:00
DoctorMacc
afb12e923b Show villager display name 2020-06-06 00:04:05 -04:00
DoctorMacc
4c5d80e2e9 Update to latest master 2020-06-05 22:52:11 -04:00
rtm516
ccb44f604e
Fix query not following normal MC standards (#736)
Changed the query token generation to generate a 4 byte int represented as a null terminated string
2020-06-04 20:04:38 -04:00
AJ Ferguson
1d8995efe6
Add minimum delay between closing and opening a new window (#735)
Should fix new windows not showing up with some plugins like Lottery.
2020-06-04 14:49:32 -04:00
Camotoy
69a4cd3860
Use static commit of MCProtocolLib (#734)
This prevents changes upstream from immediately affecting Geyser workflow. This also removes the CodeMC repository in favor of Jitpack (which can use the commit hash as a version).
2020-06-03 22:57:36 -04:00
rtm516
5fca5d5ef5
Fix position of non-marker invisible armour stands (#697)
This adds the height of the armour stand to the position if its invisible and not a marker to counteract the scale being 0 therefore having a wrong nametag position
2020-06-03 21:12:16 +01:00
rtm516
5eef265f80
Fix display of some more entities (#726)
* Fix display of Evoker and Evoker Fangs

* Fix spawner minecart display

* Centeralise custom blocks for spawner and furnace minecarts

* Add comment explaining class
2020-06-02 18:16:04 -05:00
rtm516
a91eaa7821
Add item name translation (#559)
* Added item name translation

* Change to more appropriate NPE catch

* Remove whitespace

* Switch from try/catch to null checking

* Update mappings

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-06-02 16:33:37 -04:00
AJ Ferguson
3d357af739
Inventory Fixes (#602)
* Fix edge case when shift clicking an output slot

* Don't send window close packet if window is already closed

* Limit amount of window close packets sent to the client

Fixes hidden inventory bar bug

* Restrict user from unusable chest inventory slots

* Fix crafting table slot mappings

* Always send cursor update
2020-06-02 08:48:26 -08:00
Camotoy
18891a22f1
Check for instance of TranslationMessage (#722)
Checks for class of custom name ID in case it's translation message.
2020-06-02 10:45:33 -04:00
AJ Ferguson
05024dde8c
Don't manually grab MCProtocolLib's dependencies (#720)
* Don't manually grab MCProtocolLib's dependencies

* Add netty-resolver-dns and exclude netty-all
2020-06-01 22:19:16 -04:00
rtm516
5bb345daa6
Fix new minecart with block breaking furnace minecart display (#717)
This handles DISPLAY_ITEM and related properties separately on furnace minecarts in order to prevent overwriting furnace minecart graphics.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-06-01 15:59:46 -04:00
rtm516
ac5ab229f9
Fix Ender Crystal collision and explosion effects (#716)
Fixed the collision box being non-existent for ender crystals and fixed explosion effects not being displayed properly
2020-06-01 15:57:27 -04:00
Camotoy
215e5a7e21
Add custom minecart metadata (#713)
Adds display item, offset, and enable values.
2020-05-31 21:47:54 -04:00
rtm516
b8615874f9
Add furnace minecart (#712)
Adds the display of the furnace minecart, functions as expected.
2020-05-31 21:46:36 -04:00
Camotoy
b8a3009c9d
Ignore all downstream packet errors (#693)
* Ignore all downstream packet errors

Instead of kicking the client off because of an error, we simply display a logger warning and suppress the error.

* If debug mode, print stacktrace
2020-05-30 17:31:20 -05:00
Camotoy
64e3204611
Implement translator for AdventureSettingsPacket (#691)
* Implement translator for AdventureSettingsPacket

The AdventureSettingsPacket is translated into ClientSettingsPacket so the MAY_FLY and FLYING flags are sent to the server. This fixes double-jumping on some servers that rely on the client sending their flying information through this packet.

* Remove top-secret code analysis
2020-05-29 18:56:21 -05:00
5c8f6eb184
Fix relative teleports (#688) 2020-05-29 15:11:38 -04:00
rtm516
3f76ae1d48
Add ignore for ServerKeepAlivePacket (#664)
This packet is already handled by MCProtocolLib for us.

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-05-28 11:43:31 -04:00
rtm516
1a92f6974c
Add byte conversion to allow int NBT values for Fireworks (#681)
Firework NBT data might be either an int or byte and bedrock only takes it as a byte.

Co-authored-by: Arktisfox <65837019+Arktisfox@users.noreply.github.com>
2020-05-28 11:38:23 -04:00
DoctorMacc
ccf9eff7ca Update workflow 2020-05-26 10:47:34 -04:00
DoctorMacc
cae888eac9 Include PlatformType.java 2020-05-26 10:17:52 -04:00
DoctorMacc
af669f2e88 Rename internal ping passthrough variable 2020-05-26 10:11:28 -04:00
DoctorMacc
2dc755ca98 Rename Geyser-Bukkit to Geyser-Spigot
Despite the Bukkit suffix being correct in terms of the API, the name causes some people to download CraftBukkit instead of Spigot or Paper. All internal references to Bukkit have been renamed to Spigot.
2020-05-26 10:05:25 -04:00
Camotoy
14fcd77925
Fix entities stacking on top of each other when mounted (#660)
The offset was being called but not properly saved to a variable. The check will also not apply if there is only one mounted entity.
2020-05-25 22:43:29 -05:00
bundabrg
a929c411d2
Use authData UUID when sending playerlist packets to the client (#654)
Bedrock knows its own UUID and when it receives the Java uuid it will either crash (MCEE) or add a ghost player onto the playerlist (Bedrock).
This change will check if an entity is the client and if so replace the entities UUID with the AuthData UUID.

A refactor of JavaPlayerListEntryTranslator was also done as I got confused each time what it was doing so it is now hopefully a bit clearer and also fixes the case where an entity is removed but still exists on the server (Vanished).
2020-05-25 22:39:57 -05:00
bundabrg
cc6c7fe78d
When spawning don't add the player offset (#655)
Fixes falling when logging in
2020-05-25 22:35:26 -05:00
Arktisfox
0178492b59
Fix some book translation failures (#661)
Book pages can be sent as plain text rather than JSON. The text library doesn't use lenient parsing, so this fails, and the book isn't visible in the inventory.

This will convert the text into JSON if it's not already, before feeding it to the text library.
2020-05-25 21:19:37 -04:00
rtm516
d0545c57c4
Fix some fireworks colors and NPE of there is no NBT (#650)
Adds Bukkit colors and an additional NPE check
2020-05-25 17:57:10 -04:00
RednedEpic
6b68bbb413 Large refactoring to item translator and registry/util classes
- Merged ItemTranslator and ItemStackTranslator together.
- Split ItemTranslator into two classes: ItemTranslator and ItemRegistry. The registry is where items are registered, and the translator class is where item translation takes place.
- Made most of ItemTranslator's methods static and removed the initialization in Toolbox.
- Moved a handful of registry classes previously ending with 'Utils' to a 'Registry' class to be more fitting for the term.
- Moved inventory and block entity registration out of Translators.
- Renamed Translators to PacketTranslatorRegistry.
- Yeeted Toolbox.
- Minor cleanups and small refactors.
2020-05-24 20:07:05 -05:00
RednedEpic
7154e1c816 Strip Minecraft identifier when playing non-mapped sounds to allow for bedrock-exclusive sounds to be played 2020-05-24 14:56:05 -05:00
rtm516
3a39e9afee
Added Crossbow nbt translator (#590)
They still infinitely reload but they correctly track if they have data in now.
2020-05-24 15:51:30 -04:00
RednedEpic
0215220ac1 Fix spectator mode 2020-05-24 14:46:36 -05:00
RednedEpic
56d84c24d3 Reduce nesting in item nbt translators 2020-05-24 14:21:06 -05:00
RednedEpic
6dabc22d22 Add null check for fireworks tag (Closes #636) 2020-05-24 13:20:38 -05:00
Arktisfox
d918139c44
Check if firework item explosions tag is null (corresponding entity fix) (#633)
* Check if firework item explosions tag is null (corresponding entity fix)

* Add null check on flight

* Add null check around Flight

* Fix newline on if statement

* Fix newline on if statement, add null check on flight, remove debug code.

* fix missing space..
2020-05-24 13:15:02 -05:00
RednedEpic
286970676b Add null check for shield code (Fixes #644) 2020-05-24 13:06:25 -05:00
RednedEpic
259be96652 Update mappings submodule (Fixes #630) 2020-05-24 12:51:56 -05:00
RednedEpic
3d0dbff87b Remove effects on world/server change (Fixes #467)
The server re-sends these effects upon joining the new world or server.
2020-05-23 23:45:39 -05:00
RednedEpic
7f5414cdef Fix painting offset if height is equal to 3 (Fixes #629) 2020-05-23 23:27:16 -05:00
RednedEpic
ebd88c76aa Don't delay item frame interactions
Causes interacting (moving) an item in an item frame to delay by about half a second. This delay is still present on chunk load where this delay is absolutely needed in order to the item frame to show up.
2020-05-23 23:14:29 -05:00
RednedEpic
681cbeeae5 Add armor stand entity offset (Fixes #627) 2020-05-23 22:45:34 -05:00
Camotoy
fe6257bb38
Check if firework item explosions tag is null (#626) 2020-05-23 21:16:11 -04:00
RednedEpic
a49f6fe0e3 Specify API version for Bukkit to stop legacy material loading (Closes #595) 2020-05-23 18:58:36 -05:00
RednedEpic
0574feb87e Fix block breaking animations when in water (Closes #494) 2020-05-23 18:29:11 -05:00