Compatibility
Minecraft: Java Edition
1.21–1.21.1
1.20.4
1.19.2–1.19.4
1.19
Platforms
Fabric
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed ARR
Published 2 years ago
Updated 3 months ago
Features:
- Bookshelves can hold paper-related items (Maps, Books, Enchanted Books, Paper, Empty Map, etc)
- A "Room Controller", which is a spiritual successor to ArchiSections, by Reika
- Room Controllers can control culling of block entities and entities. They include a GUI to control the bounding box for culling, as well as the ability to mimic a block and any of its states (any block that isn't transparent and doesn't have a tile entity).
- A "Bit Hopper", ported from Bit Hop. A Bit Hopper is a light-weight hopper that doesn't pick up item entities, or pull items, and only pushes them. Useful for hopper chains where you aren't using the ability to pick up items, or the ability to pull them.
- A "Pull Hopper" which functions similarly to the Bit Hopper, but can also pull items from a tile entity above it. Still cannot interact with dropped items or minecarts with inventories.
- A "Stick(y) Hopper" which is identical to the Pull Hopper, except it keeps an item in every slot. This can be used to create filters for up to 5 items (currently only stackable items).
Planned Features:
- Screw Hopper
- A "pipe" made of copper that allows you to move items, similar to a hopper, but without the ability to suck up items.
- Open to suggestions!
Code:
- Mixins to Vec*
and Matrix*classes:- The mod originally had mixins to several core math classes, in an attempt to improve performance. While this was successful on the general scope, some of the changes caused unexpected behavior (Such as extremely wacked worldgen) to occur.
- The particular worldgen issue was caused by Minecraft using ceil(log2(0)) == 0, when the correct value is technically -Infinity or Undefined. My changes, which simplified the code (and used Java intrinsics, which are faster on most devices than a user implementation of an algorithm), returned 32, instead of zero. This resulted in the world generating extremely tall, and caused old worlds to be unable to generate new chunks, due to the immense difficulty of smoothing these new "corrupted" chunks with old ones.
- The mixin files are kept so that I can use these implementations in the future - not all of them are immediately apparent at how they work.
- Room Controllers:
- The Room Controllers allow user-controlled culling of entities and block entities. That is, an entity or block entity that is in a room is not visible if the player is outside the room, or in another room. This increases performance compared to vanilla (which doesn't cull anything) but is not effective when combined with other mods that do similar things such as Entity Culling.
- This is not the same feature as Sodium's entity culling - Room Controllers are still effective when combined with Sodium.
- Mixins overall:
- The mixin to ClientPlayerEntity is used to inject a tick listener to the player themselves, to keep track of which room the player is in.
- The mixin to Sodium is used to allow Room Controllers to cull entities and block entities while Sodium is installed.
- The mixins to the World, WorldRenderer, and the RenderDispatchers for block entities and entities, are used to make profiling using the debug pie chart easier, by profiling block entities and entities with their rendering and tick times.
- The mixin to the spawner is used to fix a bug with spawners where they would lose their information upon conversion between versions. Pending removal, if the bug gets fixed.
- The mixin to Argb is designed to use bitshifts and addition, in place of integer division. This is significantly faster on most machines. Note: For those of you from a C++ background, you may think that division by a constant would be optimized to shifts automatically.
- API:
- BetterMod exposes an API for blocks that have tile entities (BetterBlock) and tile entities with an inventory + GUI (BetterBlockEntity). It also exposes an API for tile entities that want to be notified if they are loaded into the world or unloaded from the world, and whether it was on the server or the client. This is used to load and unload rooms as they enter or exit the client's render distance, or change dimensions, to avoid checking more rooms than necessary. There is also an API for tile entities that want to tick (BetterTickingBlock, BetterTickingBlockEntity).
Notes:
- This mod went under the name BetterPerf while in development, before other features were added. As such, the code may reference some things as "betterperf" or "bettermod"
- To use with Sodium, Indium must be installed for the Room Controller to have its "hiding" ability.