/
ProxyCommon.java
43 lines (29 loc) · 1.2 KB
/
ProxyCommon.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package mezz.jei;
import javax.annotation.Nonnull;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fml.common.discovery.ASMDataTable;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import mezz.jei.network.packets.PacketJEI;
import mezz.jei.util.Log;
public class ProxyCommon {
public void preInit(@Nonnull FMLPreInitializationEvent event) {
}
public void init(@Nonnull FMLInitializationEvent event) {
}
public void startJEI(@Nonnull Set<ASMDataTable.ASMData> modPlugins) {
}
public void sendPacketToServer(PacketJEI packet) {
Log.error("Tried to send packet to the server from the server: {}", packet);
}
public void sendPacketToPlayer(PacketJEI packet, EntityPlayer entityplayer) {
if (!(entityplayer instanceof EntityPlayerMP) || (entityplayer instanceof FakePlayer)) {
return;
}
EntityPlayerMP player = (EntityPlayerMP) entityplayer;
JustEnoughItems.packetHandler.sendPacket(packet.getPacket(), player);
}
}