Jump to content

535

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by 535

  1. Nevermind, I'm an idiot. You have to install Forge into your main .minecraft folder, not the game directory. Nothing to see here, move along…
  2. I just downloaded the new Minecraft launcher and the Windows Installer for the recommended version of Forge. In the Minecraft launcher, I created a new profile with a new game directory, then launched it so that it would download the game. However, when I run the Forge installer and select the game directory I created, I get the message "The directory is missing a launcher profile. Please run the minecraft launcher first": I've double- and triple-checked that I'm really selecting the same folder in both the launcher and the installer and can run and play the game via the launcher, but I simply cannot get the installer to recognize it, even though I do see it in ~/AppData/Roaming/.minecraft/launcher_profiles.json: Can anyone offer a recommendation as to what I can try next? I'm trying to run the installer for Forge 1.12.2-14.23.5.2768 on Windows 10.
  3. No worries! The reason I had assumed it necessary is that the default location is mcp/src/minecraft/assets/etc. But, of course, that's just because mcp/src/minecraft is the real source folder, not mcp/src.
  4. I stand corrected! It's simply a matter of putting your resources in <project>/src/assets rather than <project>/src/minecraft/assets if your code is in a separate project. Therefore, an item texture named "foo:bar" in project Baz would be located at mcp/eclipse/Baz/src/assets/foo/textures/items/bar.png
  5. Hmm. It seems the problem is having your mod in a separate Eclipse project. If I move my mod's package to the Minecraft project, the textures get loaded just fine. As long as the package is in its own project, the textures won't load no matter where they're located.
  6. I'm actually calling `this.func_111206_d` from my item's constructor, but yes, that sets the string which gets used in the default `registerIcons`. If I keep running into trouble, I'll post the code.
  7. So an item with texture "foo:bar" should be located at mcp/src/minecraft/assets/foo/textures/items/bar.png? That isn't currently working for me; I'll double-check my code and see if I can get it working.
  8. I like using the run targets within Eclipse so that I don't need to wait for a full recompile when testing changes. Unfortunately, using them means I don't have a place to attach custom tasks like packaging up assets (or if it does, I don't know how). Is there a way to use unpacked assets (textures, specifically) with run targets? Failing that, is there a way to run a custom task (e.g. my packaging script) when executing a run configuration?
  9. Hmm. Player inventory seems to be handled by the entity-spawning packet, which doesn't do me much good, but it led me to NetClientHandler. I can see a lot of very interesting code there related to map data, which is handled pretty similarly to how I want my inventory to be; I'm going to see what I can do with it. Thanks for the advice!
  10. I realize that; my issue isn't determining where to save the files, but rather the whole approach to communicating an inventory between server and client which isn't based on a tile entity. My slapped-together approach doesn't work in SMP because the client tries to perform the file reading, but the server the writing. If I move it all into the server, the client never sees the contents of the inventory at all and presents an empty container. More than anything else, I'm looking for the basics of how to communicate an inventory between client and server when there's no tile entity to do the bridging (as with EE's alchemy bags).
  11. I'm adapting a mod I wrote for ModLoader 1.3 and SSP to Forge and SMP and have hit a bit of a sticking point. I use an inventory which is particular to the player rather than to a block / tile entity (a la ender chests/pouches or alchemy bags) and am having trouble reading and writing those inventories to disk in an SMP-friendly manner. I've gotten a lot of mileage out of the forum and wiki here and by following along with existing code (cpw, you're a life-saver), but I haven't been able to dig up any examples of this kind of data storage and I'm apparently not yet familiar enough with Forge and the current state of MC modding to work it out on my own. :-) Originally, when I was only worried about SSP, I wrote the Inventory class to handle reading and writing (called from the container's constructor and the inventory's closeChest, respectively) to a file located under the integrated server's save directory, and after converting that to use FML's getMinecraftServerInstance, it works just fine under Forge SSP. Under SMP, predictably, it's an absolute mess. The client crashes with a NullPointerException trying to find the save folder (no SaveHandler, so no surprise there) and the server never tries to read the inventory at all. So! Any advice? I'd be perfectly happy to just scrap my current approach, as it's pretty hacky, but I haven't yet managed to find an addon which hits the trifecta of having blockless inventories, using Forge, and being open-source. The vanilla Ender Chest is sub-optimal because it stores its inventory within the player and I need something that's "owned" by a single player, but visible to all. (I can post code if any want it, but I'm pretty convinced that the problem is a bad approach, rather than bad code.)
×
×
  • Create New...

Important Information

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