// Path: src/main/java/ds/mods/opengx/network/GlassesButtonEventMessage.java
// public static enum Button {
// 	ONOFF,
// 	SCREENPOWER,
// 	ACTION1,
// 	ACTION2,
// 	ACTIONM
// }


import java.util.EnumSet;
import java.util.HashMap;
import java.util.UUID;
import java.util.WeakHashMap;
import li.cil.oc.api.Network;
import li.cil.oc.api.network.Arguments;
import li.cil.oc.api.network.Callback;
import li.cil.oc.api.network.Context;
import li.cil.oc.api.network.ManagedEnvironment;
import li.cil.oc.api.network.Message;
import li.cil.oc.api.network.Node;
import li.cil.oc.api.network.Visibility;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import ds.mods.opengx.network.GlassesButtonEventMessage.Button;
package ds.mods.opengx.component;



public class ComponentButton extends Component implements ManagedEnvironment {
	
	public static final WeakHashMap<World,HashMap<UUID,ComponentButton>> serverCGX = new WeakHashMap<World,HashMap<UUID,ComponentButton>>();
	public static final WeakHashMap<World,HashMap<UUID,ComponentButton>> clientCGX = new WeakHashMap<World,HashMap<UUID,ComponentButton>>();
	
	public static ComponentButton get(UUID uuid, World w, int tier)
	{
		WeakHashMap<World,HashMap<UUID,ComponentButton>> cgxm = w.isRemote ? clientCGX : serverCGX;
		if (!cgxm.containsKey(w))
		{
			cgxm.put(w, new HashMap<UUID,ComponentButton>());
		}
		HashMap<UUID,ComponentButton> m = cgxm.get(w);
		if (!m.containsKey(uuid))
		{
			m.put(uuid, new ComponentButton(uuid, w, tier));
		}
		return m.get(uuid);
	}
	
	Node node = Network.newNode(this, Visibility.Neighbors).withComponent("buttons").create();
// Path: src/main/java/ds/mods/opengx/network/GlassesButtonEventMessage.java
// public static enum Button {
// 	ONOFF,
// 	SCREENPOWER,
// 	ACTION1,
// 	ACTION2,
// 	ACTIONM
// }


// Path: src/main/java/ds/mods/opengx/component/ComponentButton.java
import java.util.EnumSet;
import java.util.HashMap;
import java.util.UUID;
import java.util.WeakHashMap;
import li.cil.oc.api.Network;
import li.cil.oc.api.network.Arguments;
import li.cil.oc.api.network.Callback;
import li.cil.oc.api.network.Context;
import li.cil.oc.api.network.ManagedEnvironment;
import li.cil.oc.api.network.Message;
import li.cil.oc.api.network.Node;
import li.cil.oc.api.network.Visibility;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import ds.mods.opengx.network.GlassesButtonEventMessage.Button;

package ds.mods.opengx.component;



public class ComponentButton extends Component implements ManagedEnvironment {
	
	public static final WeakHashMap<World,HashMap<UUID,ComponentButton>> serverCGX = new WeakHashMap<World,HashMap<UUID,ComponentButton>>();
	public static final WeakHashMap<World,HashMap<UUID,ComponentButton>> clientCGX = new WeakHashMap<World,HashMap<UUID,ComponentButton>>();
	
	public static ComponentButton get(UUID uuid, World w, int tier)
	{
		WeakHashMap<World,HashMap<UUID,ComponentButton>> cgxm = w.isRemote ? clientCGX : serverCGX;
		if (!cgxm.containsKey(w))
		{
			cgxm.put(w, new HashMap<UUID,ComponentButton>());
		}
		HashMap<UUID,ComponentButton> m = cgxm.get(w);
		if (!m.containsKey(uuid))
		{
			m.put(uuid, new ComponentButton(uuid, w, tier));
		}
		return m.get(uuid);
	}
	
	Node node = Network.newNode(this, Visibility.Neighbors).withComponent("buttons").create();
	public EnumSet<Button> downButtons = EnumSet.noneOf(Button.class);