Minecraft XchangR mod 2026 download
logo
minecraft mod XchangR

XchangR

Game Version: 1.18.2
Total Downloads: 20
Updated: May 4, 2022
Created: Mar 17, 2022
Download XchangRDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
XchangR 1.18.2 Version release 134.85 KB May 4, 2022 1.18.2 1 download XchangR XchangR 1.18.2 Version releaseDownload
XchangR 1.0.0 beta 180.22 KB Mar 17, 2022 1.16.5 19 download XchangR XchangR 1.0.0 betaDownload

Description

Share this:

Introducing XchangR, a high quality, modular shop block mod designed for modpack makers and server owners alike!

 

Overview

XchangR adds two blocks of interest: the Selling Station and the Buying Station.

Both blocks facilitate the exchange of items, pulling from a config-defined list of entries. This means that the shops don’t need “restocking,” with the items being created from thin air (take that thermodynamics!)

This is absolutely perfect for modpack makers who want to add a robust economy system to their gameplay loops. Plus, buy/sell entries can be added/edited on the fly thanks to the command-based addition system. When used in conjunction with progression mods like GameStages and/or FTB Quests, you can gate the ability to buy/sell certain items behind gameplay goals.

What sets XchangR apart from other similar Economy mods?

XchangR boasts some pretty nifty features that I have yet to see in other shop mods. For one, XchangR supports a near-unlimited amount of buy/sell entries! Yes, that’s right! You aren’t limited to only 50 entries! (Cough cough Calemi’s Utils cough cough) XchangR is also automation-friendly! The Buy and Sell blocks will both automatically sell whatever is in their input slots when given a redstone pulse, and the output items are spawned directly in-world, allowing you to collect them with a hopper/conveyor/chute. Finally, XchangR is modular and easy-to-use. Quickly add/edit entries with the built-in commands, or gate trades behind progression walls by running the commands through command blocks or a progression mod.

 

Cool, so how do I use it?

I’m glad you asked! When you first load the mod into your world, the configs will be mostly empty, save for a couple files which are created. You (the modpack maker or server owner) need to use the built-in commands to automatically add buy/sell entries to the config. The config is split into two parts: the buyList and the sellList. The buyList and sellList folders both contain the individual entries you create, and the buyList also creates a special “master file” to allow the Buy Station’s selection GUI to work properly. (Note: the sellList folder does not exist until you create your first sell entry. This is normal.)

 

How to manage Sell Entries:

The command for adding sell entries is formatted like this (without the <>, of course): /addsellentry <sold id> <amount sold> <exchange id> <exchange amount>

sold id: This is the exact item ID of the item being sold. It should be formatted with the mod namespace before it, like “minecraft:diamond” or “xchangr:sell_block” (no quotes)

amount sold: This is the amount of items needed to trigger a sale. Setting this to any number greater than 64 won’t crash the game, but it also means that the sale can’t be triggered (since 64 items per slot).

exchange id: This is the exact item ID of the item being exchanged. It should be formatted with the mod namespace before it, like “minecraft:diamond” or “xchangr:sell_block” (no quotes)

exchange amount: This is the amount of items given upon a successful sale. Unlike the amount sold, this can be set to a number greater than 64, since the items are spawned in-world.

Example: /addsellentry minecraft:diamond 1 minecraft:gold_ingot 5 will create a sell entry allowing you to exchange 1 diamond for 5 gold ingots.

/addsellentry minecraft:iron_ingot 4 minecraft:apple 3 will create a separate sell entry allowing you to exchange 4 iron ingots for 3 apples.


You can also manually add sell entries by creating a new .json file inside of the sellList folder. The name of the file should be the exact item ID of the item being sold, except the colon (:) between the namespace and the ID should be replaced with an underscore (_).  I highly recommend using the commands to create a sell entry, but if you want, you can also copy an existing sell entry file, rename it, and then edit the data inside.


To delete a sell entry: Simply delete the desired sell entry file in the sellList folder. You don’t even have to reload the game for the changes to take effect!


To edit a sell entry: Run the addsellentry command again with the same sold id as the entry you want to edit, followed by the new items/amounts. You can also simply edit the file in the sellList folder.

 

How to manage Buy Entries:

The command for adding buy entries is formatted like this (without the <>): /addbuyentry <entry name> <bought id> <amount bought> <currency id> <price>

entry name: The unique name of the sell entry. This allows the sell block to differentiate between trades involving purchasing the same item with different currency/amounts.

bought id: This is the exact item ID of the item being bought. It should be formatted with the mod namespace before it, like “minecraft:diamond” or “xchangr:buy_block” (no quotes)

amount bought: This is the amount of items given upon a successful purchase. This can be set to a number greater than 64, since the items are spawned in-world.

currency id: This is the exact item ID of the currency used to purchase the bought item. It should be formatted with the mod namespace before it, like “minecraft:diamond” or “xchangr:buy_block” (no quotes)

price: This is the amount of items needed to trigger a purchase. Unlike the amount bought, this should only be set to an amount below 64, since currency is inserted into a single slot.

Example: /addbuyentry SingleDiamond minecraft:diamond 1 minecraft:gold_ingot 5 will create a buy entry allowing you to purchase 1 diamond for 5 gold ingots.

/addbuyentry 10Diamonds minecraft:diamond 10 minecraft:gold_ingot 40 will create a separate buy entry allowing you to purchase 10 diamonds for only 40 gold ingots.

