diff --git a/README.md b/README.md index be3825c..57522ef 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -# Slope Testmod +# Templates -[>> Downloads <<](https://github.com/CottonMC/slopetest/releases) +[>> Downloads <<](https://github.com/CottonMC/Templates/releases) *Slopes?* **This mod is open source and under a permissive license.** As such, it can be included in any modpack on any platform without prior permission. We appreciate hearing about people using our mods, but you do not need to ask to use them. See the [LICENSE file](LICENSE) for more details. -Testing out the possibility of a Carpenter's Blocks-like mod in Fabric. Not yet complete. +Templates is an API for Carpenter's Blocks-like templated blocks. Currently, plain slopes are the only built-in template blocks. + +Template blocks can be placed in the world, then right-clicked with a full-size block to set the textures for the template. Template blocks will inherit light and redstone values from the blocks they're given, or they can have light or redstone output added to any given block by right-clicking the template with glowstone dust or a redstone torch, respectively. diff --git a/src/main/resources/assets/templates/lang/en_us.json b/src/main/resources/assets/templates/lang/en_us.json new file mode 100644 index 0000000..2016bd6 --- /dev/null +++ b/src/main/resources/assets/templates/lang/en_us.json @@ -0,0 +1,3 @@ +{ + "block.templates.slope": "Slope Template" +} \ No newline at end of file diff --git a/src/main/resources/data/templates/advancements/recipes/decorations/slope.json b/src/main/resources/data/templates/advancements/recipes/decorations/slope.json new file mode 100644 index 0000000..da4b188 --- /dev/null +++ b/src/main/resources/data/templates/advancements/recipes/decorations/slope.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "minecraft:scaffolding" + ] + }, + "criteria": { + "has_bamboo": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:bamboo" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "templates:slope" + } + } + }, + "requirements": [ + [ + "has_bamboo", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/templates/recipes/slope.json b/src/main/resources/data/templates/recipes/slope.json new file mode 100644 index 0000000..14d0ea4 --- /dev/null +++ b/src/main/resources/data/templates/recipes/slope.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "I ", + "I~ ", + "III" + ], + "key": { + "I": { + "item": "minecraft:bamboo" + }, + "~": { + "item": "minecraft:string" + } + }, + "result": { + "item": "templates:slope", + "count": 4 + } +} \ No newline at end of file