Skip to content

fix(ChestContainer): Fix chest containers not recognizing some chest like containers#280

Open
IceTank wants to merge 1 commit intolambda-client:1.21.11from
IceTank:fix/fix-chest-containers-not-recognizing-some-chest-like-containers
Open

fix(ChestContainer): Fix chest containers not recognizing some chest like containers#280
IceTank wants to merge 1 commit intolambda-client:1.21.11from
IceTank:fix/fix-chest-containers-not-recognizing-some-chest-like-containers

Conversation

@IceTank
Copy link
Copy Markdown
Contributor

@IceTank IceTank commented Apr 2, 2026

Lootable containers should include pretty much all containers in the game we would want to take items out of

@github-project-automation github-project-automation bot moved this to Backlog in Kanban Apr 2, 2026
@beanbag44 beanbag44 self-requested a review April 4, 2026 16:52
Copy link
Copy Markdown
Member

@beanbag44 beanbag44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure what this solves. Although it makes it possible to create a ChestContainer object for at least most external block entity containers in the game, the class is still called ChestContainer so the name would be misleading, and the ContainerManager still functions the same way, only creating instances for chests

@IceTank IceTank force-pushed the fix/fix-chest-containers-not-recognizing-some-chest-like-containers branch from c0683e2 to d4a40de Compare April 4, 2026 17:53
@IceTank
Copy link
Copy Markdown
Contributor Author

IceTank commented Apr 4, 2026

I renamed ChestContainer to LootableContainer. This should now include all containers that can be looted.

…ntainers

# Conflicts:
#	src/main/kotlin/com/lambda/interaction/material/container/containers/LootableContainer.kt
is ChestBlockEntity -> {
// ToDo: Handle double chests and single chests
if (handler.type != ScreenHandlerType.GENERIC_9X6) return@listen
is LootableContainerBlockEntity -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you removed the todo for handling double chests but this does not fix the double chest issue. This is part of my worry about merging all external containers aside from ender chests into one. It removes flexibility for unique containers. Also, there will likely be cases where the type of container needs to be known. I think we should just stick to separate types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double chests could be fixed by combining both inventories into one container location. I have done that with my stash movers before. I think if you need a more specific container type, you can always extend this one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that there should be a base open class for containers, but this class isnt suited towards that. It takes a blockPos in the constructor, which wouldnt apply well for double chests as they consist of two positions. The class also isnt open, and its a data class which cant be inherited from, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants