Jump to content

Recommended Posts

Posted

For some reason I keep recieving an error when extending any function or variable of Item.java saying it doesn't exist.  What am I doing wrong?

 

Crash Report:

 

 

---- Minecraft Crash Report ----

// I'm sorry, Dave.

 

Time: 7/25/14 10:09 AM

Description: Initializing game

 

java.lang.NoSuchFieldError: maxStackSize

at com.nglen.tempname.item.ItemTN.<init>(ItemTN.java:18)

at com.nglen.tempname.item.ItemAppleGel.<init>(ItemAppleGel.java:7)

at com.nglen.tempname.init.ModItems.<clinit>(ModItems.java:12)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.registry.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:70)

at cpw.mods.fml.common.registry.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:39)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)

at net.minecraft.client.main.Main.main(SourceFile:148)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at com.nglen.tempname.item.ItemTN.<init>(ItemTN.java:18)

at com.nglen.tempname.item.ItemAppleGel.<init>(ItemAppleGel.java:7)

at com.nglen.tempname.init.ModItems.<clinit>(ModItems.java:12)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.registry.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:70)

at cpw.mods.fml.common.registry.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:39)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)

at net.minecraft.client.main.Main.main(SourceFile:148)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_11, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 143499552 bytes (136 MB) / 262144000 bytes (250 MB) up to 954728448 bytes (910 MB)

JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.25.1188 Minecraft Forge 10.13.0.1188 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{7.10.25.1188} [Forge Mod Loader] (forge-1.7.10-10.13.0.1188.jar) Unloaded->Constructed

Forge{10.13.0.1188} [Minecraft Forge] (forge-1.7.10-10.13.0.1188.jar) Unloaded->Constructed

TempName{1.0.0} [Temp Name] (TempName-1.7.10-1.0.0-dev.jar) Unloaded->Constructed

Launched Version: 1.7.10-Forge10.13.0.1188

LWJGL: 2.9.1

OpenGL: GeForce 9800 GT/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Anisotropic filtering is supported and maximum anisotropy is 16.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

 

 

 

Classes:

 

 

ItemTN:

 

 

package com.nglen.tempname.item;

 

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

 

import com.nglen.tempname.creativetab.CreativeTabTN;

import com.nglen.tempname.reference.Textures;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

public class ItemTN extends Item

{

public ItemTN()

    {

        super();

        this.maxStackSize = 16;

        this.setMaxStackSize(16);

        this.setCreativeTab(CreativeTabTN.TN_TAB);

    }

 

@Override

    public String getUnlocalizedName()

    {

        return String.format("item.%s%s", Textures.RESOURCE_PREFIX, getUnwrappedUnlocalizedName(super.getUnlocalizedName()));

    }

 

    @Override

    public String getUnlocalizedName(ItemStack itemStack)

    {

        return String.format("item.%s%s", Textures.RESOURCE_PREFIX, getUnwrappedUnlocalizedName(super.getUnlocalizedName()));

    }

 

    @Override

    @SideOnly(Side.CLIENT)

    public void registerIcons(IIconRegister iconRegister)

    {

        itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));

    }

 

    protected String getUnwrappedUnlocalizedName(String unlocalizedName)

    {

        return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);

    }

}

 

 

ItemAppleGel:

 

 

package com.nglen.tempname.item;

 

import com.nglen.tempname.reference.Names;

 

public class ItemAppleGel extends ItemTN {

public ItemAppleGel() {

super();

this.setUnlocalizedName(Names.Items.APPLE_GEL);

}

}

 

 

ModItems:

 

 

package com.nglen.tempname.init;

 

import com.nglen.tempname.item.ItemAppleGel;

import com.nglen.tempname.item.ItemTN;

import com.nglen.tempname.reference.Names;

import com.nglen.tempname.reference.Reference;

 

import cpw.mods.fml.common.registry.GameRegistry;

 

@GameRegistry.ObjectHolder(Reference.MOD_ID)

public class ModItems {

public static final ItemTN appleGel = new ItemAppleGel();

 

public static void init() {

GameRegistry.registerItem(appleGel, Names.Items.APPLE_GEL);

}

}

 

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I've been using this modpack for a few days now with no issues, it was working properly just an hour or two ago and now all of a sudden when I try to load it I get this error: 'The game crashed: exception in server tick loop Error: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $' debug log: https://pastebin.com/1htBuhsP crash report: https://pastebin.com/QggHKYDg
    • Everything worked fine until I decided to install supplementaries squared, amendments and a couple other mods like artifacts, and compats for it. I'm having a hard time fixing this, and I get this crash whenever I try to enter a world. Not even a new world is feasible. Any help would be highly appreciated!! https://pastebin.com/7KXYZ6fM
    • Internal Exception: com.google.gson.JsonParseException: Error loading registry data: Unknown element: ResourceKey[minecraft:worldgen/configured_feature / minecraft:crimson_forest_vegetation]   This error is there when i try to join my friends server. We had some mods and it was okay but after 3 days i cant join.
    • It just says the mod i had but i dont have now.. and i didnt even use these mods and it still was crashing with the mods  
    • Hello,   I've been back and forth in emails with some CurseForge support staff on the issue but there's been no progress. In the CurseForge app, I have custom profiles and some public modpacks that will not load no matter what. I've goen through every link sent to me, I've reinstalled Minecraft, reinstalled the launcher, repaired the installations individually, uninstalled and reinstalled the public modpacks, downloaded the latest Java--all of it. But each time, I'm always met with either "java runtime exception", "exit code 1" on the rare occasions Minecraft does launch, or "java is out of date" (which literally cannot be possible since I reinstalled the latest version a few different times.) Making a new profile works, but I want to be able to play the ones I had before.  I had gotten one of the old public Minecraft modpacks to work, the prehistoric one about dinosaurs being featured right now, but then it only worked once. I've tried to retrace my steps and it just would not work. I have genuinely no clue what's going on.
  • Topics

×
×
  • Create New...

Important Information

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