Skip to content

Commit aec926b

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents c366a82 + 4f06afc commit aec926b

File tree

161 files changed

+3536
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+3536
-533
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,12 @@ body:
5050
label: Steps to Reproduce
5151
description: |
5252
List the steps on how we can reproduce the issue. Make sure we can easily understand what you mean with each step.
53+
**Please always include the client version(s) with which the issue happens. Ideally also try to find out, from what specific version onward/in what version range the issue happens.**
5354
placeholder: |
5455
Example:
5556
1. Login with a 1.21.3 client
5657
2. Place a sign
57-
3. The sign text is displayed wrong
58-
validations:
59-
required: true
60-
61-
- type: textarea
62-
attributes:
63-
label: Expected Behavior
64-
description: |
65-
Describe what exactly you expected to happen.
66-
placeholder: |
67-
Example: "Placed sign text should not disappear."
58+
3. The sign text disappears
6859
validations:
6960
required: true
7061

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: 2
22
updates:
33
- package-ecosystem: "github-actions"
4+
cooldown:
5+
default-days: 7
46
directory: "/"
57
schedule:
6-
interval: "weekly"
8+
interval: "monthly"

.github/workflows/build.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
name: Java CI with Gradle
2-
3-
on: [push, pull_request, workflow_dispatch]
1+
name: Build
2+
on: [pull_request, push, workflow_dispatch]
3+
permissions:
4+
contents: read
45

56
jobs:
67
build:
78
# Only run on PRs if the source branch is on a different repo. We do not need to run everything twice.
89
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
9-
1010
runs-on: ubuntu-24.04
11-
1211
steps:
1312
- name: Checkout Repository
14-
uses: actions/checkout@v5
13+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
1514
with:
1615
persist-credentials: false
1716
- name: Set up Gradle
18-
uses: gradle/actions/setup-gradle@v5
17+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
1918
- name: Set up JDK 17
20-
uses: actions/setup-java@v5
19+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
2120
with:
2221
distribution: 'temurin'
2322
java-version: 17
@@ -27,7 +26,7 @@ jobs:
2726
- name: Upload Artifacts to GitHub
2827
# Only upload on the preview repository as there is no CI job for it.
2928
if: ${{ github.repository == 'ViaVersion/ViaVersionDev' && github.ref_name == 'preview' }}
30-
uses: actions/upload-artifact@v4
29+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
3130
with:
3231
name: Artifacts
3332
path: build/libs/

.github/workflows/publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,27 @@ on:
66
- dev
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
publish:
1114
if: github.repository_owner == 'ViaVersion'
1215
runs-on: ubuntu-24.04
1316
steps:
1417
- name: Checkout Repository
15-
uses: actions/checkout@v5
18+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
1619
with:
1720
persist-credentials: false
1821
- name: Set up Gradle
19-
uses: gradle/actions/setup-gradle@v5
22+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
2023
- name: Set up JDK 17
21-
uses: actions/setup-java@v5
24+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
2225
with:
2326
distribution: 'temurin'
2427
java-version: 17
2528
check-latest: true
26-
- name: Build
29+
- name: Build with Gradle
2730
run: ./gradlew build
2831
- name: Publish to Hangar
2932
env:

.github/workflows/update-gradle-wrapper.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ on:
44
schedule:
55
- cron: "0 0 * * 0"
66

7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
711
jobs:
812
update-gradle-wrapper:
913
runs-on: ubuntu-24.04
1014
steps:
1115
- name: Checkout Repository
12-
uses: actions/checkout@v5
16+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
1317
with:
18+
fetch-depth: 0
1419
persist-credentials: false
1520
- name: Update Gradle Wrapper
16-
uses: gradle-update/update-gradle-wrapper-action@v2
21+
uses: gradle-update/update-gradle-wrapper-action@512b1875f3b6270828abfe77b247d5895a2da1e5 # 2.1.0

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
it works on any platform you can think of.**
99

