Skip to content

Commit 6fd67f0

Browse files
committed
Update to 26.1.2
1 parent d4e31e4 commit 6fd67f0

11 files changed

Lines changed: 134 additions & 136 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
with:
1414
cache: gradle
1515
distribution: zulu
16-
java-version: 21
16+
java-version: 25
1717
- name: Build with Gradle
1818
run: gradle build
1919
- name: Upload Artifacts

‎build.gradle‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "fabric-loom" version "1.11.+"
2+
id "net.fabricmc.fabric-loom" version "1.16.+"
33
id "maven-publish"
44
}
55

@@ -14,22 +14,21 @@ repositories {
1414
}
1515
maven {
1616
name = "Nucleoid"
17-
url = "https://maven.nucleoid.xyz/"
17+
url = "https://maven.nucleoid.xyz/releases/"
1818
}
1919
mavenCentral()
2020
}
2121

2222
dependencies {
2323
// Main
2424
minecraft("com.mojang:minecraft:${project.minecraft_version}")
25-
mappings("net.fabricmc:yarn:${project.yarn_mappings}:v2")
26-
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")
25+
implementation("net.fabricmc:fabric-loader:${project.loader_version}")
2726

2827
// Fabric API
29-
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
28+
implementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
3029

3130
// Plasmid
32-
modImplementation("xyz.nucleoid:plasmid:${project.plasmid_version}")
31+
implementation("xyz.nucleoid:plasmid:${project.plasmid_version}")
3332

3433
// Chicory
3534
include implementation("com.dylibso.chicory:runtime:${project.chicory_version}")
@@ -47,12 +46,12 @@ processResources {
4746
}
4847

4948
java {
50-
sourceCompatibility = JavaVersion.VERSION_21
51-
targetCompatibility = JavaVersion.VERSION_21
49+
sourceCompatibility = JavaVersion.VERSION_25
50+
targetCompatibility = JavaVersion.VERSION_25
5251
}
5352

5453
tasks.withType(JavaCompile) {
55-
options.release = 21
54+
options.release = 25
5655
options.encoding = "UTF-8"
5756
}
5857

‎gradle.properties‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ mod_version = 1.0.0
55
org.gradle.jvmargs = -Xmx1G
66

77
# Versions
8-
minecraft_version = 1.21.8
9-
yarn_mappings = 1.21.8+build.1
10-
loader_version = 0.16.14
11-
fabric_version = 0.132.0+1.21.8
8+
minecraft_version=26.1.2
9+
loader_version=0.18.4
10+
fabric_version = 0.145.4+26.1.2
1211

13-
plasmid_version = 0.6.5+1.21.7
12+
plasmid_version = 0.7.0+26.1.2
1413
chicory_version = 1.5.1

‎src/main/java/io/github/haykam821/consolebox/ConsoleBox.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
import io.github.haykam821.consolebox.game.SaveHandler;
77
import io.github.haykam821.consolebox.resource.ConsoleGameManager;
88
import net.fabricmc.api.ModInitializer;
9-
import net.minecraft.util.Identifier;
9+
import net.minecraft.resources.Identifier;
1010
import xyz.nucleoid.plasmid.api.game.GameType;
11+
import xyz.nucleoid.plasmid.api.game.GameTypes;
1112

1213
public class ConsoleBox implements ModInitializer {
1314
public static final String MOD_ID = "consolebox";
1415

1516
private static final Identifier CONSOLE_BOX_ID = ConsoleBox.identifier("console_box");
16-
public static final GameType<ConsoleBoxConfig> CONSOLE_BOX = GameType.register(CONSOLE_BOX_ID, ConsoleBoxConfig.CODEC, ConsoleBoxGame::open);
17+
public static final GameType<ConsoleBoxConfig> CONSOLE_BOX = GameTypes.register(CONSOLE_BOX_ID, ConsoleBoxConfig.CODEC, ConsoleBoxGame::open);
1718

1819
@Override
1920
public void onInitialize() {
@@ -22,6 +23,6 @@ public void onInitialize() {
2223
}
2324

2425
public static Identifier identifier(String path) {
25-
return Identifier.of(MOD_ID, path);
26+
return Identifier.fromNamespaceAndPath(MOD_ID, path);
2627
}
2728
}

‎src/main/java/io/github/haykam821/consolebox/game/ConsoleBoxConfig.java‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
import com.mojang.serialization.codecs.RecordCodecBuilder;
66

77
import io.github.haykam821.consolebox.resource.ConsoleGameManager;
8-
import net.minecraft.text.Text;
9-
import net.minecraft.util.Identifier;
10-
import net.minecraft.util.dynamic.Codecs;
11-
import net.minecraft.util.math.Vec3d;
8+
import net.minecraft.network.chat.Component;
9+
import net.minecraft.resources.Identifier;
10+
import net.minecraft.util.ExtraCodecs;
11+
import net.minecraft.world.phys.Vec3;
1212
import xyz.nucleoid.plasmid.api.game.GameOpenException;
1313

1414
public record ConsoleBoxConfig(
1515
Identifier game,
16-
Vec3d spectatorSpawnOffset,
16+
Vec3 spectatorSpawnOffset,
1717
int playerCount,
1818
boolean swapXZ,
1919
boolean save
2020
) {
21-
private static final Vec3d DEFAULT_SPECTATOR_SPAWN_OFFSET = new Vec3d(0, 2, 0);
21+
private static final Vec3 DEFAULT_SPECTATOR_SPAWN_OFFSET = new Vec3(0, 2, 0);
2222

2323
public static final MapCodec<ConsoleBoxConfig> CODEC = RecordCodecBuilder.mapCodec(instance -> {
2424
return instance.group(
2525
Identifier.CODEC.fieldOf("game").forGetter(ConsoleBoxConfig::game),
26-
Codecs.VECTOR_3F.xmap(Vec3d::new, Vec3d::toVector3f).optionalFieldOf("spectator_spawn_offset", DEFAULT_SPECTATOR_SPAWN_OFFSET).forGetter(ConsoleBoxConfig::spectatorSpawnOffset),
26+
ExtraCodecs.VECTOR3F.xmap(Vec3::new, Vec3::toVector3f).optionalFieldOf("spectator_spawn_offset", DEFAULT_SPECTATOR_SPAWN_OFFSET).forGetter(ConsoleBoxConfig::spectatorSpawnOffset),
2727
Codec.intRange(1, 4).optionalFieldOf("players", 1).forGetter(ConsoleBoxConfig::playerCount),
2828
Codec.BOOL.optionalFieldOf("swap_x_z", false).forGetter(ConsoleBoxConfig::swapXZ),
2929
Codec.BOOL.optionalFieldOf("save", false).forGetter(ConsoleBoxConfig::save)
@@ -34,7 +34,7 @@ public byte[] getGameData() throws GameOpenException {
3434
byte[] data = ConsoleGameManager.getGameData(this.game);
3535

3636
if (data == null) {
37-
throw new GameOpenException(Text.translatable("text.consolebox.nonexistent_console_game", this.game));
37+
throw new GameOpenException(Component.translatable("text.consolebox.nonexistent_console_game", this.game));
3838
} else {
3939
return data;
4040
}

0 commit comments

Comments
 (0)