Jump to content

KingOfMiners

Forge Modder
  • Posts

    99
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by KingOfMiners

  1. Im Trying to make an item that when you right click the item it turns the time to night but i cant seem to get it to work package com.moreoresmod.main.items; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraft.world.WorldServer; public class NightStaff extends Item { public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn){ MinecraftServer.getServer().worldServers[].setWorldTime(6006); } }
  2. [move]THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;D ;D ;D ;D ;D ;D[/move]
  3. ---- Minecraft Crash Report ---- // I feel sad now Time: 2/28/15 12:53 PM Description: Exception ticking world java.lang.ClassCastException: com.moreoresmod.main.block.RubyOre cannot be cast to net.minecraft.block.state.IBlockState at com.moreoresmod.main.worldgeneration.RubyGeneration.generateOre(RubyGeneration.java:49) at com.moreoresmod.main.worldgeneration.RubyGeneration.generateOverworld(RubyGeneration.java:39) at com.moreoresmod.main.worldgeneration.RubyGeneration.generate(RubyGeneration.java:27) at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:270) at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1098) at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:52) at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12) at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344) at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302) at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:117) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:189) at net.minecraft.world.World.getChunkFromChunkCoords(World.java:304) at net.minecraft.world.World.getChunkFromBlockCoords(World.java:299) at net.minecraft.world.World.getBlockState(World.java:828) at net.minecraft.block.BlockStaticLiquid.updateTick(BlockStaticLiquid.java:56) at net.minecraft.block.Block.randomTick(Block.java:428) at net.minecraft.world.WorldServer.updateBlocks(WorldServer.java:454) at net.minecraft.world.WorldServer.tick(WorldServer.java:221) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:164) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.moreoresmod.main.worldgeneration.RubyGeneration.generateOre(RubyGeneration.java:49) at com.moreoresmod.main.worldgeneration.RubyGeneration.generateOverworld(RubyGeneration.java:39) at com.moreoresmod.main.worldgeneration.RubyGeneration.generate(RubyGeneration.java:27) at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:270) at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1098) at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:52) at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12) at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344) at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302) at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:117) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:189) at net.minecraft.world.World.getChunkFromChunkCoords(World.java:304) at net.minecraft.world.World.getChunkFromBlockCoords(World.java:299) at net.minecraft.world.World.getBlockState(World.java:828) at net.minecraft.block.BlockStaticLiquid.updateTick(BlockStaticLiquid.java:56) at net.minecraft.block.Block.randomTick(Block.java:428) at net.minecraft.world.WorldServer.updateBlocks(WorldServer.java:454) at net.minecraft.world.WorldServer.tick(WorldServer.java:221) -- Affected level -- Details: Level name: New World All players: 1 total; [EntityPlayerMP['Player500'/265, l='New World', x=-280.66, y=21.09, z=-202.91]] Chunk stats: ServerChunkCache: 1257 Drop: 0 Level seed: 2818109447166518196 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: 120.00,64.00,-140.00 - World: (120,64,-140), Chunk: (at 8,4,4 in 7,-9; contains blocks 112,0,-144 to 127,255,-129), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 4843 game time, 4843 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 171110 (now: false), thunder time: 50653 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:164) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:478) at java.lang.Thread.run(Unknown Source) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_31, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 724045656 bytes (690 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.10 FML v8.0.32.1320 Minecraft Forge 11.14.1.1320 5 mods loaded, 5 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{8.0.32.1320} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1320.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{11.14.1.1320} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1320.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available MoreOresMod{Pre Alpha 1.1} [MoreOresMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Loaded coremods (and transformers): Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player500'/265, l='New World', x=-280.66, y=21.09, z=-202.91]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
  4. what is the problem now i found the new BlockPos But it still crashes: package com.moreoresmod.main.worldgeneration; import java.util.Random; import com.google.common.base.Predicate; import com.moreoresmod.main.init.MoreOresModBlocks; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldProvider; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; public class RubyGeneration implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimensionId()){ case 1: generateEnd(world, random, chunkX, chunkZ); break; case 0: generateOverworld(world, random, chunkX, chunkZ); break; case -1: generateNeather(world, random, chunkX, chunkZ); break; } } public void generateEnd(World world, Random random, int x, int z){ } public void generateOverworld(World world, Random random, int x, int z){ generateOre(MoreOresModBlocks.ruby_ore, world, random, x, z, 2 ,10 , 5, 0, 100, Blocks.stone); } public void generateNeather(World world, Random random, int x, int z){ } public void generateOre(Block block, World world, Random random, int chunkX, int chunkZ, int minVienSize, int maxVienSize, int chance , int minY, int maxY, Block generateIn){ int vienSize = minVienSize + random.nextInt(maxVienSize - minVienSize); int hightRange = maxY - minY; WorldGenMinable gen = new WorldGenMinable((IBlockState) block, vienSize); for(int i = 0; i < chance; i++){ int xRand = chunkX * 16 + random.nextInt(16); int yRand = random.nextInt(hightRange) + minY; int zRand = chunkZ * 16 + random.nextInt(16); gen.generate(world, random,new BlockPos(xRand, yRand, zRand)); } } }
  5. i kind of know what BlockPos is and i dont know what a instance is in java
  6. i have alwase had troble with blockpos
  7. i know this might be getting annoying but how do i put the blockpos?
  8. what type of object like the ore or something else?
  9. Yeah no. how can i fix it?
  10. this is my ore generation class there are no errors but it crashes the game when i register the generation. please help: package com.moreoresmod.main.worldgeneration; import java.util.Random; import com.google.common.base.Predicate; import com.moreoresmod.main.init.MoreOresModBlocks; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldProvider; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; public class RubyGeneration implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimensionId()){ case 1: generateEnd(world, random, chunkX, chunkZ); break; case 0: generateOverworld(world, random, chunkX, chunkZ); break; case -1: generateNeather(world, random, chunkX, chunkZ); break; } } public void generateEnd(World world, Random random, int x, int z){ } public void generateOverworld(World world, Random random, int x, int z){ generateOre(MoreOresModBlocks.ruby_ore, world, random, x, z, 2 ,10 , 5, 0, 100, Blocks.stone); } public void generateNeather(World world, Random random, int x, int z){ } public void generateOre(Block block, World world, Random random, int chunkX, int chunkZ, int minVienSize, int maxVienSize, int chance , int minY, int maxY, Block generateIn){ int vienSize = minVienSize + random.nextInt(maxVienSize - minVienSize); int hightRange = maxY - minY; WorldGenMinable gen = new WorldGenMinable((IBlockState) block, vienSize); for(int i = 0; i < chance; i++){ int xRand = chunkX * 16 + random.nextInt(16); int yRand = random.nextInt(hightRange) + minY; int zRand = chunkZ * 16 + random.nextInt(16); gen.generate(world, random, blockPos(xRand, yRand, zRand)); } } private BlockPos blockPos(int chunkX, int hightRange, int chunkZ) { return null; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.