-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
321 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -23,3 +23,5 @@ run | |
|
||
# Files from Forge MDK | ||
forge*changelog.txt | ||
|
||
run-data |
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 @@ | ||
#Early window height | ||
earlyWindowHeight = 480 | ||
#Early window framebuffer scale | ||
earlyWindowFBScale = 1 | ||
#Enable forge global version checking | ||
versionCheck = true | ||
#Early window provider | ||
earlyWindowProvider = "fmlearlywindow" | ||
#Early window width | ||
earlyWindowWidth = 854 | ||
#Early window starts maximized | ||
earlyWindowMaximized = false | ||
#Default config path for servers | ||
defaultConfigPath = "defaultconfigs" | ||
#Disables Optimized DFU client-side - already disabled on servers | ||
disableOptimizedDFU = true | ||
#Skip specific GL versions, may help with buggy graphics card drivers | ||
earlyWindowSkipGLVersions = [] | ||
#Should we control the window. Disabling this disables new GL features and can be bad for mods that rely on them. | ||
earlyWindowControl = true | ||
#Max threads for early initialization parallelism, -1 is based on processor count | ||
maxThreads = -1 | ||
#Squir? | ||
earlyWindowSquir = false | ||
|
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 @@ | ||
{ | ||
"item.hon.iron_tongs": "Iron Tongs", | ||
"item.hon.mittens": "Mitts", | ||
"item.hon.wooden_tongs": "Wooden Tongs", | ||
"item_group.hon.hon": "Hot Or Not Tab", | ||
"tooltip.hon.cold": "This Item feels Cold to the touch", | ||
"tooltip.hon.hot": "This Item feels Hot to the touch", | ||
"tooltip.hon.protectivegear": "This Item protects from negative effect from hot/cold items, put in offhand to use" | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/hon/models/item/iron_tongs.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:item/generated", | ||
"textures": { | ||
"layer0": "hon:item/iron_tongs" | ||
} | ||
} |
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:item/generated", | ||
"textures": { | ||
"layer0": "hon:item/mittens" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/hon/models/item/wooden_tongs.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:item/generated", | ||
"textures": { | ||
"layer0": "hon:item/wooden_tongs" | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/generated/resources/data/hon/advancements/recipes/tools/iron_tongs.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,35 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_iron_ingot": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"minecraft:iron_ingot" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "hon:iron_tongs" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_iron_ingot", | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"hon:iron_tongs" | ||
] | ||
}, | ||
"sends_telemetry_event": false | ||
} |
35 changes: 35 additions & 0 deletions
35
src/generated/resources/data/hon/advancements/recipes/tools/mittens.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,35 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_leather": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"minecraft:leather" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "hon:mittens" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_leather", | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"hon:mittens" | ||
] | ||
}, | ||
"sends_telemetry_event": false | ||
} |
35 changes: 35 additions & 0 deletions
35
src/generated/resources/data/hon/advancements/recipes/tools/wooden_tongs.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,35 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_stick": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"minecraft:stick" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "hon:wooden_tongs" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_stick", | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"hon:wooden_tongs" | ||
] | ||
}, | ||
"sends_telemetry_event": false | ||
} |
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,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "equipment", | ||
"key": { | ||
"I": { | ||
"item": "minecraft:iron_ingot" | ||
} | ||
}, | ||
"pattern": [ | ||
"I I", | ||
"I I", | ||
" I " | ||
], | ||
"result": { | ||
"item": "hon:iron_tongs" | ||
}, | ||
"show_notification": true | ||
} |
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,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "equipment", | ||
"key": { | ||
"L": { | ||
"item": "minecraft:leather" | ||
} | ||
}, | ||
"pattern": [ | ||
"LLL", | ||
" LL", | ||
"LLL" | ||
], | ||
"result": { | ||
"item": "hon:mittens" | ||
}, | ||
"show_notification": true | ||
} |
18 changes: 18 additions & 0 deletions
18
src/generated/resources/data/hon/recipes/wooden_tongs.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,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "equipment", | ||
"key": { | ||
"S": { | ||
"item": "minecraft:stick" | ||
} | ||
}, | ||
"pattern": [ | ||
"S S", | ||
"S S", | ||
" S " | ||
], | ||
"result": { | ||
"item": "hon:wooden_tongs" | ||
}, | ||
"show_notification": true | ||
} |
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,18 @@ | ||
package com.kitp13.hon.datagen; | ||
|
||
import com.kitp13.hon.HotOrNot; | ||
import net.minecraft.data.DataGenerator; | ||
import net.minecraftforge.data.event.GatherDataEvent; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
|
||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) | ||
public class DataGen { | ||
@SubscribeEvent | ||
public static void gatherData(GatherDataEvent event) { | ||
DataGenerator generator = event.getGenerator(); | ||
generator.addProvider(event.includeClient(), new LangEN_US(generator.getPackOutput(), HotOrNot.MODID, "en_us")); | ||
generator.addProvider(event.includeClient(), new ItemModel(generator.getPackOutput(), HotOrNot.MODID, event.getExistingFileHelper())); | ||
generator.addProvider(event.includeServer(), new Recipes(generator.getPackOutput())); | ||
} | ||
} |
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,30 @@ | ||
package com.kitp13.hon.datagen; | ||
|
||
import com.kitp13.hon.HotOrNot; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraftforge.client.model.generators.ItemModelBuilder; | ||
import net.minecraftforge.client.model.generators.ItemModelProvider; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import net.minecraftforge.registries.RegistryObject; | ||
|
||
public class ItemModel extends ItemModelProvider{ | ||
|
||
public ItemModel(PackOutput output, String modid, ExistingFileHelper existingFileHelper) { | ||
super(output, modid, existingFileHelper); | ||
} | ||
|
||
@Override | ||
protected void registerModels() { | ||
this.item(HotOrNot.WOODEN_TONGS); | ||
this.item(HotOrNot.IRON_TONGS); | ||
this.item(HotOrNot.MITTS); | ||
} | ||
|
||
private ItemModelBuilder item(RegistryObject<Item> item){ | ||
return withExistingParent(item.getId().getPath(), | ||
new ResourceLocation("item/generated")).texture("layer0", | ||
new ResourceLocation(HotOrNot.MODID, "item/" + item.getId().getPath())); | ||
} | ||
} |
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 com.kitp13.hon.datagen; | ||
|
||
import com.kitp13.hon.HotOrNot; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraftforge.common.data.LanguageProvider; | ||
|
||
public class LangEN_US extends LanguageProvider { | ||
public LangEN_US(PackOutput output, String modid, String locale) { | ||
super(output, modid, locale); | ||
} | ||
|
||
@Override | ||
protected void addTranslations() { | ||
add(HotOrNot.WOODEN_TONGS.get(), "Wooden Tongs"); | ||
add(HotOrNot.IRON_TONGS.get(), "Iron Tongs"); | ||
add(HotOrNot.MITTS.get(), "Mitts"); | ||
add("tooltip.hon.cold", "This Item feels Cold to the touch"); | ||
add("tooltip.hon.hot", "This Item feels Hot to the touch"); | ||
add("tooltip.hon.protectivegear", "This Item protects from negative effect from hot/cold items, put in offhand to use"); | ||
add("item_group.hon.hon", "Hot Or Not Tab"); | ||
} | ||
} |
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,37 @@ | ||
package com.kitp13.hon.datagen; | ||
|
||
import com.kitp13.hon.HotOrNot; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.recipes.FinishedRecipe; | ||
import net.minecraft.data.recipes.RecipeCategory; | ||
import net.minecraft.data.recipes.RecipeProvider; | ||
import net.minecraft.data.recipes.ShapedRecipeBuilder; | ||
import net.minecraft.world.item.Items; | ||
import net.minecraftforge.common.crafting.conditions.IConditionBuilder; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.function.Consumer; | ||
|
||
public class Recipes extends RecipeProvider implements IConditionBuilder { | ||
public Recipes(PackOutput p_248933_) { | ||
super(p_248933_); | ||
} | ||
|
||
@Override | ||
protected void buildRecipes(@NotNull Consumer<FinishedRecipe> consumer) { | ||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, HotOrNot.MITTS.get()) | ||
.pattern("LLL") | ||
.pattern(" LL") | ||
.pattern("LLL") | ||
.define('L', Items.LEATHER) | ||
.unlockedBy(getHasName(Items.LEATHER),has(Items.LEATHER)).save(consumer); | ||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, HotOrNot.WOODEN_TONGS.get()) | ||
.pattern("S S").pattern("S S").pattern(" S ") | ||
.define('S', Items.STICK) | ||
.unlockedBy(getHasName(Items.STICK),has(Items.STICK)).save(consumer); | ||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, HotOrNot.IRON_TONGS.get()) | ||
.pattern("I I").pattern("I I").pattern(" I ") | ||
.define('I', Items.IRON_INGOT) | ||
.unlockedBy(getHasName(Items.IRON_INGOT),has(Items.IRON_INGOT)).save(consumer); | ||
} | ||
} |