Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Need Help in understanding vec3 Vec3d vec2i etc. please.
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
TheRPGAdventurer

Need Help in understanding vec3 Vec3d vec2i etc. please.

By TheRPGAdventurer, May 6, 2017 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

TheRPGAdventurer    4

TheRPGAdventurer

TheRPGAdventurer    4

  • Dragon Slayer
  • TheRPGAdventurer
  • Members
  • 4
  • 642 posts
Posted May 6, 2017

I am looking for a tutorial or an explanation what these vectors do.

  • Quote

Share this post


Link to post
Share on other sites

Choonster    1620

Choonster

Choonster    1620

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1620
  • 5047 posts
Posted May 6, 2017

They don't really do anything themselves, they're just vectors.that store 2 or more coordinates and provide methods for various vector operations (e.g. addition, subtraction, normalisation, dot and cross product).

 

The number in the name is how many coordinates the vector stores (i.e. the number of dimensions). The letter after the number is the numerical data type used by the vector, e.g. i for int, d for double, f for float.

  • Quote

Share this post


Link to post
Share on other sites

TheRPGAdventurer    4

TheRPGAdventurer

TheRPGAdventurer    4

  • Dragon Slayer
  • TheRPGAdventurer
  • Members
  • 4
  • 642 posts
Posted May 8, 2017
Just now, Choonster said:

They don't really do anything themselves, they're just vectors.that store 2 or more coordinates and provide methods for various vector operations (e.g. addition, subtraction, normalisation, dot and cross product).

 

The number in the name is how many coordinates the vector stores (i.e. the number of dimensions). The letter after the number is the numerical data type used by the vector, e.g. i for int, d for double, f for float.

Another question, why was vec3 removed in 1.10.2?

  • Quote

Share this post


Link to post
Share on other sites

Choonster    1620

Choonster

Choonster    1620

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1620
  • 5047 posts
Posted May 8, 2017
2 minutes ago, TheRPGAdventurer said:

Another question, why was vec3 removed in 1.10.2?

 

It was renamed to Vec3d in 1.9 for consistency with the other vector class names.

  • Quote

Share this post


Link to post
Share on other sites

TheRPGAdventurer    4

TheRPGAdventurer

TheRPGAdventurer    4

  • Dragon Slayer
  • TheRPGAdventurer
  • Members
  • 4
  • 642 posts
Posted May 11, 2017
Just now, Choonster said:

 

It was renamed to Vec3d in 1.9 for consistency with the other vector class names.

Another question, what is the best substitute from create vector helper, you see, I am helping the Dragon Mounts Author fix the player's position while riding the dragon, but in 1.10 they removed UpdateRiderPostion method in the Entity.class, the author and many of his helpers struggle to fix the bug. ;) 

  • Quote

Share this post


Link to post
Share on other sites

Choonster    1620

Choonster

Choonster    1620

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1620
  • 5047 posts
Posted May 11, 2017
9 minutes ago, TheRPGAdventurer said:

Another question, what is the best substitute from create vector helper,

 

Vec3.createVectorHelper was removed in 1.8 when the Vec3 constructor was made public. Just use the constructor directly.

  • Quote

Share this post


Link to post
Share on other sites

TheRPGAdventurer    4

TheRPGAdventurer

TheRPGAdventurer    4

  • Dragon Slayer
  • TheRPGAdventurer
  • Members
  • 4
  • 642 posts
Posted May 11, 2017
Just now, Choonster said:

 

Vec3.createVectorHelper was removed in 1.8 when the Vec3 constructor was made public. Just use the constructor directly.

thanks a lot man!

  • Quote

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
Posted May 13, 2017

helpful tip use variables

 

Vec3d vecPoint = new Vec3d(fill up 3 paramaters here);

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      [1.14.4] [Solved] Trouble With Packets

      By diesieben07 · Posted 41 minutes ago

      If you do this, then there is no point having the capability. Just store it in the stack's NBT tag directly at that point...
    • Cerandior
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior · Posted 48 minutes ago

      Yeah, I registered the entity and everything is fine now.
    • Cerandior
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior · Posted 1 hour ago

      I have no idea man. I tried setting the breakpoints at different parts of the class because intelliJ displays a tree of all the methods called at that point and I never found any of the shareTags methods where I expected them to be. And I know, what I did doesn't really make too much sense because the stack should call the readShareTag and getShareTag automatically (I did look into a lot of methods related to itemstacks), but for some reason nothing was working as expected for me. I just tried that and everything works fine now, if I get rid of that line of code nothing works again.   As for the entity, that is probably caused by the "unique" type of zombie that my staff spawns. I forgot to register that in my registry events. I am surprised the entity was spawning considering I haven't registered them actually. I will register them right now, and check if the error will persist. Thank you for your help.
    • diesieben07
      on/off button for custom furnace

      By diesieben07 · Posted 1 hour ago

      Any GUI that has a button on it. MainMenuScreen for example.
    • plugsmustard
      on/off button for custom furnace

      By plugsmustard · Posted 1 hour ago

      alright. where in vanilla are there those examples you mentioned?
  • Topics

    • Cerandior
      10
      [1.14.4] [Solved] Trouble With Packets

      By Cerandior
      Started 23 hours ago

    • plugsmustard
      18
      on/off button for custom furnace

      By plugsmustard
      Started 23 hours ago

    • AkosM
      3
      Increase target's damage via usable item

      By AkosM
      Started 17 hours ago

    • leesj
      3
      How to Give potion effect to entity

      By leesj
      Started 23 hours ago

    • thedarkcolour
      10
      [1.14] Patching method with coremod in TreeFeature causes IncompatibleClassChangeError

      By thedarkcolour
      Started 8 hours ago

  • Who's Online (See full list)

    • Eonasdan
    • Cerandior
    • Maraea21
    • diesieben07
    • Zimphire
    • Draco18s
    • loordgek
    • imacatlolol
    • jgfarrell
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Need Help in understanding vec3 Vec3d vec2i etc. please.
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community