Compare commits

...
149 Commits
Author SHA1 Message Date
Nassim Jahnke adb10f5fe7 4.4.2 Release 2022-08-21 09:42:05 +02:00
Pablo Herrera a268d3d298 Fix userconnection availability on join event (PoC) (#2849) 2022-08-19 11:59:48 +02:00
creeper123123321 b60771e96e Fix block connection on non-full chunks (#3068) 2022-08-15 11:58:57 +02:00
Nassim Jahnke 435a986068 Properly enclose limiting of nbt reading
Fixes #3093
2022-08-14 22:24:31 +02:00
Nassim Jahnke 6c58f0980c Add utility method for initializing entity types 2022-08-13 15:36:57 +02:00
Nassim Jahnke e3dde71821 And the default return value 2022-08-11 19:09:33 +02:00
Nassim Jahnke 47b15e5fef Forgot a lock 2022-08-11 19:08:33 +02:00
Nassim Jahnke ed196bdf99 Clean up proxy protocol detector service 2022-08-11 19:04:22 +02:00
Nassim Jahnke 9247e87bbf Update InformativeException message 2022-08-08 21:01:27 +02:00
Nassim Jahnke 08727f959f Update 1.19.1 protocol version string 2022-08-05 16:05:31 +02:00
Nassim Jahnke 78342da180 And make the 1.19 chat registry nbt public 2022-08-04 16:29:35 +02:00
Nassim Jahnke 2b735172bd Make 1.19 chat decoration method public 2022-08-04 16:23:21 +02:00
_tomcraft b032a868bb add flamecord warking message (#3079) 2022-08-04 16:19:08 +02:00
Nassim Jahnke c4fa3b0ff8 Fix worldDataTrackerHandlerByKey world index 2022-08-04 15:51:51 +02:00
Nassim Jahnke 0c3a1803e1 Send block entity data after block break cancellation
Fixes #3077
2022-08-03 19:45:00 +02:00
Gero 04f9971dee Alter velocity modern forwarding version (#3078) 2022-08-03 16:17:52 +02:00
Elioby 9c3395b76b Use default painting mapping of 0 instead of -1 (#3073) 2022-08-01 21:07:40 +02:00
Nassim Jahnke f9bbb5b1a3 Fixup config comment saving
Fixes #3052, #2536
2022-08-01 12:28:44 +02:00
Nassim Jahnke 087bbdce1f Fix 1.19+ sign opening on ~1.12 servers
Fixes #3027
2022-07-30 18:10:45 +02:00
Nassim Jahnke 494bf62535 Bump version to 4.4.2-SNAPSHOT 2022-07-30 18:05:04 +02:00
Nassim Jahnke 4f2a5bb7e2 4.4.1 Release 2022-07-28 18:49:40 +02:00
Nassim Jahnke 1c511a82b2 Simplify component building 2022-07-28 14:56:35 +02:00
Nassim Jahnke 0c39723d1a Use translation key as text if not found 2022-07-28 13:43:08 +02:00
Nassim Jahnke 322af00e80 Handle 1.19 chat types 2022-07-28 13:14:28 +02:00
Nassim Jahnke a88747d904 Check for dimension equality after adding/replacing new fields 2022-07-28 11:47:12 +02:00
Nassim Jahnke e194d27bea Allow for more control over max path distance delta increase 2022-07-28 11:29:02 +02:00
Nassim Jahnke 22daa60eb6 4.4.0 Release 2022-07-27 19:01:23 +02:00
Nassim Jahnke 6eca07966c 1.19.1-rc3 2022-07-26 18:27:32 +02:00
Nassim Jahnke 56cc711c01 Update legacy palette handling as well 2022-07-25 13:18:13 +02:00
Nassim Jahnke c2ee558235 Fix reading of cursed Hypixel block palettes
Fixes #3037
2022-07-24 18:42:25 +02:00
Nassim Jahnke c8a010c390 Handle negative bits per value in palette 2022-07-24 17:30:30 +02:00
Nassim Jahnke 53c54485eb Cleanup optional types 2022-07-21 19:56:42 +02:00
Nassim Jahnke f42a308f2c 1.19.1-rc2 2022-07-21 19:06:34 +02:00
Nassim Jahnke 44250cbb99 1.19.1-pre6 2022-07-20 18:36:28 +02:00
Nassim Jahnke 55ffe72198 Fix overlay type check, update some comments 2022-07-15 21:33:55 +02:00
Nassim Jahnke a47dd2ecdb Support 1.19.1 clients on 1.19.0 servers 2022-07-15 21:03:56 +02:00
Nassim Jahnke 8a5233b6a1 what am I doing 2022-07-15 18:07:59 +02:00
Nassim Jahnke c8a1279e75 I was too hopeful 2022-07-15 16:51:12 +02:00
Nassim Jahnke 57ef90e851 1.19.1-pre5 2022-07-15 16:26:58 +02:00
_tomcraft 2262681351 Reference command permission to filter root suggestions (/via<tab>) (#3018) 2022-07-13 10:24:14 +02:00
Nassim Jahnke 56e1d0a69d Add optional type for smol cleanup 2022-07-09 11:47:58 +02:00
Nassim Jahnke 63ffb51df5 Fix player chat packet id
Mojang didn't register that in the correct spot alphabetically :(
2022-07-08 21:07:42 +02:00
Nassim Jahnke b33bd2ac2b 1.19.1-pre4 2022-07-08 16:20:54 +02:00
Nassim Jahnke 1afff77a0f 1.19.1-pre3 2022-07-06 17:47:47 +02:00
Nassim Jahnke 26af09f2a4 Update unsupported software list 2022-07-05 20:37:19 +02:00
Nassim Jahnke a8e475dbf0 Bump version to 4.4.0-SNAPSHOT
Too many funky things for a patch version
2022-07-01 12:35:57 +02:00
Nassim Jahnke 6388021c6d Fix 1.18.2->1.19.0 transforming, warn on 1.19.0 server 2022-06-30 20:00:55 +02:00
Nassim Jahnke f4aa96a5f8 1.19.1-pre2 2022-06-30 19:34:14 +02:00
Nassim Jahnke 6baae5e4f7 Merge remote-tracking branch 'origin/master' into dev 2022-06-30 10:42:27 +02:00
Nassim Jahnke 189b244a3a Delay ack by a tick, update warning for bad dimension registry 2022-06-30 10:41:54 +02:00
creeper123123321 12d538fe0d Use most similar dimension when the proper is not found (#2990) 2022-06-30 10:31:10 +02:00
_tomcraft 34f0dbf642 Safely handle bad configuration of 'block-protocols' and 'block-versions' (#2983) 2022-06-28 11:22:42 +02:00
Myles 548f80bb7c Add label for Feature Requests 2022-06-27 13:36:10 +01:00
Nassim Jahnke 9113a77331 1.19.1-rc1 except not really 2022-06-23 20:45:42 +02:00
Nassim Jahnke e3e85db02a 1.19.1-pre1 2022-06-21 21:01:24 +02:00
Camotoy c4d9209c81 Rewrite statistics for 1.19 (#2954) 2022-06-15 10:13:14 +02:00
Nassim Jahnke 24d887a53d Properly handle 1.19 acks on backend
Fixes #2935
2022-06-12 11:14:05 +02:00
Owen 702ced200e Generate a random seed to simulate random sounds (#2944) 2022-06-11 19:02:54 +02:00
qlowandqlow 40f5cb6e71 Fixed Bungeecord madness (#2934)
Co-authored-by: qlow <info@qlow.eu>
2022-06-09 17:10:22 +02:00
Nassim Jahnke 7ab0c41be6 Fix villager trade offers
Fixes #2919
2022-06-08 10:07:47 +02:00
Nassim Jahnke 66b21431f2 Fix sending of empty titles
Fixes #2923
2022-06-08 09:51:38 +02:00
Nassim Jahnke c6cd655f7e Bump version to 4.3.2-SNAPSHOT 2022-06-08 09:09:37 +02:00
Myles e9bccda259 4.3.1 Release - Fix set display preview being sent prematurely #2918 2022-06-07 23:11:21 +01:00
Nassim Jahnke 9a34ff2a51 4.3.0 Release 2022-06-05 11:31:07 +02:00
trickypr f01d9408de 1.19-rc2 (#2910) 2022-06-04 11:08:04 +02:00
Nassim Jahnke 15ff7b4c9d 1.19-rc1 2022-06-02 17:49:25 +02:00
Nassim Jahnke d47765ce45 1.19-pre5 2022-06-01 15:16:47 +02:00
Gero b82b067745 Actually make every message a system message (#2903) 2022-05-25 21:24:26 +02:00
Nassim Jahnke b7005f2400 1.19-pre3 2022-05-25 14:33:39 +02:00
roro1506HD 312fe3a851 Fixed wrong packet in MovementTransmitter when not using NMS player ticking (#2900) 2022-05-23 20:29:21 +02:00
Nassim Jahnke 69d50fa992 Join game fixes 2022-05-23 19:38:38 +02:00
Nassim Jahnke 1308dcb8dd No need to queue messages anymore
The client now uses the main registry instead of the level registry
2022-05-23 18:24:32 +02:00
Nassim Jahnke b4ecba8382 1.19-pre2 2022-05-23 18:03:18 +02:00
Nassim Jahnke 3529d6a229 Sanity check for queued messages 2022-05-21 11:00:55 +02:00
Nassim Jahnke 4213c4cce5 Queue up messages before the chat type registry has been sent
Fixes #2898
2022-05-20 15:32:10 +02:00
Nassim Jahnke 3d3e09977c Fix big fat dumb 2022-05-20 14:16:31 +02:00
Nassim Jahnke 90feac8c83 Update DebugHandler 2022-05-20 14:10:23 +02:00
Nassim Jahnke 80a807e366 Fix head yaw and pitch being swapped for mob spawns 2022-05-20 10:00:31 +02:00
Nassim Jahnke 3eba8ba922 More consistent client entity tracking 2022-05-20 09:53:39 +02:00
Nassim Jahnke 71a68bf36e Fix the client entity being untracked on world changes
Fixes #2894 and probably other things
2022-05-19 23:04:18 +02:00
Nassim Jahnke e67501cde3 Fix painting id being used too early
Fixes #2893
2022-05-19 19:54:27 +02:00
Nassim Jahnke 9aa7f5e879 Fix data stored on join being lost on Bungee
Bungee doesn't resend a join game for old servers, so we will have to keep data stored there across server switches
This likely fixes other issues with chunk data writing after server switches on legacy servers as well
2022-05-19 12:37:04 +02:00
Nassim Jahnke 854ecf0b47 1.19-pre1 2022-05-18 21:29:18 +02:00
Nassim Jahnke f538f25d63 Update OpenNBT 2022-05-16 13:33:41 +02:00
Nassim Jahnke 48a7fdc1d1 Fix command rewriter npe 2022-05-15 18:11:36 +02:00
Nassim Jahnke 1d5ae0e3e0 Use mappings instead of hardcoding entity ids 2022-05-14 11:58:45 +02:00
Nassim Jahnke f0462085d3 Add id->string methods to FullMappingData 2022-05-13 13:23:57 +02:00
Nassim Jahnke 7dc7b62cc9 22w19a (and a varying mix of removed and added dread) 2022-05-12 23:49:15 +02:00
Nassim Jahnke b9f80754e0 22w18a 2022-05-04 19:15:23 +02:00
Nassim Jahnke 5b9f775743 Use normal uuid type in gameprofile packet 2022-04-27 21:49:37 +02:00
Nassim Jahnke 0e66228a96 22w17a (and a lot of dread) 2022-04-27 21:06:34 +02:00
Nassim Jahnke 8df48bc378 StoredEntityData#remove 2022-04-20 20:16:08 +02:00
Nassim Jahnke d36d5d6def 22w16b 2022-04-20 20:00:46 +02:00
Nassim Jahnke 8b51430555 22w16a (except you have off-centered paintings) 2022-04-20 19:42:43 +02:00
Nassim Jahnke f71288e299 22w15a 2022-04-13 18:36:26 +02:00
Nassim Jahnke c0fc8195ce ?????????????????????????????????????????????????????
Also add removeTags and renameTag method to TagRewriter
2022-04-06 22:50:59 +02:00
Nassim Jahnke dd189411e6 New meta types (oh no) 2022-04-06 20:16:00 +02:00
Nassim Jahnke 4693b95bea 22w14a 2022-04-06 19:07:16 +02:00
Nassim Jahnke 596a42e312 22w13a 2022-03-31 18:46:35 +02:00
Nassim Jahnke 71944be482 Minor improvement to var int writing 2022-03-26 18:12:12 +01:00
Nassim Jahnke d1699fbb8d Merge remote-tracking branch 'origin/master' into dev 2022-03-24 19:07:28 +01:00
Nassim Jahnke bd880b608f 22w12a 2022-03-24 18:52:38 +01:00
Nassim Jahnke 3386431749 Comment out entity effect transformer 2022-03-21 10:40:52 +01:00
Nassim Jahnke c3fc8b5f18 Actually fix particles
Fixes #2850
2022-03-19 16:04:13 +01:00
Nassim Jahnke ec740476da Check world in BukkitBlockConnectionProvider
ignoring all of that still being unsafe
2022-03-19 09:37:34 +01:00
Nassim Jahnke a536ad1d10 Fix particles 2022-03-16 22:51:18 +01:00
Nassim Jahnke a1ae7818a2 Add namespace to argument type mappings 2022-03-16 20:25:00 +01:00
Nassim Jahnke 365b3a8a38 22w11a 2022-03-16 19:48:17 +01:00
RK_01 823eb1f392 Fix inventory acknowledgements being dropped sometimes (#2848) 2022-03-16 18:35:58 +01:00
Nassim Jahnke a12dfa405f 1.19 Experimental Snapshot 1 2022-03-16 18:21:41 +01:00
Nassim Jahnke 9798ec296a Update gradle wrapper to 7.4.1 2022-03-09 18:48:56 +01:00
Nassim Jahnke c1b993c01b Hotfix ProtocolLib 5.0.0 compatibility 2022-03-09 17:41:36 +01:00
Nassim Jahnke f55696a605 Bump version to 4.2.2-SNAPSHOT 2022-03-09 17:28:57 +01:00
Nassim Jahnke f361bd66ea 4.2.1 Release
Fix 1.18.2 client respawn on legacy servers
2022-02-28 16:01:41 +01:00
Nassim Jahnke 3dfb96dec9 4.2.0 Release 2022-02-24 09:22:47 +01:00
Nassim Jahnke 82ada0bcd8 Add new default command parser 2022-02-23 18:15:39 +01:00
Nassim Jahnke 28bd50a105 Fix legacy component text wrapping
Fixes #2821
2022-02-22 10:10:51 +01:00
Nassim Jahnke 46bd5814e3 Fix mutated dimension registry on old servers 2022-02-19 10:14:15 +01:00
Nassim Jahnke 4e9cddac8f 1.18.2 pre1 2022-02-18 17:49:45 +01:00
Nassim Jahnke a85c5578c1 22w07a 2022-02-16 18:40:50 +01:00
Nassim Jahnke 130ab70550 Fix registry on respawn 2022-02-09 19:57:54 +01:00
Nassim Jahnke ee27cbdd22 22w06a 2022-02-09 19:15:35 +01:00
Nassim Jahnke bd0d238f23 22w05a 2022-02-02 11:42:18 +01:00
Nassim Jahnke 3a5ac6f037 Merge branch 'master' into dev 2022-01-30 18:24:05 +01:00
Nassim Jahnke 8db0f3ac6e Fix uninjection from empty pipeline
Closes #2788
2022-01-30 18:21:28 +01:00
Nassim Jahnke 60eda447b4 22w03a 2022-01-19 18:05:36 +01:00
Nassim Jahnke d5f2388723 Add Item#copy 2022-01-11 17:10:31 +01:00
Nassim Jahnke d5a568b3fc Update copyright header 2022-01-09 22:36:07 +01:00
Nassim Jahnke 2704d70c1f Update Sponge module to API v8 2022-01-09 18:30:51 +01:00
Konicai 2a1e82ac6d Initial update to api-8 2022-01-09 16:17:41 +01:00
Nassim Jahnke 755a69e912 Update shadow 2022-01-05 10:03:07 +01:00
RK_01 101a4f63de Fixed 1.9.2 -> 1.9.3 block entity translation (#2784) 2022-01-03 11:05:15 +01:00
Nassim Jahnke 84bdaa79e2 Map walls to low variant in 1.15->1.16 2021-12-22 17:32:25 +01:00
Nassim Jahnke c3b6f5ce64 Update Gradle wrapper to 7.3.2 2021-12-22 17:31:30 +01:00
Nassim Jahnke 06a7260173 Fill dirt block tag to fix flower place animation 2021-12-20 10:53:11 +01:00
Nassim Jahnke 54236f718f Update shadow 2021-12-15 08:59:34 +01:00
Nassim Jahnke 2143e38d27 Don't make the client resize palettes on >8 bits 2021-12-08 21:31:53 +01:00
Nassim Jahnke 7d7651bc39 Update ProtocolVersion name for 1.18.1 2021-12-08 16:37:10 +01:00
RK_01 64c11b1f8f Fixed 1.9 -> 1.8 potion metadata packet order (#2765) 2021-12-08 12:49:13 +01:00
Myles a1a0926c4b Back to snapshot 2021-12-03 18:11:51 +00:00
Myles aade94a48f 4.1.1 release 2021-12-03 18:02:58 +00:00
Nassim Jahnke edebe64cf8 Fix handling of invalid biomes in 1.17->1.18 2021-12-03 13:33:52 +01:00
Nassim Jahnke ae4f837091 Fix double effect register 2021-12-02 20:17:24 +01:00
Lucas 5e6d87c8fd Map smoke directions from 1.13 to 1.13.1 (#2745) 2021-12-02 17:04:48 +01:00
Nassim Jahnke 20e9723d21 Update Gradle, particles finally work everywhere™️
Fixes #2746
2021-12-02 10:54:32 +01:00
Nassim Jahnke 54724ac540 Fix 1.18 block entity warnings on <1.12 servers 2021-12-01 19:54:43 +01:00
Nassim Jahnke a9c848e32e Cleanup palette type 2021-12-01 17:50:23 +01:00
Nassim Jahnke 02f9e87233 Fix invisible chests for 1.18 clients on very old servers
Fixes #2744
2021-12-01 17:50:09 +01:00
Nassim Jahnke 22d546edc0 Bump version to 4.1.1-SNAPSHOT 2021-12-01 15:37:39 +01:00
689 changed files with 33256 additions and 3652 deletions

No files matched your search

+2 -1
View File
@@ -1,5 +1,6 @@
name: Feature Request
description: Suggest a feature to be added
labels: [Feature Request]
body:
- type: textarea
@@ -34,4 +35,4 @@ body:
description: |
Does the feature apply to any specific version or environment?
validations:
required: false
required: false
+2
View File
@@ -18,6 +18,8 @@ hs_err_pid*
# Ignore IDEA directory
.idea/*
!.idea/copyright/*
!.idea/scopes/*
# Include the project's dictionary
!.idea/dictionaries/
+11
View File
@@ -0,0 +1,11 @@
<component name="CopyrightManager">
<settings>
<module2copyright>
<element module="ViaVersion-API" copyright="viaversion-mit" />
<element module="ViaVersion" copyright="viaversion-gpl" />
</module2copyright>
<LanguageOptions name="__TEMPLATE__">
<option name="addBlankAfter" value="false" />
</LanguageOptions>
</settings>
</component>
+6
View File
@@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion&#10;Copyright (C) 2016-2022 ViaVersion and contributors&#10;&#10;This program is free software: you can redistribute it and/or modify&#10;it under the terms of the GNU General Public License as published by&#10;the Free Software Foundation, either version 3 of the License, or&#10;(at your option) any later version.&#10;&#10;This program is distributed in the hope that it will be useful,&#10;but WITHOUT ANY WARRANTY; without even the implied warranty of&#10;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#10;GNU General Public License for more details.&#10;&#10;You should have received a copy of the GNU General Public License&#10;along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;." />
<option name="myName" value="viaversion-gpl" />
</copyright>
</component>
+6
View File
@@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion&#10;Copyright (C) 2016-2022 ViaVersion and contributors&#10;&#10;Permission is hereby granted, free of charge, to any person obtaining a copy&#10;of this software and associated documentation files (the &quot;Software&quot;), to deal&#10;in the Software without restriction, including without limitation the rights&#10;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&#10;copies of the Software, and to permit persons to whom the Software is&#10;furnished to do so, subject to the following conditions:&#10;&#10;The above copyright notice and this permission notice shall be included in all&#10;copies or substantial portions of the Software.&#10;&#10;THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&#10;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&#10;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&#10;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&#10;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&#10;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE&#10;SOFTWARE." />
<option name="myName" value="viaversion-mit" />
</copyright>
</component>
+3
View File
@@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="ViaVersion" pattern="com.viaversion.viaversion..*&amp;&amp;!src[viaversion-parent.viaversion-api*]:*..*" />
</component>
+3
View File
@@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="ViaVersion-API" pattern="src[viaversion-parent.viaversion-api*]:*..*&amp;&amp;!src[viaversion-parent.viaversion-api.main]:com.viaversion.viaversion.api.minecraft.nbt.*" />
</component>
+1 -1
View File
@@ -8,7 +8,7 @@
Supported Versions:
![Table (https://i.imgur.com/uDM9HR8.png)](https://i.imgur.com/RRa5KnK.png)
![Table (https://i.imgur.com/aSjHvQk.png)](https://i.imgur.com/aSjHvQk.png)
On Paper you may also use ProtocolSupport, but ensure you have the right build for your server version.
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -81,7 +81,10 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_16_4 = register(754, "1.16.4/5", new VersionRange("1.16", 4, 5));
public static final ProtocolVersion v1_17 = register(755, "1.17");
public static final ProtocolVersion v1_17_1 = register(756, "1.17.1");
public static final ProtocolVersion v1_18 = register(757, "1.18");
public static final ProtocolVersion v1_18 = register(757, "1.18/1.18.1", new VersionRange("1.18", 0, 1));
public static final ProtocolVersion v1_18_2 = register(758, "1.18.2");
public static final ProtocolVersion v1_19 = register(759, "1.19");
public static final ProtocolVersion v1_19_1 = register(760, "1.19.1");
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) {
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -25,6 +25,7 @@ package com.viaversion.viaversion.api;
import com.google.common.base.Preconditions;
import com.viaversion.viaversion.api.configuration.ViaVersionConfig;
import com.viaversion.viaversion.api.platform.ViaPlatform;
import com.viaversion.viaversion.api.platform.ViaServerProxyPlatform;
public final class Via {
private static ViaManager manager;
@@ -63,6 +64,11 @@ public final class Via {
return manager().getPlatform();
}
public static ViaServerProxyPlatform<?> proxyPlatform() {
Preconditions.checkArgument(manager().getPlatform() instanceof ViaServerProxyPlatform, "Platform is not proxying Minecraft servers!");
return (ViaServerProxyPlatform<?>) manager().getPlatform();
}
/**
* Register the ViaManager associated with the platform.
*
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -64,7 +64,7 @@ public interface ViaAPI<T> {
* @return API version incremented with meaningful API changes
*/
default int apiVersion() {
return 10;
return 15;
}
/**
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -28,6 +28,7 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.WorldIdentifiers;
import com.viaversion.viaversion.api.protocol.version.BlockedProtocolVersions;
import it.unimi.dsi.fastutil.ints.IntSet;
import org.checkerframework.checker.nullness.qual.Nullable;
public interface ViaVersionConfig {
@@ -455,4 +456,6 @@ public interface ViaVersionConfig {
WorldIdentifiers get1_16WorldNamesMap();
boolean cache1_17Light();
@Nullable String chatTypeFormat(String translationKey);
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,4 +29,13 @@ package com.viaversion.viaversion.api.connection;
* @see UserConnection#put(StorableObject)
*/
public interface StorableObject {
/**
* Returns whether the object should be uncached on a server switch.
*
* @return whether the object should be uncached on a server switch
*/
default boolean clearOnServerSwitch() {
return true;
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -58,6 +58,15 @@ public interface UserConnection {
*/
boolean has(Class<? extends StorableObject> objectClass);
/**
* Removes and returns an object from the storage.
*
* @param objectClass class of the object to get
* @param <T> type of the class you want to get
* @return removed storable object if present
*/
@Nullable <T extends StorableObject> T remove(Class<T> objectClass);
/**
* Put an object into the stored objects based on class.
*
@@ -83,6 +92,7 @@ public interface UserConnection {
/**
* Adds an entity tracker to the user connection.
* Does not override existing entity trackers.
*
* @param protocolClass protocol class
* @param tracker entity tracker
@@ -91,9 +101,18 @@ public interface UserConnection {
/**
* Clear stored objects and entity trackers.
* Used for Bungee when switching servers.
*/
void clearStoredObjects();
default void clearStoredObjects() {
clearStoredObjects(false);
}
/**
* Clear stored objects and entity trackers.
* If cleared for a proxy server switch, some stored objects and tracker data will be retained.
*
* @param isServerSwitch whether the clear is due to a server switch
*/
void clearStoredObjects(boolean isServerSwitch);
/**
* Sends a raw packet to the connection on the current thread.
@@ -0,0 +1,73 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.data;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Mappings containing the full string identifier mappings.
*/
public interface FullMappings {
Mappings mappings();
/**
* Returns the unmapped integer id for the given identifier, or -1 if not found.
*
* @param identifier unmapped string identifier
* @return unmapped int id, or -1 if not found
*/
int id(String identifier);
/**
* Returns the mapped integer id for the given mapped identifier, or -1 if not found.
*
* @param mappedIdentifier mapped string identifier
* @return mapped int id, or -1 if not found
*/
int mappedId(String mappedIdentifier);
/**
* Returns the unmapped string identifier for the given mapped id.
*
* @param id unmapped id
* @return unmapped string identifier
*/
String identifier(int id);
/**
* Returns the mapped string identifier for the given mapped id.
*
* @param mappedId mapped id
* @return mapped string identifier
*/
String mappedIdentifier(int mappedId);
/**
* Returns the mapped string identifier for the given unmapped identifier.
*
* @param identifier unmapped identifier
* @return mapped string identifier, or null if not found
*/
@Nullable String mappedIdentifier(String identifier);
}
@@ -0,0 +1,89 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.data;
import com.google.gson.JsonArray;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import org.checkerframework.checker.nullness.qual.Nullable;
public class FullMappingsBase implements FullMappings {
private final Object2IntMap<String> stringToId;
private final Object2IntMap<String> mappedStringToId;
private final String[] idToString;
private final String[] mappedIdToString;
private final Mappings mappings;
public FullMappingsBase(final JsonArray oldMappings, final JsonArray newMappings, final Mappings mappings) {
this.mappings = mappings;
stringToId = MappingDataLoader.arrayToMap(oldMappings);
mappedStringToId = MappingDataLoader.arrayToMap(newMappings);
stringToId.defaultReturnValue(-1);
mappedStringToId.defaultReturnValue(-1);
idToString = new String[oldMappings.size()];
for (int i = 0; i < oldMappings.size(); i++) {
idToString[i] = oldMappings.get(i).getAsString();
}
mappedIdToString = new String[newMappings.size()];
for (int i = 0; i < newMappings.size(); i++) {
mappedIdToString[i] = newMappings.get(i).getAsString();
}
}
@Override
public Mappings mappings() {
return mappings;
}
@Override
public int id(final String identifier) {
return stringToId.getInt(identifier);
}
@Override
public int mappedId(final String mappedIdentifier) {
return mappedStringToId.getInt(mappedIdentifier);
}
@Override
public String identifier(final int id) {
return idToString[id];
}
@Override
public String mappedIdentifier(final int mappedId) {
return mappedIdToString[mappedId];
}
@Override
public @Nullable String mappedIdentifier(final String identifier) {
final int id = id(identifier);
if (id == -1) {
return null;
}
final int mappedId = mappings.getNewId(id);
return mappedId != -1 ? mappedIdentifier(mappedId) : null;
}
}
@@ -0,0 +1,66 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.data;
import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
public class Int2IntMapMappings implements Mappings {
private final Int2IntMap mappings;
private final int mappedIds;
protected Int2IntMapMappings(final Int2IntMap mappings, final int mappedIds) {
this.mappings = mappings;
this.mappedIds = mappedIds;
mappings.defaultReturnValue(-1);
}
public static Int2IntMapMappings of(final Int2IntMap mappings, final int mappedIds) {
return new Int2IntMapMappings(mappings, mappedIds);
}
public static Int2IntMapMappings of() {
return new Int2IntMapMappings(new Int2IntOpenHashMap(), -1);
}
@Override
public int getNewId(final int id) {
return mappings.get(id);
}
@Override
public void setNewId(final int id, final int newId) {
mappings.put(id, newId);
}
@Override
public int size() {
return mappings.size();
}
@Override
public int mappedSize() {
return mappedIds;
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -102,4 +102,12 @@ public interface MappingData {
@Nullable Mappings getSoundMappings();
@Nullable Mappings getStatisticsMappings();
@Nullable Mappings getEnchantmentMappings();
@Nullable FullMappings getEntityMappings();
@Nullable FullMappings getArgumentTypeMappings();
@Nullable Mappings getPaintingMappings();
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -44,12 +44,16 @@ public class MappingDataBase implements MappingData {
protected final String newVersion;
protected final boolean hasDiffFile;
protected Int2IntBiMap itemMappings;
protected FullMappings argumentTypeMappings;
protected FullMappings entityMappings;
protected ParticleMappings particleMappings;
protected Mappings blockMappings;
protected Mappings blockStateMappings;
protected Mappings blockEntityMappings;
protected Mappings soundMappings;
protected Mappings statisticsMappings;
protected Mappings enchantmentMappings;
protected Mappings paintingMappings;
protected Map<RegistryType, List<TagData>> tags;
protected boolean loadItems = true;
@@ -75,10 +79,15 @@ public class MappingDataBase implements MappingData {
blockEntityMappings = loadFromArray(oldMappings, newMappings, diffmapping, "blockentities");
soundMappings = loadFromArray(oldMappings, newMappings, diffmapping, "sounds");
statisticsMappings = loadFromArray(oldMappings, newMappings, diffmapping, "statistics");
enchantmentMappings = loadFromArray(oldMappings, newMappings, diffmapping, "enchantments");
paintingMappings = loadFromArray(oldMappings, newMappings, diffmapping, "paintings");
entityMappings = loadFullMappings(oldMappings, newMappings, diffmapping, "entities");
argumentTypeMappings = loadFullMappings(oldMappings, newMappings, diffmapping, "argumenttypes");
Mappings particles = loadFromArray(oldMappings, newMappings, diffmapping, "particles");
if (particles != null) {
particleMappings = new ParticleMappings(oldMappings.getAsJsonArray("particles"), particles);
particleMappings = new ParticleMappings(oldMappings.getAsJsonArray("particles"), newMappings.getAsJsonArray("particles"), particles);
}
if (loadItems && newMappings.has("items")) {
@@ -102,6 +111,11 @@ public class MappingDataBase implements MappingData {
loadExtras(oldMappings, newMappings, diffmapping);
}
protected FullMappings loadFullMappings(JsonObject oldMappings, JsonObject newMappings, @Nullable JsonObject diffMappings, String key) {
Mappings mappings = loadFromArray(oldMappings, newMappings, diffMappings, key);
return mappings != null ? new FullMappingsBase(oldMappings.getAsJsonArray(key), newMappings.getAsJsonArray(key), mappings) : null;
}
private void loadTags(RegistryType type, JsonObject object, Object2IntMap<String> typeMapping) {
JsonObject tags = object.getAsJsonObject(type.resourceLocation());
List<TagData> tagsList = new ArrayList<>(tags.size());
@@ -148,7 +162,7 @@ public class MappingDataBase implements MappingData {
@Override
public int getNewParticleId(int id) {
return checkValidity(id, particleMappings.getMappings().getNewId(id), "particles");
return checkValidity(id, particleMappings.mappings().getNewId(id), "particles");
}
@Override
@@ -191,6 +205,26 @@ public class MappingDataBase implements MappingData {
return statisticsMappings;
}
@Override
public @Nullable Mappings getEnchantmentMappings() {
return enchantmentMappings;
}
@Override
public @Nullable FullMappings getEntityMappings() {
return entityMappings;
}
@Override
public @Nullable FullMappings getArgumentTypeMappings() {
return argumentTypeMappings;
}
@Override
public @Nullable Mappings getPaintingMappings() {
return paintingMappings;
}
protected @Nullable Mappings loadFromArray(JsonObject oldMappings, JsonObject newMappings, @Nullable JsonObject diffMappings, String key) {
if (!oldMappings.has(key) || !newMappings.has(key)) return null;
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -164,7 +164,7 @@ public class MappingDataLoader {
mapIdentifiers(output, oldIdentifiers, newIdentifiers, diffIdentifiers, true);
}
private static int mapIdentifierEntry(Map.Entry<String, JsonElement> entry, Object2IntMap newIdentifierMap, @Nullable JsonObject diffIdentifiers, boolean warnOnMissing) {
private static int mapIdentifierEntry(Map.Entry<String, JsonElement> entry, Object2IntMap<String> newIdentifierMap, @Nullable JsonObject diffIdentifiers, boolean warnOnMissing) {
int value = newIdentifierMap.getInt(entry.getValue().getAsString());
if (value == -1) {
// Search in diff mappings
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -38,6 +38,28 @@ public interface Mappings {
*/
int getNewId(int id);
/**
* Returns the mapped id from the given id, or the given default if unmapped/invalid.
*
* @param id unmapped id
* @param def fallback return value
* @return mapped id, or -1 if invalid/out of bounds
*/
default int getNewIdOrDefault(int id, int def) {
final int mappedId = getNewId(id);
return mappedId != -1 ? mappedId : def;
}
/**
* Returns whether the id has a mapping.
*
* @param id unmapped id
* @return whether the id has a mapped id
*/
default boolean contains(int id) {
return getNewId(id) != -1;
}
/**
* Manually maps a specific id.
*
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -25,39 +25,19 @@ package com.viaversion.viaversion.api.data;
import com.google.gson.JsonArray;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
public class ParticleMappings {
private final Object2IntMap<String> stringToId;
private final Mappings mappings;
public class ParticleMappings extends FullMappingsBase {
private final IntList itemParticleIds = new IntArrayList(2);
private final IntList blockParticleIds = new IntArrayList(4);
public ParticleMappings(JsonArray oldMappings, Mappings mappings) {
this.mappings = mappings;
stringToId = MappingDataLoader.arrayToMap(oldMappings);
stringToId.defaultReturnValue(-1);
public ParticleMappings(JsonArray oldMappings, JsonArray newMappings, Mappings mappings) {
super(oldMappings, newMappings, mappings);
addBlockParticle("block");
addBlockParticle("falling_dust");
addBlockParticle("block_marker");
addItemParticle("item");
}
/**
* Returns the unmapped integer id for the given identifier, or -1 if not found.
*
* @param identifier unmapped string identifier
* @return unmapped int id, or -1 if not found
*/
public int id(String identifier) {
return stringToId.getInt(identifier);
}
public Mappings getMappings() {
return mappings;
}
public boolean addItemParticle(final String identifier) {
final int id = id(identifier);
return id != -1 && itemParticleIds.add(id);
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,30 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.data.entity;
public interface DimensionData {
int minY();
int height();
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -26,6 +26,8 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Map;
public interface EntityTracker {
/**
@@ -151,4 +153,18 @@ public interface EntityTracker {
int biomesSent();
void setBiomesSent(int biomesSent);
EntityType playerType();
@Nullable DimensionData dimensionData(String dimension);
void setDimensions(Map<String, DimensionData> dimensions);
/**
* Adds the client player entity to the tracker.
* If the client entity has not been set yet, this will return false.
*
* @return whether the client has been tracked
*/
boolean trackClientEntity();
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -51,6 +51,15 @@ public interface StoredEntityData {
*/
@Nullable <T> T get(Class<T> objectClass);
/**
* Removes and returns an object from the storage if present.
*
* @param objectClass class of the object to remove
* @param <T> object type
* @return removed object if present
*/
@Nullable <T> T remove(Class<T> objectClass);
/**
* Stores an object based on its class.
*
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,8 +22,12 @@
*/
package com.viaversion.viaversion.api.debug;
import com.google.common.annotations.Beta;
import com.viaversion.viaversion.api.protocol.packet.Direction;
import com.viaversion.viaversion.api.protocol.packet.PacketType;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
@Beta
public interface DebugHandler {
/**
@@ -47,6 +51,14 @@ public interface DebugHandler {
*/
void addPacketTypeNameToLog(String packetTypeName);
/**
* Adds a packet id to the list of packet types to log.
* Packets will be checked on each protocol transformer, so this is best used on single protocol pipes.
*
* @param packetType packet type
*/
void addPacketTypeToLog(PacketType packetType);
/**
* Removes a packet type name from the list of packet types to log.
*
@@ -78,8 +90,16 @@ public interface DebugHandler {
* Returns whether the given packet should be logged.
* If no specific packet type has been added, all packet types will be logged.
*
* @param wrapper packet wrapper
* @param wrapper packet wrapper
* @param direction packet direction
* @return whether the packet should be logged
*/
boolean shouldLog(PacketWrapper wrapper);
boolean shouldLog(PacketWrapper wrapper, Direction direction);
default void enableAndLogIds(final PacketType... packetTypes) {
setEnabled(true);
for (final PacketType packetType : packetTypes) {
addPacketTypeToLog(packetType);
}
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,66 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.minecraft;
public final class GlobalPosition extends Position {
private final String dimension;
public GlobalPosition(final String dimension, final int x, final int y, final int z) {
super(x, y, z);
this.dimension = dimension;
}
public String dimension() {
return dimension;
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final GlobalPosition position = (GlobalPosition) o;
if (x != position.x) return false;
if (y != position.y) return false;
if (z != position.z) return false;
return dimension.equals(position.dimension);
}
@Override
public int hashCode() {
int result = dimension.hashCode();
result = 31 * result + x;
result = 31 * result + y;
result = 31 * result + z;
return result;
}
@Override
public String toString() {
return "GlobalPosition{" +
"dimension='" + dimension + '\'' +
", x=" + x +
", y=" + y +
", z=" + z +
'}';
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,28 +20,24 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.type.types.minecraft;
package com.viaversion.viaversion.api.minecraft;
import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.api.type.Type;
import io.netty.buffer.ByteBuf;
import java.util.UUID;
public class OptPositionType extends Type<Position> {
public OptPositionType() {
super(Position.class);
public final class PlayerMessageSignature {
private final UUID uuid;
private final byte[] signatureBytes;
public PlayerMessageSignature(final UUID uuid, final byte[] signatureBytes) {
this.uuid = uuid;
this.signatureBytes = signatureBytes;
}
@Override
public Position read(ByteBuf buffer) throws Exception {
boolean present = buffer.readBoolean();
if (!present) return null;
return Type.POSITION.read(buffer);
public UUID uuid() {
return uuid;
}
@Override
public void write(ByteBuf buffer, Position object) throws Exception {
buffer.writeBoolean(object != null);
if (object != null)
Type.POSITION.write(buffer, object);
public byte[] signatureBytes() {
return signatureBytes;
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -23,9 +23,9 @@
package com.viaversion.viaversion.api.minecraft;
public class Position {
private final int x;
private final int y;
private final int z;
protected final int x;
protected final int y;
protected final int z;
public Position(int x, int y, int z) {
this.x = x;
@@ -59,6 +59,10 @@ public class Position {
return z;
}
public GlobalPosition withDimension(String dimension) {
return new GlobalPosition(dimension, x, y, z);
}
@Deprecated/*(forRemoval=true)*/
public int getX() {
return x;
@@ -0,0 +1,47 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.minecraft;
public class Position3d {
private final double x;
private final double y;
private final double z;
public Position3d(final double x, final double y, final double z) {
this.x = x;
this.y = y;
this.z = z;
}
public double x() {
return x;
}
public double y() {
return y;
}
public double z() {
return z;
}
}
@@ -0,0 +1,47 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.minecraft;
public final class ProfileKey {
private final long expiresAt;
private final byte[] publicKey;
private final byte[] keySignature;
public ProfileKey(final long expiresAt, final byte[] publicKey, final byte[] keySignature) {
this.expiresAt = expiresAt;
this.publicKey = publicKey;
this.keySignature = keySignature;
}
public long expiresAt() {
return expiresAt;
}
public byte[] publicKey() {
return publicKey;
}
public byte[] keySignature() {
return keySignature;
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,3 +1,25 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.minecraft;
import com.viaversion.viaversion.api.connection.StorableObject;
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -170,6 +170,16 @@ public class Entity1_10Types {
public EntityType getParent() {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
}
public enum ObjectType implements com.viaversion.viaversion.api.minecraft.entities.ObjectType {
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -187,6 +187,16 @@ public class Entity1_11Types {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
for (EntityType type : EntityType.values()) {
TYPES.put(type.id, type);
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -191,6 +191,16 @@ public class Entity1_12Types {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
for (EntityType type : EntityType.values()) {
TYPES.put(type.id, type);
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -240,6 +240,16 @@ public class Entity1_13Types {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
for (EntityType type : EntityType.values()) {
TYPES.put(type.id, type);
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -224,6 +224,16 @@ public enum Entity1_14Types implements EntityType {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
TYPES = EntityTypeUtil.toOrderedArray(values());
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -226,6 +226,16 @@ public enum Entity1_15Types implements EntityType {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
TYPES = EntityTypeUtil.toOrderedArray(values());
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -231,6 +231,16 @@ public enum Entity1_16Types implements EntityType {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
TYPES = EntityTypeUtil.toOrderedArray(values());
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -235,6 +235,16 @@ public enum Entity1_16_2Types implements EntityType {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
TYPES = EntityTypeUtil.toOrderedArray(values());
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -240,6 +240,16 @@ public enum Entity1_17Types implements EntityType {
return parent;
}
@Override
public String identifier() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAbstractType() {
return id != -1;
}
static {
TYPES = EntityTypeUtil.toOrderedArray(values());
}
@@ -0,0 +1,274 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.viaversion.viaversion.api.minecraft.entities;
import com.google.common.base.Preconditions;
import com.viaversion.viaversion.api.protocol.Protocol;
import com.viaversion.viaversion.util.EntityTypeUtil;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Locale;
public enum Entity1_19Types implements EntityType {
ENTITY(null, null),
AREA_EFFECT_CLOUD(ENTITY),
END_CRYSTAL(ENTITY),
EVOKER_FANGS(ENTITY),
EXPERIENCE_ORB(ENTITY),
EYE_OF_ENDER(ENTITY),
FALLING_BLOCK(ENTITY),
FIREWORK_ROCKET(ENTITY),
ITEM(ENTITY),
LLAMA_SPIT(ENTITY),
TNT(ENTITY),
SHULKER_BULLET(ENTITY),
FISHING_BOBBER(ENTITY),
LIVINGENTITY(ENTITY, null),
ARMOR_STAND(LIVINGENTITY),
MARKER(ENTITY),
PLAYER(LIVINGENTITY),
ABSTRACT_INSENTIENT(LIVINGENTITY, null),
ENDER_DRAGON(ABSTRACT_INSENTIENT),
BEE(ABSTRACT_INSENTIENT),
ABSTRACT_CREATURE(ABSTRACT_INSENTIENT, null),
ABSTRACT_AGEABLE(ABSTRACT_CREATURE, null),
VILLAGER(ABSTRACT_AGEABLE),
WANDERING_TRADER(ABSTRACT_AGEABLE),
// Animals
ABSTRACT_ANIMAL(ABSTRACT_AGEABLE, null),
AXOLOTL(ABSTRACT_ANIMAL),
DOLPHIN(ABSTRACT_INSENTIENT),
CHICKEN(ABSTRACT_ANIMAL),
COW(ABSTRACT_ANIMAL),
MOOSHROOM(COW),
PANDA(ABSTRACT_INSENTIENT),
PIG(ABSTRACT_ANIMAL),
POLAR_BEAR(ABSTRACT_ANIMAL),
RABBIT(ABSTRACT_ANIMAL),
SHEEP(ABSTRACT_ANIMAL),
TURTLE(ABSTRACT_ANIMAL),
FOX(ABSTRACT_ANIMAL),
FROG(ABSTRACT_ANIMAL),
GOAT(ABSTRACT_ANIMAL),
ABSTRACT_TAMEABLE_ANIMAL(ABSTRACT_ANIMAL, null),
CAT(ABSTRACT_TAMEABLE_ANIMAL),
OCELOT(ABSTRACT_TAMEABLE_ANIMAL),
WOLF(ABSTRACT_TAMEABLE_ANIMAL),
ABSTRACT_PARROT(ABSTRACT_TAMEABLE_ANIMAL, null),
PARROT(ABSTRACT_PARROT),
// Horses
ABSTRACT_HORSE(ABSTRACT_ANIMAL, null),
CHESTED_HORSE(ABSTRACT_HORSE, null),
DONKEY(CHESTED_HORSE),
MULE(CHESTED_HORSE),
LLAMA(CHESTED_HORSE),
TRADER_LLAMA(CHESTED_HORSE),
HORSE(ABSTRACT_HORSE),
SKELETON_HORSE(ABSTRACT_HORSE),
ZOMBIE_HORSE(ABSTRACT_HORSE),
// Golem
ABSTRACT_GOLEM(ABSTRACT_CREATURE, null),
SNOW_GOLEM(ABSTRACT_GOLEM),
IRON_GOLEM(ABSTRACT_GOLEM),
SHULKER(ABSTRACT_GOLEM),
// Fish
ABSTRACT_FISHES(ABSTRACT_CREATURE, null),
COD(ABSTRACT_FISHES),
PUFFERFISH(ABSTRACT_FISHES),
SALMON(ABSTRACT_FISHES),
TROPICAL_FISH(ABSTRACT_FISHES),
// Monsters
ABSTRACT_MONSTER(ABSTRACT_CREATURE, null),
BLAZE(ABSTRACT_MONSTER),
CREEPER(ABSTRACT_MONSTER),
ENDERMITE(ABSTRACT_MONSTER),
ENDERMAN(ABSTRACT_MONSTER),
GIANT(ABSTRACT_MONSTER),
SILVERFISH(ABSTRACT_MONSTER),
VEX(ABSTRACT_MONSTER),
WITCH(ABSTRACT_MONSTER),
WITHER(ABSTRACT_MONSTER),
RAVAGER(ABSTRACT_MONSTER),
ABSTRACT_PIGLIN(ABSTRACT_MONSTER, null),
PIGLIN(ABSTRACT_PIGLIN),
PIGLIN_BRUTE(ABSTRACT_PIGLIN),
HOGLIN(ABSTRACT_ANIMAL),
STRIDER(ABSTRACT_ANIMAL),
TADPOLE(ABSTRACT_FISHES),
ZOGLIN(ABSTRACT_MONSTER),
WARDEN(ABSTRACT_MONSTER),
// Illagers
ABSTRACT_ILLAGER_BASE(ABSTRACT_MONSTER, null),
ABSTRACT_EVO_ILLU_ILLAGER(ABSTRACT_ILLAGER_BASE, null),
EVOKER(ABSTRACT_EVO_ILLU_ILLAGER),
ILLUSIONER(ABSTRACT_EVO_ILLU_ILLAGER),
VINDICATOR(ABSTRACT_ILLAGER_BASE),
PILLAGER(ABSTRACT_ILLAGER_BASE),
// Skeletons
ABSTRACT_SKELETON(ABSTRACT_MONSTER, null),
SKELETON(ABSTRACT_SKELETON),
STRAY(ABSTRACT_SKELETON),
WITHER_SKELETON(ABSTRACT_SKELETON),
// Guardians
GUARDIAN(ABSTRACT_MONSTER),
ELDER_GUARDIAN(GUARDIAN),
// Spiders
SPIDER(ABSTRACT_MONSTER),
CAVE_SPIDER(SPIDER),
// Zombies
ZOMBIE(ABSTRACT_MONSTER),
DROWNED(ZOMBIE),
HUSK(ZOMBIE),
ZOMBIFIED_PIGLIN(ZOMBIE),
ZOMBIE_VILLAGER(ZOMBIE),
// Flying entities
ABSTRACT_FLYING(ABSTRACT_INSENTIENT, null),
GHAST(ABSTRACT_FLYING),
PHANTOM(ABSTRACT_FLYING),
ABSTRACT_AMBIENT(ABSTRACT_INSENTIENT, null),
BAT(ABSTRACT_AMBIENT),
ALLAY(ABSTRACT_CREATURE),
ABSTRACT_WATERMOB(ABSTRACT_INSENTIENT, null),
SQUID(ABSTRACT_WATERMOB),
GLOW_SQUID(SQUID),
// Slimes
SLIME(ABSTRACT_INSENTIENT),
MAGMA_CUBE(SLIME),
// Hangable objects
ABSTRACT_HANGING(ENTITY, null),
LEASH_KNOT(ABSTRACT_HANGING),
ITEM_FRAME(ABSTRACT_HANGING),
GLOW_ITEM_FRAME(ITEM_FRAME),
PAINTING(ABSTRACT_HANGING),
ABSTRACT_LIGHTNING(ENTITY, null),
LIGHTNING_BOLT(ABSTRACT_LIGHTNING),
// Arrows
ABSTRACT_ARROW(ENTITY, null),
ARROW(ABSTRACT_ARROW),
SPECTRAL_ARROW(ABSTRACT_ARROW),
TRIDENT(ABSTRACT_ARROW),
// Fireballs
ABSTRACT_FIREBALL(ENTITY, null),
DRAGON_FIREBALL(ABSTRACT_FIREBALL),
FIREBALL(ABSTRACT_FIREBALL),
SMALL_FIREBALL(ABSTRACT_FIREBALL),
WITHER_SKULL(ABSTRACT_FIREBALL),
// Projectiles
PROJECTILE_ABSTRACT(ENTITY, null),
SNOWBALL(PROJECTILE_ABSTRACT),
ENDER_PEARL(PROJECTILE_ABSTRACT),
EGG(PROJECTILE_ABSTRACT),
POTION(PROJECTILE_ABSTRACT),
EXPERIENCE_BOTTLE(PROJECTILE_ABSTRACT),
// Vehicles
MINECART_ABSTRACT(ENTITY, null),
CHESTED_MINECART_ABSTRACT(MINECART_ABSTRACT, null),
CHEST_MINECART(CHESTED_MINECART_ABSTRACT),
HOPPER_MINECART(CHESTED_MINECART_ABSTRACT),
MINECART(MINECART_ABSTRACT),
FURNACE_MINECART(MINECART_ABSTRACT),
COMMAND_BLOCK_MINECART(MINECART_ABSTRACT),
TNT_MINECART(MINECART_ABSTRACT),
SPAWNER_MINECART(MINECART_ABSTRACT),
BOAT(ENTITY),
CHEST_BOAT(BOAT);
private static final EntityType[] TYPES = EntityTypeUtil.createSizedArray(values());
private final EntityType parent;
private final String identifier;
private int id = -1;
Entity1_19Types(final EntityType parent) {
this.parent = parent;
this.identifier = "minecraft:" + name().toLowerCase(Locale.ROOT);
}
Entity1_19Types(final EntityType parent, @Nullable final String identifier) {
this.parent = parent;
this.identifier = identifier;
}
@Override
public int getId() {
if (id == -1) {
throw new IllegalStateException("Ids have not been initialized yet (type " + name() + ")");
}
return id;
}
@Override
public String identifier() {
Preconditions.checkArgument(identifier != null, "Called identifier method on abstract type");
return identifier;
}
@Override
public @Nullable EntityType getParent() {
return parent;
}
@Override
public boolean isAbstractType() {
return identifier == null;
}
public static EntityType getTypeFromId(final int typeId) {
return EntityTypeUtil.getTypeFromId(TYPES, typeId, ENTITY);
}
public static void initialize(final Protocol<?, ?, ?, ?> protocol) {
EntityTypeUtil.initialize(values(), TYPES, protocol, (type, id) -> type.id = id);
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +30,7 @@ public interface EntityType {
* Returns the entity id.
*
* @return entity id
* @throws IllegalStateException if ids have not been loaded yet
*/
int getId();
@@ -47,6 +48,22 @@ public interface EntityType {
*/
String name();
/**
* Returns the entity's Vanilla identifier.
*
* @return entity identifier
* @throws IllegalArgumentException if {@link #isAbstractType()} returns true
*/
String identifier();
/**
* Returns whether the type does not represent an actual entity, e.g. animal or monster.
*
* @return whether the type does not represent an actual entity
*/
boolean isAbstractType();
@Deprecated/*(forRemoval = true)*/
default boolean is(EntityType... types) {
for (EntityType type : types) {
if (this == type) {
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -92,6 +92,11 @@ public class DataItem implements Item {
this.tag = tag;
}
@Override
public Item copy() {
return new DataItem(identifier, amount, data, tag);
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -87,4 +87,11 @@ public interface Item {
* @param tag item tag
*/
void setTag(@Nullable CompoundTag tag);
/**
* Returns a copy of the item.
*
* @return copy of the item
*/
Item copy();
}
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
* Copyright (C) 2016-2022 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Loaded 100 of 689 files, more files were not shown because too many files have changed in this diff. Show more