Closed Igrium closed 4 years ago
Hi Sam,
the reason to not have a pubic constructor with the location is for readability purposes only. Chunk.createAt(new Vec3i(0, 0, 0));
describes better the function/goal of the passed vector parameter then new Chunk(new Vec3i(0, 0, 0));
.
The downside of this is that it doesn't support inheritance. I'll create a hotfix PR to support both ways on the last stable release.
Feature available in release v1.5.1
Thanks!
In my project, I'm trying to resolve a compatibility issue between two systems, and the best way I can think to do this was by making a child class of
Chunk
, but I can't because it has a private constructor.I don't understand why it has to have a private constructor though, because you could just make the constructor have all the code from
createAt
and re-writecreateAt
to just feed the location into the constructor for backward compatibility.So why don't you do that?