Skip to content

Alien Trade Recipes (1.16.5)

gisellevonbingen edited this page Aug 27, 2022 · 3 revisions

Notice

Aliens DOES NOT restock

So, each recipe must either make infinite trades, or specify the number of trades per alien entity

Some recipes result can random if you want specified result, use type 'alien_trading_itemstack' and declare NBT Tag

Recipe Type List

name description
1. alien_trading_itemstack simplest, itemstacks from itemstacks
2. alien_trading_enchantedbook enchanted book from itemstacks
3. alien_trading_enchanteditem enchanted item from itemstacks
can determine result item, enchant level range
4. alien_trading_map structure map from itemstacks
e.g.) Mansion, Monument
5. alien_trading_potioneditem using for tipped arrows, potions
6. alien_trading_dyeditem dyeable item from itemstacks
e.g.) Leather Armors

Recipe Type Description

Common

Scheme

order key description
1 type alien_trading_XXX (XXX : each recipe type)
can't be empty
2 job minecraft:XXX (XXX : alien's job, a.k.a. villager profession)
can't be empty
3 level requirement of alien's level
can't be empty
1. novice
2. Apprentice
3. Journeyman
4. Expert
5. Master
4 xp xp of alien's level
can't be empty
5 maxUses number of trade available
Aliens DOES NOT restock
if empty, will be 9999999
6 priceMultiplier discount ratio
if empty, will be 0.05

1. alien_trading_itemstack

Description

  1. simplest, itemstacks from itemstacks

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_itemstack
2 costA first itemstack for trade
can't be empty
3 costB secend itemstack for trade
can be empty
it will mean 'no need'
4 result result itemstack of trade
can't be empty
can declare NBT Tags

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_itemstack",
	"job": "minecraft:fletcher",
	"level": 1,
	"xp": 1,
	"costA": {
		"item": "minecraft:emerald"
	},
	"result": {
		"item": "minecraft:arrow",
		"count": 16
	}
}

Example 2

{
	"type": "boss_tools_giselle_addon:alien_trading_itemstack",
	"job": "minecraft:fisherman",
	"level": 1,
	"xp": 1,
	"costA": {
		"item": "minecraft:emerald"
	},
	"costB": {
		"item": "minecraft:cod",
		"count": 6
	},
	"result": {
		"item": "minecraft:cooked_cod",
		"count": 6
	}
}

2. alien_trading_enchantedbook

Description

  1. enchanted book from itemstacks
  2. enchantment is random

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_enchantedbook
2 costA first itemstack for trade
count will be base cost in trade
3 costB secend itemstack for trade
mean 'no need' when empty
4 costBaseLevelMultiplier additional cost per level
if empty, will be 3
5 costRangeBase random additional cost range's start
if empty, will be 5
6 costRangeLevelMultiplier random additional cost range's length per level
if empty, will be 10
7 costTreasureOnlyMultiplier multiple cost when enchantment is treasure only
e.g.) Mending, FrostWalker
if empty, will be 2

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_enchanteditem",
	"job": "minecraft:armorer",
	"level": 4,
	"xp": 15,
	"priceMultiplier": 0.2,
	"costA": {
		"item": "minecraft:emerald",
		"count": 8
	},
	"result": {
		"item": "minecraft:diamond_boots"
	}
}

Cost Evaluate (Advanced)

  1. Alien select Enchantment type, level
  2. Create a temporary variable with name 'COST'
  3. 'COST' is 'costA's count + (level * costBaseLevelMultiplier)
  4. (costRangeBase + level * costRangeLevelMultiplier) will be additional cost range
  5. Select random value in additional cost range
    0 ~ range(exclusive)
  6. Add that value to 'COST'
  7. If type is treasure only, multiply costTreasureOnlyMultiplier to 'COST'
  8. finally, 'COST' will be 'costA's count when trade

Cost Evaluate (Example)

Precondition

  1. Enchantment = Unbreaking II
  2. costA = minecraft:emerald x 2
  3. costB = minecraft:book
  4. costBaseLevelMultiplier = 3
  5. costRangeBase = 5
  6. costRangeLevelMultiplier = 10

Scenario

  1. 'COST' is 2 (from emeraldx2)
  2. Add 6 to 'COST' (from II * 3)
  3. Add random value in additional cost range
    0 ~ 25(5 + 20, exclusive)
  4. 'COST' is in range 6 ~ 31(exclusive)
  5. Finally, trade itemstack will be like below
  • CostA = minecraft:emerald x {6 ~ 31(exclusive)}
  • CostB = minecraft:book
  • Result = minecraft:enchanted_book (Unbreaking II)

3. alien_trading_enchanteditem

Description

  1. enchanted item from itemstacks
  2. enchantment is random

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_enchanteditem
2 costA first itemstack for trade
count will be base cost in trade
3 costB secend itemstack for trade
mean 'no need' when empty
4 levelBase enchantments level base
if empty, will be 5
5 levelRange enchantments level range
if empty, will be 15
6 costBaseLevelMultiplier additional cost per level
if empty, will be 1
7 costRangeBase random additional cost range's start
if empty, will be 0
8 costRangeLevelMultiplier random additional cost range's length per level
if empty, will be 0

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_enchanteditem",
	"job": "minecraft:weaponsmith",
	"level": 4,
	"xp": 15,
	"priceMultiplier": 0.2,
	"costA": {
		"item": "minecraft:emerald",
		"count": 12
	},
	"result": {
		"item": "minecraft:diamond_axe"
	}
}

