Tabnine Logo
IGraphicsBackgroundListener.backgroundShapeChangedAt
Code IndexAdd Tabnine to your IDE (free)

How to use
backgroundShapeChangedAt
method
in
jsettlers.common.map.IGraphicsBackgroundListener

Best Java code snippets using jsettlers.common.map.IGraphicsBackgroundListener.backgroundShapeChangedAt (Showing top 6 results out of 315)

origin: jsettlers/settlers-remake

public final void setHeightAt(short x, short y, byte height) {
  this.heightGrid[x + y * width] = height;
  backgroundListener.backgroundShapeChangedAt(x, y);
}
origin: jsettlers/settlers-remake

public void flattenAndChangeHeightTowards(int x, int y, byte targetHeight) {
  final int index = x + y * width;
  this.heightGrid[index] += Math.signum(targetHeight - this.heightGrid[index]);
  this.landscapeGrid[index] = ELandscapeType.FLATTENED.ordinal;
  this.temporaryFlatened[index] = Byte.MAX_VALUE; // cancel the flattening
  backgroundListener.backgroundShapeChangedAt(x, y);
}
origin: jsettlers/settlers-remake

public final void setLandscapeTypeAt(int x, int y, ELandscapeType landscapeType) {
  if (landscapeType == ELandscapeType.FLATTENED && this.landscapeGrid[x + y * width] != ELandscapeType.FLATTENED.ordinal) {
    flattenedResetter.addPosition(x, y);
  }
  this.landscapeGrid[x + y * width] = landscapeType.ordinal;
  backgroundListener.backgroundShapeChangedAt(x, y);
}
origin: jsettlers/settlers-remake

public void setHeight(int x, int y, int height) {
  byte safeHeight;
  if (height >= Byte.MAX_VALUE) {
    safeHeight = Byte.MAX_VALUE;
  } else if (height <= 0) {
    safeHeight = 0;
  } else {
    safeHeight = (byte) height;
  }
  undoDelta.addHeightChange(x, y, heights[x][y]);
  heights[x][y] = safeHeight;
  if (backgroundListener != null) {
    backgroundListener.backgroundShapeChangedAt((short) x, (short) y);
  }
}
origin: jsettlers/settlers-remake

private boolean setLandscape(int x, int y, ELandscapeType type) {
  if (objects[x][y] != null) {
    if (!landscapeAllowsObjects(type)) {
      return false;
    }
    if (objects[x][y] instanceof LandscapeConstraint) {
      LandscapeConstraint constraint = (LandscapeConstraint) objects[x][y];
      if (!constraint.getAllowedLandscapes().contains(type)) {
        return false;
      }
    }
  }
  undoDelta.addLandscapeChange(x, y, landscapes[x][y]);
  landscapes[x][y] = type;
  if (backgroundListener != null) {
    backgroundListener.backgroundShapeChangedAt((short) x, (short) y);
  }
  return true;
}
origin: jsettlers/settlers-remake

inverse.addHeightChange(c.x, c.y, heights[c.x][c.y]);
heights[c.x][c.y] = c.height;
backgroundListener.backgroundShapeChangedAt(c.x, c.y);
c = c.next;
inverse.addLandscapeChange(cl.x, cl.y, landscapes[cl.x][cl.y]);
landscapes[cl.x][cl.y] = cl.landscape;
backgroundListener.backgroundShapeChangedAt(cl.x, cl.y);
cl = cl.next;
jsettlers.common.mapIGraphicsBackgroundListenerbackgroundShapeChangedAt

Javadoc

This method is called if the landscape type or height has changed at the given position.

Popular methods of IGraphicsBackgroundListener

    Popular in Java

    • Making http requests using okhttp
    • setScale (BigDecimal)
    • setContentView (Activity)
    • getExternalFilesDir (Context)
    • Component (java.awt)
      A component is an object having a graphical representation that can be displayed on the screen and t
    • File (java.io)
      An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
    • InputStreamReader (java.io)
      A class for turning a byte stream into a character stream. Data read from the source input stream is
    • SocketTimeoutException (java.net)
      This exception is thrown when a timeout expired on a socket read or accept operation.
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • TimeZone (java.util)
      TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
    • Best IntelliJ plugins
    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