Skip to content

Commit facb0c2

Browse files
committed
deprecate Env helper methods and rename them to something (more) sensible.
1 parent 232b105 commit facb0c2

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

src/main/java/turniplabs/halplibe/helper/EnvironmentHelper.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@
44
import net.minecraft.core.Global;
55

66
public class EnvironmentHelper {
7-
public static boolean isServerEnvironment() {
7+
8+
/** use isMultiplayerServer */
9+
@Deprecated public static boolean isServerEnvironment() { return isMultiplayerServer(); }
10+
11+
/** use isSingleplayerClient */
12+
@Deprecated public static boolean isSinglePlayer() { return isSingleplayerClient(); }
13+
14+
/** use isMultiplayerClient */
15+
@Deprecated public static boolean isClientWorld() { return isMultiplayerClient(); }
16+
17+
public static boolean isMultiplayerServer() {
818
return Global.isServer;
919
}
1020

11-
public static boolean isSinglePlayer() {
21+
public static boolean isSingleplayerClient() {
1222
if (Global.isServer) {
1323
return false;
1424
}
1525

1626
return !Minecraft.getMinecraft().isMultiplayerWorld();
1727
}
1828

19-
public static boolean isClientWorld() {
29+
public static boolean isMultiplayerClient() {
2030
return !isSinglePlayer() && !isServerEnvironment();
2131
}
22-
2332
}

0 commit comments

Comments
 (0)