Skip to content

Conversation

@Thorinwasher
Copy link
Contributor

@Thorinwasher Thorinwasher commented Mar 4, 2025

Fixes #113

Should be a performance improvement, does take up a bit more memory, but this is probably miniscule compared to what every item in the barrel inventories takes.

As this is quite a major refactor (whops), I might have messed up somewhere.

Here's a list of all the things I did, but probably best to look at the code:

  • Use HashMap when mapping barrels instead of using lists, much easier access when coding, and probably faster at Barrel amounts larger than 100
  • Remove sign offsett thing completely, this property seems reduntant (edit: removes access through large barrels through the sign, up to discussion of this is okay)
  • Listen to world load / unload events, and register / unregister barrels as needed. (untested and I'm not quite sure how this works)
  • Does not validate barrels randomly anymore, I think with some other improvements on listeners, this can be mitigated

@Jsinco
Copy link
Member

Jsinco commented Mar 8, 2025

will fully review later today 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Obstruction of creation of small barrels when fence is under them

3 participants