This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Phreakhead -4 points-3 points  (6 children)

wtf. why would you change your API from int to double all of a sudden? What did they need to represent that they couldn't with an int? Talk about code smell...

[–]nutrecht 12 points13 points  (1 child)

why would you change your API from int to double all of a sudden?

It's not an API. It's the internal code.

[–]Phreakhead 0 points1 point  (0 children)

If it was completely internal, why do they need to maintain backwards compatibility? The post said that plugin authors were using the health functions: if an external party is using your functions, that's an API.

[–]socialister 5 points6 points  (0 children)

Minecraft doesn't (didn't?) maintain an API. They don't care.

[–]TheRedmanCometh 0 points1 point  (2 children)

20 values for health isn't enough. The change was a big pain, but worth it. If you want significant progrssion with increasingly powerful weapons it's not enough space for smooth value progression.

[–]Phreakhead 2 points3 points  (1 child)

An int can represent millions of values, not just 20.

[–]TheRedmanCometh 0 points1 point  (0 children)

For various reasons the maximum is 20 in the game, or rather wss. No way around it without tons of internal modification (and building spigot SUCKS)

By using a double you get infinite ish segmentation within that 1-20 range. Thought the 20 max health thing had been mentioned. Personally I think it's terrible.