Item Scroller

## Description

A client-side mod that adds several more convenient ways of moving items inside inventory screens. This is done by scrolling the mouse wheel over item slots (optionally while holding some modifier keys) or by holding down modifier keys and then left- or right-click dragging over the slots.

There are also special features for faster villager trading and crafting.

Available for Ornithe (1.12.2 [and more versions at some point]), LiteLoader (1.12.x), Rift (1.13.2), Fabric (1.14+) and Forge (1.8 – 1.14.4).

More background and details…

The mod has a few configurable modifier keys (depending on the mod/MC version, in modern versions by default `Shift`, `Ctrl` and `Alt`) to move entire stacks, all matching items, or all items at once. It also has special handling for Villagers to ease the annoying clicking around while trading. As of version `0.11.0`, it also has special crafting inventory handling (with a 18-slot internal “recipe memory”).

The basic item scrolling feature is similar to what NEI (and some other mods) also did/do. But I wanted more control and more ways to move items, so I made this mod to have all those modes that I find useful, in one distinct, client-side mod (so it also works on vanilla servers all the same).

There are config options to individually enable or disable more or less any of the modes. There are also options to reverse the scroll directions, or to change what for example “scrolling up” means. All the configs are accessible via the in-game config menu.

Note: All recent Item Scroller versions (starting from version 0.13.0) require the malilib library mod:

https://modrinth.com/mod/malilib

## Key combinations

Some of the default hotkeys

– `I + C` – In the modern (Rift, Fabric, LiteLoader, Ornithe) versions, the default hotkey to open the in-game config screen is `I + C`
– `Mouse wheel scroll` alone: Move one item at a time from or to the slot hovered over
– `Shift + scroll`: Move matching, entire stacks one by one. The stack hovered over is moved last.
– `Ctrl + scroll`: Move all matching stacks to or from the other inventory.
– `Alt + click`: Move all matching stacks to or from the other inventory. (Same as `Ctrl + scroll`.)
– `Ctrl + Shift + scroll`: Move everything to or from the other inventory
– `Alt + Shift + click`: Move everything to or from the other inventory. (Same as `Control + Shift + scroll`.)
– `Shift + left click and hold + drag`: Move all the stacks that are dragged over
– `Shift + right click and hold + drag`: Move all but the last item from all the stacks that are dragged over
– `Ctrl + left or right click and hold + drag`: Move only one item from all the stacks that are dragged over.
– `Shift + click` on an empty slot with items in the cursor: Move all matching items to that inventory
– `Shift + click` outside the inventory with items in the cursor: Drop all matching items from the entire inventory
– `Ctrl + Drop key + left or right click and hold + drag`: Drop one item from all dragged-over slots
– `Shift + Drop key + right click and hold + drag`: Drop all but one item from all dragged-over slots
– `Shift + Drop key + left click and hold + drag`: Drop all items from all the dragged-over slots
– `W/S + Shift/Control + click (and drag)`: Move items up (W) or down (S) in the inventory

Note: Before version 0.6.1, the Shift + right click and hold + drag functionality required one empty slot in the source inventory for an intermediate click action.

## Villager GUIs

Villager screen special features

Villager GUI has special handling (if enabled in the configs). It is only used when you hover over the output slot.

– `Hold shift and scroll down`: Fill the recipe/trade input slots
– `Hold shift and scroll up`: Move the output items to the player inventory as usual
– When the output slot is empty: hold `Shift and scroll up` to move the input items to the player inventory

So basically you can just hold shift and scroll down/up repeatedly to trade items fast & easy.

In the 1.12.2 and 1.16.5+ versions you can right click the trade buttons to fully trade that one trade. You can also `middle click` or `Shift + middle click` to mark trades as favorites or “global favorites” (= not per individual villager), which moves those trades to the top of the list, and it also allows you to use the hotkey to trade all favorites at once. If a given villager has any non-global favorites, then that takes precedence and the global favorites are not used for that villager (until the per-villager favorites are all unmarked).

## Crafting features

About the crafting features

There are some (quick) crafting helpers features. Most notably the `massCraft` and `craftEverything` hotkeys.

For any of these to work, you need to store a crafting recipe to Item Scroller’s own “recipe storage”. By default you open the recipe view by holding `A` inside an inventory screen. You add recipes by holding open the recipe view with `A`, and then middle clicking on the output item on a crafting grid. You can clear a stored recipe by middle clicking on an empty crafting output slot.

