Coder Social home page Coder Social logo

rubixdev / inventorio Goto Github PK

View Code? Open in Web Editor NEW
56.0 4.0 19.0 1.12 MB

Inventorio - an inventory enhancement mod for Minecraft (Fabric / (Neo)Forge)

Home Page: https://modrinth.com/mod/inventorio

Java 33.89% Kotlin 66.11%
minecraft minecraft-mod minecraft-fabric minecraft-forge fabric forge mod

inventorio's Introduction

Inventorio - An inventory enhancement mod for Minecraft (Forge / Fabric)

GitHub Downloads Modrinth Downloads CurseForge Downloads Fabric CurseForge Downloads Forge

Showcase Video

Video Demonstration

About

This is my vision of the Inventory Update for Minecraft. Of features I believe are in line with Mojang's vision and could be potentially added to the game.

Available for both Fabric and (Neo)Forge.

Installation

Grab the jar file from the Release page.

You can also find this mod on Modrinth or CurseForge (Fabric, Forge)

Copy the jar file into %root_folder%/mods/ alongside other mods.

Dependencies

Dependencies for Fabric:

Dependencies for Forge:

Features

Features

Toolbelt

Instead of taking space in the Hotbar, tools are now stored in their own place. When you mine a block, a correct tool gets passively applied from the said Toolbelt.

  • Mending will mend tools in the Toolbelt before going into player's XP bar
  • Axe will be used as a melee weapon in the sword slot is empty
  • Hoe Toolbelt slot accepts shears. Sword Toolbelt slot accepts Trident.
  • Toolbelt slots accept modded tools as long as they inherit from vanilla tool classes.

Utility Belt

An Offhand replacement with a dedicated hotbar of 4 slots that can be scrolled through independently, and which skips the empty slots. You can use the selected Utility independently, which allows you to akimbo two types of blocks or two types of usable items.

Deep Pockets Enchantment

Each level of this enchantment adds an additional row to your inventory, up to 3 at max level. In addition, the first level adds 4 extra slots to the Utility Belt (from 4 to 8)

The Enchanted Book can be crafted from 2 shulker shells and a book, as well as traded from villagers or found in treasure chests.

Crafting Recipe: 2 Shulker Shells + Book

Increased Ender Chest Capacity

The capacity of the Ender Chest has been doubled. This can be disabled in the server-wide config, but you need to distribute the said config to all players if you edit it.

Infinity Bow Requires No Arrow

This mod fixes a Vanilla bug when you need an arrow to use the Infinity Bow.

Totems of Undying activate from the Utility Belt

Instead of being permanently stuck in the offhand, it will go off from any of 4 (8 with Deep Pockets) Utility Belt slots.

Player Settings

Segmented Hotbar

Accessing slots after 5 with a keyboard might be cumbersome because the keys are just too far away. This feature makes the first keystroke select a section, and the second keystroke will select an item inside that section.

There's a "Visual Only" option that keeps the default selection schema.

Firework Rocket Boost Button

A dedicated button to fire a boost rocket directly from your inventory while flying. Can be co-bound to Jump.

Trident Loyalty Check

This option prevents you from throwing a Trident without Loyalty.

"Use Item" Applies To Offhand

The original idea was to bind each hand to its own dedicated button, but some people found it confusing, and this option restores the vanilla behavior of vanilla "Use Item", while "Use Utility" applies only to the Utility Belt / Offhand.

Skip Empty Utility Slots

By default, scrolling and displaying the Utility Belt skips the empty slots, but you can set this behavior to false. There's also a keybind (not bound by default) that allows to scroll to the first empty Utility Belt slot.

Rebind Scroll Wheel to the Utility Belt

You can rebind the Scroll Wheel to scroll through the Utility Belt, while using the number keys to chose from the Hotbar slots.

Dark Inventorio Player UI

Compatibility with dark theme mods and resource packs.

Swapped Hands

This option allows assigning the vanilla Hotbar to your Offhand, and the Utility Belt to your Main Hand.

image

Global Settings

