Commit Graph

155 Commits

Author SHA1 Message Date
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
Camotoy fe75320d6d
Add WORLD_IMMUTABLE flag to spectator mode (#1034)
Prevents the client from trying to interact with blocks
2020-07-27 18:18:22 -04:00
Camotoy e5fc66d72f
Fix elytra flying in creative mode (#956)
Sending a ClientPlayerAbilitiesPacket allows the player to successfully fly.

This commit also removes the setting of the CAN_FLY entity flag on creative mode. This did not break anything in my testing.
2020-07-18 15:57:37 -05:00
AJ Ferguson 699402e635 Fix bug with maps 2020-07-06 15:52:38 -08:00
rtm516 c454e443df Fix maps with negative IDs causing out of bounds errors 2020-07-06 23:36:31 +01:00
DoctorMacc 545dfa38f0 JavaUpdateTileEntityTranslator improvements
- Remove the use of deprecated functions
- Check for empty NBT (fixes errors on CubeCraft)
2020-07-06 16:22:07 -04:00
RednedEpic da1674c8d6 Update to Cloudburst NBT 2.0 2020-07-05 15:59:44 -05:00
DoctorMacc f2f59e4e37 Fill in renamed villager trading values (villager trading UI now opens) 2020-06-28 23:44:38 -04:00
RednedEpic 8e8bc2817a Return if sound is null and update mappings 2020-06-28 12:35:17 -05:00
Tim203 8f763dfc5f
Move common stuff used only by connector and bootstrap to connector 2020-06-28 00:27:00 +02:00
DoctorMacc 78df56c7a0 Update for 1.16.1 2020-06-24 11:14:11 -04:00
DoctorMacc 0471fa89f4 Bedrock 1.16 updating part 2 (Doesn't work) 2020-06-22 21:21:42 -04:00
DoctorMacc ea1a9e5427 Bedrock 1.16 updating part 1 2020-06-22 20:11:09 -04:00
DoctorMacc 63244ade53 Rename Geyser-Bukkit to Geyser-Spigot 2020-06-21 16:27:42 -04:00
DoctorMacc 427f4ef83d Merge master into Spigot rename 2020-06-21 16:21:47 -04:00
DoctorMacc 117cdf282d Begin updating Geyser. Requires manual MCProtocolLib compile 2020-06-20 22:24:45 -04:00
DoctorMacc 65f61ec703 Finish block state changes 2020-06-19 09:06:29 -04:00
DoctorMacc d6119375b2 (Incomplete) Update MCProtocolLib 2020-06-18 21:44:50 -04:00
rtm516 a6f91d5e15
Fix maps not loading in sometimes (#758)
* Fix maps not loading in sometimes
Adds a default map ID so the map item isnt invisible on bedrock.
Respond to the MapInfoRequestPacket so the image loads on first join.

* Remove debug log

* Add comments
2020-06-15 14:24:52 -04:00
DoctorMacc cc3b4c3eda Merge latest master; copy over old Geyser-Bukkit configs 2020-06-11 16:39:29 -04: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 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
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
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
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
RednedEpic 0215220ac1 Fix spectator mode 2020-05-24 14:46:36 -05:00
Camotoy 59da87a10f
Merge entity mounts branch to master (#589)
* Initial support for entity mounts*

* This only works for viewing other players on mounts/vehicles. Currently, mounting on vehicles through Geyser with bedrock does not work at all, though, you can see other Java players on mounts just fine.

* Fix Bedrock player mounting; add minecart offset

* Remove debug code

* Fix boat animation

* Remove debug code

* Add notice of possible steering flip

* Add translator for PlayerInputPacket

* Upload WIP code for BoatEntity.java

* Add animation for rowing on Bedrock side

* Clean up debug code, start on boat movement

* Add notice about flying horses

* Rename BedrockPlayerInputPacket.java to BedrockPlayerInputTranslator.java

* Delete BedrockPlayerInputPacket.java

* Use Translator Annotation again; Thanks to LegacyGamerHD

* Upload ineffective mount-on-login code

* Upload current changes with no debug code

* Change case where applicable

* Change Integer[] to int[]; Change schedule() to execute()

* Don't use Thread.Sleep() and instead call itself again

* Fix players not being linked on login/chunk load

* Little changes

* Minor improvements/fixes to boats

* Remove empty file

* Fix horse flying.

* Various entity mounting fixes

* Add mounting offsets for skeleton and zombie horses

* Another round of entity mount-related fixes

- Add offsets for skeleton and zombie horses (Thanks to tester DirtNasty)
- Boats can now be placed in survival (Thanks again to tester DirtNasty)
- Boats and minecarts can now shake

* Add translating for ServerVehicleMovePacket

* Cleaning up

* More cleaning up

* Add interactive tag support for mountable entities

* Boats move far more nicely

* Add horse heart visuals

* Update interactive tags

Co-authored-by: RednedEpic <redned235@gmail.com>
2020-05-23 16:39:17 -05:00
Camotoy 22a1073e54
Debugging improvements (#585)
* Debugging improvements

- Added an ObjectArrayList of packets we don't anticipate ever translating. Currently only holds ServerUpdateLightPacket which we don't use and probably don't need.
- Only print debugging logs from sounds if they failed to play.

* Add space
2020-05-23 16:11:54 -05:00
Camotoy 714c450291
Add players able to sleep in beds (#575)
* Add players able to sleep in beds

This commit sets the correct metadata and flags when the Java pose changes to sleeping.

* Player view while sleeping now works

* Fixed bed offset for other players
2020-05-23 16:09:11 -05:00
AJ Ferguson 2366559694 Store villager data in the player and fix wandering trader 2020-05-19 09:41:44 -08:00
AJ Ferguson e2d46c3d49 Work on villager trading 2020-05-18 21:15:29 -08:00
Camotoy 31d3d2e289
Add some elder guardian properties (#586)
- Adds the ELDER flag to all elder guardians, so they look like elder guardians and not giant regular guardians.
- Translates AFFECTED_BY_ELDER_GUARDIAN in JavaNotifyClientTranslator to add the elder guardian curse event.
2020-05-17 23:35:26 -05:00
rtm516 95b7055c10
Added map icons (#572)
* Added map icons

* Cleaned up and moved to enum
2020-05-16 23:58:00 -05:00
Camotoy 563cde2ade
Switch to client's translation for jukebox song name. (#573)
Just for consistency with the other part of the code.
2020-05-16 23:57:34 -05:00
RednedEpic 30e38b3a2f Add basic villager trading support (incomplete)
This commit implements basic functionality for villager trading. This is still incomplete and is buggy in areas such as with villager trades that have more than one input and trade inputs and outputs containing NBT.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-05-16 23:52:39 -05:00
Camotoy d5c14921e9
Add message when playing record (#549)
It appears that the record message is client-sided in Java Edition, so this sends a message whenever a record is played in-world.
2020-05-13 16:08:52 -05:00
Camotoy 64bfad2af9
Use Bukkit methods to send block sound (#522) 2020-05-10 15:25:28 -05:00
RednedEpic e58ffdd3c0 Add support for block break animations from java players to bedrock 2020-05-08 00:18:05 -05:00
Camotoy f11bae0bf0
Fix signs (#439)
* Fix signs on everything except Paper

* Fix sign line placement

* Update shulker box block entity

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-06 16:52:57 -05: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 25d3e0708f Map most all missing sounds 2020-05-03 23:56:07 -05:00
RednedEpic 1aca44ec7f Fix playsounds 2020-05-03 15:56:46 -05:00
RednedEpic 7f7d89e517 Add tnt sounds/particles and support for level event sounds 2020-05-03 01:48:38 -05:00
RednedEpic 3370ad3db9 Merge branch 'master' into feature/sounds 2020-05-02 23:06:53 -05:00
RednedEpic d7592d8216 Add back in explosion translator, add identifier support for sounds
Some sounds require an identifier be added, otherwise they don't properly play.
2020-05-02 01:56:08 -05:00
RednedEpic ff26dcad0d Start work on entity sounds, other misc implementations/fixes 2020-05-02 01:06:22 -05:00
Camotoy b07161b0a9
Add block values + note block note graphics (#455)
* Add note block visual without note pitch

* Add rest of block value code

* Add rest of block value code

* Fix pistons, somewhat

* Remove note block attempt

* Re-add whitespace

* Simplify sendPacket of BlockEventPacket

* Add note block visual without note pitch

* Add rest of block value code

* Fix pistons, somewhat

* Remove note block attempt

* Re-add whitespace

* Add mappings for noteblock pitch

* Change noteblock pitch code

* Noteblock Pitch Attempt

* Commit with PistonBlockEntityTranslator

* Cleanup for PR

* Improve pistons

Co-authored-by: blazewalker462 <blazewalker462@protonmail.com>
2020-05-01 00:51:23 -05:00
RednedEpic 0ac4789f2c Don't send sound updates if block of the same type already exists in placing position
This prevents the block place sound (most notably buttons or blocks that don't occupy one whole block) from spamming the client if they have their place button held down.
2020-04-30 00:45:27 -05:00