Commit Graph

60 Commits

Author SHA1 Message Date
Dan Mulloy
6aaf0ec26b
Normalize line endings to LF 2022-12-07 13:52:09 -05:00
lennoxlotl
86e586da26
Fix not being able to read effects from RemoveEntityEffect packet (#1908)
fix being unable to read from RemoveEntityEffect due to wrong alias order
2022-11-26 22:54:33 +00:00
Nassim Jahnke
069783a353
Fix getEntityClass full qualifier (#1967) 2022-11-26 17:49:35 -05:00
opl-
cc95e19ba4
Fix Magma support (#1953)
Tested with Magma v1.16.5 and Paper v1.18.2
2022-11-25 15:13:33 -05:00
caoli5288
69ae3656b5
Fix StreamSerializer backwards compatibility (#1868)
Fixes #1813
2022-10-16 18:37:08 +00:00
Nassim Jahnke
b7c1e096c4
Support Mojang mapped servers (#1869) 2022-08-23 20:44:48 -04:00
Pasqual Koschmieder
1beb95115f
Improve cloning tests (#1822) 2022-08-12 02:07:38 +00:00
Pasqual Koschmieder
2be216899a
use correct packet for chat extensions on 1.19+ (#1824) 2022-08-10 20:59:03 +00:00
Pasqual Koschmieder
575174580e
Small update for 1.19.2 (#1814) 2022-08-10 16:49:01 -04:00
Miklas
7fd4ec3172
Support for 1.18+ ClientboundLevelChunkWithLightPacket (#1592) 2022-08-06 18:52:42 -04:00
Pasqual Koschmieder
7ddfd4f347
Fix & improve PacketContainer serialization & cloning (#1794) 2022-07-31 11:54:26 -04:00
Pasqual Koschmieder
d40762e69d
Update to 1.19.1 (#1699)
* add support for enforceSecureChat in ServerPing
* remove security exception check from test
2022-07-27 17:09:25 -04:00
games647
11a8184c3e
Add StructureModifier for extracting the signature data in chat and login packets (#1742) 2022-07-26 13:29:34 -04:00
Pasqual Koschmieder
c3dc00de05
fix two smaller issues (#1774) 2022-07-26 13:20:07 -04:00
Photon-Github
624f6aaca6
Anonymous Class Replacement 2022-07-24 11:02:56 -04:00
Pasqual Koschmieder
c5f0550953
Use MethodHandles for reflection (#1561)
* don't enforce async calls for thread-safe listeners (closes #1551)
* cleanups, remove structure compiling
* improve cloning a bit
* fix small issue in no-op structure modifier
* remove last usages of FieldUtils
* improve and fix equality check in container test
2022-07-24 10:16:05 -04:00
Pasqual Koschmieder
23dac3287b
detect server reloads and print a big warning message (#1733) 2022-07-16 11:00:01 -04:00
Photon-GitHub
a2bf242097
Cleanup (#1603)
* Replace guava Charsets with StandardCharsets.

* Use try-with-resources

* Faster Util asList, inline getOnlinePlayers.

* Use direct ArrayList allocation.

* Use new instead of Lists#...

* Use new instead of Lists#...

* Faster looping.

* Use switch.

* Remove diamond operators.

* Use ArrayDeque instead of LinkedList.

* Actually conform to the documentation and always use an ArrayList as backing list.

* Potentially breaking change: Use switch instead of startsWith as this e.g. causes "n" to be interpreted as "names" and any future new commands starting with "n" will be ignored.

* Use addAll().

* Remove IntegerSet. Unused and also covered by fastutils IntSet.

* Much faster boolean parsing. Might have breaking changes as parameterName is now checked after the false block.

* Make most fields final, fix JavaDoc and remove diamond operators.

* Make fields final.

* Much cleaner getAllInterfaces() method.

Co-authored-by: Dan Mulloy <dev@dmulloy2.net>
2022-06-25 11:32:42 -04:00
Pasqual Koschmieder
a0a5469988
Update to Minecraft 1.19 (#1601) 2022-06-07 21:24:31 -04:00
Photon-GitHub
240920d642
Diamond inference cleanup (#1593) 2022-05-25 23:30:08 -04:00
Pasqual Koschmieder
9487c42985
Update to 1.18.2 (#1521) 2022-02-28 13:36:20 -05:00
Pasqual Koschmieder
e77f8ced4c
Update to 1.18.1 (#1461)
No changes required except for registering the protocol version
2021-12-19 20:50:22 -05:00
Pasqual Koschmieder
40b6c66491
Update to minecraft 1.18 (#1446) 2021-11-30 14:10:03 -05:00
LewUwU
723fc2c7ec
Update NettyVersion.java (#1438)
The issue was caused due to a change in the pom of netty (for dependencies)

(#Generated by netty-parent/pom.xml
#Mon, 11 Oct 2021 13:22:16 +0200

netty-all.version=4.1.69.Final
netty-all.buildDate=2021-10-11 13\:22\:16 +0200
netty-all.commitDate=2021-10-11 09\:21\:07 +0000
netty-all.shortCommitHash=34a31522f0
netty-all.longCommitHash=34a31522f0145e2d434aaea2ef8ac5ed8d1a91a0
netty-all.repoStatus=dirty)

Is not more netty-common, now is netty-all
2021-11-14 12:09:34 -05:00
Pim van der Loos
5dda8c8ab1
Fix entity tracker methods for 1.17 (#1354)
- In 1.17, EntityTrackerEntries use ServerPlayerConnections instead of EntityPlayers as they did before. This caused the updateEntity to silently fail when removing the players from the trackedPlayers collection (of connections). This was resolved by retrieving the connections of the players before removing them from the list on 1.17+.
The getEntityTrackers method failed because it could not find any players for the same reason. This was resolved by retrieving the player from the connection before retrieving the Bukkit player from the EntityPlayer object when running on 1.17+.
- This fixes dmulloy2/ProtocolLib#1340
2021-07-26 23:51:24 -07:00
Dan Mulloy
153dd61994
Update to 1.17.1
Fixes #1315
2021-07-08 23:22:56 -04:00
Dan Mulloy
7a8fce224e
Set mc object regex in 1.17
Fixes #1271
2021-06-26 20:57:39 -04:00
Dan Mulloy
9ca7c91a76
Simplify packet registry 2021-06-24 17:14:00 -04:00
Dan Mulloy
4fc476a125
Use right int 2 object map class for Paper
Addresses #1217
2021-06-20 12:42:41 -04:00
Pasqual Koschmieder
90a38cc15c
Restore backwards compatibility (#1235)
* Remove usages of net.minecraft and craftbukkit
* Restore packet type backward compatibility (tested on 1.8)
* Re-add last removed packets
* Fix sub class naming for newer minecraft versions
2021-06-19 22:20:54 -04:00
Pasqual Koschmieder
0a32f24f08
Fix EntityUseAction & Hand read for minecraft 1.17 (#1230) 2021-06-18 10:47:48 -04:00
Dan Mulloy
fa317c1167
Working on live server 2021-06-14 16:36:22 -04:00
Dan Mulloy
190ca1ff6a
Almost there, /theoretically/ 2021-06-13 15:57:23 -04:00
Dan Mulloy
c51930121f
Fix a bunch more classpaths
Also worked on fixing some wrappers
2021-06-13 11:36:44 -04:00
Dan Mulloy
c7a8d734d4
Fix some more class paths 2021-06-12 23:53:09 -04:00
Dan Mulloy
b446cf2183
Update unit tests to 1.17, fix packet lookups 2021-06-12 15:28:01 -04:00
LewUwU
0c01a11755
Fixed protocol injection with latest netty on minecraft 1.11 and below (#1067) 2021-05-01 15:51:52 -04:00
Dan Mulloy
97972acee8
Add converter for game state ids
Fixes #1041
2021-02-27 15:38:05 -05:00
Dan Mulloy
30fe81d366
Move getPacketDescription from the command to HexDumper as a public API
Related to filoghost/HolographicDisplays#385
2021-01-04 13:35:58 -05:00
PimvanderLoos
b54dd49426
Replace CGLib with ByteBuddy (#984)
- The gclib dependency in the EnchancerFactory has been removed. All classes that used the actual factory part of it have been updated to use bytebuddy instead. This class will have to be removed at some point, but at the moment it is still used for accessing its class loader.
- Renamed EnhancerFactory to ByteBuddyFactory. All ByteBuddy actions should go through this now. Every subclass created here implements the ByteBuddyGenerated interface. This makes it possible to recognize classes generated using ByteBuddy (by default, it doesn't leave such a trace).
- Removed the method DefaultInstances#forEnhancer(Enhancer). This method isn't used anywhere; the last trace of usage of the method I could find was in 2013 (in the NetworkServerInjector). External plugins (I couldn't find any that used it), they should really have their own implementation, given that they already require an instance of an Enchancer. As such, I feel it is safe to remove rather than update it.
2021-01-04 00:24:34 -05:00
Dan Mulloy
26274fed52
backwards compat 2021-01-02 23:59:13 -05:00
Dan Mulloy
b7132196fb
Fix ChatExtensions exception
Fixes #1045
2021-01-02 23:19:20 -05:00
Dan Mulloy
13b3d8679d
Update ChatExtensions for 1.16.4
Fixes #1044
2020-12-27 00:04:11 -05:00
PimvanderLoos
bbb053aa4e
Fix Java 15 (#1025)
- Implemented a fix for the incompatibility with Java 15. This incompatibility was caused by the fact that the lambda generated in the NMS.NetworkManager is a hidden class in J15. Starting in Java 15, final fields in hidden classes can no longer be modified regardless of the 'accessible' flag. (see https://openjdk.java.net/jeps/371 "Using a hidden class", point 3). To circumvent this issue, this retrieves the data from the existing fields in the hidden class (a runnable or a callable) other than the packet. It then retrieves the constructor of the hidden class and instantiates it using the previously-retrieved data and the modified packet instance (this code is only used if the packet instance changed).
- Introduced a new ObjectReconstructor class that does all the fields/constructor discovering/accessing etc. The Runnable and Callable methods each get one instance of this class so that we can avoid having to get the fields/constructors and set them accessible every time we want to replace a packet.

Co-authored-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
2020-12-23 14:57:16 -05:00
Aurora
7bac4ec634
Update to 1.16.4 (#1007) 2020-11-09 15:11:48 -05:00
Dan Mulloy
f381f0a2f7
Fix multi block change cloning
Fixes #990
2020-10-19 11:04:11 -04:00
Dan Mulloy
553e4b6813
Update to 1.16.3 2020-10-19 11:02:32 -04:00
Dan Mulloy
bdaa843f2d
Update to 1.16.2
Fixes #941
Fixes #944
Fixes #934
2020-08-24 13:19:49 -04:00
Dan Mulloy
658da31d46
Initial support for 1.16 (#880)
Note that things may not initially work as expected. There are known issues (see #880) relating to dimensions, chat packets, and tile entities. There were also internal changes to attributes, though hopefully those are fixed. As always, report issues on GitHub.
2020-06-28 15:59:30 -04:00
Niklas Seyfarth
5f204d798c
StreamSerializer: Reduce duplicated code and allow (de)serialization to and from byte arrays. (#875) 2020-06-21 12:58:37 -04:00