Jump to content

Czech

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Czech

  1. Final shameless bump to see if anyone has an answer to the last question.
  2. Brilliant, thank you! It works perfectly and I can now access all of the files through a custom IResourcePack instance (maybe even files on the web). I just have one question. Currently I load my implementation through the following call ((SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).reloadResourcePack(IResourcePack) Is this the correct way of doing it. It works perfectly, but I just want to make sure I am following the correct methods. And once again, thank you so much for that hint.
  3. Wow, totally overlooked that interface. Thank you very much for the lead!
  4. Hello, I do not normally post on the forums because almost every question I have to ask is pretty much already answered, but I am having a rather frustrating issue with the way textures are being loaded by my mod. I currently am developing alongside a graphic designer a mod which is distributed via a custom launcher to players when we release an update. Currently we have to include the textures and language assets directly in the released jar file for them to load properly in a production build (this is the norm). The reason this is a problem is because I want to be able to only send updated assets to clients instead of the entire package (which could soon exceed 40+ MB by itself). With the current system I have to send the entire packaged jar to every player every time we release an update. This is very inefficient and a total waste of good bandwidth since the mod code itself is only around 200KB. My first idea was to simply move the assets into the "mods" directory and preceed the ResourceLocation constructor's resource path (not resource domain) with the correct parent directory chain (../). However, having a ResourceLocation(ASSET_ROOT, "../../../textures/blah/blah/blah.png") to get outside of the jar file does not work. My next idea is to have our custom launcher dynamically rebuild the downloaded mod.jar file with the proper assets that are on our servers. This, however, is a major pain in the butt and I really do not want to have to implement such a complex solution for something that should be very simple. TL;DR I need a way to access textures, sounds and other resources outside of the distributed mod.jar file so that they can be dynamically updated by a custom client without having to re-download the entire jar. Does anyone have any solutions to this? If you need any more information let me know, but I feel like I am overlooking something very simple in order to get these textures loaded properly. Thank you for the long read, I know it was not the most interesting. Edit: Now that I think about it some more, I wouldn't mind using a custom resource pack, but I don't know how to access it from within my mod. I will do some research on that.
  5. I will just leave this here for all your pre-loaded texture issues: @EventHandler public void postInit(FMLPostInitializationEvent event) { /** TODO Hack to get our textures for items and blocks to show, remove when the bug is * fixed in an update. If this is not done, then the player must manually refresh * the texture packs. */ if (event.getSide() == Side.CLIENT) Minecraft.getMinecraft().refreshResources(); } Edit: As pointed out in the post below this is a bad practice and you are supposed to register it all in the pre-init event.
×
×
  • Create New...

Important Information

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