Skip to content

Commit

Permalink
Add Tinkers Gadgetry, final book until we get more mod content
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Apr 11, 2021
1 parent ac7a477 commit 80ad149
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:book"
},
{
"tag": "forge:slimeball/sky"
}
],
"result": {
"item": "tconstruct:tinkers_gadgetry"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity play
public enum BookType {
MATERIALS_AND_YOU,
PUNY_SMELTING,
MIGHTY_SMELTING
MIGHTY_SMELTING,
TINKERS_GADGETRY
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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);
}

/**
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public final class TinkerCommons extends TinkerModule {
public static final ItemObject<TinkerBookItem> materialsAndYou = ITEMS.register("materials_and_you", () -> new TinkerBookItem(BOOK, BookType.MATERIALS_AND_YOU));
public static final ItemObject<TinkerBookItem> punySmelting = ITEMS.register("puny_smelting", () -> new TinkerBookItem(BOOK, BookType.PUNY_SMELTING));
public static final ItemObject<TinkerBookItem> mightySmelting = ITEMS.register("mighty_smelting", () -> new TinkerBookItem(BOOK, BookType.MIGHTY_SMELTING));
public static final ItemObject<TinkerBookItem> tinkersGadgetry = ITEMS.register("tinkers_gadgetry", () -> new TinkerBookItem(BOOK, BookType.TINKERS_GADGETRY));
// TODO: move to natura
public static final ItemObject<Item> driedBrick = ITEMS.register("dried_brick", HIDDEN_PROPS);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -58,6 +59,11 @@ private void addCommonRecipes(Consumer<IFinishedRecipe> 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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"title": "Tinker's Gadgetry",
"subtitle": "by Melvin",
"drawSectionListText": true,
"coverColor": 0x42BAC2
}
Original file line number Diff line number Diff line change
@@ -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."
}
]
}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"name": "intro",
"data": "sections/intro_tmp.json",
"icon": {
"item": {
"id": "tconstruct:blue_slime_ball"
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"type": "blank"
},
{
"name": "tmp_intro",
"type": "text",
"data": "intro/tmp.json"
}
]
2 changes: 2 additions & 0 deletions src/main/resources/assets/tconstruct/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "tconstruct:item/tinkers_gadgetry"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 80ad149

Please sign in to comment.