Jump to content

Torojima

Forge Modder
  • Posts

    157
  • Joined

  • Last visited

Everything posted by Torojima

  1. my main mod class starts like this: @Mod(BuildHelperMod.MODID) public class BuildHelperMod { .... that should register the modid correctly, or not? The static MODID in the main class is only for using the name everywhere with only one position to define the string.
  2. My recipes are creating a parsing error. For example: 19:21:07.311 game [19:21:07] [Render thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe buildhelper:arrowwand_item 19:21:07.311 game com.google.gson.JsonSyntaxException: Unknown item 'buildhelper:arrowwand_item' I have just updated my mod from 1.18.2 to 1.19.2. Thus the asset files are still as they had been used in 1.18.2. My my recipe file with path/file name: resources/data/buildhelper/recipes/arrowwand_item.json has this content: { "type": "crafting_shaped", "pattern": [ " B", " - ", "D " ], "key": { "B":{ "item": "minecraft:bow" }, "-":{ "tag": "forge:rods/wooden" }, "D": { "item": "minecraft:diamond" } }, "result": { "item": "buildhelper:arrowwand_item" } } the item is registered like this: @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public void register(RegisterEvent registerEvent) { registerEvent.register(ForgeRegistries.Keys.ITEMS, helper -> { helper.register(new ResourceLocation(MODID, ItemArrowWand.NAME), new ItemArrowWand(new Item.Properties().stacksTo(1).tab(CreativeModeTab.TAB_TOOLS))); // -- snip -- more lines for all the other wands registred the same way } ); LOGGER.info("Torojima's Buildhelper Items registered."); } } MODID is public static final String MODID = "buildhelper"; in the mod main class, and the registered name is public static final String NAME = "arrowwand_item"; from the item class ... I have a number of items with similar recipe files and registries ... all with the same error. I'm at a loss where the mismatch is happening
  3. I am trying to implement conditional recipes and therefore would like to create a class implementing IRecipeFactory. But in the latest forge I can not find this interface anymore. Any pointers where it went? Or if it is not present any more if and how it has been replaced?
  4. That would be what I have in mind I haven't found anything regarding this in the docs. Do you have some pointers where I can find out how to do this?
  5. really? yes, recipes are only in existence when the json file is created. What I have done is creating json files for recipes. This should be the default. But I want to give the users the opportunity to disable the recipes by a config file entry... anyway ...
  6. is there a way to disable recipes of mod items? Thus having a boolean (that ultimately can be stored in the mods config) that will decide if an items recipe will be enabled. I was thinking of making certain items of my mod only available in creative or by directly creating it instead of creating it by crafting.
  7. Thank you the property override works perfectly and after I recognised the models subfolder is called "item" instead of "items" like all the other subfolders, also the model json files have been found
  8. I am still convinced a book is much better in the long run than any video. in a book you can mark pages with postits for later reference stop and exercise the learned yourself jump back and forth to your hearts content in seconds have the book next to your computer and using the monitor to actually doing what is described in the book reading it offline, for example sitting in the garden (ok, not very good right now in middle of Europe ) Videos are good for collecting a first impression, but in my experience, you'll need more than that. For example ... a book... If you don't want to pay the full price, buy a used book (rebuy.de, booklooker.de or ebay.de). Still I think you'll find many good books in your local library (they still a think in Germany, they are fully governmental subsidised and you will find a lot of good books, not only for programming, but everything else, including fiction.... read a book!). Last, but not least, if you can buy a computer, you can buy a book for 20 bucks. Invest in your future... I like the "Head First" approach, so look for "Head First Java" or in German "Java von Kopf bis Fuß". You will get it on amazon.de in the used section for 20 bucks ...
  9. oh, of course, I didn't think of that!! And aaargh, it changed from wood to wooden
  10. My daughter (12) is using scratch to program a little cozmo robot and the Lego robotics system ... Everybody is hyping this scratch stuff over the horizon ... I am not convinced it is much more than a toy. It will give some rather shallow insights into programming, but will not teach anything about programming structures. Neither functional, nor object oriented ... Yes, it is possible to create some impressive stuff using scratch. I have seen a complete PID controller programmed in scratch, holding a Lego Robot on two wheels in the upright position. The script is completely mind bending, but it can be done. Nevertheless, the ppl doing that have used their deep understanding of programming and PID controllers received before playing with scratch, to do so @Draco18s Hehe, your analogy is splendid, I love it Edit.: second life is still a thing? I thought it died a well deserved death ages ago?
  11. indeed, the link is for buying a book. There are other books and I have merely linked the first one I came across ... You could also went to the local Library and read one for free ... Yes there are as well free Java tutorials in the world wide web ... I am very confused you have not searched for them yourself at this point?!
  12. btw, now that you've mentioned this, I think I had put the logoFile entry at first also beneath the [[mod]] entry and was puzzled why id didn't work. Only then I checked with the forge mods.toml (I am trying to remember why I have checked with the forge mods.toml in the first place) ... This actually could be a bug in the example mod ...
  13. @Drachenbauer I think you have to start with something like this: https://www.amazon.de/Programmieren-lernen-mit-Java-Programmieranfänger/dp/3836256053/ref=sr_1_4?keywords=java+kurs&qid=1552152714&s=gateway&sr=8-4 I presume from your nick and your posts, you're more familiar with German than English ... (no, I won't get any bonus from other ppl clicking on the link) Modding is not just clicking some bits of code together copied (aka stolen) from other ppl, but intrinsic understanding programming as a craft. If you do not, you will not be successful with any kind of more sophisticated mod. This does not imply by any means others will not help you with their code samples. Just check one of the threads I had started earlier in this forum where I've discussed torch placement. There another modder basically told me "I am doing it like this" in two lines of code. I checked what the lines are doing, converted to my needs and implemented them into my code. My code is openly available on gitHub, like so many other mods sources. I encourage everybody to check it out and learn from it, like I like to read other modders codes to better understand what's going on. But I would not plainly copy their code, nor would I be very happy when other ppl are coping my code... So, your course of action would be - learn programming - learn Java - understand forge (at least a bit, I still are puzzled about it every now and then ;D) - start modding
  14. In 1.12.x there had been an minecraft vanilla class ItemMeshDefinition to define variable render icons based on whatever decision made in a method getModelLocation. This could be registered in public void onRegisterModels(ModelRegistryEvent event) using ModelBakery.registerItemVariants and ModelLoader.setCustomMeshDefinition. ItemMeshDefinition is no longer present in the Minecraft source and I don't think it's just a name change. I didn't find any respective class in the mc source. So, my question is how to create items with variable icons in 1.13.2? Does anybody has a pointer towards a respective doc or tutorial?
  15. Makes sense because I now are using stuff like "tag": "forge:nuggets/gold" and "tag": "forge:ingots/gold" instead of formerly "type": "forge:ore_dict","ore": "nuggetGold" and "type": "forge:ore_dict","ore": "ingotGold" this is working well of course But what I haven't found yet is a substitute for "type": "forge:ore_dict", "ore": "treeSapling", or "type": "forge:ore_dict","ore": "stickWood" so my mod would be able to use all other mods stick or sapling derivatives. I fell back to the minecraft vanilla "item": "minecraft:stick" and "tag": "minecraft:saplings". But now users can only use the vanilla items for the recipes obviously The "tag": "forge:stick/wood" didn't do the trick... Is there a list of available forge tags to use. Since you (@Choonster) mentioned the forge oredict items are now probably available as tags, I would like to use them.
  16. thank you iuc.getWorld().setBlockState(torchPos, Blocks.WALL_TORCH.getDefaultState().with(BlockHorizontal.HORIZONTAL_FACING, iuc.getFace())); now does the trick
  17. I had the same problem. Can't for the life of me find the thread I had opened for this. So I don't know who from the forge guys exactly had answered. The fix is to update the JDK (not only the JRE, which is the default when updating). Go to Oracle, download the latest JDK and install. Then try to run gradlew again. This should do the trick. Edit: answered a quarter of a year old thread ... sorry ... but I had exactly this problem just a few days back ...
  18. only difference I see is the logo entry in mods.toml is before the [[mods]] tag: logoFile="buildhelper_icon.png" [[mods]] but that should not be an issue (it is above this tag for the forge mods.toml itself as well). You should give it a try... other than that, maybe the logo is to large? But I don't recall there is a limit for the logo, maybe the forge guys can elaborate on that ... Do the other entries from the mods.toml file show up correctly? (name and version?) last but not least, have a look onto my gitHub and use it as an example, as mentioned, my logo does show up in the mods list
  19. works in my mod. Without the actual folder structure and place of the image file (screen-shot or better gitHub source) and the actual mods.toml file (copy here or gitHub source). Helping you will be quiet difficult ...
  20. I'm trying to place a torch at the side of a block with limited success. See the complete class here: https://github.com/ArnoSaxena/buildhelper/blob/master/src/main/java/torojima/buildhelper/common/item/ItemTorchWand.java in the public EnumActionResult onItemUse(ItemUseContext iuc) method I have changed the placing code to this using the WALL_TORCH in case I want to place the torch at a wall instead of the bottom of the selected position (not yet checked in to gitHub). pos is the block clicked at, while torchPos is the calculated position in regards of the clicked on side of the target block. if (isWallTorch) { iuc.getWorld().setBlockState(torchPos, Blocks.WALL_TORCH.getStateForPlacement(Blocks.WALL_TORCH.getDefaultState(), iuc.getFace(), iuc.getWorld().getBlockState(pos), iuc.getWorld(), torchPos, pos, iuc.getPlayer().getActiveHand())); } else { iuc.getWorld().setBlockState(torchPos, Blocks.TORCH.getStateForPlacement(Blocks.TORCH.getDefaultState(), iuc.getFace(), iuc.getWorld().getBlockState(pos), iuc.getWorld(), torchPos, pos, iuc.getPlayer().getActiveHand())); } Now this will have the strange effect the placed WALL_TORCH will always be placed in the same direction, even if this means it will be placed onto an air block. Additionally, if the NORTH face of a block is clicked, with two air blocks in front, the torch will not be set at all... So, my question is, when a WALL_TORCH should be placed how to set the facing direction for it?
  21. yeah, the links are not really helping me, I know them already and my json syntax is good... Edit: but it probably will help whoever is surfing in from somewhere reading this question Anyway, the package net.minecraftforge.oredict has been removed from forge?! That's the reason the old entries are no longer valid. I've changed them all to minecraft items (except a few tags using the forge versions for the metal parts) and now it works. Thus the correct answer would be to use the minecraft items in the recipes in 1.13.x since forge oredict is no longer available.
  22. The recipes of my mod as used in 1.12.x are not working in 1.13.2. the recipes are for example the error message I am receiving for this recipe is How should I use the ingredient type in 1.13.2?
  23. - Xaeros stuff definitely the first. - Second Forestry, Botania and Natura (MC fauna is just so boring without and I love my beehives). - Third would be MCA. I can't stand the look of the vanilla villagers. And I like the MCA villagers can deliver a punch and keep themselves save from those mobs running around. - Finally Visecraft (me needs to be airborne :D) and my own mods
  24. jep, all there. .jar installer and universal are working fine on a Mac. MDK as well. At least until forge-1.12.2-14.23.1.2554-mdk. I have been to lazy to install the latest version But I doubt newer versions will give you any problems.
×
×
  • Create New...

Important Information

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