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

Can't get custom item in ItemStack


Ilay
 Share

Recommended Posts

Hey, I'm new to modding nd I tried to create a mod for minecraft 1.15.2 but I've encountered  problem.

I want to return a custom item from the mod as an ItemStack but the parameter of the constructor requires an IItemProvider and I'm not sure how to do that.

I tried to return Item but the Item requires the id of the item and I don't know what is the id of the custom block or how to check it.

I want to return the item "elementum:deep_earth_axe_capsule".

package com.ri.elementum.items;

import com.ri.elementum.Elementum;
import com.ri.elementum.blocks.ShapeForge;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.IItemProvider;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class EmptyCapsuleBase extends Item {

    public EmptyCapsuleBase() {
        super(new Item.Properties().maxStackSize(1).group(Elementum.TAB));
    }

    private ItemStack getCapsuleType(ItemStack item, String kind){
        switch (kind){
            case "deep earth":
                switch (item.getDisplayName().getString()){
                    case "Empty Axe Capsule":
                        return new ItemStack(getItemById(0));  //What I want to change: I don't know the item id so I used 0 as a placeholder for the example. 
                }
                break;
        }
        return new ItemStack(getItemById(0));
    }


    @Override
    public ActionResultType onItemUse(ItemUseContext context){
        final World world = context.getWorld();
        final BlockPos pos = context.getPos();
        final PlayerEntity playerIn = context.getPlayer();
        final ItemStack item = context.getItem();
        final Block block = world.getBlockState(pos).getBlock();
        //System.out.println("World "+world+"\nPos "+pos+"\nPlayer "+playerIn+"\nItem: "+item+"\nblock "+block);

        if (block == Blocks.GRASS_BLOCK || block == Blocks.DIRT){
            playerIn.replaceItemInInventory(playerIn.inventory.currentItem, getCapsuleType(item, "deep earth"));
            getCapsuleType(item, "deep earth");
        }
        return super.onItemUse(context);
    }
}

 

 

 

package com.ri.elementum.util;

import com.ri.elementum.blocks.*;
import com.ri.elementum.Elementum;
import com.ri.elementum.items.EmptyCapsuleBase;
import com.ri.elementum.items.ItemBase;
import net.minecraft.item.Item;
import net.minecraft.block.Block;
import net.minecraft.item.PickaxeItem;
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 = new DeferredRegister<>(ForgeRegistries.ITEMS, Elementum.MOD_ID);
    public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, Elementum.MOD_ID);

    private static void RegisterToolsCapsules() {
        final String[] elements = {"empty", "hellfire", "aquarium", "deep_earth", "airium"};
        final String[] items = {"pickaxe", "axe", "sword", "hoe", "shovel", "helmet", "chestplate", "leggings", "boots"};
        final int[] durability = {0 ,500, 500, 750, 250};
        for (int e=0; e<elements.length; e++) {
            final int e2 = e;
            for (String i: items) {
                if (e==0){
                    ITEMS.register(elements[e]+"_"+i+"_capsule", () -> new EmptyCapsuleBase()); //Where's the items registered.
                } else {
                    ITEMS.register(elements[e] + "_" + i + "_capsule", () -> new ItemBase(1, durability[e2]));
                }
            }
        }
    }

    public static void init() {
        RegisterToolsCapsules();
        ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
        BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus());
    }

    public static final RegistryObject<Item> CAPSULE = ITEMS.register("capsule", () -> new ItemBase(16));
    public static final RegistryObject<Item> THE_CAPSULE_OF_CONFUSION = ITEMS.register("the_capsule_of_confusion", ItemBase::new);
    public static final RegistryObject<Item> AQUARIUM = ITEMS.register("aquarium", ItemBase::new);
    public static final RegistryObject<Item> HELLFIRE = ITEMS.register("hellfire", ItemBase::new);
    public static final RegistryObject<Item> DEEP_EARTH = ITEMS.register("deep_earth", ItemBase::new);
    public static final RegistryObject<Item> AIRIUM = ITEMS.register("airium", ItemBase::new);
    public static final RegistryObject<Item> BOSS_ESSENCE = ITEMS.register("boss_essence", () -> new ItemBase(16));


    public static final RegistryObject<Block> SHAPE_FORGE = BLOCKS.register("shape_forge", ShapeForge::new);
    public static final RegistryObject<Block> ENHANCEMENT_FORGE = BLOCKS.register("enhancement_forge", EnhancementForge::new);
    public static final RegistryObject<Block> ELEMENTUM_FORGE = BLOCKS.register("elementum_forge", ElementumForge::new);
    public static final RegistryObject<Block> AQUARIUM_ORE = BLOCKS.register("aquarium_ore",  AquariumOre::new);
    public static final RegistryObject<Block> HELLFIRE_ORE = BLOCKS.register("hellfire_ore", HellfireOre::new);
    public static final RegistryObject<Block> DEEP_EARTH_ORE = BLOCKS.register("deep_earth_ore", DeepEarthOre::new);
    public static final RegistryObject<Block> AIRIUM_ORE = BLOCKS.register("airium_ore", AiriumOre::new);


    public static final RegistryObject<Item> SHAPE_FORGE_ITEM = ITEMS.register("shape_forge", () -> new BlockItemBase(SHAPE_FORGE.get()));
    public static final RegistryObject<Item> ENHANCEMENT_FORGE_ITEM = ITEMS.register("enhancement_forge", () -> new BlockItemBase(ENHANCEMENT_FORGE.get()));
    public static final RegistryObject<Item> ELEMENTUM_FORGE_ITEM = ITEMS.register("elementum_forge", () -> new BlockItemBase(ELEMENTUM_FORGE.get()));
    public static final RegistryObject<Item> AQUARIUM_ORE_ITEM = ITEMS.register("aquarium_ore", () -> new BlockItemBase(AQUARIUM_ORE.get()));
    public static final RegistryObject<Item> HELLFIRE_ORE_ITEM = ITEMS.register("hellfire_ore", () -> new BlockItemBase(HELLFIRE_ORE.get()));
    public static final RegistryObject<Item> DEEP_EARTH_ORE_ITEM = ITEMS.register("deep_earth_ore", () -> new BlockItemBase(DEEP_EARTH_ORE.get()));
    public static final RegistryObject<Item> AIRIUM_ORE_ITEM = ITEMS.register("airium_ore", () -> new BlockItemBase(AIRIUM_ORE.get()));


}

 

