package org.squiddev.iwasbored.neural;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import org.squiddev.iwasbored.api.IProvider;
import org.squiddev.iwasbored.api.neural.INeuralReference;
import org.squiddev.iwasbored.inventory.SingleItem;
import org.squiddev.iwasbored.registry.Module;
import org.squiddev.iwasbored.registry.Registry;

/**
 * Basic provider for armor items
 */
public class ArmorProvider extends Module implements IProvider<EntityLivingBase, INeuralReference> {
	@Override
	public int getPriority() {
		return 0;
	}

	@Override
	public INeuralReference get(EntityLivingBase entityLivingBase) {
		if (entityLivingBase instanceof EntityPlayer) {
			EntityPlayer player = (EntityPlayer) entityLivingBase;
			ItemStack stack = player.getCurrentArmor(3);
			if (stack != null && stack.getItem() == Registry.itemNeuralInterface) {
				return new NeuralInterfaceReference(new SingleItem(player.inventory, 36 + 3, player));
			}
		}

		return null;
	}
}

@@ -165,16 +165,64 @@
 mStack;%0A
+import org.squiddev.iwasbored.api.IWasBoredAPI;%0A
 import o
@@ -1090,11 +1090,125 @@
 null;%0A%09%7D
+%0A%0A%09@Override%0A%09public void postInit() %7B%0A%09%09IWasBoredAPI.instance().neuralRegistry().registerNeuralProvider(this);%0A%09%7D
 %0A%7D%0A

Fix armor provider