CurseForge · Minecraft mod
Kotlin Extensions [Fabric]
Kotlin Extensions for various Minecraft classes
Quick answer
Which Kotlin Extensions [Fabric] release should I use?
Kotlin Extensions [Fabric] Kotlin Extensions 0.0.0+1.15.2 targets 1.16-Snapshot, 1.15.2 with Fabric. The project page does not say whether this file belongs on the client, dedicated server, or both. All 2 required mods have matching files.
Where it goes
Is Kotlin Extensions [Fabric] required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does Kotlin Extensions [Fabric] Kotlin Extensions 0.0.0+1.15.2 need?
Kotlin Extensions 0.0.0+1.15.2. Change the file and its required mods may change too.
Install Fabric API, Fabric Language Kotlin first. We found matching files for this game-version and loader setup.
We only count dependency files that match this setup. A file for another loader does not fill the gap.
Before you install it
Add Kotlin Extensions [Fabric] without breaking your instance.
Built for Kotlin Extensions [Fabric] Kotlin Extensions 0.0.0+1.15.2. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use Kotlin Extensions 0.0.0+1.15.2. It targets 1.16-Snapshot, 1.15.2 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
Install Fabric API, Fabric Language Kotlin first. We found matching files for this game-version and loader setup.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside Kotlin Extensions 0.0.0+1.15.2. It opens that exact file at the source.
About this project
What does Kotlin Extensions [Fabric] add?
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
Project description from CurseForge.
Pick your setup
Kotlin Extensions [Fabric] by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.16-Snapshot
1 loader build1.15.2
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Kotlin Extensions [Fabric] versions and loaders
Kotlin Extensions 0.0.0+1.15.2
kotlin-extensions-0.0.0+1.15.2.jar
22 Mar 2020
Looking for an older file? The official CurseForge project page is in Resources.