Jump to content

TheAncientMinecrafter

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by TheAncientMinecrafter

  1. OK - so now I have two questions. Firstly how to do you make a mob actually inflict damage? It comes up to me, follows me, growls, but doesn't hurt. Secondly, where in the model/renderer is the bounding box? Because a bear is bigger than a wolf but at the moment it seems to be rendering halfway through things. Thanks!
  2. Cheers! When I originally made the bear, I copied it over from wolf but didn't make it tameable and it crashed whenever it was punched. So I went back to a vanilla mob and forgot about wolf. Now I'm adding in wolf-code one bit at a time and testing it. So far, I'm using DataWatcher 16 bit 2 to set angry and I think it'd want to attack me when I punch it, but it just doesn't do any damage. Instead it kind of hops around madly for a bit then noses right up to me. So I'm nearly there! Thanks Graham
  3. Gah! This is driving me mad! I can make the mob create and render and behave and everything as an EntityAnimal, but when I change it to EntityMob, it doesn't render at all - it just pops in and immediately vanishes. I know I've seen a tutorial somewhere about adding mobs which based them on a creeper but my google-fu is weak today and I can't find it! What are the differences between the two Entity types? Thanks! Graham
  4. Hi I've got quite a happy bear wandering about my lands now. The problem is that the entity extends EntityAnimal and all the good code for attacking and getting angry if someone attacks it is in EntityMob which is down a different tree of classes. I can bring the functions I need in via composition, but I wondered how Minecraft knows to call them? Is it to do with the enumCreatureType in AddSpawn? Or is it based on which class you extend via inheritance? Thanks! Graham
  5. Hi With lots of thanks for all the help I got on here, I put all my thoughts together into a tutorial. It's still a bit rough and ready but should start you off on creating a mob that walks around. http://theancientminecrafter.wordpress.com/2014/05/11/entity-or-mob-tutorial/ Hope this is the right place to put it! Thanks Graham
  6. Hi I'm writing a mod that keeps on getting bigger as I have more ideas. In brief, it's going to load a whole raft of new animals, and switch off others, with the overall intent of making Minecraft more realistic. So, less creepers and skeletons etc. I've written a new mob and got it working (it was quite a struggle) and I want to write at least one more and make it a tutorial. (Partly to remind myself of what I've learned before I forget it!) Before I dive into writing any more, would other writers out there be interested in sharing some of their animals? I know there are quite a few mods out there that have new animals in them, and it'd be great to do an open-source thing where we could all write a few and then swap and change them. I was thinking, just the class files (Entity, Render and Model) and .png textures. Any thoughts? Graham
  7. Woohoo! Thanks for all your efforts I wouldn't have got this far without you guys! I've fixed it! Turns out that my ModelAurochs file extends ModelBase. And before all the complicated addBox commands, I simply added two attributions: super.textureWidth=128; super.textureHeight=64; This fixed everything! As a way to say thank-you here's a unique, first time ever seen picture of the Minecraft Aurochs... http://i129.photobucket.com/albums/p208/graham_h_miller/Screenshotfrom2014-05-07194158_zps3edf418f.png[/img] I know it just looks like a black cow with horns, but it's also ever so slightly larger than a regular cow. And it's mine, because I made it :-D Graham
  8. So... I've been playing with this on and off trying to figure it out. As my animal is basically all black with patterns (like eyes, mouth, ears etc.) I made a 64x32 .png which was all black and then added bits to it so I could see what's going on. I've learned two things: 1) if there's not enough room, it wraps around from bottom to top and right to left. 2) This meant I ran out of room so I increased the canvas size to 128 x 64, and changed nothing else. I left all the detail in the top left corner of the image, just as before. But as soon as I loaded it up, the detail on the head which had been perfect was totally messed up. This is significant as the head texture loads from 0,0. So it is doing something weird when I increase the canvas size and I just can't see what it is. It's a bit dispiriting to think that I'll have to start all over again with a bigger graphic. Any help? Graham
  9. I've been going round in circles and I just can't see how to make this happen. I think that the real problem is that I'm trying to make a larger quadruped. I've extended ModelBase and copied across a lot of the code for ModelCow to make it work. But, it is a bit bigger than cow, so I've increased the texture size. Looking through the various render and model classes that Minecraft supplies, they all seem to hard code texture size to 64 x 32 so maybe that's the problem? Graham
  10. Yay! Nearly there! Now have the texture mapped really badly onto the beasty - it's all squished and out of place and transparent in places. I've got 64 different coloured squares now to see what on earth is going on. I think that I changed the texture out to 128 x 64 by increasing the canvas size and I should've stretched it. More experimentation ahead... Many thanks - I wouldn't have got this far without your help! Graham
  11. Thanks for that - I didn't know about the 2:1 thing. At the moment it's set to 64x64 but the beast is purple and black so something's not right in the file location and/or java code. I'm nearly there, because I've got a lang file that changes the name of the spawn egg. If you could point me in the right direction relative to the lang dir and also where to put what in the code I'd be really grateful! cheers! Graham
  12. @RetsuWolf - try this one: http://www.minecraftforum.net/topic/1875084-164-fisherman77s-modding-tutorials-last-updated-103113-new-custom-model-mob-tut/page__st__40#entry25553850 HTH Graham
  13. Thank you! That is really helpful and has enabled me to change my code so it's a lot more sane. A lot of what you did I skimmed over as I'm modifying a basic quadruped so I don't need to define my own animation or body shape (yet!). But, I am stuck a stage further back than this. I *think* I've got a fairly good Render and Model class but I can't get the code right to load the model and renderer onto the Mod. When I test it out, it spawns a grey cube that runs around a moos, and even drops leather and beef if you kill it! So, what goes in the mod class, and the ClientProxy? Edit Fixed that now trying to map a texture to it! Cheers! Graham
  14. So... I saw some video tutorials and based on that I had a shot at MCreator. Unfortunately a) It didn't animate the new mob so it glided around like a demented four-legged Dalek b) I could only get the compiled files out, not the java classes so I couldn't use it as a basis for my code c) I could only make it work under Windows which means I have to fight my Ubuntu laptop and queue up for the family Windows PC Back to code crunching tomorrow I think! Graham
  15. So, before the inevitable RTFM comments, I have been through google and read some out of date tutorials. This one http://www.minecraftforum.net/topic/250780-creating-mods-mob-making-modelling-08042011/ was particularly good but it is over three years old so obviously it is a bit out of date and the code it generates needs updating to the 1.7.2 specs. Also, following that thread, I've successfully used Techne to create a model and export both the java code and the .png file. And Novaskin to make it look pretty. As I'm making a new quadruped I'm basing it on Cow and all its associated classes, ModelCow and RenderCow. I *can* just about figure it out by comparing my out of date code to those in the Cow classes, but the Javadocs and the API are woefully short on detail as to what all the parameters do in things like the addbox and rotationangle methods. And I haven't even got onto the structure of the assets package and how to point it at the right png file. Are there any decent 1.7.2 modelling tutorials out there? (Yes, I will write my own when I get to the end, if for no other reason than to remind myself how I did it!) Or, are there any modders out there who'd be willing to point me in the right direction? Thanks Graham
  16. Hi I added this line to my new mob LanguageRegistry.addName(NewCow.class, "Boney Cow"); and it told me that it was deprecated as it wouldn't be there in 1.8. I've searched all over and can't find out how I should give my new mob a name. Thanks Graham
  17. Thanks guys, I've made huge amounts of progress. And I think I've just figured out that I should have one mod file to load all the modified mobs which will be in their own class files. Which means that the @mod will only show up in one file that doesn't extend anything. Off to take a break before I attempt that. Cheers! Graham
  18. OK - I used to be a Java programmer in Life-Before-Children so I can remember how to code. I have read many, many modding tutorials, read and searched the forums and had a scan through the Javadoc. My plan was to create a new Cow mob that had slightly different behaviour, so I thought I'd try extending EntityCow so my new mob would be like a Cow. I know the code doesn't look like the code for a mob, that's because it crashed so I thought I'd add in a small bit of code each time and see where it crashed. If this is really hopelessly naive could you manage to point me in the right direction rather than just commenting on how silly it all is? And yes, I am very rusty, where the *** do you find external libraries? I'm still concerned that my version numbers are out of synch between Forge and the Minecraft code. Graham
  19. I was trying to change some of the attributes of EntityCow so I thought I'd extend it. Have I forgotten that much java?
  20. Hi I'm new to modding. I've got Eclipse installed (under Ubuntu 12.10) and I've got ForgeGradle loaded but I'm getting errors when I try to extend the EntityCow class. I think the problem is that Forge is running 1.7 but I've only been able to find the MCP source code for 1.6 and I think that's causing all sorts of conflicts. Also I need to figure out how to refactor the entire project so it's out from under Minecraft. But with ForgeGradle I'm finding it hard to see where the Minecraft code is hiding. Here's the latest error code: And here's the code as it stands at the moment. (I know it'll never work like this - I'm just commenting everything out and adding it in one bit at a time until I get a crash!) I'm tempted to just bin everything, delete or move the directories and start a fresh build. But I won't do that until I can be confident I'm all on the same version for everything! thanks Graham
  21. I got Forge 10.12.0.1024 from here http://files.minecraftforge.net/ as it was the 1.7.2 recommended. I went to Minecraft.net and got the latest server .jar from the bottom of the download page. I think the problem is that I need to get MCP and Forge into the same place and understand how they fit together.
  22. Hi I'm setting up Eclipse to start writing my own Mods. (In Life-Before-Children I was a java programmer so hopefully I can remember how to code!) I've followed various tutorials and have ended up with two workspaces - Forge and MCP. From what I've seen all the MCP code should somehow be under the Forge workspace, but I can't figure out how to get it in there! For reference I'm using my Ubuntu 12.10 laptop with OpenJDK 7 Thanks! Graham
×
×
  • Create New...

Important Information

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