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


  • Posts

  • Joined

  • Last visited

Everything posted by Toldea

  1. I use just the '--username <insertyourusername>' argument (in Run->Run Configurations->Arguments) and that is working fine for me (MC 1.6.4).
  2. You can ignore the Scala warnings. And no you don't import the files, you go to File->Switch Workplace->Other... and then you open forge/mcp/eclipe
  3. I don't really see any errors in your logs. If you did everything correctly you should be able to open the Minecraft project by opening Eclipse and switching the workplace to the forge/mcp/eclipse folder. From there you can just run the project to compile and launch Minecraft.
  4. I'm developing on a mac as well (rMBP) and had no problems getting forge running with Eclipse. What problem are you running into exactly?
  5. When you are holding it in your hand it is an item which you can render differently using class implementing IItemRenderer. I'm guessing you have that part down. When you release the mouse button it spawns an entity which again needs its own custom render class (just extending Render). In there it is just a matter of rendering the model and applying any needed rotations and whatnot. You could take a look at the RenderArrow class. You basically just need to do the same thing only instead of all the tessellator stuff you just call your model's render function. Finally don't forget to register both the item and the entity render classes ^^.
  6. Remove all the code in onLivingUpdate and just add the EntityAIAvoidEntity behaviour to the constructor like the other tasks. Create your own custom versions of the Avoid and Attack behaviours that are basically copies except for an additional check in their shouldExecute/continueExecuting functions to see if their .getAttackTarget() is a player holding the ectoplasm, then return true or false depending on if that behaviour should fire or stop executing while the player is holding that item.
  7. It's probably better to not add and remove tasks on the fly. Instead I'd just add both and on their shouldExecute/continueExecuting functions check if the attack target is valid, a player, and if it's holding the ectoplasm. If so return true or false depending on if that behavior should start or end.
  8. You could also check out MultiMC. It's a great little program to more easily handle all the mods and can also keep separate minecraft instances.
  9. http://www.minecraftforge.net/wiki/Tutorials/Upgrading_To_Forge_for_1.3.1
  10. Why? It takes 5min looking over the tutorial and it is mostly changing the word 'ModLoader' to GameRegistry/EntityRegistry/LanguageRegistry/etc
  11. Here are a bunch of tutorials, including stuff on dimensions -> http://wuppy29.blogspot.nl/2012/08/forge-modding-132.html
  12. Brb copying exceptionally useful code. Anyways, use metadata. i.e. have the 'dye' object contain all the different colors you want with each their own metadata, spawn the submarine and parse the metadata. Use the same coloring for the submarine.
  13. You could use world.getSpawnPoint() if you have the World object.
  14. Have you called GameRegistry.registerWorldGenerator in your mod file? How is it not working? Is the generate function getting called? The code in the forge tutorial should create a wooden block very high up in the sky (y=100) per chunk. This is of course kind of basic and probably not very useful. The way Minecraft generates most of its stuff is with some logic, which is written in the different WorldGenerator subclasses. For instance a common one is the WorldGeneratorMinable, which takes the block id and the vein size as its arguments. If you then call the generate function on that object in your IWorldGenerator generate function it will attempt to generate a vein at the xyz coordinates you pass it. If you want to generate more veins per chunk you just put a for loop in the generate function. Unless you are after some very specific generation logic you probably don't have to write your own WorldGenerator and can just reuse some of the vanilla ones.
  15. You aren't creating a Minecraft instance, you are just getting the singleton instance. It's also a bit silly that you have a variable to hold the minecraft instance but then you never assign or use it .
  16. Does the setGraphicsLevel function get called or not? Are you certain your code for actually generating the tree properly uses your custom leave block? I don't see you registering a TickHandler anywhere in your main mod file like GeoffNukem suggested, so your function probably just never gets called.
  17. Btw one quick side note, isOpaqueCube doesn't mean your texture gets rendered with transparancy or not, it determines if it should try to render edges that would be 'invisable' when a block is opaque. If you look at the swords they only render on specific sides (those visable would the block actually be fully opaque) while the ingots version renders them on all sides.
  18. Have you logged to make sure that function gets called properly? Are you sure baseIndexInPNG + 0 or 1 is the correct texture index? I just tried and for me this works perfectly: public class CustomLeaves extends BlockLeaves { public CustomLeaves(int par1, int par2) { super(par1, par2); } public void setGraphicsLevel(boolean par1) { this.graphicsLevel = par1; this.blockIndexInTexture = (par1 ? 0 : 16); } public String getTextureFile() { return "somecustomtexturefile.png"; } } Fancy ingots or fast swords tree woosh:
  19. Can you define what exactly doesn't work? Assuming you are trying to achieve the same effect as vanilla Minecraft (fancy = transparent block and transparent texture, fast = opaque block/texture), this seems wrong: public void setGraphicsLevel(boolean par1) { this.graphicsLevel = par1; this.blockIndexInTexture = this.baseIndexInPNG + 1; <--- } This will always sets the same texture, so you are either always using an opaque or a transparant texture.
  20. If you look at the BlockLeaves object it has a function called setGraphicsLevel which apart from the graphics level also changes the texture index. Likewise it has a function isOpaqueCube that returns true or false depending on the graphics level and determines if a block should be transparant or not.
  21. The Block class has a function called onBlockActivated which gets called when you right click on the block. Check if the player is currently holding bonemeal and then just call a function to grow whatever it is you try to grow. Vanilla Minecraft calls growTree in the BlockSapling class for example.
  22. The function gets parsed two parameters, the first one is the side of the block and the second one is the metadata. This is not 'sides' as in 'not the top of the bottom' but all the 6 sides of the cube. You need to check which side it is and return the appropriate texture (hint 0 is bottom 1 is top).
  23. I haven't played around with adding new dimensions, but at least for generating ores and whatnot you can call world.provider.worldType which returns 0 for Overworld and -1 for Nether. It looks like this won't be changed automagically but if you set it manually on world creation you should be able to look up the type when you're generating biomes and such.
  24. You mean different textures for the sides? Use this: public int getBlockTextureFromSideAndMetadata(int par1, int par2)
  25. Well I kind off disagree on this, *especially* if you have a lot of mods installed you are bound to get block id conflicts, so it is indeed very nice if devs try to conserve ids through smart use of metadata. Consider how quickly you might run out of ids if mods like redpower didn't use metadata. Further more it is easier to fix block id conflicts if a mod just uses a few instead of a ton. Now for a beginning mod it isn't super necessary, especially if your mod doesn't have too many different objects, though it definitely is always a nice bonus. As to the original question, if you can't figure out what the metadata is you could just group your other 5 blocks and leave the one with the different bounding box as a separate id. Still brings the total count down to 2 from 6.
  • Create New...

Important Information

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