make logs debug
build / build (push) Successful in 2m43s

This commit is contained in:
Dynamitos
2025-10-26 08:37:22 +01:00
parent b9282e2be9
commit 29847fc4dc
@@ -42,7 +42,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
@Inject(method = "findStorage", at = @At("HEAD"), cancellable = true) @Inject(method = "findStorage", at = @At("HEAD"), cancellable = true)
private void findStorage(ServerWorld world, PathAwareEntity entity, private void findStorage(ServerWorld world, PathAwareEntity entity,
CallbackInfoReturnable<Optional<MoveItemsTask.Storage>> callbackInfo) { CallbackInfoReturnable<Optional<MoveItemsTask.Storage>> callbackInfo) {
Copperfarmers.LOGGER.info("Wrapped findStorage called"); Copperfarmers.LOGGER.debug("Wrapped findStorage called");
Box box = ((MoveItemsTaskAccessor) this).copperfarmers$getSearchBoundingBox(entity); Box box = ((MoveItemsTaskAccessor) this).copperfarmers$getSearchBoundingBox(entity);
if (!entity.getEquippedStack(EquipmentSlot.MAINHAND).isOf(Items.WHEAT_SEEDS)) { if (!entity.getEquippedStack(EquipmentSlot.MAINHAND).isOf(Items.WHEAT_SEEDS)) {
@@ -55,7 +55,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
var blockState = world.getBlockState(pos); var blockState = world.getBlockState(pos);
// if block is farmland // if block is farmland
if(blockState.isOf(Blocks.FARMLAND) && world.isAir(pos.up())) { if(blockState.isOf(Blocks.FARMLAND) && world.isAir(pos.up())) {
Copperfarmers.LOGGER.info("Found farmland at " + pos); Copperfarmers.LOGGER.debug("Found farmland at " + pos);
callbackInfo.setReturnValue(Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState))); callbackInfo.setReturnValue(Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState)));
return; return;
} }
@@ -66,7 +66,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
@Inject(method = "testContainer", at = @At("HEAD"), cancellable = true) @Inject(method = "testContainer", at = @At("HEAD"), cancellable = true)
private void testContainer(PathAwareEntity entity, BlockState state, CallbackInfoReturnable<Boolean> callbackInfo) { private void testContainer(PathAwareEntity entity, BlockState state, CallbackInfoReturnable<Boolean> callbackInfo) {
Copperfarmers.LOGGER.info("Wrapped testContainer called"); Copperfarmers.LOGGER.debug("Wrapped testContainer called");
if(state.isOf(Blocks.FARMLAND)) { if(state.isOf(Blocks.FARMLAND)) {
callbackInfo.setReturnValue(true); callbackInfo.setReturnValue(true);
} }
@@ -74,16 +74,16 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
@Inject(method = "tickInteracting", at = @At("HEAD"), cancellable = true) @Inject(method = "tickInteracting", at = @At("HEAD"), cancellable = true)
private void tickInteracting(MoveItemsTask.Storage storage, World world, PathAwareEntity entity, CallbackInfo callbackInfo) { private void tickInteracting(MoveItemsTask.Storage storage, World world, PathAwareEntity entity, CallbackInfo callbackInfo) {
Copperfarmers.LOGGER.info("Wrapped tickInteracting called"); Copperfarmers.LOGGER.debug("Wrapped tickInteracting called");
MoveItemsTaskAccessor thisAccessor = (MoveItemsTaskAccessor)this; MoveItemsTaskAccessor thisAccessor = (MoveItemsTaskAccessor)this;
if (!thisAccessor.copperfarmers$isWithinRange(2.0, storage, world, entity, thisAccessor.copperfarmers$atCenterY(entity))) { if (!thisAccessor.copperfarmers$isWithinRange(2.0, storage, world, entity, thisAccessor.copperfarmers$atCenterY(entity))) {
thisAccessor.copperfarmers$transitionToTravelling(entity); thisAccessor.copperfarmers$transitionToTravelling(entity);
} else { } else {
thisAccessor.copperfarmers$setInteractionTicks(thisAccessor.copperfarmers$getInteractionTicks() + 1); thisAccessor.copperfarmers$setInteractionTicks(thisAccessor.copperfarmers$getInteractionTicks() + 1);
thisAccessor.copperfarmers$setLookTarget(storage, entity); thisAccessor.copperfarmers$setLookTarget(storage, entity);
Copperfarmers.LOGGER.info("Interaction ticks: " + thisAccessor.copperfarmers$getInteractionTicks()); Copperfarmers.LOGGER.debug("Interaction ticks: " + thisAccessor.copperfarmers$getInteractionTicks());
if (thisAccessor.copperfarmers$getInteractionTicks() >= 60) { if (thisAccessor.copperfarmers$getInteractionTicks() >= 60) {
Copperfarmers.LOGGER.info("Interacting with storage at " + storage.pos()); Copperfarmers.LOGGER.debug("Interacting with storage at " + storage.pos());
this.selectInteractionState2( this.selectInteractionState2(
entity, entity,
storage, storage,
@@ -100,7 +100,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
@Inject(method = "transitionToInteracting", at = @At("HEAD"), cancellable = true) @Inject(method = "transitionToInteracting", at = @At("HEAD"), cancellable = true)
private void transitionToInteracting(MoveItemsTask.Storage storage, PathAwareEntity entity, CallbackInfo callbackInfo) { private void transitionToInteracting(MoveItemsTask.Storage storage, PathAwareEntity entity, CallbackInfo callbackInfo) {
Copperfarmers.LOGGER.info("Wrapped transitionToInteracting called"); Copperfarmers.LOGGER.debug("Wrapped transitionToInteracting called");
this.selectInteractionState2( this.selectInteractionState2(
entity, entity,
storage, storage,
@@ -115,14 +115,14 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
@Inject(method = "isUnchanged", at = @At("HEAD"), cancellable = true) @Inject(method = "isUnchanged", at = @At("HEAD"), cancellable = true)
private void isUnchanged(World world, MoveItemsTask.Storage storage, CallbackInfoReturnable<Boolean> callbackInfo) { private void isUnchanged(World world, MoveItemsTask.Storage storage, CallbackInfoReturnable<Boolean> callbackInfo) {
Copperfarmers.LOGGER.info("Wrapped isUnchanged called"); Copperfarmers.LOGGER.debug("Wrapped isUnchanged called");
if(storage.state().isOf(Blocks.FARMLAND)) { if(storage.state().isOf(Blocks.FARMLAND)) {
callbackInfo.setReturnValue(true); callbackInfo.setReturnValue(true);
} }
} }
private void placeStack2(PathAwareEntity entity, MoveItemsTask.Storage storage) { private void placeStack2(PathAwareEntity entity, MoveItemsTask.Storage storage) {
Copperfarmers.LOGGER.info("Wrapped placeStack called"); Copperfarmers.LOGGER.debug("Wrapped placeStack called");
MoveItemsTaskAccessor thisAccessor = (MoveItemsTaskAccessor)this; MoveItemsTaskAccessor thisAccessor = (MoveItemsTaskAccessor)this;
BlockPos pos = storage.pos(); BlockPos pos = storage.pos();
ServerWorld world = (ServerWorld) entity.getEntityWorld(); ServerWorld world = (ServerWorld) entity.getEntityWorld();
@@ -135,7 +135,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
} else { } else {
thisAccessor.copperfarmers$invalidateTargetStorage(entity); thisAccessor.copperfarmers$invalidateTargetStorage(entity);
} }
Copperfarmers.LOGGER.info("Placed wheat seeds at " + pos.up()); Copperfarmers.LOGGER.debug("Placed wheat seeds at " + pos.up());
return; return;
} }
ItemStack itemStack = MoveItemsTaskAccessor.copperfarmers$insertStack(entity, storage.inventory()); ItemStack itemStack = MoveItemsTaskAccessor.copperfarmers$insertStack(entity, storage.inventory());
@@ -164,7 +164,7 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
BiConsumer<PathAwareEntity, MoveItemsTask.Storage> placeItemCallback, BiConsumer<PathAwareEntity, MoveItemsTask.Storage> placeItemCallback,
BiConsumer<PathAwareEntity, MoveItemsTask.Storage> placeNoItemCallback) BiConsumer<PathAwareEntity, MoveItemsTask.Storage> placeNoItemCallback)
{ {
Copperfarmers.LOGGER.info("Wrapped selectInteractionState called"); Copperfarmers.LOGGER.debug("Wrapped selectInteractionState called");
if (storage == null && entity.getEquippedStack(EquipmentSlot.MAINHAND).isOf(Items.WHEAT_SEEDS)) { if (storage == null && entity.getEquippedStack(EquipmentSlot.MAINHAND).isOf(Items.WHEAT_SEEDS)) {
placeItemCallback.accept(entity, storage); placeItemCallback.accept(entity, storage);
} }