-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- backport campfire_cooking configuration
- Loading branch information
Showing
21 changed files
with
237 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
# SolarCooker | ||
Minecraft Forge Mod adding a Solar Cooker | ||
# Solar Cooker [![Curseforge](http://cf.way2muchnoise.eu/full_solar-cooker_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/solar-cooker) [![Curseforge](http://cf.way2muchnoise.eu/versions/For%20MC_solar-cooker_all.svg)](https://www.curseforge.com/minecraft/mc-mods/solar-cooker/files) [![](https://img.shields.io/discord/752506676719910963.svg?style=flat&color=informational&logo=discord&label=Discord)](https://discord.gg/gRUFH5t) [![License](https://img.shields.io/github/license/cech12/SolarCooker)](http://opensource.org/licenses/MIT) | ||
|
||
This is a **Minecraft Forge** mod and adds a **Solar Cooker** to the game. | ||
|
||
![All Furnaces](https://raw.githubusercontent.com/cech12/SolarCooker/master/material/logo.png) | ||
|
||
It acts like a furnace but needs sunlight instead of fuel. | ||
|
||
In default configuration all smoking recipes are working in the Solar Cooker, and they need 4 times more time than in a vanilla Smoker. | ||
|
||
The mod is configurable, and you can change the recipes to "smelting" or "blasting". You can configure the cook time factor and blacklist recipes as well as add recipes via datapacks. | ||
|
||
For more information check out the **Wiki**: https://github.com/cech12/SolarCooker/wiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/cech12/solarcooker/block/ShiningDiamondBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cech12.solarcooker.block; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.client.util.ITooltipFlag; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.text.ITextComponent; | ||
import net.minecraft.util.text.TextFormatting; | ||
import net.minecraft.util.text.TranslationTextComponent; | ||
import net.minecraft.world.IBlockReader; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
import java.util.List; | ||
|
||
public class ShiningDiamondBlock extends Block { | ||
|
||
public ShiningDiamondBlock(Properties properties) { | ||
super(properties); | ||
} | ||
|
||
@Override | ||
public void addInformation(@Nonnull ItemStack stack, @Nullable IBlockReader worldIn, @Nonnull List<ITextComponent> tooltip, @Nonnull ITooltipFlag flagIn) { | ||
super.addInformation(stack, worldIn, tooltip, flagIn); | ||
tooltip.add(new TranslationTextComponent("item.solarcooker.shining_diamond_block.description").applyTextStyle(TextFormatting.BLUE)); //1.15 | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cech12.solarcooker.init; | ||
|
||
import cech12.solarcooker.SolarCookerMod; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.tags.BlockTags; | ||
//import net.minecraft.tags.ITag; //1.16 | ||
import net.minecraft.tags.Tag; //1.15 | ||
import net.minecraft.util.ResourceLocation; //1.15 | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class ModTags { | ||
|
||
public static class Blocks { | ||
|
||
public static final Tag<Block> SOLAR_COOKER_SHINING = tag("solar_cooker_shining"); //1.15 | ||
|
||
private static Tag<Block> tag(@Nonnull String name) { //1.15 | ||
return new BlockTags.Wrapper(new ResourceLocation(SolarCookerMod.MOD_ID + ":" + name)); //1.15 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/resources/assets/solarcooker/blockstates/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "solarcooker:block/shining_diamond_block" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"block.solarcooker.solar_cooker": "Solarkocher", | ||
"block.solarcooker.reflector": "Reflektor", | ||
"block.solarcooker.shining_diamond_block": "Strahlender Diamantblock", | ||
|
||
"item.solarcooker.reflector.description": "Links und rechts neben einem Solarkocher können bis zu vier Reflektoren platziert werden, um den Lichteinfall zu verbessern und die Kochzeit zu reduzieren." | ||
"item.solarcooker.reflector.description": "Links und rechts neben einem Solarkocher können bis zu vier Reflektoren platziert werden, um den Lichteinfall zu verbessern und die Kochzeit zu reduzieren.", | ||
"item.solarcooker.shining_diamond_block.description": "Shine bright! Kann über einem Solarkocher platziert werden, um ihn unabhängig von der Sonne zu nutzen." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"block.solarcooker.solar_cooker": "Solar Cooker", | ||
"block.solarcooker.reflector": "Reflector", | ||
"block.solarcooker.shining_diamond_block": "Shining Block of Diamond", | ||
|
||
"item.solarcooker.reflector.description": "Up to four Reflectors can be placed to the left and right side of a Solar Cooker to improve the incidence of light and reduce cooking time." | ||
"item.solarcooker.reflector.description": "Up to four Reflectors can be placed to the left and right side of a Solar Cooker to improve the incidence of light and reduce cooking time.", | ||
"item.solarcooker.shining_diamond_block.description": "Shine bright! Can be placed above a Solar Cooker to use it independently of the sun." | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/solarcooker/models/block/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:block/cube_all", | ||
"textures": { | ||
"all": "solarcooker:block/shining_diamond_block" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/resources/assets/solarcooker/models/item/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parent": "solarcooker:block/shining_diamond_block" | ||
} |
Binary file added
BIN
+2.39 KB
src/main/resources/assets/solarcooker/textures/block/shining_diamond_block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/solarcooker/textures/block/shining_diamond_block.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"animation": { | ||
"frametime": 5 | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/resources/data/solarcooker/advancements/recipes/building_blocks/diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"solarcooker:diamond_block" | ||
] | ||
}, | ||
"criteria": { | ||
"has_diamond_block": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"item": "solarcooker:shining_diamond_block" | ||
} | ||
] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "solarcooker:diamond_block" | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_diamond_block", | ||
"has_the_recipe" | ||
] | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
...esources/data/solarcooker/advancements/recipes/building_blocks/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"solarcooker:shining_diamond_block" | ||
] | ||
}, | ||
"criteria": { | ||
"has_diamond_block": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"item": "minecraft:diamond_block" | ||
} | ||
] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "solarcooker:shining_diamond_block" | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_diamond_block", | ||
"has_the_recipe" | ||
] | ||
] | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/resources/data/solarcooker/loot_tables/blocks/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"functions": [ | ||
{ | ||
"function": "minecraft:copy_name", | ||
"source": "block_entity" | ||
} | ||
], | ||
"name": "solarcooker:shining_diamond_block" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
] | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/resources/data/solarcooker/recipes/diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"ingredients": [ | ||
{ | ||
"item": "solarcooker:shining_diamond_block" | ||
} | ||
], | ||
"result": { | ||
"item": "minecraft:diamond_block" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/resources/data/solarcooker/recipes/shining_diamond_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "solarcooker:solarcooking", | ||
"ingredient": { | ||
"item": "minecraft:diamond_block" | ||
}, | ||
"result": "solarcooker:shining_diamond_block", | ||
"experience": 0.3, | ||
"cookingtime": 3000 | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/solarcooker/tags/blocks/solar_cooker_shining.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"solarcooker:shining_diamond_block" | ||
] | ||
} |