To improve mod compatibility, some features can be disabled on a game-wide level for all players.

Global settings can be accessed by a keybind (only in a single player world) or directly at %root_folder%/config/inventorio_shared.json.

Joining a server (either dedicated or hosted from another client) with mismatching global settings will prompt a request to sync your settings and restart the game, but sharing the config beforehand is recommended.

  • ExpandedEnderChest (default: true) - when set to false, disables mixins responsible for increasing Ender Chest capacity.

  • InfinityBowNeedsNoArrow (default: true) - when set to false, disables mixins responsible for Infinity Bow requiring no arrows.

  • TotemFromUtilityBelt (default: true) - when set to false, disables mixins responsible for Totem of Undying going off from any Utility Belt slot.

  • AllowSwappedHands (default: true) - when set to false, removes the option to Swap Hands.

  • ToolBeltMode (default: ENABLED) - Allows to disable the Toolbelt a) completely b) allow only the Toolbelt slots added by other mods

  • UtilityBeltShortDefaultSize (default: true) - By default, the Deep Pockets Enchantment increases the Utility Belt capacity from 4 to 8. When set to false, the full capacity is given unconditionally.

  • DeepPocketsBookCraft (default: true) - Can a Deep Pockets Book be crafted

  • DeepPocketsInTrades (default: true) - Can a Deep Pockets Book be obtained in a villager trade

  • DeepPocketsInRandomSelection (default: true) - Can a Deep Pockets Book be obtained in random selection (Enchanting Table and mob loot)

Use in modpacks and with other mods

You can include this mod in a modpack or as a dependency for your own mod.

I just ask you to respect my work and include it in a way that would count as a download of the mod on Modrinth or CurseForge and their reward programs.

  • For Modpacks, don't embed the jar into the modpack but link to the mod (as should be the default behavior on both Modrinth and CurseForge).
  • For Mods, don't embed the mod's jar inside your mod, but mark it as a dependency.

If you want to use this mode as a dependency, I recommend using the Modrinth maven.

Be advised that you need to manually keep track of the latest version available.

