
skip999
Members-
Posts
140 -
Joined
-
Last visited
Everything posted by skip999
-
Okay so I have made the changes you recommended plus a few more, but to no avail. I can't get anything from the log, and it looks like the write() method in the serializer nor the read() methods are even called. The links are the same as before, and I have attached the latest log as well. latest.log
-
Hello, I have been working on a custom recipe class. As part of this recipe, I needed to read fluids from a JSON file, and had to write a custom handler to deal with this since there doesn't appear to be one (as with Ingredient for example). As far as I can tell, it works perfectly. It reads the recipe correctly from the JSON file. However, I'm not sure if I have done my PacketBuffer read and write methods correctly for my FluidIngredient class. The reason I say this is because when trying to run JEI, I get the following error in the log: [20:48:05] [Render thread/FATAL]: Error executing task on Client java.lang.NullPointerException: null I know this has to be the issue, because when I disable the custom recipe from being serialized, JEI runs fine and the error disappears. I have attached the full log below, and have also given links to the relevant classes. In this case, they are FluidItem2FluidRecipeSerializer and FluidIngredient. FluidItem2FluidRecipeSerializer: https://github.com/skiprocks999/ElectrodynamcisExperimental/blob/main/src/main/java/electrodynamics/common/recipe/categories/fluiditem2fluid/FluidItem2FluidRecipeSerializer.java FluidIngredient: https://github.com/skiprocks999/ElectrodynamcisExperimental/blob/main/src/main/java/electrodynamics/common/recipe/recipeutils/FluidIngredient.java This is new ground for me in terms of modding, so I imagine the mistake will be easy to spot. latest.log
-
Hello, I have been working on some custom recipe types and have gotten stuck when handling fluids. I need some guidance on which classes I need to be using when working with fluids. I know Fluidstack is the corresponding class for ItemStack, but that's about it. In all, I have these questions: What would the fluid variant of Ingredient be? How should I go about overriding the methods public ItemStack getCraftingResult(RecipeWrapper inv) and public ItemStack getRecipeOutput() in my Recipe class? How should I structure my JSON objects for reading? I can assume it would be something like what I have put below. For a fluid input: (1000 mb of water as an example) "fluidInput":{ "fluid":"forge:fluids/water", "amount":1000 } For a fluid output: (water as an example) "fluidOutput":{ "fluid":"forge:fluids/water", "amount":1000 } Thanks for the help!
-
Okay so I did some digging and finally found this forum post here: I have fixed the issue and now my recipes are compiling. Thanks for the help none the less!
-
Okay so I realized the issue there: I was trying to downcast in Java like a moron. I have solved this issue, and I am still getting the error in the log. I have confirmed that the recipes are being read properly by the serializer, and that the correct Recipe types are being created. However, the same error is still being thrown, and I don't know why. I have attached the latest log, and I have provided links to the relevant classes. Recipe Serializer Init : https://github.com/skiprocks999/ElectrodynamcisExperimental/blob/main/src/main/java/electrodynamics/common/recipe/ElectrodynamicsRecipeSerializer.java Recipe Serializer: https://github.com/skiprocks999/ElectrodynamcisExperimental/blob/main/src/main/java/electrodynamics/common/recipe/categories/o2o/O2ORecipeSerializer.java Recipe Categories: https://github.com/skiprocks999/ElectrodynamcisExperimental/tree/main/src/main/java/electrodynamics/common/recipe/categories/o2o/specificmachines Ignore the same two classes as before. The JSON files haven't moved, but for the sake of ease of access, can be found here: https://github.com/skiprocks999/ElectrodynamcisExperimental/tree/main/src/main/resources/data/electrodynamics/recipes/o2o latest.log
-
I suppose I should change the name of "ElectrodynamicsRecipeSerializer" to something else; that's a bad choice on my part. Did you look at this class here: https://github.com/skiprocks999/ElectrodynamcisExperimental/blob/main/src/main/java/electrodynamics/common/recipe/categories/o2o/O2ORecipeSerializer.java
-
Hello, I am attempting to standardize some recipe types for a mod that I am working on improving. To keep a long story short, I am attempting to unify it's recipe system and ultimately integrate it into the Forge system**. However, this has lead me to an interesting predicament. Currently, I have three separate recipe classes that I am attempting to set up. They all take the same shape in their JSON file, but are for 3 separate machines. As a result, I would like to use the same Serializer for all three since they all use the same read and write methods. I attempted to use wildcards to solve the Class type specification that RecipeSerializers have, but it results in the following error when I attempt to load a world: java.util.concurrent.ExecutionException: java.lang.NullPointerException: null key in entry The most I am able to find online about this issue is about general HashMaps, but nothing in relation to Forge. Currently I am just trying to get the Serializer to work so I can get the others ready as well. I have attached a link to the recipe JSONs as well as the location of the Recipe Classes on Github. I have also attached the full log regarding the crash. Any and all help would be appreciated Recipe JSONS: https://github.com/skiprocks999/ElectrodynamcisExperimental/tree/main/src/main/resources/data/electrodynamics/recipes/o2o Recipe Classes*: https://github.com/skiprocks999/ElectrodynamcisExperimental/tree/main/src/main/java/electrodynamics/common/recipe *Please ignore the "MachineRecipes" and "RecipeManager" classes. These are part of the existing recipe system for the mod and are having no effect on the problem. **Don't ask me why it was written the way it is to start with; I don't know either. latest.log
-
I did some playing around, and I understand by what you're saying now.
-
I think I might be explaining myself poorly. I know how to do that. The problem is that when I do that, I can only have one folder inside the \recipes directory e.g. \recipes\mineralcrusher . What I want to do is something along the lines of \recipes\o2o\mineralcrusher. I'm not sure how to do that.
-
By custom recipe I mean the recipe categories for the machines. I suppose I should have explained that better.
-
It's mainly for organizational purposes, to keep the code easier to read. I'm not doing anything with the vanilla crafting table recipes or furnace recipes.
-
Hello, I have been working on a mod's custom recipe system and need a bit of help with the resource location for the recipes. I would like to do a system like I have illustrated in the picture attached. The general category would house several various sub categories for specific machine recipes. I know how to have a single folder within the recipes directory. However, I am not quite sure how to do this, and I can't seem to turn anything up on google. If anyone could help me out with this, I would appreciate it.
-
Hello, I have been preparing to do some extensive work on a mod's custom recipe system. Currently, it uses a Hashmap system where recipes are defined and stored directly within a class. I plan to switch it to use JSON storage for recipes as has been traditionally done. However, upon reviewing a few mods Githubs, I have seen it both ways. Which way is recommended to use? I was under the impression that the JSON method is superior, yet now I am not so certain. Before I go tearing things apart, I would like to get some feedback from people more experienced with this sort of thing. Thanks for your feedback!
-
Obtaining a list of every vanilla item in the game
skip999 replied to skip999's topic in Modder Support
That did it thanks! -
Hello, I was wondering how I would obtain a list of every Vanilla item in the game. I know you can call individual items by using Items. , but as far as I can see there is no way to call all of them at once.
-
Hello, I would like to use vanilla Iron Ore in one of my classes. Specifically, I want to call the Block itself. However, all of the tutorials on how to do this are outdated and I can't find anything probing around in the ForgeRegistries class nor in the Materials class. How would I go about doing this?
-
I'm on Forge 1.16.5 1.0
-
The methods don't appear when I call Ingredient.fromItems() or Ingredient.fromStacks(). Did the names change?
-
Hello, How would I go about converting an ItemStack to an Ingredient? I can't seem to find any documentation on it and I can't turn up anything with searching through the ingredient classes.
-
Hello, I would like to include someone's mod in my external dependencies library, but the mod doesn't have a maven for me to import from in my gradle. How would I go about including it? Would I just add a jar of the mod?
-
I found the issue: there was apparently a conflict with Endless Oceans that happens server-side that does not occur on the client. Not sure what it is, but I'll report it to the author.
-
Hello, I have been attempting to set up a modded server running Forge v35.1.37. I have noticed several odd things. Firstly, the traditional "gui" aka the default console that launching the server normally produces does not appear. While inconvenient, I have worked around this using the cmd prompt. Also, when the loader reaches world generation, it throws a nullpointerexpection and just stops. There is no crash log which is also strange. I have attached the latest.log to this post, and have created a gist of the debug.log here: https://gist.github.com/skiprocks999/2498a7a7781bf058a35ae98783af417b. The error I am refer incing is found at the bottom of the latest.log file, but I have also attached a screenshot of it as well. Normally I am semi-decent at deciphering logs, but this this one has me stumped. IK java just released v 16 not to long ago, so it might be an issue with that. latest.log
-
That fixed it. Thanks for the help!
-
Okay so I have put together something and it seems to work. However, I seem to be having an issue with the gui. I followed your plugin implementation as best I could, and I have wound up with the cursed image I have attached. The items are showing up where I want them to be, however I cannot seem to get the background to work. I have linked to the relevant files on my github. The only thing I can think of is that there is an issue with the size of the image that I am not considering. https://github.com/skiprocks999/Rings-of-Infinity/tree/Rings-Of-Infinity-1.16.4/RingsOfInfinity/src/main/java/com/contInf/ringsOfInfinity/jeiPlugin (Please ignore the name I haven't done the lang file yet)
-
Sending server data to the client for rendering
skip999 replied to skip999's topic in Modder Support
Okay so I have run into a slight issue: the NBT system does not support writing a list to the NBT file. How would I deal with this? My first thought is to convert the beam List to a string in write() and then convert the string back into an List in read(). However, this seems rather complicated and inefficient. Is there a simpler way I'm missing?