package JAKJ . RedstoneInMotion ;

public abstract class ModInteraction
{
	public static Class EstablishClass ( String Name )
	{
		try
		{
			return ( Class . forName ( Name ) ) ;
		}
		catch ( Throwable Throwable )
		{
			return ( null ) ;
		}
	}

	public static java . lang . reflect . Method EstablishMethod ( Class Class , String Name , Class ... Arguments )
	{
		try
		{
			java . lang . reflect . Method Method = Class . getDeclaredMethod ( Name , Arguments ) ;

			Method . setAccessible ( true ) ;

			return ( Method ) ;
		}
		catch ( Throwable Throwable )
		{
			return ( null ) ;
		}
	}

	public static java . lang . reflect . Field EstablishField ( Class Class , String Name )
	{
		try
		{
			java . lang . reflect . Field Field = Class . getDeclaredField ( Name ) ;

			Field . setAccessible ( true ) ;

			return ( Field ) ;
		}
		catch ( Throwable Throwable )
		{
			return ( null ) ;
		}
	}

	public static Class OmniwrenchClass ;

	public static Class CarriageControllerClass ;

	public static java . lang . reflect . Field PendingBlockUpdateSetField ;
	public static java . lang . reflect . Method RemovePendingBlockUpdate ;

	public static Class BC_TileGenericPipe ;
	public static java . lang . reflect . Field BC_TileGenericPipe_pipe ;
	public static java . lang . reflect . Method BC_TileGenericPipe_initialize ;
	public static Class BC_Pipe ;
	public static java . lang . reflect . Field BC_Pipe_transport ;
	public static Class BC_PipeTransportItems ;
	public static java . lang . reflect . Field BC_PipeTransportItems_delay ;
	public static java . lang . reflect . Field BC_PipeTransportItems_delayedEntitiesToLoad ;
	public static java . lang . reflect . Field BC_PipeTransportItems_travelingEntities ;
	public static Class BC_EntityData ;
	public static java . lang . reflect . Field BC_EntityData_item ;
	public static Class BC_EntityPassiveItem ;
	public static java . lang . reflect . Method BC_EntityPassiveItem_setWorld ;
	public static java . lang . reflect . Method BC_EntityPassiveItem_getEntityId ;
	public static java . lang . reflect . Field BC_EntityPassiveItem_position ;
	public static Class BC_Position ;
	public static java . lang . reflect . Field BC_Position_x ;
	public static java . lang . reflect . Field BC_Position_y ;
	public static java . lang . reflect . Field BC_Position_z ;

	public static void Establish ( )
	{
		OmniwrenchClass = EstablishClass ( "omnitools.item.ItemWrench" ) ;

		CarriageControllerClass = EstablishClass ( "JAKJ.RedstoneInMotion.CarriageControllerEntity" ) ;

		{
			PendingBlockUpdateSetField = EstablishField ( net . minecraft . world . WorldServer . class , "tickEntryQueue" ) ;

			RemovePendingBlockUpdate = EstablishMethod ( net . minecraft . world . WorldServer . class , "removeNextTickIfNeeded" , net . minecraft . world . NextTickListEntry . class ) ;
		}

		{
			BC_TileGenericPipe = EstablishClass ( "buildcraft.transport.TileGenericPipe" ) ;

			BC_TileGenericPipe_pipe = EstablishField ( BC_TileGenericPipe , "pipe" ) ;

			BC_TileGenericPipe_initialize = EstablishMethod ( BC_TileGenericPipe , "initialize" , BC_Pipe ) ;

			BC_Pipe = EstablishClass ( "buildcraft.transport.Pipe" ) ;

			BC_Pipe_transport = EstablishField ( BC_Pipe , "transport" ) ;

			BC_PipeTransportItems = EstablishClass ( "buildcraft.transport.PipeTransportItems" ) ;

			BC_PipeTransportItems_delay = EstablishField ( BC_PipeTransportItems , "delay" ) ;

			BC_PipeTransportItems_delayedEntitiesToLoad = EstablishField ( BC_PipeTransportItems , "delayedEntitiesToLoad" ) ;

			BC_PipeTransportItems_travelingEntities = EstablishField ( BC_PipeTransportItems , "travelingEntities" ) ;

			BC_EntityData = EstablishClass ( "buildcraft.transport.EntityData" ) ;

			BC_EntityData_item = EstablishField ( BC_EntityData , "item" ) ;

			BC_EntityPassiveItem = EstablishClass ( "buildcraft.core.EntityPassiveItem" ) ;

			BC_EntityPassiveItem_setWorld = EstablishMethod ( BC_EntityPassiveItem , "setWorld" , net . minecraft . world . World . class ) ;

			BC_EntityPassiveItem_getEntityId = EstablishMethod ( BC_EntityPassiveItem , "getEntityId" ) ;

			BC_EntityPassiveItem_position = EstablishField ( BC_EntityPassiveItem , "position" ) ;

			BC_Position = EstablishClass ( "buildcraft.api.core.Position" ) ;

			BC_Position_x = EstablishField ( BC_Position , "x" ) ;

			BC_Position_y = EstablishField ( BC_Position , "y" ) ;

			BC_Position_z = EstablishField ( BC_Position , "z" ) ;
		}
	}
}
