Jump to content

Recommended Posts

Posted

When I harvest my block with pickaxe and block is destroyed make my game crashed.

 

My block code

 

package stevekung.mods.moreplanets.planets.diona.blocks;

 

import java.util.List;

import java.util.Random;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.block.properties.IProperty;

import net.minecraft.block.properties.PropertyEnum;

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.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.util.BlockPos;

import net.minecraft.util.EnumParticleTypes;

import net.minecraft.util.IStringSerializable;

import net.minecraft.world.World;

import net.minecraftforge.fml.relauncher.Side;

import net.minecraftforge.fml.relauncher.SideOnly;

import stevekung.mods.moreplanets.core.blocks.BlockBasicMP;

 

public class BlockBasicDiona extends BlockBasicMP /*implements IDetectableResource, ITerraformableBlock*/

{

public static PropertyEnum VARIANT = PropertyEnum.create("variant", BlockType.class);

 

public BlockBasicDiona(String name)

{

super(Material.rock);

this.setDefaultState(getDefaultState().withProperty(VARIANT, BlockType.diona_surface_rock));

this.setUnlocalizedName(name);

}

 

@Override

@SideOnly(Side.CLIENT)

public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)

{

for (int i = 0; i < 15; ++i)

{

list.add(new ItemStack(this, 1, i));

}

}

 

@Override

public float getBlockHardness(World world, BlockPos pos)

{

int meta = this.getMetaFromState(world.getBlockState(pos));

 

if (meta == 2)

{

return 2.75F;

}

if (meta == 3)

{

return 2.5F;

}

if (meta == 0 || meta == 1 || meta >= 4 && meta <= 9)

{

return 3.0F;

}

if (meta >= 10 && meta <= 13)

{

return 3.25F;

}

if (meta == 14)

{

return 4.0F;

}

if (meta == 15)

{

return -1.0F;

}

return 1.0F;

}

 

@Override

public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity)

{

super.onEntityCollidedWithBlock(world, pos, state, entity);

 

if (state == state.withProperty(VARIANT, BlockType.diona_dungeon_brick))

{

for (int i = 0; i < 1; i++)

{

world.spawnParticle(EnumParticleTypes.BLOCK_CRACK, pos.getX() + world.rand.nextFloat(), pos.getY() + 1.0F, pos.getZ() + world.rand.nextFloat(), 0.0D, 0.0D, 0.0D, new int[] {Block.getStateId(state.withProperty(VARIANT, BlockType.diona_dungeon_brick))});

}

}

}

 

@Override

public Item getItemDropped(IBlockState state, Random rand, int fortune)

{

int meta = this.getMetaFromState(state);

 

if (meta == 2)

{

return Item.getItemFromBlock(DionaBlocks.diona_block);

}

/*if (meta == 8)

{

return GCItems.basicItem;

}*/

return Item.getItemFromBlock(this);

}

 

@Override

public int damageDropped(IBlockState state)

{

int meta = this.getMetaFromState(state);

 

if (meta == 2)

{

return 3;

}

if (meta == 8)

{

return 2;

}

return meta;

}

 

/*@Override

public boolean isValueable(IBlockState state)

{

int meta = this.getMetaFromState(state);

 

if (meta >= 4 && meta <= 9)

{

return true;

}

return false;

}

 

@Override

public boolean isTerraformable(World world, BlockPos pos, IBlockState state)

{

int meta = this.getMetaFromState(state);

 

if (meta == 0 || meta == 1)

{

return true;

}

return false;

}*/

 

@Override

public IBlockState getDungeonSpawnerBlock(IBlockState state)

{

return state.withProperty(VARIANT, BlockType.diona_dungeon_spawner);

}

 

@Override

public TileEntity getDungeonSpawner()

{

return null;

}

 

@Override

protected BlockState createBlockState()

{

return new BlockState(this, new IProperty[] { VARIANT });

}

 

@Override

public IBlockState getStateFromMeta(int meta)

{

return this.getDefaultState().withProperty(VARIANT, BlockType.values()[meta]);

}

 

@Override

public int getMetaFromState(IBlockState state)

{

return ((BlockType)state.getValue(VARIANT)).ordinal();

}

 

public static enum BlockType implements IStringSerializable

