Skip to content

Commit

Permalink
Commission macro final fix + gradle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelly298 committed Apr 25, 2023
1 parent 2236d8e commit c948138
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ buildscript {
url = "https://files.minecraftforge.net/maven"
}
maven { url "https://jitpack.io" }
maven { url "https://repo.spongepowered.org/repository/maven-public/" }
maven { url "https://repo.spongepowered.org/repository/maven/" }
}
dependencies {
classpath "com.github.Skytils:ForgeGradle:41dfce0a70"
classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0"
classpath "com.github.debuggingss:MixinGradle:0.6-SNAPSHOT"
classpath "com.github.xcfrg:MixinGradle:0.6-SNAPSHOT"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

Expand Down Expand Up @@ -70,6 +70,7 @@ repositories {

dependencies {
implementation('com.google.code.gson:gson:2.10.1')

implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT')
annotationProcessor('org.spongepowered:mixin:0.7.11-SNAPSHOT')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private double calculatePathCost(List<BlockNode> nodes) {
double cost = 0.0D;
if (nodes.size() <= 2) {
for (BlockNode node : nodes)
cost += (0.5 * Math.abs(AngleUtils.getActualRotationYaw(mc.thePlayer.rotationYaw) - AngleUtils.getRequiredYawSide(node.getPos())) + Math.abs(mc.thePlayer.rotationPitch - AngleUtils.getRequiredPitchSide(node.getPos()))) / 540.0d + mc.thePlayer.rayTrace(5, 1).hitVec.distanceTo(new Vec3(node.getPos())) / 540.0d;
cost += (Math.abs(AngleUtils.getActualRotationYaw(mc.thePlayer.rotationYaw) - AngleUtils.getRequiredYawSide(node.getPos())) + Math.abs(mc.thePlayer.rotationPitch - AngleUtils.getRequiredPitchSide(node.getPos()))) / 540.0d;
} else {
for (BlockNode node : nodes)
cost += (node.getType() == BlockType.WALK) ? 1D : 1.5D;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/jelly/MightyMiner/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public class Config extends cc.polyfrost.oneconfig.config.Config {

@VigilanceName(name = "Arrive check wait time in ms", category = COMMISSION_MACRO, subcategory = "Warping")
@Slider( name = "Arrive check wait time in ms", category = COMMISSION_MACRO, subcategory = "Warping", max = 750, min = 200)
public int commArriveWaitTime = 10;
public int commArriveWaitTime = 250;

@VigilanceName(name = "Stop on limbo", category = COMMISSION_MACRO, subcategory = "Failsafe")
@Switch(name = "Stop on limbo", description = "Stop macro when getting kicked to limbo", category = COMMISSION_MACRO, subcategory = "Failsafe")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2102,13 +2102,13 @@ protected void onDisable() {


private ArrayList<BlockData<?>> getHighestPriority() {
for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(3))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(3);
}

for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
new ArrayList<BlockData<?>>() {{
add(new BlockData<>(Blocks.stained_hardened_clay, null));
add(new BlockData<>(Blocks.wool, EnumDyeColor.GRAY));
Expand All @@ -2122,7 +2122,7 @@ private ArrayList<BlockData<?>> getHighestPriority() {
}};
}

for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(2))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ public void onTick(TickEvent.Phase phase) {


private ArrayList<BlockData<?>> getHighestPriority() {
for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority1))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority1);
}
for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority2))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority2);
}
for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority3))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority3);
}
for(BlockPos bp : BlockUtils.findBlockInCube(10, null, 0, 256,
for(BlockPos bp : BlockUtils.findBlockInCube(12, null, 0, 256,
MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority4))) {
if(BlockUtils.canMineBlock(bp))
return MineUtils.getMithrilColorBasedOnPriority(MightyMiner.config.mithPriority4);
Expand Down

0 comments on commit c948138

Please sign in to comment.