Applied-Energistics-2-tiler.../core/api/imc/IMCBlackListSpatial.java
2014-09-20 22:37:58 +02:00

32 lines
660 B
Java

package appeng.core.api.imc;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.core.AELog;
import appeng.core.api.IIMCHandler;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
public class IMCBlackListSpatial implements IIMCHandler
{
@Override
public void post(IMCMessage m)
{
ItemStack is = m.getItemStackValue();
if ( is != null )
{
Block blk = Block.getBlockFromItem( is.getItem() );
if ( blk != null )
{
AEApi.instance().registries().movable().blacklistBlock( blk );
return;
}
}
AELog.info( "Bad Block blacklisted by " + m.getSender() );
}
}