Advertisement
LexManos

Forge ISpawnHandler

Feb 10th, 2012
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. package net.minecraft.src.forge;
  2.  
  3. import java.io.DataInputStream;
  4. import java.io.DataOutputStream;
  5.  
  6. /**
  7.  * A interface for Entities that need extra information to be communicated
  8.  * between the server and client when they are spawned.
  9.  */
  10. public interface ISpawnHandler
  11. {
  12.     /**
  13.      * Called by the server when constructing the spawn packet.
  14.      * Data should be added to the provided stream.
  15.      *
  16.      * @param data The packet data stream
  17.      */
  18.     public void writeSpawnData(DataOutputStream data);
  19.    
  20.     /**
  21.      * Called by the client when it receives a Entity spawn packet.
  22.      * Data should be read out of the stream in the same way as it was written.
  23.      *
  24.      * @param data The packet data stream
  25.      */
  26.     public void readSpawnData(DataInputStream data);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement