Kotlin Extensions [Fabric]
Kotlin Extensions for various Minecraft classes
No ratings yet
Be the first to rate it.
Community listing page
Community listing page, reviews may not be monitored by the author.
Community voices
Reviews
Log in to review this mod
Reviews are written by ModDex members. Log in and you'll come right back to the review form.
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
This mod is an API that provides useful extensions to existing vanilla classes. They are grouped based on the class that is primarily dealt with or returned by the function.
Block Extensions
Block.makeItem()- creates a newBlockItembased on the block. Optionally takes anItem.Settings.Block.matches(Identifier)- checks whether the block is contained in the tag with the given idBlock.matches(String)- converts the String to anIdentifierthen callsmatches(Identifier)
Identifier Extensions
String.id- converts the String to anIdentifierPair.id- converts the Pair to anIdentifierIdentifier.component1() and .component2()- allows for destructuring ofIdentifiersString.validId()- checks if the String is a validIdentifierPair.validId()checks if the Pair is a validIdentifier
Item Extensions
Item.stack()- creates a new ItemStack with the Item. Optionally takes an Int for the count.Item.matches(Tag or Identifier or String)- checks if the Item is in the Tag. Same idea asBlock::matches
NBT Tag Extensions
compooundTag(vararg Pair)- creates a newCompoundTagwith the given elementsCompoundTag.set(String, Tag)- operator forCompoundTag::putMap.toCompoundTag()- creates a newCompoundTagfrom the map's elementsAny?.toTag()- Creates a newTagfrom the object. Note: if the object cannot be converted into a tag, this will crash the game.interface NBTSerializable- Allows you to create the NBT representation for your classes. Not needed forEntityandBlockEntitysubclasses.
Registry Extensions
Registry.get(String)- converts to anIdentifierand gets the value in the RegistryRegistry.set(Identifier or String, T)- Registers the value in the Registry usingRegistry.registerIdentifier.item() and .block() and .entityType() and .blockEntityType() and .registry()- gets the value at theIdentifierin the appropriate Registry
Tag Extensions
Identifier.tag()- gets aTagat theIdentifier. Only valid for Item, Block, EntityType, and Fluid. Any other type will crash the game.String.tag()- converts to anIdentifierand gets theTagat itTag.isEqual(Tag)-Tag.equalsis not properly overridden. Use this to compare equality with tags.
World Extensions
World.runOnClient(()-Unit)- Runs the passed function only on the clientWorld.runOnServer(()-Unit)- Runs the passed function only on the server
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
Stats
- Downloads
- <1,000
- Used in
- 0 modpacks
- Followers
- 0
- In stacks
- 0
- Created
- Last synced
-
Nov 3, 2026 4:05 PM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before the above date changes.
How syncing works
External Links
Stats
- Downloads
- <1,000
- Used in
- 0 modpacks
- Followers
- 0
- In stacks
- 0
- Created
- Last synced
-
Nov 3, 2026 4:05 PM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before the above date changes.
How syncing works