Everything posted by MikaXD
-
Rendering the game from bird's-eye view
Thanks for your answers! I think I found the place where the world is rendered.
-
Rendering the game from bird's-eye view
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!
-
[1.8] Custom world-Generator does not work
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);
-
[1.8] Custom world-Generator does not work
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?
- [1.7.10] Need help with GUI
-
[1.7.10] Need help with GUI
Oh, no, I've almost expected. Ok, but currently I cannot find any new tutorials, which are not outdated. Is there any open source?
-
[1.7.10] Need help with GUI
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...
-
[1.8] Item textures not working
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?
-
[1.8] Item textures not working
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.
-
[1.8] Item textures not working
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?
-
[1.8] Help with blocks
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)?
-
[1.8] Textures of items and blocks
Hmmm, any other ideas?
-
[1.8] Textures of items and blocks
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!
-
[1.8] About FML and Minecraft Forge
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?
-
[1.7.10] Background of a slot turns into a fish item
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...
-
[1.7.10] About custom inventories
Thanks! My biggest problem was to get the entity into the guihandler, but now it works fine!
-
[1.7.10] About custom inventories
Hi, What should I do if I want to create entities which each have an own inventory where you can save items (like a chest but an entity stores the things). The entity was no problem but I don't get ahead with the inventory part. What do I need to implement this idea? I don't want you to show me code... just give me some hints (what classes I need; is there a similar mod?; ...) Thanks in advance!
-
[1.7.10] Make custom entity following the player (like a tamed wolf)
I think this class doesn't really help me because I don't have an EntityTameable. Isn't there an other method in the world class? I found this in the World.class: getPathEntityToEntity I have no idea HOW and IF this works at all. EDIT: Works fine for me this method! First parameter: EntityPlayer, Second parameter: the entity
-
[1.7.10] Make custom entity following the player (like a tamed wolf)
How would I do that? I want the entity following all the time (until it dies).
-
[1.7.10] Custom entity renderer isn't rendering
I did this already. The constructor is never called... But in the FMLInitalization event I wrote RenderingRegistry.registerEntityEventHandler(...);
-
[1.7.10] Custom entity renderer isn't rendering
It doesn't seem to work... I think it has something to do with the renderer because the entity does EXIST in the world and it's exploding after a few seconds BUT it's not rendering. Did I forget anything? I already used a proxy but the result is always the same...
-
[1.7.10] Custom entity renderer isn't rendering
Hey, I have a little rendering problem... What I want: A new explosive with my own texture. I copied the most of the code from the minecraft sources but it doesn't seem to work... When I'm activating my block (witz flint and steel OR redstone) the block disappears (OK!) but the entity is not rendering! A few seconds later there's an explosion and that's it! I know that the entity is created in the world because of some outputs but the renderer is never called... The classes: - main class - block class - Entity class (for the primed version of my block) - Render class In the main class i registered the block and rendering handler in the FMLInitalization event: GameRegistry.registerBlock(blockMyExplosive, "blockMyExplosive"); RenderingRegistry.registerEntityRenderingHandler(EntityMyExplosivePrimed.class, new RenderMyExplosive); So, what's wrong? Did i forget anything?
-
[1.7.10] How to add screenshots to the main menu background
Biomes O' Plenty does also add panoramas to the main menu background.
-
[1.7.10] How to add screenshots to the main menu background
Does anyone know?
-
[1.7.10] How to add screenshots to the main menu background
How to add (and remove!?) them? AND: Can I determine WHICH background should be shown?
IPS spam blocked by CleanTalk.