Enhancement: put IMC handling into separate class
Clarify documentation
This commit is contained in:
+2
-4
@@ -20,9 +20,7 @@ package appeng.core.api;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public interface IIMCHandler
|
||||
public interface IIMCProcessor
|
||||
{
|
||||
|
||||
void post(IMCMessage m);
|
||||
|
||||
void process( IMCMessage m );
|
||||
}
|
||||
@@ -22,14 +22,14 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.api.IIMCHandler;
|
||||
import appeng.core.api.IIMCProcessor;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCBlackListSpatial implements IIMCHandler
|
||||
public class IMCBlackListSpatial implements IIMCProcessor
|
||||
{
|
||||
|
||||
@Override
|
||||
public void post(IMCMessage m)
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
|
||||
ItemStack is = m.getItemStackValue();
|
||||
|
||||
@@ -54,14 +54,13 @@ package appeng.core.api.imc;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.api.IIMCHandler;
|
||||
import appeng.core.api.IIMCProcessor;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCGrinder implements IIMCHandler
|
||||
public class IMCGrinder implements IIMCProcessor
|
||||
{
|
||||
|
||||
@Override
|
||||
public void post(IMCMessage m)
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
NBTTagCompound msg = m.getNBTValue();
|
||||
NBTTagCompound inTag = (NBTTagCompound) msg.getTag( "in" );
|
||||
@@ -93,5 +92,4 @@ public class IMCGrinder implements IIMCHandler
|
||||
else
|
||||
AEApi.instance().registries().grinder().addRecipe( in, out, turns );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ package appeng.core.api.imc;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.api.IIMCHandler;
|
||||
import appeng.core.api.IIMCProcessor;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCMatterCannon implements IIMCHandler
|
||||
public class IMCMatterCannon implements IIMCProcessor
|
||||
{
|
||||
|
||||
@Override
|
||||
public void post(IMCMessage m)
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
NBTTagCompound msg = m.getNBTValue();
|
||||
NBTTagCompound item = (NBTTagCompound) msg.getTag( "item" );
|
||||
|
||||
@@ -31,14 +31,14 @@ package appeng.core.api.imc;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.api.IIMCHandler;
|
||||
import appeng.core.api.IIMCProcessor;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCP2PAttunement implements IIMCHandler
|
||||
public class IMCP2PAttunement implements IIMCProcessor
|
||||
{
|
||||
|
||||
@Override
|
||||
public void post(IMCMessage m)
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase();
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@ package appeng.core.api.imc;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.api.IIMCHandler;
|
||||
import appeng.core.api.IIMCProcessor;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCSpatial implements IIMCHandler
|
||||
public class IMCSpatial implements IIMCProcessor
|
||||
{
|
||||
|
||||
@Override
|
||||
public void post(IMCMessage m)
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user