Skip to content

Commit 5d150f7

Browse files
Merge remote-tracking branch 'origin/master'
# Conflicts: # build.gradle # gradle.properties # gradle/wrapper/gradle-wrapper.jar # gradle/wrapper/gradle-wrapper.properties # src/main/java/us/potatoboy/invview/ViewCommand.java
2 parents a64f87f + 0e6e964 commit 5d150f7

File tree

6 files changed

+34
-30
lines changed

6 files changed

+34
-30
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up JDK 17
20-
uses: actions/setup-java@v1
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v4
2121
with:
22-
java-version: 17
22+
java-version: 21
23+
distribution: 'temurin'
2324
- name: Grant execute permission for gradlew
2425
run: chmod +x gradlew
2526
- name: Build with Gradle
2627
run: ./gradlew build --stacktrace --info
2728
- name: Upload a Build Artifact
28-
uses: actions/upload-artifact@v2.1.4
29+
uses: actions/upload-artifact@v4
2930
with:
3031
name: InvView-Artifact
3132
path: build/libs/

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313

14-
- name: Set up JDK 17
14+
- name: Set up JDK 21
1515
uses: actions/setup-java@v3
1616
with:
1717
distribution: temurin
18-
java-version: 17
18+
java-version: 21
1919

2020
- name: Make gradlew executable
2121
run: chmod +x ./gradlew
@@ -24,7 +24,7 @@ jobs:
2424
run: ./gradlew clean build
2525

2626
- name: Upload assets to GitHub, Modrinth and CurseForge
27-
uses: Kir-Antipov/mc-publish@v3.2
27+
uses: Kir-Antipov/mc-publish@v3.3
2828
with:
2929
modrinth-id: jrDKjZP7
3030
modrinth-featured: false
@@ -37,4 +37,4 @@ jobs:
3737

3838
loaders: |
3939
fabric
40-
quilt
40+
quilt

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ minecraft_version=1.21.5
66
yarn_mappings=1.21.5+build.1
77
loader_version=0.16.11
88
# Mod Properties
9-
mod_version=1.4.15
9+
mod_version=1.4.16
1010
maven_group=us.potatoboy
1111
archives_base_name=InvView
1212
# Dependencies

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

src/main/java/us/potatoboy/invview/ViewCommand.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,17 @@ private static ServerPlayerEntity getRequestedPlayer(CommandContext<ServerComman
163163

164164
if (requestedPlayer == null) {
165165
requestedPlayer = minecraftServer.getPlayerManager().createPlayer(requestedProfile, SyncedClientOptions.createDefault());
166-
Optional<NbtCompound> compound = minecraftServer.getPlayerManager().loadPlayerData(requestedPlayer);
167-
if (compound.isPresent()) {
168-
ServerWorld world = minecraftServer.getWorld(
169-
DimensionType.worldFromDimensionNbt(new Dynamic<>(NbtOps.INSTANCE, compound.get().get("Dimension")))
170-
.result().get());
171-
172-
if (world != null) {
173-
((EntityAccessor) requestedPlayer).callSetWorld(world);
166+
Optional<NbtCompound> compoundOpt = minecraftServer.getPlayerManager().loadPlayerData(requestedPlayer);
167+
if (compoundOpt.isPresent()) {
168+
NbtCompound compound = compoundOpt.get();
169+
if (compound.contains("Dimension")) {
170+
ServerWorld world = minecraftServer.getWorld(
171+
DimensionType.worldFromDimensionNbt(new Dynamic<>(NbtOps.INSTANCE, compound.get("Dimension")))
172+
.result().get());
173+
174+
if (world != null) {
175+
((EntityAccessor) requestedPlayer).callSetWorld(world);
176+
}
174177
}
175178
}
176179
}

src/main/resources/fabric.mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"invview.mixins.json"
3333
],
3434
"depends": {
35-
"fabricloader": ">=0.7.2",
35+
"fabricloader": ">=0.15.10",
3636
"fabric": "*",
37-
"minecraft": ">=1.20.4"
37+
"minecraft": ">=1.20.5"
3838
}
3939
}

0 commit comments

Comments
 (0)