Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Meloweh committed Nov 15, 2021
1 parent 4088739 commit 6fafbd3
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 11 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

plugins {
id 'java'
id 'dev.architectury.loom' version '0.8.0-SNAPSHOT'
id 'dev.architectury.loom' version '0.9.0-SNAPSHOT'
id 'maven-publish'
}


group 'baritone'
version '1.7.0'
version '1.7.1'

import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
Expand Down Expand Up @@ -176,7 +176,7 @@ task createDist(type: CreateDistTask, dependsOn: proguard)
publishing {
publications {
maven(MavenPublication) {
artifact 'dist/baritone-api-fabric-1.7.0.jar'
artifact 'dist/baritone-api-fabric-1.7.1.jar'
}
}
}
Expand Down
27 changes: 27 additions & 0 deletions src/api/java/baritone/api/process/IBuilderProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Vec3i;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import java.io.File;
import java.util.List;
import java.util.Map;

/**
* @author Brady
Expand Down Expand Up @@ -55,6 +57,15 @@ default boolean build(String schematicFile, BlockPos origin) {
return build(schematicFile, file, origin);
}

void build(String name, ISchematic schematic, Vec3i origin, boolean fromAltoclef);

boolean build(String name, File schematic, Vec3i origin, boolean fromAltoclef);

default boolean build(String schematicFile, BlockPos origin, boolean fromAltoclef) {
File file = new File(new File(Minecraft.getInstance().gameDirectory, "schematics"), schematicFile);
return build(schematicFile, file, origin, fromAltoclef);
}

void buildOpenSchematic();

void pause();
Expand All @@ -71,4 +82,20 @@ default boolean build(String schematicFile, BlockPos origin) {
* cause it to give up. This is updated every tick, but only while the builder process is active.
*/
List<BlockState> getApproxPlaceable();

Map<BlockState, Integer> getMissing();

Vec3i getSchemSize();

boolean isFromAltoclefFinished();

boolean isFromAltoclef();

void reset();

void setAboveBreak(final BlockPos pos);

BlockPos getAboveBreak();

boolean clearState();
}
14 changes: 14 additions & 0 deletions src/main/java/baritone/altoclef/AltoClefSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ public void avoidBlockBreak(Predicate<BlockPos> avoider) {
}
}

/**
* If the original reference is passed and in the list,
* it will be removed from it.
*
* @param avoider original object reference that is in the list.
*/
public void removeAvoidBlockBreak(Predicate<BlockPos> avoider) {
synchronized (breakMutex) {
if (_breakAvoiders.contains(avoider)) {
_breakAvoiders.remove(avoider);
}
}
}

public void configurePlaceBucketButDontFall(boolean allow) {
synchronized (propertiesMutex) {
_dontPlaceBucketButStillFall = allow;
Expand Down
Loading

0 comments on commit 6fafbd3

Please sign in to comment.