From 80ad1494d75663f16277be3966cb60e808380e10 Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Sun, 11 Apr 2021 16:12:17 -0400 Subject: [PATCH] Add Tinkers Gadgetry, final book until we get more mod content --- .../general/common/tinkers_gadgetry.json | 32 ++++++++++++++++++ .../recipes/common/tinkers_gadgetry.json | 14 ++++++++ .../common/item/TinkerBookItem.java | 3 +- .../tconstruct/library/book/TinkerBook.java | 4 +++ .../shared/CommonsClientEvents.java | 1 + .../tconstruct/shared/TinkerCommons.java | 1 + .../shared/data/CommonRecipeProvider.java | 6 ++++ .../book/tinkers_gadgetry/appearance.json | 6 ++++ .../tinkers_gadgetry/en_us/intro/tmp.json | 8 +++++ .../book/tinkers_gadgetry/en_us/language.lang | 22 ++++++++++++ .../book/tinkers_gadgetry/index.json | 11 ++++++ .../tinkers_gadgetry/sections/intro_tmp.json | 10 ++++++ .../assets/tconstruct/lang/en_us.json | 2 ++ .../models/item/tinkers_gadgetry.json | 6 ++++ .../textures/item/tinkers_gadgetry.png | Bin 0 -> 300 bytes 15 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/data/tconstruct/advancements/recipes/tconstruct/general/common/tinkers_gadgetry.json create mode 100644 src/generated/resources/data/tconstruct/recipes/common/tinkers_gadgetry.json create mode 100644 src/main/resources/assets/tconstruct/book/tinkers_gadgetry/appearance.json create mode 100644 src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/intro/tmp.json create mode 100644 src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/language.lang create mode 100644 src/main/resources/assets/tconstruct/book/tinkers_gadgetry/index.json create mode 100644 src/main/resources/assets/tconstruct/book/tinkers_gadgetry/sections/intro_tmp.json create mode 100644 src/main/resources/assets/tconstruct/models/item/tinkers_gadgetry.json create mode 100644 src/main/resources/assets/tconstruct/textures/item/tinkers_gadgetry.png diff --git a/src/generated/resources/data/tconstruct/advancements/recipes/tconstruct/general/common/tinkers_gadgetry.json b/src/generated/resources/data/tconstruct/advancements/recipes/tconstruct/general/common/tinkers_gadgetry.json new file mode 100644 index 00000000000..1008f7133f9 --- /dev/null +++ b/src/generated/resources/data/tconstruct/advancements/recipes/tconstruct/general/common/tinkers_gadgetry.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "tconstruct:common/tinkers_gadgetry" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:slimeball/sky" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "tconstruct:common/tinkers_gadgetry" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/tconstruct/recipes/common/tinkers_gadgetry.json b/src/generated/resources/data/tconstruct/recipes/common/tinkers_gadgetry.json new file mode 100644 index 00000000000..3b3e21d1562 --- /dev/null +++ b/src/generated/resources/data/tconstruct/recipes/common/tinkers_gadgetry.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "minecraft:book" + }, + { + "tag": "forge:slimeball/sky" + } + ], + "result": { + "item": "tconstruct:tinkers_gadgetry" + } +} \ No newline at end of file diff --git a/src/main/java/slimeknights/tconstruct/common/item/TinkerBookItem.java b/src/main/java/slimeknights/tconstruct/common/item/TinkerBookItem.java index 3ee6b03e117..41d6ece63e8 100644 --- a/src/main/java/slimeknights/tconstruct/common/item/TinkerBookItem.java +++ b/src/main/java/slimeknights/tconstruct/common/item/TinkerBookItem.java @@ -29,6 +29,7 @@ public ActionResult onItemRightClick(World worldIn, PlayerEntity play public enum BookType { MATERIALS_AND_YOU, PUNY_SMELTING, - MIGHTY_SMELTING + MIGHTY_SMELTING, + TINKERS_GADGETRY } } diff --git a/src/main/java/slimeknights/tconstruct/library/book/TinkerBook.java b/src/main/java/slimeknights/tconstruct/library/book/TinkerBook.java index 07ecb188f6a..10f3351fdb4 100644 --- a/src/main/java/slimeknights/tconstruct/library/book/TinkerBook.java +++ b/src/main/java/slimeknights/tconstruct/library/book/TinkerBook.java @@ -19,10 +19,12 @@ public class TinkerBook extends BookData { private static final ResourceLocation MATERIALS_BOOK_ID = Util.getResource("materials_and_you"); private static final ResourceLocation MIGHTY_SMELTING_ID = Util.getResource("mighty_smelting"); private static final ResourceLocation PUNY_SMELTING_ID = Util.getResource("puny_smelting"); + private static final ResourceLocation TINKERS_GADGETRY_ID = Util.getResource("tinkers_gadgetry"); public final static BookData MATERIALS_AND_YOU = BookLoader.registerBook(MATERIALS_BOOK_ID.toString(), false, false); public final static BookData PUNY_SMELTING = BookLoader.registerBook(MIGHTY_SMELTING_ID.toString(), false, false); public final static BookData MIGHTY_SMELTING = BookLoader.registerBook(MIGHTY_SMELTING_ID.toString(), false, false); + public final static BookData TINKERS_GADGETRY = BookLoader.registerBook(TINKERS_GADGETRY_ID.toString(), false, false); /** Initializes the books */ public static void initBook() { @@ -35,6 +37,7 @@ public static void initBook() { addData(MATERIALS_AND_YOU, MATERIALS_BOOK_ID); addData(PUNY_SMELTING, PUNY_SMELTING_ID); addData(MIGHTY_SMELTING, MIGHTY_SMELTING_ID); + addData(TINKERS_GADGETRY, TINKERS_GADGETRY_ID); } /** @@ -60,6 +63,7 @@ public static BookData getBook(BookType bookType) { case MATERIALS_AND_YOU: return MATERIALS_AND_YOU; case PUNY_SMELTING: return PUNY_SMELTING; case MIGHTY_SMELTING: return MIGHTY_SMELTING; + case TINKERS_GADGETRY: return TINKERS_GADGETRY; } return MATERIALS_AND_YOU; } diff --git a/src/main/java/slimeknights/tconstruct/shared/CommonsClientEvents.java b/src/main/java/slimeknights/tconstruct/shared/CommonsClientEvents.java index a9be01ed33d..2e7395fda26 100644 --- a/src/main/java/slimeknights/tconstruct/shared/CommonsClientEvents.java +++ b/src/main/java/slimeknights/tconstruct/shared/CommonsClientEvents.java @@ -40,6 +40,7 @@ static void clientSetup(final FMLClientSetupEvent event) { FontRenderer unicode = unicodeFontRender(); TinkerBook.MATERIALS_AND_YOU.fontRenderer = unicode; + TinkerBook.TINKERS_GADGETRY.fontRenderer = unicode; TinkerBook.PUNY_SMELTING.fontRenderer = unicode; TinkerBook.MIGHTY_SMELTING.fontRenderer = unicode; } diff --git a/src/main/java/slimeknights/tconstruct/shared/TinkerCommons.java b/src/main/java/slimeknights/tconstruct/shared/TinkerCommons.java index e70b95281a8..80de3e2c965 100644 --- a/src/main/java/slimeknights/tconstruct/shared/TinkerCommons.java +++ b/src/main/java/slimeknights/tconstruct/shared/TinkerCommons.java @@ -74,6 +74,7 @@ public final class TinkerCommons extends TinkerModule { public static final ItemObject materialsAndYou = ITEMS.register("materials_and_you", () -> new TinkerBookItem(BOOK, BookType.MATERIALS_AND_YOU)); public static final ItemObject punySmelting = ITEMS.register("puny_smelting", () -> new TinkerBookItem(BOOK, BookType.PUNY_SMELTING)); public static final ItemObject mightySmelting = ITEMS.register("mighty_smelting", () -> new TinkerBookItem(BOOK, BookType.MIGHTY_SMELTING)); + public static final ItemObject tinkersGadgetry = ITEMS.register("tinkers_gadgetry", () -> new TinkerBookItem(BOOK, BookType.TINKERS_GADGETRY)); // TODO: move to natura public static final ItemObject driedBrick = ITEMS.register("dried_brick", HIDDEN_PROPS); diff --git a/src/main/java/slimeknights/tconstruct/shared/data/CommonRecipeProvider.java b/src/main/java/slimeknights/tconstruct/shared/data/CommonRecipeProvider.java index a7bc60fab46..711a581f3f8 100644 --- a/src/main/java/slimeknights/tconstruct/shared/data/CommonRecipeProvider.java +++ b/src/main/java/slimeknights/tconstruct/shared/data/CommonRecipeProvider.java @@ -12,6 +12,7 @@ import net.minecraft.util.IItemProvider; import net.minecraftforge.fluids.FluidStack; import slimeknights.mantle.recipe.data.ConsumerWrapperBuilder; +import slimeknights.tconstruct.common.TinkerTags; import slimeknights.tconstruct.common.conditions.ConfigEnabledCondition; import slimeknights.tconstruct.common.data.BaseRecipeProvider; import slimeknights.tconstruct.common.registration.MetalItemObject; @@ -58,6 +59,11 @@ private void addCommonRecipes(Consumer consumer) { .addIngredient(TinkerTables.pattern) .addCriterion("has_item", hasItem(TinkerTables.pattern)) .build(consumer, prefix(TinkerCommons.materialsAndYou, "common/")); + ShapelessRecipeBuilder.shapelessRecipe(TinkerCommons.tinkersGadgetry) + .addIngredient(Items.BOOK) + .addIngredient(TinkerTags.Items.SKY_SLIMEBALL) + .addCriterion("has_item", hasItem(TinkerTags.Items.SKY_SLIMEBALL)) + .build(consumer, prefix(TinkerCommons.tinkersGadgetry, "common/")); ShapelessRecipeBuilder.shapelessRecipe(TinkerCommons.punySmelting) .addIngredient(Items.BOOK) .addIngredient(TinkerSmeltery.searedBrick) diff --git a/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/appearance.json b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/appearance.json new file mode 100644 index 00000000000..06a45ec793b --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/appearance.json @@ -0,0 +1,6 @@ +{ + "title": "Tinker's Gadgetry", + "subtitle": "by Melvin", + "drawSectionListText": true, + "coverColor": 0x42BAC2 +} \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/intro/tmp.json b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/intro/tmp.json new file mode 100644 index 00000000000..b4a916c968d --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/intro/tmp.json @@ -0,0 +1,8 @@ +{ + "title":"The lost pages", + "text": [ + { + "text": "We are in communication with Melvin, who fell in a slime pool, about his knowledge of slime gadgets. He has promised a complete writeup for future versions of the book." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/language.lang b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/language.lang new file mode 100644 index 00000000000..0134bba575c --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/en_us/language.lang @@ -0,0 +1,22 @@ +// Sections +intro=Introduction +materials=Tool materials +bowmaterials=Bow materials +tools=Tools +modifiers=Modifiers +smeltery=Smeltery +seared_furnace=Seared Furnace +tinker_tank=Tinker Tank + +repairing=Repairing +offhand=Offhand Harvesting +bolt_core=Bolt Crafting + +modifier.effect=Effects: +tool.properties=Properties: + +material.craft_partbuilder=Can be crafted in the Part Builder +material.craft_casting=Can be cast from %s + +wood.flavour=How much wood could a woodchuck chuck if a woodchuck could chuck wood? +stone.flavour=Rock solid \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/index.json b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/index.json new file mode 100644 index 00000000000..594ee2645ce --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/index.json @@ -0,0 +1,11 @@ +[ + { + "name": "intro", + "data": "sections/intro_tmp.json", + "icon": { + "item": { + "id": "tconstruct:blue_slime_ball" + } + } + } +] diff --git a/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/sections/intro_tmp.json b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/sections/intro_tmp.json new file mode 100644 index 00000000000..4f4aac23b23 --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/tinkers_gadgetry/sections/intro_tmp.json @@ -0,0 +1,10 @@ +[ + { + "type": "blank" + }, + { + "name": "tmp_intro", + "type": "text", + "data": "intro/tmp.json" + } +] \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/lang/en_us.json b/src/main/resources/assets/tconstruct/lang/en_us.json index 5a8d924c8ba..19b70e9f1d0 100644 --- a/src/main/resources/assets/tconstruct/lang/en_us.json +++ b/src/main/resources/assets/tconstruct/lang/en_us.json @@ -154,6 +154,8 @@ "item.tconstruct.materials_and_you": "Materials and You", "item.tconstruct.materials_and_you.tooltip": "The book every Tinker needs\nby Skyla", + "item.tconstruct.tinkers_gadgetry": "Tinker's Gadgetry", + "item.tconstruct.tinkers_gadgetry.tooltip": "Uses of slime in everyday tasks\nby Melvin", "item.tconstruct.puny_smelting": "Puny Smelting", "item.tconstruct.puny_smelting.tooltip": "Smelting and casting for beginners\nby Thruul M'Gon", diff --git a/src/main/resources/assets/tconstruct/models/item/tinkers_gadgetry.json b/src/main/resources/assets/tconstruct/models/item/tinkers_gadgetry.json new file mode 100644 index 00000000000..6575b0b60fd --- /dev/null +++ b/src/main/resources/assets/tconstruct/models/item/tinkers_gadgetry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "tconstruct:item/tinkers_gadgetry" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/textures/item/tinkers_gadgetry.png b/src/main/resources/assets/tconstruct/textures/item/tinkers_gadgetry.png new file mode 100644 index 0000000000000000000000000000000000000000..eb71a4c6556fdc7473275529de72dd67e9205766 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}@0G|+7khq<*j9-w`u0v+CR(TydrBPJ9Wy_Y3kdUiauTGmbP0ZR3s75O1 zvKElyEeY}q{*MG0Y+op~0VOyKJR*x37`TN&n2}-D90{Ocsi%u$h(>Vf`9QuS3LGo} zX^k7V-uu7DdPU|ewWo{I;sjRqhSxGTROTHxZ@bJVz^BSbkYVP_6gMv)Lz@?qGz?dm zdq-^NXbyhx@YjU522UdQuH2XtE6Z$?Eq7CTrDT=srpH^qP583zM}&`T^=H=a{VT-o cm>!dNy2JkB$nIGNKnE~*y85}Sb4q9e0C)Ip?*IS* literal 0 HcmV?d00001