Skip to content

Commit d720f8e

Browse files
committed
Rename 1.21.9 to 1.21.10
1 parent fc1fd4b commit d720f8e

42 files changed

Lines changed: 233 additions & 87 deletions

Some content is hidden

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

Multiworld-Common/build.gradle.kts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,29 @@ repositories {
3939

4040
tasks.withType<Jar> { duplicatesStrategy = DuplicatesStrategy.INCLUDE }
4141

42+
configurations.all {
43+
resolutionStrategy {
44+
// Check for updates every build
45+
cacheChangingModulesFor(0, "seconds")
46+
}
47+
}
48+
4249
dependencies {
43-
//minecraft ("com.mojang:minecraft:1.17.1")
44-
//mappings ("net.fabricmc:yarn:1.17.1+build.65:v2")
45-
//modImplementation ("net.fabricmc:fabric-loader:0.16.9")
46-
//modImplementation "net.fabricmc.fabric-api:fabric-api:0.28.5+1.15"
47-
48-
// 1.19.4
49-
//minecraft("com.mojang:minecraft:1.19.4")
50-
//mappings("net.fabricmc:yarn:1.19.4+build.1:v2")
51-
//modImplementation("net.fabricmc:fabric-loader:0.14.18")
52-
50+
5351
// 1.20
5452
minecraft("com.mojang:minecraft:1.20.1")
5553
mappings("net.fabricmc:yarn:1.20.1+build.10")
56-
modImplementation("net.fabricmc:fabric-loader:0.16.9")
54+
modImplementation("net.fabricmc:fabric-loader:0.18.3")
5755

5856
modImplementation("xyz.nucleoid:fantasy:0.4.11+1.20-rc1")
5957
modImplementation("curse.maven:cyber-permissions-407695:4640544")
6058
modImplementation("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
61-
modImplementation("net.fabricmc.fabric-api:fabric-api-deprecated:0.92.5+1.20.1")
59+
// modImplementation("net.fabricmc.fabric-api:fabric-api-deprecated:0.92.5+1.20.1")
6260

6361
val ic = DefaultExternalModuleDependency(
6462
"com.javazilla.mods",
65-
"icommon-fabric-1.21.4",
66-
"1.21.4",
63+
"icommon-fabric-1.21.1",
64+
"1.21.1",
6765
null
6866
).apply {
6967
isChanging = true // Make sure we get the latest version of iCommon
@@ -74,9 +72,10 @@ dependencies {
7472

7573
setOf(
7674
"fabric-api-base",
77-
//"fabric-command-api-v1",
7875
"fabric-lifecycle-events-v1",
79-
"fabric-networking-api-v1"
76+
"fabric-networking-api-v1",
77+
"fabric-events-interaction-v0",
78+
"fabric-command-api-v2"
8079
).forEach {
8180
// Add each module as a dependency
8281
modImplementation(fabricApi.module(it, "0.92.5+1.20.1"))

Multiworld-Common/src/main/java/me/isaiah/multiworld/MultiworldMod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class MultiworldMod {
7070
};
7171

7272
// Multiworld Mod Version
73-
public static final String VERSION = "1.11";
73+
public static String VERSION = "VersionUnknown";
7474

7575
public static void setICreator(ICreator ic) {
7676
world_creator = ic;

Multiworld-Common/src/main/java/me/isaiah/multiworld/command/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static boolean isForgeOrHasICommon() {
115115
try {
116116
Method m = hookClaz.getDeclaredMethod("hasICommon");
117117

118-
Object o = m.invoke(hookClaz, null);
118+
Object o = m.invoke(hookClaz, (Object[]) null);
119119
boolean b = (boolean) o;
120120
isForgeOrHasICommon = b;
121121
hasValueCached = true;

Multiworld-Common/src/main/java/me/isaiah/multiworld/fabric/ICommonHooks.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Optional;
44

5+
import me.isaiah.common.ICommonMod;
6+
import me.isaiah.common.ICommonMod.SupportStatus;
57
import me.isaiah.common.event.EventHandler;
68
import me.isaiah.common.event.EventRegistery;
79
import me.isaiah.common.event.entity.EntityPortalCollideEvent;
@@ -12,8 +14,11 @@
1214
import net.fabricmc.loader.api.FabricLoader;
1315
import net.fabricmc.loader.api.ModContainer;
1416
import net.minecraft.entity.Entity;
17+
import net.minecraft.entity.player.PlayerEntity;
1518
import net.minecraft.server.network.ServerPlayerEntity;
19+
import net.minecraft.server.world.ServerWorld;
1620
import net.minecraft.util.math.BlockPos;
21+
import net.minecraft.world.World;
1722

1823
public class ICommonHooks {
1924

@@ -32,6 +37,16 @@ public static boolean hasICommon() {
3237
}
3338
*/
3439

40+
public static World getWorld(PlayerEntity player) {
41+
try {
42+
World world = ((me.isaiah.common.cmixin.IMixinEntity) player).ic$getWorld();
43+
return world;
44+
} catch (Exception | NoSuchMethodError ex) {
45+
// Older version of iCommonLib
46+
}
47+
return null;
48+
}
49+
3550
public static void register() {
3651
new ICommonHooks().registerThis();
3752
}
@@ -41,6 +56,12 @@ public void registerThis() {
4156
MultiworldMod.LOGGER.info("Note: iCommonLib is required for full functionality of mod");
4257
return;
4358
}
59+
60+
boolean isLower = ICommonMod.checkVersion(0.6, false, "multiworld", SupportStatus.SUGGEST);
61+
62+
if (isLower) {
63+
MultiworldMod.LOGGER.info("Note: iCommonLib #106 or higher is suggested.");
64+
}
4465

4566
int r = EventRegistery.registerAll(this);
4667
MultiworldMod.LOGGER.info("Multiworld: Registered '" + r + "' iCommon events.");

Multiworld-Common/src/main/java/me/isaiah/multiworld/fabric/PermFabric.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package me.isaiah.multiworld.fabric;
22

33
import net.minecraft.server.network.ServerPlayerEntity;
4+
5+
import java.util.NoSuchElementException;
6+
7+
import me.isaiah.multiworld.MultiworldMod;
48
import me.isaiah.multiworld.perm.Perm;
59
import net.fabricmc.loader.api.FabricLoader;
610

@@ -9,6 +13,13 @@ public class PermFabric extends Perm {
913
public static void init() {
1014
Perm.setPerm(new PermFabric());
1115

16+
try {
17+
String version = FabricLoader.getInstance().getModContainer("multiworld").get().getMetadata().getVersion().getFriendlyString();
18+
MultiworldMod.VERSION = version;
19+
} catch (NoSuchElementException e) {
20+
// Error while getting version
21+
}
22+
1223
// TODO: move this
1324
ICommonHooks.register();
1425
FabricEvents.register();

Multiworld-Common/src/main/java/me/isaiah/multiworld/portal/WandEventHandler.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ private static void setPosition(PlayerEntity player, BlockPos pos, int index) {
6666
positions[index] = pos;
6767
playerPositions.put(uuid, positions);
6868

69-
positions[0] = (ServerWorld) player.getEntityWorld();
69+
try {
70+
positions[0] = (ServerWorld) player.getEntityWorld();
71+
} catch (NoSuchMethodError err) {
72+
73+
// 1.21.8:
74+
try {
75+
positions[0] = (ServerWorld) me.isaiah.multiworld.fabric.ICommonHooks.getWorld(player);
76+
} catch (Exception e) {
77+
err.printStackTrace();
78+
e.printStackTrace();
79+
}
80+
}
7081

7182
// TODO: Make less annoying
7283
// message(player, "&9[MultiworldPortals]&a📍&r Position " + index + " set to: " + pos.toShortString());

Multiworld-Fabric-bundle/build.gradle.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ base {
1919
group = "me.isaiah.mods"
2020
}
2121

22+
configurations.all {
23+
resolutionStrategy {
24+
// Check for updates every build
25+
cacheChangingModulesFor(0, "seconds")
26+
}
27+
}
28+
29+
2230
dependencies {
2331

2432
annotationProcessor("com.pkware.jabel:jabel-javac-plugin:1.0.1-1")
@@ -27,7 +35,7 @@ dependencies {
2735
// 1.20
2836
minecraft("com.mojang:minecraft:1.20.1")
2937
mappings("net.fabricmc:yarn:1.20.1+build.10")
30-
modImplementation("net.fabricmc:fabric-loader:0.16.9")
38+
modImplementation("net.fabricmc:fabric-loader:0.18.3")
3139

3240
// bundle jars
3341
// include(project(":Multiworld-Fabric-1.18.2"))
@@ -39,7 +47,7 @@ dependencies {
3947
include(project(":Multiworld-Fabric-1.21.1"))
4048
include(project(":Multiworld-Fabric-1.21.4"))
4149
include(project(":Multiworld-Fabric-1.21.5"))
42-
include(project(":Multiworld-Fabric-1.21.9"))
50+
include(project(":Multiworld-Fabric-1.21.10"))
4351
include(project(":Multiworld-Fabric-1.21.11"))
4452
}
4553

build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@ plugins {
44
id "dev.architectury.loom" version "1.13-SNAPSHOT" apply false
55
}
66

7+
configurations.all {
8+
resolutionStrategy {
9+
// Check for updates every build
10+
cacheChangingModulesFor(0, "seconds")
11+
}
12+
}
13+
14+
715
subprojects {
816

17+
configurations.all {
18+
// Check for updates every build
19+
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
20+
}
21+
22+
923
ext {
1024
mod_version = project.mod_version
1125
set("mod_version", project.mod_version)
@@ -47,4 +61,10 @@ subprojects {
4761
}
4862
}
4963
})
64+
65+
tasks.withType(JavaCompile) {
66+
options.compilerArgs << "-Xlint:-unchecked"
67+
options.compilerArgs << "-Xlint:-deprecation"
68+
options.compilerArgs << "-Xlint:-varargs"
69+
}
5070
}

fabric/Multiworld-Fabric-1.18.2/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ base {
1919
group = "me.isaiah.mods"
2020
}
2121

22+
configurations.all {
23+
resolutionStrategy {
24+
// Check for updates every build
25+
cacheChangingModulesFor(0, "seconds")
26+
}
27+
}
2228

2329
dependencies {
2430

@@ -30,7 +36,7 @@ dependencies {
3036
// 1.18.2
3137
minecraft("com.mojang:minecraft:1.18.2")
3238
mappings("net.fabricmc:yarn:1.18.2+build.2:v2")
33-
modImplementation("net.fabricmc:fabric-loader:0.16.9")
39+
modImplementation("net.fabricmc:fabric-loader:0.18.3")
3440

3541
//annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:0.4.1")
3642

fabric/Multiworld-Fabric-1.19.2/build.gradle.kts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ base {
1919
group = "me.isaiah.mods"
2020
}
2121

22+
configurations.all {
23+
resolutionStrategy {
24+
// Check for updates every build
25+
cacheChangingModulesFor(0, "seconds")
26+
}
27+
}
2228

2329
dependencies {
2430

@@ -28,19 +34,20 @@ dependencies {
2834
// 1.19.2
2935
minecraft("com.mojang:minecraft:1.19.2")
3036
mappings("net.fabricmc:yarn:1.19.2+build.28:v2")
31-
modImplementation("net.fabricmc:fabric-loader:0.16.9")
37+
modImplementation("net.fabricmc:fabric-loader:0.18.3")
3238

3339
include("xyz.nucleoid:fantasy:0.4.10+1.19.2")
3440
modImplementation("xyz.nucleoid:fantasy:0.4.10+1.19.2")
3541
modImplementation("curse.maven:cyber-permissions-407695:4640544")
3642
modImplementation("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
37-
modImplementation("net.fabricmc.fabric-api:fabric-api-deprecated:0.76.0+1.19.2")
43+
// modImplementation("net.fabricmc.fabric-api:fabric-api-deprecated:0.76.0+1.19.2")
3844

3945
setOf(
4046
"fabric-api-base",
41-
//"fabric-command-api-v1",
4247
"fabric-lifecycle-events-v1",
43-
"fabric-networking-api-v1"
48+
"fabric-networking-api-v1",
49+
"fabric-events-interaction-v0",
50+
"fabric-command-api-v2"
4451
).forEach {
4552
// Add each module as a dependency
4653
modImplementation(fabricApi.module(it, "0.76.0+1.19.2"))

0 commit comments

Comments
 (0)