forked from virt-mirrors/Sit
flip isClient boolean, and remove redundant SitServer
This commit is contained in:
parent
52117ea5c4
commit
34bf49c62f
4 changed files with 2 additions and 16 deletions
|
@ -24,7 +24,7 @@ public class Sit implements ModInitializer {
|
||||||
public static final String ENTITY_NAME = "-sit!-entity-";
|
public static final String ENTITY_NAME = "-sit!-entity-";
|
||||||
public static MinecraftServer server;
|
public static MinecraftServer server;
|
||||||
public static CommandManager commandManager;
|
public static CommandManager commandManager;
|
||||||
public static boolean isClient = true;
|
public static boolean isClient = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
|
|
@ -9,6 +9,7 @@ public class SitClient implements ClientModInitializer {
|
||||||
public static boolean inGame = false;
|
public static boolean inGame = false;
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
|
Sit.isClient = true;
|
||||||
ClientPlayConnectionEvents.JOIN.register((handler, sender, client) -> {
|
ClientPlayConnectionEvents.JOIN.register((handler, sender, client) -> {
|
||||||
inGame = true;
|
inGame = true;
|
||||||
// send a data packet whenever joining a server
|
// send a data packet whenever joining a server
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
package one.oth3r.sit;
|
|
||||||
|
|
||||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
|
||||||
|
|
||||||
public class SitServer implements DedicatedServerModInitializer {
|
|
||||||
@Override
|
|
||||||
public void onInitializeServer() {
|
|
||||||
Sit.isClient = false;
|
|
||||||
config.load();
|
|
||||||
LangReader.loadLanguageFile();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,9 +18,6 @@
|
||||||
"main": [
|
"main": [
|
||||||
"one.oth3r.sit.Sit"
|
"one.oth3r.sit.Sit"
|
||||||
],
|
],
|
||||||
"server": [
|
|
||||||
"one.oth3r.sit.SitServer"
|
|
||||||
],
|
|
||||||
"client": [
|
"client": [
|
||||||
"one.oth3r.sit.SitClient"
|
"one.oth3r.sit.SitClient"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue