All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adrodoc55.minecraft.mpl.commands.chainlinks.ReferencingTestforSuccessCommand Maven / Gradle / Ivy

Go to download

MPL is a language that makes it easier to write applications for Minecraft 1.9 or higher. The final result of compiling an MPL application are command blocks that can be imported into your world in various ways. MPL comes with it's own editor that supports syntax- and error-highlighting and has a built in compiler.

There is a newer version: 1.3.2
Show newest version
package de.adrodoc55.minecraft.mpl.commands.chainlinks;

import de.adrodoc55.minecraft.mpl.commands.Mode;

public class ReferencingTestforSuccessCommand extends ReferencingCommand {

  public ReferencingTestforSuccessCommand(int relative, Mode previousMode, boolean success) {
    this(relative, previousMode, success, false);
  }

  public ReferencingTestforSuccessCommand(int relative, Mode previousMode, boolean success,
      boolean conditional) {
    super(constructCommand(previousMode, success), conditional);
    this.relative = relative;
  }

  public static String constructCommand(Mode previousMode, boolean success) {
    return "testforblock " + REF + " " + previousMode.getStringBlockId() + " -1 {SuccessCount:"
        + (success ? 1 : 0) + "}";
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy