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

KollyPop

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by KollyPop

  1. Hello!

    I've looked through all the errors, and it's something to do with my RegistryHandler class, at the init() function. There also seems to be an error at the 

    public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);

     

    Here's the class:

    package com.octacontakaitria.lcd.util;
    
    import com.octacontakaitria.lcd.LCD;
    import com.octacontakaitria.lcd.items.ItemBase;
    import net.minecraft.block.Block;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.RegistryObject;
    import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
    import net.minecraftforge.registries.DeferredRegister;
    import net.minecraftforge.registries.ForgeRegistries;
    
    public class RegistryHandler {
    
        public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, LCD.MOD_ID);
    
    
        public static void init()
        {
            ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
        }
    
        // Items
        public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);
    }
    

    Here's the latest.log:

    https://pastebin.com/88vgh8p3

     

    Thanks in advance.

  2. Hello, I was watching some tutorial on how to make items, but it was in 1.15.2. Now I'm recreating that tutorial for 1.16.1 into IntelliJ.

    Here is a little code block:

    public class RegistryHandler {
    
        public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, LCD.MOD_ID);
    
        public static void init()
        {
            ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
        }
    
        // Items
        public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);
    }

     

    I have imported everything that is required, and this line is causing problems:

        public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, LCD.MOD_ID);

    at the end of the code block below.

    . . . er<Item> ITEMS = new DeferredRegister<>

     

    The error I am receiving is:

    'DeferredRegister(net.minecraftforge.registries.IForgeRegistry<T>, java.lang.String)' has private access in 'net.minecraftforge.registries.DeferredRegister'

    If someone could help me out, that'd be great.

    Has anything changed?

    Has this method become outdated?

×
×
  • Create New...

Important Information

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