BeansGalaxy / Beans-Backpacks-2

1.20 inventory management mod. Designed to solve inventory clutter and transferring items while belonging in vanilla Minecraft's aesthetic.
MIT License
21 stars 1 forks source link

Unable to edit netherrite backpack size #125

Closed 3ncanis closed 1 month ago

3ncanis commented 2 months ago

I may be blind but I can't seem to find where to edit the size of the netherrite backpack. The Iron & Undefined Metal Backpacks don't seem to effect them.

Base Profile Screenshot 2024 04 16 - 17 31 12 53

BeansGalaxy commented 2 months ago

Explanation

In the mod, there's a way to reskin and give custom properties to Iron Backpacks through data-packs. Gold and Netherite are added this way and since data-packs define the size the config can't be used to change their sizes. Gold Backpacks inherit the size of Iron Backpacks, that's why you can change Gold but not Netherite.

Solution

You would have to create a data-pack and override the netherite_backpack.json recipe. If you have winrar you can tear apart my mod and find the file under data/beansbackpacks/recipes/backpacks/netherite_backpack.json, change the field max_stacks, and put it in your own data pack. Here's a template for a Copper Backpacks Data.zip and here's the wiki page about Creating Custom Backpacks if you're curious how it works. Heres Copper Backpack's Resources.zip for completion's sake.

Future Plans

I need a config setting to set "Any data backpacks with the ID "netherite", change their max_stacks to ##" but, I really hate how limiting Forge & Cloth Config is and I want to set up a more rigid system for my config first. Since it is technically possible and I plan to re-write it anyways, it's not high on my to-do for now. I knew this was something I had to solve later but I wasn't sure if anyone wanted it so thanks for the report!

3ncanis commented 2 months ago

Oh gotcha thanks for the response, one other question I had is if its possible to carry backpacks with items in them in your inventory? If I attempt to break them they just seem to break and spill the items.

BeansGalaxy commented 2 months ago

Nope, the only way to transport a backpack in in the Back Slot. Since mojang added shulker boxes, backpack mods always felt like just a cheaper replacement for them and I've been trying to balance my backpacks without making shulkers obsolete. Minecraft has had an inventory problem since there was more than 36 items and what the shulkers don't fix my mod tries to.

3ncanis commented 2 months ago

That actually makes total sense, I'd never realized how every backpack mod I've used before pretty much made shulker boxes useless. Another quick question and you can close this lmao, but I finally started a world and realized I can't craft a netherrite backpack, Is there a recipe or is JEI/EMI just not detecting it?

Edit: Something else I've been wondering is if its possible to instead of having a stack limit, instead making it a slot limit? As in you can only store a certain amount of items but instead of it being determined by the amount of items/stacks of 64 its determined by how many slots you designate. Perhaps making this a config option disabled by default if you think it goes outside your vision for the mod. In my opinion it can just get a bit messy with the current stack/item limit:

Base Profile Screenshot 2024 04 17 - 19 44 23 84

Another suggestion I had would be to not have the items get rearranged when youre taking them out as its placed on the ground, it can get a bit disorienting when youre trying to inventory manage, again making this a toggle able option would work as well. (I do get what you're going for with the items moving to the top though)

BeansGalaxy commented 2 months ago

JEI and smithing recipes

Because the netherite backpacks are added through data, it also have a custom coded smithing recipe. JEI/REI/EMI all make it super easy to add special crafting recipes but none of them let you add custom smithing recipes *easily. JEI & EMI straight up doesn't like it at all and in REI it's possible but it feels super hacky and comes with a lot of super weird bugs. For the time being, there's not netherite recipe in those mods.

Slot Limit

I don't know if I can add a slot limit. The whole inventory is built to ignore the slot count and focus on the total items so it would likely cause a lot of bugs in unexpected areas. Also a slot limit is just describing a normal chest and the stack limit is what makes my mod unique.

Menu Auto Reorganizing

I know what you mean. With the rows and columns updating it gets kinda confusing when you're looking for multiple items. How it works is the backpack's inv always removes empty slots, and I couldn't just disable that due to server desync if one player has it enabled and another doesn't. I'll try to see if I can add fake slots where you removed items and clear them if you stop hovering over any backpack slots. The redesign on the menu was focused on aesthetics but I don't think it's completely solved yet. I don't want to sacrifice any looks because I think it's a huge step up from the last one so consider this just another iteration.

I was planning when in the menu putting items inside would go where you clicked instead of the top of the list. Like if you were to take your apples and place them onto your diamonds, the apples would be inserted between the diamonds and the planks. The redesigned menu is much smarter now and able to be built off of easier so reorganizing is coming soon.

3ncanis commented 2 months ago

Would you mind just telling me the netherrite recipe for now lol, also completely respect your decision to not use a slot limit, and yeah, fake slots seems like it would solve the reorganizing situation, I also think your idea of having the items go where you clicked makes more sense to me. One small thing I noticed is that Smooth Swapping (https://modrinth.com/mod/smooth-swapping) only seems to work some of the time. I really can't determine how it decides which items it smooth swaps but it seems like its a 50/50 chance of it working, not a major deal but would be nice if it was consistent. Not sure if that's something you can fix though or if they would need to add compatibility for. Thanks for the responses!

Also just wanted to say I've been actually playing the game for the first time in a while and using your backpacks and they're super fun to use and very immersive, great job.

BeansGalaxy commented 2 months ago

Netherite recipe is a Upgrade Template, Iron / Gold Backpack & Netherite Ingot in the smithing table, just like you were upgrading diamond armor. I'm glad you're enjoying the mod. I'll look into the smooth swapping mod too :)

3ncanis commented 2 months ago

Sweet, tysm, one other minor thing I noticed was the little animation the backpack does where it follows your mouse around will make it rotate completely 180 degrees if your cursor goes too far to the left or right, even more noticeable on a smaller GUI scale. Maybe having some kind of maximum rotation its allowed to turn would work I'm not sure.

https://github.com/BeansGalaxy/Beans-Backpacks-2/assets/133993378/81089079-613a-49be-9329-55fbb7dd51a5

BeansGalaxy commented 2 months ago

Done, pretty easy fix too. I basically have two movements overlapping, one quickly swipes the backpacks around if it's off the inventory and another swings it depending on where the cursor is. The second one I just scaled to the width of the screen and added a little more logic so all the way left and all the way right rotate it to a little over 180, aka the rotation should feel more centered.

I knew it was a small issue but I thought small gui's looked terrible until I saw yours with the nice blurry background and the item display. Chef's kiss my friend.

3ncanis commented 2 months ago

Thank you!

BeansGalaxy commented 2 months ago

Menu issue is solved in 20.1-0.25-v2 on Modrinth, it'll be a while for the netherite backpacks though. I plan on re-writing the code for the config and I don't want to implement something that I'll have to re-write anyways later. I'll post here when it is done though.

BeansGalaxy commented 1 month ago

Overrides for Netherite & Gold Backpacks in 20.1-0.28-v2. (Wiki Page) Just load into any world and it'll generate the new -common config :^)