{

diona_surface_rock,

diona_sub_surface_rock,

diona_rock,

diona_cobblestone,

quontonium_ore,

fronisium_ore,

diona_tin_ore,

diona_copper_ore,

diona_silicon_ore,

diona_aluminum_ore,

quontonium_block,

smooth_quontonium,

quontonium_brick,

chiseled_quontonium,

diona_dungeon_brick,

diona_dungeon_spawner;

 

@Override

public String toString()

{

return this.getName();

}

 

@Override

public String getName()

{

return this.name();

}

}

}

 

 

Crash

 

 

---- Minecraft Crash Report ----

// Why did you do that?

 

Time: 28/2/2558, 10:37 น.

Description: Unexpected error

 

java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=variant, clazz=class stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona$BlockType, values=[diona_surface_rock, diona_sub_surface_rock, diona_rock, diona_cobblestone, quontonium_ore, fronisium_ore, diona_tin_ore, diona_copper_ore, diona_silicon_ore, diona_aluminum_ore, quontonium_block, smooth_quontonium, quontonium_brick, chiseled_quontonium, diona_dungeon_brick, diona_dungeon_spawner]} as it does not exist in BlockState{block=minecraft:air, properties=[]}

at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:167)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getMetaFromState(BlockBasicDiona.java:175)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getBlockHardness(BlockBasicDiona.java:49)

at net.minecraft.item.ItemTool.onBlockDestroyed(ItemTool.java:71)

at net.minecraft.item.ItemStack.onBlockDestroyed(ItemStack.java:392)

at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:154)

at net.minecraft.client.multiplayer.PlayerControllerMP.func_180512_c(PlayerControllerMP.java:294)

at net.minecraft.client.Minecraft.sendClickBlockToController(Minecraft.java:1473)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2138)

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

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(GradleStartCommon.java:85)

at GradleStart.main(GradleStart.java:45)

 

 

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

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

 

-- Head --

Stacktrace:

at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:167)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getMetaFromState(BlockBasicDiona.java:175)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getBlockHardness(BlockBasicDiona.java:49)

at net.minecraft.item.ItemTool.onBlockDestroyed(ItemTool.java:71)

at net.minecraft.item.ItemStack.onBlockDestroyed(ItemStack.java:392)

at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:154)

at net.minecraft.client.multiplayer.PlayerControllerMP.func_180512_c(PlayerControllerMP.java:294)

at net.minecraft.client.Minecraft.sendClickBlockToController(Minecraft.java:1473)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityPlayerSP['Player997'/0, l='MpServer', x=-254.93, y=56.00, z=-212.11]]

Chunk stats: MultiplayerChunkCache: 272, 272

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: -259.00,4.00,-209.00 - World: (-259,4,-209), Chunk: (at 13,0,15 in -17,-14; contains blocks -272,0,-224 to -257,255,-209), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)

Level time: 500681 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: 1 total; [EntityPlayerSP['Player997'/0, l='MpServer', x=-254.93, y=56.00, z=-212.11]]

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

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

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(GradleStartCommon.java:85)

