diff --git a/README.md b/README.md index 427c3957..0982844e 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ - Figure out model and loot table datagen for this block (SnowLayerBlock), might have to just roll with manually written json files to start off with - [X] Refinement processes - [X] Textures - - [ ] Data driven recipe and serializer + - [X] Data driven recipe and serializer - [ ] Create compat. - [ ] Mixing recipe for flour to dough (might already work with the item tags) - [ ] Compat with fluid tank-like containers in the bucket slot - - [ ] Can be heated from the bottom (PneumaticCraft Compat) + - [ ] Can be heated from the bottom (possible PneumaticCraft Compat?) - [ ] Speed can be accelerated from external heat sources - Needs to be done still: - - [ ] Redirect recipes with custom json names to the breadmod folder instead of the minecraft folder\ - - [ ] Sort recipe types into their own folders (ex. mixing, smithing, block compaction and decompaction) + - [X] Redirect recipes with custom json names to the breadmod folder instead of the minecraft folder + - [X] Sort recipe types into their own folders (ex. mixing, smithing, block compaction and decompaction) - [ ] Textures for tools, weapons, items, blocks - would be funny if the bread sword was just a long piece of bread attached to a sword handle - [ ] Fix mixins not loading on built mod file @@ -82,8 +82,8 @@ Todo.. - [ ] Farmers Delight - [ ] ProjectE - [ ] Add EMC to items - - [ ] Potential Bread-like EMC holder - - [ ] Make texture for item + - [X] Potential Bread-like EMC holder + - [X] Make texture for item - [ ] Create - [ ] Create recipe generators for the other recipe types - [ ] Mekanism diff --git a/src/main/kotlin/breadmod/datagen/ModRecipeProvider.kt b/src/main/kotlin/breadmod/datagen/ModRecipeProvider.kt index ff0f28fd..59276c2e 100644 --- a/src/main/kotlin/breadmod/datagen/ModRecipeProvider.kt +++ b/src/main/kotlin/breadmod/datagen/ModRecipeProvider.kt @@ -11,6 +11,8 @@ import mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess import mekanism.common.registries.MekanismItems import net.minecraft.data.PackOutput import net.minecraft.data.recipes.* +import net.minecraft.resources.ResourceLocation +import net.minecraft.world.item.Item import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items import net.minecraft.world.item.crafting.Ingredient @@ -20,6 +22,29 @@ import net.minecraftforge.fml.ModList import java.util.function.Consumer class ModRecipeProvider(pOutput: PackOutput) : RecipeProvider(pOutput) { + + + // TODO refactor existing smithing recipes to use this function instead + // TODO create simplified 3x3 and 2x2 item to block recipes from the functions in RecipeProvider + // TODO crafting recipes for the bread armor + private fun modNetheriteSmithing( + pFinishedRecipeConsumer: Consumer, + pRecipeLocation: ResourceLocation, + pIngredient: Item, + pResult: Item, + pCategory: RecipeCategory, + pUnlockItem: Item + ) { + SmithingTransformRecipeBuilder.smithing( + Ingredient.of(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), + Ingredient.of(pIngredient), + Ingredient.of(Items.NETHERITE_INGOT), + pCategory, + pResult + ).unlocks("has_item", has(pUnlockItem)) + .save(pFinishedRecipeConsumer, pRecipeLocation) + } + override fun buildRecipes(pWriter: Consumer) { ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.BREAD_BLOCK.get()) .unlockedBy("has_item", has(Items.BREAD)) @@ -187,6 +212,13 @@ class ModRecipeProvider(pOutput: PackOutput) : RecipeProvider(pOutput) { .unlocks("has_item", has(ModItems.BREAD_SHOVEL.get())) .save(pWriter, modLocation("smithing", "reinforced_bread_shovel_smithing")) + modNetheriteSmithing(pWriter, + modLocation("smithing", "reinforced_bread_helmet_smithing"), + ModItems.BREAD_HELMET.get(), + ModItems.RF_BREAD_HELMET.get(), + RecipeCategory.COMBAT, + ModItems.BREAD_HELMET.get()) + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.BREAD_SHOVEL.get(), 1) .unlockedBy("has_item", has(ModBlocks.BREAD_BLOCK.get())) .define('B', ModBlocks.BREAD_BLOCK.get()) diff --git a/src/main/kotlin/breadmod/datagen/lang/USEnglishLanguageProvider.kt b/src/main/kotlin/breadmod/datagen/lang/USEnglishLanguageProvider.kt index 52aadfb1..a488c7c4 100644 --- a/src/main/kotlin/breadmod/datagen/lang/USEnglishLanguageProvider.kt +++ b/src/main/kotlin/breadmod/datagen/lang/USEnglishLanguageProvider.kt @@ -53,7 +53,7 @@ class USEnglishLanguageProvider(output: PackOutput, modID: String, locale: Strin add(ModBlocks.KEYBOARD.get()) modAdd( - "The Bread Mod", + "Bread Mod", "itemGroup", "main" ) diff --git a/src/main/kotlin/breadmod/item/armor/ArmorTiers.kt b/src/main/kotlin/breadmod/item/armor/ArmorTiers.kt index 89cad957..7ba1c4dc 100644 --- a/src/main/kotlin/breadmod/item/armor/ArmorTiers.kt +++ b/src/main/kotlin/breadmod/item/armor/ArmorTiers.kt @@ -20,7 +20,9 @@ enum class ArmorTiers( BREAD( durabilityMultiplier = 50, enchantmentValue = 20, knockbackResistance = 0f, toughness = 0f, defense = listOf(2,3,4,2), repairIngredient = Ingredient.of(Items.BREAD), equipSoundEvent = SoundEvents.GRASS_PLACE, - ); + ), + RF_BREAD(durabilityMultiplier = 80, enchantmentValue = 35, knockbackResistance = 0.5f, toughness = 1f, + defense = listOf(4,6,8,4), repairIngredient = Ingredient.of(Items.NETHERITE_INGOT), equipSoundEvent = SoundEvents.ARMOR_EQUIP_NETHERITE); private val durabilityForSlot = listOf(13,15,16,11) diff --git a/src/main/kotlin/breadmod/registry/item/ModItems.kt b/src/main/kotlin/breadmod/registry/item/ModItems.kt index 849b8895..623018b3 100644 --- a/src/main/kotlin/breadmod/registry/item/ModItems.kt +++ b/src/main/kotlin/breadmod/registry/item/ModItems.kt @@ -6,6 +6,7 @@ import breadmod.registry.sound.ModSounds import breadmod.item.DopedBreadItem import breadmod.item.TestBreadItem import breadmod.item.UltimateBreadItem +import breadmod.item.armor.ArmorTiers import breadmod.item.armor.BreadArmorItem import breadmod.item.tools.BreadShieldItem import breadmod.item.tools.ToolTiers @@ -75,6 +76,16 @@ object ModItems { ) = pOutput.accept(this.defaultInstance.also { it.setColor(BREAD_COLOR) }) } } + // Reinforced Armor + val RF_BREAD_HELMET: RegistryObject = deferredRegister.register("reinforced_bread_helmet") { + ArmorItem(ArmorTiers.RF_BREAD, ArmorItem.Type.HELMET, Item.Properties()) } + val RF_BREAD_CHESTPLATE: RegistryObject = deferredRegister.register("reinforced_bread_chestplate") { + ArmorItem(ArmorTiers.RF_BREAD, ArmorItem.Type.CHESTPLATE, Item.Properties()) } + val RF_BREAD_LEGGINGS: RegistryObject = deferredRegister.register("reinforced_bread_leggings") { + ArmorItem(ArmorTiers.RF_BREAD, ArmorItem.Type.LEGGINGS, Item.Properties()) } + val RF_BREAD_BOOTS: RegistryObject = deferredRegister.register("reinforced_bread_boots") { + ArmorItem(ArmorTiers.RF_BREAD, ArmorItem.Type.BOOTS, Item.Properties()) } + // Tools // Speed modifier slows down the tool based on how much of a negative value you give it (Maybe it's a multiplier?) val BREAD_PICKAXE: RegistryObject = deferredRegister.register("bread_pickaxe") { PickaxeItem(ToolTiers.BREAD,1,-2.5f, Item.Properties()) } diff --git a/src/main/kotlin/breadmod/registry/screen/ModCreativeTabs.kt b/src/main/kotlin/breadmod/registry/screen/ModCreativeTabs.kt index afde6974..d497f38d 100644 --- a/src/main/kotlin/breadmod/registry/screen/ModCreativeTabs.kt +++ b/src/main/kotlin/breadmod/registry/screen/ModCreativeTabs.kt @@ -15,7 +15,7 @@ object ModCreativeTabs { @Suppress("unused") val MAIN_TAB: RegistryObject = deferredRegister.register("main_tab") { CreativeModeTab.builder() - .withSearchBar(60) + .withSearchBar() .title(modTranslatable("itemGroup", "main")) .displayItems { pParameters, pOutput -> pOutput.acceptAll(ModItems.deferredRegister.entries.filter { diff --git a/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_1.png b/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_1.png new file mode 100644 index 00000000..e80e3fec Binary files /dev/null and b/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_1.png differ diff --git a/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_2.png b/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_2.png new file mode 100644 index 00000000..c782e9e5 Binary files /dev/null and b/src/main/resources/assets/breadmod/textures/models/armor/rf_bread_layer_2.png differ