Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

IgazHarcos

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by IgazHarcos

  1. Yes I know, I have problems a few times during the tutorial, but now i know what was the problem, and my mod works!
  2. Jesus christ, the tutorial not mentioned that, that's why it wasn't oblivious for me, not mentioning this is the first time I develop JSON recipe. Thanks for Your answer, i'll look into "data"!
  3. Okay ,this error is happening regardless the recipe is shaped or shapeless. Blocks not working, but items working perfectly. Why I get this error messige? How can it not find the data of minecraft blocks?
  4. Hello! I made JSON recipes by using a Youtube tutorial. THe recipes works fine, with items like torch or glass pane, but not with blocks. I put this in the JSON file: { "type": "minecraft:crafting_shapeless", "pattern": [ "S", "D" ], "key": { "S": { "item": "minecraft:sand" }, "D": { "item": "minecraft:dirt" } }, "result": { "item": "lm:modern_block", "count": 2 } } And I get an error: [main/ERROR] [FML]: Parsing error loading recipe lm:modern_block com.google.gson.JsonParseException: Missing data for item 'minecraft:dirt' What am I did wrong? Thanks for any help!
  5. Like I told you, I dont know how to do it. What I can show is a block or item or armor etc. but That's far from a rail.
  6. Sorry but are you read what I write? I completed thew simple tutorials, AND looked into the source code.
  7. Hello! I a beginner modder seeking for help. I want to create a mod for Minecraft 1.12.2. I have the tools, set up, but can't find anything just the basic tutorials (first item/block/weapon/tool/armor/etc.). I want to make a custom simple powered rail. I try to look for any tutorial, but can't find. I try to do from the basics (extend original class etc.) but there is a big difference between creating a block or item and crating a custom rail. Is there any good tutorial what I oversee? If not, anybody made custom rails, or know how to do it? I hope somebody can help. Thanks for any help!
  8. I knew java, but for a really short time, and just because I want develop mod, I not say anithing else. But now I look more into the minecraft classes and find every solution (I not use eclipse too much before too), and now i finish the mod. After all, relly really thanks for your patience and help to finish the mod!
  9. Thanks for your advice, but I think my problem is not related to lack of knowledge of java, but lack of knowledge of modding. I do all the beginner tutorial (from item create to structures), but now I try to do something that I never tried before, and maybe never will, and there is not a single tutorial for this. Not to mention that nearly all tutorial outdated (pre-1.. You help me a lot - and thank you for that
  10. "You get player and world from the event." Yes I see, but i get can't resolve error for player and world. Maybe player is correct like this?: EntityPlayer player = event.player; But it's not working on World world = ewvent.world; Because event.world not existing;
  11. Yes I want to substract, but not thats the main problem. This is instead a big problem: "onCheckTick(PlayerTickEvent event, Entity entity, World world)" I not use it correctly, but not know how to fix
  12. I try to register the event: My Code in Player Tick so far: I try to get the block under the player.Y, and check is that my custom ore. Is this right?
  13. Hello! I begin developing a Minecraft mod, where you can find lead and uranium ores. When you touch the uranium (after you mine it), it applies poison effect on you, but i want a similar effect, but only with the ores: When I get close, i want it apply poison on player. How to do it? I tried similar things (google), but nothing works. thanks for any help!
  14. I did this, but I got an error to the "e.getPlayer()" part, it says undefined for the PlayerEvent.PlayerRespawnEvent @EventHandler public void onPlayerRespawnEvent(PlayerRespawnEvent e){ Player player = e.getPlayer(); player.setPosition(100, 100, 100); }
  15. I did this, but not working. In my main mod file I put this under the init events: @SubscribeEvent public void onWorldLoad(WorldEvent.Load event) { World world=MinecraftServer.getServer().worldServers[0]; world.setWorldTime(18000); } }
  16. I do this: @EventHandler public void onPlayerRespawnEvent(PlayerRespawnEvent e){ System.out.println("Success!"); EntityPlayer player = Minecraft.getMinecraft().thePlayer; player.setPosition(100, 100, 100); } I thonk it is completely wrong, but I out of ideas
  17. So the code corrent, but I want to execute on the wrong place?
  18. In my main mod .java file, I put this in the postinit event, but not working, not throwing any error. How I must do this correctly? World world=Minecraft.getMinecraft().theWorld; world.setWorldTime(1200);
  19. I has the same problem, the problem was that, my item end with ".PNG" instead of ".png".
  20. Hi! I want to spawn the player to a fix location. I tried this, but wont work: World world=Minecraft.getMinecraft().theWorld; if (!world.isRemote) { System.out.println("Success!"); EntityPlayer player = Minecraft.getMinecraft().thePlayer; player.setPosition(100, 100, 100); // put the location here that you want world.spawnEntityInWorld(player); } Thanks for any help!
  21. I know, and now it's working. I limited the number of structures, now I must figure out how to generate it only on dirt, and make ladder, chest.
  22. I tried but something went wrong. Now the game spawn too much structure and crush the game, and I can't make it spawn only on surface covered with dirt. I tried search and Google, but nothing
  23. Thanks for your reply! There is any way to limit the number of structures generated?
  24. Hi everybody, I begin modding days ago, and try to create a structure. It works fine, but when i break a block of the structure, the block created again a little later. I think, the game generates again the entire structure (I use fix coordinates for test), but Í don't know how to fix this. I use the latest Forge for Minecraft 1.8. Here is my codes: WorldGen.java: package com.harcos.bunkerstrukture.common; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraftforge.fml.common.IWorldGenerator; public class WorldGen implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.getDimensionId()) { case 0: generateSurface(world, random, chunkX*16, chunkZ*16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { int Xcoord1 = blockX + random.nextInt(16); int Ycoord1 = random.nextInt(80); int Zcoord1 = blockZ + random.nextInt(16); (new StructureGenerator()).generate(world, 1, 500, 100, 500); } } StructureGenerator: package com.harcos.bunkerstrukture.common; import java.util.Random; 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.gen.feature.WorldGenerator; public class StructureGenerator extends WorldGenerator { public boolean generate(World par1World, int par2, int par3, int par4, int par5) { /* while (par1World.isAirBlock(new BlockPos(par3, par4, par5)) && par4 > 2) { --par4; } */ IBlockState checkBlock = par1World.getBlockState(new BlockPos(par3, par4, par5)); par1World.setBlockState(new BlockPos(par3, par4, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-1, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-1, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-1, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-1, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-1, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-1, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-1, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-1, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-1, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-2, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-2, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-2, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-2, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-2, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-2, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-2, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-2, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-2, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-3, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-3, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-3, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-3, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-3, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-3, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-3, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-3, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-3, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-4, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-4, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-4, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-4, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-4, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-4, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-4, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-4, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-4, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-4, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-4, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-4, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-4, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-4, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-4, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-4, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-4, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-4, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-4, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-4, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-4, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-4, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-4, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-4, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-4, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-5, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-5, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-5, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-5, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-5, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-5, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-5, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-5, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-5, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-5, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-5, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-5, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-5, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-5, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-5, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-5, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-5, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-5, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-5, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-5, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-5, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-5, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-5, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-5, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-6, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-6, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-6, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-6, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-6, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-6, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-6, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-6, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-6, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-6, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-6, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-6, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-6, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-6, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-6, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-6, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-6, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-6, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-6, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-6, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-6, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-6, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-6, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-6, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-7, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-7, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-7, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-7, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-7, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-7, par5-1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-7, par5), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-7, par5+1), Blocks.air.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-7, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-7, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-7, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-7, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-7, par5-2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-7, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-7, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-7, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-7, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-7, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-7, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-2, par4-7, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-7, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-7, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-7, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+2, par4-7, par5+2), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-8, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-8, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3, par4-8, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-8, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-8, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3-1, par4-8, par5+1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-8, par5-1), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-8, par5), Blocks.brick_block.getDefaultState()); par1World.setBlockState(new BlockPos(par3+1, par4-8, par5+1), Blocks.brick_block.getDefaultState()); return true; } @Override public boolean generate(World arg0, Random arg1, BlockPos arg2) { // TODO Auto-generated method stub return false; } } CommonProxy.java: package com.harcos.bunkerstrukture; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import com.harcos.bunkerstrukture.common.WorldGen; public class CommonProxy { public void preInit(FMLPreInitializationEvent e) { } public void init(FMLInitializationEvent e) { GameRegistry.registerWorldGenerator(new WorldGen(), 0); } public void postInit(FMLPostInitializationEvent e) { } } Thanks for any help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.