
de.adrodoc55.minecraft.mpl.commands.chainlinks.ReferencingTestforSuccessCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mpl-compiler Show documentation
Show all versions of mpl-compiler Show documentation
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.
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