Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

Commit a507eea

Browse files
committed
Port to 1.20.1
1 parent 5f00043 commit a507eea

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
// Fabric API. This is technically optional, but you probably want it anyway.
3030
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
3131

32-
include modImplementation("dev.isxander:yet-another-config-lib:3.4.2+1.20.5-fabric")
32+
include modImplementation("dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric")
3333

3434
modRuntimeOnly modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
3535
}

gradle.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
org.gradle.jvmargs=-Xmx4G
33
# Fabric Properties
44
# check these on https://modmuss50.me/fabric.html
5-
minecraft_version=1.20.5
6-
yarn_mappings=1.20.5+build.1
5+
minecraft_version=1.21
6+
yarn_mappings=1.21+build.7
77
loader_version=0.15.11
88
# Mod Properties
9-
mod_version=0.0.14-1.20.5-alpha
9+
mod_version=0.0.14-1.21-alpha
1010
maven_group=de.zonlykroks
1111
archives_base_name=P2P
1212
# Dependencies
1313
# check this on https://modmuss50.me/fabric.html
14-
fabric_version=0.97.8+1.20.5
14+
fabric_version=0.100.4+1.21
1515

16-
modmenu_version=10.0.0-beta.1
16+
modmenu_version=11.0.1

src/main/java/de/zonlykroks/p2p/client/YACLImageReloadListenerFabric.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class YACLImageReloadListenerFabric implements IdentifiableResourceReloadListener {
1616
@Override
1717
public Identifier getFabricId() {
18-
return new Identifier("sounds", "image_reload_listener");
18+
return Identifier.of("sounds", "image_reload_listener");
1919
}
2020

2121
@Override

src/main/java/de/zonlykroks/p2p/client/screen/CreateScreen.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) {
212212
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
213213
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
214214
if(worldIcon == null || worldIcon.isEmpty()) {
215-
context.drawTexture(new Identifier("textures/misc/unknown_server.png"), 10, 10 + textRenderer.fontHeight + 10, 0, 0, startX - 15, startX - 15);
215+
context.drawTexture(Identifier.ofVanilla("textures/misc/unknown_server.png"), 10, 10 + textRenderer.fontHeight + 10, 0, 0, startX - 15, startX - 15);
216216
} else if(worldIcon != null){
217217
context.drawTexture(worldIcon.get().getTextureId(), 15, textRenderer.fontHeight + 25, 0, 0, startX - 25, startX - 25);
218218
}

src/main/java/de/zonlykroks/p2p/client/screen/P2PScreen.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ private DynamicGridWidget getDynamicGridWidget(int fontHeight) {
7373
assert this.client != null;
7474
DynamicGridWidget grid = new DynamicGridWidget(15, 10 + fontHeight + 10, width - 20, height - 20 - fontHeight - 10 - 20);
7575

76-
ImageButtonWidget joinScreenButton = new ImageButtonWidget(0, 0, 0, 0, Text.translatable("p2p.screen.btn.join"), new Identifier("p2p", "textures/gui/join.webp"));
77-
ImageButtonWidget createScreenButton = new ImageButtonWidget(0, 0, 0, 0, Text.translatable("p2p.screen.btn.create"), new Identifier("p2p", "textures/gui/create.webp"));
76+
ImageButtonWidget joinScreenButton = new ImageButtonWidget(0, 0, 0, 0, Text.translatable("p2p.screen.btn.join"), Identifier.of("p2p", "textures/gui/join.webp"));
77+
ImageButtonWidget createScreenButton = new ImageButtonWidget(0, 0, 0, 0, Text.translatable("p2p.screen.btn.create"), Identifier.of("p2p", "textures/gui/create.webp"));
7878

7979
createScreenButton.setClickEvent( (btn) -> this.client.setScreen(new CreateScreen(this, false)));
8080

src/main/java/de/zonlykroks/p2p/config/P2PYACLConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class P2PYACLConfig {
5555
public CustomGameModeEnum lanGameMode = CustomGameModeEnum.SURVIVAL;
5656

5757
public static final ConfigClassHandler<P2PYACLConfig> HANDLER = ConfigClassHandler.createBuilder(P2PYACLConfig.class)
58-
.id(new Identifier("p2p", "config"))
58+
.id(Identifier.of("p2p", "config"))
5959
.serializer(config -> GsonConfigSerializerBuilder.create(config)
6060
.setPath(CONFIG_PATH)
6161
.build())

src/main/java/de/zonlykroks/p2p/util/ConnectionProgress.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,24 @@ public void tryIncrementIndex() {
4040
}
4141

4242
public static Identifier getCheckmark() {
43-
return new Identifier("icon/checkmark");
43+
return Identifier.ofVanilla("icon/checkmark");
4444
}
4545

4646

4747
public static Identifier getPingUnknown() {
48-
return new Identifier("icon/ping_unknown");
48+
return Identifier.ofVanilla("icon/ping_unknown");
4949
}
5050

5151
public static Identifier getFirstPing() {
52-
return new Identifier("icon/ping_1");
52+
return Identifier.ofVanilla("icon/ping_1");
5353
}
5454

5555
public static List<Identifier> getPings() {
56-
final Identifier PING_1_ICON_TEXTURE = new Identifier("icon/ping_1");
57-
final Identifier PING_2_ICON_TEXTURE = new Identifier("icon/ping_2");
58-
final Identifier PING_3_ICON_TEXTURE = new Identifier("icon/ping_3");
59-
final Identifier PING_4_ICON_TEXTURE = new Identifier("icon/ping_4");
60-
final Identifier PING_5_ICON_TEXTURE = new Identifier("icon/ping_5");
56+
final Identifier PING_1_ICON_TEXTURE = Identifier.ofVanilla("icon/ping_1");
57+
final Identifier PING_2_ICON_TEXTURE = Identifier.ofVanilla("icon/ping_2");
58+
final Identifier PING_3_ICON_TEXTURE = Identifier.ofVanilla("icon/ping_3");
59+
final Identifier PING_4_ICON_TEXTURE = Identifier.ofVanilla("icon/ping_4");
60+
final Identifier PING_5_ICON_TEXTURE = Identifier.ofVanilla("icon/ping_5");
6161
return List.of(PING_1_ICON_TEXTURE, PING_2_ICON_TEXTURE, PING_3_ICON_TEXTURE, PING_4_ICON_TEXTURE, PING_5_ICON_TEXTURE);
6262
}
6363

0 commit comments

Comments
 (0)