Posted May 11, 201510 yr When I destroy my coconut leaves. I getting crash like this, need help! Block: package stevekung.mods.moreplanets.planets.fronos.blocks; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.util.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import stevekung.mods.moreplanets.core.MorePlanetsCore; public class BlockCoconut extends BlockFalling { public static PropertyBool HAS_LEAVES = PropertyBool.create("has_coconut_leaves"); public BlockCoconut(String name) { super(Material.wood); this.setBlockBounds(0.2F, 0.2F, 0.2F, 0.8F, 0.8F, 0.8F); this.setTickRandomly(true); this.setHardness(1.5F); this.setDefaultState(this.getDefaultState().withProperty(HAS_LEAVES, Boolean.valueOf(false))); this.setStepSound(soundTypeWood); this.setUnlocalizedName(name); } @Override public int damageDropped(IBlockState state) { return 0; } @Override public CreativeTabs getCreativeTabToDisplayOn() { return MorePlanetsCore.mpBlocksTab; } @Override public boolean isFullCube() { return false; } @Override public boolean isOpaqueCube() { return false; } @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) { if (!(world.getBlockState(pos.up()).getBlock() == FronosBlocks.fronos_colorized_leaves)) { world.scheduleUpdate(pos, this, this.tickRate(world)); } } @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { if (!world.isRemote) { if (!(world.getBlockState(pos.up()).getBlock() == FronosBlocks.fronos_colorized_leaves)) { super.updateTick(world, pos, state, rand); } } } @Override public void onFallenUpon(World world, BlockPos pos, Entity entity, float distance) { if (!world.isRemote && world.rand.nextInt(100) == 0) { world.playSoundEffect(pos.getX(), pos.getY(), pos.getZ(), "dig.wood", 5.0F, 1.2F); world.setBlockState(pos, FronosBlocks.coconut_milk.getDefaultState()); } } @Override public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) { Block block = world.getBlockState(pos.up()).getBlock(); return state.withProperty(HAS_LEAVES, Boolean.valueOf(block == FronosBlocks.fronos_colorized_leaves)); } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(HAS_LEAVES, Boolean.valueOf((meta & 1) == 1)); } @Override public int getMetaFromState(IBlockState state) { return ((Boolean)state.getValue(HAS_LEAVES)).booleanValue() ? 1 : 0; } @Override protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {HAS_LEAVES}); } } Crash: ---- Minecraft Crash Report ---- WARNING: coremods are present: NEICorePlugin (NotEnoughItems-1.8-1.0.5.93-dev.jar) CCCDeobfPlugin (unknown) CCLCorePlugin (CodeChickenLib-1.8-1.1.2.132-dev.jar) CodeChickenCorePlugin (CodeChickenCore-1.8-1.0.5.34-dev.jar) MorePlanetsPlugin (bin) Contact their authors BEFORE contacting forge // Uh... Did I do that? Time: 11/5/2558, 12:44 น. Description: Rendering entity in world java.lang.NullPointerException: Rendering entity in world at stevekung.mods.moreplanets.planets.fronos.blocks.BlockCoconut.getActualState(BlockCoconut.java:92) at net.minecraft.block.Block.getExtendedState(Block.java:2247) at net.minecraft.client.renderer.BlockRendererDispatcher.getModelFromBlockState(BlockRendererDispatcher.java:134) at net.minecraft.client.renderer.entity.RenderFallingBlock.doRender(RenderFallingBlock.java:60) at net.minecraft.client.renderer.entity.RenderFallingBlock.doRender(RenderFallingBlock.java:97) at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:377) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:334) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:301) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:657) at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1350) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1088) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) at net.minecraft.client.Minecraft.run(Minecraft.java:376) at net.minecraft.client.main.Main.main(Main.java:117) 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: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 stevekung.mods.moreplanets.planets.fronos.blocks.BlockCoconut.getActualState(BlockCoconut.java:92) at net.minecraft.block.Block.getExtendedState(Block.java:2247) at net.minecraft.client.renderer.BlockRendererDispatcher.getModelFromBlockState(BlockRendererDispatcher.java:134) at net.minecraft.client.renderer.entity.RenderFallingBlock.doRender(RenderFallingBlock.java:60) at net.minecraft.client.renderer.entity.RenderFallingBlock.doRender(RenderFallingBlock.java:97) -- Entity being rendered -- Details: Entity Type: FallingSand (net.minecraft.entity.item.EntityFallingBlock) Entity ID: 815 Entity Name: Falling Block Entity's Exact location: 725.50, 56.92, 482.50 Entity's Block location: 725.00,56.00,482.00 - World: (725,56,482), Chunk: (at 5,3,2 in 45,30; contains blocks 720,0,480 to 735,255,495), Region: (1,0; contains chunks 32,0 to 63,31, blocks 512,0,0 to 1023,255,511) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Rider: ~~ERROR~~ NullPointerException: null Entity's Vehicle: ~~ERROR~~ NullPointerException: null Immitating block ID: 512 Immitating block data: 0 -- Renderer details -- Details: Assigned renderer: net.minecraft.client.renderer.entity.RenderFallingBlock@e153ed Location: -2.04,0.96,0.71 - World: (-3,0,0), Chunk: (at 13,0,0 in -1,0; contains blocks -16,0,0 to -1,255,15), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Rotation: 0.0 Delta: 0.5415534 Stacktrace: at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:377) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:334) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:301) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:657) at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1350) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player179'/2, l='MpServer', x=727.54, y=56.00, z=481.79]] Chunk stats: MultiplayerChunkCache: 287, 287 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: 699.00,4.00,360.00 - World: (699,4,360), Chunk: (at 11,0,8 in 43,22; contains blocks 688,0,352 to 703,255,367), Region: (1,0; contains chunks 32,0 to 63,31, blocks 512,0,0 to 1023,255,511) Level time: 1546163 game time, 6000 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: 2 total; [EntityPlayerSP['Player179'/2, l='MpServer', x=727.54, y=56.00, z=481.79], EntityFallingBlock['Falling Block'/815, l='MpServer', x=725.50, y=56.92, z=482.50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:392) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2606) at net.minecraft.client.Minecraft.run(Minecraft.java:398) at net.minecraft.client.main.Main.main(Main.java:117) 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: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.8 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 721352728 bytes (687 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.76.1402 Minecraft Forge 11.14.1.1402 9 mods loaded, 9 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{8.0.76.1402} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1402.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{11.14.1.1402} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1402.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available CodeChickenCore{1.0.5.34} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available NotEnoughItems{1.0.5.93} [Not Enough Items] (NotEnoughItems-1.8-1.0.5.93-dev.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available BiomesOPlenty{1.0} [biomes O' Plenty] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available minecraftbyexample{1.0} [minecraftbyexample] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available MorePlanets{2.0.0} [More Planets] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available DamageIndicatorsMod{3.3.3} [Damage Indicators] ([1.8]DamageIndicatorsMod-3.3.3.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Loaded coremods (and transformers): NEICorePlugin (NotEnoughItems-1.8-1.0.5.93-dev.jar) codechicken.nei.asm.NEITransformer CCCDeobfPlugin (unknown) CCLCorePlugin (CodeChickenLib-1.8-1.1.2.132-dev.jar) codechicken.lib.asm.ClassHeirachyManager codechicken.lib.asm.RenderHookTransformer CodeChickenCorePlugin (CodeChickenCore-1.8-1.0.5.34-dev.jar) codechicken.core.asm.InterfaceDependancyTransformer codechicken.core.asm.TweakTransformer codechicken.core.asm.DelegatedTransformer codechicken.core.asm.DefaultImplementationTransformer MorePlanetsPlugin (bin) stevekung.mods.moreplanets.plugin.asm.MorePlanetsTransformer Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce 9500 GT/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No 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)
May 12, 201510 yr if(pos == null) { use_a_default } else { current_code } Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.