Edited by Ilay
Link to comment
Share on other sites

23 minutes ago, Danebi said:

Sorry, but i can't make any sense of what you sent... maybe there was some problem when copying the code?

If what you posted is really your code learn Java.

The code was a bit twisted so I think I fixed it. In addition, it's just part of the code, I didn't finish it because I need to know the ID to proceed. I'm also pretty new to java...

Link to comment
Share on other sites

Do not use item IDs. You do not need to know what they are or interact with them in any way.

1 hour ago, Ilay said:

EmptyCapsuleBase extends Item

Your class extends Item

Your method is an instance method

new ItemStack(this)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

7 minutes ago, Draco18s said:

Do not use item IDs. You do not need to know what they are or interact with them in any way.

Your class extends Item

Your method is an instance method

new ItemStack(this)

It doesn't work. I want to return in this case the item "elementum:deep_earth_axe_capsule" and not the empty capsule which "this" referring.

Link to comment
Share on other sites

11 minutes ago, Danebi said:
  1. Problematic Code #8 and Code-Style #4
  2. Don't register items and blocks dynamically.

  3. To get the instance of a registry entry (like Item and Block) use RegistryObject#get.

I'm sorry for being dumb but I don't understand:

where and how to use the RegistyObject#get?

I forgot to mention it in the post but I want to return the item "elementum:deep_earth_axe_capsule". Can you send me an example code that will return that, further explanation or a tutorial that will do that?

Also what does register items and blocks dynamically mean and how to fix that? 

Link to comment
Share on other sites

You should avoid stringly typed code. Checking the display name is also the wrong way to check for a specific item, use ItemStack#getItem and compare it against a known Item instance.

 

