Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MikaXD

Members
  • Joined

  • Last visited

  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. Oh, no, I've almost expected. Ok, but currently I cannot find any new tutorials, which are not outdated. Is there any open source?
  6. 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...
  7. 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?
  8. 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.
  9. 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?
  10. 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)?
  11. Hmmm, any other ideas?
  12. 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!
  13. 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?
  14. 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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.