Loading...
Beta Modpages Unclaimed

Cases

Highly configurable item cases!

0 Likes
179496 Downloads
Created by Radviger

Description

This mod is inspired by LuckyCases but it has less security problems* and it's much more configurable.

 

Configuration


General mod configuration is located at /config/cases.cfg

Custom case configs are in the /config/cases/ directory.

Custom kit configs are in /config/kits/


Example case config (put it in /config/cases/pickaxes.json):

{

  "displayName": {
    "en_us": "Case with pickaxes and wool",
    "ru_ru": "Кейс с кирками и шерстью"
  },
  "contents": [
    {
        "action": "collect",
        "type": "pickaxe",
        "filter": {
            "mod": "minecraft"
        }
    },
    {"action": "extended", "type": "minecraft:wool", "rarity": 1},
    {"action": "exclude", "type": "wool", "meta": 0} 
  ],
  "color": "#555555"
}

 Note: Json file name (your_case.json) is an internal name of your case that's being used for id registration. It should only contain latin letters, numbers, dots and underscores.

Detailed explanation of the config above:

 

  • The "displayName" property is the display name of your case (OMG CAPTAIN OBVIOUS).
    It coud be either a string or a json object: 

"Pickaxe case" <-- default value for every language

OR

{

  "en_us": "Pickaxe case", <-- default value for every language except those listed below

  "ru_ru": "Кейс с кирками"

  • The "color" property defines item overlay color
  • The "contents" property is the most hardest part here. It consists of a multiple json objects where each one represents a so-called 'action' that can add/remove single/multiple items within a case. There are six different actions:
    • "single" - adds a single item. It has several extra properties such as:
      • "type" - contains item id (e.g. minecraft:apple),
      • "meta" - an item's metadata (for items like colored wool where meta defines wool color or planks where meta defines tree type. Defaults to '0'),
      • "amount" (Could be either a single number or a range [for random item amount. e.g.  '1-10' will drop from one to ten items. But for damaged items: '0-1' indicates that item can have a random damage value. Where 0 means that item is completely broken and 1 means that item is untouched. ] Defaults to '1'),
      • "nbt" - an item's extra data (so-called 'Named Binary Tag' which is moustly used for items that store energy or mana, etc.)
      • "enchant" - a chance for a tool to have a random enchantment (minimal (and default) value: 0, maximal: 1)
      • "rarity"- an integer value from 0 to 4 that says how rare the item is.
    • "extended" - works the same way as "single" but has no "meta" property because it adds all the item's variants to the case at once.
    • "oredict" - this one is similar to "extended" but it finds item by their 'oredict name' instead of item id. It also has several builtin values such as 'ingots' for every ingot, 'gems' for every gem, 'ores' for every ore and 'ingotBlocks' for every ingot block. (e.g. "type": "ingots"). Values can be filtered using "filter" property. E.g. "mod" filter.
      It could be either a JsonArray or a single string:

      "filter": {
          "mod": "minecraft" <-- Only vanilla items will be added
      }
      OR
      "filter": {
          "mod": [ <-- Only vanilla, IC2 and Thaumcraft items will be added
              "minecraft", 
              "ic2",
              "thaumcraft"
          ]
      }
    • "collect" - this one is similar to "extended" and "oredict" but can only add equipment, foodstuffs and enchantment books. Possible values are: 'hoe', 'pickaxe', 'sword', 'shovel', 'axe', 'boots' (boot), 'leggings' (legs), 'chestplate' (chest), 'helmet' (helm), 'food', 'enchantBooks'. Items can be filtered like in the previous action and they are unenchanted and undamaged by default, but you can add theese properties to change that: "condition" (similar to "amount" which's value is in range from 0 to 1) and the "enchant" (unlike the "single"'s "enchant" property this one is jus a multiplier for a pre-calculated values. E.g. when set to 1 it doesn't mean that all the items will be enchanted but instead they will be allowed to be enchanted with ther pre-calculated enchantment chances. E.g. for wooden pick enchantment chance is 0.5 and for the iron pick is 0.4 and so on. And if you set the value to 0.5 the iron pickaxe will have 0.5 * 0.4 = 0.2 enchantment chance . The default value here is 0 which means that enchantments are disabled).
    • "extract" - extract contents from another case. ("case": "your_case_name_here"). This one is useful when you want to create a case that contains all the tools and armors, etc.
    • "exclude" - this one is opposite to "single" because it removes specified item from the list.

  

Pre-calculated enchantment chances:

Common items: 0.5 (50%)
Uncommon items: 0.4 (40%)
Rare items: 0.3 (30%)
Very rare items: 0.2 (20%)
Ultra rare items: 0.1 (10%)

 Note: Your case configurations will be synchronized among the network so you only need to put them on your server and your players will automatically get'em during connection.

Commands


The mod has a set of a useful commands that will help you with case creation.

  • /cases reload - reload case configuration on the fly (no restart needed)
  • /cases nbt - print JSON'ifyed NBT of the held item (It can be really large [hi, Forestry!] so you will need to look into your latest.log)
  • /cases new kit|case <name> - creates new case/kit and adds all the items to the config from an inventory you're looking at.

Porting 'n' stuff


Don't ask me to update this mod to version X.Y.Z. I'll do it myself when I have enough free time! 


AD Become Premium to remove Ads!

What means Verified?

  • Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
  • Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
  • Security: The mod should not contain any malicious code or attempts to steal personal information.
  • Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
  • Originality: The mod should be original and not a copy of someone else's work.
  • Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
  • Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
  • License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
  • Documentation: The mod should come with clear and detailed documentation on how to install and use it.

AD Become Premium to remove Ads!

How to Install

1

Download Forge & Java

Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.

2

Prepare

Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.

3

Add Mods

Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder

4

Enjoy

You are now Ready. Re-start your Game and start Playing.

More Mods like this

Mouse Tweaks

Enhances inventory management by adding various functions to the mouse buttons.

Bookshelf

An open source library for other mods!

Comforts (Fabric/Forge/Quilt)

Adds sleeping bags and hammocks for, respectively, portability and turning day to night, without setting new spawns. Comes in 16 different colors!

BetterFps

Performance Improvements

Supplementaries

Vanilla+ additions: Jars, signposts, faucets, weather vanes spring launchers, sconces, planters, lights, decoration and automation

RandomPatches (Forge)

A bunch of miscellaneous patches for Minecraft, including configurable connection timeouts, player speed limits and other bug fixes and improvements.

FancyMenu

Customize Minecraft's menus with ease!

Phosphor (Forge)

Performance improvements for Minecraft's lighting engine

Snad

Finally, sand that actually makes sugarcane grow faster.