Jump to content

DiscardedMarrow

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by DiscardedMarrow

  1. I've been playing around with the new data generators and thought it would be fun to create a swedish lang file (sv_se.json). @Override protected void addTranslations() { add(Items.PITEM_ITEM.get(), "Övningsföremål"); add(Blocks.PBLOCK_BLOCK.get(), "Övningsblock"); } It ended up looking like this: { "block.justforpractice.pblock": "\u00C3\u2013vningsblock", "item.justforpractice.pitem": "\u00C3\u2013vningsf\u00C3\u00B6rem\u00C3\u00A5l" } While it should say: { "block.justforpractice.pblock": "Övningsblock", "item.justforpractice.pitem": "Övningsföremål" } I don't know much about character encoding, but it doesnt seem like I'm the one doing anything wrong. I'm tempted to post a bug report but I'm strongly considering that I just need to set some encoding settings in IntelliJ. Thank you in advance.
  2. I'm sort of against the idea of having to ask the player to install programs outside of forge and minecraft. there definitely is a way to do the conversion using java libraries as internal dependencies and thats not necessarily the problem if its simple enough. I'll look into the ffmpeg license, good idea. any problems i have from now on is probably going to be code related and as such this thread is not going to be the best place to put those problems. I think i'll figure it out now that i know i have to work around it.
  3. Thanks for the solid answer, guess I'll just have to find a workaround.
  4. Hello! I'm in a bit of a slippery area in modding and I'm asking here because I don't know where else to turn about this. I'm working on a mod that only slightly modifies certain aspects of the game (BetterVanilla) and I decided I wanted to have the background music as discs scattered in the world. The problem seems to be that music disc sound has to be in mono for the attenuation distance of jukeboxes to work so I decided to take the hashed file from the objects folder and converted it to mono through audacity. I might have misunderstood this so if I have I'd be delighted to be corrected. I feel like I'm not legally allowed to do so and won't be posting this version of the mod unless i know I'm in the legal "green zone". Does anyone have any ideas of how I could get around this issue some other way? I have looked at how to do it with straight java but it seems needlessly complicated along with how Minecraft handles SoundEvents. Any thoughts are helpful. Thanks in advance! PS: if you are wondering why this is in general, I'm mostly wondering about the legality of my actions as a modder
  5. Got it working by running "gradlew clean build" followed by "gradlew build". Kinda sucks it came down to that but I learned a lot about how forge 1.14 works.
  6. First of all, I'll pay more attention to that list before posting in the future. I'm now using ObjectHolder instead of static initializers as intended.. Problems persist, although I now have an actual crash, with an interesting log. Feels weird that it's looking for BlastingRecipeSerializer at "Lchokemonster/..", as it should just be "chokemonster/.." which might be a clue but as far as I know it could be intended to denote loading or something else. Here's how it's implemented now: @ObjectHolder(Reference.MODID) public class MiscObjects { public static final BlastingRecipeSerializer<BlastingRecipe> blasting = null; } @Mod.EventBusSubscriber(modid = Reference.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class MiscInit { @SubscribeEvent public static void onRecipeSerializerRegistry(final RegistryEvent.Register<IRecipeSerializer<?>> RecipesSerializerRegistry) { RecipesSerializerRegistry.getRegistry().registerAll( new BlastingRecipeSerializer<>(BlastingRecipe::new, 200).setRegistryName("bettervanilla", "blasting") ); } }
  7. Yes thank you I understood as much on my own. Here it is: I don't get any warnings and have run inspections on it which don't feed me with any information. It gets called only to register it:
  8. Trying to run 1.14.4 with Forge 1.14.4-28.0.45 casts NoClassDefFoundError and I don't know how to proceed. I checked through the forums but didn't find anything helpful. I've read through the Java docs and didn't find anything that could help me. I ran a code inspectionin intellij but couldn't find anything helpful there either. Here's latest.log: I've been staring at it for too long and can't figure out what I've done wrong. Jar was built using Gradle: Here's the log running client in intellij: This is why I'm confused. It runs perfectly fine in Intellij, but using the jar breaks it. Any ideas welcome, will supply more info if needed. Thanks.
  9. Very true, I'll do this for next version. I used the count in this class earlier, so I agree. It's obsolete and I'll look at it for next version. Yeah I felt safer doing it like this for now because vanilla does it and I saw another post on the forums where they used an IFactory. I agree though it would be a lot simpler if I just used the constructor.
  10. So. I made it work using IRecipeType.BLASTING and I wish I could explain it better but it's 03:23 AM and I need rest. However, I have a public git repo if anyone finds this and is curious how I did it (or wants to yell at me for doing it wrong). https://github.com/kimcodekill/BetterVanilla Thanks for your help @Draco18s & @Animefan8888
  11. Yeah I've looked around a lot and even tried just outright returning IRecipeType.CRAFTING from my recipe just to see if I got any errors that would feed me some information but no luck. I'll look around some more though, specifically at ICraftingRecipe, and see if anything clicks. Thanks Draco.
  12. Instead of extending AbstractCookingRecipe I now implement IRecipe<IInventory> but I still need to send back an IRecipeType<?> due to the implemented method "IRecipeType<?> getType()" I get a NullPointerException as I don't know what to pass through getType() (using any of the vanilla recipe types obv wouldnt work so i should pass a type for my recipe) but what it says is kind of interesting: Caused by: java.lang.NullPointerException: null key in entry: null={bettervanilla:iron_ingot_from_blasting=chokemonster.bettervanilla.recipes.BlastingRecipe@37d5d3647} It seems to be understanding that the recipe is there at least but I don't know what else to make out of this error. Here's my code for the BlastingRecipeSerializer if it helps shed some light on the situation: I've also read through the Docs for 1.13 regarding the _factories file hoping it might be necessary in some way I haven't understood yet so if it might be linked to the issue I would love to know how, or even get a clear description on how or where it should be used. Thanks.
  13. Let me make it clear (because it's not obvious) that the BlastingRecipe class I'm referring to does NOT belong to vanilla, it is custom. I'm trying to create a replacement for the vanilla BlastingRecipe class.
  14. You don't need to do this at all. I don't know what you're referring to. I don't need to avoid extending it?? Why would you want to do that in the first place. Make your own serializer and copy the relevant code So I can register it??
  15. That's what I've done yes, which isn't the issue. The issue is: And there doesn't seem to be a way to create new instances or extended instances of IRecipeType. Basically if I can't send the super I can't create an instance of BlastingRecipe which in turn means I can't instanciate BlastingRecipeSerializer. This is just telling me to avoid extending AbstractCookingRecipe so I'll try that and see where it takes me.
  16. I registered a RecipeSerializer before posting, which in hindsight i should've mentioned. I also wasn't fully clear on that I'm trying to EXTEND AbstractCookingRecipe which requires an IRecipeType to be sent from the new constructor (in BlastingRecipe) via the super constructor for AbstractCookingRecipe. So what I'm reading from your responses is basically that there's no point to extending AbstractCookingRecipe and instead, BlastingRecipe should just implement "IRecipe<IInventory>"?
  17. Forge version 1.14.4-28.0.45 Context: I'm trying to implement an override for the new vanilla block "Blast Furnace" to make it produce 2 ingots for every supplied ore block. For now I'm trying it out on a separate block but it will in the future override the vanilla block. So far the json file for the recipe has been created: Diff between this and the regular blasting recipe is the type of "bettervanilla:blasting" as well as "count". As far as I've read through the code of vanilla this requires adding a new IRecipeType as one is needed when overriding AbstractCookingRecipe (as the vanilla BlastingRecipe does): Issue: I can't seem to figure out how to register a new IRecipeType as I can't subscribe to RegistryEvent<IRecipeType<?>> My guess for this issue is that "ForgeRegistries" does not have an "IForgeRegistry<IRecipeType<?>>" variable defined, but I really shouldn't be guessing on this. I messed around with adding a registry for IRecipeType but gave up quickly as I just didn't know what I was doing. It might just be that I'm doing it all backwards. Any help is greatly appreciated, even if it's just a quick slap in the right direction. Thanks! (Will provide more information as quickly as I can if/when asked for.)
  18. Sorry! Forgot to register the tile entity, the TileEntity doesn't seem tothrow an error anymore and this topic can be closed.
  19. Hello! I have an issue with a TileEntity writing to nbt but cant quite figure out where the issue lies. Beneath is the runtime exception. I've gone through the class for this TileEntity and it seems to be as it should. Beneath is the class for the TileEntity. I would really appreciate any help or even a look at these files. Thank you in advance!
  20. nvm, seems like my containerItem is passed as null. Thanks for the help!
  21. It does work, if I hardcode it. Works: Doesn't work: But I need it to be mildly flexible, as in the containerItems being different.
  22. Okay I did that but I'm assuming you mean I should do something else in those methods than running the super. Just return true in has..() and the item to be returned in get..() ?
  23. Hello! I'm trying to create a recipe where my custom item will stay in the crafting grid and it keeps on being used up either way. Here is my class for the item: Here is the recipe: where press_item is the item that's supposed to stay of type itemphveganism.
  24. Thanks, sorry for the late response but I'll check it out!
  25. Hello, does anyone have any tips for guides that show you the ins and outs of how vanilla tile entities work? I kind of have an understanding for what I need but there are just too many methods in, for example, TileEntityFurnace + container, block and so on. Thanks in advance!
×
×
  • Create New...

Important Information

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