It also sets position:
public void setWorld(World world, BlockPos blockPos) {
this.world = world;
this.pos = blockPos.toImmutable();
}
Looks functionally similar to Entity setPosition, both of which set up the (block) entity's initial state.
I would prefer calling it (and also the one in Entity) setLocation. Position has a specific meaning and refers to a position in the world. We can use the more general word "location" to avoid using "position" for world + position.
Most helpful comment
I would prefer calling it (and also the one in
Entity)setLocation. Position has a specific meaning and refers to a position in the world. We can use the more general word "location" to avoid using "position" for world + position.