repositories {
    exclusiveContent {
        forRepository {
            maven {
                name = "Modrinth"
                url = "https://api.modrinth.com/maven"
            }
        }
        filter {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modCompileOnly "maven.modrinth:inventorio:1.9.3-1.20.4,fabric"
}

Addon Slots, Toolbelt & Item Tags

InventorioAPI allows your mod to add custom Toolbelt slots and add custom allowing and disallowing tags and conditions to toolbelt slots, including existing ones.

Note: when working with the Toolbelt, please consider that its size may vary depending on the mods and settings installed.
Don't assume any particular size of the Toolbelt or the slot order across multiple play sessions. ToolBelt size is the same for all players within the same play session.
Slot indices of the Deep Pockets and the Utility Belt are persistent.

Please use InventorioAPI#findFittingToolBeltStack to find a Toolbelt slot that can accept an item and don't assume any persistent index.


By default, any tool inheriting its Java class from a vanilla tool (e.g. PickaxeItem.java) will be accepted by a corresponding slot.

Any tool with an item tag inventorio:%item_type% will be accepted by a corresponding slot.

You can blacklist a tool from the Toolbelt slot by adding giving it a tag inventorio:%item_type%_blacklist.

In Forge, a slot accepts any item with a corresponding ToolType.

In Fabric, fabric:%item_type% item tag is accepted by a corresponding slot.

Any custom filters and tags can be added via InventorioAPI

Note: %item_type% is always spelled in plural. Available item types: pickaxes, swords, axes, shovels, hoes.

Note: Please ignore InventorioModIntegration and ModIntegration - they're intended for Inventorio to integrate with other mods, not for other mods to integrate with Inventorio.

Contributing

Pull Requests for bug fixes and new features are always welcome. As this project uses a somewhat unconventional setup, here is a short overview of the Gradle modules at the time of writing this and how they are linked by the preprocessor:

Project Graph

Code and resources that are common both across Minecraft versions and mod loaders should go in ./src/main/ (this is the 1.20.4-common module). Generally only mixins are written in Java, the rest uses Kotlin. Preprocessor comments can be used to restrict small sections of code to certain Minecraft versions or mod loaders. For example:

//#if MC >= 12002
val isGlass = block.block is StainedGlassBlock || block.isOf(Blocks.GLASS)
//#else
//$$ val isGlass = block.block is AbstractGlassBlock
//#endif

or

//#if FABRIC
//$$ const val platform = "Fabric"
//#elseif FORGE
//$$ const val platform = "Forge"
//#elseif NEOFORGE
//$$ const val platform = "NeoForge"
//#else
@JvmField
val platform = throw IllegalStateException("unknown platform")
//#endif

Any code and resources that are mod loader specific should go in the latest version for that loader. They will also be included for all previous versions automatically (or rather for all linked modules as seen in the graph above). For example, Fabric specific files go in ./versions/1.20.4-fabric/src/main/ and after running the preprocessCode Gradle task the 1.20.2-fabric and 1.20.1-fabric modules will also include those files.

inventorio's People

Contributors

enderteck avatar k0-rr avatar lizard-of-oz avatar ppblitto avatar rubixdev avatar tambry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

inventorio's Issues

Very weird behavior with Requiem and Gravestones

No idea where I should report it so imma just put it on all three githubs I guess.

Using
Inventorio https://github.com/Lizard-Of-Oz/Inventorio
Gravestones https://github.com/Geometrically/Gravestones/issues
Requiem https://github.com/Ladysnake/Requiem

If you die while possessing a mob, weird stuff happens.

  • a grave gets created, but most of the items just fall out like normal rather than go into the grave
  • your currently selected hotbar slot, offhand slot gets deleted
  • your currently selected toolbar slot (i was mining while it happened) gets duped

My inventory before I died
image

My inventory after I died BUT before I broke the grave (all these items were on the ground)
image

My inventory after picking up what was in the grave too
image

[BUG] Weird Levitation Issue With Deep Pockets Enchantment And Hookshot Mod

Here's how to replicate the issue: While pulling yourself up using the Hookshot mod (as shown below), just press and hold the space (or jump) button to levitate up in the air. This will only work, if and only if, the leggings that you have has a deep pockets enchantment.

Before putting on the leggings with deep pockets enchantment:
https://user-images.githubusercontent.com/64238265/123504127-115bec80-d68a-11eb-81a8-af93684ad0ee.mp4

After putting on the leggings with deep pockets enchantment:
https://user-images.githubusercontent.com/64238265/123504146-26388000-d68a-11eb-86aa-ac4d3037cbcd.mp4

P.S: As you can see, the diamond leggings have multiple enchantments but I tested a separate case in creative mode where the deep pocket enchantment is only present in the item. The bug also works with any leggings too (leather, iron, gold, diamond, and netherite).

Edit: You don't need to actually press and hold the space button to levitate.

Instant Mining Issues On Servers

Using the toolbelt with instant mining tools on servers sometimes stops the instant mining process and tries to mine with the item in the main hand. This makes instant mining kind of annoying. It might be able to be replicated in singleplayer, but it seems to work a lot better.

fabric V1.1.0
1.16.4

If you aren't able to replicate, I am using the spellbound enchants mod and the rock collector enchant, which helps me instant mine.

2021-05-20.17-50-45-1.mp4

Broken Slot Compatibility for All Tools from Tetra and Tinkers Construct

Tools from Tetra with the (I think singular shared) item ID "tetra:modular_double" and tools from Tinkers Construct with IDs like "tconstruct:pickaxe", "tconstruct:hand_axe", etc don't go into the tool slots for automatic use from inventory, which is a genuine bummer right now without a configurable whitelist built into Inventorio for manual editing/fixing.

"tetra:modular_double" should probably be allowed in any slot given how wildly customizable they are.

tconstruct:pickaxe, tconstruct:sledge_hammer, tconstruct:vein_hammer really should be allowed in the pickaxe slot, tconstruct:mattock in either any hatchet, shovel, or hoe slot, tconstruct:excavator in the shovel slot, tconstruct:hand_axe and tconstruct:broad_axe in the hatchet slot, tconstruct:kama, tconstruct:sword, and tconstruct:cleaver in the sword slot, and tconstruct:scythe in the hoe slot. An argument could be made for tconstruct:sledge_hammer and tconstruct:broad_axe in the sword slot as well, but really just being able to use those as default tools in the belt as intended by Inventorio would be a really welcome enhancement.

[Request]: config to disable auto toolbelt switching

I like everything this mod does except the automatic tool switching.
I've never been a fan of automatic things like this, just my opinion.

Could we get a config to disable this an instead control which tool is selected with:

  • modifier key+scroll
  • modifier key+number

Basically it would work like the utility bar, but without the offhand swap functionality and with the limitation to just tools.
Maybe you could render the toolbelt slots either on the opposite side of the hotbar from the utility belt or as a vertical mini-hotbar in the bottom left or right corner of the screen.

[Bug] Mod overlaps with JEI Show recipes feature.

Minecraft version: 1.16.5
Forge version: 36.1.24
Inventorio version: 1.3.0
JEI version: 7.7.0.104

Issue: Inventorio overlaps with the JEI show all recipes feature in the player inventory.

Summary:
JEI uses a feature that makes a "button" that shows all recipes for any and all types of crafting you wish to see (furnace, brewing stand, crafting table, etc).
image_2021-06-08_02-13-36
This feature extends to the player inventory placing the "button" where the arrow would be. Inventorio pushes the 2x2 crafting grid and output to the side but the show recipes feature remained in place with the button overlapping with the crafting grid of the player inventory.
image_2021-06-08_02-14-14

Attempted troubleshooting: I determined it was indeed JEI that had the show recipes feature as removing the mod also removed the feature. Removing inventorio with JEI installed put the inventory back to where it was and had the show recipes button back over the arrrow next to the 2x2 crafting window. I checked JEI's config to see if there was a means of disabling said feature but it does not appear there is a option.
image_2021-06-08_02-38-56

Cannot raise shield in offhand.

Can't be a compatibility issue, tested it with just the mod by itself and it still persists. Appears to happen in all slots. Can still raise shield in main hand, just not any off-hand slots.

Delay before being able to use item after mining even when switching hotbar slots manually

My axe toolbelt slot is empty, but I have an axe in my hotbar. When I use that axe to cut some wood and then swap to a potato, the axe doesn't go away for like a second and I can't eat it until the axe goes away.
Food isn't the worst but I could see this killing people if they need to epearl or blockclutch.

Ideally the delay wouldn't be there even when using toolbelt.

[Compatibility] Epic Fight: Combat Mode

Would it be possible to add compatibility to Epic Fight's combat mode so when you enter the mode it will use your weapon out of the weapon slot and/or utility belt if you have one and also have the ability to switch out weapons.

[Suggestion] Allow empty hands in Utility Belt

Allow us the ability to select an empty slot in the utility belt. Currently, this is not possible since it always selects any item present in the slot and skips the empty ones. Sometimes there are just certain actions that requires an empty hand to be used.

[Suggestion] An option to let us scroll into an empty offhand slot

Some features of some mods require you to have both hands empty, some people are more used to putting stuff in their offhand by scrolling onto the thing and swapping hands with hotkey.

Also about the broken tool auto swapping last time. Inventory Profiles completely ignores the toolbar slot tool, Tweakeroo replaces it but places the replacement on your selected hotbar slot rather than into the toolbar. Both work fine if the tool is on hotbar.

Dupe Glitch On Servers

Fabric V1.2.0
1.16.4

I am having trouble reproducing this, so this is based on what a player in my server says. I am hosting the server on my own network and they are far away so their ping is much higher. They were able to reproduce relatively consistently.

  1. Have item in utility belt (they had 6)
  2. Open 2nd instance of minecraft under the same account
  3. Try joining server with second instance of minecraft, then hit cancel after it kicks the first instance out and the moment before you join the server
  4. The item you are holding in your utility belt is sometimes duped

BUG [1.16.5] Items disappearing in Utility belt slot after a random amount of time.

Suppose that you have a shield, crossbow, and a torch on your utility belt (or if you have a grapple gun mod, a grapple gun) [link: https://www.curseforge.com/minecraft/mc-mods/hookshot]. After a random amount of time while playing Minecraft. Items start to disappear, and I am sure that I didn't drop any of it or stored it in any chests. The items will completely disappear even though the items are in full durability. There are two things that I know of, one is that it only happened to me four times (and more as I play) and the items that disappeared are: 3 shields (unmodded), and a grapple gun (modded). Two, it likely happened during those times that I lagged, specifically server lag or TPS lags. Anyway, I will watch your career with great interest, have a nice day ahead, thank you!

P.S: There is also a time where my Diamond Pickaxe was dropped even though it is in my tool belt while mining for blocks (specifically dirt blocks using Diamond Shovel). Though, I suspect that I just pressed Q randomly during that time and it might not be a bug.

Conflict with Diet mod

image

I think you might be adding a button where diet also adds one, which create the weird double button look

The scroll order of the utility belt should be reversed

This has been bugging me for the longest time and I couldnt figure out why. I thought I'd just get used to it but I kept scrolling into the wrong slot. I finally figured out why lol.
In vanilla, when you scroll down, it selects the slot on the right of the one you are currently using.
When scrolling through the offhand slot, the opposite happens. The item highlighted on the left gets chosen.
Also makes more sense in inventory, since right now scrolling down selects the item thats above your currently selected item.

Or at least it would be a nice config option.

Edit: apparently i forgot which side is right and left lmao

[Suggestion] Better Totem Activation

It would be nice to have the totem activate if it is anywhere in the utility belt or maybe inventory. A custom slot for the totem would also work.

Weird key priority when pressing keys in quick succession with segmented hotbar

Right now, if you quickly press two keys (eg. 1 and 2) and the second key is pressed down before the first key is released, the slot that ends up selected is inconsistent.
Rather than selecting the number 1 segment and number 2 slot in it, it selects the number 1 slot in the number 1 segment.
Seems like the lower number gets priorized regardless of which key gets pressed down later, if the key that was pressed down first is still being held down.

example:
key inputs of: press down 2, press down 3, release 2, release 3 end up with second slot in second segment

Unknown Crash Report

For some reason I keep getting this crash when launching the game.
I have a couple of mods installed but I can't find the reason why it is crashing now.
Without any other mods or just a few it seems to work just fine.

Crash report

[Suggestion] Auto Refill

Since other mods auto refill functions don't apply to the toolbelt, perhaps an option that allows you to toggle auto refill as part of Inventorio would tie in nicely.

[FABRIC] Expected Crash w/ VanillaDeathChest

With maximum Deep Pockets enchantment, player inventory can exceed a double chests worth of inventory space, causing a crash when VanillaDeathChest attempts to container these items.

I can crosspost this to their issue tracker instead since it is technically a limitation by their mod, however compatibility with other gravestone-esque mods should be considered.

You can also consider making Deep Pockets toggleable in the configuration file as an end-all-be-all solution. I would instead daydream about Inventorio support for the many Backpack mods, or its own implementation.

Log:
latest.log

Mods:
image

Updating world without this mod deletes offhand item

If you create a world without this mod then put an item into off-hand slot then add the mod, the item in the off-hand slot is deleted. It would be ideal if the item got put into the utility belt when adding this mod.

fabric V1.1.0
1.16.4

Suggestion, Items Stored in Deep Pockets

I was thinking for the deep pockets enchantment instead of just dropping the extra items on the floor when taking the pants off, it could store the items within the pants almost like how a shulker doesn't drop the items when broken. But if the enchant gets wiped off of the pants with a grindstone it could then just drop all the items like it currently does. This could also potentially be a setting in the world config for people who prefer one way or the other? Thanks for reading!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.