× Post your Help request here

Decimals with shapeboxes?

More
1 year 6 months ago #78409 by FEX___96
Replied by FEX___96 on topic Decimals with shapeboxes?
I remember someone telling me once those TMT methods could be modified to accept floats, and it would 'work'.
Needs tmt edits though.
The topic has been locked.
More
1 year 6 months ago #78410 by jamioflan
Replied by jamioflan on topic Decimals with shapeboxes?

Manus wrote:
I'm afraid but this is not correct ;)

if you have a look into the source code you will find this:

public void addBox(float x, float y, float z, int w, int h, int d, float expansion)

x,y,z are the coordinates of the box
w,h,d the dimensions

and as you can see they are integer values :D this also applies for all other boxtypes e.g. shapeboxes, trapezoids...

it would be possible to change it to float, but all models then have to be changed too


There are actually lots of overloads of the addBox function. ModelRendererTurbo.java line 837 adds one that takes float parameters. Internally, it just converts this into a shapebox, rounding up the length of each edge for the starting box
The following user(s) said Thank You: Skullmassarce7
The topic has been locked.
More
1 year 6 months ago #78412 by Skullmassarce7
Ok, thank you very much Manus! You're awesome man! :)
The topic has been locked.
 
Latest Forum Posts
 
Latest Blog Posts
 
User Online
 
User Menu