Jump to content

badkraft

Members
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    2

badkraft last won the day on February 3 2023

badkraft had the most liked content!

1 Follower

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

99787 profile views

badkraft's Achievements

Creeper Killer

Creeper Killer (4/8)

3

Reputation

  1. It's great when all we get is a link that doesn't tell us how to implement something. Great question, though. I've got the same problem trying to figure out how to get the ingredient count. "ingredients": [ { "item": "foundations:rough_stone_rock", "count": 4 } ] So I wrote a method called from `fromJson(...)`. Iterating the public MasonryBenchRecipe fromJson(ResourceLocation containerId, JsonObject json) { JsonArray ingredients = GsonHelper.getAsJsonArray(json, "ingredients"); NonNullList<Ingredient> inputs = NonNullList.withSize(ingredients.size(), Ingredient.EMPTY); for (int i = 0; i < ingredients.size(); ++i) { Ingredient ingredient = getIngredient(ingredients.get(i).getAsJsonObject()); inputs.set(i, ingredient); } return new MasonryBenchRecipe(containerId, output, inputs); } private Ingredient getIngredient(JsonObject json) { Ingredient ingredient = Ingredient.fromJson(json); int count = 1; if (json.getAsJsonObject().has("count")) { count = GsonHelper.getAsInt(json, "count"); } ItemStack itemStack = ingredient.getItems()[0]; itemStack.setCount(count); return ingredient; } And when the recipe initializes, now the ItemStack has a size of 4 according to the recipe.
  2. It's kind of a convoluted process unlike what was evidently available in 1.18.1. They really made a breaking change according to what Kaupenjoe demonstrated in a 1.18.1 tutorial. I created something similar to what Kaupenjoe has here. package com.badkraft.foundations.tags; import com.badkraft.foundations.Foundations; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.tags.ITag; public class ModTags { public static class Items { public static final TagKey<Item> FLINT_TOOL_MATERIALS = bind("flint_tool_materials"); public static final ITag<Item> STONE_ITEMS = createTag("stone"); public static final ITag<Item> MASONRY_ITEMS = createTag("masonry"); private static ITag<Item> createTag(String name) { return ForgeRegistries.ITEMS.tags().getTag(tag(name)); } private static TagKey<Item> tag(String name) { return ItemTags.create(new ResourceLocation(Foundations.MOD_ID, name)); } private static TagKey<Item> forgeTag(String name) { return ItemTags.create(new ResourceLocation("forge", name)); } } private static TagKey<Item> bind(String name) { return TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(name)); } }
  3. Is there a place on this forum where I can ask others to join me in developing a mod? I understand it's off-topic from Forge. So I'm wondering if it's even okay.
  4. Fixed... Used Blockbench to create the textures and exported the correct model.json.
  5. I have the block below (`clay oven`). It is supposed to be a half-height block. I'm looking for blocks in vanilla I can research that might give me a clue how to correct the rendering so the top renders where it's supposed to be and the top half of the block is transparent. Another problem I'm having with this block is that when I place it, I get the back side facing me. How do I correct that? Here is the current source (pretty basic at this point): Side note: `getShape` is deprecated. What are we supposed to use? Campfire is using this method override.
  6. My configured feature was wrong. I had the wrong block as the provider (state). It's working now.
  7. After a couple of weeks thinking about this while on the road, I'm going to replace the standard clay block in generation with mine. You'll still be able to craft the `minecraft:clay` but it won't generate. Later, I'll upgrade generation with a structure. That will allow multiple block types. I'm going to stick with 1.18.2 until I get Foundations where I want it. By then, around 1.21, 1.22 or 1.25, I'll update. I just can't see doing all this work for every version. If I'm always updating to a new version, I can't actually create features.
  8. It's easier at this point just to modify the clay loot table. I've not seen enough in 1.19.x to make that leap. I've still got a long way to go with this.
  9. I began wondering the same - if there was a file missing or something. I kind of did the same as you, removing `minecraft:clay` from the disk_clay feature and that doesn't make a difference. It's like the feature is being ignored altogether. I'm going to work around the problem in a 2-step process. I really want to be able to modify the biome. remove all the custom `river.json`, etc. from my mod with just the modified configured/placed feature in the minecraft/data folder; or, modify the `minecraft:clay` loot table to drop my custom item
  10. Yeah, I've tried that. When I paste the link and click `Insert Into Post`, the button acts like it's disabled. I'm going to add my json files in the previous post. It's usually some kind of little detail - like using `minecraft:` instead of my mod name.
  11. He's actually got a mistake in the video. It's relatively minor, though. But as far as accuracy, no one really tells you what to do to include biome modifications, configured/placed features, etc. You never get all the information in one place. Developers are the world's most ineffective documenters (I know because I am one) ... This is what I've done so far... First using Data Pack Generators created a project and organized like mod directory structure. Second, I created a custom `configured_feature/disk_clay` and `placed_feature/disk_clay` for the `minecraft:river` biome to reference. But I have more planned changes to the river biome (and others). So, I copied minecraft `river.json`, place that in the `foundations/data/worldgen/biome/` directory. To have minecraft reference the biome, I overrode the default `minecraft/data/dimension/overworld.json`. Where ever I found `minecraft:river` in overworld.json, I replaced with `foundations:river`. The clay is still just minecraft:clay ... not foundations:clay_block. See screen shot. So, I don't know what is keeping my clay blocks from being in the feature. See directory structure. There are 8 entries in `minecraft/dimension/overworld.json` where we can find `foundations:river`. The file is huge so I'm only including one of the biome entries... `foundations/worldgen/biome/river.json` See entry near the bottom of the features list. `foundations/worldgen/configured_feature/disk_clay.json` And finally, `foundations/worldgen/placed_feature/disk_clay.json` P.S. -- how come I can insert image links from imgur?
  12. Ok... I'm not getting anything helpful in the directories. I've looked in the 1.18.2 since that's the version I'm working from. Image insert isn't working so here is my directory structure. I'll just start putting my modified .json files in ... let me see - ./data/modid/worldgen/ biome placedfeature etc.
  13. Are these files in minecraft data? If so, where? But, spot on. That's what I was hoping for. Thanks!
  14. I'm researching the how to create biomes in json. There is a great tool for creating the jsons online. Using the vanilla `river` biome, I want to essentially create a custom disk feature that mixes 3 blocks instead of a single-block provider. Any ideas on where to start with that?
  15. I figured out what was wrong ... you can spot it pretty quick most likely: { "type": "minecraft:smelting", "ingredient": { "item": "minecraft:gold_nugget_ore" }, "result": "minecraft:gold_nugget", "experience": 0.25, "cookingtime": 150 } ... so, after changing `minecraft` to `foundations` for all the custom items and all the recipes work. Well that's what copy/paste will get you. One last question about recipes, though. What does the following json key/value do in the game? "group": "copper_ingot"
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.