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.

Flutterish

Members
  • Joined

  • Last visited

Everything posted by Flutterish

  1. Fixed it! The problem was, I dont really know what, but I used the Minecraft method and it worked. Had to also move it to Init. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Items.Bs[0], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[0], "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Items.Bs[1], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[1], "inventory"));
  2. Thats because there were no exceptions. I printed out the name, it was exacly as I set it. I did the checking earlier, I said it works when either one is commented out, but not when both are called. ok, also there are two methods: public static void init() { Items.idcounter = 0; setProperties(69, Permafrost.MOD_ID + ":B_tab", 0); setProperties(16, CreativeTab.B_tab[0]); //CreativeTab.makeTab(Permafrost.MOD_ID + ":B_tab", new ItemStack(Bs[0])); GameRegistry.addShapedRecipe(new ResourceLocation(Permafrost.MOD_ID, Names.item_B[0]), null, new ItemStack(Bs[0], 1), "AAA", "AAA", "AAA", 'A', Blocks.DIAMOND_BLOCK); GameRegistry.addShapedRecipe(new ResourceLocation(Permafrost.MOD_ID, Names.item_B[0]+"b"), null, new ItemStack(Blocks.DIAMOND_BLOCK, 9), "A", 'A', Bs[0]); } @SideOnly(Side.CLIENT) public static void initClient() { ModelLoader.setCustomModelResourceLocation(Items.Bs[0], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[0], "inventory")); ModelLoader.setCustomModelResourceLocation(Items.Bs[1], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[1], "inventory")); } the top one is called first. Both in preInit. Maybe that helps. Dont worry about the setProperties with what seems to be invalid arguments, this is just another method used to autocreate a creative tab with initiated item as its icon.
  3. They do match the json file, how else would they load? Did you look at the pictures I provided?
  4. Why would I want to get what model is loading tho? All models work correctly alone, its just that they dont work together. Let me show you: only first item loaded: second item loaded: both loaded: Also, yes I did try to set the names to be the same, nothing changed.
  5. So I managed to add a texture to one item, but then I added a second item and its texture isnt displayed while the first items texture changed. The trouble code is this: @SideOnly(Side.CLIENT) public static void initClient() { ModelLoader.setCustomModelResourceLocation(Items.Bs[0], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[0], "inventory")); ModelLoader.setCustomModelResourceLocation(Items.Bs[1], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[1], "inventory")); } All the lines work as intended if I comment out the other line, but together they just do not. To clarify: if I have first line on, my first item has a correct texture [second, obviously, has none (the purple/black one)] If I have the second one on, the second item has a correct texture while the first has none. If I have both lines on, the first item has the second items texture. Items.Bs[] is a list of custom Items with an overriden line for toolTips. Items class is not Minecraft.init.items, its a custom class I create my items in this function: public static void setProperties(int stacksize, CreativeTabs ct) { permafrost_mod_item B = new permafrost_mod_item(); B.setUnlocalizedName(Names.item_B[Items.idcounter]); B.setMaxStackSize(stacksize); B.setCreativeTab(ct); B.setRegistryName(new ResourceLocation(Permafrost.MOD_ID, Names.item_B[Items.idcounter])); B.id = Items.idcounter; Items.Bs[Items.idcounter] = B; Items.idcounter++; } The method is invoked in preInit at ClientProxy. Please help, I just do not see anything that could be wrong... Fixed! Problem still unknown, but using another method works: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Items.Bs[0], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[0], "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Items.Bs[1], 0, new ModelResourceLocation(Permafrost.RESOURCE_PREFIX + Names.item_B[1], "inventory"));

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.