Furniture Expanded [FORGE/FABRIC]

Furniture Expanded [FORGE/FABRIC]

619k Downloads

Blacklist Items from entering Basket? + Empty Trashcan?

Dumpling00 opened this issue ยท 6 comments

commented

Hi there! Fabric 1.20.1, stumbled across your mod and I'm already in love.

I was wondering - since I'm using a mod for Backpacks, if there could be a way to blacklist items from entering the basket, so to avoid having players put full backpacks inside of it and have potential access to an almost illimited increased inventory space.

Oh and a way to empty the trashcan (deleting the items once full) would be great!

thank you for your time and consideration.

commented

Oh, you're right! I hadn't thought about this inventory inception problem. Thanks.

Currently, there's no way to filter what Items can go inside the basket (aside from another basket, which was hardcoded to be rejected). I could probably try to block all items that contain an inventory as well, but I'll need to test how effective that'd be. Worst case scenario, I just add a custom filter to the configs.

About the trashcan, I already had plans to possibly add a button to empty its contents or a way to bag the trash.

Those are reserved for the next update though ๐Ÿ‘

commented

Oh, you're right! I hadn't thought about this inventory inception problem. Thanks.

Currently, there's no way to filter what Items can go inside the basket (aside from another basket, which was hardcoded to be rejected). I could probably try to block all items that contain an inventory as well, but I'll need to test how effective that'd be. Worst case scenario, I just add a custom filter to the configs.

About the trashcan, I already had plans to possibly add a button to empty its contents or a way to bag the trash.

Those are reserved for the next update though ๐Ÿ‘

Fantastic thank you!
Oh and I was wondering, at this point, if we could have something similar for the cardboard box? ๐Ÿค” Maybe not a blacklist, but what if the cardboard box breaks after you unseal it? So the player would need to wage wether it's convenient to re-open it to take items out of it? If that goes too much against the vision, then an option to also blacklist items from the cardboard box would solve everything!

Alternatively, the tape used to seal the cardboard box could have configurable durablity?

Thank you for your consideration and time!

commented

Yeah, I was going to try to fix the basket problem on the cardbox as well anyways. But I have to say, this idea on the cardbox having a durability is quite interesting. I'll give some thought into it.

About the sealing tape, I don't think I'll be adding a configurable durability. I may tune it in the future though. For now, if you really want to, you could try replacing the current recipe with one that outputs a damaged item (I'm not totally sure if that's possible). KubeJS or CraftTweaker should help, a simple datapack may also work.

Unfortunately I don't quite have the expertise to use KubeJS or CraftTweeaker. I've tried, they seem a bit too convoluted for me.

But glad to hear the idea is being considered :)
But yeah maybe the Cardbox could have a certain amount of times it can be opened and resealed, until it breaks? Like maybe three uses?

commented

Yeah, I was going to try to fix the basket problem on the cardbox as well anyways. But I have to say, this idea on the cardbox having a durability is quite interesting. I'll give some thought into it.

About the sealing tape, I don't think I'll be adding a configurable durability. I may tune it in the future though.
For now, if you really want to, you could try replacing the current recipe with one that outputs a damaged item (I'm not totally sure if that's possible). KubeJS or CraftTweaker should help, a simple datapack may also work.

commented

Unfortunately I don't quite have the expertise to use KubeJS or CraftTweeaker. I've tried, they seem a bit too convoluted for me.

I never personally used KubeJS, but if you want to try it out: (I'm not 100% if this works, didn't test)

  1. Install the mod.
  2. Run the game once, then close it.
  3. Check your game folder, there should be a new folder there called kubejs
  4. There should be a few folders with example scripts inside, you can delete them all.
  5. Inside startup_scripts folder, create a new js file, e.g tape.js and paste the code below.
    (You can open a text editor, paste the code and save as a new file to ensure it is a js file)
  6. Now you just need to test it out to see if it breaks fast.
    The default durability for the tape is 16.
ItemEvents.modification(event => {
  event.modify('furnitureexpanded:tape', item => {
    item.maxDamage = 3
  })
})

More info at https://wiki.latvian.dev/books/kubejs/page/item-modification#bkmrk-page-title

But yeah maybe the Cardbox could have a certain amount of times it can be opened and resealed, until it breaks? Like maybe three uses?

And yes, I have been thinking about five or less. That seem to be a pretty good value considering how cheap it is to craft.
Now, what to do when the durability reaches zero? Any ideas or suggestions? I've thought about some options

  • make them simply incapable of being sealed again < This may cause some confusion, so perhaps tell the player somehow?
  • destroy the cardbox <All items inside would drop, I'm not a fan of this.
  • transform the cardbox into a normal chest < Also not really a fan.

Im kinda inclined to implement the first one tbh.

commented

Unfortunately I don't quite have the expertise to use KubeJS or CraftTweeaker. I've tried, they seem a bit too convoluted for me.

I never personally used KubeJS, but if you want to try it out: (I'm not 100% if this works, didn't test)

  1. Install the mod.
  2. Run the game once, then close it.
  3. Check your game folder, there should be a new folder there called kubejs
  4. There should be a few folders with example scripts inside, you can delete them all.
  5. Inside startup_scripts folder, create a new js file, e.g tape.js and paste the code below.
    (You can open a text editor, paste the code and save as a new file to ensure it is a js file)
  6. Now you just need to test it out to see if it breaks fast.
    The default durability for the tape is 16.
ItemEvents.modification(event => {
  event.modify('furnitureexpanded:tape', item => {
    item.maxDamage = 3
  })
})

More info at https://wiki.latvian.dev/books/kubejs/page/item-modification#bkmrk-page-title

But yeah maybe the Cardbox could have a certain amount of times it can be opened and resealed, until it breaks? Like maybe three uses?

And yes, I have been thinking about five or less. That seem to be a pretty good value considering how cheap it is to craft. Now, what to do when the durability reaches zero? Any ideas or suggestions? I've thought about some options

  • make them simply incapable of being sealed again < This may cause some confusion, so perhaps tell the player somehow?
  • destroy the cardbox <All items inside would drop, I'm not a fan of this.
  • transform the cardbox into a normal chest < Also not really a fan.

Im kinda inclined to implement the first one tbh.

Thank you so much! I'll try it out and let you know!

As for the cardboard box, I think, exactly because it's cheap to craft and has as much storage as a normal chest, it should come with the added risk of possibly dropping of all its items if you unseal it too many times - Otherwise people could just create a bunch of cardboard boxes and keep mining or exploring for days without ever feeling like they need to settle. Sealing the box is like making a commitment: you give up one usage to be able to carry your things, knowing that it will break when you unseal it.

There's actually a mod that works similarly: Portable Crates. They have 9 slots, you put them down once, fill them up, and when you mine them they drop a sealed version, which you can carry with you. To get the items back, you need to break the crate.

I think for proper balancing, the cardboard box should be prone to breaking (maybe even with a random chance, like 1 in 5 or 6) every time you unseal it to put more stuff in it: You have great expanded storage for cheap, so the risk should be high for a properly balanced tradeoff.

Gives more purpose to the saw and sawdust too! If cardboards break easily, that means you need to use those items more! I think it creates a nice fair, fun game loop.