Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tutorial.generic;
- import java.util.HashMap;
- import java.util.Map;
- import cpw.mods.fml.common.network.IGuiHandler;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.world.World;
- public class CommonProxy implements IGuiHandler
- {
- /** Used to store IExtendedEntityProperties data temporarily between player death and respawn */
- private static final Map<String, NBTTagCompound> extendedEntityData = new HashMap<String, NBTTagCompound>();
- public void registerRenderers() {}
- /**
- * Adds an entity's custom data to the map for temporary storage
- * @param compound An NBT Tag Compound that stores the IExtendedEntityProperties data only
- */
- public static void storeEntityData(String name, NBTTagCompound compound)
- {
- PlayerInformation.put(name, compound);
- }
- /**
- * Removes the compound from the map and returns the NBT tag stored for name or null if none exists
- */
- public static NBTTagCompound getEntityData(String name)
- {
- return PlayerInformation.remove(name);
- }
- @Override
- public Object getServerGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z)
- {
- return null;
- }
- @Override
- public Object getClientGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z)
- {
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment