Posted October 22, 20204 yr Hi! So I'd like to add a new "type" of json file to modid/assets (EDIT: actually modid/data. Sorry). Obviously I know how to create folders and files, but how would I get my mod to read it? I've had a look at IRecipe, but I'm still not 100% sure how it gets called, etc. Edited October 22, 20204 yr by BlockyPenguin Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author Yeah, it's like more recipes, except it's information that a mod can specify about it's item, so I can't use a recipe serializer. Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author Ah ok, thank you, I'll take a look Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author So I've created something that should work, but how exactly do I register it? EDIT: Looking at other classes, I feel like I'd need to create my own registry. Am I correct? Edited October 22, 20204 yr by BlockyPenguin Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author 5 minutes ago, diesieben07 said: To register the JsonReloadListener, you simply need to register it as a resource reload listener using addReloadListener. Sorry if it's obvious, but what class does addReloadListener belong to? Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author 9 minutes ago, diesieben07 said: IReloadableReloadListener That class doesn't exist... The closest I found is IReloadableResourceManager, which eclipse can't seem to see any methods in. IReloadableResourceManager is an interface, so that would be why. What do I do? EDIT: About the shortcuts, I'll have a look at mine Edited October 22, 20204 yr by BlockyPenguin Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author So, I've found Minecraft.getInstance().getResourceManager(), which returns resourceManager which is an IReloadableResourceManager. However,it returns it as an IResourceManager, which does not have the addReloadListener method. I've also found MinecraftServer.getResourceManager(), which does return an IReloadableResourceManager. I can get it using Minecraft.getInstance().getIntegratedServer().getResourceManager(). Would this work on singleplayer though? Edited October 22, 20204 yr by BlockyPenguin Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
October 22, 20204 yr Author Ok, thank you very much! Today (22/10/20) I reached 100 posts! I'm probably more excited than I should be for something so realistically minor...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.