Jump to content

VoidCallerZ

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

VoidCallerZ's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I have a compressed variant of all vanilla tipped arrows. I followed all the code from vanilla for registering, effects etc. Now the arrows have appeared (Color still needs fixing aswell though) but the recipes don't work. Now I see vanilla has RecipeSerializer.java where the TIPPED_ARROW recipe is registered with a TippedArrowRecipe::new I have my own TippedArrowRecipe (UcTippedArrowRecipe) and I'm trying to register the recipe through UcRecipeSerializer.java, but when I do so I get the error "java.lang.IllegalStateException: Can not register to a locked registry. Modder should use Forge Register methods.". I can see I need to use Forge Register methods, but I'm not sure how to implement this properly. From looking up on Google I mostly get 1.16.x versions using IRecipe, which doesn't seem to exist in 1.18.x public interface UcRecipeSerializer<T extends Recipe<?>> extends IForgeRegistryEntry<UcRecipeSerializer<?>> { SimpleRecipeSerializer<UcTippedArrowRecipe> COMPRESSED_TIPPED_ARROW = register("crafting_special_compressed_tipped_arrow", new SimpleRecipeSerializer<>(UcTippedArrowRecipe::new)); static <S extends UcRecipeSerializer<T>, T extends Recipe<?>> S register(String pKey, S pRecipeSerializer) { return Registry.register(Registry.RECIPE_SERIALIZER, pKey, pRecipeSerializer); } } This interface is then called in UcRecipes.java which is the recipes class for datageneration. SpecialRecipeBuilder.special(UcRecipeSerializer.COMPRESSED_TIPPED_ARROW).save(consumer, "compressed_tipped_arrow"); Any help in the right direction would be appreciated! And please ask if there are any additional questions or more code is required.
  2. Then I have a follow on question, just trying that out right now. But I do also use data generation for all the jsons. Now when I place a block inside the static { } I can no longer access it in BlockStates.java or any other location. static { RegistryObject<Block> COMPRESSED_IRON_ORE = BLOCKS.register("compressed_iron_ore", () -> new Block(ORE_PROPERTIES)); RegistryObject<Item> COMPRESSED_IRON_ORE_ITEM = fromBlock(COMPRESSED_IRON_ORE); } singleTextureBlock(Registration.COMPRESSED_IRON_ORE.get(), "compressed_iron_ore", "block/compressed/ores/compressed_iron_ore"); So the singleTextureBlock can no longer find it.
  3. Hi there, I want to create a custom registry builder where it builds the RegistryObject for both the Block and the Item in one. Currently I have alot of lines, giving alot of clutter because I need to make a RegistryObject<Block> and a RegistryObject<Item> for 1 block. So I am currently looking into making 1 function/class that can create both of those in one. The only problem I'm facing is that the variables are currently "public static final" variables. So how can I do this in a class or a function? public static final RegistryObject<Block> COMPRESSED_IRON_ORE = BLOCKS.register("compressed_iron_ore", () -> new Block(ORE_PROPERTIES)); public static final RegistryObject<Item> COMPRESSED_IRON_ORE_ITEM = fromBlock(COMPRESSED_IRON_ORE); public static final RegistryObject<Block> COMPRESSED_GOLD_ORE = BLOCKS.register("compressed_gold_ore", () -> new Block(ORE_PROPERTIES)); public static final RegistryObject<Item> COMPRESSED_GOLD_ORE_ITEM = fromBlock(COMPRESSED_GOLD_ORE); public static final RegistryObject<Block> COMPRESSED_DIAMOND_ORE = BLOCKS.register("compressed_diamond_ore", () -> new Block(ORE_PROPERTIES)); public static final RegistryObject<Item> COMPRESSED_DIAMOND_ORE_ITEM = fromBlock(COMPRESSED_DIAMOND_ORE); public static final RegistryObject<Block> COMPRESSED_COPPER_ORE = BLOCKS.register("compressed_copper_ore", () -> new Block(ORE_PROPERTIES)); public static final RegistryObject<Item> COMPRESSED_COPPER_ORE_ITEM = fromBlock(COMPRESSED_COPPER_ORE); So as an example, this is 8 lines of code for 4 blocks. I would like for it to be just 4 lines. Any help is appreciated!
  4. I am creating a minecraft mod for 1.12.2 in Eclipse using Forge. I recently upgraded my Eclipse version from 2018-09 to 2019-06. The project still seems to work, but it has troubles parsing all items created in the project. This is the top part of the log (the parts below are just the other 100 or so items with the same error. I hope someone knows what I screwed up. Thanks for any help in advance! Rick
  5. Recently I reinstalled my Windows 10 due to broken windows systems. After the reinstall I reinstalled all enviromental variables as I did the first time. I also installed the same eclipse version I was using back then. Now when I opened the project, there were no problems. But when I run the mod now, all items are just not in their own tab, the tabs themselves also have no texture at all or a texture error. In the repository of the project nothing is missing and all the imports are working correctly I believe. In the attached file there is my log from Eclipse when running the mod. eclipseConsoleLogs.log Thanks for any help in advance.
  6. I've been looking into it, but I cannot really understand how to do it exactly. Do you know if there is an online tutorial on how to do it? Or is there a simpler, maybe longer way to explain it?
  7. Hey, I am working hard on a mod, making it more and more popular. But the writing of the required JSON files for every single block again is getting really annoying. Is there any, simple or difficult way to automatically get those json files generated so I don't have to constantly write them? I hope any of you have a useful answer for me, thx Rick
  8. Hey, I was wondering how I could add support of other mods in my mod with them being optional. I want to add some mods to work with my mod, but I don't want people to be forced to install many more mods. Thanks in advance Void
  9. I am using 1.12 and the part with data works for me, thank you very much ?
  10. { "type": "minecraft:crafting_shaped", "pattern": [ "LLL", "LLL", "LLL" ], "key": { "L": { "item": "minecraft:oak_log" } }, "result": { "item": "uc:compressed_oak_log", "count": 1 } } In my Json file to create a compressed oak log I want to use oak logs, but I cannot find the right naming for this block/item. I've tried minecraft;oak_log, minecraft:oak_wood and minecraft:log but none seems to work. Does anyone have any solutions to this problem?
  11. I managed to fix it myself, after trying too much things. The simple solution was: Editing the line: sourceSets{ main { output.resourcesDir = output.classesDir } } to: sourceSets{ sourceSets -> main } Because it was making duplications with that old one, and now everyhitng including textures are working perfectly fine ;)
  12. Here is my just created Github Repository with everything that I suppose is needed to be there, the other files weren't send, probably because they were somewhere in the .gitignore created by forge themselves. https://github.com/VoidCallerZ/UltimateCompression
  13. I have no idea how I have to fix this problem, I have searches down the entire internet but I couldn't find a single solution. I just don't understand how there's a duplicate entry and especially where this duplicate item is located at, because the assets folder exists multiple times in the eclipse mod workspace.
  14. duplicate entry failure.txt gradlew --stacktrace --info.txt gradlew --stacktrace --debug.txt
×
×
  • Create New...

Important Information

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