Jump to content

MikaXD

Members
  • Posts

    81
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    ...

MikaXD's Achievements

Stone Miner

Stone Miner (3/8)

2

Reputation

  1. Thanks for your answers! I think I found the place where the world is rendered.
  2. I know this is not an easy question: How can I render the game a second time from bird's-eye view as a minimap and then display the rendered scene on the screen as a minimap? You don't have to tell me how to render it, but it would be really helpful if you could tell me where I can find the place where the game is drawn in the code. Thanks in advance!
  3. World-Generator: package com.youtube.util; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; public class OreGenerator implements IWorldGenerator { private Block block; public OreGenerator(Block block) { this.block = block; } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if(world.provider.getDimensionId() == 0) { for(int i = 0; i < 50; i++) { int posX = chunkX + random.nextInt(16); int posY = random.nextInt(64); int posZ = chunkZ + random.nextInt(16); WorldGenMinable wgm = new WorldGenMinable(block.getDefaultState(), 10); wgm.generate(world, random, new BlockPos(posX, posY, posZ)); } } } } I register the world generator in the initialization part of my main class: GameRegistry.registerWorldGenerator(new OreGenerator(myBlock), 0);
  4. Hey, I created a new class implementing the world generator which randomly generates my custom block in the world. The Problem is, I cannot find the block anywhere in the world. I also used System.out.println("Generated") when the generate(...)-Method of the WorldGenMinable-Instance returned true. Resulting is a console full of "Generated"-messages. But nevertheless nothing is generated. What am I doing wrong? PS: I used 0 as the second parameter of the addWorldGenerator(...)-Method of the GameRegistry. Is this ok?
  5. Thanks!
  6. Oh, no, I've almost expected. Ok, but currently I cannot find any new tutorials, which are not outdated. Is there any open source?
  7. Hey, I created a GUI which can be open through pressing a key (I'm using the KeyInputEvent). I have already registered a gui handler and actually everything works perfect. Now I added a button to my gui which gives the player an apple (only an example). This works, but if you right click the apple it disappears. If I open my GUI in the KeyInputEvent, it only calls the getClientServerSide()-Method of my GUI-Handler. But what I need is the server side, too. If I open the gui in the onItemRightClick()-Method of any item, it works. Can anyone help me? PS: I don't have much idea of sending packets...
  8. Ok... My .json file is located in assets/MODID/models/item In the initialization event of my main class i wrote this: GameRegistry.registerItem(item, "item"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation("MODID:item", "inventory")); Does this help?
  9. I don't think there is a mistake because I followed the instructions of Eternaldoom's post: http://www.minecraftforge.net/forum/index.php/topic,24263.0.html And as I already said, with FML it still worked.
  10. First I used FML 1.8. The texture of the item was rendering correctly. Now I'm using Forge 1.8 -using the same code and the result is a blocky item with the default "missing texture" - texture. What has happened?
  11. I want to create a new block, let's say an amethyst block. This line is what I already have (in the init): Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block_amethyst), 0, new ModelResourceLocation("mymodid:block_amethyst", "inventory")); Is that correct? Ok, if yes, which files do I need to create? And in which package(s)?
  12. Hmmm, any other ideas?
  13. In 1.8 I can't find any method to load a texture for a item/block. Are there any tutorials on that? If not, how would I do this? Thanks in advance!
  14. Will there be changes in the code between FML 1.8 (http://files.minecraftforge.net/fml/1. and Minecraft Forge? And can somebody explain the difference?
  15. Hi, I already asked how to create a custom inventory. It worked. Then, I wanted to add 5 slots to it - no problem, too. I created a new IInventory with a size of 5 (can save 5 ItemStacks). Now if you put a stack in the fifth slot, the background of it turns to a fish. Also the background of all the other slots of my inventory changes to a fish IF they are NOT empty. I don't have any idea about why this happens. I nowhere used a fish as a background icon for a slot...
×
×
  • Create New...

Important Information

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