Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ default boolean mustTickWhileDisabled() {
return false;
}

default void dropItem(MovementContext context, ItemStack stack) {
default void collectOrDropItem(MovementContext context, ItemStack stack) {
ItemStack remainder;
if (AllConfigs.server().kinetics.moveItemsToStorage.get())
remainder = ItemHandlerHelper.insertItem(context.contraption.getStorage().getAllItems(), stack, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void visitNewPosition(MovementContext context, BlockPos pos) {
stack.shrink(1);
seedSubtracted.setTrue();
}
dropItem(context, stack);
collectOrDropItem(context, stack);
});

BlockState cutCrop = cutCrop(world, pos, stateVisited);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected void onBlockBroken(MovementContext context, BlockPos pos, BlockState b
.withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos))
.withParameter(LootContextParams.THIS_ENTITY, getPlayer(context))
.withParameter(LootContextParams.TOOL, new ItemStack(Items.IRON_SHOVEL)))
.forEach(s -> dropItem(context, s));
.forEach(s -> collectOrDropItem(context, s));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected void destroyBlock(MovementContext context, BlockPos breakingPos) {
BlockHelper.destroyBlock(context.world, breakingPos, 1f, stack -> {
if (noHarvest || context.world.random.nextBoolean())
return;
this.dropItem(context, stack);
this.collectOrDropItem(context, stack);
});

super.destroyBlock(context, breakingPos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void tickBreaker(MovementContext context) {
}

protected void destroyBlock(MovementContext context, BlockPos breakingPos) {
BlockHelper.destroyBlock(context.world, breakingPos, 1f, stack -> this.dropItem(context, stack));
BlockHelper.destroyBlock(context.world, breakingPos, 1f, stack -> this.collectOrDropItem(context, stack));
}

protected float getBlockBreakingSpeed(MovementContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private void tryDisposeOfExcess(MovementContext context) {
if (list == inv.items && i == inv.selected && filter.test(context.world, itemstack))
continue;

dropItem(context, itemstack);
collectOrDropItem(context, itemstack);
list.set(i, ItemStack.EMPTY);
}
}
Expand Down