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.

SUPERFREEK

Members
  • Joined

  • Last visited

  1. Hello. I'm currently trying to import the music disc pigstep into the minecraft 1.12.2 version. But in the line: event.getRegistry().registerAll((IForgeRegistryEntry).new Item[]{ (Item)(discPigstep = new ItemDiscPigstep("pigstep")) }); it keeps saying me two things: 1. When I hover above the IForgeRegistryEntry it says: Expression expected 2. When I hover above new Item[] { (Item)(discPigstep = new ItemDiscPigstep("pigstep")) }); it says Inconvertible types; cannot cast 'net.minecraft.item.Item[]' to 'net.minecraftforge.registries.IForgeRegistryEntry'. Can anybody help me please? Here's the full code of that class::: package com.superfreek.pigstep.common.items; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.registries.IForgeRegistryEntry; @EventBusSubscriber public class ItemHandler { public static ItemDiscPigstep discPigstep; @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll((IForgeRegistryEntry)new Item[] { (Item)(discPigstep = new ItemDiscPigstep("pigstep")) }); } @SubscribeEvent public static void registerRender(ModelRegistryEvent event) { ModelLoader.setCustomModelResourceLocation((Item)discPigstep, 0, new ModelResourceLocation(discPigstep.getRegistryName(), "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.