at GradleStart.main(GradleStart.java:45)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_71, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 793653656 bytes (756 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.37.1329 Minecraft Forge 11.14.1.1329 13 mods loaded, 13 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{8.0.37.1329} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1329.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{11.14.1.1329} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1329.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

realmsofchaos{Alpha 1.1} [realmsofchaos] (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

EntityGhost{2.0.0} [Entity Ghost Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

SteveIceBucket{1.0.3} [steve's Ice Bucket] (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

Squicken{1.0.0} [squickens] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

SteveCore{1.0.2} [steve's Core] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Uncrafter{1.8.0} [uncrafter] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

YouTuber{1.0.0} [Test Block] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Loaded coremods (and transformers):

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)

 

Posted

Hi

 

Looks to me like getHardness is being called for your block when it's no longer your block.  I've seen similar things before in block mining, I don't know why it occurs...

 

You could verify by

 

  @Override
   public float getBlockHardness(World world, BlockPos pos)
   {
      IBlockState iblockState = world.getBlockState(pos);
      System.out.println("getBlockHardness called at pos " + pos + " giving blockstate " + iblockState);
      int meta = this.getMetaFromState(world.getBlockState(pos));

 

-TGG

 

 

 

Posted

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [server thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:34] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate minecraft:air

[22:56:35] [server thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:35] [server thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate moreplanets:diona_block[variant=quontonium_ore]

[22:56:36] [server thread/INFO]: Stopping server

[22:56:36] [server thread/INFO]: Saving players

[22:56:36] [server thread/INFO]: Saving worlds

[22:56:36] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

[22:56:36] [server thread/INFO]: Saving chunks for level 'New World'/Nether

[22:56:36] [server thread/INFO]: Saving chunks for level 'New World'/The End

[22:56:36] [server thread/INFO]: Saving chunks for level 'New World'/Ice Ruins

[22:56:36] [server thread/INFO]: Saving chunks for level 'New World'/Water

[22:56:36] [server thread/INFO] [FML]: Unloading dimension 0

[22:56:36] [server thread/INFO] [FML]: Unloading dimension -1

[22:56:36] [server thread/INFO] [FML]: Unloading dimension 1

[22:56:36] [server thread/INFO] [FML]: Unloading dimension 24

[22:56:36] [server thread/INFO] [FML]: Unloading dimension 23

[22:56:36] [server thread/INFO] [FML]: Applying holder lookups

[22:56:38] [server thread/INFO] [FML]: Holder lookups applied

[22:56:38] [Client thread/FATAL]: Unreported exception thrown!

java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=variant, clazz=class stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona$BlockType, values=[diona_surface_rock, diona_sub_surface_rock, diona_rock, diona_cobblestone, quontonium_ore, fronisium_ore, diona_tin_ore, diona_copper_ore, diona_silicon_ore, diona_aluminum_ore, quontonium_block, smooth_quontonium, quontonium_brick, chiseled_quontonium, diona_dungeon_brick, diona_dungeon_spawner]} as it does not exist in BlockState{block=minecraft:air, properties=[]}

at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:167) ~[blockState$StateImplementation.class:?]

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getMetaFromState(BlockBasicDiona.java:177) ~[blockBasicDiona.class:?]

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getBlockHardness(BlockBasicDiona.java:51) ~[blockBasicDiona.class:?]

at com.eternaldoom.realmsofchaos.items.ItemROCTool.onBlockDestroyed(ItemROCTool.java:85) ~[itemROCTool.class:?]

at net.minecraft.item.ItemStack.onBlockDestroyed(ItemStack.java:392) ~[itemStack.class:?]

at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:154) ~[PlayerControllerMP.class:?]

at net.minecraft.client.multiplayer.PlayerControllerMP.func_180512_c(PlayerControllerMP.java:294) ~[PlayerControllerMP.class:?]

at net.minecraft.client.Minecraft.sendClickBlockToController(Minecraft.java:1473) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2138) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1081) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) [start/:?]

at GradleStart.main(GradleStart.java:45) [start/:?]

[22:56:38] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----

// Oh - I know what I did wrong!

 

Time: 1/3/2558, 22:56 ٮ

Description: Unexpected error

 

java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=variant, clazz=class stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona$BlockType, values=[diona_surface_rock, diona_sub_surface_rock, diona_rock, diona_cobblestone, quontonium_ore, fronisium_ore, diona_tin_ore, diona_copper_ore, diona_silicon_ore, diona_aluminum_ore, quontonium_block, smooth_quontonium, quontonium_brick, chiseled_quontonium, diona_dungeon_brick, diona_dungeon_spawner]} as it does not exist in BlockState{block=minecraft:air, properties=[]}

at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:167)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getMetaFromState(BlockBasicDiona.java:177)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getBlockHardness(BlockBasicDiona.java:51)

at com.eternaldoom.realmsofchaos.items.ItemROCTool.onBlockDestroyed(ItemROCTool.java:85)

at net.minecraft.item.ItemStack.onBlockDestroyed(ItemStack.java:392)

at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:154)

at net.minecraft.client.multiplayer.PlayerControllerMP.func_180512_c(PlayerControllerMP.java:294)

at net.minecraft.client.Minecraft.sendClickBlockToController(Minecraft.java:1473)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2138)

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

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(GradleStartCommon.java:85)

at GradleStart.main(GradleStart.java:45)

 

 

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

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

 

-- Head --

Stacktrace:

at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:167)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getMetaFromState(BlockBasicDiona.java:177)

at stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona.getBlockHardness(BlockBasicDiona.java:51)

at com.eternaldoom.realmsofchaos.items.ItemROCTool.onBlockDestroyed(ItemROCTool.java:85)

at net.minecraft.item.ItemStack.onBlockDestroyed(ItemStack.java:392)

at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:154)

