Tabnine Logo
BaubleType.values
Code IndexAdd Tabnine to your IDE (free)

How to use
values
method
in
baubles.api.BaubleType

Best Java code snippets using baubles.api.BaubleType.values (Showing top 2 results out of 315)

origin: PrinceOfAmber/Cyclic

@Override
@Optional.Method(modid = "baubles")
public baubles.api.BaubleType getBaubleType(ItemStack arg0) {
 try {
  if (baubles.api.BaubleType.values().length >= 4) { //length is 4 if trinket
   return baubles.api.BaubleType.TRINKET;
  }
  else {
   return baubles.api.BaubleType.RING;
  }
 }
 catch (Exception e) {
  return baubles.api.BaubleType.RING;
 }
}
origin: TeamWizardry/Wizardry

  @Override
  @Optional.Method(modid = "baubles")
  public Iterable<ItemStack> get(EntityLivingBase entity) {
    if (!(entity instanceof EntityPlayer)) return entity.getArmorInventoryList();
    if (BaublesApi.getBaublesHandler((EntityPlayer) entity) == null) return entity.getArmorInventoryList();
    ImmutableList.Builder<ItemStack> stacks = ImmutableList.builder();
    IBaublesItemHandler inv = BaublesApi.getBaublesHandler((EntityPlayer) entity);
    for (BaubleType type : BaubleType.values())
      for (int slot : type.getValidSlots()) {
        stacks.add(inv.getStackInSlot(slot));
      }
    return stacks.build();
  }
}
baubles.apiBaubleTypevalues

Popular methods of BaubleType

  • getValidSlots
  • hasSlot
  • valueOf

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now