Jump to content

Recommended Posts

Posted (edited)

Does anyone know what the 1.12.2 replacement for the 1.7 method world.getWorldVec3Pool().getVecFromPool(double, double, double) is or what it was used for? I assume memory optimisations for vectors

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 12/3/2018 at 7:34 AM, Cadiboo said:

is or what it was used for? I assume memory optimisations for vectors

Expand  

Maybe not sure.

  On 12/3/2018 at 7:34 AM, Cadiboo said:

Does anyone know what the 1.12.2 replacement for the 1.7 method world.getWorldVec3Pool().getVecFromPool(double, double, double)

Expand  

Well in 1.7.10 it was Vec3.createVectorHelper however this doesn't appear to exist in 1.12.2. Maybe it isn't used anymore. What are you using it for?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 12/3/2018 at 8:17 AM, Animefan8888 said:

Well in 1.7.10 it was Vec3.createVectorHelper however this doesn't appear to exist in 1.12.2. Maybe it isn't used anymore. What are you using it for?

Expand  

I'm porting someones mod to 1.12.2, I can show you a snippet the original code, but thats it (the mod was never open source, and this is the only snippet that the author shared).

  Reveal hidden contents

I'm currently making a new class called Vec3 and just instantiating new objects instead of using a pool. The code is currently super performance intensive, and I'm not worried about memory optimisations yet.

  Reveal hidden contents

 

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted (edited)
  On 12/3/2018 at 12:14 PM, Cadiboo said:

I'm currently making a new class called Vec3

Expand  

Why? What's wrong with mojang's Vec3d? Or lwjgl's Vector3? You should not be reinventing the wheel.

  On 12/3/2018 at 12:14 PM, Cadiboo said:

The code is currently super performance intensive

Expand  

Unless you mean some other code instantinating an object that consists out of 3 primitives is nearly instant.

Edited by V0idWa1k3r
Posted (edited)

Mojangs Vec3d is immutable, the code needs changeable vectors.

I also just got an out of memory error so I might need to start doing some optimising, though that could be due to something else. It had to do with shaders

That code I linked is being run for every block in a render chunk (it’s not as performance intensive as I thought, intelliJ hotswap seems to absolutely kill FPS tho)

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 12/3/2018 at 12:14 PM, Cadiboo said:

I'm currently making a new class called Vec3 and just instantiating new objects instead of using a pool.

Expand  

Using a pool might be a good optimization later. But I don't see a reason for your Vec3 class to store doubles. The values dont ever seem to have decimals. 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 12/3/2018 at 12:14 PM, Cadiboo said:

givePointRoughness(points[point]);

Expand  

This adds a random float value, sorry for not posting it, but I hadn’t reconstructed it yet and it wasn’t part of the original snippet. I’ll change the Vec3s to use floats.

 

Did the order of EnumFacing change since 1.7.10? 

  On 12/3/2018 at 12:14 PM, Cadiboo said:

int facingX = x; int facingY = y; int facingZ = z; if (side == 0) facingY--; else if (side == 1) facingY++; else if (side == 2) facingZ--; else if (side == 3) facingX++; else if (side == 4) facingZ++; else if (side == 5) facingX--;

Expand  

This isn’t working at all

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted (edited)
  On 12/3/2018 at 9:04 PM, Cadiboo said:

Did the order of EnumFacing change since 1.7.10? 

This isn’t working at all

Expand  

EnumFacing order is DUNSWE (which I'm pretty sure is the same as ForgeDirection from 1.7.10).

 

But EnumFacing and/or BlockPos provide all the methods you might need to get rid of that ugly (and wrong) bit of code.  Assuming the side int is in the expected DUNSWE order:

BlockPos newPos = new BlockPos(x, y, z).offset(EnumFacing.byIndex(side));
// then use newPos.getX() etc.

 

Edited by desht
Posted (edited)
  On 12/5/2018 at 1:52 PM, desht said:

EnumFacing order is DUNSWE (which I'm pretty sure is the same as ForgeDirection from 1.7.10).

 

But EnumFacing and/or BlockPos provide all the methods you might need to get rid of that ugly (and wrong) bit of code.  Assuming the side int is in the expected DUNSWE order:

BlockPos newPos = new BlockPos(x, y, z).offset(EnumFacing.byIndex(side));
// then use newPos.getX() etc.

 

Expand  

All of that code was apparently completely useless and unnecessary in 1.12.2, and now I'm just using the original BlockPos.
The problem with the EnumFacings was actually that the vertices I had taken from the old code (and expected to be perfect) were completely broken for South and West.

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

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