Jump to content

[1.7.2] Custom Armor Crashed


chiyin00

Recommended Posts

I made a custom armor but Minecraft crashed after I clicked on the creative tab that the armor is in.

 

Here's the armor

package com.chiyin.FractureiTem.armor;

import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;

import com.chiyin.FractureiTem.FractureiTem;

public class armor1 extends ItemArmor{

private String [] armourTypes = new String [] {"helmet1", "chestplate1", "leggings1", "boots1"};

public armor1(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
	super(p_i45325_1_, p_i45325_2_, p_i45325_3_);

}

@Override
public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, String layer){
	if(itemstack.getItem().equals(FractureiTem.helmet1)|| itemstack.getItem().equals(FractureiTem.chestplate1)|| 
			itemstack.getItem().equals(FractureiTem.boots1)){
		return "chiyin:textures/armor/armor1_1.png";
	}
	if(itemstack.getItem().equals(FractureiTem.leggings1)){
		return "chiyin:textures/armor/armor1_2.png";
	}
	else return null;
}

@Override
public void registerIcons(IIconRegister reg){
	if(this == FractureiTem.helmet1)
		this.itemIcon = reg.registerIcon("chiyin:helmet1");
	if(this == FractureiTem.chestplate1)
		this.itemIcon = reg.registerIcon("chiyin:chestplate1");
	if(this == FractureiTem.leggings1)
		this.itemIcon = reg.registerIcon("chiyin:leggings1");
	if(this == FractureiTem.boots1)
		this.itemIcon = reg.registerIcon("chiyin:boots1");
}
}

 

Here's the core file

public static Item helmet1 = new armor1(ItemArmor.ArmorMaterial.CLOTH, 5, 0).setCreativeTab(FractureiTemTabArmor);
public static Item chestplate1 = new armor1(ItemArmor.ArmorMaterial.CLOTH, 5, 0).setCreativeTab(FractureiTemTabArmor);
public static Item leggings1 = new armor1(ItemArmor.ArmorMaterial.CLOTH, 5, 0).setCreativeTab(FractureiTemTabArmor);
public static Item boots1 = new armor1(ItemArmor.ArmorMaterial.CLOTH, 5, 0).setCreativeTab(FractureiTemTabArmor);

GameRegistry.registerItem(helmet1, "helmet1");
	GameRegistry.registerItem(chestplate1, "chestplate1");
	GameRegistry.registerItem(leggings1, "leggings1");
	GameRegistry.registerItem(boots1, "boots1");

RenderingRegistry.addNewArmourRendererPrefix("5");

 

and last, the crash report

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 14年6月27日 下午3:33
Description: Rendering item

java.lang.NullPointerException: Rendering item
at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:733)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:493)
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:560)
at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:291)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:118)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:672)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1145)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1024)
at net.minecraft.client.Minecraft.run(Minecraft.java:912)
at net.minecraft.client.main.Main.main(Main.java:112)
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 net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:733)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:493)

-- Item being rendered --
Details:
Item Type: com.chiyin.FractureiTem.armor.armor1@1e3b094
Item Aux: 0
Item NBT: null
Item Foil: false
Stacktrace:
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:560)
at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:291)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:118)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:672)

