Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mekelaina

Members
  • Joined

  • Last visited

Everything posted by Mekelaina

  1. @diesieben07 I realize this now. I'll change it soon enough
  2. @Draco18s THANK YOU SO MUCH! I got it to work thanks to your code. And yes, I agree IHasModel is a terrible way of doing this, but what it does is every block and item is added to an ArrayList upon initialization and then in my registry handler class ( I realize now I didn't link to this originally and I apologize) loops through each item, block, etc. and runs its corresponding initialization method. This is what registers my models as of rn: @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { if(item instanceof IHasModel) { ((IHasModel)item).registerModels(); } } for(Block block : ModBlocks.BLOCKS) { if(block instanceof IHasModel) { ((IHasModel)block).registerModels(); } } // ModItems.initSpecialModels(); } I set it up this way because that's how the tutorial I followed at the time did it. I realize this is a dumb setup and I'll go back and change it at some point, but this works for now. This mod project of mine is actually my first attempt at it and I'm trying to self-teach myself the more complex stuff of modding. I actually really like your registry class setup and will definitely take inspiration from it for the future! Again, TYSVM!
  3. So, Turns out I misspelled one of my interface methods. registerModel() when it should have been registerModels(). So, All the models loaded (i think) when I added this bit to the corrected method public void registerModels() { //System.out.println("wdjlmnojvn"); ModelBakery.registerItemVariants(this, CardImages.CARD_MODELS.values().toArray(new ModelResourceLocation[CardImages.CARD_MODELS.size()])); ModelLoader.setCustomMeshDefinition(this, new CardItemMesh()); } However, Now the models are just... not the models they're supposed to be. They're now the default broken cube model. So not the "cube_all" model but this. @Draco18s
  4. So, I'm working on implementing trading cards into the game, but I cant get my textures to load properly. I know it's an issue with trying to get multiple textures and models for one "item" as everything else works. In fact, the model that does get loaded at least half works as the back of the card render fine, see here. I'm really lost here. Minecraft doesn't throw any errors. Can anyone help me out? The relevant section of my main class: @EventHandler public static void preInit(FMLPreInitializationEvent event) { //CONFIG_DIRECTORY = Minecraft.g config = new Configuration(event.getSuggestedConfigurationFile()); config_dir = event.getModConfigurationDirectory().getAbsolutePath(); CardLoadingHandler.loadCardInfo(); CardImages.init(); } My Item: https://pastebin.com/bKePKbQr My Custom Item Mesh: https://pastebin.com/FwhjMjww My Card ModelResourceLocation holding class https://pastebin.com/Ck9ZYSxt And my card collection class: https://pastebin.com/vQASnk7k

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.