[BUG] Fix VanishMod integration being broken on Forge
This commit is contained in:
@@ -112,8 +112,8 @@ publisher {
|
|||||||
setVersionType("release")
|
setVersionType("release")
|
||||||
setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md")
|
setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md")
|
||||||
setProjectVersion("${minecraft_version}-${project.version}")
|
setProjectVersion("${minecraft_version}-${project.version}")
|
||||||
setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}")
|
setDisplayName("[FABRIC/QUILT 1.21.x] CraterLib - ${project.version}")
|
||||||
setGameVersions("1.21")
|
setGameVersions("1.21", "1.21.1")
|
||||||
setLoaders("fabric", "quilt")
|
setLoaders("fabric", "quilt")
|
||||||
setArtifact(remapJar)
|
setArtifact(remapJar)
|
||||||
setCurseEnvironment("both")
|
setCurseEnvironment("both")
|
||||||
|
@@ -105,8 +105,8 @@ publisher {
|
|||||||
setVersionType("release")
|
setVersionType("release")
|
||||||
setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md")
|
setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md")
|
||||||
setProjectVersion("${minecraft_version}-${project.version}")
|
setProjectVersion("${minecraft_version}-${project.version}")
|
||||||
setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}")
|
setDisplayName("[NeoForge 1.21.x] CraterLib - ${project.version}")
|
||||||
setGameVersions("1.21")
|
setGameVersions("1.21", "1.21.1")
|
||||||
setLoaders("neoforge")
|
setLoaders("neoforge")
|
||||||
setArtifact(remapJar)
|
setArtifact(remapJar)
|
||||||
setCurseEnvironment("both")
|
setCurseEnvironment("both")
|
||||||
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
@@ -0,0 +1,20 @@
|
|||||||
|
--- a/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
+++ b/Forge/src/main/java/com/hypherionmc/craterlib/common/ForgeCompatHelper.java
|
||||||
|
@@ -2,12 +2,16 @@
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||||
|
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||||
|
+import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||||
|
|
||||||
|
public class ForgeCompatHelper implements CompatUtils {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerActive(BridgedPlayer player) {
|
||||||
|
- return true;
|
||||||
|
+ if (!ModloaderEnvironment.INSTANCE.isModLoaded("vmod"))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return VanishUtil.isVanished(player.toMojangServerPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
Reference in New Issue
Block a user