You can also manually add buy entries by creating a new .json file inside of the buyList folder. The name of the file should be the unique name of the buy entry. I highly recommend creating buy entries using the command, but you can also copy an existing buy entry, rename it, and edit the data inside. IMPORTANT! You must also edit the master file to include this new buy entry, and increment the numItems parameter accordingly. Failing to do this will cause your new buy entry to not show up, or worse, crash the game!


To edit a Buy Entry: 
Run the addbuyentry command with the same entry name as the entry you want to edit, followed by your new items/amounts. You don’t have to reload the game for changes to take effect!

To delete a Buy Entry: CAUTION: This is considerably more complicated than deleting a sell entry. Failing to follow instructions may cause crashes. First, go into the master file and decrement the numItems parameter by one. Next, find the corresponding entry name in the master file and delete it, as well as the thing that says “index#”. After deleting, shift all of the “index numbers” after the entry you just deleted backwards by one. For example, if you delete the entry at index 3, and there are entries with indexes 4, 5, and 6 afterwards, the entry with index 4 becomes index 3, the entry with index 5 becomes index 4, and so onAlternatively, you can simply replace the entry name you want to delete with the last entry name, then delete the last entry. This saves you the trouble of having to manually decrement all of those index numbers, but it will mess with the order of your buy entries. Finally, delete the desired buy entry file in the buyList folder. I’m terribly sorry this is so complicated, but it’s a small price to pay (heh) in exchange for having a selection-based buy block. Final note: You should probably close the game before deleting a buy entry, and make sure any buy blocks aren’t trying to access the entry you just deleted.

 

FAQ:

My game crashes when I place a Buy Block! What gives?

You probably haven’t set up any buy entries yet. Once you set up at least one buy entry, the buy block should function a-ok!

My Buy/Sell entries aren’t showing the proper items/aren’t showing any items at all!

Did you make sure to enter the add entry command correctly? Remember, item ids need their corresponding namespaces before them!

Correct: /addsellentry minecraft:diamond 1 minecraft:gold_ingot 5

Incorrect: /addsellentry diamond 1 gold_ingot 5

I just deleted a Buy Entry and now the game just crashed! Help!

Have you made sure all of the Buy blocks in your world aren’t trying to access the now-deleted entry? You should also close the game before making any deleterious changes to the buy list, as it’s a bit more complicated than the sell list. Finally, don’t forget that you have to update the Master File in the buyList folder! This includes decrementing the numItems parameter, removing the entry name and index parameter from the list, and shifting back any index numbers after the entry you just deleted.

Whenever I apply a redstone signal to a buy/sell block, it triggers the sale twice instead of once!

Unfortunately, I’m not exactly sure why this happens, and I don’t know how to fix it. Instead, I’d consider it a…bonus! Yeah, it’s not a bug, it’s a feature! But, in all seriousness, if you need to sell/buy a very specific amount of items without going overboard, then I recommend using the manual “buy/sell” buttons in the GUI.

Um, the sellList folder doesn’t seem to exist!

Unlike the buyList folder, the sellList folder doesn’t have anything in it upon first loading the mod, so it doesn’t get created. However, when you create your first sell entry using the command, the sellList folder will get created, along with your shiny new sell entry.

Where can I find the buyList and sellList folders?

If you’re using MinecraftPatch, you can open up the directory folder for any modpack/instance of Minecraft you desire. In that folder should be another folder called “config,” then inside of that should be a folder called “xchangr,” and there you go!

Does this work with other mods’ items?

Yes! That’s one of the best features of this mod, it’s fully compatible with other mods! Just be sure to add the correct namespace and item ID when creating your sell/buy entries. You can find the namespace/exact item IDs by pressing F3 and H at the same time (this turns on advanced tooltips).

Does this work with NBT data?

Unfortunately, no. I don’t really have any plans to make the buy/sell blocks work with NBT, and I don’t think NBT will work with the current system of managing and accessing entries. Super sorry about that!

What’s this black-and-yellow “PlayerTrader” block?
Ah, I see you’ve discovered an upcoming feature! As you can see, I’d like to add the ability for players to set up trade stations to sell their wares with one another, but I unfortunately lack the setup to effectively test certain features of such a block. However, do not despair, as just like life, I always find a way! Expect this feature to be released in the near future.

How do I craft the Buy/Sell Stations?

If you’re asking this, I’ll have to assume you’re not using JEI (or something similar.) If you haven’t already, I highly recommend installing it, as it will be the ultimate answer to this question regardless of which mod you’re playing! Semantics aside, please check the “images” section for the crafting recipes!

Will you port this to 1.17/1.18?

Perhaps. It all depends on whether or not it’s possible (I believe MCreator automatically allows for the easy porting of mods up/down versions). It also depends on the amount of traction this mod gets. As with economics, demand drives supply!

What about 1.12?

This I can’t do. The file manager plugin I used does not support versions below 1.15.2, so I’m super sorry about that.

 

What about Fabric?
This is a big maybe. I’m not sure how MCreator differs between creating forge and fabric mods, but if the procedure blocks are all the same, then this very well may have the chance at getting a Fabric Port. We’ll see.

I want to make a modpack with this mod!
That’s WONDERFUL!!!! You are free to use this mod in your modpacks, maps, and servers. Just make sure to link back to this page so people know who created this amazing mod 🙂

 

 

 

Comments

Add a comment