2018-09-12 01:29:49 +02:00
|
|
|
package com.minelittlepony.unicopia;
|
|
|
|
|
2019-01-31 16:21:14 +01:00
|
|
|
import java.util.UUID;
|
|
|
|
|
2019-01-30 11:26:00 +01:00
|
|
|
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;
|
2019-01-30 11:26:00 +01:00
|
|
|
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
|
|
|
|
2019-01-30 11:26:00 +01:00
|
|
|
public static boolean isClientSide() {
|
2018-09-12 22:37:06 +02:00
|
|
|
return FMLCommonHandler.instance().getSide().isClient();
|
2018-09-12 01:29:49 +02:00
|
|
|
}
|
2019-01-30 11:26:00 +01: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;
|
|
|
|
}
|
|
|
|
|
2019-01-30 11:26:00 +01:00
|
|
|
public void preInit(FMLPreInitializationEvent event) {}
|
|
|
|
|
|
|
|
public void init(FMLInitializationEvent event) {}
|
|
|
|
|
|
|
|
public void posInit(FMLPostInitializationEvent event) {}
|
2018-09-12 01:29:49 +02:00
|
|
|
}
|