Cost Evaluate (Advanced)

  1. Select level in range
    min = base, max = base + range
    min ~ max(exclusive)
  2. 'COST' will be 'costA's count + (level * costBaseLevelMultiplier)
  3. (costRangeBase + level * costRangeLevelMultiplier) will be additional cost range
  4. Select random value in additional cost range
    0 ~ range(exclusive)
  5. Add that value to 'COST'
  6. finally, 'COST' will be 'costA's count when trade

Cost Evaluate (Example)

Precondition

  1. selected level is 19
  2. costA = minecraft:emerald x 2
  3. result = minecraft:iron_sword
  4. costBaseLevelMultiplier = 1
  5. costRangeBase = 10
  6. costRangeLevelMultiplier = 1

Scenario

  1. 'COST' is 2 (from emeraldx2)
  2. Add 19 to 'COST' (from 19 * 1, level * costBaseLevelMultiplier)
    'COST' be 21 in this step
  3. Add random value in additional cost range
    it range's max values is 'costRangeBase + (level * costRangeLevelMuliplier)'
    so will be 0 ~ 29(10 + 1 * 19, exclusive)
  4. 'COST' is in range 21 ~ 50(exclusive)
  5. Finally, trade itemstack will be like below
  • CostA = minecraft:emerald x {21 ~ 50(exclusive)}
  • CostB = not needed
  • Result = minecraft:iron_sword (Random Enchantments in level 19)

4. alien_trading_map

Description

  1. structure map from itemstacks
  2. Warning: Alien's trades be determine when entity spawned
    So when entity spawn, if structure not exist in world, display as 'Unknown Map' at trade result

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_map
2 costA first itemstack for trade
3 costB secend itemstack for trade
mean 'no need' when empty
4 result#structureName structure name
e.g.) Mansion, Monument, Stronghold
5 result#mapDecorationType target decoration in map gui
no meaning, just decoration

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_map",
	"job": "minecraft:cartographer",
	"level": 2,
	"xp": 5,
	"costA": {
		"item": "minecraft:emerald",
		"count": 12
	},
	"costB": {
		"item": "minecraft:compass"
	},
	"result": {
		"structureName": "monument",
		"mapDecorationType": "monument"
	}
}

Example 2

{
	"type": "boss_tools_giselle_addon:alien_trading_map",
	"job": "minecraft:cartographer",
	"level": 3,
	"xp": 10,
	"costA": {
		"item": "minecraft:emerald",
		"count": 12
	},
	"costB": {
		"item": "minecraft:compass"
	},
	"result": {
		"structureName": "mansion",
		"mapDecorationType": "mansion"
	}
}

5. alien_trading_potioneditem

Description

  1. using for tipped arrows, potions, splash potions. etc.
  2. can use other mods item what use Minecraft Potion API So when entity spawn, if structure not exist in world, display as 'Unknown Map' at trade result
  3. potion type is random

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_potioneditem
2 costA first itemstack for trade
3 costB secend itemstack for trade
mean 'no need' when empty
4 result result itemstack of trade
can't be empty
can declare NBT Tags

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_potioneditem",
	"job": "minecraft:fletcher",
	"level": 5,
	"xp": 30,
	"costA": {
		"item": "minecraft:emerald",
		"count": 2
	},
	"costB": {
		"item": "minecraft:arrow",
		"count": 5
	},
	"result": {
		"item": "minecraft:tipped_arrow",
		"count": 5
	}
}

Example 2

{
	"type": "boss_tools_giselle_addon:alien_trading_potioneditem",
	"job": "minecraft:cleric",
	"level": 1,
	"xp": 1,
	"costA": {
		"item": "minecraft:emerald"
	},
	"result": {
		"item": "minecraft:splash_potion"
	}
}

6. alien_trading_dyeditem

Description

  1. dyeable item from itemstacks
    e.g.) Leather Armors
  2. can use other mods item what use Minecraft IDyeableArmorItem API
  3. color is random
  4. maximum 2 colors using chance
    if fail chance test, item will not dye

Scheme

order key description
1 type boss_tools_giselle_addon:alien_trading_potioneditem
2 costA first itemstack for trade
3 costB secend itemstack for trade
mean 'no need' when empty
4 result result itemstack of trade
can't be empty
can declare NBT Tags
5 chance1 chance of dye first color
when empty, will be 0.7 => 70%
6 chance2 chance of dye second color
when empty, will be 0.8 => 80%

Example 1

{
	"type": "boss_tools_giselle_addon:alien_trading_dyeditem",
	"job": "minecraft:leatherworker",
	"level": 1,
	"xp": 1,
	"costA": {
		"item": "minecraft:emerald",
		"count": 7
	},
	"result": {
		"item": "minecraft:leather_chestplate"
	}
}