Jump to content

Recommended Posts

Posted

When I enter the creative tab the game crashes.

 

CrashReport

[12:08:16] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// I blame Dinnerbone.

Time: 2/7/16 12:08 PM

Description: Rendering item

java.lang.NullPointerException: Rendering item

at net.minecraft.block.BlockLog.getTopIcon(BlockLog.java:80)

at net.minecraft.block.BlockRotatedPillar.getIcon(BlockRotatedPillar.java:64)

at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)

at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)

at net.minecraft.item.Item.getIconIndex(Item.java:457)

at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)

at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:420)

at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)

at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289)

at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114)

at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)

at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067)

at net.minecraft.client.Minecraft.run(Minecraft.java:962)

at net.minecraft.client.main.Main.main(Main.java:164)

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:497)

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

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

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

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

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

-- Head --

Stacktrace:

at net.minecraft.block.BlockLog.getTopIcon(BlockLog.java:80)

at net.minecraft.block.BlockRotatedPillar.getIcon(BlockRotatedPillar.java:64)

at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686)

at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51)

at net.minecraft.item.Item.getIconIndex(Item.java:457)

at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131)

at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:420)

-- Item being rendered --

Details:

Item Type: com.rnh.Yummy.ItemBlocks.ItemLogBlocks@56c5a6be

Item Aux: 0

Item NBT: null

Item Foil: false

Stacktrace:

at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)

at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289)

at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114)

at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)

at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)

-- Screen render details --

Details:

Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative

Mouse location: Scaled: (127, 42). Absolute: (255, 394)

Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Player327'/427, l='MpServer', x=176.50, y=67.62, z=261.50]]

Chunk stats: MultiplayerChunkCache: 539, 539

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (184,64,256), Chunk: (at 8,4,0 in 11,16; contains blocks 176,0,256 to 191,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

Level time: 629 game time, 629 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: 115 total; [EntityPig['Pig'/265, l='MpServer', x=221.22, y=76.00, z=240.72], EntityWitch['Witch'/266, l='MpServer', x=246.09, y=27.00, z=293.47], EntitySkeleton['Skeleton'/267, l='MpServer', x=227.88, y=27.00, z=299.50], EntityCreeper['Creeper'/268, l='MpServer', x=234.00, y=32.00, z=296.63], EntitySkeleton['Skeleton'/275, l='MpServer', x=244.50, y=41.00, z=266.50], EntitySkeleton['Skeleton'/276, l='MpServer', x=244.50, y=41.00, z=268.50], EntityPig['Pig'/277, l='MpServer', x=246.88, y=77.00, z=265.72], EntityPig['Pig'/278, l='MpServer', x=240.50, y=76.00, z=269.69], EntityPig['Pig'/279, l='MpServer', x=242.50, y=76.00, z=268.50], EntityPig['Pig'/280, l='MpServer', x=240.50, y=76.00, z=268.06], EntityPig['Pig'/281, l='MpServer', x=245.16, y=80.00, z=315.22], EntityPig['Pig'/282, l='MpServer', x=248.16, y=80.00, z=310.88], EntityPig['Pig'/283, l='MpServer', x=251.72, y=80.00, z=301.31], EntityPig['Pig'/284, l='MpServer', x=250.47, y=80.00, z=300.13], EntitySheep['Sheep'/285, l='MpServer', x=245.03, y=80.00, z=312.41], EntitySheep['Sheep'/286, l='MpServer', x=251.63, y=80.00, z=304.25], EntitySheep['Sheep'/287, l='MpServer', x=250.34, y=80.00, z=307.69], EntitySheep['Sheep'/288, l='MpServer', x=245.13, y=80.00, z=306.84], EntityMinecartChest['entity.MinecartChest.name'/289, l='MpServer', x=249.50, y=21.50, z=335.50], EntityPig['Pig'/290, l='MpServer', x=251.03, y=80.00, z=334.13], EntityPig['Pig'/292, l='MpServer', x=245.91, y=79.00, z=339.63], EntityPig['Pig'/293, l='MpServer', x=247.34, y=78.00, z=342.72], EntityPig['Pig'/296, l='MpServer', x=252.50, y=81.00, z=341.69], EntityPig['Pig'/297, l='MpServer', x=243.94, y=78.00, z=339.06], EntityBat['Bat'/70, l='MpServer', x=102.48, y=40.62, z=325.58], EntityWolf['Wolf'/80, l='MpServer', x=104.41, y=87.00, z=203.31], EntityWolf['Wolf'/81, l='MpServer', x=103.69, y=88.00, z=202.50], EntityWolf['Wolf'/82, l='MpServer', x=99.53, y=83.00, z=192.94], EntitySkeleton['Skeleton'/83, l='MpServer', x=96.59, y=63.00, z=217.06], EntityPig['Pig'/84, l='MpServer', x=102.50, y=85.00, z=204.78], EntityPig['Pig'/85, l='MpServer', x=107.50, y=87.00, z=209.50], EntityPig['Pig'/86, l='MpServer', x=108.53, y=89.00, z=209.81], EntityPig['Pig'/87, l='MpServer', x=98.09, y=82.00, z=210.47], EntitySkeleton['Skeleton'/88, l='MpServer', x=111.84, y=40.00, z=251.50], EntityBat['Bat'/89, l='MpServer', x=104.51, y=41.25, z=299.82], EntityBat['Bat'/90, l='MpServer', x=115.32, y=43.03, z=292.39], EntityZombie['Zombie'/98, l='MpServer', x=126.53, y=49.00, z=184.09], EntityBat['Bat'/100, l='MpServer', x=116.55, y=47.67, z=183.44], EntitySkeleton['Skeleton'/101, l='MpServer', x=112.69, y=40.00, z=251.50], EntityZombie['Zombie'/102, l='MpServer', x=113.50, y=39.00, z=252.50], EntityCreeper['Creeper'/103, l='MpServer', x=122.50, y=32.00, z=259.50], EntityCreeper['Creeper'/104, l='MpServer', x=116.72, y=32.00, z=257.88], EntityZombie['Zombie'/105, l='MpServer', x=119.41, y=17.00, z=300.00], EntityWitch['Witch'/106, l='MpServer', x=116.50, y=18.00, z=304.50], EntityCreeper['Creeper'/107, l='MpServer', x=126.50, y=20.00, z=322.50], EntityCreeper['Creeper'/108, l='MpServer', x=125.50, y=20.00, z=322.50], EntitySquid['Squid'/111, l='MpServer', x=121.91, y=62.22, z=324.50], EntitySquid['Squid'/114, l='MpServer', x=126.34, y=61.31, z=325.50], EntityCreeper['Creeper'/119, l='MpServer', x=110.56, y=15.00, z=335.00], EntityBat['Bat'/120, l='MpServer', x=118.54, y=37.40, z=338.51], EntityPig['Pig'/135, l='MpServer', x=139.50, y=92.00, z=235.50], EntityPig['Pig'/136, l='MpServer', x=142.50, y=95.00, z=238.50], EntitySkeleton['Skeleton'/137, l='MpServer', x=141.94, y=40.00, z=287.47], EntityZombie['Zombie'/138, l='MpServer', x=130.97, y=42.00, z=310.53], EntityZombie['Zombie'/139, l='MpServer', x=136.53, y=40.00, z=297.97], EntityBat['Bat'/140, l='MpServer', x=140.57, y=42.43, z=293.49], EntityBat['Bat'/141, l='MpServer', x=134.06, y=41.62, z=310.62], EntityBat['Bat'/142, l='MpServer', x=138.28, y=42.74, z=285.50], EntityWolf['Wolf'/143, l='MpServer', x=132.13, y=64.00, z=293.53], EntityWolf['Wolf'/144, l='MpServer', x=143.50, y=69.00, z=298.01], EntityWolf['Wolf'/145, l='MpServer', x=134.50, y=64.00, z=292.50], EntityWolf['Wolf'/146, l='MpServer', x=139.25, y=65.00, z=286.44], EntityChicken['Chicken'/147, l='MpServer', x=129.50, y=64.00, z=290.50], EntityChicken['Chicken'/148, l='MpServer', x=130.50, y=64.00, z=291.50], EntityChicken['Chicken'/149, l='MpServer', x=132.50, y=65.00, z=292.50], EntityChicken['Chicken'/150, l='MpServer', x=124.56, y=64.00, z=300.44], EntityBat['Bat'/151, l='MpServer', x=133.36, y=41.12, z=314.49], EntityZombie['Zombie'/152, l='MpServer', x=127.94, y=21.00, z=330.50], EntityZombie['Zombie'/153, l='MpServer', x=130.50, y=21.00, z=326.50], EntitySkeleton['Skeleton'/154, l='MpServer', x=128.34, y=21.00, z=329.34], EntityWitch['Witch'/155, l='MpServer', x=136.50, y=38.00, z=320.50], EntitySquid['Squid'/156, l='MpServer', x=134.09, y=62.31, z=321.06], EntityCreeper['Creeper'/171, l='MpServer', x=149.50, y=19.00, z=232.50], EntityClientPlayerMP['Player327'/427, l='MpServer', x=176.50, y=67.62, z=261.50], EntityPig['Pig'/172, l='MpServer', x=147.50, y=97.00, z=231.97], EntityPig['Pig'/173, l='MpServer', x=144.50, y=96.00, z=239.50], EntitySkeleton['Skeleton'/174, l='MpServer', x=155.50, y=26.00, z=297.50], EntityPig['Pig'/175, l='MpServer', x=153.50, y=71.00, z=299.22], EntityPig['Pig'/176, l='MpServer', x=152.50, y=70.00, z=298.50], EntityPig['Pig'/177, l='MpServer', x=153.50, y=71.00, z=300.53], EntityPig['Pig'/178, l='MpServer', x=152.50, y=66.00, z=296.53], EntitySkeleton['Skeleton'/197, l='MpServer', x=162.47, y=23.00, z=183.66], EntityZombie['Zombie'/200, l='MpServer', x=176.69, y=54.00, z=201.44], EntityZombie['Zombie'/201, l='MpServer', x=169.00, y=21.00, z=300.56], EntityZombie['Zombie'/202, l='MpServer', x=162.50, y=21.00, z=302.50], EntityZombie['Zombie'/203, l='MpServer', x=162.50, y=21.00, z=300.50], EntityBat['Bat'/204, l='MpServer', x=162.69, y=23.46, z=301.12], EntityBat['Bat'/205, l='MpServer', x=147.36, y=17.82, z=305.72], EntityPig['Pig'/213, l='MpServer', x=188.53, y=83.00, z=184.50], EntityPig['Pig'/214, l='MpServer', x=180.06, y=80.00, z=191.22], EntityPig['Pig'/215, l='MpServer', x=186.22, y=83.00, z=185.78], EntityPig['Pig'/216, l='MpServer', x=185.03, y=84.00, z=183.06], EntityBat['Bat'/217, l='MpServer', x=188.12, y=19.93, z=204.55], EntityBat['Bat'/218, l='MpServer', x=196.27, y=19.76, z=204.69], EntityPig['Pig'/219, l='MpServer', x=188.91, y=77.00, z=300.13], EntitySheep['Sheep'/220, l='MpServer', x=189.50, y=76.00, z=305.50], EntitySkeleton['Skeleton'/221, l='MpServer', x=180.50, y=39.00, z=339.50], EntityChicken['Chicken'/232, l='MpServer', x=186.53, y=64.00, z=243.56], EntityChicken['Chicken'/233, l='MpServer', x=196.50, y=64.00, z=240.50], EntityChicken['Chicken'/234, l='MpServer', x=203.47, y=65.00, z=243.53], EntityChicken['Chicken'/235, l='MpServer', x=193.63, y=63.00, z=243.41], EntitySheep['Sheep'/236, l='MpServer', x=201.88, y=73.00, z=309.03], EntitySheep['Sheep'/237, l='MpServer', x=193.03, y=76.00, z=303.50], EntityPig['Pig'/238, l='MpServer', x=193.78, y=75.00, z=307.50], EntityPig['Pig'/239, l='MpServer', x=195.81, y=74.00, z=311.31], EntitySheep['Sheep'/240, l='MpServer', x=195.22, y=74.00, z=309.81], EntityPig['Pig'/241, l='MpServer', x=201.69, y=70.00, z=316.53], EntityPig['Pig'/247, l='MpServer', x=220.72, y=77.00, z=228.09], EntityPig['Pig'/248, l='MpServer', x=223.50, y=76.00, z=245.50], EntityPig['Pig'/249, l='MpServer', x=220.50, y=75.00, z=245.50], EntityZombie['Zombie'/250, l='MpServer', x=223.34, y=38.00, z=274.34], EntityPig['Pig'/251, l='MpServer', x=218.56, y=71.00, z=315.72], EntityPig['Pig'/252, l='MpServer', x=219.84, y=71.00, z=316.16], EntityPig['Pig'/253, l='MpServer', x=217.41, y=71.00, z=316.59], EntityPig['Pig'/254, l='MpServer', x=222.38, y=71.00, z=310.22]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)

at net.minecraft.client.Minecraft.run(Minecraft.java:984)

at net.minecraft.client.main.Main.main(Main.java:164)

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:497)

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

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

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 10 (amd64) version 10.0

Java Version: 1.8.0_60, Oracle Corporation

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

Memory: 604532672 bytes (576 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

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

IntCache: cache: 1, tcache: 1, allocated: 12, tallocated: 94

FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active

States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)

UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)

UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)

UCHIJAAAA yummy{1.0} [Yummy!] (bin)

GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.4331' Renderer: 'Intel® HD Graphics 4600'

Launched Version: 1.7.10

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics 4600 GL version 4.3.0 - Build 20.19.15.4331, Intel

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)

[12:08:16] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Rachel\Desktop\ModdingShit\eclipse\.\crash-reports\crash-2016-02-07_12.08.16-client.txt

AL lib: (EE) alc_cleanup: 1 device not closed

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

 

 

 

package com.rnh.Yummy.Trees.Logs;

import java.util.List;

import com.rnh.Yummy.Yummy;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;

public class Log extends BlockLog{

public static final String[] logs = new String[] { "Apple", "banana"};

@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tabs, List list){
	 for (int i = 0; i < logs.length; i++) {
    	   list.add(new ItemStack( item ,1 ,i));
       }
}
@SideOnly(Side.CLIENT)
public void registerBLockIcons ( IIconRegister icon){
	this.field_150167_a = new IIcon[logs.length];
	this.field_150166_b = new IIcon[logs.length];

	for (int i = 0; i < this.field_150167_a.length; i++){
		this.field_150167_a[i] =icon.registerIcon(Yummy.MODID + this.getTextureName() + logs[i]);
		this.field_150166_b[i] =icon.registerIcon(Yummy.MODID + this.getTextureName() + logs[i] + "top");

	}
}
}


and heres my ItemBlock Class

package com.rnh.Yummy.ItemBlocks;

import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;

public class ItemLogBlocks extends ItemBlock {

public static final String[] logs = new String[]{"Apple","Banana"};

public ItemLogBlocks(Block block) {
	super(block);
	this.setHasSubtypes(true);


}
public String getUnlocalizedName(ItemStack itemstack) {
int i = itemstack.getItemDamage();
if ( i < 0 || i >= logs.length){
	i = 0;
}
return super.getUnlocalizedName() + "." + logs[i];
}
public int getMetadata (int meta){
return meta;
}
}

 

I would really appreciate is someone explained what went wrong here, and taught me the right way to do it.

Please forgive me if I seem incompetent. I'm still learning.

 

Thank you. <3

Posted

I was following a tutorial and I understand the content of it I'm just getting different results then shown.

I'm trying to learn what it does, the best way I know is by trial and error. I can only figure out so much by myself, so that's why I ask questions like this.

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.