-- Screen render details --
Details:
Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative
Mouse location: Scaled: (192, 45). Absolute: (385, 388)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player187'/370, l='MpServer', x=-19.98, y=82.62, z=329.29]]
Chunk stats: MultiplayerChunkCache: 224, 225
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (-20,64,256), Chunk: (at 12,4,0 in -2,16; contains blocks -32,0,256 to -17,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 210942 game time, 108686 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 125 total; [EntityBat['Bat'/275, l='MpServer', x=32.53, y=29.57, z=397.25], EntityZombie['Zombie'/274, l='MpServer', x=46.50, y=31.00, z=399.50], EntityPig['Pig'/273, l='MpServer', x=45.50, y=76.00, z=374.31], EntityCreeper['Creeper'/272, l='MpServer', x=39.00, y=53.00, z=381.56], EntitySkeleton['Skeleton'/283, l='MpServer', x=51.50, y=14.00, z=252.50], EntityPig['Pig'/287, l='MpServer', x=56.50, y=71.00, z=269.31], EntityPig['Pig'/286, l='MpServer', x=55.94, y=71.00, z=266.97], EntityPig['Pig'/258, l='MpServer', x=37.66, y=66.00, z=279.47], EntityPig['Pig'/259, l='MpServer', x=42.34, y=69.00, z=274.47], EntitySkeleton['Skeleton'/262, l='MpServer', x=50.30, y=36.00, z=298.70], EntitySkeleton['Skeleton'/263, l='MpServer', x=44.53, y=41.00, z=295.88], EntityZombie['Zombie'/260, l='MpServer', x=50.47, y=42.00, z=299.03], EntityZombie['Zombie'/261, l='MpServer', x=47.50, y=41.00, z=298.50], EntityBat['Bat'/266, l='MpServer', x=25.09, y=37.00, z=313.03], EntityZombie['Zombie'/267, l='MpServer', x=42.91, y=55.00, z=347.31], EntityCreeper['Creeper'/264, l='MpServer', x=47.13, y=41.00, z=302.22], EntityBat['Bat'/265, l='MpServer', x=36.75, y=46.10, z=310.53], EntityPig['Pig'/270, l='MpServer', x=43.50, y=73.00, z=362.69], EntityZombie['Zombie'/271, l='MpServer', x=39.00, y=31.00, z=379.56], EntityPig['Pig'/268, l='MpServer', x=35.47, y=72.00, z=336.56], EntityBat['Bat'/269, l='MpServer', x=28.16, y=47.26, z=364.50], EntityBat['Bat'/288, l='MpServer', x=51.94, y=39.10, z=281.47], EntityBat['Bat'/289, l='MpServer', x=54.25, y=42.10, z=294.38], EntityZombie['Zombie'/290, l='MpServer', x=56.84, y=38.00, z=303.84], EntitySpider['Spider'/291, l='MpServer', x=54.72, y=40.00, z=307.81], EntityBat['Bat'/292, l='MpServer', x=60.69, y=38.39, z=302.50], EntityBat['Bat'/294, l='MpServer', x=47.63, y=23.23, z=350.69], EntityPig['Pig'/295, l='MpServer', x=59.94, y=71.00, z=341.53], EntityChicken['Chicken'/296, l='MpServer', x=58.47, y=82.00, z=383.47], EntitySpider['Spider'/297, l='MpServer', x=49.50, y=54.00, z=396.50], EntityZombie['Zombie'/298, l='MpServer', x=55.50, y=57.00, z=395.50], EntityCreeper['Creeper'/299, l='MpServer', x=58.50, y=60.00, z=386.50], EntitySkeleton['Skeleton'/300, l='MpServer', x=59.50, y=60.00, z=385.50], EntityBat['Bat'/301, l='MpServer', x=47.50, y=54.85, z=394.31], EntitySpider['Spider'/303, l='MpServer', x=50.34, y=61.00, z=402.72], EntityBat['Bat'/100, l='MpServer', x=-98.72, y=16.10, z=337.00], EntityZombie['Zombie'/99, l='MpServer', x=-99.50, y=51.00, z=312.50], EntitySheep['Sheep'/106, l='MpServer', x=-97.19, y=71.00, z=387.50], EntityBat['Bat'/104, l='MpServer', x=-99.13, y=14.92, z=381.84], EntityBat['Bat'/105, l='MpServer', x=-94.47, y=17.16, z=403.75], EntityBat['Bat'/117, l='MpServer', x=-87.50, y=11.82, z=402.03], EntityBat['Bat'/116, l='MpServer', x=-85.53, y=12.33, z=410.75], EntitySheep['Sheep'/115, l='MpServer', x=-86.50, y=71.00, z=393.19], EntityZombie['Zombie'/114, l='MpServer', x=-98.06, y=38.00, z=329.41], EntityBat['Bat'/113, l='MpServer', x=-81.53, y=14.98, z=263.66], EntityZombie['Zombie'/112, l='MpServer', x=-87.78, y=15.00, z=281.28], EntityZombie['Zombie'/127, l='MpServer', x=-76.78, y=59.00, z=283.47], EntityZombie['Zombie'/126, l='MpServer', x=-76.19, y=59.00, z=282.91], EntityZombie['Zombie'/125, l='MpServer', x=-79.59, y=57.00, z=294.63], EntityZombie['Zombie'/124, l='MpServer', x=-75.88, y=58.00, z=287.84], EntityPig['Pig'/123, l='MpServer', x=-75.19, y=72.00, z=270.78], EntityBat['Bat'/141, l='MpServer', x=-54.41, y=35.76, z=253.69], EntityBat['Bat'/142, l='MpServer', x=-55.69, y=35.00, z=253.44], EntityZombie['Zombie'/129, l='MpServer', x=-78.50, y=59.00, z=276.50], EntityZombie['Zombie'/128, l='MpServer', x=-78.50, y=59.00, z=279.50], EntityPig['Pig'/131, l='MpServer', x=-69.69, y=71.00, z=325.47], EntityPig['Pig'/130, l='MpServer', x=-75.16, y=78.00, z=296.03], EntityZombie['Zombie'/133, l='MpServer', x=-72.53, y=30.00, z=391.03], EntityPig['Pig'/132, l='MpServer', x=-77.38, y=63.00, z=343.78], EntityZombie['Zombie'/135, l='MpServer', x=-67.47, y=30.00, z=391.94], EntityZombie['Zombie'/134, l='MpServer', x=-75.50, y=31.00, z=386.50], EntityCreeper['Creeper'/152, l='MpServer', x=-62.50, y=35.00, z=348.50], EntityZombie['Zombie'/153, l='MpServer', x=-63.44, y=35.00, z=348.03], EntityZombie['Zombie'/154, l='MpServer', x=-68.06, y=39.00, z=345.50], EntityPig['Pig'/155, l='MpServer', x=-60.16, y=64.00, z=345.78], EntitySkeleton['Skeleton'/156, l='MpServer', x=-58.63, y=44.00, z=362.31], EntityCreeper['Creeper'/157, l='MpServer', x=-58.00, y=39.00, z=364.50], EntityPig['Pig'/158, l='MpServer', x=-53.88, y=65.00, z=360.22], EntityPig['Pig'/144, l='MpServer', x=-54.78, y=70.00, z=263.47], EntityPig['Pig'/145, l='MpServer', x=-51.91, y=72.00, z=270.22], EntityClientPlayerMP['Player187'/370, l='MpServer', x=-19.98, y=82.62, z=329.29], EntityPig['Pig'/146, l='MpServer', x=-54.81, y=72.00, z=268.47], EntityPig['Pig'/147, l='MpServer', x=-56.97, y=75.00, z=294.47], EntityPig['Pig'/148, l='MpServer', x=-49.78, y=67.00, z=307.50], EntitySkeleton['Skeleton'/149, l='MpServer', x=-53.50, y=34.00, z=334.50], EntityZombie['Zombie'/150, l='MpServer', x=-58.50, y=36.00, z=330.50], EntityPig['Pig'/151, l='MpServer', x=-65.50, y=69.00, z=325.31], EntityCreeper['Creeper'/171, l='MpServer', x=-34.66, y=61.00, z=340.00], EntityPig['Pig'/170, l='MpServer', x=-34.69, y=69.00, z=336.47], EntityPig['Pig'/169, l='MpServer', x=-41.84, y=70.00, z=304.03], EntityPig['Pig'/168, l='MpServer', x=-42.88, y=67.00, z=286.13], EntitySquid['Squid'/173, l='MpServer', x=-35.66, y=62.34, z=370.50], EntityPig['Pig'/172, l='MpServer', x=-42.19, y=66.00, z=354.16], EntityPig['Pig'/167, l='MpServer', x=-34.22, y=70.00, z=252.34], EntityPig['Pig'/166, l='MpServer', x=-34.72, y=74.00, z=259.50], EntitySkeleton['Skeleton'/186, l='MpServer', x=-31.50, y=23.00, z=372.50], EntityBat['Bat'/187, l='MpServer', x=-22.25, y=31.10, z=388.75], EntityPig['Pig'/184, l='MpServer', x=-24.53, y=70.00, z=336.31], EntityPig['Pig'/185, l='MpServer', x=-21.50, y=72.00, z=354.69], EntitySkeleton['Skeleton'/190, l='MpServer', x=-18.00, y=52.00, z=396.50], EntityZombie['Zombie'/191, l='MpServer', x=-13.47, y=46.00, z=390.16], EntityZombie['Zombie'/188, l='MpServer', x=-19.50, y=61.00, z=386.50], EntityZombie['Zombie'/189, l='MpServer', x=-21.50, y=61.00, z=388.50], EntitySkeleton['Skeleton'/182, l='MpServer', x=-16.50, y=65.00, z=284.50], EntityCreeper['Creeper'/183, l='MpServer', x=-22.56, y=66.00, z=274.97], EntityPig['Pig'/181, l='MpServer', x=-25.16, y=66.00, z=281.84], EntityPig['Pig'/207, l='MpServer', x=-2.50, y=73.00, z=301.69], EntityPig['Pig'/223, l='MpServer', x=5.97, y=67.00, z=261.88], EntitySkeleton['Skeleton'/212, l='MpServer', x=-10.88, y=46.00, z=401.50], EntitySkeleton['Skeleton'/213, l='MpServer', x=-10.75, y=44.00, z=402.84], EntityCreeper['Creeper'/214, l='MpServer', x=-12.63, y=44.00, z=404.72], EntityCreeper['Creeper'/215, l='MpServer', x=-10.66, y=40.00, z=409.06], EntityPig['Pig'/208, l='MpServer', x=-2.84, y=72.00, z=288.44], EntityBat['Bat'/209, l='MpServer', x=7.97, y=44.39, z=377.66], EntitySkeleton['Skeleton'/210, l='MpServer', x=-10.53, y=44.00, z=386.78], EntityWitch['Witch'/211, l='MpServer', x=-15.50, y=53.00, z=389.50], EntityChicken['Chicken'/239, l='MpServer', x=19.53, y=67.00, z=250.47], EntityZombie['Zombie'/232, l='MpServer', x=6.50, y=12.00, z=359.50], EntityZombie['Zombie'/231, l='MpServer', x=6.50, y=12.00, z=360.50], EntityPig['Pig'/230, l='MpServer', x=13.72, y=75.00, z=349.22], EntityPig['Pig'/229, l='MpServer', x=11.47, y=73.00, z=343.66], EntityZombie['Zombie'/228, l='MpServer', x=10.34, y=47.00, z=345.34], EntitySkeleton['Skeleton'/227, l='MpServer', x=5.88, y=52.00, z=307.47], EntitySkeleton['Skeleton'/226, l='MpServer', x=5.84, y=51.00, z=306.34], EntitySkeleton['Skeleton'/225, l='MpServer', x=14.16, y=52.00, z=307.50], EntityPig['Pig'/224, l='MpServer', x=12.50, y=67.00, z=274.31], EntityBat['Bat'/249, l='MpServer', x=21.75, y=27.10, z=409.34], EntityZombie['Zombie'/246, l='MpServer', x=18.50, y=55.00, z=369.50], EntityBat['Bat'/247, l='MpServer', x=39.72, y=11.82, z=400.56], EntityPig['Pig'/244, l='MpServer', x=19.50, y=77.00, z=333.50], EntityZombie['Zombie'/245, l='MpServer', x=30.53, y=25.00, z=382.97], EntityPig['Pig'/242, l='MpServer', x=18.69, y=70.00, z=300.47], EntityPig['Pig'/243, l='MpServer', x=27.91, y=71.00, z=318.25], EntityPig['Pig'/240, l='MpServer', x=18.81, y=67.00, z=265.97], EntityPig['Pig'/241, l='MpServer', x=35.03, y=66.00, z=279.97]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523)
at net.minecraft.client.Minecraft.run(Minecraft.java:934)
at net.minecraft.client.main.Main.main(Main.java:112)
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.2
Operating System: Windows 8 (x86) version 6.2
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 774409128 bytes (738 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 16965 (950040 bytes; 0 MB) allocated, 3458 (193648 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
cyFractureiTem{1.0} [Fracture iTem] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: Intel(R) HD Graphics 4400 GL version 4.2.0 - Build 10.18.10.3304, Intel
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: ?体中文 (中)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 3494 (195664 bytes; 0 MB) allocated, 1070 (59920 bytes; 0 MB) used
Anisotropic Filtering: Off (1)

 

Sorry for my bad english, please help!

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.