Jump to content

Yunus Emre

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Yunus Emre

  1. 2 minutes ago, ChampionAsh5357 said:

    I need a facepalm emoji so badly. I use the double colon operator to specify the location of a function. Let's break down what you wrote. First, you tried calling a static method using the double colon operator. Please learn some basic java and don't just follow some youtube tutorial. If you want a hint, a dot helps. Second, you called new on a method. You can only call new on constructors to create objects. A method is not a constructor. In this case, DeferredRegister::create is a static method for a constructor initialization circumventing the new operator (its called inside).

     

    And the easiest way you could've found this out is by reading the docs.

     

    I am watching this video: 

     

     

     

     

  2. 5 minutes ago, ChampionAsh5357 said:

    A warning is not an error. An error is an error. It's letting you know that this method of calling the constructor is deprecated and should be replaced with DeferredRegister::create. However, you could of found this out by hovering over the strike-through.

    C:\Users\Pc\Desktop\1.15.2 mod from yunus\src\main\java\com\yunus\sinif\util\RegistryHandler.java:15: error: '(' or '[' expected
        public static final DeferredRegister<Item> ITEMS = new DeferredRegister::create(ForgeRegistries.ITEMS, MOD_ID);
                                                                                                                                                            ^

  3. package com.yunus.sinif.util;
    
    import com.yunus.sinif.DenemeMod;
    import com.yunus.sinif.items.ItemBase;
    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 {
    
        private static final String MOD_ID = DenemeMod.MOD_ID;
    
        public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, "dp");
    
        public static void init(){
    
            ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
    
        }
    
        public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);
    
    }
    

     

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

     

    but this line returns me an error.

    I dont know what is error just new DeferredRegister<> strikethrough

     

    can you help me? 

     

    discord: Даяк Ыаде#3511

  4. To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html.minecraft.net/30/30fcb7e37b33af69fbb03299ba16aaf426fef884 Asset: minecraft/lang/e
    Daemon will be stopped at the end of the build stopping after processing
    
    > Configure project :
    New Dep: net.minecraftforge:forge:1.12.2-14.23.5.2854_mapped_snapshot_20171003-1.124ca29cb26240e Asset: minecraft/lang/e
    
    FAILURE: Build failed with an exception.
    s_cl.lang
    * What went wrong://resources.download.minecraft.net/50/504d4e4b5572743945091b683eba597d8e6b5f4d Asset: minecraft/lang/e
    Task 'setupDecompWorkspace' not found in root project '1.12.2 mod from yunus'.
    Downloading: http://resources.download.minecraft.net/97/97b93f972dc2f293894d9d832cefbe6a7be0bbf1 Asset: minecraft/lang/e
    * Try:ang
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    Downloading: https://launchermeta.mojang.com/v1/packages/1584b57c1a0b5e593fad1f5b8f78536ca640547b/1.12.json
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
    Use '--warning-mode all' to show the individual deprecation warnings.bb2ccd289cc7a9842585af2fb28 Asset: minecraft/lang/e
    See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
    Downloading: http://resources.download.minecraft.net/da/dac5b4bed730fac5085e95fd026638fd9df3e85d Asset: minecraft/lang/e
    BU¦LD FAILED in 13s

     

    I have this error when i write gradlew setupDecompWorkspace

     

     

×
×
  • Create New...

Important Information

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