at net.minecraft.client.multiplayer.PlayerControllerMP.func_180512_c(PlayerControllerMP.java:294)

at net.minecraft.client.Minecraft.sendClickBlockToController(Minecraft.java:1473)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityPlayerSP['Player77'/1234, l='MpServer', x=-294.80, y=56.00, z=-219.94]]

Chunk stats: MultiplayerChunkCache: 289, 289

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: -259.00,4.00,-209.00 - World: (-259,4,-209), Chunk: (at 13,0,15 in -17,-14; contains blocks -272,0,-224 to -257,255,-209), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)

Level time: 1030905 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: survival (ID 0). Hardcore: false. Cheats: false

Forced entities: 82 total; [EntityCreamSlime['entity.CreamSlime.name'/0, l='MpServer', x=-331.69, y=56.26, z=-238.28], EntityCreamSlime['entity.CreamSlime.name'/1, l='MpServer', x=-305.09, y=56.02, z=-242.94], EntityStrawberryCreamBall['entity.MorePlanets.StrawberryCreamBall.name'/59320, l='MpServer', x=-316.84, y=56.53, z=-221.44], EntityCreamGolem['entity.CreamGolem.name'/2, l='MpServer', x=-318.63, y=56.00, z=-229.72], EntityCreamSlime['entity.CreamSlime.name'/3, l='MpServer', x=-317.75, y=56.00, z=-220.88], EntityCreamSlime['entity.CreamSlime.name'/4, l='MpServer', x=-320.43, y=56.01, z=-210.51], EntityCreamSlime['entity.CreamSlime.name'/5, l='MpServer', x=-308.48, y=56.14, z=-177.09], EntityJellySlime['entity.JellySlime.name'/6, l='MpServer', x=-287.75, y=56.02, z=-257.66], EntityJellySlime['entity.JellySlime.name'/7, l='MpServer', x=-285.39, y=56.53, z=-261.81], EntityCreamSlime['entity.CreamSlime.name'/8, l='MpServer', x=-286.53, y=56.52, z=-239.81], EntityCreamCat['entity.CreamCat.name'/9, l='MpServer', x=-295.47, y=56.00, z=-257.38], EntityCreamGolem['entity.CreamGolem.name'/10, l='MpServer', x=-286.81, y=56.00, z=-245.94], EntityCreamSlime['entity.CreamSlime.name'/11, l='MpServer', x=-303.69, y=56.00, z=-243.63], EntityCreamSlime['entity.CreamSlime.name'/12, l='MpServer', x=-281.48, y=57.16, z=-252.14], EntityCreamSlime['entity.CreamSlime.name'/13, l='MpServer', x=-295.14, y=56.93, z=-252.82], EntityCreamSlime['entity.CreamSlime.name'/14, l='MpServer', x=-277.28, y=56.02, z=-243.66], EntityCreamSlime['entity.CreamSlime.name'/15, l='MpServer', x=-297.13, y=56.26, z=-241.57], EntityCreamSlime['entity.CreamSlime.name'/17, l='MpServer', x=-303.08, y=56.93, z=-228.34], EntityCreamSlime['entity.CreamSlime.name'/16, l='MpServer', x=-312.16, y=57.07, z=-209.22], EntityCreamSlime['entity.CreamSlime.name'/19, l='MpServer', x=-286.90, y=56.07, z=-232.07], EntityCreamSlime['entity.CreamSlime.name'/18, l='MpServer', x=-279.56, y=56.02, z=-229.94], EntityCreamSlime['entity.CreamSlime.name'/21, l='MpServer', x=-295.81, y=57.16, z=-238.17], EntityCreamSlime['entity.CreamSlime.name'/20, l='MpServer', x=-294.94, y=56.02, z=-223.47], EntityCreamSlime['entity.CreamSlime.name'/23, l='MpServer', x=-289.38, y=56.02, z=-210.72], EntityCreamSlime['entity.CreamSlime.name'/22, l='MpServer', x=-293.26, y=56.07, z=-232.46], EntityCreamSlime['entity.CreamSlime.name'/25, l='MpServer', x=-280.19, y=56.02, z=-222.09], EntityCreamGolem['entity.CreamGolem.name'/24, l='MpServer', x=-299.53, y=56.00, z=-205.69], EntityChocolateCreamBall['entity.MorePlanets.ChocolateCreamBall.name'/59456, l='MpServer', x=-199.82, y=56.86, z=-207.85], EntityCreamSlime['entity.CreamSlime.name'/27, l='MpServer', x=-301.66, y=56.02, z=-228.66], EntityCreamSlime['entity.CreamSlime.name'/26, l='MpServer', x=-298.56, y=56.01, z=-196.66], EntityCreamSlime['entity.CreamSlime.name'/29, l='MpServer', x=-299.35, y=57.15, z=-215.00], EntityJellySlime['entity.JellySlime.name'/31, l='MpServer', x=-277.97, y=56.00, z=-232.59], EntityCreamSlime['entity.CreamSlime.name'/30, l='MpServer', x=-292.06, y=56.00, z=-218.53], EntityJellySlime['entity.JellySlime.name'/34, l='MpServer', x=-283.34, y=56.02, z=-238.69], EntityJellySlime['entity.JellySlime.name'/35, l='MpServer', x=-286.78, y=57.07, z=-249.43], EntityCreamSlime['entity.CreamSlime.name'/32, l='MpServer', x=-280.72, y=56.02, z=-247.44], EntityCreamSlime['entity.CreamSlime.name'/33, l='MpServer', x=-285.65, y=57.07, z=-238.31], EntityJellySlime['entity.JellySlime.name'/38, l='MpServer', x=-266.84, y=56.02, z=-254.41], EntityCreamSlime['entity.CreamSlime.name'/39, l='MpServer', x=-284.18, y=57.15, z=-249.64], EntityJellySlime['entity.JellySlime.name'/36, l='MpServer', x=-278.72, y=56.14, z=-249.75], EntityJellySlime['entity.JellySlime.name'/37, l='MpServer', x=-306.06, y=56.00, z=-247.78], EntityCreamSlime['entity.CreamSlime.name'/42, l='MpServer', x=-291.22, y=56.02, z=-241.84], EntityCreamSlime['entity.CreamSlime.name'/43, l='MpServer', x=-296.13, y=56.53, z=-230.49], EntityJellySlime['entity.JellySlime.name'/40, l='MpServer', x=-275.75, y=56.00, z=-242.09], EntityJellySlime['entity.JellySlime.name'/41, l='MpServer', x=-285.72, y=56.53, z=-226.04], EntityJellySlime['entity.JellySlime.name'/46, l='MpServer', x=-281.66, y=56.53, z=-229.09], EntityCreamSlime['entity.CreamSlime.name'/47, l='MpServer', x=-275.01, y=56.00, z=-229.59], EntityJellySlime['entity.JellySlime.name'/44, l='MpServer', x=-279.44, y=57.16, z=-238.16], EntityJellySlime['entity.JellySlime.name'/45, l='MpServer', x=-283.25, y=56.02, z=-230.50], EntityJellySlime['entity.JellySlime.name'/51, l='MpServer', x=-272.66, y=56.01, z=-229.28], EntityCreamSlime['entity.CreamSlime.name'/50, l='MpServer', x=-276.00, y=56.02, z=-230.44], EntityLemonCreamBall['entity.MorePlanets.LemonCreamBall.name'/59619, l='MpServer', x=-299.59, y=57.34, z=-199.78], EntityCreamSlime['entity.CreamSlime.name'/49, l='MpServer', x=-278.63, y=54.02, z=-219.50], EntityCreamSlime['entity.CreamSlime.name'/48, l='MpServer', x=-273.49, y=57.16, z=-240.84], EntityCreamGolem['entity.CreamGolem.name'/55, l='MpServer', x=-249.69, y=56.00, z=-266.91], EntityCreamCat['entity.CreamCat.name'/54, l='MpServer', x=-262.84, y=56.00, z=-258.38], EntityJellySlime['entity.JellySlime.name'/53, l='MpServer', x=-279.41, y=55.02, z=-211.47], EntityCreamGolem['entity.CreamGolem.name'/52, l='MpServer', x=-279.47, y=56.00, z=-224.97], EntityJellySlime['entity.JellySlime.name'/59, l='MpServer', x=-250.22, y=56.02, z=-264.56], EntityJellySlime['entity.JellySlime.name'/58, l='MpServer', x=-277.69, y=56.02, z=-234.69], EntityJellySlime['entity.JellySlime.name'/57, l='MpServer', x=-256.19, y=56.91, z=-252.17], EntityJellySlime['entity.JellySlime.name'/56, l='MpServer', x=-240.53, y=56.00, z=-269.00], EntityJellySlime['entity.JellySlime.name'/63, l='MpServer', x=-280.95, y=56.01, z=-244.16], EntityCreamSlime['entity.CreamSlime.name'/62, l='MpServer', x=-267.31, y=56.02, z=-247.06], EntityLemonCreamBall['entity.MorePlanets.LemonCreamBall.name'/59900, l='MpServer', x=-246.56, y=56.72, z=-267.63], EntityJellySlime['entity.JellySlime.name'/61, l='MpServer', x=-275.16, y=56.02, z=-240.09], EntityJellySlime['entity.JellySlime.name'/60, l='MpServer', x=-267.97, y=56.02, z=-253.38], EntityJellySlime['entity.JellySlime.name'/68, l='MpServer', x=-273.60, y=56.00, z=-228.92], EntityCreamSlime['entity.CreamSlime.name'/69, l='MpServer', x=-269.76, y=56.70, z=-242.32], EntityCreamCat['entity.CreamCat.name'/70, l='MpServer', x=-257.59, y=56.00, z=-213.63], EntityJellySlime['entity.JellySlime.name'/71, l='MpServer', x=-253.95, y=56.32, z=-222.38], EntityCreamGolem['entity.CreamGolem.name'/64, l='MpServer', x=-271.44, y=56.00, z=-245.03], EntityJellySlime['entity.JellySlime.name'/65, l='MpServer', x=-276.91, y=56.07, z=-224.52], EntityJellySlime['entity.JellySlime.name'/66, l='MpServer', x=-275.07, y=57.16, z=-233.06], EntityCreamGolem['entity.CreamGolem.name'/67, l='MpServer', x=-273.93, y=56.00, z=-229.72], EntityOrangeCreamBall['entity.MorePlanets.OrangeCreamBall.name'/60090, l='MpServer', x=-274.94, y=57.38, z=-228.31], EntityStrawberryCreamBall['entity.MorePlanets.StrawberryCreamBall.name'/60091, l='MpServer', x=-205.38, y=57.81, z=-204.06], EntityJellySlime['entity.JellySlime.name'/72, l='MpServer', x=-237.44, y=57.07, z=-251.72], EntityCreamSlime['entity.CreamSlime.name'/73, l='MpServer', x=-241.97, y=56.01, z=-243.47], EntityOrangeCreamBall['entity.MorePlanets.OrangeCreamBall.name'/60094, l='MpServer', x=-205.56, y=57.53, z=-204.97], EntityCreamSlime['entity.CreamSlime.name'/74, l='MpServer', x=-246.80, y=56.32, z=-257.30], EntityPlayerSP['Player77'/1234, l='MpServer', x=-294.80, y=56.00, z=-219.94]]

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

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

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(GradleStartCommon.java:85)

