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

Splashsky

Members
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Splashsky

  • Rank
    Tree Puncher

Converted

  • Gender
    Male
  • URL
    http://clubsurf.net
  • Location
    Missouri
  • AIM
    skylearj
  • Personal Text
    Le Boss!
  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...
×
×
  • Create New...

Important Information

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