1010
The base ViaVersion jar runs on Paper and Velocity. We also have projects integrating ViaVersion to run
11-
on Fabric, Forge, Bungee, Sponge, or as a standalone proxy to join from basically any client version on
11+
on Fabric, Forge, Sponge, or as a standalone proxy to join from basically any client version on
1212
any server version from the past decade. **See [HERE](https://viaversion.com) for an overview of the different Via\* projects.**
1313

1414
Note that ViaVersion will be able to **run best on either Paper servers or through [ViaFabricPlus](https://github.com/ViaVersion/ViaFabricPlus?tab=readme-ov-file#viafabricplus)** due to having
1515
direct access to client/server state and more extensive API.
1616

1717
Supported Versions:
1818

19-
![Table (https://i.imgur.com/zrQTcf0.png)](https://i.imgur.com/zrQTcf0.png)
19+
![Table (https://ci.viaversion.com/userContent/images/T.png)](https://ci.viaversion.com/userContent/images/T.png)
2020

2121
**User Docs:** https://docs.viaversion.com
2222

@@ -87,12 +87,10 @@ of the `build/libs` directory.
8787

8888
You need JDK 17 or newer to build ViaVersion.
8989

90-
9190
Mapping Files
9291
--------------
9392
Mapping files are generated and managed in our [Mappings repository](https://github.com/ViaVersion/Mappings). The generated mapping output is stored [here](./common/src/main/resources/assets/viaversion).
9493

95-
9694
Resources
9795
--------
9896

api/src/main/java/com/viaversion/viaversion/api/configuration/ViaVersionConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,4 +498,11 @@ public interface ViaVersionConfig extends Config {
498498
* @return true if enabled
499499
*/
500500
boolean cancelSwingInInventory();
501+
502+
/**
503+
* Returns the max length of error messages. Longer messages will be truncated unless in debug mode.
504+
*
505+
* @return the max length of error messages
506+
*/
507+
int maxErrorLength();
501508
}

api/src/main/java/com/viaversion/viaversion/api/data/MappingData.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@
2222
*/
2323
package com.viaversion.viaversion.api.data;
2424

25+
import com.viaversion.viaversion.api.minecraft.RegistryKey;
2526
import com.viaversion.viaversion.api.minecraft.RegistryType;
2627
import com.viaversion.viaversion.api.minecraft.TagData;
28+
import com.viaversion.viaversion.util.Key;
2729
import it.unimi.dsi.fastutil.ints.IntSet;
2830
import java.util.List;
31+
import java.util.Locale;
2932
import org.checkerframework.checker.nullness.qual.Nullable;
3033

3134
public interface MappingData {
@@ -172,8 +175,9 @@ public interface MappingData {
172175
default @Nullable FullMappings getFullMappings(final MappingType mappingType) {
173176
return switch (mappingType) {
174177
case ITEM -> getFullItemMappings();
178+
case BLOCK -> getFullBlockMappings();
175179
case SOUND -> getFullSoundMappings();
176-
case ENTITY -> getEntityMappings();
180+
case ENTITY_TYPE -> getEntityMappings();
177181
};
178182
}
179183

@@ -187,7 +191,12 @@ public interface MappingData {
187191
/**
188192
* Type of mappings. Currently only relevant for ops writing of generic holder classes and expanded when needed.
189193
*/
190-
enum MappingType {
191-
ITEM, SOUND, ENTITY
194+
enum MappingType implements RegistryKey {
195+
ITEM, BLOCK, SOUND, ENTITY_TYPE;
196+
197+
@Override
198+
public Key key() {
199+
return Key.of(name().toLowerCase(Locale.ROOT));
200+
}
192201
}
193202
}

api/src/main/java/com/viaversion/viaversion/api/data/MappingDataBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public void load() {
172172
}
173173

174174
private void loadTags(final RegistryType type, final CompoundTag data) {
175-
final CompoundTag tag = data.getCompoundTag(type.resourceLocation());
175+
final CompoundTag tag = data.getCompoundTag(type.identifier());
176176
if (tag == null) {
177177
return;
178178
}

api/src/main/java/com/viaversion/viaversion/api/data/item/ItemHasher.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
*/
2323
package com.viaversion.viaversion.api.data.item;
2424

25-
import java.util.List;
26-
2725
/**
2826
* Used for converting items to hashed items and caching them for later use during serverbound packets.
2927
* <p>
@@ -41,11 +39,4 @@ public interface ItemHasher {
4139
boolean isProcessingClientboundInventoryPacket();
4240

4341
void setProcessingClientboundInventoryPacket(boolean processingClientboundInventoryPacket);
44-
45-
/**
46-
* Sets the enchantment registry for this connection.
47-
*
48-
* @param enchantments list of enchantment identifiers
49-
*/
50-
void setEnchantments(List<String> enchantments);
5142
}

0 commit comments

Comments
 (0)