congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IPartitionData.getPartitionSettings
Code IndexAdd Tabnine to your IDE (free)

How to use
getPartitionSettings
method
in
jsettlers.common.map.partition.IPartitionData

Best Java code snippets using jsettlers.common.map.partition.IPartitionData.getPartitionSettings (Showing top 2 results out of 315)

origin: jsettlers/settlers-remake

private IMaterialDistributionSettings currentDistributionSettingsProvider(IGraphicsGrid grid, ShortPoint2D position) {
  if (currentTab != null) {
    if (grid.getPlayerIdAt(position.x, position.y) >= 0) {
      return grid.getPartitionData(position.x, position.y).getPartitionSettings().getDistributionSettings(currentTab.materialButton.getMaterial());
    }
  }
  return null;
}
origin: jsettlers/settlers-remake

private void updatePositions() {
  IPartitionData data = getPartitonData();
  if (data == null) {
    setOrder(null);
    removeAll();
  } else {
    EMaterialType[] newOrder = new EMaterialType[EMaterialType.DROPPABLE_MATERIALS.length];
    BitSet materialsAccepted = new BitSet();
    for (int i = 0; i < newOrder.length; i++) {
      // FIXME: Synchronize!
      newOrder[i] = data.getPartitionSettings().getMaterialTypeForPriority(i);
    }
    IStockSettings stockSettings = data.getPartitionSettings().getStockSettings();
    for (EMaterialType materialType : EMaterialType.DROPPABLE_MATERIALS) {
      materialsAccepted.set(materialType.ordinal, stockSettings.isAccepted(materialType));
    }
    setOrder(newOrder);
    for (EMaterialType material : newOrder) {
      SelectionManagedMaterialButton button = buttons[material.ordinal];
      AnimatablePosition position = positions[material.ordinal];
      button.setDotColor(getColor(materialsAccepted, button));
      removeChild(button);
      addChild(button, position.getX(), position.getY(), position.getX() + BUTTON_WIDTH, position.getY() + BUTTON_HEIGHT);
    }
  }
}
jsettlers.common.map.partitionIPartitionDatagetPartitionSettings

Javadoc

Returns the settings of this partition.

Popular methods of IPartitionData

  • getAmountOf
    Returns the number of materials of the given type, available in the respective partition.

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
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