Examples of PartType


Examples of appeng.items.parts.PartType

      }

      if ( itemName.startsWith( "ItemPart." ) )
      {
        String partName = itemName.substring( itemName.indexOf( "." ) + 1 );
        PartType pt = PartType.valueOf( partName );
        // itemName = itemName.substring( 0, itemName.indexOf( "." ) );
        int dVal = ItemMultiPart.instance.getDamageByType( pt );
        if ( dVal >= 0 )
          return new ResolverResult( "ItemMultiPart", dVal );
      }
View Full Code Here

Examples of com.flansmod.common.parts.PartType

  @Override
    public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips)
  {
    NBTTagCompound tags = getTagCompound(stack, player.worldObj);
    String engineName = tags.getString("Engine");
    PartType part = PartType.getPart(engineName);
    if(part != null)
      lines.add(part.name);
  }
View Full Code Here

Examples of com.flansmod.common.parts.PartType

    {
            Collections.addAll(lines, type.description.split("_"));
    }
    NBTTagCompound tags = getTagCompound(stack, player.worldObj);
    String engineName = tags.getString("Engine");
    PartType part = PartType.getPart(engineName);
    if(part != null)
      lines.add(part.name);
  }
View Full Code Here

Examples of com.flansmod.common.parts.PartType

        //Get the stack in each slot
        ItemStack stackInSlot = temporaryInventory.getStackInSlot(n);
        //Check to see if its a part
        if(stackInSlot != null && stackInSlot.getItem() instanceof ItemPart)
        {
          PartType partType = ((ItemPart)stackInSlot.getItem()).type;
          //Check its an engine that we can use
          if(partType.category == 2 && partType.worksWith.contains(EnumType.getFromObject(selectedType)))
          {
            //If we already have engines of this type, add these ones to the stack
            if(engines.containsKey(partType))
View Full Code Here

Examples of com.flansmod.common.parts.PartType

    {
            Collections.addAll(lines, type.description.split("_"));
    }
    NBTTagCompound tags = getTagCompound(stack, player.worldObj);
    String engineName = tags.getString("Engine");
    PartType part = PartType.getPart(engineName);
    if(part != null)
      lines.add(part.name);
  }
View Full Code Here

Examples of com.flansmod.common.parts.PartType

      //Get the stack in each slot
      ItemStack stackInSlot = temporaryInventory.getStackInSlot(n);
      //Check to see if its a part
      if(stackInSlot != null && stackInSlot.getItem() instanceof ItemPart)
      {
        PartType partType = ((ItemPart)stackInSlot.getItem()).type;
        //Check its an engine
        if(partType.category == 2 && partType.worksWith.contains(EnumType.getFromObject(type)))
        {
          //If we already have engines of this type, add these ones to the stack
          if(engines.containsKey(partType))
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.multipart.PartType

            }
            catch (InvocationTargetException e)
            {
               throw new WriterException(e.getCause());
            }
            PartType partType = method.getAnnotation(PartType.class);

            multipart.addFormData(param.value(), value, method.getReturnType(), method.getGenericReturnType(), MediaType.valueOf(partType.value()));
         }
      }

      write(multipart, mediaType, httpHeaders, entityStream);
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.multipart.PartType

            }
            catch (IllegalAccessException e)
            {
               throw new WriterException(e);
            }
            PartType partType = field.getAnnotation(PartType.class);

            output.addFormData(param.value(), value, field.getType(), field.getGenericType(), MediaType.valueOf(partType.value()));
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.multipart.PartType

      return -1;
   }

   public void writeTo(Map<String, Object> map, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException
   {
      PartType partType = FindAnnotation.findAnnotation(annotations, PartType.class);
      MediaType partMediaType = MediaType.valueOf(partType.value());

      MultipartFormDataOutput output = new MultipartFormDataOutput();
      for (Map.Entry<String, Object> entry : map.entrySet())
      {
         output.addFormData(entry.getKey(), entry.getValue(), partMediaType);
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.multipart.PartType

            }
            catch (InvocationTargetException e)
            {
               throw new WriterException(e.getCause());
            }
            PartType partType = method.getAnnotation(PartType.class);
            String filename = getFilename(method);

            multipart.addFormData(param.value(), value, method.getReturnType(), method.getGenericReturnType(), MediaType.valueOf(partType.value()), filename);
         }
      }

      write(multipart, mediaType, httpHeaders, entityStream);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.