Skip to content

Commit a1ce3ab

Browse files
authored
Merge pull request #14 from tildejustin/main
upgradle etc, better remap = false usage, 1.14-1.15.2 compat fix
2 parents ea6f34b + ab395c8 commit a1ce3ab

File tree

20 files changed

+31
-35
lines changed

20 files changed

+31
-35
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: build
2-
on: [ push, pull_request, workflow_dispatch ]
2+
on:
3+
push:
4+
# ignores tags
5+
branches:
6+
- "**"
7+
pull_request:
8+
workflow_dispatch:
39

410
jobs:
511
build:
@@ -8,18 +14,12 @@ jobs:
814
- name: checkout repository
915
uses: actions/checkout@v4
1016
- name: validate gradle wrapper
11-
uses: gradle/wrapper-validation-action@v1
12-
- name: setup java
13-
uses: actions/setup-java@v4
14-
with:
15-
distribution: "temurin"
16-
java-version: 17
17+
uses: gradle/actions/wrapper-validation@v4
1718
- name: build
1819
run: |
1920
chmod +x ./gradlew
2021
./gradlew build
2122
- name: upload artifacts
22-
uses: actions/upload-artifact@v3
23+
uses: actions/upload-artifact@v4
2324
with:
2425
path: build/libs/
25-

1.12/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
minecraft_version=1.12
2-
yarn_build=542
2+
yarn_build=566

1.12/src/main/java/net/set/spawn/mod/mixin/ServerPlayerEntityMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private int setSpawnX(Random random, int bounds, Operation<Integer> original, @L
3232

3333
if (((MinecraftServerExtended) server).setspawnmod$shouldModifySpawn()) {
3434
((MinecraftServerExtended) server).setspawnmod$setShouldModifySpawn(false);
35-
seed.set(SetSpawn.findSeedObjectFromLong(server.method_0_6351().method_8412()));
35+
seed.set(SetSpawn.findSeedObjectFromLong(server.getWorld().method_8412()));
3636
}
3737
Seed seedObject = seed.get();
3838
if (seedObject == null) {

1.13.x/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
minecraft_version=1.13.2
2-
yarn_build=541
2+
yarn_build=565

1.14-1.18.2/src/main/java/net/set/spawn/mod/mixin/MinecraftServerMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private boolean checkIfNewWorld(boolean initialized) {
2222
@Group
2323
// method_3786 -> createWorlds
2424
// LevelProperties#isInitialized
25-
@ModifyExpressionValue(method = "method_3786(Lnet/minecraft/class_29;Lnet/minecraft/class_31;Lnet/minecraft/class_1940;Lnet/minecraft/class_3949;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/class_31;method_222()Z", remap = false), require = 0)
25+
@ModifyExpressionValue(method = "method_3786(Lnet/minecraft/class_29;Lnet/minecraft/class_31;Lnet/minecraft/class_1940;Lnet/minecraft/class_3949;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/class_31;method_222()Z"), require = 0, remap = false)
2626
private boolean checkIfNewWorld2(boolean initialized) {
2727
this.shouldModifySpawn = !initialized;
2828
return initialized;

1.14-1.18.2/src/main/java/net/set/spawn/mod/mixin/ServerPlayerEntityMixin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ private void sendErrorMessage(CallbackInfo ci) {
9494

9595
@Dynamic
9696
@Group
97-
@Inject(method = "method_14235(Lnet/minecraft/class_1703;)V", at = @At("TAIL"), require = 0)
97+
@Inject(method = "method_14235(Lnet/minecraft/class_1703;)V", at = @At("TAIL"), require = 0, remap = false)
9898
private void sendErrorMessage2(CallbackInfo ci) {
9999
if (this.setSpawnError != null) {
100-
this.sendMessage(new LiteralText(this.setSpawnError + " This run is not verifiable.").formatted(Formatting.RED), false);
100+
// MutableText#formatted moved from BaseText in 1.16, can't compile against it
101+
BaseText message = new LiteralText(this.setSpawnError + " This run is not verifiable.");
102+
this.sendMessage(message.setStyle(message.getStyle().withFormatting(Formatting.RED)), false);
101103
this.setSpawnError = null;
102104
}
103105
}

1.19-1.21.4/src/main/java/net/set/spawn/mod/mixin/ServerPlayerEntityMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void failOnNonRandomSpawns(CallbackInfo ci, @Share("seed") LocalRef<Seed
9696
@At(value = "INVOKE", target = "Lnet/minecraft/class_3218;method_8587(Lnet/minecraft/class_1297;Lnet/minecraft/class_238;)Z", ordinal = 1),
9797
@At(value = "INVOKE", target = "Lnet/minecraft/class_3222;method_61274(Lnet/minecraft/class_3218;Lnet/minecraft/class_238;)Z", ordinal = 1)
9898
},
99-
require = 0, allow = 1
99+
require = 0, allow = 1, remap = false
100100
)
101101
private void failOnNonRandomSpawns2(CallbackInfoReturnable<Boolean> cir, @Share("seed") LocalRef<Seed> seed, @Share("isRandomSpawn") LocalBooleanRef isRandomSpawn) {
102102
if (!isRandomSpawn.get() && seed.get() != null) {

1.3-1.5.2/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
minecraft_version=1.3.2
2-
yarn_build=541
2+
yarn_build=565

1.6.x/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
minecraft_version=1.6.4
2-
yarn_build=541
2+
yarn_build=565

1.7.x/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
minecraft_version=1.7.10
2-
yarn_build=541
2+
yarn_build=565

0 commit comments

Comments
 (0)