Note that the crafting system needs the crafting inventory and slots to be added to the config, so by default it only works for the vanilla player crafting and crafting table inventories.

Note that the `massCraft` feature is pretty laggy and unreliable due to the massive amount of continuous slot clicks it does, and when the server to client syncs happen in the middle of the slot click cpam, that can lead to outdated inventory state on the client, which basically means that mass craft can craft the wrong items (partial recipes).

So in general I would recommend avoiding the `massCraft` feature unless you absolutely need to use it. And if you do, then you would probably want to use Andrews’ “item scroller craft fix” fork instead ([found here](https://github.com/Andrews54757/itemscroller-crafting-fix/releases)), as it implements the vanilla recipe book item transfer fo mass crafting. That makes it vastly more reliable and less laggy. I will add it to the base mod at some point after I rewrite the entire mod from scratch…

If you only need to craft a “moderate amount” of items, like one inventory of nuggets into ingots or similar, then the `craftEverything` hotkey is what you want. It crafts everything possible once. It doesn’t repeat or loop, so it also shouldn’t craft the wrong things as nothing “external” will update the inventory state during that one operation. It doesn’t nicely work for “expanding” recipes however, such as logs to planks, because it doesn’t throw any items out, so the inventory will fill up midway if you try to craft an entire inventory of logs to planks for example.

Chests are Chests

Ever wondered why, when a chest is open, items don’t fall in?
… Okay, I’ll admit, me neither, not until I had this idea. But when you think of it…
It just makes sense, right?

So now, you can proudly say that **Chests are chests**! And enjoy making items fall into your storage
instead of lamely putting them in by hand!

But as items can fall *into* an open box… Shouldn’t they be able to fall *down* from one as well,
provided it was open on the right side?
Thus, you can make it so barrels, when open and facing down, drop *all* of their content to the ground!

Going back to the chest, if you can open the lid to make items fall in, shouldn’t the lid throw items away
upon being opened?
That’s right! With this mod, you can make it so opening a chest throws all the items standing on it upon opening!
(Limited to items only for the sake of one’s life preservation)

Last but not least, since opening a container has always only been a manual task so far,
in order to allow you to automate these new options, opening a container can now be done
by activating an *empty* dispenser pointing at said container!

Now the game will feel more natural, even just a little bit, won’t you agree?

## Features

* Inserting items in open containers
* default: enabled
* gamerule: `chests.insertOpen`
* Making item fall from open-from-below containers
* default: disabled
* gamerule: `chests.barrelFall`
* Special item fall (e.g. snowballs falling as actual thrown snowballs)
* default: enabled
* gamerule: `chests.barrelFall.throwableSpecial`
* item tag: `#chests_are_chests:special_fall`
* Making chest lids throw items
* default: disabled
* gamerule: `chests.lidFling`
* entity type tag: `#chests_are_chests:flingable`
* Horizontal flinging velocity
* default: 0.25
* gamerule: `chests.lidFling.horizontalPower`
* Vertical flinging velocity
* default: 0.6
* gamerule: `chests.lidFling.verticalPower`
* Opening containers by powering empty dispensers
* default: enabled
* gamerule: `chests.dispenserOpen`
* Automated opening duration (in world ticks)
* default: 10
* gamerule: `chests.dispenserOpen.duration`

## Dependencies

Requires Unruled API

## Mod compatibilities

### Internal compatibilities
While compatibilities are planned, direct implementation by the mods themselves would always be preferred.
Hence, if a mod of yours is [planned](#planned), [being worked on](#being-worked-on), or even already implemented,
don’t hesitate to [make your own](#make-your-own), and if need be, contact us either for help or to tell us
that we have no need to keep our own compatibility.

#### Implemented
* [Anner’s Iron Chests](https://modrinth.com/mod/cyberanner-ironchest)
* [Mythic Metals Decorations](https://modrinth.com/mod/mythicmetals-decorations)
* [Reinforced Chests](https://modrinth.com/mod/reinforced-chests)
* [Expanded Storage](https://modrinth.com/mod/expanded-storage)
* [Spectrum](https://modrinth.com/mod/spectrum)

#### Natural
_Known mods that (should) have natural compatibility with this mod, with no extra implementation_
* [Variant Chests](https://modrinth.com/mod/variant-chests)
* [Variant Barrels](https://modrinth.com/mod/variant-barrels)
* [Chest Colorizer](https://modrinth.com/mod/chest-colorizer)
* [More Chests Variants](https://modrinth.com/mod/more-chest-variants-lieonlion)

#### Being worked on
* [Lootr](https://modrinth.com/mod/lootr)

#### Planned
* [myLoot](https://modrinth.com/mod/myloot)
* [More Chests](https://modrinth.com/mod/more-chests)
* [Compact Storage](https://modrinth.com/mod/compact_storage)

#### Internally refused
* [Iron Chests: Restocked](https://modrinth.com/mod/ironchests)
Due to mod author names poorly registered, this mod cannot be easily be dealt with.
Hence, it has been decided no to attempt implementing builtin compatibility.

### Make your own

#### Container implementation

The mod tweaks the block entities’ and item entities’ behaviours.
In order to implement compatibility with this mod, you need your custom block entity to implement
the `mc.recraftors.chestsarechests.util.FallInContainer` interface.

You may as well make use of other interfaces, such as `mc.recraftors.chestsarechests.util.BlockOpenableContainer`
or `mc.recraftors.chestsarechests.util.BooleanHolder`, which you can either use as you please, or can exploit
if you already extend the vanilla chest or barrel classes.

Don’t hesitate to look at the
[chest](https://github.com/RecraftorsMC/Chests-are-Chests/tree/main/common/src/main/java/mc/recraftors/chestsarechests/mixin/block_entities/ChestBlockEntityMixin.java)
and [barrel](https://github.com/RecraftorsMC/Chests-are-Chests/tree/main/common/src/main/java/mc/recraftors/chestsarechests/mixin/block_entities/BarrelBlockEntityMixin.java)
implementations for a reference of how to handle block opening and orientation within the provided methods.

Also don’t fear about more methods appearing with updates and your mod not implementing them, causing issues.
No methods are planned for deletion, or would include a change of primary version. And all new method
will _always_ come with a default implementation, to avoid pointless issues.

#### Item implementation

The mod enables for some item (registered in the appropriate item tag) to have a custom behaviour upon “falling”
from a container. In order to do that, the item itself must implement the
`mc.recraftors.chestsarechests.util.ContainerItemHelper` interface.

This interface comes up with two methods to be implemented. The first one, optional, indicates the item fall directions.
This allows to specify on which open side of a container can the item come out. (e.g. upwards-gravitated items may
specify an upward fall direction)

By default, this first method will return `DOWN`.

The second one makes the actual implementation of a special fall behaviour. It should use the first method to know
whether to run it or not, and execute what is intended. This method’s return value indicates whether the item stack
fell (and theoretically is consumed), or not, and therefore shouldn’t be bothered with attempting to make it fall
in the same direction, to avoid causing more runtime computing stress.

Don’t hesitate to look at the
[arrow](https://github.com/RecraftorsMC/Chests-are-Chests/tree/main/common/src/main/java/mc/recraftors/chestsarechests/mixin/items/ArrowItemMixin.java) or
[snowball](https://github.com/RecraftorsMC/Chests-are-Chests/tree/main/common/src/main/java/mc/recraftors/chestsarechests/mixin/items/SnowballItemMixin.java) implementations
for a reference of how to handle special item fall.

Then again, don’t fear about more methods appearing with updates, for all new one will then again include a default
implementation, if possible based on already existing methods.

#### Examples
Up to date with version **0.5**

Container implementation

“`java
public class MyCustomBlockEntity extends BlockEntity implements FallInContainer {
private boolean isOpen;
private final int size;
private final DefaultedList content;
private final Map fallUpdateMap = new HashMap<>();

@Override
public boolean chests$tryInsertion(ItemEntity entity) {
return FallInContainer.chests$inventoryInsertion(this.content, entity, this::setStack);
}

@Override
public boolean chests$isOpen() {
return isOpen;
}

@Override
public VoxelShape chests$InputAreaShape() {
return FallInContainer.ABOVE;
}

@Override
public void chests$forceOpen(ServerWorld world, BlockPos at, BlockState from) {
this.isOpen = true;
this.onOpen();
}

@Override
public boolean chests$tryForceOpen(BlockState from) {
ServerWorld serverWorld = (ServerWorld) this.getWorld();
BlockPos blockPos = this.getPos();
this.chests$forceOpen(serverWorld, blockPos, from);
ChestsAreChests.scheduleTick(serverWorld, blockPos, duration);
}

@Override
public boolean chests$forceClose() {
this.isOpen = false;
this.onClose();
}

@Override
public Map getFallUpdateMap() {
return this.fallUpdateMap;
}

void onOpen() {
// …
// potential rendering stuff
ChestsAreChests.ejectAbove(Direction.UP, this);
}
}
“`

Item implementation

“`java
public class MyCustomItem extends Item implements ContainerItemHelper {
public Direction[] chests$getFallDirection(ItemStack stack) {
return new Direction[]{Directions.UP};
}

public boolean defaultOnOpenTick(ItemStack stack, FallInContainer container, Direction direction, World world, Vec3d pos, Vec3d velocity) {
if (!ChestsAreChests.isInArray(direction, chests$getFallDirection(stack))) return false;
MyGravitatedEntity entity = new MyGravitatedEntity(world, pos.x, pos.y, pos.z, stack.copy());
entity.setVelocity(velocity);
world.spawnEntity(entity);
return true;
}
}
“`

### Showcase

CapeMod

![Banner](https://cdn.modrinth.com/data/cached_images/0d16dc7355341d3daf41bd781d288d9ce319746e.png)
# Cape Mod 1.8 – 1.21 for Forge and Fabric

Get free capes and exclusive perks for creators!
Visible for anyone using the mod.

https://capemod.net

**Supported Versions:**
– **Fabric:** 1.17 – 1.21
– **Forge:** 1.8.9, 1.12.2

## How to install / use
1. Download and install Forge or Fabric.
2. Download and add CapeMod to your mods.
3. Register an account and get capes at: https://capemod.net
4. Manage and equip your capes at: https://capemod.net/dashboard

## Features:
– **Transparent and animated capes.**
– **Free Capes:** Earn stylish capes without spending real money.
– **Themes:** Diffrent themes for the same cape.
– **Creator Rewards:** Creators can reward their community with custom capes.
– **Earning Opportunities:** Various ways to earn capes and coins, including gameplay and daily rewards.
– **Wide Version Support:** Compatible with multiple Minecraft versions.

## Creator Benefits:
Creators can distribute capes to their community, for example, by offering them to subscribers on Twitch or as rewards through channel points. They can **design and manage their own capes**, distributing them directly to their followers. Currently, capes are distributed manually via the dashboard, but we plan to automate this process so players can receive capes instantly upon subscribing.

## Manage Your Cape:
You can view and manage your capes through our dashboard at [https://capemod.net/](https://capemod.net/). Additionally, a “Manage Cape” button is available in your skin customization settings.

## FAQ:

### How do I get capes?
Capes can be purchased using in-game coins, which you earn by playing on specific servers or through daily rewards. Future updates will introduce more earning methods. Note that capes cannot be purchased with real money. Certain capes, such as Twitch or YouTube capes, may require meeting specific follower or subscriber milestones.

### How can I manage my cape?
Access our dashboard to view all your owned capes, where you can activate, deactivate, or change them. You can also purchase capes with your earned coins.

### Who can see my capes?
Anyone with the mod installed can see your capes, regardless of their Minecraft version.

### How can I apply for my own cape as a creator?
Visit our website for the application form and requirements for creating your own cape.

## API:
We offer an API that allows you to retrieve information about player capes and enable creators to manage their cosmetics.

## CapeMod Integration
If you want to integrate CapeMod into your mod or client, please contact us directly via [email protected]

## Useful Links:
– **[Website](https://capemod.net/)**
– **[Dashboard](https://capemod.net/dashboard)**
– **[Discord](https://discord.gg/9gh3cZRGQH)**

## Screenshots
![Dashboard to manage capes, account](https://cdn.modrinth.com/data/cached_images/98ef0e04a97fec4592db8697819798fe1531d60c.png)
Dashboard to manage Capes, Account.

## Support Us
Help us keep our servers running. Your support makes a difference!

Buy Me a Coffee at ko-fi.com