at GradleStart.main(GradleStart.java:45)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_71, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 819133176 bytes (781 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.37.1329 Minecraft Forge 11.14.1.1329 13 mods loaded, 13 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{8.0.37.1329} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1329.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{11.14.1.1329} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1329.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

realmsofchaos{Alpha 1.1} [realmsofchaos] (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

EntityGhost{2.0.0} [Entity Ghost Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

SteveIceBucket{1.0.3} [steve's Ice Bucket] (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

Squicken{1.0.0} [squickens] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

SteveCore{1.0.2} [steve's Core] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Uncrafter{1.8.0} [uncrafter] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

YouTuber{1.0.0} [Test Block] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Loaded coremods (and transformers):

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)

[22:56:38] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: #@!@# Game crashed! Crash report saved to: #@!@# M:\SteveKunG's Mod 1.8\eclipse\.\crash-reports\crash-2558-03-01_22.56.38-client.txt

[22:56:38] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.

[22:56:38] [Client thread/INFO] [FML]: Server terminated.

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

 

How I do fix that?

Posted

Hi

 

Well here's the proof

 

[22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate minecraft:air

 

Probably the best thing you can do is to make your code tolerant of being passed air.

 

For example

  @Override
   public float getBlockHardness(World world, BlockPos pos)
   {
      IBlockState iblockState = world.getBlockState(pos);
      Block block = iBlockState.getBlock();
      if (!(block instanceof BlockType)) return;
      int meta = this.getMetaFromState(world.getBlockState(pos));
     // etc
[code]

-TGG

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.