-
Notifications
You must be signed in to change notification settings - Fork 2
Alien Trade Recipes (1.16.5)
gisellevonbingen edited this page Aug 27, 2022
·
3 revisions
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
| 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 |
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 |
Description
- 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
}
}Description
- enchanted book from itemstacks
- 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)
- Alien select Enchantment type, level
- Create a temporary variable with name 'COST'
- 'COST' is 'costA's count + (level * costBaseLevelMultiplier)
- (costRangeBase + level * costRangeLevelMultiplier) will be additional cost range
- Select random value in additional cost range
0 ~ range(exclusive) - Add that value to 'COST'
- If type is treasure only, multiply costTreasureOnlyMultiplier to 'COST'
- finally, 'COST' will be 'costA's count when trade
Cost Evaluate (Example)
Precondition
- Enchantment = Unbreaking II
- costA = minecraft:emerald x 2
- costB = minecraft:book
- costBaseLevelMultiplier = 3
- costRangeBase = 5
- costRangeLevelMultiplier = 10
Scenario
- 'COST' is 2 (from emeraldx2)
- Add 6 to 'COST' (from II * 3)
- Add random value in additional cost range
0 ~ 25(5 + 20, exclusive) - 'COST' is in range 6 ~ 31(exclusive)
- Finally, trade itemstack will be like below
- CostA = minecraft:emerald x {6 ~ 31(exclusive)}
- CostB = minecraft:book
- Result = minecraft:enchanted_book (Unbreaking II)
Description
- enchanted item from itemstacks
- 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)
- Select level in range
min = base, max = base + range
min ~ max(exclusive) - 'COST' will be 'costA's count + (level * costBaseLevelMultiplier)
- (costRangeBase + level * costRangeLevelMultiplier) will be additional cost range
- Select random value in additional cost range
0 ~ range(exclusive) - Add that value to 'COST'
- finally, 'COST' will be 'costA's count when trade
Cost Evaluate (Example)
Precondition
- selected level is 19
- costA = minecraft:emerald x 2
- result = minecraft:iron_sword
- costBaseLevelMultiplier = 1
- costRangeBase = 10
- costRangeLevelMultiplier = 1
Scenario
- 'COST' is 2 (from emeraldx2)
- Add 19 to 'COST' (from 19 * 1, level * costBaseLevelMultiplier)
'COST' be 21 in this step - 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) - 'COST' is in range 21 ~ 50(exclusive)
- 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)
Description
- structure map from itemstacks
- 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"
}
}Description
- using for tipped arrows, potions, splash potions. etc.
- 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
- 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"
}
}Description
- dyeable item from itemstacks
e.g.) Leather Armors - can use other mods item what use Minecraft IDyeableArmorItem API
- color is random
- 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"
}
}