You should avoid getting items by name. You can do it using the registries in ForgeRegistries, however this is again "stringly typed" code. Your elements ("hellfire", etc.) and items ("pickaxe", "axe", etc.) should be enums, and because enums are real objects, you can just store the RegistryObject inside them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • 1.15 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • when ever I try to load up a new Minecraft mod pack on my MacBook pro M1 this message shows up. here's the code. I'm not very informed when it comes to computers and couldn't figure out a solution and its been a couple days  ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 10/27/21 9:33 AM Description: Initializing game java.lang.IllegalStateException: GLFW error before init: [0x10008]Cocoa: Failed to find service port for display     at com.mojang.blaze3d.platform.GLX.lambda$_initGlfw$1(GLX.java:81) ~[?:?] {re:classloading,xf:OptiFine:default}     at net.minecraft.client.MainWindow.func_211162_a(MainWindow.java:167) ~[?:?] {re:classloading,xf:OptiFine:default}     at com.mojang.blaze3d.platform.GLX._initGlfw(GLX.java:79) ~[?:?] {re:classloading,xf:OptiFine:default}     at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:996) ~[?:?] {re:classloading}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:371) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(SourceFile:166) ~[1.15.2.jar:?] {re:classloading,re:mixin,pl:mixin:APP:smoothboot.mixins.json:client.MainMixin,pl:mixin:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] {}     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.15.2-31.2.52.jar:31.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.2.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.2.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.2.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.2.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.2.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at com.mojang.blaze3d.platform.GLX.lambda$_initGlfw$1(GLX.java:81)     at net.minecraft.client.MainWindow.func_211162_a(MainWindow.java:167)     at com.mojang.blaze3d.platform.GLX._initGlfw(GLX.java:79)     at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:996)     at net.minecraft.client.Minecraft.<init>(Minecraft.java:371) -- Initialization -- Details: Stacktrace:     at net.minecraft.client.main.Main.main(SourceFile:166)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51)     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)     at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)     at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) -- System Details -- Details:     Minecraft Version: 1.15.2     Minecraft Version ID: 1.15.2     Operating System: Mac OS X (x86_64) version 10.16     Java Version: 1.8.0_74, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 699109136 bytes (666 MB) / 1705508864 bytes (1626 MB) up to 3817865216 bytes (3641 MB)     CPUs: 8     JVM Flags: 4 total; -Xss1M -Xmx4096m -Xms256m -XX:PermSize=256m     Launched Version: forge-31.2.52     Backend library: LWJGL version 3.2.1 build 12     Backend API: NO CONTEXT     GL Caps:      Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     CPU: <unknown>     OptiFine Version: OptiFine_1.15.2_HD_U_G6     OptiFine Build: 20210124-205244     Render Distance Chunks: 8     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: null     OpenGlRenderer: null     OpenGlVendor: null     CpuCount: 8
    • Can anyone help me with the problem below? I've tried everything I can do but it still doesn't work.  Using OpenJDK 1.8, Forge 1.12.2 Appreciated for any helps. Thanks! [2021-10-27 21:42:47] [資訊 ] Natives: C:\Users\matth\Desktop\TestMod\build\natives [2021-10-27 21:42:47] [資訊 ] Main Class: net.minecraft.launchwrapper.Launch [2021-10-27 21:42:47] [資訊 ] Srg2Mcp: C:\Users\matth\Desktop\TestMod\build\createSrgToMcp\output.srg [2021-10-27 21:42:47] [資訊 ] Extra: [] [2021-10-27 21:42:48] [資訊 ] Running with arguments: [--version, 1.12, --assetIndex, 1.12, --assetsDir, C:\Users\vivianher\.gradle\caches\forge_gradle\assets, --accessToken, {REDACTED}, --userProperties, [], --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker] [21:42:48] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:42:48] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:42:48] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [21:42:48] [main/DEBUG] [FML]: Injecting tracing printstreams for STDOUT/STDERR. [21:42:48] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2855 for Minecraft 1.12.2 loading [21:42:48] [main/INFO] [FML]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_312, running on Windows 10:amd64:10.0, installed at C:\Program Files\Eclipse Adoptium\jdk-8.0.312.7-hotspot\jre [21:42:48] [main/DEBUG] [FML]: Java classpath at launch is: [21:42:48] [main/DEBUG] [FML]: C:\Users\matth\Desktop\TestMod\bin\main [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.12.2-14.23.5.2855_mapped_snapshot_20171003-1.12\forge-1.12.2-14.23.5.2855_mapped_snapshot_20171003-1.12-recomp.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\forge_gradle\minecraft_repo\versions\1.12.2\client-extra.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.1\f7be08ec23c21485b9b5a1cf1654c2ec8c58168d\jsr305-3.0.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.minecraftforge\mergetool\1.0.13\c18446ec4d5814f447d7a79b314ba9a27cc8dbc8\mergetool-1.0.13-forge.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\forge_gradle\maven_downloader\de\oceanlabs\mcp\mcp_snapshot\20171003-1.12\mcp_snapshot-20171003-1.12.zip [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-debug-all\5.2\3354e11e2b34215f06dab629ab88e06aca477c19\asm-debug-all-5.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.minecraft\launchwrapper\1.12\111e7bea9c968cdb3d06ef4632bf7ff0824d0f36\launchwrapper-1.12.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.jline\jline\3.5.1\51800e9d7a13608894a5a28eed0f5c7fa2f300fb\jline-3.5.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.typesafe.akka\akka-actor_2.11\2.3.3\ed62e9fc709ca0f2ff1a3220daa8b70a2870078e\akka-actor_2.11-2.3.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.typesafe\config\1.2.1\f771f71fdae3df231bcd54d5ca2d57f0bf93f467\config-1.2.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-actors-migration_2.11\1.1.0\dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f\scala-actors-migration_2.11-1.1.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-compiler\2.11.1\56ea2e6c025e0821f28d73ca271218b8dd04926a\scala-compiler-2.11.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-library_2.11\1.0.2_mc\e517c53a7e9acd6b1668c5a35eccbaa3bab9aac\scala-continuations-library_2.11-1.0.2_mc.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-plugin_2.11.1\1.0.2_mc\f361a3283452c57fa30c1ee69448995de23c60f7\scala-continuations-plugin_2.11.1-1.0.2_mc.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-reflect\2.11.1\6580347e61cc7f8e802941e7fde40fa83b8badeb\scala-reflect-2.11.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-actors\2.11.0\8ccfb6541de179bb1c4d45cf414acee069b7f78b\scala-actors-2.11.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-xml_2.11\1.0.2\820fbca7e524b530fdadc594c39d49a21ea0337e\scala-xml_2.11-1.0.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-parser-combinators_2.11\1.0.1\f05d7345bf5a58924f2837c6c1f4d73a938e1ff0\scala-parser-combinators_2.11-1.0.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-library\2.11.1\e11da23da3eabab9f4777b9220e60d44c1aab6a\scala-library-2.11.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-parser-combinators_2.11\1.0.1\f05d7345bf5a58924f2837c6c1f4d73a938e1ff0\scala-parser-combinators_2.11-1.0.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-swing_2.11\1.0.1\b1cdd92bd47b1e1837139c1c53020e86bb9112ae\scala-swing_2.11-1.0.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-xml_2.11\1.0.2\7a80ec00aec122fba7cd4e0d4cdd87ff7e4cb6d0\scala-xml_2.11-1.0.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\lzma\lzma\0.0.1\521616dc7487b42bef0e803bd2fa3faf668101d7\lzma-0.0.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\java3d\vecmath\1.5.2\79846ba34cbd89e2422d74d53752f993dcc2ccaf\vecmath-1.5.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.sf.trove4j\trove4j\3.0.3\42ccaf4761f0dfdfa805c9e340d99a755907e2dd\trove4j-3.0.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.sf.jopt-simple\jopt-simple\5.0.4\4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c\jopt-simple-5.0.4.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.minecraftforge\legacydev\0.2.3.1\f2cd4a8c9f09faf1c1e4a9a4c65df36e634f95db\legacydev-0.2.3.1-fatjar.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.mojang\patchy\1.2.3\e3107ca512d704a434076a153a6e1149e3787275\patchy-1.2.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\oshi-project\oshi-core\1.1\9ddf7b048a8d701be231c0f4f95fd986198fd2d8\oshi-core-1.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna\4.4.0\cb208278274bf12ebdb56c61bd7407e6f774d65a\jna-4.4.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\platform\3.4.0\e3f70017be8100d3d6923f50b3d2ee17714e9c13\platform-3.4.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j-core-mojang\51.2\63d216a9311cca6be337c1e458e587f99d382b84\icu4j-core-mojang-51.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.paulscode\codecjorbis\20101023\c73b5636faf089d9f00e8732a829577de25237ee\codecjorbis-20101023.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.paulscode\codecwav\20101023\12f031cfe88fef5c1dd36c563c0a3a69bd7261da\codecwav-20101023.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.paulscode\libraryjavasound\20101123\5c5e304366f75f9eaa2e8cca546a1fb6109348b3\libraryjavasound-20101123.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.paulscode\librarylwjglopenal\20100824\73e80d0794c39665aec3f62eee88ca91676674ef\librarylwjglopenal-20100824.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.paulscode\soundsystem\20120107\419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6\soundsystem-20120107.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\io.netty\netty-all\4.1.9.Final\97860965d6a0a6b98e7f569f3f966727b8db75\netty-all-4.1.9.Final.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.5\6c6c702c89bfff3cd9e80b04d668c5e190d588c6\commons-lang3-3.5.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.5\2852e6e05fbb95076fc091f6d1780f1f8fe35e0f\commons-io-2.5.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.3.3\18f4247ff4572a074444572cee34647c43e7c9c7\httpclient-4.3.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.10\4b95f4897fa13f2cd904aee711aeafc0c5295cd8\commons-codec-1.10.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.5\39c7796b469a600f72380316f6b1f11db6c2c7c4\jinput-2.0.5.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.0\c4ba5371a29ac9b2ad6129b1d39ea38750043eff\gson-2.8.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.mojang\authlib\1.5.25\9834cdf236c22e84b946bba989e2f94ef5897c3c\authlib-1.5.25.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.mojang\realms\1.10.22\bd0dccebdf3744c75f1ca20063f16e8f7d5e663f\realms-1.10.22.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.8.1\a698750c16740fd5b3871425f4cb3bbaa87f529d\commons-compress-1.8.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.1.3\f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f\commons-logging-1.1.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.3.2\31fbbff1ddbf98f3aa7377c94d33b0447c646b6e\httpcore-4.3.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\it.unimi.dsi\fastutil\7.1.0\9835253257524c1be7ab50c057aa2d418fb72082\fastutil-7.1.0.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.8.1\4ac28ff2f1ddf05dae3043a190451e8c46b73c31\log4j-core-2.8.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.8.1\e801d13612e22cad62a3f4f3fe7fdbe6334a8e72\log4j-api-2.8.1.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl\2.9.4-nightly-20150209\697517568c68e78ae0b4544145af031c81082dfe\lwjgl-2.9.4-nightly-20150209.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl_util\2.9.4-nightly-20150209\d51a7c040a721d13efdfbd34f8b257b2df882ad0\lwjgl_util-2.9.4-nightly-20150209.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.4-nightly-20150209\b04f3ee8f5e43fa3b162981b50bb72fe1acabb33\lwjgl-platform-2.9.4-nightly-20150209.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.4-nightly-20150209\b84d5102b9dbfabfeb5e43c7e2828d98a7fc80e0\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\385ee093e01f587f30ee1c8a2ee7d408fd732e16\jinput-platform-2.0.5-natives-windows.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\7ff832a6eb9ab6a767f1ade2b548092d0fa64795\jinput-platform-2.0.5-natives-linux.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\53f9c919f34d2ca9de8c51fc4e1e8282029a9232\jinput-platform-2.0.5-natives-osx.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.mojang\text2speech\1.10.3\48fd510879dff266c3815947de66e3d4809f8668\text2speech-1.10.3.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\com.mojang\text2speech\1.10.3\84a4b856389cc4f485275b1f63497a95a857a443\text2speech-1.10.3-natives-windows.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-util\6.2\a9690730f92cc79eeadc20e400ebb41eccce10b1\asm-util-6.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-analysis\6.2\c7d9a90d221cbb977848d2c777eb3aa7637e89df\asm-analysis-6.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\6.2\61570e046111559f38d4e0e580c005f75988c0a6\asm-tree-6.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\6.2\1b6c4ff09ce03f3052429139c2a68e295cae6604\asm-6.2.jar [21:42:48] [main/DEBUG] [FML]: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.codehaus.plexus\plexus-utils\3.1.0\60eecb6f15abdb1c653ad80abaac6fe188b3feaa\plexus-utils-3.1.0.jar [21:42:48] [main/DEBUG] [FML]: Java library path at launch is: [21:42:48] [main/DEBUG] [FML]: C:\Users\matth\Desktop\TestMod\build\natives [21:42:48] [main/DEBUG] [FML]: C:\Users\matth\Desktop\TestMod\build\natives [21:42:48] [main/DEBUG] [FML]: C:\Users\matth\Desktop\TestMod\build\natives [21:42:48] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory. [21:42:48] [main/ERROR] [FML]: Full: C:\Users\vivianher\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [21:42:48] [main/ERROR] [FML]: Trimmed: c:/users/vivianher/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/ [21:42:48] [main/DEBUG] [FML]: Determined Minecraft Libraries Root: .\libraries [21:42:49] [main/DEBUG] [FML]: Cleaning up mods folder: .\mods [21:42:49] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [21:42:49] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs. 2021-10-27 21:42:49,561 main WARN Disabling terminal, you're running in an unsupported environment. [21:42:49] [main/DEBUG] [FML]: Instantiating coremod class FMLCorePlugin [21:42:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [21:42:49] [main/DEBUG] [FML]: Added access transformer class net.minecraftforge.fml.common.asm.transformers.AccessTransformer to enqueued access transformers [21:42:49] [main/DEBUG] [FML]: Enqueued coremod FMLCorePlugin [21:42:49] [main/DEBUG] [FML]: Instantiating coremod class FMLForgePlugin [21:42:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [21:42:49] [main/DEBUG] [FML]: Enqueued coremod FMLForgePlugin [21:42:49] [main/DEBUG] [FML]: All fundamental core mods are successfully located [21:42:49] [main/DEBUG] [FML]: Discovering coremods [21:42:49] [main/INFO] [FML]: Searching C:\Users\matth\Desktop\TestMod\run\.\mods for mods [21:42:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:42:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:42:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:42:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:42:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [21:42:49] [main/DEBUG] [FML]: Injecting coremod FMLCorePlugin \{net.minecraftforge.fml.relauncher.FMLCorePlugin\} class transformers [21:42:49] [main/DEBUG] [FML]: Injection complete [21:42:49] [main/DEBUG] [FML]: Running coremod plugin for FMLCorePlugin \{net.minecraftforge.fml.relauncher.FMLCorePlugin\} [21:42:49] [main/DEBUG] [FML]: Running coremod plugin FMLCorePlugin [21:42:49] [main/DEBUG] [FML]: Loading deobfuscation resource C:\Users\matth\Desktop\TestMod\build\createSrgToMcp\output.srg with 36076 records [21:42:51] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [21:42:51] [main/DEBUG] [FML]: Coremod plugin class FMLCorePlugin run successfully [21:42:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [21:42:51] [main/DEBUG] [FML]: Injecting coremod FMLForgePlugin \{net.minecraftforge.classloading.FMLForgePlugin\} class transformers [21:42:51] [main/DEBUG] [FML]: Injection complete [21:42:51] [main/DEBUG] [FML]: Running coremod plugin for FMLForgePlugin \{net.minecraftforge.classloading.FMLForgePlugin\} [21:42:51] [main/DEBUG] [FML]: Running coremod plugin FMLForgePlugin [21:42:51] [main/DEBUG] [FML]: Coremod plugin class FMLForgePlugin run successfully [21:42:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:42:51] [main/DEBUG] [FML]: Loaded 215 rules from AccessTransformer config file forge_at.cfg [21:42:51] [main/DEBUG] [FML]: Validating minecraft [21:42:51] [main/DEBUG] [FML]: Minecraft validated, launching... [21:42:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [21:42:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [21:42:51] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [21:42:52] [Client thread/INFO] [minecraft/Minecraft]: Setting user: Player839 [21:42:54] [Client thread/DEBUG] [FML]: Creating vanilla freeze snapshot [21:42:54] [Client thread/DEBUG] [FML]: Vanilla freeze snapshot created [21:42:55] [Client thread/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4 [21:42:55] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: ---- Minecraft Crash Report ---- // You should try our sister game, Minceraft! Time: 10/27/21 9:42 PM Description: Initializing game java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at net.minecraft.client.Minecraft.readImageToBuffer(Minecraft.java:841) at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:680) at net.minecraft.client.Minecraft.init(Minecraft.java:456) at net.minecraft.client.Minecraft.run(Minecraft.java:378) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.legacydev.Main.start(Main.java:86) at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraft.client.Minecraft.readImageToBuffer(Minecraft.java:841) at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:680) at net.minecraft.client.Minecraft.init(Minecraft.java:456) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:378) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.legacydev.Main.start(Main.java:86) at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_312, Temurin Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin Memory: 118682528 bytes (113 MB) / 436731904 bytes (416 MB) up to 1888485376 bytes (1801 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): Launched Version: 1.12 LWJGL: 2.9.4 OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. GL Caps: Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled) CPU: <unknown> [21:42:55] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\matth\Desktop\TestMod\run\.\crash-reports\crash-2021-10-27_21.42.55-client.txt
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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