Rarity Lib (for BTA)

Rarity Lib (for BTA)

Mod

Methods for applying rarity levels to your items. Common, Uncommon, Rare, Ultra rare, Epic, Mythic

Client or server LibraryUtility

22 downloads
1 follower
Created20 days ago
Updated15 days ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

BTA Rarity Library

What's this mod?

It's a library that helps you implement rarity levels directly into your items.

Main Features:

  • Rarity Levels: Assign a specific rarity to your items with six different levels:

    • COMMON
    • UNCOMMON
    • RARE
    • ULTRA RARE
    • EPIC
    • MYTHIC
  • Magnifying Glass: This item is used to check the rarity of any item.

How to Use This Library:

Installation

build.gradle
repositories {
   maven { url = "https://jitpack.io" }
}
dependencies {
   modImplementation "com.github.Garkatron:RarityLib:${project.rarity_lib_version}"
}

Simple code example

bta 7.2pre1
// Your item
public static Item your_item;

// Your item builder
public static final ItemBuilder GenericItemBuilder = new ItemBuilder(MOD_ID);

// Your item
Item _item = GenericItemBuilder.build(item);

// Casting and adding the rarity level
((IItemRarityMixin) _item).rarityLib$setRarityLevel(RarityLevel.COMMON);
your_item = _item;

Simple code example

bta 7.1
// Your item
public static Item your_item;

// Your item
Item _item = ItemHelper.createItem(arguments);

// Casting and adding the rarity level
((IItemRarityMixin) _item).rarityLib$setRarityLevel(RarityLevel.COMMON);
your_item = _item;

Project members

Garkatron

Member


Technical information

License
CC-BY-NC-4.0
Client side
optional
Server side
optional
Project ID