1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-19 00:04:53 +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" "P"
], ],
"key": { "key": {
"#": { "P": {
"item": "computercraft:pocket_computer_advanced" "item": "computercraft:pocket_computer_advanced"
}, },
"P": { "#": {
"item": "computercraft:speaker" "item": "computercraft:speaker"
} }
}, },
"result": { "result": {
"item": "computercraft:pocket_computer_advanced" "item": "computercraft:pocket_computer_advanced",
"nbt": "{Upgrade:\"computercraft:speaker\"}"
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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