Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Splashsky

Members
  • Content Count

    22
  • Joined

  • Last visited

Everything posted by Splashsky

  1. What I've ended up doing was create the CommonProxy as an interface. public interface CommonProxy { void preInit(); void init(); void postInit(); void registerItemRender(Item item, int meta, String id); } I then proceed to put the client logic into the ClientProxy. public class ClientProxy implements CommonProxy { @Override public void preInit() { } @Override public void init() { } @Override public void postInit() { } @Override public void registerItemRender(Item item, int meta, String id) {
  2. So I've continued my goofing around with tutorials to try and get the hang of this, and I've come to the next roadblock. I don't know how to assign a model/image to my item! I've created the item class, added a function to it which will allow me to tell the ClientProxy to register the item model with setCustomModelResourceLocation, but it simply shows up as the black and pink boxes. Any help? ModItem.java public class ModItem extends Item { protected String name; public ModItem(String name) { this.name = name; setName(this, name); } public
  3. So basically, merely that class' existence will register the items? EDIT: Answered my own question. It sure does! That's a nifty lil thing right there.
  4. I had actually seen some of that from Choonster's test mod repo. It had some init things in there where he used @ObjectHolder to manage items... @GameRegistry.ObjectHolder(Reference.MODID) public class ModItems { public static ModIngot ObsidianIngot = new ModIngot("obsidian_ingot"); // ... more items go here @Mod.EventBusSubscriber(modid = Reference.MODID) public static class RegistrationHandler { public static final Set<Item> ITEMS = new HashSet<>(); @SubscribeEvent public static void registerItems(final RegistryEvent.Register<I
  5. I see! In this, then, I have another question. Given Draco's EasyRegistry class, it looks like he annotates it with SidedProxy... would this work as I expect it to? @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class Venture { @Mod.Instance public static Venture instance; @SidedProxy(clientSide = Reference.CLIENTPROXY, serverSide = Reference.SERVERPROXY) public static CommonProxy proxy; public static ServerRegistry registry; public static Logger logger; @Mod.EventHandler public static void preInit(FMLPreInitiali
  6. Okay, so from what I've extrapolated, I came up with a plan in my head. I can use my common.items package, create a ModItem class to act as a base class and set the Unlocalized and Registry names. When that item is created, I can, from the ModItem class, call ServerRegistry.registerItem(), add it to that list, and simply have the ServerRegistry use registerAll on that list. When I get it all hooked up, I use kind of a ItemHub with a method for instantiating all these items, which ultimately adds them to the list in the ServerRegistry. I then just add the ServerRegistry to the EVENT_BUS and cal
  7. Awesome! Thank you. More reading is always helpful. I did end up finding some succinct tutorials at Shadowfacts, so all-in-all I'm working towards piecing it all together. ^^
  8. Couldn't you just make _registerItem static instead?
  9. Additionally, is there any particular reason you make two methods for most actions? Such as registerItem and _registerItem, that is.
  10. So, effectively - and pardon for being such a newb - I could just write a ServerRegistry class with the same base functionality as your EasyRegistry and register that to the EVENT_BUS separate from the ServerProxy I have?
  11. So, gauging from what I read, the EasyRegistry classes could just as easily be the ClientProxy and ServerProxy I have. Just set it up in the same way... okay. Well, thanks, Draco!
  12. So... @Mod.EventHandler ... and I just assign that class to a variable in the main mod file? Or do I use that above the registration function after using @SubscribeEvent / @Mod.EventBusSubscriber above the Registry class declaration? Java's metadata is like alienese to me.
  13. Would it matter too terribly much where I were to put the Registry event? Choonster's puts the class into the ModItems class, and another tutorial puts the class directly into the main mod file. Is there a way I can make a separate Registry class and call the registration somewhere in the main mod class?
  14. I'm brand new to the modding scene. I know PHP, I've got some C++ experience, and I'm aware of Java. I can figure things out, more or less... but really only when I have examples I can first learn from. What I'm getting at is are there any clean, fully working example mods using all the best practices for 1.12.x? Like, registering and rendering items, how I should set up the proxies, etc? I did look at Choonster's test mod, and it had a pretty neat idea with how he registers items... however, I need a guide or an example mod that steps me through the basics of setting up a registry for items a
  15. I'm completely new to modding; I installed IDEA because I know it's a stronger IDE than Eclipse, and so I followed this tutorial on the forum to get it working, but I can't see where to edit the configuration he found, nor does genIntellijRuns do anything rather than set the Gradle task to setupDecompWorkspace. Doesn't ask me to refresh the project or anything. edit: Switched the project to run the Minecraft Client instead. Worked as expected. My configuration screen for the Gradle project looks like this...
  16. Which log file? I checked all through eclipse/logs/fml-client-latest.log and it doesn't show anything that I'd take as an error or a failure. Here's a screenshot of the problem Here is a pastebin of fml-client-latest.log
  17. So, I'm like, minding my own business right? I go ahead and add two food items to my mod, and I'm registering the renders like all the tutorials tell me to. Suddenly, this hideous error appears and a bunch of Minecraft's vanilla textures are replaced by blank white squares! Anyone have experience with this sort of thing? [06:49:11] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@5b82e090[id=d978d670-4b07-3a90-bfb6-b4e7c70fe7fc,name=Player412,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has
  18. The point was to create a class that added localized names via a simple regex process so that I could add items and tabs and the like and not have to manually enter new localizations. It partially works, except my bugged version had been putting en_US.lang in the root directory and made multiple copies of the same line (an issue I am trying to debug ) Though, I tested a couple things out while writing this reply, and it seems that manually adding entries is my best bet until I learn some more about Java and Forge. Changed the path that was being passed to LangRegistry to match u
  19. One more quick question; in the event that I'm creating a class to automagically add lines to my en_US.lang file, how would I navigate to said file? Currently, I've got a LangRegistry class that extends a custom RegistryFile class, with a constructor as such; RegistryFile Constructor (LangRegistry uses super()) public RegistryFile(String filePath) { this.filePath = filePath; this.file = new File(filePath); } I've got "resources/assets/cshex/lang/en_US.lang" passed to my LangRegistry class at the moment, but it doesn't seem to read it, let alone write to it. NOTE I'm onl
  20. Awesome, thanks! Though, if it requires a folder labelled with your_mod_id, then how's it work that it allows item and block textures to be in folders in assets? Wouldn't it be logical to put such things into the same folder as the lang files?
  21. I've been trying to work with some pre-1.8 tutorials and examples, but I can't figure out how to get my single item's name localized. Does anyone have a guide or something on localization in 1.8? I've got a manually-made en_US.lang under src/main/resources/assets/lang in my Eclipse Package Explorer, but when I grab the item in-game it reads item.bacon.name
  22. I'm reverse-engineering a mod that was apparently designed for Minecraft 1.7.10, and in their custom food classes I'm seeing methods like "func_77637_a" and "func_111206_d", the former of which I guessed was the old-school setCreativeTab() method from the Minecraft Item class. Is there a dictionary that shows the function changes? I'm having difficulty translating the old code.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.