Unicopia/src/main/java/com/minelittlepony/unicopia/UClient.java

69 lines
1.8 KiB
Java
Raw Normal View History

2018-09-12 01:29:49 +02:00
package com.minelittlepony.unicopia;
2019-01-31 16:21:14 +01:00
import java.util.UUID;
import javax.annotation.Nullable;
import com.minelittlepony.unicopia.forgebullshit.FUF;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.IInteractionObject;
2018-09-12 01:29:49 +02:00
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
public class UClient {
private static UClient instance;
2018-09-12 01:29:49 +02:00
public static boolean isClientSide() {
return FMLCommonHandler.instance().getSide().isClient();
2018-09-12 01:29:49 +02:00
}
@FUF(reason = "Forced client Separation")
public static UClient instance() {
if (instance == null) {
if (isClientSide()) {
instance = new UnicopiaClient();
} else {
instance = new UClient();
}
}
return instance;
}
@FUF(reason = "Forced client Separation")
public void displayGuiToPlayer(EntityPlayer player, IInteractionObject inventory) {
player.displayGui(inventory);
}
@FUF(reason = "Forced client Separation")
@Nullable
public EntityPlayer getPlayer() {
return null;
}
2019-01-31 16:21:14 +01:00
@FUF(reason = "Forced client Separation")
@Nullable
public EntityPlayer getPlayerByUUID(UUID playerId) {
return null;
}
2019-01-30 21:17:09 +01:00
@FUF(reason = "Forced client Separation")
public boolean isClientPlayer(@Nullable EntityPlayer player) {
return false;
}
public int getViewMode() {
return 0;
}
public void preInit(FMLPreInitializationEvent event) {}
public void init(FMLInitializationEvent event) {}
public void posInit(FMLPostInitializationEvent event) {}
2018-09-12 01:29:49 +02:00
}