• 0

    posted a message on Animating Custom Mobs

    I think all of that is for adjusting the scale and position of "Body", yes.


    *GlStateManager.translate(0.0F, -3.6F * f5, 0.0F);
    I think the -3.6 is the part which controls distance from ground. You can try changing that part.
    For my mob. The if (this.isChild) is for a child of a breedable mob, and the "else" is for a full grown.

    Posted in: Modification Development
  • 0

    posted a message on Animating Custom Mobs

    They become moved around because now that they are the child block of a parent their position and orientation is based on the position of that parent block instead of a single common place as they are in the Techne modeler (the ground I think).

    When I make a mob, I end up going in and out of the game, testing it as I move them to the general place that they were in the modeler.


    That's what I meant by "This causes the parts to be all out of whack and it takes a while to re-adjust their orientation to fix it."

    Posted in: Modification Development
  • 0

    posted a message on Animating Custom Mobs
    Quote from Leviathan143»

    I know of 2 alternatives to Techne. One is MCAnimator, which includes an animation tool. If you use MCAnimator to create animations you will need to add their library to your mod.


    The other is Tabula, Tabula is a mod instead of an external program, but it works well. It also allows you to import models from vanilla and mods.


    Both programs allow you to create parent child relationships by dragging and dropping a part onto another part in the Model Tree. I find MCAnimator's modeling controls difficult to use though, so Tabula is my preferred program.


    If I use Tabula does that mean that I have to add it as a mod dependency for my mod?

    Posted in: Modification Development
  • 0

    posted a message on Custom mob model errors (Cannot find Symbol)
    Quote from Mirkwood_elf»

    So Lemme see if that fixes it.


    I will edit this if it works.


    [EDIT]: that created more errors, the variables set were non static.


    I am a beginner, does it have something to do with the fields set?




    OH WAIT... You meant for me to remove "static" from the way top?

    you should really word your sentences clearer.


    Really?!?!?

    You mean to say that I should be more precise in my directions? I don't know how much more clear -

    Quote from Mythra»

    ...the only difference I see with code that I have for my own model is including "static" there at the beginning.


    -needed to be, without getting technical in my description. I'm very new to Java coding. I assumed that when you saw what I wrote, that it would direct you to the very first instance of the word which you wrote in the little bit of code that you provided.


    I suppose I could have suggested for you to "remove the word static from between the word 'public' and the word 'class'.

    Although, like I said, I am very new to modding, and based on how little information was provided about your problem, I couldn't be sure that would fix the issue you were having. So instead I merely looked through my own custom mob's model class and told you the only significant difference I could see, thinking that it might possibly be of help.


    How about instead of suggesting that I work on my precision of replies, you adjust the politeness, and increase the gratitude of yours.

    Posted in: Modification Development
  • 0

    posted a message on Custom mob model errors (Cannot find Symbol)

    Based on the bit of code you provided, the only difference I see with code that I have for my own model is including "static" there at the beginning.

    Posted in: Modification Development
  • 0

    posted a message on How do you make ores that randomly generate throughout the ground below???

    Maybe this tutorial series can help you.


    Posted in: Modification Development
  • 0

    posted a message on Can i make a theme park through MCreator?If dont,what should i use?
    Quote from tuluong»

    So you guys want to make a theme park with me?I have great ideas.Say yes and i will tell you the details of the "World of Dreams"


    Sorry, I'm trying to work on my own mod. I'm very new to modding anyway. I doubt I'd be of much help. Good luck, though. :)

    Posted in: Modification Development
  • 0

    posted a message on Animating Custom Mobs

    for example, after I have all of my parts listed with dimensions, rotations points, etc. then I have:



    (ALL PARTS UP HERE)

    this.Head.addChild(this.HornRightEnd);
    this.Head.addChild(this.HornRight);
    this.Head.addChild(this.HornLeftEnd);
    this.Head.addChild(this.HornLeft);
    this.Head.addChild(this.EarRight);
    this.Head.addChild(this.EarLeft);
    this.Neck.addChild(this.Head);
    this.Neck.addChild(this.Mane);
    this.Body.addChild(this.Neck);
    this.Body.addChild(LegFrontR);
    this.Body.addChild(LegFrontL);
    this.Body.addChild(LegBackR);
    this.Body.addChild(LegBackL);
    this.Body.addChild(Tail);
    this.Body.addChild(TailEnd);


    Then for rendering, you only tell it to render one part. For me, the part called "Body" is the prime one.


    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

    setRotationAngles(f, f1, f2, f3, f4, f5, entity);

    if (this.isChild)
    {
    float f6 = 0.5F;
    GlStateManager.pushMatrix();
    GlStateManager.scale(1.0F * f6, 1.0F * f6, 1.0F * f6);
    GlStateManager.translate(0.0F, 25F * f5, 0.0F);
    this.Body.render(f5);
    GlStateManager.popMatrix();
    }
    else
    {
    float f7 = 1.2F;
    GlStateManager.pushMatrix();
    GlStateManager.scale(1.0F * f7, 1.0F * f7, 1.0F * f7);
    GlStateManager.translate(0.0F, -3.6F * f5, 0.0F);
    this.Body.render(f5);
    GlStateManager.popMatrix();
    }
    }


    For animations, you only need to tell it to move the leg part that the sections are linked to (both right and left)


    public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
    {
    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

    this.LegBackR.setRotationPoint(-2.5F, 14F, -8F);
    this.LegBackL.setRotationPoint(2.5F, 14F, -8F);
    this.LegFrontR.setRotationPoint(-2.5F, 0F, -8F);
    this.LegFrontL.setRotationPoint(2.5F, 0F, -8F);
    this.LegBackR.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.9F * f1;
    this.LegBackL.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 0.9F * f1;
    this.LegFrontR.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 0.9F * f1;
    this.LegFrontL.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.9F * f1;

    Posted in: Modification Development
  • 0

    posted a message on Can i make a theme park through MCreator?If dont,what should i use?
    Quote from Vastatio»


    If you want to make something, you need to have the determination to make it. End of story.


    I agree with, Vastatio here.

    I would also add that intelligence is actually made up in great part by determination. There's practically no skill of great value that can be learned in just an hour, or even a day. So anyone who can be considered intelligent must have spent some time learning whatever it is they can do. Weeks, months or even years, in order to be good at a thing. All the intelligence a person could have would mean nothing if that person had zero determination to follow through with things. So take heart, lace up your shoes and apply the human capacity to learn, to what you're interested in.

    Posted in: Modification Development
  • 0

    posted a message on Animating Custom Mobs

    Nice dinosaur.


    I could be wrong about this. However, what I have found is that if you plan to have a part move (i.e. the legs) for an animation, you cannot place it at odd angles, only 90 degree angles. Without using very complicated maths, you need to use Child to Parent part relations.


    Jabelar seems to know what he's doing: Entity Animation Tutorial


    -that is the place where I first learned of this technique. Techne doesn't allow (as far as I know) the use of Child blocks. In order to link them in that way, I first design a creature in Techne, like you have done, then I import it into minecraft as a .java, then start linking parts, the way that Jabelar shows to do. This cause the parts to be all out of whack and it takes a while to re-adjust their orientation to fix it.


    If you plan to have your mob breedable, it may involve having all of the blocks that your creature is made up of be linked child to parent back to a single block. This way the "prime block" can be scaled in order to changed the size of all of them. I can tell you for sure that this technique does actually work, even though it is more labor intensive.


    It's a much longer process than it would be if Techne just allowed blocks to be linked in that way, but I've gotten it to work.

    I hope that helps.

    Posted in: Modification Development
  • 0

    posted a message on Setting "DECAYABLE" tag on custom leaves

    I think I've got the first two elements of that post done correctly.


    protected void createBlockState() {
    ((Block) MythAdventure.Myth_Leaves).getDefaultState().withProperty(CustomLeaves.VARIANT, CustomPlanks.EnumType.WILLOW).withProperty(BlockLeaves.DECAYABLE, false);
    }

    public int getMetaFromState(IBlockState state){

    byte b0 = 0;
    int i = b0 | ((CustomPlanks.EnumType)state.getValue(CustomLeaves.VARIANT)).getMetadata();
    if (!((Boolean)state.getValue(BlockLeaves.DECAYABLE)).booleanValue()) {
    i |= 4;
    }
    if (((Boolean)state.getValue(BlockLeaves.CHECK_DECAY)).booleanValue()) {
    i |= 8;
    }
    return i;
    }


    Though, I'm not quite sure how to properly pass the metadata to the WorldGenWillowTree constructor as the metaLeaves argument.


    My Gist

    Posted in: Modification Development
  • 0

    posted a message on Setting "DECAYABLE" tag on custom leaves

    I'm trying to set my custom leaves of a certain type to have DECAYABLE set to 'false'.

    I'm very new to modding, so I'm not sure the proper format to do this. Ideally I would like to extend the range at which my leaves will be sustained by a log with.canSustainLeaves

    For now though, I will gladly settle for turning the decay off entirely so that I can work on the overall design of my tree. This is what I have so far, don't worry, I already know it's not right.



    public boolean willowDecay(IBlockAccess worldIn, BlockPos pos, IBlockState stateIn) {
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == this) {

    CustomPlanks.EnumType enumtype = (CustomPlanks.EnumType)iblockstate.getValue(VARIANT);
    if (enumtype == CustomPlanks.EnumType.WILLOW) {
    return ((World) worldIn).setBlockState(pos, stateIn.withProperty(DECAYABLE, enumtype));
    }
    }
    return false;
    }


    Any help is appreciated.

    Posted in: Modification Development
  • 0

    posted a message on Help with a custom Tree generator
    Quote from Leviathan143»

    The code.


    Yeah, I was pretty sure that's what you meant with:

    Quote from Leviathan143»

    ...and it doesn't spawn naturally.


    Apparently it doesn't spawn UN-naturally, either. That's okay, I'm going to keep working on my own code. Thanks for the help.

    Posted in: Modification Development
  • 0

    posted a message on Help with a custom Tree generator
    Quote from Leviathan143»

    You never actually generate the tree with object.generate(World, Random, BlockPos).


    Are you saying that I don't/didn't or that the code doesn't generate the tree with object.generate(World, Random, BlockPos)?

    Posted in: Modification Development
  • 0

    posted a message on Help with a custom Tree generator

    I registered the generator with --> GameRegistry.registerWorldGenerator(new WorldGenWillowTree(), 0)

    under --> public void init(FMLInitializationEvent e) {

    in my CommonProxy. I have it as


    case 3:
    object = new WorldGenWillowTree();


    *I must not be connecting it to the sapling correctly. When I try to grow the willow sapling it just disappears. The only thing that I changed was the class name, but it doesn't seem to work for me. Like I said, I'm new to this, I must not be utilizing what you were good enough to write, in the right way.

    Posted in: Modification Development
  • To post a comment, please or register a new account.