Guest User

Untitled

a guest
Apr 14th, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.33 KB | None | 0 0
  1. package tutorial.generic;
  2.  
  3. import java.util.HashMap;
  4. import java.util.Map;
  5.  
  6. import cpw.mods.fml.common.network.IGuiHandler;
  7. import net.minecraft.entity.player.EntityPlayer;
  8. import net.minecraft.nbt.NBTTagCompound;
  9. import net.minecraft.world.World;
  10.  
  11. public class CommonProxy implements IGuiHandler
  12. {
  13.     /** Used to store IExtendedEntityProperties data temporarily between player death and respawn */
  14.     private static final Map<String, NBTTagCompound> extendedEntityData = new HashMap<String, NBTTagCompound>();
  15.  
  16.     public void registerRenderers() {}
  17.  
  18.     /**
  19.      * Adds an entity's custom data to the map for temporary storage
  20.      * @param compound An NBT Tag Compound that stores the IExtendedEntityProperties data only
  21.      */
  22.     public static void storeEntityData(String name, NBTTagCompound compound)
  23.     {
  24.         PlayerInformation.put(name, compound);
  25.     }
  26.  
  27.     /**
  28.      * Removes the compound from the map and returns the NBT tag stored for name or null if none exists
  29.      */
  30.     public static NBTTagCompound getEntityData(String name)
  31.     {
  32.         return PlayerInformation.remove(name);
  33.     }
  34.  
  35.     @Override
  36.     public Object getServerGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z)
  37.     {
  38.     return null;
  39.     }
  40.  
  41.     @Override
  42.     public Object getClientGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z)
  43.     {
  44.     return null;
  45.     }
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment