Posted April 11, 201411 yr Okay, so, I tried to make some custom stairs, but its not working...I'm getting this error: ---- Minecraft Crash Report ---- // Would you like a cupcake? Time: 4/10/14 6:50 PM Description: Rendering item java.lang.NullPointerException: Rendering item at sureen.core.blocks.SureenStairsBlock.getIcon(SureenStairsBlock.java:441) at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:720) at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51) at net.minecraft.item.Item.getIconIndex(Item.java:471) at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:139) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:422) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:565) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:305) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:132) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:678) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1209) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1063) at net.minecraft.client.Minecraft.run(Minecraft.java:951) 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 sureen.core.blocks.SureenStairsBlock.getIcon(SureenStairsBlock.java:441) at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:720) at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51) at net.minecraft.item.Item.getIconIndex(Item.java:471) at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:139) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:422) -- Item being rendered -- Details: Item Type: net.minecraft.item.ItemBlock@5dbb107e Item Aux: 0 Item NBT: null Item Foil: false Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:565) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:305) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:132) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:678) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (137, 42). Absolute: (274, 394) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player231'/181, l='MpServer', x=305.62, y=82.15, z=-2632.52]] Chunk stats: MultiplayerChunkCache: 225, 225 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (196,64,248), Chunk: (at 4,4,8 in 12,15; contains blocks 192,0,240 to 207,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 163254 game time, 5061 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: 44 total; [EntityTTSnim['TTSnim'/275, l='MpServer', x=300.47, y=75.00, z=-2632.09], EntityBat['Bat'/274, l='MpServer', x=291.64, y=22.48, z=-2671.41], EntityTTSnim['TTSnim'/276, l='MpServer', x=299.94, y=63.00, z=-2580.50], EntityClientPlayerMP['Player231'/181, l='MpServer', x=305.62, y=82.15, z=-2632.52], EntityBat['Bat'/283, l='MpServer', x=317.97, y=41.10, z=-2667.31], EntityNeola['Neola'/284, l='MpServer', x=310.50, y=63.00, z=-2552.84], EntityTTSnim['TTSnim'/256, l='MpServer', x=258.50, y=65.00, z=-2559.88], EntityTTSnim['TTSnim'/325, l='MpServer', x=384.34, y=71.00, z=-2515.50], EntityTTSnim['TTSnim'/257, l='MpServer', x=259.81, y=64.00, z=-2561.25], EntityTTSnim['TTSnim'/217, l='MpServer', x=204.72, y=69.00, z=-2576.47], EntityBat['Bat'/263, l='MpServer', x=280.69, y=36.01, z=-2683.95], EntityBat['Bat'/266, l='MpServer', x=280.25, y=40.10, z=-2614.56], EntityTTSnim['TTSnim'/213, l='MpServer', x=202.72, y=63.00, z=-2631.34], EntityNeola['Neola'/332, l='MpServer', x=403.03, y=75.00, z=-2739.19], EntityTTSnim['TTSnim'/214, l='MpServer', x=194.28, y=63.00, z=-2629.25], EntityChicken['Chicken'/264, l='MpServer', x=278.47, y=69.00, z=-2683.47], EntityTTSnim['TTSnim'/215, l='MpServer', x=196.59, y=70.00, z=-2614.91], EntityBat['Bat'/265, l='MpServer', x=285.17, y=20.18, z=-2659.06], EntityTTSnim['TTSnim'/305, l='MpServer', x=358.16, y=68.00, z=-2534.50], EntityTTSnim['TTSnim'/239, l='MpServer', x=242.50, y=75.00, z=-2600.94], EntityTTSnim['TTSnim'/238, l='MpServer', x=243.50, y=75.00, z=-2601.91], EntityTTSnim['TTSnim'/237, l='MpServer', x=242.09, y=75.00, z=-2601.91], EntityBat['Bat'/236, l='MpServer', x=240.47, y=34.00, z=-2648.50], EntityTTSnim['TTSnim'/235, l='MpServer', x=248.55, y=68.81, z=-2671.06], EntityTTSnim['TTSnim'/232, l='MpServer', x=224.16, y=74.00, z=-2636.84], EntityTTSnim['TTSnim'/231, l='MpServer', x=236.06, y=75.00, z=-2635.97], EntityTTSnim['TTSnim'/230, l='MpServer', x=231.31, y=66.00, z=-2654.88], EntityTTSnim['TTSnim'/229, l='MpServer', x=233.81, y=71.00, z=-2650.41], EntityBat['Bat'/228, l='MpServer', x=233.39, y=38.01, z=-2644.50], EntityTomboy['_TomBoy_'/314, l='MpServer', x=379.53, y=5.00, z=-2688.28], EntityTTSnim['TTSnim'/226, l='MpServer', x=219.28, y=70.00, z=-2567.97], EntityBat['Bat'/289, l='MpServer', x=329.28, y=45.60, z=-2677.30], EntityTTSnim['TTSnim'/252, l='MpServer', x=262.78, y=70.00, z=-2666.50], EntityBat['Bat'/290, l='MpServer', x=332.16, y=36.10, z=-2666.31], EntityTTSnim['TTSnim'/253, l='MpServer', x=264.25, y=71.00, z=-2668.22], EntityPig['Pig'/291, l='MpServer', x=329.06, y=68.00, z=-2565.13], EntityBat['Bat'/250, l='MpServer', x=268.80, y=34.66, z=-2690.38], EntityBat['Bat'/251, l='MpServer', x=263.18, y=36.00, z=-2685.60], EntityBat['Bat'/248, l='MpServer', x=261.39, y=35.84, z=-2690.71], EntityCow['Cow'/294, l='MpServer', x=349.47, y=61.00, z=-2673.34], EntityPig['Pig'/295, l='MpServer', x=346.63, y=68.00, z=-2556.22], EntityBat['Bat'/249, l='MpServer', x=262.50, y=35.71, z=-2686.60], EntityChicken['Chicken'/246, l='MpServer', x=260.56, y=68.00, z=-2707.19], EntityBat['Bat'/247, l='MpServer', x=260.25, y=36.10, z=-2703.25]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2556) at net.minecraft.client.Minecraft.run(Minecraft.java:973) 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 7 (amd64) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 750138592 bytes (715 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 30227 (1692712 bytes; 1 MB) allocated, 595 (33320 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 6 mods loaded, 6 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available craftygirls{Alpha v0.5} [The Crafty Girls Core Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Radial{Alpha v0.2} [Radial] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available sureencore{V1.0} [sureen Core] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GT 635/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation 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: 966 (54096 bytes; 0 MB) allocated, 605 (33880 bytes; 0 MB) used Anisotropic Filtering: Off (1) I have the feeling it's something wrong with my coding...I don't quite understand all of how BlockStairs works to begin with...and I have the feeling I need more then just BlockStairs to make this work...I've tried 2 different methods for this. One is by creating a block that extends BlockStairs: package craftygirls.blocks; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; public class CraftyStairs extends BlockStairs { public CraftyStairs(Block par1, int par2) { super(par1, par2); } } And one where I literally just copied BlockStairs and called it through the registry in main (I didn't copy the BlockStairs coding, I just copied the Init section that has my stairs in it): StefStairs = new new BlockStairs(CraftyGirlsMain.StefPlanks, 0).setBlockName("ttsnimstairs").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:planks_ttsnim"); GameRegistry.registerBlock(StefStairs, "ttsnimstairs"); StefBrick.setHarvestLevel("axe", 3); So...I'm left with the question...am I just stupid and the answer is clear? Or are stairs actually super complicated and I need help on this? Cause I can't seem to figure this out...so any help would be greatly appreciated.
April 11, 201411 yr This is all you have to do. Create a custom class in your mod and make it extend BlockStairs. package mod.xtronius.bc_mod.blocks.Misc; import mod.xtronius.bc_mod.creativetab.CreativeTab; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; public class BCBlockStairs extends BlockStairs { public BCBlockStairs(int par1, Block par2Block, int par3) { super(par1, par2Block, par3); this.setLightOpacity(0); this.setCreativeTab(CreativeTab.tabsBC_ModDecorativeBlocks); } public boolean isOpaqueCube(){ return false; } } Then Just initialize just like you would initialize any other block. Also Why do you have the word new typed two times? StefStairs = new new BlockStairs(CraftyGirlsMain.StefPlanks, 0).setBlockName("ttsnimstairs").setHardness(5.0F).setResistance(5.0F).setCreativeTab(CraftyGirlsCoreTabs).setBlockTextureName("craftygirls:planks_ttsnim"); GameRegistry.registerBlock(StefStairs, "ttsnimstairs"); StefBrick.setHarvestLevel("axe", 3); Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!
April 11, 201411 yr Author Whoops, that was an accident...I retyped the code by hand when I posted it here... -smacks forehead- I'm dumb...I had to initialize the planks before the stairs but didn't for some reason...so it really was something super simple that I did wrong...
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.