List of usage examples for net.minecraftforge.fml.network NetworkDirection PLAY_TO_CLIENT
NetworkDirection PLAY_TO_CLIENT
To view the source code for net.minecraftforge.fml.network NetworkDirection PLAY_TO_CLIENT.
Click Source Link
From source file:com.teambrmodding.assistedprogression.network.packet.ReadGrinderRecipePacket.java
License:Creative Commons License
/******************************************************************************************************************* * IMessageHandler * *******************************************************************************************************************/ public static void process(ReadGrinderRecipePacket message, Supplier<NetworkEvent.Context> ctx) { if (ctx.get().getDirection() == NetworkDirection.PLAY_TO_CLIENT) { ctx.get().enqueueWork(() -> { RecipeHelper.grinderRecipes.clear(); RecipeHelper.grinderRecipes.addAll(message.recipes); });//from www. j a v a2 s .com ctx.get().setPacketHandled(true); } }