private void registerRenderer(Object object)
	{
		//get the classes to use to render
		Pair<Class<? extends MalisisRenderer<?>>, Class<? extends MalisisRenderer<?>>> rendererClasses = getRendererClasses(object);
		if (rendererClasses == null)
			return;

		//get the block renderer
		MalisisRenderer<?> renderer = null;
		try
		{
			renderer = getRenderer(rendererClasses.getLeft());
		}
		catch (InstantiationException | IllegalAccessException e)
		{
			MalisisCore.log.error(	"[MalisisRegistry] Failed to load {} renderer for {}",
									rendererClasses.getLeft().getSimpleName(),
									object.getClass().getSimpleName(),
									e);
			return;
		}

		//register the block renderer
		if (object instanceof Block && renderer != null)
		{
			blockRenderers.put((Block) object, renderer);
			object = Item.getItemFromBlock((Block) object);
		}

		//get the item renderer
		try
		{
			renderer = getRenderer(rendererClasses.getRight());
		}
		catch (InstantiationException | IllegalAccessException e)
		{
			MalisisCore.log.error(	"[MalisisRegistry] Failed to load {} renderer for {}",
									rendererClasses.getLeft().getSimpleName(),
									object.getClass().getSimpleName());
			return;
		}

		//register the item renderer
		if (object != Items.AIR && renderer != null)
		{
			itemRenderers.put((Item) object, renderer);
		}
	}
private void registerRenderer ( Object object ) { Pair < Class < ? extends MalisisRenderer < ? > > , Class < ? extends MalisisRenderer < ? > > > rendererClasses = getRendererClasses ( object ) ; if ( rendererClasses == null ) return ; MalisisRenderer < ? > renderer = null ; try { renderer = getRenderer ( rendererClasses . getLeft ( ) ) ; } catch ( InstantiationException | IllegalAccessException e ) { MalisisCore . log . error ( "[MalisisRegistry] Failed to load {} renderer for {}" , rendererClasses . getLeft ( ) . getSimpleName ( ) , object . getClass ( ) . getSimpleName ( ) , e ) ; return ; } if ( object instanceof Block && renderer != null ) { blockRenderers . put ( ( Block ) object , renderer ) ; object = Item . getItemFromBlock ( ( Block ) object ) ; } try { renderer = getRenderer ( rendererClasses . getRight ( ) ) ; } catch ( InstantiationException | IllegalAccessException e ) { MalisisCore . log . error ( "[MalisisRegistry] Failed to load {} renderer for {}" , rendererClasses . getLeft ( ) . getSimpleName ( ) , object . getClass ( ) . getSimpleName ( ) ) ; return ; } if ( object != Items . AIR && renderer != null ) { itemRenderers . put ( ( Item ) object , renderer ) ; } }
Registers a {@link MalisisRenderer} associated with the object.<br>
The object class needs to have the {@link MalisisRendered} annotation.<br>
Automatically called for blocks and items in the registries.

@param object the object