ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java

36 lines
1.7 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
2016-05-16 22:52:27 +02:00
* This file ("PacketHandler.java") is part of the Actually Additions mod for Minecraft.
2015-08-29 14:33:25 +02:00
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
2016-05-16 22:52:27 +02:00
* http://ellpeck.de/actaddlicense
2015-08-29 14:33:25 +02:00
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2016-05-16 22:54:42 +02:00
* © 2015-2016 Ellpeck
2015-08-29 14:33:25 +02:00
*/
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.network;
2016-01-05 04:47:35 +01:00
import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton;
import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiNumber;
import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiString;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
2016-01-07 18:20:59 +01:00
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;
public class PacketHandler{
public static SimpleNetworkWrapper theNetwork;
public static void init(){
2016-04-20 21:39:03 +02:00
theNetwork = NetworkRegistry.INSTANCE.newSimpleChannel(ModUtil.MOD_ID);
theNetwork.registerMessage(PacketGuiButton.Handler.class, PacketGuiButton.class, 0, Side.SERVER);
theNetwork.registerMessage(PacketGuiNumber.Handler.class, PacketGuiNumber.class, 1, Side.SERVER);
theNetwork.registerMessage(PacketGuiString.Handler.class, PacketGuiString.class, 2, Side.SERVER);
theNetwork.registerMessage(PacketParticle.Handler.class, PacketParticle.class, 3, Side.CLIENT);
theNetwork.registerMessage(PacketUpdateTileEntity.Handler.class, PacketUpdateTileEntity.class, 4, Side.CLIENT);
theNetwork.registerMessage(PacketBookletStandButton.Handler.class, PacketBookletStandButton.class, 5, Side.SERVER);
}
}