File tree Expand file tree Collapse file tree 4 files changed +9
-10
lines changed
java/com/lambda/mixin/render Expand file tree Collapse file tree 4 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1717
1818package com .lambda .mixin .render ;
1919
20- import com .lambda .task .RootTask ;
2120import com .lambda .util .DebugInfoHud ;
2221import net .minecraft .client .gui .hud .DebugHud ;
2322import org .spongepowered .asm .mixin .Mixin ;
@@ -33,9 +32,4 @@ public class DebugHudMixin {
3332 private void onGetRightText (CallbackInfoReturnable <List <String >> cir ) {
3433 DebugInfoHud .addDebugInfo (cir .getReturnValue ());
3534 }
36-
37- @ Inject (method = "getLeftText" , at = @ At ("TAIL" ))
38- private void onGetLeftText (CallbackInfoReturnable <List <String >> cir ) {
39- cir .getReturnValue ().addAll (List .of (RootTask .INSTANCE .toString ().split ("\n " )));
40- }
4135}
Original file line number Diff line number Diff line change 1818package com.lambda.config.groups
1919
2020import com.lambda.context.SafeContext
21- import com.lambda.interaction.material.StackSelection
2221import com.lambda.interaction.material.StackSelection.Companion.selectStack
2322import com.lambda.threading.runSafe
2423import com.lambda.util.Describable
@@ -32,13 +31,16 @@ interface EatConfig {
3231 val eatOnHunger: Boolean
3332 val minFoodLevel: Int
3433 val nutritiousFood: List <Item >
35- val selectionPriority: SelectionPriority
3634 val saturated: Saturation
35+
3736 val eatOnFire: Boolean
3837 val resistanceFood: List <Item >
38+
3939 val eatOnDamage: Boolean
4040 val minDamage: Int
4141 val regenerationFood: List <Item >
42+
43+ val selectionPriority: SelectionPriority
4244 val ignoreBadFood: Boolean
4345 val badFood: List <Item >
4446
@@ -67,7 +69,7 @@ interface EatConfig {
6769 }
6870
6971 enum class Reason (val message : (ItemStack ) -> String ) {
70- None ({ " Waiting for food to eat..." }),
72+ None ({ " Waiting for reason to eat..." }),
7173 Hunger ({ " Eating ${it.item.name.string} due to Hunger" }),
7274 Damage ({ " Eating ${it.item.name.string} due to Damage" }),
7375 Fire ({ " Eating ${it.item.name.string} due to Fire" });
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import com.lambda.event.EventFlow.unsubscribe
2323import com.lambda.event.Muteable
2424import com.lambda.event.events.TickEvent
2525import com.lambda.event.listener.SafeListener.Companion.listen
26+ import com.lambda.module.modules.client.TaskFlowModule
2627import com.lambda.threading.runSafe
2728import com.lambda.util.Communication.logError
2829import com.lambda.util.Nameable
@@ -126,6 +127,7 @@ abstract class Task<Result> : Nameable, Muteable {
126127 fun success (result : Result ) {
127128 unsubscribe()
128129 state = State .COMPLETED
130+ if (! TaskFlowModule .showAllEntries) parent?.subTasks?.remove(this )
129131 runSafe {
130132 executeNextTask(result)
131133 }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import com.lambda.task.tasks.BuildTask.Companion.build
3636import com.lambda.util.BlockUtils.blockPos
3737import com.lambda.util.BlockUtils.blockState
3838import com.lambda.util.item.ItemUtils.shulkerBoxes
39+ import com.lambda.util.math.distSq
3940import net.minecraft.block.ChestBlock
4041import net.minecraft.entity.mob.ShulkerEntity
4142import net.minecraft.item.ItemStack
@@ -72,7 +73,7 @@ class PlaceContainer @Ta5kBuilder constructor(
7273 val containerPosition = options.filter {
7374 // ToDo: Check based on if we can move the player close enough rather than y level once the custom pathfinder is merged
7475 it.blockPos.y == player.blockPos.y
75- }.minOrNull() ?.blockPos ? : run {
76+ }.minByOrNull { it.blockPos distSq player.pos } ?.blockPos ? : run {
7677 failure(" Couldn't find a valid container placement position for ${startStack.name.string} " )
7778 return @onStart
7879 }
You can’t perform that action at this time.
0 commit comments