Jump to content

[1.7.10-10.13.0.1188] Item.java extension errors


nglen

Recommended Posts

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);

}

}

 

 

 

 

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.
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



×
×
  • Create New...

Important Information

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