forked from MinecraftForge/MinecraftForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated FML: MinecraftForge/FML@4922e90 Separate network mod config from setup. Allows for Forge Packet Handler nicety
- Loading branch information
Showing
6 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
common/net/minecraftforge/common/network/ForgeConnectionHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package net.minecraftforge.common.network; | ||
|
||
import net.minecraft.network.INetworkManager; | ||
import net.minecraft.network.NetLoginHandler; | ||
import net.minecraft.network.packet.NetHandler; | ||
import net.minecraft.network.packet.Packet1Login; | ||
import net.minecraft.server.MinecraftServer; | ||
import cpw.mods.fml.common.network.IConnectionHandler; | ||
import cpw.mods.fml.common.network.Player; | ||
|
||
public class ForgeConnectionHandler implements IConnectionHandler { | ||
|
||
@Override | ||
public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void connectionOpened(NetHandler netClientHandler, MinecraftServer server, INetworkManager manager) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void connectionClosed(INetworkManager manager) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void clientLoggedIn(NetHandler clientHandler, INetworkManager manager, Packet1Login login) | ||
{ | ||
|
||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
common/net/minecraftforge/common/network/ForgeNetworkHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.minecraftforge.common.network; | ||
|
||
import net.minecraftforge.common.ForgeDummyContainer; | ||
import cpw.mods.fml.common.network.NetworkMod; | ||
import cpw.mods.fml.common.network.NetworkModHandler; | ||
|
||
public class ForgeNetworkHandler extends NetworkModHandler { | ||
public ForgeNetworkHandler(ForgeDummyContainer container) | ||
{ | ||
super(container,container.getClass().getAnnotation(NetworkMod.class)); | ||
configureNetworkMod(container); | ||
} | ||
|
||
@Override | ||
public boolean acceptVersion(String version) | ||
{ | ||
return true; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
common/net/minecraftforge/common/network/ForgePacketHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package net.minecraftforge.common.network; | ||
|
||
import net.minecraft.network.INetworkManager; | ||
import net.minecraft.network.packet.Packet250CustomPayload; | ||
import cpw.mods.fml.common.network.IPacketHandler; | ||
import cpw.mods.fml.common.network.Player; | ||
|
||
public class ForgePacketHandler implements IPacketHandler { | ||
|
||
@Override | ||
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) | ||
{ | ||
|
||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
common/net/minecraftforge/common/network/ForgeTinyPacketHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.minecraftforge.common.network; | ||
|
||
import net.minecraft.network.packet.NetHandler; | ||
import net.minecraft.network.packet.Packet131MapData; | ||
import cpw.mods.fml.common.network.ITinyPacketHandler; | ||
|
||
public class ForgeTinyPacketHandler implements ITinyPacketHandler { | ||
|
||
@Override | ||
public void handle(NetHandler handler, Packet131MapData mapData) | ||
{ | ||
|
||
} | ||
|
||
} |