1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-14 12:10:30 +00:00

Fix recipe book upgrade recipes

- Flip turtle/pocket and upgrade item.
 - Correctly set NBT on pocket upgrade recipe output.
This commit is contained in:
Jonathan Coates 2021-10-11 12:17:45 +01:00
parent 6dd33f7099
commit 482ae0d22e
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
25 changed files with 65 additions and 59 deletions

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_advanced"
},
"P": {
"#": {
"item": "computercraft:speaker"
}
},
"result": {
"item": "computercraft:pocket_computer_advanced"
"item": "computercraft:pocket_computer_advanced",
"nbt": "{Upgrade:\"computercraft:speaker\"}"
}
}

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_advanced"
},
"P": {
"#": {
"item": "computercraft:wireless_modem_advanced"
}
},
"result": {
"item": "computercraft:pocket_computer_advanced"
"item": "computercraft:pocket_computer_advanced",
"nbt": "{Upgrade:\"computercraft:wireless_modem_advanced\"}"
}
}

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_advanced"
},
"P": {
"#": {
"item": "computercraft:wireless_modem_normal"
}
},
"result": {
"item": "computercraft:pocket_computer_advanced"
"item": "computercraft:pocket_computer_advanced",
"nbt": "{Upgrade:\"computercraft:wireless_modem_normal\"}"
}
}

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_normal"
},
"P": {
"#": {
"item": "computercraft:speaker"
}
},
"result": {
"item": "computercraft:pocket_computer_normal"
"item": "computercraft:pocket_computer_normal",
"nbt": "{Upgrade:\"computercraft:speaker\"}"
}
}

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_normal"
},
"P": {
"#": {
"item": "computercraft:wireless_modem_advanced"
}
},
"result": {
"item": "computercraft:pocket_computer_normal"
"item": "computercraft:pocket_computer_normal",
"nbt": "{Upgrade:\"computercraft:wireless_modem_advanced\"}"
}
}

View File

@ -6,14 +6,15 @@
"P"
],
"key": {
"#": {
"P": {
"item": "computercraft:pocket_computer_normal"
},
"P": {
"#": {
"item": "computercraft:wireless_modem_normal"
}
},
"result": {
"item": "computercraft:pocket_computer_normal"
"item": "computercraft:pocket_computer_normal",
"nbt": "{Upgrade:\"computercraft:wireless_modem_normal\"}"
}
}

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "computercraft:speaker"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "computercraft:wireless_modem_advanced"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "computercraft:wireless_modem_normal"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:crafting_table"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:diamond_axe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:diamond_hoe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:diamond_pickaxe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:diamond_shovel"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_advanced"
},
"T": {
"#": {
"item": "minecraft:diamond_sword"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "computercraft:speaker"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "computercraft:wireless_modem_advanced"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "computercraft:wireless_modem_normal"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:crafting_table"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:diamond_axe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:diamond_hoe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:diamond_pickaxe"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:diamond_shovel"
}
},

View File

@ -5,10 +5,10 @@
"#T"
],
"key": {
"#": {
"T": {
"item": "computercraft:turtle_normal"
},
"T": {
"#": {
"item": "minecraft:diamond_sword"
}
},

View File

@ -104,8 +104,8 @@ public class Recipes extends RecipeProvider
.shaped( result.getItem() )
.group( String.format( "%s:turtle_%s", ComputerCraft.MOD_ID, nameId ) )
.pattern( "#T" )
.define( '#', base.getItem() )
.define( 'T', upgrade.getCraftingItem().getItem() )
.define( 'T', base.getItem() )
.define( '#', upgrade.getCraftingItem().getItem() )
.unlockedBy( "has_items",
inventoryChange( base.getItem(), upgrade.getCraftingItem().getItem() ) )
.save(
@ -133,14 +133,14 @@ public class Recipes extends RecipeProvider
String nameId = family.name().toLowerCase( Locale.ROOT );
PocketUpgrades.getVanillaUpgrades().forEach( upgrade -> {
ItemStack result = PocketComputerItemFactory.create( -1, null, -1, family, null );
ItemStack result = PocketComputerItemFactory.create( -1, null, -1, family, upgrade );
ShapedRecipeBuilder
.shaped( result.getItem() )
.group( String.format( "%s:pocket_%s", ComputerCraft.MOD_ID, nameId ) )
.pattern( "#" )
.pattern( "P" )
.define( '#', base.getItem() )
.define( 'P', upgrade.getCraftingItem().getItem() )
.define( 'P', base.getItem() )
.define( '#', upgrade.getCraftingItem().getItem() )
.unlockedBy( "has_items",
inventoryChange( base.getItem(), upgrade.getCraftingItem().getItem() ) )
.save(