public void Draw ( DrawingDecorator drawingNode , World world ) throws Exception { beginDrawing ( world ) ; for ( JAXBElement < ? > jaxbobj : drawingNode . getDrawObjectType ( ) ) { Object obj = jaxbobj . getValue ( ) ; // isn't there an easier way of doing this? if ( obj instanceof DrawBlock ) DrawPrimitive ( ( DrawBlock ) obj , world ) ; else if ( obj instanceof DrawItem ) DrawPrimitive ( ( DrawItem ) obj , world ) ; else if ( obj instanceof DrawCuboid ) DrawPrimitive ( ( DrawCuboid ) obj , world ) ; else if ( obj instanceof DrawSphere ) DrawPrimitive ( ( DrawSphere ) obj , world ) ; else if ( obj instanceof DrawLine ) DrawPrimitive ( ( DrawLine ) obj , world ) ; else if ( obj instanceof DrawEntity ) DrawPrimitive ( ( DrawEntity ) obj , world ) ; else if ( obj instanceof DrawContainer ) DrawPrimitive ( ( DrawContainer ) obj , world ) ; else if ( obj instanceof DrawSign ) DrawPrimitive ( ( DrawSign ) obj , world ) ; else throw new Exception ( "Unsupported drawing primitive: " + obj . getClass ( ) . getName ( ) ) ; } endDrawing ( world ) ; }
Draws the specified drawing into the Minecraft world supplied .